diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..394522f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+node_modules/**
\ No newline at end of file
diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn
deleted file mode 120000
index cf76760..0000000
--- a/node_modules/.bin/acorn
+++ /dev/null
@@ -1 +0,0 @@
-../acorn/bin/acorn
\ No newline at end of file
diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve
deleted file mode 120000
index b6afda6..0000000
--- a/node_modules/.bin/resolve
+++ /dev/null
@@ -1 +0,0 @@
-../resolve/bin/resolve
\ No newline at end of file
diff --git a/node_modules/.bin/rollup b/node_modules/.bin/rollup
deleted file mode 120000
index 5939621..0000000
--- a/node_modules/.bin/rollup
+++ /dev/null
@@ -1 +0,0 @@
-../rollup/dist/bin/rollup
\ No newline at end of file
diff --git a/node_modules/.bin/terser b/node_modules/.bin/terser
deleted file mode 120000
index 0792ff4..0000000
--- a/node_modules/.bin/terser
+++ /dev/null
@@ -1 +0,0 @@
-../terser/bin/terser
\ No newline at end of file
diff --git a/node_modules/@babel/code-frame/LICENSE b/node_modules/@babel/code-frame/LICENSE
deleted file mode 100644
index f31575e..0000000
--- a/node_modules/@babel/code-frame/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-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.
diff --git a/node_modules/@babel/code-frame/README.md b/node_modules/@babel/code-frame/README.md
deleted file mode 100644
index 08cacb0..0000000
--- a/node_modules/@babel/code-frame/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# @babel/code-frame
-
-> Generate errors that contain a code frame that point to source locations.
-
-See our website [@babel/code-frame](https://babeljs.io/docs/en/babel-code-frame) for more information.
-
-## Install
-
-Using npm:
-
-```sh
-npm install --save-dev @babel/code-frame
-```
-
-or using yarn:
-
-```sh
-yarn add @babel/code-frame --dev
-```
diff --git a/node_modules/@babel/code-frame/lib/index.js b/node_modules/@babel/code-frame/lib/index.js
deleted file mode 100644
index cba3f83..0000000
--- a/node_modules/@babel/code-frame/lib/index.js
+++ /dev/null
@@ -1,163 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.codeFrameColumns = codeFrameColumns;
-exports.default = _default;
-
-var _highlight = require("@babel/highlight");
-
-let deprecationWarningShown = false;
-
-function getDefs(chalk) {
- return {
- gutter: chalk.grey,
- marker: chalk.red.bold,
- message: chalk.red.bold
- };
-}
-
-const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
-
-function getMarkerLines(loc, source, opts) {
- const startLoc = Object.assign({
- column: 0,
- line: -1
- }, loc.start);
- const endLoc = Object.assign({}, startLoc, loc.end);
- const {
- linesAbove = 2,
- linesBelow = 3
- } = opts || {};
- const startLine = startLoc.line;
- const startColumn = startLoc.column;
- const endLine = endLoc.line;
- const endColumn = endLoc.column;
- let start = Math.max(startLine - (linesAbove + 1), 0);
- let end = Math.min(source.length, endLine + linesBelow);
-
- if (startLine === -1) {
- start = 0;
- }
-
- if (endLine === -1) {
- end = source.length;
- }
-
- const lineDiff = endLine - startLine;
- const markerLines = {};
-
- if (lineDiff) {
- for (let i = 0; i <= lineDiff; i++) {
- const lineNumber = i + startLine;
-
- if (!startColumn) {
- markerLines[lineNumber] = true;
- } else if (i === 0) {
- const sourceLength = source[lineNumber - 1].length;
- markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
- } else if (i === lineDiff) {
- markerLines[lineNumber] = [0, endColumn];
- } else {
- const sourceLength = source[lineNumber - i].length;
- markerLines[lineNumber] = [0, sourceLength];
- }
- }
- } else {
- if (startColumn === endColumn) {
- if (startColumn) {
- markerLines[startLine] = [startColumn, 0];
- } else {
- markerLines[startLine] = true;
- }
- } else {
- markerLines[startLine] = [startColumn, endColumn - startColumn];
- }
- }
-
- return {
- start,
- end,
- markerLines
- };
-}
-
-function codeFrameColumns(rawLines, loc, opts = {}) {
- const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
- const chalk = (0, _highlight.getChalk)(opts);
- const defs = getDefs(chalk);
-
- const maybeHighlight = (chalkFn, string) => {
- return highlighted ? chalkFn(string) : string;
- };
-
- const lines = rawLines.split(NEWLINE);
- const {
- start,
- end,
- markerLines
- } = getMarkerLines(loc, lines, opts);
- const hasColumns = loc.start && typeof loc.start.column === "number";
- const numberMaxWidth = String(end).length;
- const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
- let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {
- const number = start + 1 + index;
- const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
- const gutter = ` ${paddedNumber} |`;
- const hasMarker = markerLines[number];
- const lastMarkerLine = !markerLines[number + 1];
-
- if (hasMarker) {
- let markerLine = "";
-
- if (Array.isArray(hasMarker)) {
- const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
- const numberOfMarkers = hasMarker[1] || 1;
- markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
-
- if (lastMarkerLine && opts.message) {
- markerLine += " " + maybeHighlight(defs.message, opts.message);
- }
- }
-
- return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
- } else {
- return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
- }
- }).join("\n");
-
- if (opts.message && !hasColumns) {
- frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
- }
-
- if (highlighted) {
- return chalk.reset(frame);
- } else {
- return frame;
- }
-}
-
-function _default(rawLines, lineNumber, colNumber, opts = {}) {
- if (!deprecationWarningShown) {
- deprecationWarningShown = true;
- const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
-
- if (process.emitWarning) {
- process.emitWarning(message, "DeprecationWarning");
- } else {
- const deprecationError = new Error(message);
- deprecationError.name = "DeprecationWarning";
- console.warn(new Error(message));
- }
- }
-
- colNumber = Math.max(colNumber, 0);
- const location = {
- start: {
- column: colNumber,
- line: lineNumber
- }
- };
- return codeFrameColumns(rawLines, location, opts);
-}
\ No newline at end of file
diff --git a/node_modules/@babel/code-frame/package.json b/node_modules/@babel/code-frame/package.json
deleted file mode 100644
index 3519fcd..0000000
--- a/node_modules/@babel/code-frame/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "_from": "@babel/code-frame@^7.10.4",
- "_id": "@babel/code-frame@7.16.7",
- "_inBundle": false,
- "_integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==",
- "_location": "/@babel/code-frame",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "@babel/code-frame@^7.10.4",
- "name": "@babel/code-frame",
- "escapedName": "@babel%2fcode-frame",
- "scope": "@babel",
- "rawSpec": "^7.10.4",
- "saveSpec": null,
- "fetchSpec": "^7.10.4"
- },
- "_requiredBy": [
- "/rollup-plugin-terser"
- ],
- "_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz",
- "_shasum": "44416b6bd7624b998f5b1af5d470856c40138789",
- "_spec": "@babel/code-frame@^7.10.4",
- "_where": "/Users/keiferju/Workplace/dllcnx/dTools/node_modules/rollup-plugin-terser",
- "author": {
- "name": "The Babel Team",
- "url": "https://babel.dev/team"
- },
- "bugs": {
- "url": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen"
- },
- "bundleDependencies": false,
- "dependencies": {
- "@babel/highlight": "^7.16.7"
- },
- "deprecated": false,
- "description": "Generate errors that contain a code frame that point to source locations.",
- "devDependencies": {
- "@types/chalk": "^2.0.0",
- "chalk": "^2.0.0",
- "strip-ansi": "^4.0.0"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "homepage": "https://babel.dev/docs/en/next/babel-code-frame",
- "license": "MIT",
- "main": "./lib/index.js",
- "name": "@babel/code-frame",
- "publishConfig": {
- "access": "public"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/babel/babel.git",
- "directory": "packages/babel-code-frame"
- },
- "version": "7.16.7"
-}
diff --git a/node_modules/@babel/helper-validator-identifier/LICENSE b/node_modules/@babel/helper-validator-identifier/LICENSE
deleted file mode 100644
index f31575e..0000000
--- a/node_modules/@babel/helper-validator-identifier/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-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.
diff --git a/node_modules/@babel/helper-validator-identifier/README.md b/node_modules/@babel/helper-validator-identifier/README.md
deleted file mode 100644
index 4f704c4..0000000
--- a/node_modules/@babel/helper-validator-identifier/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# @babel/helper-validator-identifier
-
-> Validate identifier/keywords name
-
-See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/en/babel-helper-validator-identifier) for more information.
-
-## Install
-
-Using npm:
-
-```sh
-npm install --save @babel/helper-validator-identifier
-```
-
-or using yarn:
-
-```sh
-yarn add @babel/helper-validator-identifier
-```
diff --git a/node_modules/@babel/helper-validator-identifier/lib/identifier.js b/node_modules/@babel/helper-validator-identifier/lib/identifier.js
deleted file mode 100644
index cbade22..0000000
--- a/node_modules/@babel/helper-validator-identifier/lib/identifier.js
+++ /dev/null
@@ -1,84 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.isIdentifierChar = isIdentifierChar;
-exports.isIdentifierName = isIdentifierName;
-exports.isIdentifierStart = isIdentifierStart;
-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\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\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\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\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-\u1711\u171f-\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-\u1b4c\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-\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-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\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\u0898-\u089f\u08ca-\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\u0c3c\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\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-\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, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 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, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 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, 38, 6, 186, 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, 19, 72, 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, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 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, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 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, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 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, 42719, 33, 4152, 8, 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, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 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, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 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, 357, 0, 62, 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; i < name.length; i++) {
- let cp = name.charCodeAt(i);
-
- if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {
- const trail = name.charCodeAt(++i);
-
- if ((trail & 0xfc00) === 0xdc00) {
- cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);
- }
- }
-
- if (isFirst) {
- isFirst = false;
-
- if (!isIdentifierStart(cp)) {
- return false;
- }
- } else if (!isIdentifierChar(cp)) {
- return false;
- }
- }
-
- return !isFirst;
-}
\ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/lib/index.js b/node_modules/@babel/helper-validator-identifier/lib/index.js
deleted file mode 100644
index ca9decf..0000000
--- a/node_modules/@babel/helper-validator-identifier/lib/index.js
+++ /dev/null
@@ -1,57 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-Object.defineProperty(exports, "isIdentifierChar", {
- enumerable: true,
- get: function () {
- return _identifier.isIdentifierChar;
- }
-});
-Object.defineProperty(exports, "isIdentifierName", {
- enumerable: true,
- get: function () {
- return _identifier.isIdentifierName;
- }
-});
-Object.defineProperty(exports, "isIdentifierStart", {
- enumerable: true,
- get: function () {
- return _identifier.isIdentifierStart;
- }
-});
-Object.defineProperty(exports, "isKeyword", {
- enumerable: true,
- get: function () {
- return _keyword.isKeyword;
- }
-});
-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;
- }
-});
-
-var _identifier = require("./identifier");
-
-var _keyword = require("./keyword");
\ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/lib/keyword.js b/node_modules/@babel/helper-validator-identifier/lib/keyword.js
deleted file mode 100644
index 0939e9a..0000000
--- a/node_modules/@babel/helper-validator-identifier/lib/keyword.js
+++ /dev/null
@@ -1,38 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.isKeyword = isKeyword;
-exports.isReservedWord = isReservedWord;
-exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
-exports.isStrictBindReservedWord = isStrictBindReservedWord;
-exports.isStrictReservedWord = isStrictReservedWord;
-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);
-}
\ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/package.json b/node_modules/@babel/helper-validator-identifier/package.json
deleted file mode 100644
index ea8cf8a..0000000
--- a/node_modules/@babel/helper-validator-identifier/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "_from": "@babel/helper-validator-identifier@^7.16.7",
- "_id": "@babel/helper-validator-identifier@7.16.7",
- "_inBundle": false,
- "_integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==",
- "_location": "/@babel/helper-validator-identifier",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "@babel/helper-validator-identifier@^7.16.7",
- "name": "@babel/helper-validator-identifier",
- "escapedName": "@babel%2fhelper-validator-identifier",
- "scope": "@babel",
- "rawSpec": "^7.16.7",
- "saveSpec": null,
- "fetchSpec": "^7.16.7"
- },
- "_requiredBy": [
- "/@babel/highlight"
- ],
- "_resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz",
- "_shasum": "e8c602438c4a8195751243da9031d1607d247cad",
- "_spec": "@babel/helper-validator-identifier@^7.16.7",
- "_where": "/Users/keiferju/Workplace/dllcnx/dTools/node_modules/@babel/highlight",
- "author": {
- "name": "The Babel Team",
- "url": "https://babel.dev/team"
- },
- "bugs": {
- "url": "https://github.com/babel/babel/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Validate identifier/keywords name",
- "devDependencies": {
- "@unicode/unicode-14.0.0": "^1.2.1",
- "charcodes": "^0.2.0"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "exports": {
- ".": "./lib/index.js",
- "./package.json": "./package.json"
- },
- "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.16.7"
-}
diff --git a/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js b/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js
deleted file mode 100644
index f644d77..0000000
--- a/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js
+++ /dev/null
@@ -1,75 +0,0 @@
-"use strict";
-
-// Always use the latest available version of Unicode!
-// https://tc39.github.io/ecma262/#sec-conformance
-const version = "14.0.0";
-
-const start = require("@unicode/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/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) + ";"
-);
diff --git a/node_modules/@babel/highlight/LICENSE b/node_modules/@babel/highlight/LICENSE
deleted file mode 100644
index f31575e..0000000
--- a/node_modules/@babel/highlight/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-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.
diff --git a/node_modules/@babel/highlight/README.md b/node_modules/@babel/highlight/README.md
deleted file mode 100644
index f8887ad..0000000
--- a/node_modules/@babel/highlight/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# @babel/highlight
-
-> Syntax highlight JavaScript strings for output in terminals.
-
-See our website [@babel/highlight](https://babeljs.io/docs/en/babel-highlight) for more information.
-
-## Install
-
-Using npm:
-
-```sh
-npm install --save-dev @babel/highlight
-```
-
-or using yarn:
-
-```sh
-yarn add @babel/highlight --dev
-```
diff --git a/node_modules/@babel/highlight/lib/index.js b/node_modules/@babel/highlight/lib/index.js
deleted file mode 100644
index d323b39..0000000
--- a/node_modules/@babel/highlight/lib/index.js
+++ /dev/null
@@ -1,116 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = highlight;
-exports.getChalk = getChalk;
-exports.shouldHighlight = shouldHighlight;
-
-var _jsTokens = require("js-tokens");
-
-var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
-
-var _chalk = require("chalk");
-
-const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]);
-
-function getDefs(chalk) {
- return {
- keyword: chalk.cyan,
- capitalized: chalk.yellow,
- jsxIdentifier: chalk.yellow,
- punctuator: chalk.yellow,
- number: chalk.magenta,
- string: chalk.green,
- regex: chalk.magenta,
- comment: chalk.grey,
- invalid: chalk.white.bgRed.bold
- };
-}
-
-const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
-const BRACKET = /^[()[\]{}]$/;
-let tokenize;
-{
- const JSX_TAG = /^[a-z][\w-]*$/i;
-
- const getTokenType = function (token, offset, text) {
- if (token.type === "name") {
- if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
- return "keyword";
- }
-
- if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "")) {
- return "jsxIdentifier";
- }
-
- if (token.value[0] !== token.value[0].toLowerCase()) {
- return "capitalized";
- }
- }
-
- if (token.type === "punctuator" && BRACKET.test(token.value)) {
- return "bracket";
- }
-
- if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
- return "punctuator";
- }
-
- return token.type;
- };
-
- tokenize = function* (text) {
- let match;
-
- while (match = _jsTokens.default.exec(text)) {
- const token = _jsTokens.matchToToken(match);
-
- yield {
- type: getTokenType(token, match.index, text),
- value: token.value
- };
- }
- };
-}
-
-function highlightTokens(defs, text) {
- let highlighted = "";
-
- for (const {
- type,
- value
- } of tokenize(text)) {
- const colorize = defs[type];
-
- if (colorize) {
- highlighted += value.split(NEWLINE).map(str => colorize(str)).join("\n");
- } else {
- highlighted += value;
- }
- }
-
- return highlighted;
-}
-
-function shouldHighlight(options) {
- return !!_chalk.supportsColor || options.forceColor;
-}
-
-function getChalk(options) {
- return options.forceColor ? new _chalk.constructor({
- enabled: true,
- level: 1
- }) : _chalk;
-}
-
-function highlight(code, options = {}) {
- if (code !== "" && shouldHighlight(options)) {
- const chalk = getChalk(options);
- const defs = getDefs(chalk);
- return highlightTokens(defs, code);
- } else {
- return code;
- }
-}
\ No newline at end of file
diff --git a/node_modules/@babel/highlight/package.json b/node_modules/@babel/highlight/package.json
deleted file mode 100644
index e497ba0..0000000
--- a/node_modules/@babel/highlight/package.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "_from": "@babel/highlight@^7.16.7",
- "_id": "@babel/highlight@7.16.10",
- "_inBundle": false,
- "_integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==",
- "_location": "/@babel/highlight",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "@babel/highlight@^7.16.7",
- "name": "@babel/highlight",
- "escapedName": "@babel%2fhighlight",
- "scope": "@babel",
- "rawSpec": "^7.16.7",
- "saveSpec": null,
- "fetchSpec": "^7.16.7"
- },
- "_requiredBy": [
- "/@babel/code-frame"
- ],
- "_resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz",
- "_shasum": "744f2eb81579d6eea753c227b0f570ad785aba88",
- "_spec": "@babel/highlight@^7.16.7",
- "_where": "/Users/keiferju/Workplace/dllcnx/dTools/node_modules/@babel/code-frame",
- "author": {
- "name": "The Babel Team",
- "url": "https://babel.dev/team"
- },
- "bugs": {
- "url": "https://github.com/babel/babel/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "@babel/helper-validator-identifier": "^7.16.7",
- "chalk": "^2.0.0",
- "js-tokens": "^4.0.0"
- },
- "deprecated": false,
- "description": "Syntax highlight JavaScript strings for output in terminals.",
- "devDependencies": {
- "@types/chalk": "^2.0.0",
- "strip-ansi": "^4.0.0"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "homepage": "https://babel.dev/docs/en/next/babel-highlight",
- "license": "MIT",
- "main": "./lib/index.js",
- "name": "@babel/highlight",
- "publishConfig": {
- "access": "public"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/babel/babel.git",
- "directory": "packages/babel-highlight"
- },
- "version": "7.16.10"
-}
diff --git a/node_modules/@rollup/plugin-commonjs/CHANGELOG.md b/node_modules/@rollup/plugin-commonjs/CHANGELOG.md
deleted file mode 100644
index fde6590..0000000
--- a/node_modules/@rollup/plugin-commonjs/CHANGELOG.md
+++ /dev/null
@@ -1,598 +0,0 @@
-# @rollup/plugin-commonjs ChangeLog
-
-## v21.0.2
-
-_2022-02-23_
-
-### Updates
-
-- chore: transpile dynamic helper to ES5 (#1082)
-
-## v21.0.1
-
-_2021-10-19_
-
-### Bugfixes
-
-- fix: pass on isEntry and custom resolve options (#1018)
-
-## v21.0.0
-
-_2021-10-01_
-
-### Breaking Changes
-
-- fix: use safe default value for ignoreTryCatch (#1005)
-
-## v20.0.0
-
-_2021-07-30_
-
-### Breaking Changes
-
-- fix: Correctly infer module name for any separator (#924)
-
-## v19.0.2
-
-_2021-07-26_
-
-### Bugfixes
-
-- fix convert module.exports with `__esModule` property(#939) (#942)
-
-## v19.0.1
-
-_2021-07-15_
-
-### Bugfixes
-
-- fix: short-circuit to actual module entry point when using circular ref through a different entry (#888)
-
-## v19.0.0
-
-_2021-05-07_
-
-### Breaking Changes
-
-- feat!: Add support for circular dependencies (#658)
-
-## v18.1.0
-
-_2021-05-04_
-
-### Bugfixes
-
-- fix: idempotence issue (#871)
-
-### Features
-
-- feat: Add `defaultIsModuleExports` option to match Node.js behavior (#838)
-
-## v18.0.0
-
-_2021-03-26_
-
-### Breaking Changes
-
-- feat!: Add ignore-dynamic-requires option (#819)
-
-### Bugfixes
-
-- fix: `isRestorableCompiledEsm` should also trigger code transform (#816)
-
-## v17.1.0
-
-_2021-01-29_
-
-### Bugfixes
-
-- fix: correctly replace shorthand `require` (#764)
-
-### Features
-
-- feature: load dynamic commonjs modules from es `import` (#766)
-- feature: support cache/resolve access inside dynamic modules (#728)
-- feature: allow keeping `require` calls inside try-catch (#729)
-
-### Updates
-
-- chore: fix lint error (#719)
-
-## v17.0.0
-
-_2020-11-30_
-
-### Breaking Changes
-
-- feat!: reconstruct real es module from \_\_esModule marker (#537)
-
-## v16.0.0
-
-_2020-10-27_
-
-### Breaking Changes
-
-- feat!: Expose cjs detection and support offline caching (#604)
-
-### Bugfixes
-
-- fix: avoid wrapping `commonjsRegister` call in `createCommonjsModule(...)` (#602)
-- fix: register dynamic modules when a different loader (i.e typescript) loads the entry file (#599)
-- fix: fixed access to node_modules dynamic module with subfolder (i.e 'logform/json') (#601)
-
-### Features
-
-- feat: pass type of import to node-resolve (#611)
-
-## v15.1.0
-
-_2020-09-21_
-
-### Features
-
-- feat: inject \_\_esModule marker into ES namespaces and add Object prototype (#552)
-- feat: add requireReturnsDefault to types (#579)
-
-## v15.0.0
-
-_2020-08-13_
-
-### Breaking Changes
-
-- feat!: return the namespace by default when requiring ESM (#507)
-- fix!: fix interop when importing CJS that is transpiled ESM from an actual ESM (#501)
-
-### Bugfixes
-
-- fix: add .cjs to default file extensions. (#524)
-
-### Updates
-
-- chore: update dependencies (fe399e2)
-
-## v14.0.0
-
-_2020-07-13_
-
-### Release Notes
-
-This restores the fixes from v13.0.1, but as a semver compliant major version.
-
-## v13.0.2
-
-_2020-07-13_
-
-### Rollback
-
-Rolls back breaking change in v13.0.1 whereby the exported `unwrapExports` method was removed.
-
-## v13.0.1
-
-_2020-07-12_
-
-### Bugfixes
-
-- fix: prevent rewrite require.resolve (#446)
-- fix: Support \_\_esModule packages with a default export (#465)
-
-## v13.0.0
-
-_2020-06-05_
-
-### Breaking Changes
-
-- fix!: remove namedExports from types (#410)
-- fix!: do not create fake named exports (#427)
-
-### Bugfixes
-
-- fix: \_\_moduleExports in multi entry + inter dependencies (#415)
-
-## v12.0.0
-
-_2020-05-20_
-
-### Breaking Changes
-
-- feat: add kill-switch for mixed es-cjs modules (#358)
-- feat: set syntheticNamedExports for commonjs modules (#149)
-
-### Bugfixes
-
-- fix: expose the virtual `require` function on mock `module`. fixes #307 (#326)
-- fix: improved shouldWrap logic. fixes #304 (#355)
-
-### Features
-
-- feat: support for explicit module.require calls. fixes #310 (#325)
-
-## v11.1.0
-
-_2020-04-12_
-
-### Bugfixes
-
-- fix: produce legal variable names from filenames containing hyphens. (#201)
-
-### Features
-
-- feat: support dynamic require (#206)
-- feat: export properties defined using Object.defineProperty(exports, ..) (#222)
-
-### Updates
-
-- chore: snapshot mismatch running tests before publish (d6bbfdd)
-- test: add snapshots to all "function" tests (#218)
-
-## v11.0.2
-
-_2020-02-01_
-
-### Updates
-
-- docs: fix link for plugin-node-resolve (#170)
-- chore: update dependencies (5405eea)
-- chore: remove jsnext:main (#152)
-
-## v11.0.1
-
-_2020-01-04_
-
-### Bugfixes
-
-- fix: module.exports object spread (#121)
-
-## 11.0.0
-
-_2019-12-13_
-
-- **Breaking:** Minimum compatible Rollup version is 1.20.0
-- **Breaking:** Minimum supported Node version is 8.0.0
-- Published as @rollup/plugin-commonjs
-
-## 10.1.0
-
-_2019-08-27_
-
-- Normalize ids before looking up in named export map ([#406](https://github.com/rollup/rollup-plugin-commonjs/issues/406))
-- Update README.md with note on symlinks ([#405](https://github.com/rollup/rollup-plugin-commonjs/issues/405))
-
-## 10.0.2
-
-_2019-08-03_
-
-- Support preserveSymlinks: false ([#401](https://github.com/rollup/rollup-plugin-commonjs/issues/401))
-
-## 10.0.1
-
-_2019-06-27_
-
-- Make tests run with Node 6 again and update dependencies ([#389](https://github.com/rollup/rollup-plugin-commonjs/issues/389))
-- Handle builtins appropriately for resolve 1.11.0 ([#395](https://github.com/rollup/rollup-plugin-commonjs/issues/395))
-
-## 10.0.0
-
-_2019-05-15_
-
-- Use new Rollup@1.12 context functions, fix issue when resolveId returns an object ([#387](https://github.com/rollup/rollup-plugin-commonjs/issues/387))
-
-## 9.3.4
-
-_2019-04-04_
-
-- Make "extensions" optional ([#384](https://github.com/rollup/rollup-plugin-commonjs/issues/384))
-- Use same typing for include and exclude properties ([#385](https://github.com/rollup/rollup-plugin-commonjs/issues/385))
-
-## 9.3.3
-
-_2019-04-04_
-
-- Remove colon from module prefixes ([#371](https://github.com/rollup/rollup-plugin-commonjs/issues/371))
-
-## 9.3.2
-
-_2019-04-04_
-
-- Use shared extractAssignedNames, fix destructuring issue ([#303](https://github.com/rollup/rollup-plugin-commonjs/issues/303))
-
-## 9.3.1
-
-_2019-04-04_
-
-- Include typings in release ([#382](https://github.com/rollup/rollup-plugin-commonjs/issues/382))
-
-## 9.3.0
-
-_2019-04-03_
-
-- Add TypeScript types ([#363](https://github.com/rollup/rollup-plugin-commonjs/issues/363))
-
-## 9.2.3
-
-_2019-04-02_
-
-- Improve support for ES3 browsers ([#364](https://github.com/rollup/rollup-plugin-commonjs/issues/364))
-- Add note about monorepo usage to readme ([#372](https://github.com/rollup/rollup-plugin-commonjs/issues/372))
-- Add .js extension to generated helper file ([#373](https://github.com/rollup/rollup-plugin-commonjs/issues/373))
-
-## 9.2.2
-
-_2019-03-25_
-
-- Handle array destructuring assignment ([#379](https://github.com/rollup/rollup-plugin-commonjs/issues/379))
-
-## 9.2.1
-
-_2019-02-23_
-
-- Use correct context when manually resolving ids ([#370](https://github.com/rollup/rollup-plugin-commonjs/issues/370))
-
-## 9.2.0
-
-_2018-10-10_
-
-- Fix missing default warning, produce better code when importing known ESM default exports ([#349](https://github.com/rollup/rollup-plugin-commonjs/issues/349))
-- Refactor code and add prettier ([#346](https://github.com/rollup/rollup-plugin-commonjs/issues/346))
-
-## 9.1.8
-
-_2018-09-18_
-
-- Ignore virtual modules created by other plugins ([#327](https://github.com/rollup/rollup-plugin-commonjs/issues/327))
-- Add "location" and "process" to reserved words ([#330](https://github.com/rollup/rollup-plugin-commonjs/issues/330))
-
-## 9.1.6
-
-_2018-08-24_
-
-- Keep commonJS detection between instantiations ([#338](https://github.com/rollup/rollup-plugin-commonjs/issues/338))
-
-## 9.1.5
-
-_2018-08-09_
-
-- Handle object form of input ([#329](https://github.com/rollup/rollup-plugin-commonjs/issues/329))
-
-## 9.1.4
-
-_2018-07-27_
-
-- Make "from" a reserved word ([#320](https://github.com/rollup/rollup-plugin-commonjs/issues/320))
-
-## 9.1.3
-
-_2018-04-30_
-
-- Fix a caching issue ([#316](https://github.com/rollup/rollup-plugin-commonjs/issues/316))
-
-## 9.1.2
-
-_2018-04-30_
-
-- Re-publication of 9.1.0
-
-## 9.1.1
-
-_2018-04-30_
-
-- Fix ordering of modules when using rollup 0.58 ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302))
-
-## 9.1.0
-
-- Do not automatically wrap modules with return statements in top level arrow functions ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302))
-
-## 9.0.0
-
-- Make rollup a peer dependency with a version range ([#300](https://github.com/rollup/rollup-plugin-commonjs/issues/300))
-
-## 8.4.1
-
-- Re-release of 8.3.0 as #287 was actually a breaking change
-
-## 8.4.0
-
-- Better handle non-CJS files that contain CJS keywords ([#285](https://github.com/rollup/rollup-plugin-commonjs/issues/285))
-- Use rollup's plugin context`parse` function ([#287](https://github.com/rollup/rollup-plugin-commonjs/issues/287))
-- Improve error handling ([#288](https://github.com/rollup/rollup-plugin-commonjs/issues/288))
-
-## 8.3.0
-
-- Handle multiple entry points ([#283](https://github.com/rollup/rollup-plugin-commonjs/issues/283))
-- Extract named exports from exported object literals ([#272](https://github.com/rollup/rollup-plugin-commonjs/issues/272))
-- Fix when `options.external` is modified by other plugins ([#264](https://github.com/rollup/rollup-plugin-commonjs/issues/264))
-- Recognize static template strings in require statements ([#271](https://github.com/rollup/rollup-plugin-commonjs/issues/271))
-
-## 8.2.4
-
-- Don't import default from ES modules that don't export default ([#206](https://github.com/rollup/rollup-plugin-commonjs/issues/206))
-
-## 8.2.3
-
-- Prevent duplicate default exports ([#230](https://github.com/rollup/rollup-plugin-commonjs/pull/230))
-- Only include default export when it exists ([#226](https://github.com/rollup/rollup-plugin-commonjs/pull/226))
-- Deconflict `require` aliases ([#232](https://github.com/rollup/rollup-plugin-commonjs/issues/232))
-
-## 8.2.1
-
-- Fix magic-string deprecation warning
-
-## 8.2.0
-
-- Avoid using `index` as a variable name ([#208](https://github.com/rollup/rollup-plugin-commonjs/pull/208))
-
-## 8.1.1
-
-- Compatibility with 0.48 ([#220](https://github.com/rollup/rollup-plugin-commonjs/issues/220))
-
-## 8.1.0
-
-- Handle `options.external` correctly ([#212](https://github.com/rollup/rollup-plugin-commonjs/pull/212))
-- Support top-level return ([#195](https://github.com/rollup/rollup-plugin-commonjs/pull/195))
-
-## 8.0.2
-
-- Fix another `var` rewrite bug ([#181](https://github.com/rollup/rollup-plugin-commonjs/issues/181))
-
-## 8.0.1
-
-- Remove declarators within a var declaration correctly ([#179](https://github.com/rollup/rollup-plugin-commonjs/issues/179))
-
-## 8.0.0
-
-- Prefer the names dependencies are imported by for the common `var foo = require('foo')` pattern ([#176](https://github.com/rollup/rollup-plugin-commonjs/issues/176))
-
-## 7.1.0
-
-- Allow certain `require` statements to pass through unmolested ([#174](https://github.com/rollup/rollup-plugin-commonjs/issues/174))
-
-## 7.0.2
-
-- Handle duplicate default exports ([#158](https://github.com/rollup/rollup-plugin-commonjs/issues/158))
-
-## 7.0.1
-
-- Fix exports with parentheses ([#168](https://github.com/rollup/rollup-plugin-commonjs/issues/168))
-
-## 7.0.0
-
-- Rewrite `typeof module`, `typeof module.exports` and `typeof exports` as `'object'` ([#151](https://github.com/rollup/rollup-plugin-commonjs/issues/151))
-
-## 6.0.1
-
-- Don't overwrite globals ([#127](https://github.com/rollup/rollup-plugin-commonjs/issues/127))
-
-## 6.0.0
-
-- Rewrite top-level `define` as `undefined`, so AMD-first UMD blocks do not cause breakage ([#144](https://github.com/rollup/rollup-plugin-commonjs/issues/144))
-- Support ES2017 syntax ([#132](https://github.com/rollup/rollup-plugin-commonjs/issues/132))
-- Deconflict exported reserved keywords ([#116](https://github.com/rollup/rollup-plugin-commonjs/issues/116))
-
-## 5.0.5
-
-- Fix parenthesis wrapped exports ([#120](https://github.com/rollup/rollup-plugin-commonjs/issues/120))
-
-## 5.0.4
-
-- Ensure named exports are added to default export in optimised modules ([#112](https://github.com/rollup/rollup-plugin-commonjs/issues/112))
-
-## 5.0.3
-
-- Respect custom `namedExports` in optimised modules ([#35](https://github.com/rollup/rollup-plugin-commonjs/issues/35))
-
-## 5.0.2
-
-- Replace `require` (outside call expressions) with `commonjsRequire` helper ([#77](https://github.com/rollup/rollup-plugin-commonjs/issues/77), [#83](https://github.com/rollup/rollup-plugin-commonjs/issues/83))
-
-## 5.0.1
-
-- Deconflict against globals ([#84](https://github.com/rollup/rollup-plugin-commonjs/issues/84))
-
-## 5.0.0
-
-- Optimise modules that don't need to be wrapped in a function ([#106](https://github.com/rollup/rollup-plugin-commonjs/pull/106))
-- Ignore modules containing `import` and `export` statements ([#96](https://github.com/rollup/rollup-plugin-commonjs/pull/96))
-
-## 4.1.0
-
-- Ignore dead branches ([#93](https://github.com/rollup/rollup-plugin-commonjs/issues/93))
-
-## 4.0.1
-
-- Fix `ignoreGlobal` option ([#86](https://github.com/rollup/rollup-plugin-commonjs/pull/86))
-
-## 4.0.0
-
-- Better interop and smaller output ([#92](https://github.com/rollup/rollup-plugin-commonjs/pull/92))
-
-## 3.3.1
-
-- Deconflict export and local module ([rollup/rollup#554](https://github.com/rollup/rollup/issues/554))
-
-## 3.3.0
-
-- Keep the order of execution for require calls ([#43](https://github.com/rollup/rollup-plugin-commonjs/pull/43))
-- Use interopDefault as helper ([#42](https://github.com/rollup/rollup-plugin-commonjs/issues/42))
-
-## 3.2.0
-
-- Use named exports as a function when no default export is defined ([#524](https://github.com/rollup/rollup/issues/524))
-
-## 3.1.0
-
-- Replace `typeof require` with `'function'` ([#38](https://github.com/rollup/rollup-plugin-commonjs/issues/38))
-- Don't attempt to resolve entry file relative to importer ([#63](https://github.com/rollup/rollup-plugin-commonjs/issues/63))
-
-## 3.0.2
-
-- Handle multiple references to `global`
-
-## 3.0.1
-
-- Return a `name`
-
-## 3.0.0
-
-- Make `transform` stateless ([#71](https://github.com/rollup/rollup-plugin-commonjs/pull/71))
-- Support web worker `global` ([#50](https://github.com/rollup/rollup-plugin-commonjs/issues/50))
-- Ignore global with `options.ignoreGlobal` ([#48](https://github.com/rollup/rollup-plugin-commonjs/issues/48))
-
-## 2.2.1
-
-- Prevent false positives with `namedExports` ([#36](https://github.com/rollup/rollup-plugin-commonjs/issues/36))
-
-## 2.2.0
-
-- Rewrite top-level `this` expressions to mean the same as `global` ([#31](https://github.com/rollup/rollup-plugin-commonjs/issues/31))
-
-## 2.1.0
-
-- Optimised module wrappers ([#20](https://github.com/rollup/rollup-plugin-commonjs/pull/20))
-- Allow control over named exports via `options.namedExports` ([#18](https://github.com/rollup/rollup-plugin-commonjs/issues/18))
-- Handle bare imports correctly ([#23](https://github.com/rollup/rollup-plugin-commonjs/issues/23))
-- Blacklist all reserved words as export names ([#21](https://github.com/rollup/rollup-plugin-commonjs/issues/21))
-- Configure allowed file extensions via `options.extensions` ([#27](https://github.com/rollup/rollup-plugin-commonjs/pull/27))
-
-## 2.0.0
-
-- Support for transpiled modules – `exports.default` is used as the default export in place of `module.exports`, if applicable, and `__esModule` is not exported ([#16](https://github.com/rollup/rollup-plugin-commonjs/pull/16))
-
-## 1.4.0
-
-- Generate sourcemaps by default
-
-## 1.3.0
-
-- Handle references to `global` ([#6](https://github.com/rollup/rollup-plugin-commonjs/issues/6))
-
-## 1.2.0
-
-- Generate named exports where possible ([#5](https://github.com/rollup/rollup-plugin-commonjs/issues/5))
-- Handle shadowed `require`/`module`/`exports`
-
-## 1.1.0
-
-- Handle dots in filenames ([#3](https://github.com/rollup/rollup-plugin-commonjs/issues/3))
-- Wrap modules in IIFE for more readable output
-
-## 1.0.0
-
-- Stable release, now that Rollup supports plugins
-
-## 0.2.1
-
-- Allow mixed CommonJS/ES6 imports/exports
-- Use `var` instead of `let`
-
-## 0.2.0
-
-- Sourcemap support
-- Support `options.include` and `options.exclude`
-- Bail early if module is obviously not a CommonJS module
-
-## 0.1.1
-
-Add dist files to package (whoops!)
-
-## 0.1.0
-
-- First release
diff --git a/node_modules/@rollup/plugin-commonjs/LICENSE b/node_modules/@rollup/plugin-commonjs/LICENSE
deleted file mode 100644
index 5e46702..0000000
--- a/node_modules/@rollup/plugin-commonjs/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/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.
diff --git a/node_modules/@rollup/plugin-commonjs/README.md b/node_modules/@rollup/plugin-commonjs/README.md
deleted file mode 100644
index c52fe1b..0000000
--- a/node_modules/@rollup/plugin-commonjs/README.md
+++ /dev/null
@@ -1,410 +0,0 @@
-[npm]: https://img.shields.io/npm/v/@rollup/plugin-commonjs
-[npm-url]: https://www.npmjs.com/package/@rollup/plugin-commonjs
-[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-commonjs
-[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-commonjs
-
-[![npm][npm]][npm-url]
-[![size][size]][size-url]
-[](https://liberamanifesto.com)
-
-# @rollup/plugin-commonjs
-
-🍣 A Rollup plugin to convert CommonJS modules to ES6, so they can be included in a Rollup bundle
-
-## Requirements
-
-This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
-
-## Install
-
-Using npm:
-
-```bash
-npm install @rollup/plugin-commonjs --save-dev
-```
-
-## Usage
-
-Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
-
-```js
-import commonjs from '@rollup/plugin-commonjs';
-
-export default {
- input: 'src/index.js',
- output: {
- dir: 'output',
- format: 'cjs'
- },
- plugins: [commonjs()]
-};
-```
-
-Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).
-
-## Options
-
-### `dynamicRequireTargets`
-
-Type: `string | string[]`
-Default: `[]`
-
-Some modules contain dynamic `require` calls, or require modules that contain circular dependencies, which are not handled well by static imports.
-Including those modules as `dynamicRequireTargets` will simulate a CommonJS (NodeJS-like) environment for them with support for dynamic and circular dependencies.
-
-_Note: In extreme cases, this feature may result in some paths being rendered as absolute in the final bundle. The plugin tries to avoid exposing paths from the local machine, but if you are `dynamicRequirePaths` with paths that are far away from your project's folder, that may require replacing strings like `"/Users/John/Desktop/foo-project/"` -> `"/"`._
-
-Example:
-
-```js
-commonjs({
- dynamicRequireTargets: [
- // include using a glob pattern (either a string or an array of strings)
- 'node_modules/logform/*.js',
-
- // exclude files that are known to not be required dynamically, this allows for better optimizations
- '!node_modules/logform/index.js',
- '!node_modules/logform/format.js',
- '!node_modules/logform/levels.js',
- '!node_modules/logform/browser.js'
- ]
-});
-```
-
-### `exclude`
-
-Type: `string | string[]`
-Default: `null`
-
-A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. By default, all files with extensions other than those in `extensions` or `".cjs"` are ignored, but you can exclude additional files. See also the `include` option.
-
-### `include`
-
-Type: `string | string[]`
-Default: `null`
-
-A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default, all files with extension `".cjs"` or those in `extensions` are included, but you can narrow this list by only including specific files. These files will be analyzed and transpiled if either the analysis does not find ES module specific statements or `transformMixedEsModules` is `true`.
-
-### `extensions`
-
-Type: `string[]`
-Default: `['.js']`
-
-For extensionless imports, search for extensions other than .js in the order specified. Note that you need to make sure that non-JavaScript files are transpiled by another plugin first.
-
-### `ignoreGlobal`
-
-Type: `boolean`
-Default: `false`
-
-If true, uses of `global` won't be dealt with by this plugin.
-
-### `sourceMap`
-
-Type: `boolean`
-Default: `true`
-
-If false, skips source map generation for CommonJS modules. This will improve performance.
-
-### `transformMixedEsModules`
-
-Type: `boolean`
-Default: `false`
-
-Instructs the plugin whether to enable mixed module transformations. This is useful in scenarios with modules that contain a mix of ES `import` statements and CommonJS `require` expressions. Set to `true` if `require` calls should be transformed to imports in mixed modules, or `false` if the `require` expressions should survive the transformation. The latter can be important if the code contains environment detection, or you are coding for an environment with special treatment for `require` calls such as [ElectronJS](https://www.electronjs.org/). See also the "ignore" option.
-
-### `ignore`
-
-Type: `string[] | ((id: string) => boolean)`
-Default: `[]`
-
-Sometimes you have to leave require statements unconverted. Pass an array containing the IDs or an `id => boolean` function.
-
-### `ignoreTryCatch`
-
-Type: `boolean | 'remove' | string[] | ((id: string) => boolean)`
-Default: `true`
-
-In most cases, where `require` calls are inside a `try-catch` clause, they should be left unconverted as it requires an optional dependency that may or may not be installed beside the rolled up package.
-Due to the conversion of `require` to a static `import` - the call is hoisted to the top of the file, outside of the `try-catch` clause.
-
-- `true`: All `require` calls inside a `try` will be left unconverted.
-- `false`: All `require` calls inside a `try` will be converted as if the `try-catch` clause is not there.
-- `remove`: Remove all `require` calls from inside any `try` block.
-- `string[]`: Pass an array containing the IDs to left unconverted.
-- `((id: string) => boolean|'remove')`: Pass a function that control individual IDs.
-
-### `ignoreDynamicRequires`
-
-Type: `boolean`
-Default: false
-
-Some `require` calls cannot be resolved statically to be translated to imports, e.g.
-
-```js
-function wrappedRequire(target) {
- return require(target);
-}
-wrappedRequire('foo');
-wrappedRequire('bar');
-```
-
-When this option is set to `false`, the generated code will either directly throw an error when such a call is encountered or, when `dynamicRequireTargets` is used, when such a call cannot be resolved with a configured dynamic require target.
-
-Setting this option to `true` will instead leave the `require` call in the code or use it as a fallback for `dynamicRequireTargets`.
-
-### `esmExternals`
-
-Type: `boolean | string[] | ((id: string) => boolean)`
-Default: `false`
-
-Controls how to render imports from external dependencies. By default, this plugin assumes that all external dependencies are CommonJS. This means they are rendered as default imports to be compatible with e.g. NodeJS where ES modules can only import a default export from a CommonJS dependency:
-
-```js
-// input
-const foo = require('foo');
-
-// output
-import foo from 'foo';
-```
-
-This is likely not desired for ES module dependencies: Here `require` should usually return the namespace to be compatible with how bundled modules are handled.
-
-If you set `esmExternals` to `true`, this plugins assumes that all external dependencies are ES modules and will adhere to the `requireReturnsDefault` option. If that option is not set, they will be rendered as namespace imports.
-
-You can also supply an array of ids to be treated as ES modules, or a function that will be passed each external id to determine if it is an ES module.
-
-### `defaultIsModuleExports`
-
-Type: `boolean | "auto"`
-Default: `"auto"`
-
-Controls what is the default export when importing a CommonJS file from an ES module.
-
-- `true`: The value of the default export is `module.exports`. This currently matches the behavior of Node.js when importing a CommonJS file.
- ```js
- // mod.cjs
- exports.default = 3;
- ```
- ```js
- import foo from './mod.cjs';
- console.log(foo); // { default: 3 }
- ```
-- `false`: The value of the default export is `exports.default`.
- ```js
- // mod.cjs
- exports.default = 3;
- ```
- ```js
- import foo from './mod.cjs';
- console.log(foo); // 3
- ```
-- `"auto"`: The value of the default export is `exports.default` if the CommonJS file has an `exports.__esModule === true` property; otherwise it's `module.exports`. This makes it possible to import
- the default export of ES modules compiled to CommonJS as if they were not compiled.
- ```js
- // mod.cjs
- exports.default = 3;
- ```
- ```js
- // mod-compiled.cjs
- exports.__esModule = true;
- exports.default = 3;
- ```
- ```js
- import foo from './mod.cjs';
- import bar from './mod-compiled.cjs';
- console.log(foo); // { default: 3 }
- console.log(bar); // 3
- ```
-
-### `requireReturnsDefault`
-
-Type: `boolean | "namespace" | "auto" | "preferred" | ((id: string) => boolean | "auto" | "preferred")`
-Default: `false`
-
-Controls what is returned when requiring an ES module from a CommonJS file. When using the `esmExternals` option, this will also apply to external modules. By default, this plugin will render those imports as namespace imports, i.e.
-
-```js
-// input
-const foo = require('foo');
-
-// output
-import * as foo from 'foo';
-```
-
-This is in line with how other bundlers handle this situation and is also the most likely behaviour in case Node should ever support this. However there are some situations where this may not be desired:
-
-- There is code in an external dependency that cannot be changed where a `require` statement expects the default export to be returned from an ES module.
-- If the imported module is in the same bundle, Rollup will generate a namespace object for the imported module which can increase bundle size unnecessarily:
-
- ```js
- // input: main.js
- const dep = require('./dep.js');
- console.log(dep.default);
-
- // input: dep.js
- export default 'foo';
-
- // output
- var dep = 'foo';
-
- var dep$1 = /*#__PURE__*/ Object.freeze({
- __proto__: null,
- default: dep
- });
-
- console.log(dep$1.default);
- ```
-
-For these situations, you can change Rollup's behaviour either globally or per module. To change it globally, set the `requireReturnsDefault` option to one of the following values:
-
-- `false`: This is the default, requiring an ES module returns its namespace. This is the only option that will also add a marker `__esModule: true` to the namespace to support interop patterns in CommonJS modules that are transpiled ES modules.
-
- ```js
- // input
- const dep = require('dep');
- console.log(dep);
-
- // output
- import * as dep$1 from 'dep';
-
- function getAugmentedNamespace(n) {
- var a = Object.defineProperty({}, '__esModule', { value: true });
- Object.keys(n).forEach(function (k) {
- var d = Object.getOwnPropertyDescriptor(n, k);
- Object.defineProperty(
- a,
- k,
- d.get
- ? d
- : {
- enumerable: true,
- get: function () {
- return n[k];
- }
- }
- );
- });
- return a;
- }
-
- var dep = /*@__PURE__*/ getAugmentedNamespace(dep$1);
-
- console.log(dep);
- ```
-
-- `"namespace"`: Like `false`, requiring an ES module returns its namespace, but the plugin does not add the `__esModule` marker and thus creates more efficient code. For external dependencies when using `esmExternals: true`, no additional interop code is generated.
-
- ```js
- // output
- import * as dep from 'dep';
-
- console.log(dep);
- ```
-
-- `"auto"`: This is complementary to how [`output.exports`](https://rollupjs.org/guide/en/#outputexports): `"auto"` works in Rollup: If a module has a default export and no named exports, requiring that module returns the default export. In all other cases, the namespace is returned. For external dependencies when using `esmExternals: true`, a corresponding interop helper is added:
-
- ```js
- // output
- import * as dep$1 from 'dep';
-
- function getDefaultExportFromNamespaceIfNotNamed(n) {
- return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1
- ? n['default']
- : n;
- }
-
- var dep = getDefaultExportFromNamespaceIfNotNamed(dep$1);
-
- console.log(dep);
- ```
-
-- `"preferred"`: If a module has a default export, requiring that module always returns the default export, no matter whether additional named exports exist. This is similar to how previous versions of this plugin worked. Again for external dependencies when using `esmExternals: true`, an interop helper is added:
-
- ```js
- // output
- import * as dep$1 from 'dep';
-
- function getDefaultExportFromNamespaceIfPresent(n) {
- return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
- }
-
- var dep = getDefaultExportFromNamespaceIfPresent(dep$1);
-
- console.log(dep);
- ```
-
-- `true`: This will always try to return the default export on require without checking if it actually exists. This can throw at build time if there is no default export. This is how external dependencies are handled when `esmExternals` is not used. The advantage over the other options is that, like `false`, this does not add an interop helper for external dependencies, keeping the code lean:
-
- ```js
- // output
- import dep from 'dep';
-
- console.log(dep);
- ```
-
-To change this for individual modules, you can supply a function for `requireReturnsDefault` instead. This function will then be called once for each required ES module or external dependency with the corresponding id and allows you to return different values for different modules.
-
-## Using with @rollup/plugin-node-resolve
-
-Since most CommonJS packages you are importing are probably dependencies in `node_modules`, you may need to use [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve):
-
-```js
-// rollup.config.js
-import resolve from '@rollup/plugin-node-resolve';
-import commonjs from '@rollup/plugin-commonjs';
-
-export default {
- input: 'main.js',
- output: {
- file: 'bundle.js',
- format: 'iife',
- name: 'MyModule'
- },
- plugins: [resolve(), commonjs()]
-};
-```
-
-## Usage with symlinks
-
-Symlinks are common in monorepos and are also created by the `npm link` command. Rollup with `@rollup/plugin-node-resolve` resolves modules to their real paths by default. So `include` and `exclude` paths should handle real paths rather than symlinked paths (e.g. `../common/node_modules/**` instead of `node_modules/**`). You may also use a regular expression for `include` that works regardless of base path. Try this:
-
-```js
-commonjs({
- include: /node_modules/
-});
-```
-
-Whether symlinked module paths are [realpathed](http://man7.org/linux/man-pages/man3/realpath.3.html) or preserved depends on Rollup's `preserveSymlinks` setting, which is false by default, matching Node.js' default behavior. Setting `preserveSymlinks` to true in your Rollup config will cause `import` and `export` to match based on symlinked paths instead.
-
-## Strict mode
-
-ES modules are _always_ parsed in strict mode. That means that certain non-strict constructs (like octal literals) will be treated as syntax errors when Rollup parses modules that use them. Some older CommonJS modules depend on those constructs, and if you depend on them your bundle will blow up. There's basically nothing we can do about that.
-
-Luckily, there is absolutely no good reason _not_ to use strict mode for everything — so the solution to this problem is to lobby the authors of those modules to update them.
-
-## Inter-plugin-communication
-
-This plugin exposes the result of its CommonJS file type detection for other plugins to use. You can access it via `this.getModuleInfo` or the `moduleParsed` hook:
-
-```js
-function cjsDetectionPlugin() {
- return {
- name: 'cjs-detection',
- moduleParsed({
- id,
- meta: {
- commonjs: { isCommonJS }
- }
- }) {
- console.log(`File ${id} is CommonJS: ${isCommonJS}`);
- }
- };
-}
-```
-
-## Meta
-
-[CONTRIBUTING](/.github/CONTRIBUTING.md)
-
-[LICENSE (MIT)](/LICENSE)
diff --git a/node_modules/@rollup/plugin-commonjs/dist/index.es.js b/node_modules/@rollup/plugin-commonjs/dist/index.es.js
deleted file mode 100644
index fc64eda..0000000
--- a/node_modules/@rollup/plugin-commonjs/dist/index.es.js
+++ /dev/null
@@ -1,1910 +0,0 @@
-import { basename, extname, dirname, join, resolve, sep } from 'path';
-import { makeLegalIdentifier, attachScopes, extractAssignedNames, createFilter } from '@rollup/pluginutils';
-import getCommonDir from 'commondir';
-import { existsSync, readFileSync, statSync } from 'fs';
-import glob from 'glob';
-import { walk } from 'estree-walker';
-import MagicString from 'magic-string';
-import isReference from 'is-reference';
-import { sync } from 'resolve';
-
-var peerDependencies = {
- rollup: "^2.38.3"
-};
-
-function tryParse(parse, code, id) {
- try {
- return parse(code, { allowReturnOutsideFunction: true });
- } catch (err) {
- err.message += ` in ${id}`;
- throw err;
- }
-}
-
-const firstpassGlobal = /\b(?:require|module|exports|global)\b/;
-
-const firstpassNoGlobal = /\b(?:require|module|exports)\b/;
-
-function hasCjsKeywords(code, ignoreGlobal) {
- const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;
- return firstpass.test(code);
-}
-
-/* eslint-disable no-underscore-dangle */
-
-function analyzeTopLevelStatements(parse, code, id) {
- const ast = tryParse(parse, code, id);
-
- let isEsModule = false;
- let hasDefaultExport = false;
- let hasNamedExports = false;
-
- for (const node of ast.body) {
- switch (node.type) {
- case 'ExportDefaultDeclaration':
- isEsModule = true;
- hasDefaultExport = true;
- break;
- case 'ExportNamedDeclaration':
- isEsModule = true;
- if (node.declaration) {
- hasNamedExports = true;
- } else {
- for (const specifier of node.specifiers) {
- if (specifier.exported.name === 'default') {
- hasDefaultExport = true;
- } else {
- hasNamedExports = true;
- }
- }
- }
- break;
- case 'ExportAllDeclaration':
- isEsModule = true;
- if (node.exported && node.exported.name === 'default') {
- hasDefaultExport = true;
- } else {
- hasNamedExports = true;
- }
- break;
- case 'ImportDeclaration':
- isEsModule = true;
- break;
- }
- }
-
- return { isEsModule, hasDefaultExport, hasNamedExports, ast };
-}
-
-const isWrappedId = (id, suffix) => id.endsWith(suffix);
-const wrapId = (id, suffix) => `\0${id}${suffix}`;
-const unwrapId = (wrappedId, suffix) => wrappedId.slice(1, -suffix.length);
-
-const PROXY_SUFFIX = '?commonjs-proxy';
-const REQUIRE_SUFFIX = '?commonjs-require';
-const EXTERNAL_SUFFIX = '?commonjs-external';
-const EXPORTS_SUFFIX = '?commonjs-exports';
-const MODULE_SUFFIX = '?commonjs-module';
-
-const DYNAMIC_REGISTER_SUFFIX = '?commonjs-dynamic-register';
-const DYNAMIC_JSON_PREFIX = '\0commonjs-dynamic-json:';
-const DYNAMIC_PACKAGES_ID = '\0commonjs-dynamic-packages';
-
-const HELPERS_ID = '\0commonjsHelpers.js';
-
-// `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.
-// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.
-// This will no longer be necessary once Rollup switches to ES6 output, likely
-// in Rollup 3
-
-const HELPERS = `
-export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
-
-export function getDefaultExportFromCjs (x) {
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
-}
-
-export function getDefaultExportFromNamespaceIfPresent (n) {
- return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
-}
-
-export function getDefaultExportFromNamespaceIfNotNamed (n) {
- return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
-}
-
-export function getAugmentedNamespace(n) {
- if (n.__esModule) return n;
- var a = Object.defineProperty({}, '__esModule', {value: true});
- Object.keys(n).forEach(function (k) {
- var d = Object.getOwnPropertyDescriptor(n, k);
- Object.defineProperty(a, k, d.get ? d : {
- enumerable: true,
- get: function () {
- return n[k];
- }
- });
- });
- return a;
-}
-`;
-
-const FAILED_REQUIRE_ERROR = `throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');`;
-
-const HELPER_NON_DYNAMIC = `
-export function commonjsRequire (path) {
- ${FAILED_REQUIRE_ERROR}
-}
-`;
-
-const getDynamicHelpers = (ignoreDynamicRequires) => `
-export function createModule(modulePath) {
- return {
- path: modulePath,
- exports: {},
- require: function (path, base) {
- return commonjsRequire(path, base == null ? modulePath : base);
- }
- };
-}
-
-export function commonjsRegister (path, loader) {
- DYNAMIC_REQUIRE_LOADERS[path] = loader;
-}
-
-export function commonjsRegisterOrShort (path, to) {
- var resolvedPath = commonjsResolveImpl(path, null, true);
- if (resolvedPath !== null && DYNAMIC_REQUIRE_CACHE[resolvedPath]) {
- DYNAMIC_REQUIRE_CACHE[path] = DYNAMIC_REQUIRE_CACHE[resolvedPath];
- } else {
- DYNAMIC_REQUIRE_SHORTS[path] = to;
- }
-}
-
-var DYNAMIC_REQUIRE_LOADERS = Object.create(null);
-var DYNAMIC_REQUIRE_CACHE = Object.create(null);
-var DYNAMIC_REQUIRE_SHORTS = Object.create(null);
-var DEFAULT_PARENT_MODULE = {
- id: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []
-};
-var CHECKED_EXTENSIONS = ['', '.js', '.json'];
-
-function normalize (path) {
- path = path.replace(/\\\\/g, '/');
- var parts = path.split('/');
- var slashed = parts[0] === '';
- for (var i = 1; i < parts.length; i++) {
- if (parts[i] === '.' || parts[i] === '') {
- parts.splice(i--, 1);
- }
- }
- for (var i = 1; i < parts.length; i++) {
- if (parts[i] !== '..') continue;
- if (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {
- parts.splice(--i, 2);
- i--;
- }
- }
- path = parts.join('/');
- if (slashed && path[0] !== '/')
- path = '/' + path;
- else if (path.length === 0)
- path = '.';
- return path;
-}
-
-function join () {
- if (arguments.length === 0)
- return '.';
- var joined;
- for (var i = 0; i < arguments.length; ++i) {
- var arg = arguments[i];
- if (arg.length > 0) {
- if (joined === undefined)
- joined = arg;
- else
- joined += '/' + arg;
- }
- }
- if (joined === undefined)
- return '.';
-
- return joined;
-}
-
-function isPossibleNodeModulesPath (modulePath) {
- var c0 = modulePath[0];
- if (c0 === '/' || c0 === '\\\\') return false;
- var c1 = modulePath[1], c2 = modulePath[2];
- if ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\')) ||
- (c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\'))) return false;
- if (c1 === ':' && (c2 === '/' || c2 === '\\\\'))
- return false;
- return true;
-}
-
-function dirname (path) {
- if (path.length === 0)
- return '.';
-
- var i = path.length - 1;
- while (i > 0) {
- var c = path.charCodeAt(i);
- if ((c === 47 || c === 92) && i !== path.length - 1)
- break;
- i--;
- }
-
- if (i > 0)
- return path.substr(0, i);
-
- if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)
- return path.charAt(0);
-
- return '.';
-}
-
-export function commonjsResolveImpl (path, originalModuleDir, testCache) {
- var shouldTryNodeModules = isPossibleNodeModulesPath(path);
- path = normalize(path);
- var relPath;
- if (path[0] === '/') {
- originalModuleDir = '/';
- }
- while (true) {
- if (!shouldTryNodeModules) {
- relPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;
- } else if (originalModuleDir) {
- relPath = normalize(originalModuleDir + '/node_modules/' + path);
- } else {
- relPath = normalize(join('node_modules', path));
- }
-
- if (relPath.endsWith('/..')) {
- break; // Travelled too far up, avoid infinite loop
- }
-
- for (var extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {
- var resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];
- if (DYNAMIC_REQUIRE_CACHE[resolvedPath]) {
- return resolvedPath;
- }
- if (DYNAMIC_REQUIRE_SHORTS[resolvedPath]) {
- return resolvedPath;
- }
- if (DYNAMIC_REQUIRE_LOADERS[resolvedPath]) {
- return resolvedPath;
- }
- }
- if (!shouldTryNodeModules) break;
- var nextDir = normalize(originalModuleDir + '/..');
- if (nextDir === originalModuleDir) break;
- originalModuleDir = nextDir;
- }
- return null;
-}
-
-export function commonjsResolve (path, originalModuleDir) {
- var resolvedPath = commonjsResolveImpl(path, originalModuleDir);
- if (resolvedPath !== null) {
- return resolvedPath;
- }
- return require.resolve(path);
-}
-
-export function commonjsRequire (path, originalModuleDir) {
- var resolvedPath = commonjsResolveImpl(path, originalModuleDir, true);
- if (resolvedPath !== null) {
- var cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];
- if (cachedModule) return cachedModule.exports;
- var shortTo = DYNAMIC_REQUIRE_SHORTS[resolvedPath];
- if (shortTo) {
- cachedModule = DYNAMIC_REQUIRE_CACHE[shortTo];
- if (cachedModule)
- return cachedModule.exports;
- resolvedPath = commonjsResolveImpl(shortTo, null, true);
- }
- var loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];
- if (loader) {
- DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {
- id: resolvedPath,
- filename: resolvedPath,
- path: dirname(resolvedPath),
- exports: {},
- parent: DEFAULT_PARENT_MODULE,
- loaded: false,
- children: [],
- paths: [],
- require: function (path, base) {
- return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);
- }
- };
- try {
- loader.call(commonjsGlobal, cachedModule, cachedModule.exports);
- } catch (error) {
- delete DYNAMIC_REQUIRE_CACHE[resolvedPath];
- throw error;
- }
- cachedModule.loaded = true;
- return cachedModule.exports;
- };
- }
- ${ignoreDynamicRequires ? 'return require(path);' : FAILED_REQUIRE_ERROR}
-}
-
-commonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;
-commonjsRequire.resolve = commonjsResolve;
-`;
-
-function getHelpersModule(isDynamicRequireModulesEnabled, ignoreDynamicRequires) {
- return `${HELPERS}${
- isDynamicRequireModulesEnabled ? getDynamicHelpers(ignoreDynamicRequires) : HELPER_NON_DYNAMIC
- }`;
-}
-
-/* eslint-disable import/prefer-default-export */
-
-function deconflict(scopes, globals, identifier) {
- let i = 1;
- let deconflicted = makeLegalIdentifier(identifier);
- const hasConflicts = () =>
- scopes.some((scope) => scope.contains(deconflicted)) || globals.has(deconflicted);
-
- while (hasConflicts()) {
- deconflicted = makeLegalIdentifier(`${identifier}_${i}`);
- i += 1;
- }
-
- for (const scope of scopes) {
- scope.declarations[deconflicted] = true;
- }
-
- return deconflicted;
-}
-
-function getName(id) {
- const name = makeLegalIdentifier(basename(id, extname(id)));
- if (name !== 'index') {
- return name;
- }
- return makeLegalIdentifier(basename(dirname(id)));
-}
-
-function normalizePathSlashes(path) {
- return path.replace(/\\/g, '/');
-}
-
-const VIRTUAL_PATH_BASE = '/$$rollup_base$$';
-const getVirtualPathForDynamicRequirePath = (path, commonDir) => {
- const normalizedPath = normalizePathSlashes(path);
- return normalizedPath.startsWith(commonDir)
- ? VIRTUAL_PATH_BASE + normalizedPath.slice(commonDir.length)
- : normalizedPath;
-};
-
-function getPackageEntryPoint(dirPath) {
- let entryPoint = 'index.js';
-
- try {
- if (existsSync(join(dirPath, 'package.json'))) {
- entryPoint =
- JSON.parse(readFileSync(join(dirPath, 'package.json'), { encoding: 'utf8' })).main ||
- entryPoint;
- }
- } catch (ignored) {
- // ignored
- }
-
- return entryPoint;
-}
-
-function getDynamicPackagesModule(dynamicRequireModuleDirPaths, commonDir) {
- let code = `const commonjsRegisterOrShort = require('${HELPERS_ID}?commonjsRegisterOrShort');`;
- for (const dir of dynamicRequireModuleDirPaths) {
- const entryPoint = getPackageEntryPoint(dir);
-
- code += `\ncommonjsRegisterOrShort(${JSON.stringify(
- getVirtualPathForDynamicRequirePath(dir, commonDir)
- )}, ${JSON.stringify(getVirtualPathForDynamicRequirePath(join(dir, entryPoint), commonDir))});`;
- }
- return code;
-}
-
-function getDynamicPackagesEntryIntro(
- dynamicRequireModuleDirPaths,
- dynamicRequireModuleSet
-) {
- let dynamicImports = Array.from(
- dynamicRequireModuleSet,
- (dynamicId) => `require(${JSON.stringify(wrapId(dynamicId, DYNAMIC_REGISTER_SUFFIX))});`
- ).join('\n');
-
- if (dynamicRequireModuleDirPaths.length) {
- dynamicImports += `require(${JSON.stringify(
- wrapId(DYNAMIC_PACKAGES_ID, DYNAMIC_REGISTER_SUFFIX)
- )});`;
- }
-
- return dynamicImports;
-}
-
-function isDynamicModuleImport(id, dynamicRequireModuleSet) {
- const normalizedPath = normalizePathSlashes(id);
- return dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json');
-}
-
-function isDirectory(path) {
- try {
- if (statSync(path).isDirectory()) return true;
- } catch (ignored) {
- // Nothing to do here
- }
- return false;
-}
-
-function getDynamicRequirePaths(patterns) {
- const dynamicRequireModuleSet = new Set();
- for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) {
- const isNegated = pattern.startsWith('!');
- const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);
- for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {
- modifySet(normalizePathSlashes(resolve(path)));
- if (isDirectory(path)) {
- modifySet(normalizePathSlashes(resolve(join(path, getPackageEntryPoint(path)))));
- }
- }
- }
- const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter((path) =>
- isDirectory(path)
- );
- return { dynamicRequireModuleSet, dynamicRequireModuleDirPaths };
-}
-
-function getCommonJSMetaPromise(commonJSMetaPromises, id) {
- let commonJSMetaPromise = commonJSMetaPromises.get(id);
- if (commonJSMetaPromise) return commonJSMetaPromise.promise;
-
- const promise = new Promise((resolve) => {
- commonJSMetaPromise = {
- resolve,
- promise: null
- };
- commonJSMetaPromises.set(id, commonJSMetaPromise);
- });
- commonJSMetaPromise.promise = promise;
-
- return promise;
-}
-
-function setCommonJSMetaPromise(commonJSMetaPromises, id, commonjsMeta) {
- const commonJSMetaPromise = commonJSMetaPromises.get(id);
- if (commonJSMetaPromise) {
- if (commonJSMetaPromise.resolve) {
- commonJSMetaPromise.resolve(commonjsMeta);
- commonJSMetaPromise.resolve = null;
- }
- } else {
- commonJSMetaPromises.set(id, { promise: Promise.resolve(commonjsMeta), resolve: null });
- }
-}
-
-// e.g. id === "commonjsHelpers?commonjsRegister"
-function getSpecificHelperProxy(id) {
- return `export {${id.split('?')[1]} as default} from "${HELPERS_ID}";`;
-}
-
-function getUnknownRequireProxy(id, requireReturnsDefault) {
- if (requireReturnsDefault === true || id.endsWith('.json')) {
- return `export {default} from ${JSON.stringify(id)};`;
- }
- const name = getName(id);
- const exported =
- requireReturnsDefault === 'auto'
- ? `import {getDefaultExportFromNamespaceIfNotNamed} from "${HELPERS_ID}"; export default /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(${name});`
- : requireReturnsDefault === 'preferred'
- ? `import {getDefaultExportFromNamespaceIfPresent} from "${HELPERS_ID}"; export default /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(${name});`
- : !requireReturnsDefault
- ? `import {getAugmentedNamespace} from "${HELPERS_ID}"; export default /*@__PURE__*/getAugmentedNamespace(${name});`
- : `export default ${name};`;
- return `import * as ${name} from ${JSON.stringify(id)}; ${exported}`;
-}
-
-function getDynamicJsonProxy(id, commonDir) {
- const normalizedPath = normalizePathSlashes(id.slice(DYNAMIC_JSON_PREFIX.length));
- return `const commonjsRegister = require('${HELPERS_ID}?commonjsRegister');\ncommonjsRegister(${JSON.stringify(
- getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)
- )}, function (module, exports) {
- module.exports = require(${JSON.stringify(normalizedPath)});
-});`;
-}
-
-function getDynamicRequireProxy(normalizedPath, commonDir) {
- return `const commonjsRegister = require('${HELPERS_ID}?commonjsRegister');\ncommonjsRegister(${JSON.stringify(
- getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)
- )}, function (module, exports) {
- ${readFileSync(normalizedPath, { encoding: 'utf8' })}
-});`;
-}
-
-async function getStaticRequireProxy(
- id,
- requireReturnsDefault,
- esModulesWithDefaultExport,
- esModulesWithNamedExports,
- commonJsMetaPromises
-) {
- const name = getName(id);
- const commonjsMeta = await getCommonJSMetaPromise(commonJsMetaPromises, id);
- if (commonjsMeta && commonjsMeta.isCommonJS) {
- return `export { __moduleExports as default } from ${JSON.stringify(id)};`;
- } else if (commonjsMeta === null) {
- return getUnknownRequireProxy(id, requireReturnsDefault);
- } else if (!requireReturnsDefault) {
- return `import { getAugmentedNamespace } from "${HELPERS_ID}"; import * as ${name} from ${JSON.stringify(
- id
- )}; export default /*@__PURE__*/getAugmentedNamespace(${name});`;
- } else if (
- requireReturnsDefault !== true &&
- (requireReturnsDefault === 'namespace' ||
- !esModulesWithDefaultExport.has(id) ||
- (requireReturnsDefault === 'auto' && esModulesWithNamedExports.has(id)))
- ) {
- return `import * as ${name} from ${JSON.stringify(id)}; export default ${name};`;
- }
- return `export { default } from ${JSON.stringify(id)};`;
-}
-
-/* eslint-disable no-param-reassign, no-undefined */
-
-function getCandidatesForExtension(resolved, extension) {
- return [resolved + extension, `${resolved}${sep}index${extension}`];
-}
-
-function getCandidates(resolved, extensions) {
- return extensions.reduce(
- (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)),
- [resolved]
- );
-}
-
-function getResolveId(extensions) {
- function resolveExtensions(importee, importer) {
- // not our problem
- if (importee[0] !== '.' || !importer) return undefined;
-
- const resolved = resolve(dirname(importer), importee);
- const candidates = getCandidates(resolved, extensions);
-
- for (let i = 0; i < candidates.length; i += 1) {
- try {
- const stats = statSync(candidates[i]);
- if (stats.isFile()) return { id: candidates[i] };
- } catch (err) {
- /* noop */
- }
- }
-
- return undefined;
- }
-
- return function resolveId(importee, rawImporter, resolveOptions) {
- if (isWrappedId(importee, MODULE_SUFFIX) || isWrappedId(importee, EXPORTS_SUFFIX)) {
- return importee;
- }
-
- const importer =
- rawImporter && isWrappedId(rawImporter, DYNAMIC_REGISTER_SUFFIX)
- ? unwrapId(rawImporter, DYNAMIC_REGISTER_SUFFIX)
- : rawImporter;
-
- // Except for exports, proxies are only importing resolved ids,
- // no need to resolve again
- if (importer && isWrappedId(importer, PROXY_SUFFIX)) {
- return importee;
- }
-
- const isProxyModule = isWrappedId(importee, PROXY_SUFFIX);
- const isRequiredModule = isWrappedId(importee, REQUIRE_SUFFIX);
- let isModuleRegistration = false;
-
- if (isProxyModule) {
- importee = unwrapId(importee, PROXY_SUFFIX);
- } else if (isRequiredModule) {
- importee = unwrapId(importee, REQUIRE_SUFFIX);
-
- isModuleRegistration = isWrappedId(importee, DYNAMIC_REGISTER_SUFFIX);
- if (isModuleRegistration) {
- importee = unwrapId(importee, DYNAMIC_REGISTER_SUFFIX);
- }
- }
-
- if (
- importee.startsWith(HELPERS_ID) ||
- importee === DYNAMIC_PACKAGES_ID ||
- importee.startsWith(DYNAMIC_JSON_PREFIX)
- ) {
- return importee;
- }
-
- if (importee.startsWith('\0')) {
- return null;
- }
-
- return this.resolve(
- importee,
- importer,
- Object.assign({}, resolveOptions, {
- skipSelf: true,
- custom: Object.assign({}, resolveOptions.custom, {
- 'node-resolve': { isRequire: isProxyModule || isRequiredModule }
- })
- })
- ).then((resolved) => {
- if (!resolved) {
- resolved = resolveExtensions(importee, importer);
- }
- if (resolved && isProxyModule) {
- resolved.id = wrapId(resolved.id, resolved.external ? EXTERNAL_SUFFIX : PROXY_SUFFIX);
- resolved.external = false;
- } else if (resolved && isModuleRegistration) {
- resolved.id = wrapId(resolved.id, DYNAMIC_REGISTER_SUFFIX);
- } else if (!resolved && (isProxyModule || isRequiredModule)) {
- return { id: wrapId(importee, EXTERNAL_SUFFIX), external: false };
- }
- return resolved;
- });
- };
-}
-
-function validateRollupVersion(rollupVersion, peerDependencyVersion) {
- const [major, minor] = rollupVersion.split('.').map(Number);
- const versionRegexp = /\^(\d+\.\d+)\.\d+/g;
- let minMajor = Infinity;
- let minMinor = Infinity;
- let foundVersion;
- // eslint-disable-next-line no-cond-assign
- while ((foundVersion = versionRegexp.exec(peerDependencyVersion))) {
- const [foundMajor, foundMinor] = foundVersion[1].split('.').map(Number);
- if (foundMajor < minMajor) {
- minMajor = foundMajor;
- minMinor = foundMinor;
- }
- }
- if (major < minMajor || (major === minMajor && minor < minMinor)) {
- throw new Error(
- `Insufficient Rollup version: "@rollup/plugin-commonjs" requires at least rollup@${minMajor}.${minMinor} but found rollup@${rollupVersion}.`
- );
- }
-}
-
-const operators = {
- '==': (x) => equals(x.left, x.right, false),
-
- '!=': (x) => not(operators['=='](x)),
-
- '===': (x) => equals(x.left, x.right, true),
-
- '!==': (x) => not(operators['==='](x)),
-
- '!': (x) => isFalsy(x.argument),
-
- '&&': (x) => isTruthy(x.left) && isTruthy(x.right),
-
- '||': (x) => isTruthy(x.left) || isTruthy(x.right)
-};
-
-function not(value) {
- return value === null ? value : !value;
-}
-
-function equals(a, b, strict) {
- if (a.type !== b.type) return null;
- // eslint-disable-next-line eqeqeq
- if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;
- return null;
-}
-
-function isTruthy(node) {
- if (!node) return false;
- if (node.type === 'Literal') return !!node.value;
- if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);
- if (node.operator in operators) return operators[node.operator](node);
- return null;
-}
-
-function isFalsy(node) {
- return not(isTruthy(node));
-}
-
-function getKeypath(node) {
- const parts = [];
-
- while (node.type === 'MemberExpression') {
- if (node.computed) return null;
-
- parts.unshift(node.property.name);
- // eslint-disable-next-line no-param-reassign
- node = node.object;
- }
-
- if (node.type !== 'Identifier') return null;
-
- const { name } = node;
- parts.unshift(name);
-
- return { name, keypath: parts.join('.') };
-}
-
-const KEY_COMPILED_ESM = '__esModule';
-
-function isDefineCompiledEsm(node) {
- const definedProperty =
- getDefinePropertyCallName(node, 'exports') || getDefinePropertyCallName(node, 'module.exports');
- if (definedProperty && definedProperty.key === KEY_COMPILED_ESM) {
- return isTruthy(definedProperty.value);
- }
- return false;
-}
-
-function getDefinePropertyCallName(node, targetName) {
- const {
- callee: { object, property }
- } = node;
- if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;
- if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;
- if (node.arguments.length !== 3) return;
-
- const targetNames = targetName.split('.');
- const [target, key, value] = node.arguments;
- if (targetNames.length === 1) {
- if (target.type !== 'Identifier' || target.name !== targetNames[0]) {
- return;
- }
- }
-
- if (targetNames.length === 2) {
- if (
- target.type !== 'MemberExpression' ||
- target.object.name !== targetNames[0] ||
- target.property.name !== targetNames[1]
- ) {
- return;
- }
- }
-
- if (value.type !== 'ObjectExpression' || !value.properties) return;
-
- const valueProperty = value.properties.find((p) => p.key && p.key.name === 'value');
- if (!valueProperty || !valueProperty.value) return;
-
- // eslint-disable-next-line consistent-return
- return { key: key.value, value: valueProperty.value };
-}
-
-function isShorthandProperty(parent) {
- return parent && parent.type === 'Property' && parent.shorthand;
-}
-
-function hasDefineEsmProperty(node) {
- return node.properties.some((property) => {
- if (
- property.type === 'Property' &&
- property.key.type === 'Identifier' &&
- property.key.name === '__esModule' &&
- isTruthy(property.value)
- ) {
- return true;
- }
- return false;
- });
-}
-
-function wrapCode(magicString, uses, moduleName, exportsName) {
- const args = [];
- const passedArgs = [];
- if (uses.module) {
- args.push('module');
- passedArgs.push(moduleName);
- }
- if (uses.exports) {
- args.push('exports');
- passedArgs.push(exportsName);
- }
- magicString
- .trim()
- .prepend(`(function (${args.join(', ')}) {\n`)
- .append(`\n}(${passedArgs.join(', ')}));`);
-}
-
-function rewriteExportsAndGetExportsBlock(
- magicString,
- moduleName,
- exportsName,
- wrapped,
- moduleExportsAssignments,
- firstTopLevelModuleExportsAssignment,
- exportsAssignmentsByName,
- topLevelAssignments,
- defineCompiledEsmExpressions,
- deconflictedExportNames,
- code,
- HELPERS_NAME,
- exportMode,
- detectWrappedDefault,
- defaultIsModuleExports
-) {
- const exports = [];
- const exportDeclarations = [];
-
- if (exportMode === 'replace') {
- getExportsForReplacedModuleExports(
- magicString,
- exports,
- exportDeclarations,
- moduleExportsAssignments,
- firstTopLevelModuleExportsAssignment,
- exportsName
- );
- } else {
- exports.push(`${exportsName} as __moduleExports`);
- if (wrapped) {
- getExportsWhenWrapping(
- exportDeclarations,
- exportsName,
- detectWrappedDefault,
- HELPERS_NAME,
- defaultIsModuleExports
- );
- } else {
- getExports(
- magicString,
- exports,
- exportDeclarations,
- moduleExportsAssignments,
- exportsAssignmentsByName,
- deconflictedExportNames,
- topLevelAssignments,
- moduleName,
- exportsName,
- defineCompiledEsmExpressions,
- HELPERS_NAME,
- defaultIsModuleExports
- );
- }
- }
- if (exports.length) {
- exportDeclarations.push(`export { ${exports.join(', ')} };`);
- }
-
- return `\n\n${exportDeclarations.join('\n')}`;
-}
-
-function getExportsForReplacedModuleExports(
- magicString,
- exports,
- exportDeclarations,
- moduleExportsAssignments,
- firstTopLevelModuleExportsAssignment,
- exportsName
-) {
- for (const { left } of moduleExportsAssignments) {
- magicString.overwrite(left.start, left.end, exportsName);
- }
- magicString.prependRight(firstTopLevelModuleExportsAssignment.left.start, 'var ');
- exports.push(`${exportsName} as __moduleExports`);
- exportDeclarations.push(`export default ${exportsName};`);
-}
-
-function getExportsWhenWrapping(
- exportDeclarations,
- exportsName,
- detectWrappedDefault,
- HELPERS_NAME,
- defaultIsModuleExports
-) {
- exportDeclarations.push(
- `export default ${
- detectWrappedDefault && defaultIsModuleExports === 'auto'
- ? `/*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportsName})`
- : defaultIsModuleExports === false
- ? `${exportsName}.default`
- : exportsName
- };`
- );
-}
-
-function getExports(
- magicString,
- exports,
- exportDeclarations,
- moduleExportsAssignments,
- exportsAssignmentsByName,
- deconflictedExportNames,
- topLevelAssignments,
- moduleName,
- exportsName,
- defineCompiledEsmExpressions,
- HELPERS_NAME,
- defaultIsModuleExports
-) {
- let deconflictedDefaultExportName;
- // Collect and rewrite module.exports assignments
- for (const { left } of moduleExportsAssignments) {
- magicString.overwrite(left.start, left.end, `${moduleName}.exports`);
- }
-
- // Collect and rewrite named exports
- for (const [exportName, { nodes }] of exportsAssignmentsByName) {
- const deconflicted = deconflictedExportNames[exportName];
- let needsDeclaration = true;
- for (const node of nodes) {
- let replacement = `${deconflicted} = ${exportsName}.${exportName}`;
- if (needsDeclaration && topLevelAssignments.has(node)) {
- replacement = `var ${replacement}`;
- needsDeclaration = false;
- }
- magicString.overwrite(node.start, node.left.end, replacement);
- }
- if (needsDeclaration) {
- magicString.prepend(`var ${deconflicted};\n`);
- }
-
- if (exportName === 'default') {
- deconflictedDefaultExportName = deconflicted;
- } else {
- exports.push(exportName === deconflicted ? exportName : `${deconflicted} as ${exportName}`);
- }
- }
-
- // Collect and rewrite exports.__esModule assignments
- let isRestorableCompiledEsm = false;
- for (const expression of defineCompiledEsmExpressions) {
- isRestorableCompiledEsm = true;
- const moduleExportsExpression =
- expression.type === 'CallExpression' ? expression.arguments[0] : expression.left.object;
- magicString.overwrite(moduleExportsExpression.start, moduleExportsExpression.end, exportsName);
- }
-
- if (!isRestorableCompiledEsm || defaultIsModuleExports === true) {
- exportDeclarations.push(`export default ${exportsName};`);
- } else if (moduleExportsAssignments.length === 0 || defaultIsModuleExports === false) {
- exports.push(`${deconflictedDefaultExportName || exportsName} as default`);
- } else {
- exportDeclarations.push(
- `export default /*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportsName});`
- );
- }
-}
-
-function isRequireStatement(node, scope) {
- if (!node) return false;
- if (node.type !== 'CallExpression') return false;
-
- // Weird case of `require()` or `module.require()` without arguments
- if (node.arguments.length === 0) return false;
-
- return isRequire(node.callee, scope);
-}
-
-function isRequire(node, scope) {
- return (
- (node.type === 'Identifier' && node.name === 'require' && !scope.contains('require')) ||
- (node.type === 'MemberExpression' && isModuleRequire(node, scope))
- );
-}
-
-function isModuleRequire({ object, property }, scope) {
- return (
- object.type === 'Identifier' &&
- object.name === 'module' &&
- property.type === 'Identifier' &&
- property.name === 'require' &&
- !scope.contains('module')
- );
-}
-
-function isStaticRequireStatement(node, scope) {
- if (!isRequireStatement(node, scope)) return false;
- return !hasDynamicArguments(node);
-}
-
-function hasDynamicArguments(node) {
- return (
- node.arguments.length > 1 ||
- (node.arguments[0].type !== 'Literal' &&
- (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))
- );
-}
-
-const reservedMethod = { resolve: true, cache: true, main: true };
-
-function isNodeRequirePropertyAccess(parent) {
- return parent && parent.property && reservedMethod[parent.property.name];
-}
-
-function isIgnoredRequireStatement(requiredNode, ignoreRequire) {
- return ignoreRequire(requiredNode.arguments[0].value);
-}
-
-function getRequireStringArg(node) {
- return node.arguments[0].type === 'Literal'
- ? node.arguments[0].value
- : node.arguments[0].quasis[0].value.cooked;
-}
-
-function hasDynamicModuleForPath(source, id, dynamicRequireModuleSet) {
- if (!/^(?:\.{0,2}[/\\]|[A-Za-z]:[/\\])/.test(source)) {
- try {
- const resolvedPath = normalizePathSlashes(sync(source, { basedir: dirname(id) }));
- if (dynamicRequireModuleSet.has(resolvedPath)) {
- return true;
- }
- } catch (ex) {
- // Probably a node.js internal module
- return false;
- }
-
- return false;
- }
-
- for (const attemptExt of ['', '.js', '.json']) {
- const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));
- if (dynamicRequireModuleSet.has(resolvedPath)) {
- return true;
- }
- }
-
- return false;
-}
-
-function getRequireHandlers() {
- const requiredSources = [];
- const requiredBySource = Object.create(null);
- const requiredByNode = new Map();
- const requireExpressionsWithUsedReturnValue = [];
-
- function addRequireStatement(sourceId, node, scope, usesReturnValue) {
- const required = getRequired(sourceId);
- requiredByNode.set(node, { scope, required });
- if (usesReturnValue) {
- required.nodesUsingRequired.push(node);
- requireExpressionsWithUsedReturnValue.push(node);
- }
- }
-
- function getRequired(sourceId) {
- if (!requiredBySource[sourceId]) {
- requiredSources.push(sourceId);
-
- requiredBySource[sourceId] = {
- source: sourceId,
- name: null,
- nodesUsingRequired: []
- };
- }
-
- return requiredBySource[sourceId];
- }
-
- function rewriteRequireExpressionsAndGetImportBlock(
- magicString,
- topLevelDeclarations,
- topLevelRequireDeclarators,
- reassignedNames,
- helpersName,
- dynamicRegisterSources,
- moduleName,
- exportsName,
- id,
- exportMode
- ) {
- setRemainingImportNamesAndRewriteRequires(
- requireExpressionsWithUsedReturnValue,
- requiredByNode,
- magicString
- );
- const imports = [];
- imports.push(`import * as ${helpersName} from "${HELPERS_ID}";`);
- if (exportMode === 'module') {
- imports.push(
- `import { __module as ${moduleName}, exports as ${exportsName} } from ${JSON.stringify(
- wrapId(id, MODULE_SUFFIX)
- )}`
- );
- } else if (exportMode === 'exports') {
- imports.push(
- `import { __exports as ${exportsName} } from ${JSON.stringify(wrapId(id, EXPORTS_SUFFIX))}`
- );
- }
- for (const source of dynamicRegisterSources) {
- imports.push(`import ${JSON.stringify(wrapId(source, REQUIRE_SUFFIX))};`);
- }
- for (const source of requiredSources) {
- if (!source.startsWith('\0')) {
- imports.push(`import ${JSON.stringify(wrapId(source, REQUIRE_SUFFIX))};`);
- }
- const { name, nodesUsingRequired } = requiredBySource[source];
- imports.push(
- `import ${nodesUsingRequired.length ? `${name} from ` : ''}${JSON.stringify(
- source.startsWith('\0') ? source : wrapId(source, PROXY_SUFFIX)
- )};`
- );
- }
- return imports.length ? `${imports.join('\n')}\n\n` : '';
- }
-
- return {
- addRequireStatement,
- requiredSources,
- rewriteRequireExpressionsAndGetImportBlock
- };
-}
-
-function setRemainingImportNamesAndRewriteRequires(
- requireExpressionsWithUsedReturnValue,
- requiredByNode,
- magicString
-) {
- let uid = 0;
- for (const requireExpression of requireExpressionsWithUsedReturnValue) {
- const { required } = requiredByNode.get(requireExpression);
- if (!required.name) {
- let potentialName;
- const isUsedName = (node) => requiredByNode.get(node).scope.contains(potentialName);
- do {
- potentialName = `require$$${uid}`;
- uid += 1;
- } while (required.nodesUsingRequired.some(isUsedName));
- required.name = potentialName;
- }
- magicString.overwrite(requireExpression.start, requireExpression.end, required.name);
- }
-}
-
-/* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */
-
-const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
-
-const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
-
-function transformCommonjs(
- parse,
- code,
- id,
- isEsModule,
- ignoreGlobal,
- ignoreRequire,
- ignoreDynamicRequires,
- getIgnoreTryCatchRequireStatementMode,
- sourceMap,
- isDynamicRequireModulesEnabled,
- dynamicRequireModuleSet,
- disableWrap,
- commonDir,
- astCache,
- defaultIsModuleExports
-) {
- const ast = astCache || tryParse(parse, code, id);
- const magicString = new MagicString(code);
- const uses = {
- module: false,
- exports: false,
- global: false,
- require: false
- };
- let usesDynamicRequire = false;
- const virtualDynamicRequirePath =
- isDynamicRequireModulesEnabled && getVirtualPathForDynamicRequirePath(dirname(id), commonDir);
- let scope = attachScopes(ast, 'scope');
- let lexicalDepth = 0;
- let programDepth = 0;
- let currentTryBlockEnd = null;
- let shouldWrap = false;
-
- const globals = new Set();
-
- // TODO technically wrong since globals isn't populated yet, but ¯\_(ツ)_/¯
- const HELPERS_NAME = deconflict([scope], globals, 'commonjsHelpers');
- const dynamicRegisterSources = new Set();
- let hasRemovedRequire = false;
-
- const {
- addRequireStatement,
- requiredSources,
- rewriteRequireExpressionsAndGetImportBlock
- } = getRequireHandlers();
-
- // See which names are assigned to. This is necessary to prevent
- // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,
- // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)
- const reassignedNames = new Set();
- const topLevelDeclarations = [];
- const topLevelRequireDeclarators = new Set();
- const skippedNodes = new Set();
- const moduleAccessScopes = new Set([scope]);
- const exportsAccessScopes = new Set([scope]);
- const moduleExportsAssignments = [];
- let firstTopLevelModuleExportsAssignment = null;
- const exportsAssignmentsByName = new Map();
- const topLevelAssignments = new Set();
- const topLevelDefineCompiledEsmExpressions = [];
-
- walk(ast, {
- enter(node, parent) {
- if (skippedNodes.has(node)) {
- this.skip();
- return;
- }
-
- if (currentTryBlockEnd !== null && node.start > currentTryBlockEnd) {
- currentTryBlockEnd = null;
- }
-
- programDepth += 1;
- if (node.scope) ({ scope } = node);
- if (functionType.test(node.type)) lexicalDepth += 1;
- if (sourceMap) {
- magicString.addSourcemapLocation(node.start);
- magicString.addSourcemapLocation(node.end);
- }
-
- // eslint-disable-next-line default-case
- switch (node.type) {
- case 'TryStatement':
- if (currentTryBlockEnd === null) {
- currentTryBlockEnd = node.block.end;
- }
- return;
- case 'AssignmentExpression':
- if (node.left.type === 'MemberExpression') {
- const flattened = getKeypath(node.left);
- if (!flattened || scope.contains(flattened.name)) return;
-
- const exportsPatternMatch = exportsPattern.exec(flattened.keypath);
- if (!exportsPatternMatch || flattened.keypath === 'exports') return;
-
- const [, exportName] = exportsPatternMatch;
- uses[flattened.name] = true;
-
- // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –
- if (flattened.keypath === 'module.exports') {
- moduleExportsAssignments.push(node);
- if (programDepth > 3) {
- moduleAccessScopes.add(scope);
- } else if (!firstTopLevelModuleExportsAssignment) {
- firstTopLevelModuleExportsAssignment = node;
- }
-
- if (defaultIsModuleExports === false) {
- shouldWrap = true;
- } else if (defaultIsModuleExports === 'auto') {
- if (node.right.type === 'ObjectExpression') {
- if (hasDefineEsmProperty(node.right)) {
- shouldWrap = true;
- }
- } else if (defaultIsModuleExports === false) {
- shouldWrap = true;
- }
- }
- } else if (exportName === KEY_COMPILED_ESM) {
- if (programDepth > 3) {
- shouldWrap = true;
- } else {
- topLevelDefineCompiledEsmExpressions.push(node);
- }
- } else {
- const exportsAssignments = exportsAssignmentsByName.get(exportName) || {
- nodes: [],
- scopes: new Set()
- };
- exportsAssignments.nodes.push(node);
- exportsAssignments.scopes.add(scope);
- exportsAccessScopes.add(scope);
- exportsAssignmentsByName.set(exportName, exportsAssignments);
- if (programDepth <= 3) {
- topLevelAssignments.add(node);
- }
- }
-
- skippedNodes.add(node.left);
- } else {
- for (const name of extractAssignedNames(node.left)) {
- reassignedNames.add(name);
- }
- }
- return;
- case 'CallExpression': {
- if (isDefineCompiledEsm(node)) {
- if (programDepth === 3 && parent.type === 'ExpressionStatement') {
- // skip special handling for [module.]exports until we know we render this
- skippedNodes.add(node.arguments[0]);
- topLevelDefineCompiledEsmExpressions.push(node);
- } else {
- shouldWrap = true;
- }
- return;
- }
-
- if (
- node.callee.object &&
- node.callee.object.name === 'require' &&
- node.callee.property.name === 'resolve' &&
- hasDynamicModuleForPath(id, '/', dynamicRequireModuleSet)
- ) {
- const requireNode = node.callee.object;
- magicString.appendLeft(
- node.end - 1,
- `,${JSON.stringify(
- dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath
- )}`
- );
- magicString.overwrite(
- requireNode.start,
- requireNode.end,
- `${HELPERS_NAME}.commonjsRequire`,
- {
- storeName: true
- }
- );
- return;
- }
-
- if (!isStaticRequireStatement(node, scope)) return;
- if (!isDynamicRequireModulesEnabled) {
- skippedNodes.add(node.callee);
- }
- if (!isIgnoredRequireStatement(node, ignoreRequire)) {
- skippedNodes.add(node.callee);
- const usesReturnValue = parent.type !== 'ExpressionStatement';
-
- let canConvertRequire = true;
- let shouldRemoveRequireStatement = false;
-
- if (currentTryBlockEnd !== null) {
- ({
- canConvertRequire,
- shouldRemoveRequireStatement
- } = getIgnoreTryCatchRequireStatementMode(node.arguments[0].value));
-
- if (shouldRemoveRequireStatement) {
- hasRemovedRequire = true;
- }
- }
-
- let sourceId = getRequireStringArg(node);
- const isDynamicRegister = isWrappedId(sourceId, DYNAMIC_REGISTER_SUFFIX);
- if (isDynamicRegister) {
- sourceId = unwrapId(sourceId, DYNAMIC_REGISTER_SUFFIX);
- if (sourceId.endsWith('.json')) {
- sourceId = DYNAMIC_JSON_PREFIX + sourceId;
- }
- dynamicRegisterSources.add(wrapId(sourceId, DYNAMIC_REGISTER_SUFFIX));
- } else {
- if (
- !sourceId.endsWith('.json') &&
- hasDynamicModuleForPath(sourceId, id, dynamicRequireModuleSet)
- ) {
- if (shouldRemoveRequireStatement) {
- magicString.overwrite(node.start, node.end, `undefined`);
- } else if (canConvertRequire) {
- magicString.overwrite(
- node.start,
- node.end,
- `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(
- getVirtualPathForDynamicRequirePath(sourceId, commonDir)
- )}, ${JSON.stringify(
- dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath
- )})`
- );
- usesDynamicRequire = true;
- }
- return;
- }
-
- if (canConvertRequire) {
- addRequireStatement(sourceId, node, scope, usesReturnValue);
- }
- }
-
- if (usesReturnValue) {
- if (shouldRemoveRequireStatement) {
- magicString.overwrite(node.start, node.end, `undefined`);
- return;
- }
-
- if (
- parent.type === 'VariableDeclarator' &&
- !scope.parent &&
- parent.id.type === 'Identifier'
- ) {
- // This will allow us to reuse this variable name as the imported variable if it is not reassigned
- // and does not conflict with variables in other places where this is imported
- topLevelRequireDeclarators.add(parent);
- }
- } else {
- // This is a bare import, e.g. `require('foo');`
-
- if (!canConvertRequire && !shouldRemoveRequireStatement) {
- return;
- }
-
- magicString.remove(parent.start, parent.end);
- }
- }
- return;
- }
- case 'ConditionalExpression':
- case 'IfStatement':
- // skip dead branches
- if (isFalsy(node.test)) {
- skippedNodes.add(node.consequent);
- } else if (node.alternate && isTruthy(node.test)) {
- skippedNodes.add(node.alternate);
- }
- return;
- case 'Identifier': {
- const { name } = node;
- if (!(isReference(node, parent) && !scope.contains(name))) return;
- switch (name) {
- case 'require':
- if (isNodeRequirePropertyAccess(parent)) {
- if (hasDynamicModuleForPath(id, '/', dynamicRequireModuleSet)) {
- if (parent.property.name === 'cache') {
- magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
- storeName: true
- });
- }
- }
-
- return;
- }
-
- if (isDynamicRequireModulesEnabled && isRequireStatement(parent, scope)) {
- magicString.appendLeft(
- parent.end - 1,
- `,${JSON.stringify(
- dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath
- )}`
- );
- }
- if (!ignoreDynamicRequires) {
- if (isShorthandProperty(parent)) {
- magicString.appendRight(node.end, `: ${HELPERS_NAME}.commonjsRequire`);
- } else {
- magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
- storeName: true
- });
- }
- }
- usesDynamicRequire = true;
- return;
- case 'module':
- case 'exports':
- shouldWrap = true;
- uses[name] = true;
- return;
- case 'global':
- uses.global = true;
- if (!ignoreGlobal) {
- magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
- storeName: true
- });
- }
- return;
- case 'define':
- magicString.overwrite(node.start, node.end, 'undefined', {
- storeName: true
- });
- return;
- default:
- globals.add(name);
- return;
- }
- }
- case 'MemberExpression':
- if (!isDynamicRequireModulesEnabled && isModuleRequire(node, scope)) {
- magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
- storeName: true
- });
- skippedNodes.add(node.object);
- skippedNodes.add(node.property);
- }
- return;
- case 'ReturnStatement':
- // if top-level return, we need to wrap it
- if (lexicalDepth === 0) {
- shouldWrap = true;
- }
- return;
- case 'ThisExpression':
- // rewrite top-level `this` as `commonjsHelpers.commonjsGlobal`
- if (lexicalDepth === 0) {
- uses.global = true;
- if (!ignoreGlobal) {
- magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
- storeName: true
- });
- }
- }
- return;
- case 'UnaryExpression':
- // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)
- if (node.operator === 'typeof') {
- const flattened = getKeypath(node.argument);
- if (!flattened) return;
-
- if (scope.contains(flattened.name)) return;
-
- if (
- flattened.keypath === 'module.exports' ||
- flattened.keypath === 'module' ||
- flattened.keypath === 'exports'
- ) {
- magicString.overwrite(node.start, node.end, `'object'`, {
- storeName: false
- });
- }
- }
- return;
- case 'VariableDeclaration':
- if (!scope.parent) {
- topLevelDeclarations.push(node);
- }
- }
- },
-
- leave(node) {
- programDepth -= 1;
- if (node.scope) scope = scope.parent;
- if (functionType.test(node.type)) lexicalDepth -= 1;
- }
- });
-
- const nameBase = getName(id);
- const exportsName = deconflict([...exportsAccessScopes], globals, nameBase);
- const moduleName = deconflict([...moduleAccessScopes], globals, `${nameBase}Module`);
- const deconflictedExportNames = Object.create(null);
- for (const [exportName, { scopes }] of exportsAssignmentsByName) {
- deconflictedExportNames[exportName] = deconflict([...scopes], globals, exportName);
- }
-
- // We cannot wrap ES/mixed modules
- shouldWrap =
- !isEsModule &&
- !disableWrap &&
- (shouldWrap || (uses.exports && moduleExportsAssignments.length > 0));
- const detectWrappedDefault =
- shouldWrap &&
- (topLevelDefineCompiledEsmExpressions.length > 0 || code.indexOf('__esModule') >= 0);
-
- if (
- !(
- requiredSources.length ||
- dynamicRegisterSources.size ||
- uses.module ||
- uses.exports ||
- uses.require ||
- usesDynamicRequire ||
- hasRemovedRequire ||
- topLevelDefineCompiledEsmExpressions.length > 0
- ) &&
- (ignoreGlobal || !uses.global)
- ) {
- return { meta: { commonjs: { isCommonJS: false } } };
- }
-
- let leadingComment = '';
- if (code.startsWith('/*')) {
- const commentEnd = code.indexOf('*/', 2) + 2;
- leadingComment = `${code.slice(0, commentEnd)}\n`;
- magicString.remove(0, commentEnd).trim();
- }
-
- const exportMode = shouldWrap
- ? uses.module
- ? 'module'
- : 'exports'
- : firstTopLevelModuleExportsAssignment
- ? exportsAssignmentsByName.size === 0 && topLevelDefineCompiledEsmExpressions.length === 0
- ? 'replace'
- : 'module'
- : moduleExportsAssignments.length === 0
- ? 'exports'
- : 'module';
-
- const importBlock = rewriteRequireExpressionsAndGetImportBlock(
- magicString,
- topLevelDeclarations,
- topLevelRequireDeclarators,
- reassignedNames,
- HELPERS_NAME,
- dynamicRegisterSources,
- moduleName,
- exportsName,
- id,
- exportMode
- );
-
- const exportBlock = isEsModule
- ? ''
- : rewriteExportsAndGetExportsBlock(
- magicString,
- moduleName,
- exportsName,
- shouldWrap,
- moduleExportsAssignments,
- firstTopLevelModuleExportsAssignment,
- exportsAssignmentsByName,
- topLevelAssignments,
- topLevelDefineCompiledEsmExpressions,
- deconflictedExportNames,
- code,
- HELPERS_NAME,
- exportMode,
- detectWrappedDefault,
- defaultIsModuleExports
- );
-
- if (shouldWrap) {
- wrapCode(magicString, uses, moduleName, exportsName);
- }
-
- magicString
- .trim()
- .prepend(leadingComment + importBlock)
- .append(exportBlock);
-
- return {
- code: magicString.toString(),
- map: sourceMap ? magicString.generateMap() : null,
- syntheticNamedExports: isEsModule ? false : '__moduleExports',
- meta: { commonjs: { isCommonJS: !isEsModule } }
- };
-}
-
-function commonjs(options = {}) {
- const extensions = options.extensions || ['.js'];
- const filter = createFilter(options.include, options.exclude);
- const {
- ignoreGlobal,
- ignoreDynamicRequires,
- requireReturnsDefault: requireReturnsDefaultOption,
- esmExternals
- } = options;
- const getRequireReturnsDefault =
- typeof requireReturnsDefaultOption === 'function'
- ? requireReturnsDefaultOption
- : () => requireReturnsDefaultOption;
- let esmExternalIds;
- const isEsmExternal =
- typeof esmExternals === 'function'
- ? esmExternals
- : Array.isArray(esmExternals)
- ? ((esmExternalIds = new Set(esmExternals)), (id) => esmExternalIds.has(id))
- : () => esmExternals;
- const defaultIsModuleExports =
- typeof options.defaultIsModuleExports === 'boolean' ? options.defaultIsModuleExports : 'auto';
-
- const { dynamicRequireModuleSet, dynamicRequireModuleDirPaths } = getDynamicRequirePaths(
- options.dynamicRequireTargets
- );
- const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;
- const commonDir = isDynamicRequireModulesEnabled
- ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd()))
- : null;
-
- const esModulesWithDefaultExport = new Set();
- const esModulesWithNamedExports = new Set();
- const commonJsMetaPromises = new Map();
-
- const ignoreRequire =
- typeof options.ignore === 'function'
- ? options.ignore
- : Array.isArray(options.ignore)
- ? (id) => options.ignore.includes(id)
- : () => false;
-
- const getIgnoreTryCatchRequireStatementMode = (id) => {
- const mode =
- typeof options.ignoreTryCatch === 'function'
- ? options.ignoreTryCatch(id)
- : Array.isArray(options.ignoreTryCatch)
- ? options.ignoreTryCatch.includes(id)
- : typeof options.ignoreTryCatch !== 'undefined'
- ? options.ignoreTryCatch
- : true;
-
- return {
- canConvertRequire: mode !== 'remove' && mode !== true,
- shouldRemoveRequireStatement: mode === 'remove'
- };
- };
-
- const resolveId = getResolveId(extensions);
-
- const sourceMap = options.sourceMap !== false;
-
- function transformAndCheckExports(code, id) {
- if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {
- // eslint-disable-next-line no-param-reassign
- code =
- getDynamicPackagesEntryIntro(dynamicRequireModuleDirPaths, dynamicRequireModuleSet) + code;
- }
-
- const { isEsModule, hasDefaultExport, hasNamedExports, ast } = analyzeTopLevelStatements(
- this.parse,
- code,
- id
- );
- if (hasDefaultExport) {
- esModulesWithDefaultExport.add(id);
- }
- if (hasNamedExports) {
- esModulesWithNamedExports.add(id);
- }
-
- if (
- !dynamicRequireModuleSet.has(normalizePathSlashes(id)) &&
- (!hasCjsKeywords(code, ignoreGlobal) || (isEsModule && !options.transformMixedEsModules))
- ) {
- return { meta: { commonjs: { isCommonJS: false } } };
- }
-
- // avoid wrapping as this is a commonjsRegister call
- const disableWrap = isWrappedId(id, DYNAMIC_REGISTER_SUFFIX);
- if (disableWrap) {
- // eslint-disable-next-line no-param-reassign
- id = unwrapId(id, DYNAMIC_REGISTER_SUFFIX);
- }
-
- return transformCommonjs(
- this.parse,
- code,
- id,
- isEsModule,
- ignoreGlobal || isEsModule,
- ignoreRequire,
- ignoreDynamicRequires && !isDynamicRequireModulesEnabled,
- getIgnoreTryCatchRequireStatementMode,
- sourceMap,
- isDynamicRequireModulesEnabled,
- dynamicRequireModuleSet,
- disableWrap,
- commonDir,
- ast,
- defaultIsModuleExports
- );
- }
-
- return {
- name: 'commonjs',
-
- buildStart() {
- validateRollupVersion(this.meta.rollupVersion, peerDependencies.rollup);
- if (options.namedExports != null) {
- this.warn(
- 'The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.'
- );
- }
- },
-
- resolveId,
-
- load(id) {
- if (id === HELPERS_ID) {
- return getHelpersModule(isDynamicRequireModulesEnabled, ignoreDynamicRequires);
- }
-
- if (id.startsWith(HELPERS_ID)) {
- return getSpecificHelperProxy(id);
- }
-
- if (isWrappedId(id, MODULE_SUFFIX)) {
- const actualId = unwrapId(id, MODULE_SUFFIX);
- let name = getName(actualId);
- let code;
- if (isDynamicRequireModulesEnabled) {
- if (['modulePath', 'commonjsRequire', 'createModule'].includes(name)) {
- name = `${name}_`;
- }
- code =
- `import {commonjsRequire, createModule} from "${HELPERS_ID}";\n` +
- `var ${name} = createModule(${JSON.stringify(
- getVirtualPathForDynamicRequirePath(dirname(actualId), commonDir)
- )});\n` +
- `export {${name} as __module}`;
- } else {
- code = `var ${name} = {exports: {}}; export {${name} as __module}`;
- }
- return {
- code,
- syntheticNamedExports: '__module',
- meta: { commonjs: { isCommonJS: false } }
- };
- }
-
- if (isWrappedId(id, EXPORTS_SUFFIX)) {
- const actualId = unwrapId(id, EXPORTS_SUFFIX);
- const name = getName(actualId);
- return {
- code: `var ${name} = {}; export {${name} as __exports}`,
- meta: { commonjs: { isCommonJS: false } }
- };
- }
-
- if (isWrappedId(id, EXTERNAL_SUFFIX)) {
- const actualId = unwrapId(id, EXTERNAL_SUFFIX);
- return getUnknownRequireProxy(
- actualId,
- isEsmExternal(actualId) ? getRequireReturnsDefault(actualId) : true
- );
- }
-
- if (id === DYNAMIC_PACKAGES_ID) {
- return getDynamicPackagesModule(dynamicRequireModuleDirPaths, commonDir);
- }
-
- if (id.startsWith(DYNAMIC_JSON_PREFIX)) {
- return getDynamicJsonProxy(id, commonDir);
- }
-
- if (isDynamicModuleImport(id, dynamicRequireModuleSet)) {
- return `export default require(${JSON.stringify(normalizePathSlashes(id))});`;
- }
-
- if (isWrappedId(id, DYNAMIC_REGISTER_SUFFIX)) {
- return getDynamicRequireProxy(
- normalizePathSlashes(unwrapId(id, DYNAMIC_REGISTER_SUFFIX)),
- commonDir
- );
- }
-
- if (isWrappedId(id, PROXY_SUFFIX)) {
- const actualId = unwrapId(id, PROXY_SUFFIX);
- return getStaticRequireProxy(
- actualId,
- getRequireReturnsDefault(actualId),
- esModulesWithDefaultExport,
- esModulesWithNamedExports,
- commonJsMetaPromises
- );
- }
-
- return null;
- },
-
- transform(code, rawId) {
- let id = rawId;
-
- if (isWrappedId(id, DYNAMIC_REGISTER_SUFFIX)) {
- id = unwrapId(id, DYNAMIC_REGISTER_SUFFIX);
- }
-
- const extName = extname(id);
- if (
- extName !== '.cjs' &&
- id !== DYNAMIC_PACKAGES_ID &&
- !id.startsWith(DYNAMIC_JSON_PREFIX) &&
- (!filter(id) || !extensions.includes(extName))
- ) {
- return null;
- }
-
- try {
- return transformAndCheckExports.call(this, code, rawId);
- } catch (err) {
- return this.error(err, err.loc);
- }
- },
-
- moduleParsed({ id, meta: { commonjs: commonjsMeta } }) {
- if (commonjsMeta && commonjsMeta.isCommonJS != null) {
- setCommonJSMetaPromise(commonJsMetaPromises, id, commonjsMeta);
- return;
- }
- setCommonJSMetaPromise(commonJsMetaPromises, id, null);
- }
- };
-}
-
-export { commonjs as default };
-//# sourceMappingURL=index.es.js.map
diff --git a/node_modules/@rollup/plugin-commonjs/dist/index.es.js.map b/node_modules/@rollup/plugin-commonjs/dist/index.es.js.map
deleted file mode 100644
index 951b688..0000000
--- a/node_modules/@rollup/plugin-commonjs/dist/index.es.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.es.js","sources":["../src/parse.js","../src/analyze-top-level-statements.js","../src/helpers.js","../src/utils.js","../src/dynamic-packages-manager.js","../src/dynamic-require-paths.js","../src/is-cjs.js","../src/proxies.js","../src/resolve-id.js","../src/rollup-version.js","../src/ast-utils.js","../src/generate-exports.js","../src/generate-imports.js","../src/transform-commonjs.js","../src/index.js"],"sourcesContent":["export function tryParse(parse, code, id) {\n try {\n return parse(code, { allowReturnOutsideFunction: true });\n } catch (err) {\n err.message += ` in ${id}`;\n throw err;\n }\n}\n\nconst firstpassGlobal = /\\b(?:require|module|exports|global)\\b/;\n\nconst firstpassNoGlobal = /\\b(?:require|module|exports)\\b/;\n\nexport function hasCjsKeywords(code, ignoreGlobal) {\n const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;\n return firstpass.test(code);\n}\n","/* eslint-disable no-underscore-dangle */\n\nimport { tryParse } from './parse';\n\nexport default function analyzeTopLevelStatements(parse, code, id) {\n const ast = tryParse(parse, code, id);\n\n let isEsModule = false;\n let hasDefaultExport = false;\n let hasNamedExports = false;\n\n for (const node of ast.body) {\n switch (node.type) {\n case 'ExportDefaultDeclaration':\n isEsModule = true;\n hasDefaultExport = true;\n break;\n case 'ExportNamedDeclaration':\n isEsModule = true;\n if (node.declaration) {\n hasNamedExports = true;\n } else {\n for (const specifier of node.specifiers) {\n if (specifier.exported.name === 'default') {\n hasDefaultExport = true;\n } else {\n hasNamedExports = true;\n }\n }\n }\n break;\n case 'ExportAllDeclaration':\n isEsModule = true;\n if (node.exported && node.exported.name === 'default') {\n hasDefaultExport = true;\n } else {\n hasNamedExports = true;\n }\n break;\n case 'ImportDeclaration':\n isEsModule = true;\n break;\n default:\n }\n }\n\n return { isEsModule, hasDefaultExport, hasNamedExports, ast };\n}\n","export const isWrappedId = (id, suffix) => id.endsWith(suffix);\nexport const wrapId = (id, suffix) => `\\0${id}${suffix}`;\nexport const unwrapId = (wrappedId, suffix) => wrappedId.slice(1, -suffix.length);\n\nexport const PROXY_SUFFIX = '?commonjs-proxy';\nexport const REQUIRE_SUFFIX = '?commonjs-require';\nexport const EXTERNAL_SUFFIX = '?commonjs-external';\nexport const EXPORTS_SUFFIX = '?commonjs-exports';\nexport const MODULE_SUFFIX = '?commonjs-module';\n\nexport const DYNAMIC_REGISTER_SUFFIX = '?commonjs-dynamic-register';\nexport const DYNAMIC_JSON_PREFIX = '\\0commonjs-dynamic-json:';\nexport const DYNAMIC_PACKAGES_ID = '\\0commonjs-dynamic-packages';\n\nexport const HELPERS_ID = '\\0commonjsHelpers.js';\n\n// `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.\n// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.\n// This will no longer be necessary once Rollup switches to ES6 output, likely\n// in Rollup 3\n\nconst HELPERS = `\nexport var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nexport function getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nexport function getDefaultExportFromNamespaceIfPresent (n) {\n\treturn n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;\n}\n\nexport function getDefaultExportFromNamespaceIfNotNamed (n) {\n\treturn n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;\n}\n\nexport function getAugmentedNamespace(n) {\n\tif (n.__esModule) return n;\n\tvar a = Object.defineProperty({}, '__esModule', {value: true});\n\tObject.keys(n).forEach(function (k) {\n\t\tvar d = Object.getOwnPropertyDescriptor(n, k);\n\t\tObject.defineProperty(a, k, d.get ? d : {\n\t\t\tenumerable: true,\n\t\t\tget: function () {\n\t\t\t\treturn n[k];\n\t\t\t}\n\t\t});\n\t});\n\treturn a;\n}\n`;\n\nconst FAILED_REQUIRE_ERROR = `throw new Error('Could not dynamically require \"' + path + '\". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');`;\n\nconst HELPER_NON_DYNAMIC = `\nexport function commonjsRequire (path) {\n\t${FAILED_REQUIRE_ERROR}\n}\n`;\n\nconst getDynamicHelpers = (ignoreDynamicRequires) => `\nexport function createModule(modulePath) {\n\treturn {\n\t\tpath: modulePath,\n\t\texports: {},\n\t\trequire: function (path, base) {\n\t\t\treturn commonjsRequire(path, base == null ? modulePath : base);\n\t\t}\n\t};\n}\n\nexport function commonjsRegister (path, loader) {\n\tDYNAMIC_REQUIRE_LOADERS[path] = loader;\n}\n\nexport function commonjsRegisterOrShort (path, to) {\n\tvar resolvedPath = commonjsResolveImpl(path, null, true);\n\tif (resolvedPath !== null && DYNAMIC_REQUIRE_CACHE[resolvedPath]) {\n\t DYNAMIC_REQUIRE_CACHE[path] = DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t} else {\n\t DYNAMIC_REQUIRE_SHORTS[path] = to;\n\t}\n}\n\nvar DYNAMIC_REQUIRE_LOADERS = Object.create(null);\nvar DYNAMIC_REQUIRE_CACHE = Object.create(null);\nvar DYNAMIC_REQUIRE_SHORTS = Object.create(null);\nvar DEFAULT_PARENT_MODULE = {\n\tid: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []\n};\nvar CHECKED_EXTENSIONS = ['', '.js', '.json'];\n\nfunction normalize (path) {\n\tpath = path.replace(/\\\\\\\\/g, '/');\n\tvar parts = path.split('/');\n\tvar slashed = parts[0] === '';\n\tfor (var i = 1; i < parts.length; i++) {\n\t\tif (parts[i] === '.' || parts[i] === '') {\n\t\t\tparts.splice(i--, 1);\n\t\t}\n\t}\n\tfor (var i = 1; i < parts.length; i++) {\n\t\tif (parts[i] !== '..') continue;\n\t\tif (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {\n\t\t\tparts.splice(--i, 2);\n\t\t\ti--;\n\t\t}\n\t}\n\tpath = parts.join('/');\n\tif (slashed && path[0] !== '/')\n\t path = '/' + path;\n\telse if (path.length === 0)\n\t path = '.';\n\treturn path;\n}\n\nfunction join () {\n\tif (arguments.length === 0)\n\t return '.';\n\tvar joined;\n\tfor (var i = 0; i < arguments.length; ++i) {\n\t var arg = arguments[i];\n\t if (arg.length > 0) {\n\t\tif (joined === undefined)\n\t\t joined = arg;\n\t\telse\n\t\t joined += '/' + arg;\n\t }\n\t}\n\tif (joined === undefined)\n\t return '.';\n\n\treturn joined;\n}\n\nfunction isPossibleNodeModulesPath (modulePath) {\n\tvar c0 = modulePath[0];\n\tif (c0 === '/' || c0 === '\\\\\\\\') return false;\n\tvar c1 = modulePath[1], c2 = modulePath[2];\n\tif ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\\\\\')) ||\n\t\t(c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\\\\\'))) return false;\n\tif (c1 === ':' && (c2 === '/' || c2 === '\\\\\\\\'))\n\t\treturn false;\n\treturn true;\n}\n\nfunction dirname (path) {\n if (path.length === 0)\n return '.';\n\n var i = path.length - 1;\n while (i > 0) {\n var c = path.charCodeAt(i);\n if ((c === 47 || c === 92) && i !== path.length - 1)\n break;\n i--;\n }\n\n if (i > 0)\n return path.substr(0, i);\n\n if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)\n return path.charAt(0);\n\n return '.';\n}\n\nexport function commonjsResolveImpl (path, originalModuleDir, testCache) {\n\tvar shouldTryNodeModules = isPossibleNodeModulesPath(path);\n\tpath = normalize(path);\n\tvar relPath;\n\tif (path[0] === '/') {\n\t\toriginalModuleDir = '/';\n\t}\n\twhile (true) {\n\t\tif (!shouldTryNodeModules) {\n\t\t\trelPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;\n\t\t} else if (originalModuleDir) {\n\t\t\trelPath = normalize(originalModuleDir + '/node_modules/' + path);\n\t\t} else {\n\t\t\trelPath = normalize(join('node_modules', path));\n\t\t}\n\n\t\tif (relPath.endsWith('/..')) {\n\t\t\tbreak; // Travelled too far up, avoid infinite loop\n\t\t}\n\n\t\tfor (var extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {\n\t\t\tvar resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];\n\t\t\tif (DYNAMIC_REQUIRE_CACHE[resolvedPath]) {\n\t\t\t\treturn resolvedPath;\n\t\t\t}\n\t\t\tif (DYNAMIC_REQUIRE_SHORTS[resolvedPath]) {\n\t\t\t return resolvedPath;\n\t\t\t}\n\t\t\tif (DYNAMIC_REQUIRE_LOADERS[resolvedPath]) {\n\t\t\t\treturn resolvedPath;\n\t\t\t}\n\t\t}\n\t\tif (!shouldTryNodeModules) break;\n\t\tvar nextDir = normalize(originalModuleDir + '/..');\n\t\tif (nextDir === originalModuleDir) break;\n\t\toriginalModuleDir = nextDir;\n\t}\n\treturn null;\n}\n\nexport function commonjsResolve (path, originalModuleDir) {\n\tvar resolvedPath = commonjsResolveImpl(path, originalModuleDir);\n\tif (resolvedPath !== null) {\n\t\treturn resolvedPath;\n\t}\n\treturn require.resolve(path);\n}\n\nexport function commonjsRequire (path, originalModuleDir) {\n\tvar resolvedPath = commonjsResolveImpl(path, originalModuleDir, true);\n\tif (resolvedPath !== null) {\n var cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];\n if (cachedModule) return cachedModule.exports;\n var shortTo = DYNAMIC_REQUIRE_SHORTS[resolvedPath];\n if (shortTo) {\n cachedModule = DYNAMIC_REQUIRE_CACHE[shortTo];\n if (cachedModule)\n return cachedModule.exports;\n resolvedPath = commonjsResolveImpl(shortTo, null, true);\n }\n var loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];\n if (loader) {\n DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {\n id: resolvedPath,\n filename: resolvedPath,\n path: dirname(resolvedPath),\n exports: {},\n parent: DEFAULT_PARENT_MODULE,\n loaded: false,\n children: [],\n paths: [],\n require: function (path, base) {\n return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);\n }\n };\n try {\n loader.call(commonjsGlobal, cachedModule, cachedModule.exports);\n } catch (error) {\n delete DYNAMIC_REQUIRE_CACHE[resolvedPath];\n throw error;\n }\n cachedModule.loaded = true;\n return cachedModule.exports;\n };\n\t}\n\t${ignoreDynamicRequires ? 'return require(path);' : FAILED_REQUIRE_ERROR}\n}\n\ncommonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;\ncommonjsRequire.resolve = commonjsResolve;\n`;\n\nexport function getHelpersModule(isDynamicRequireModulesEnabled, ignoreDynamicRequires) {\n return `${HELPERS}${\n isDynamicRequireModulesEnabled ? getDynamicHelpers(ignoreDynamicRequires) : HELPER_NON_DYNAMIC\n }`;\n}\n","/* eslint-disable import/prefer-default-export */\n\nimport { basename, dirname, extname } from 'path';\n\nimport { makeLegalIdentifier } from '@rollup/pluginutils';\n\nexport function deconflict(scopes, globals, identifier) {\n let i = 1;\n let deconflicted = makeLegalIdentifier(identifier);\n const hasConflicts = () =>\n scopes.some((scope) => scope.contains(deconflicted)) || globals.has(deconflicted);\n\n while (hasConflicts()) {\n deconflicted = makeLegalIdentifier(`${identifier}_${i}`);\n i += 1;\n }\n\n for (const scope of scopes) {\n scope.declarations[deconflicted] = true;\n }\n\n return deconflicted;\n}\n\nexport function getName(id) {\n const name = makeLegalIdentifier(basename(id, extname(id)));\n if (name !== 'index') {\n return name;\n }\n return makeLegalIdentifier(basename(dirname(id)));\n}\n\nexport function normalizePathSlashes(path) {\n return path.replace(/\\\\/g, '/');\n}\n\nconst VIRTUAL_PATH_BASE = '/$$rollup_base$$';\nexport const getVirtualPathForDynamicRequirePath = (path, commonDir) => {\n const normalizedPath = normalizePathSlashes(path);\n return normalizedPath.startsWith(commonDir)\n ? VIRTUAL_PATH_BASE + normalizedPath.slice(commonDir.length)\n : normalizedPath;\n};\n","import { existsSync, readFileSync } from 'fs';\nimport { join } from 'path';\n\nimport { DYNAMIC_PACKAGES_ID, DYNAMIC_REGISTER_SUFFIX, HELPERS_ID, wrapId } from './helpers';\nimport { getVirtualPathForDynamicRequirePath, normalizePathSlashes } from './utils';\n\nexport function getPackageEntryPoint(dirPath) {\n let entryPoint = 'index.js';\n\n try {\n if (existsSync(join(dirPath, 'package.json'))) {\n entryPoint =\n JSON.parse(readFileSync(join(dirPath, 'package.json'), { encoding: 'utf8' })).main ||\n entryPoint;\n }\n } catch (ignored) {\n // ignored\n }\n\n return entryPoint;\n}\n\nexport function getDynamicPackagesModule(dynamicRequireModuleDirPaths, commonDir) {\n let code = `const commonjsRegisterOrShort = require('${HELPERS_ID}?commonjsRegisterOrShort');`;\n for (const dir of dynamicRequireModuleDirPaths) {\n const entryPoint = getPackageEntryPoint(dir);\n\n code += `\\ncommonjsRegisterOrShort(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(dir, commonDir)\n )}, ${JSON.stringify(getVirtualPathForDynamicRequirePath(join(dir, entryPoint), commonDir))});`;\n }\n return code;\n}\n\nexport function getDynamicPackagesEntryIntro(\n dynamicRequireModuleDirPaths,\n dynamicRequireModuleSet\n) {\n let dynamicImports = Array.from(\n dynamicRequireModuleSet,\n (dynamicId) => `require(${JSON.stringify(wrapId(dynamicId, DYNAMIC_REGISTER_SUFFIX))});`\n ).join('\\n');\n\n if (dynamicRequireModuleDirPaths.length) {\n dynamicImports += `require(${JSON.stringify(\n wrapId(DYNAMIC_PACKAGES_ID, DYNAMIC_REGISTER_SUFFIX)\n )});`;\n }\n\n return dynamicImports;\n}\n\nexport function isDynamicModuleImport(id, dynamicRequireModuleSet) {\n const normalizedPath = normalizePathSlashes(id);\n return dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json');\n}\n","import { statSync } from 'fs';\n\nimport { join, resolve } from 'path';\n\nimport glob from 'glob';\n\nimport { normalizePathSlashes } from './utils';\nimport { getPackageEntryPoint } from './dynamic-packages-manager';\n\nfunction isDirectory(path) {\n try {\n if (statSync(path).isDirectory()) return true;\n } catch (ignored) {\n // Nothing to do here\n }\n return false;\n}\n\nexport default function getDynamicRequirePaths(patterns) {\n const dynamicRequireModuleSet = new Set();\n for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) {\n const isNegated = pattern.startsWith('!');\n const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);\n for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {\n modifySet(normalizePathSlashes(resolve(path)));\n if (isDirectory(path)) {\n modifySet(normalizePathSlashes(resolve(join(path, getPackageEntryPoint(path)))));\n }\n }\n }\n const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter((path) =>\n isDirectory(path)\n );\n return { dynamicRequireModuleSet, dynamicRequireModuleDirPaths };\n}\n","export function getCommonJSMetaPromise(commonJSMetaPromises, id) {\n let commonJSMetaPromise = commonJSMetaPromises.get(id);\n if (commonJSMetaPromise) return commonJSMetaPromise.promise;\n\n const promise = new Promise((resolve) => {\n commonJSMetaPromise = {\n resolve,\n promise: null\n };\n commonJSMetaPromises.set(id, commonJSMetaPromise);\n });\n commonJSMetaPromise.promise = promise;\n\n return promise;\n}\n\nexport function setCommonJSMetaPromise(commonJSMetaPromises, id, commonjsMeta) {\n const commonJSMetaPromise = commonJSMetaPromises.get(id);\n if (commonJSMetaPromise) {\n if (commonJSMetaPromise.resolve) {\n commonJSMetaPromise.resolve(commonjsMeta);\n commonJSMetaPromise.resolve = null;\n }\n } else {\n commonJSMetaPromises.set(id, { promise: Promise.resolve(commonjsMeta), resolve: null });\n }\n}\n","import { readFileSync } from 'fs';\n\nimport { DYNAMIC_JSON_PREFIX, HELPERS_ID } from './helpers';\nimport { getCommonJSMetaPromise } from './is-cjs';\nimport { getName, getVirtualPathForDynamicRequirePath, normalizePathSlashes } from './utils';\n\n// e.g. id === \"commonjsHelpers?commonjsRegister\"\nexport function getSpecificHelperProxy(id) {\n return `export {${id.split('?')[1]} as default} from \"${HELPERS_ID}\";`;\n}\n\nexport function getUnknownRequireProxy(id, requireReturnsDefault) {\n if (requireReturnsDefault === true || id.endsWith('.json')) {\n return `export {default} from ${JSON.stringify(id)};`;\n }\n const name = getName(id);\n const exported =\n requireReturnsDefault === 'auto'\n ? `import {getDefaultExportFromNamespaceIfNotNamed} from \"${HELPERS_ID}\"; export default /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(${name});`\n : requireReturnsDefault === 'preferred'\n ? `import {getDefaultExportFromNamespaceIfPresent} from \"${HELPERS_ID}\"; export default /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(${name});`\n : !requireReturnsDefault\n ? `import {getAugmentedNamespace} from \"${HELPERS_ID}\"; export default /*@__PURE__*/getAugmentedNamespace(${name});`\n : `export default ${name};`;\n return `import * as ${name} from ${JSON.stringify(id)}; ${exported}`;\n}\n\nexport function getDynamicJsonProxy(id, commonDir) {\n const normalizedPath = normalizePathSlashes(id.slice(DYNAMIC_JSON_PREFIX.length));\n return `const commonjsRegister = require('${HELPERS_ID}?commonjsRegister');\\ncommonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizedPath)});\n});`;\n}\n\nexport function getDynamicRequireProxy(normalizedPath, commonDir) {\n return `const commonjsRegister = require('${HELPERS_ID}?commonjsRegister');\\ncommonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n ${readFileSync(normalizedPath, { encoding: 'utf8' })}\n});`;\n}\n\nexport async function getStaticRequireProxy(\n id,\n requireReturnsDefault,\n esModulesWithDefaultExport,\n esModulesWithNamedExports,\n commonJsMetaPromises\n) {\n const name = getName(id);\n const commonjsMeta = await getCommonJSMetaPromise(commonJsMetaPromises, id);\n if (commonjsMeta && commonjsMeta.isCommonJS) {\n return `export { __moduleExports as default } from ${JSON.stringify(id)};`;\n } else if (commonjsMeta === null) {\n return getUnknownRequireProxy(id, requireReturnsDefault);\n } else if (!requireReturnsDefault) {\n return `import { getAugmentedNamespace } from \"${HELPERS_ID}\"; import * as ${name} from ${JSON.stringify(\n id\n )}; export default /*@__PURE__*/getAugmentedNamespace(${name});`;\n } else if (\n requireReturnsDefault !== true &&\n (requireReturnsDefault === 'namespace' ||\n !esModulesWithDefaultExport.has(id) ||\n (requireReturnsDefault === 'auto' && esModulesWithNamedExports.has(id)))\n ) {\n return `import * as ${name} from ${JSON.stringify(id)}; export default ${name};`;\n }\n return `export { default } from ${JSON.stringify(id)};`;\n}\n","/* eslint-disable no-param-reassign, no-undefined */\n\nimport { statSync } from 'fs';\nimport { dirname, resolve, sep } from 'path';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n DYNAMIC_REGISTER_SUFFIX,\n EXPORTS_SUFFIX,\n EXTERNAL_SUFFIX,\n HELPERS_ID,\n isWrappedId,\n MODULE_SUFFIX,\n PROXY_SUFFIX,\n REQUIRE_SUFFIX,\n unwrapId,\n wrapId\n} from './helpers';\n\nfunction getCandidatesForExtension(resolved, extension) {\n return [resolved + extension, `${resolved}${sep}index${extension}`];\n}\n\nfunction getCandidates(resolved, extensions) {\n return extensions.reduce(\n (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)),\n [resolved]\n );\n}\n\nexport default function getResolveId(extensions) {\n function resolveExtensions(importee, importer) {\n // not our problem\n if (importee[0] !== '.' || !importer) return undefined;\n\n const resolved = resolve(dirname(importer), importee);\n const candidates = getCandidates(resolved, extensions);\n\n for (let i = 0; i < candidates.length; i += 1) {\n try {\n const stats = statSync(candidates[i]);\n if (stats.isFile()) return { id: candidates[i] };\n } catch (err) {\n /* noop */\n }\n }\n\n return undefined;\n }\n\n return function resolveId(importee, rawImporter, resolveOptions) {\n if (isWrappedId(importee, MODULE_SUFFIX) || isWrappedId(importee, EXPORTS_SUFFIX)) {\n return importee;\n }\n\n const importer =\n rawImporter && isWrappedId(rawImporter, DYNAMIC_REGISTER_SUFFIX)\n ? unwrapId(rawImporter, DYNAMIC_REGISTER_SUFFIX)\n : rawImporter;\n\n // Except for exports, proxies are only importing resolved ids,\n // no need to resolve again\n if (importer && isWrappedId(importer, PROXY_SUFFIX)) {\n return importee;\n }\n\n const isProxyModule = isWrappedId(importee, PROXY_SUFFIX);\n const isRequiredModule = isWrappedId(importee, REQUIRE_SUFFIX);\n let isModuleRegistration = false;\n\n if (isProxyModule) {\n importee = unwrapId(importee, PROXY_SUFFIX);\n } else if (isRequiredModule) {\n importee = unwrapId(importee, REQUIRE_SUFFIX);\n\n isModuleRegistration = isWrappedId(importee, DYNAMIC_REGISTER_SUFFIX);\n if (isModuleRegistration) {\n importee = unwrapId(importee, DYNAMIC_REGISTER_SUFFIX);\n }\n }\n\n if (\n importee.startsWith(HELPERS_ID) ||\n importee === DYNAMIC_PACKAGES_ID ||\n importee.startsWith(DYNAMIC_JSON_PREFIX)\n ) {\n return importee;\n }\n\n if (importee.startsWith('\\0')) {\n return null;\n }\n\n return this.resolve(\n importee,\n importer,\n Object.assign({}, resolveOptions, {\n skipSelf: true,\n custom: Object.assign({}, resolveOptions.custom, {\n 'node-resolve': { isRequire: isProxyModule || isRequiredModule }\n })\n })\n ).then((resolved) => {\n if (!resolved) {\n resolved = resolveExtensions(importee, importer);\n }\n if (resolved && isProxyModule) {\n resolved.id = wrapId(resolved.id, resolved.external ? EXTERNAL_SUFFIX : PROXY_SUFFIX);\n resolved.external = false;\n } else if (resolved && isModuleRegistration) {\n resolved.id = wrapId(resolved.id, DYNAMIC_REGISTER_SUFFIX);\n } else if (!resolved && (isProxyModule || isRequiredModule)) {\n return { id: wrapId(importee, EXTERNAL_SUFFIX), external: false };\n }\n return resolved;\n });\n };\n}\n","export default function validateRollupVersion(rollupVersion, peerDependencyVersion) {\n const [major, minor] = rollupVersion.split('.').map(Number);\n const versionRegexp = /\\^(\\d+\\.\\d+)\\.\\d+/g;\n let minMajor = Infinity;\n let minMinor = Infinity;\n let foundVersion;\n // eslint-disable-next-line no-cond-assign\n while ((foundVersion = versionRegexp.exec(peerDependencyVersion))) {\n const [foundMajor, foundMinor] = foundVersion[1].split('.').map(Number);\n if (foundMajor < minMajor) {\n minMajor = foundMajor;\n minMinor = foundMinor;\n }\n }\n if (major < minMajor || (major === minMajor && minor < minMinor)) {\n throw new Error(\n `Insufficient Rollup version: \"@rollup/plugin-commonjs\" requires at least rollup@${minMajor}.${minMinor} but found rollup@${rollupVersion}.`\n );\n }\n}\n","export { default as isReference } from 'is-reference';\n\nconst operators = {\n '==': (x) => equals(x.left, x.right, false),\n\n '!=': (x) => not(operators['=='](x)),\n\n '===': (x) => equals(x.left, x.right, true),\n\n '!==': (x) => not(operators['==='](x)),\n\n '!': (x) => isFalsy(x.argument),\n\n '&&': (x) => isTruthy(x.left) && isTruthy(x.right),\n\n '||': (x) => isTruthy(x.left) || isTruthy(x.right)\n};\n\nfunction not(value) {\n return value === null ? value : !value;\n}\n\nfunction equals(a, b, strict) {\n if (a.type !== b.type) return null;\n // eslint-disable-next-line eqeqeq\n if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;\n return null;\n}\n\nexport function isTruthy(node) {\n if (!node) return false;\n if (node.type === 'Literal') return !!node.value;\n if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);\n if (node.operator in operators) return operators[node.operator](node);\n return null;\n}\n\nexport function isFalsy(node) {\n return not(isTruthy(node));\n}\n\nexport function getKeypath(node) {\n const parts = [];\n\n while (node.type === 'MemberExpression') {\n if (node.computed) return null;\n\n parts.unshift(node.property.name);\n // eslint-disable-next-line no-param-reassign\n node = node.object;\n }\n\n if (node.type !== 'Identifier') return null;\n\n const { name } = node;\n parts.unshift(name);\n\n return { name, keypath: parts.join('.') };\n}\n\nexport const KEY_COMPILED_ESM = '__esModule';\n\nexport function isDefineCompiledEsm(node) {\n const definedProperty =\n getDefinePropertyCallName(node, 'exports') || getDefinePropertyCallName(node, 'module.exports');\n if (definedProperty && definedProperty.key === KEY_COMPILED_ESM) {\n return isTruthy(definedProperty.value);\n }\n return false;\n}\n\nfunction getDefinePropertyCallName(node, targetName) {\n const {\n callee: { object, property }\n } = node;\n if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;\n if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;\n if (node.arguments.length !== 3) return;\n\n const targetNames = targetName.split('.');\n const [target, key, value] = node.arguments;\n if (targetNames.length === 1) {\n if (target.type !== 'Identifier' || target.name !== targetNames[0]) {\n return;\n }\n }\n\n if (targetNames.length === 2) {\n if (\n target.type !== 'MemberExpression' ||\n target.object.name !== targetNames[0] ||\n target.property.name !== targetNames[1]\n ) {\n return;\n }\n }\n\n if (value.type !== 'ObjectExpression' || !value.properties) return;\n\n const valueProperty = value.properties.find((p) => p.key && p.key.name === 'value');\n if (!valueProperty || !valueProperty.value) return;\n\n // eslint-disable-next-line consistent-return\n return { key: key.value, value: valueProperty.value };\n}\n\nexport function isShorthandProperty(parent) {\n return parent && parent.type === 'Property' && parent.shorthand;\n}\n\nexport function hasDefineEsmProperty(node) {\n return node.properties.some((property) => {\n if (\n property.type === 'Property' &&\n property.key.type === 'Identifier' &&\n property.key.name === '__esModule' &&\n isTruthy(property.value)\n ) {\n return true;\n }\n return false;\n });\n}\n","export function wrapCode(magicString, uses, moduleName, exportsName) {\n const args = [];\n const passedArgs = [];\n if (uses.module) {\n args.push('module');\n passedArgs.push(moduleName);\n }\n if (uses.exports) {\n args.push('exports');\n passedArgs.push(exportsName);\n }\n magicString\n .trim()\n .prepend(`(function (${args.join(', ')}) {\\n`)\n .append(`\\n}(${passedArgs.join(', ')}));`);\n}\n\nexport function rewriteExportsAndGetExportsBlock(\n magicString,\n moduleName,\n exportsName,\n wrapped,\n moduleExportsAssignments,\n firstTopLevelModuleExportsAssignment,\n exportsAssignmentsByName,\n topLevelAssignments,\n defineCompiledEsmExpressions,\n deconflictedExportNames,\n code,\n HELPERS_NAME,\n exportMode,\n detectWrappedDefault,\n defaultIsModuleExports\n) {\n const exports = [];\n const exportDeclarations = [];\n\n if (exportMode === 'replace') {\n getExportsForReplacedModuleExports(\n magicString,\n exports,\n exportDeclarations,\n moduleExportsAssignments,\n firstTopLevelModuleExportsAssignment,\n exportsName\n );\n } else {\n exports.push(`${exportsName} as __moduleExports`);\n if (wrapped) {\n getExportsWhenWrapping(\n exportDeclarations,\n exportsName,\n detectWrappedDefault,\n HELPERS_NAME,\n defaultIsModuleExports\n );\n } else {\n getExports(\n magicString,\n exports,\n exportDeclarations,\n moduleExportsAssignments,\n exportsAssignmentsByName,\n deconflictedExportNames,\n topLevelAssignments,\n moduleName,\n exportsName,\n defineCompiledEsmExpressions,\n HELPERS_NAME,\n defaultIsModuleExports\n );\n }\n }\n if (exports.length) {\n exportDeclarations.push(`export { ${exports.join(', ')} };`);\n }\n\n return `\\n\\n${exportDeclarations.join('\\n')}`;\n}\n\nfunction getExportsForReplacedModuleExports(\n magicString,\n exports,\n exportDeclarations,\n moduleExportsAssignments,\n firstTopLevelModuleExportsAssignment,\n exportsName\n) {\n for (const { left } of moduleExportsAssignments) {\n magicString.overwrite(left.start, left.end, exportsName);\n }\n magicString.prependRight(firstTopLevelModuleExportsAssignment.left.start, 'var ');\n exports.push(`${exportsName} as __moduleExports`);\n exportDeclarations.push(`export default ${exportsName};`);\n}\n\nfunction getExportsWhenWrapping(\n exportDeclarations,\n exportsName,\n detectWrappedDefault,\n HELPERS_NAME,\n defaultIsModuleExports\n) {\n exportDeclarations.push(\n `export default ${\n detectWrappedDefault && defaultIsModuleExports === 'auto'\n ? `/*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportsName})`\n : defaultIsModuleExports === false\n ? `${exportsName}.default`\n : exportsName\n };`\n );\n}\n\nfunction getExports(\n magicString,\n exports,\n exportDeclarations,\n moduleExportsAssignments,\n exportsAssignmentsByName,\n deconflictedExportNames,\n topLevelAssignments,\n moduleName,\n exportsName,\n defineCompiledEsmExpressions,\n HELPERS_NAME,\n defaultIsModuleExports\n) {\n let deconflictedDefaultExportName;\n // Collect and rewrite module.exports assignments\n for (const { left } of moduleExportsAssignments) {\n magicString.overwrite(left.start, left.end, `${moduleName}.exports`);\n }\n\n // Collect and rewrite named exports\n for (const [exportName, { nodes }] of exportsAssignmentsByName) {\n const deconflicted = deconflictedExportNames[exportName];\n let needsDeclaration = true;\n for (const node of nodes) {\n let replacement = `${deconflicted} = ${exportsName}.${exportName}`;\n if (needsDeclaration && topLevelAssignments.has(node)) {\n replacement = `var ${replacement}`;\n needsDeclaration = false;\n }\n magicString.overwrite(node.start, node.left.end, replacement);\n }\n if (needsDeclaration) {\n magicString.prepend(`var ${deconflicted};\\n`);\n }\n\n if (exportName === 'default') {\n deconflictedDefaultExportName = deconflicted;\n } else {\n exports.push(exportName === deconflicted ? exportName : `${deconflicted} as ${exportName}`);\n }\n }\n\n // Collect and rewrite exports.__esModule assignments\n let isRestorableCompiledEsm = false;\n for (const expression of defineCompiledEsmExpressions) {\n isRestorableCompiledEsm = true;\n const moduleExportsExpression =\n expression.type === 'CallExpression' ? expression.arguments[0] : expression.left.object;\n magicString.overwrite(moduleExportsExpression.start, moduleExportsExpression.end, exportsName);\n }\n\n if (!isRestorableCompiledEsm || defaultIsModuleExports === true) {\n exportDeclarations.push(`export default ${exportsName};`);\n } else if (moduleExportsAssignments.length === 0 || defaultIsModuleExports === false) {\n exports.push(`${deconflictedDefaultExportName || exportsName} as default`);\n } else {\n exportDeclarations.push(\n `export default /*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportsName});`\n );\n }\n}\n","import { dirname, resolve } from 'path';\n\nimport { sync as nodeResolveSync } from 'resolve';\n\nimport {\n EXPORTS_SUFFIX,\n HELPERS_ID,\n MODULE_SUFFIX,\n PROXY_SUFFIX,\n REQUIRE_SUFFIX,\n wrapId\n} from './helpers';\nimport { normalizePathSlashes } from './utils';\n\nexport function isRequireStatement(node, scope) {\n if (!node) return false;\n if (node.type !== 'CallExpression') return false;\n\n // Weird case of `require()` or `module.require()` without arguments\n if (node.arguments.length === 0) return false;\n\n return isRequire(node.callee, scope);\n}\n\nfunction isRequire(node, scope) {\n return (\n (node.type === 'Identifier' && node.name === 'require' && !scope.contains('require')) ||\n (node.type === 'MemberExpression' && isModuleRequire(node, scope))\n );\n}\n\nexport function isModuleRequire({ object, property }, scope) {\n return (\n object.type === 'Identifier' &&\n object.name === 'module' &&\n property.type === 'Identifier' &&\n property.name === 'require' &&\n !scope.contains('module')\n );\n}\n\nexport function isStaticRequireStatement(node, scope) {\n if (!isRequireStatement(node, scope)) return false;\n return !hasDynamicArguments(node);\n}\n\nfunction hasDynamicArguments(node) {\n return (\n node.arguments.length > 1 ||\n (node.arguments[0].type !== 'Literal' &&\n (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))\n );\n}\n\nconst reservedMethod = { resolve: true, cache: true, main: true };\n\nexport function isNodeRequirePropertyAccess(parent) {\n return parent && parent.property && reservedMethod[parent.property.name];\n}\n\nexport function isIgnoredRequireStatement(requiredNode, ignoreRequire) {\n return ignoreRequire(requiredNode.arguments[0].value);\n}\n\nexport function getRequireStringArg(node) {\n return node.arguments[0].type === 'Literal'\n ? node.arguments[0].value\n : node.arguments[0].quasis[0].value.cooked;\n}\n\nexport function hasDynamicModuleForPath(source, id, dynamicRequireModuleSet) {\n if (!/^(?:\\.{0,2}[/\\\\]|[A-Za-z]:[/\\\\])/.test(source)) {\n try {\n const resolvedPath = normalizePathSlashes(nodeResolveSync(source, { basedir: dirname(id) }));\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n } catch (ex) {\n // Probably a node.js internal module\n return false;\n }\n\n return false;\n }\n\n for (const attemptExt of ['', '.js', '.json']) {\n const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function getRequireHandlers() {\n const requiredSources = [];\n const requiredBySource = Object.create(null);\n const requiredByNode = new Map();\n const requireExpressionsWithUsedReturnValue = [];\n\n function addRequireStatement(sourceId, node, scope, usesReturnValue) {\n const required = getRequired(sourceId);\n requiredByNode.set(node, { scope, required });\n if (usesReturnValue) {\n required.nodesUsingRequired.push(node);\n requireExpressionsWithUsedReturnValue.push(node);\n }\n }\n\n function getRequired(sourceId) {\n if (!requiredBySource[sourceId]) {\n requiredSources.push(sourceId);\n\n requiredBySource[sourceId] = {\n source: sourceId,\n name: null,\n nodesUsingRequired: []\n };\n }\n\n return requiredBySource[sourceId];\n }\n\n function rewriteRequireExpressionsAndGetImportBlock(\n magicString,\n topLevelDeclarations,\n topLevelRequireDeclarators,\n reassignedNames,\n helpersName,\n dynamicRegisterSources,\n moduleName,\n exportsName,\n id,\n exportMode\n ) {\n setRemainingImportNamesAndRewriteRequires(\n requireExpressionsWithUsedReturnValue,\n requiredByNode,\n magicString\n );\n const imports = [];\n imports.push(`import * as ${helpersName} from \"${HELPERS_ID}\";`);\n if (exportMode === 'module') {\n imports.push(\n `import { __module as ${moduleName}, exports as ${exportsName} } from ${JSON.stringify(\n wrapId(id, MODULE_SUFFIX)\n )}`\n );\n } else if (exportMode === 'exports') {\n imports.push(\n `import { __exports as ${exportsName} } from ${JSON.stringify(wrapId(id, EXPORTS_SUFFIX))}`\n );\n }\n for (const source of dynamicRegisterSources) {\n imports.push(`import ${JSON.stringify(wrapId(source, REQUIRE_SUFFIX))};`);\n }\n for (const source of requiredSources) {\n if (!source.startsWith('\\0')) {\n imports.push(`import ${JSON.stringify(wrapId(source, REQUIRE_SUFFIX))};`);\n }\n const { name, nodesUsingRequired } = requiredBySource[source];\n imports.push(\n `import ${nodesUsingRequired.length ? `${name} from ` : ''}${JSON.stringify(\n source.startsWith('\\0') ? source : wrapId(source, PROXY_SUFFIX)\n )};`\n );\n }\n return imports.length ? `${imports.join('\\n')}\\n\\n` : '';\n }\n\n return {\n addRequireStatement,\n requiredSources,\n rewriteRequireExpressionsAndGetImportBlock\n };\n}\n\nfunction setRemainingImportNamesAndRewriteRequires(\n requireExpressionsWithUsedReturnValue,\n requiredByNode,\n magicString\n) {\n let uid = 0;\n for (const requireExpression of requireExpressionsWithUsedReturnValue) {\n const { required } = requiredByNode.get(requireExpression);\n if (!required.name) {\n let potentialName;\n const isUsedName = (node) => requiredByNode.get(node).scope.contains(potentialName);\n do {\n potentialName = `require$$${uid}`;\n uid += 1;\n } while (required.nodesUsingRequired.some(isUsedName));\n required.name = potentialName;\n }\n magicString.overwrite(requireExpression.start, requireExpression.end, required.name);\n }\n}\n","/* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */\n\nimport { dirname } from 'path';\n\nimport { attachScopes, extractAssignedNames } from '@rollup/pluginutils';\nimport { walk } from 'estree-walker';\nimport MagicString from 'magic-string';\n\nimport {\n getKeypath,\n isDefineCompiledEsm,\n hasDefineEsmProperty,\n isFalsy,\n isReference,\n isShorthandProperty,\n isTruthy,\n KEY_COMPILED_ESM\n} from './ast-utils';\nimport { rewriteExportsAndGetExportsBlock, wrapCode } from './generate-exports';\nimport {\n getRequireHandlers,\n getRequireStringArg,\n hasDynamicModuleForPath,\n isIgnoredRequireStatement,\n isModuleRequire,\n isNodeRequirePropertyAccess,\n isRequireStatement,\n isStaticRequireStatement\n} from './generate-imports';\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_REGISTER_SUFFIX,\n isWrappedId,\n unwrapId,\n wrapId\n} from './helpers';\nimport { tryParse } from './parse';\nimport { deconflict, getName, getVirtualPathForDynamicRequirePath } from './utils';\n\nconst exportsPattern = /^(?:module\\.)?exports(?:\\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;\n\nconst functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;\n\nexport default function transformCommonjs(\n parse,\n code,\n id,\n isEsModule,\n ignoreGlobal,\n ignoreRequire,\n ignoreDynamicRequires,\n getIgnoreTryCatchRequireStatementMode,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n disableWrap,\n commonDir,\n astCache,\n defaultIsModuleExports\n) {\n const ast = astCache || tryParse(parse, code, id);\n const magicString = new MagicString(code);\n const uses = {\n module: false,\n exports: false,\n global: false,\n require: false\n };\n let usesDynamicRequire = false;\n const virtualDynamicRequirePath =\n isDynamicRequireModulesEnabled && getVirtualPathForDynamicRequirePath(dirname(id), commonDir);\n let scope = attachScopes(ast, 'scope');\n let lexicalDepth = 0;\n let programDepth = 0;\n let currentTryBlockEnd = null;\n let shouldWrap = false;\n\n const globals = new Set();\n\n // TODO technically wrong since globals isn't populated yet, but ¯\\_(ツ)_/¯\n const HELPERS_NAME = deconflict([scope], globals, 'commonjsHelpers');\n const dynamicRegisterSources = new Set();\n let hasRemovedRequire = false;\n\n const {\n addRequireStatement,\n requiredSources,\n rewriteRequireExpressionsAndGetImportBlock\n } = getRequireHandlers();\n\n // See which names are assigned to. This is necessary to prevent\n // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,\n // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)\n const reassignedNames = new Set();\n const topLevelDeclarations = [];\n const topLevelRequireDeclarators = new Set();\n const skippedNodes = new Set();\n const moduleAccessScopes = new Set([scope]);\n const exportsAccessScopes = new Set([scope]);\n const moduleExportsAssignments = [];\n let firstTopLevelModuleExportsAssignment = null;\n const exportsAssignmentsByName = new Map();\n const topLevelAssignments = new Set();\n const topLevelDefineCompiledEsmExpressions = [];\n\n walk(ast, {\n enter(node, parent) {\n if (skippedNodes.has(node)) {\n this.skip();\n return;\n }\n\n if (currentTryBlockEnd !== null && node.start > currentTryBlockEnd) {\n currentTryBlockEnd = null;\n }\n\n programDepth += 1;\n if (node.scope) ({ scope } = node);\n if (functionType.test(node.type)) lexicalDepth += 1;\n if (sourceMap) {\n magicString.addSourcemapLocation(node.start);\n magicString.addSourcemapLocation(node.end);\n }\n\n // eslint-disable-next-line default-case\n switch (node.type) {\n case 'TryStatement':\n if (currentTryBlockEnd === null) {\n currentTryBlockEnd = node.block.end;\n }\n return;\n case 'AssignmentExpression':\n if (node.left.type === 'MemberExpression') {\n const flattened = getKeypath(node.left);\n if (!flattened || scope.contains(flattened.name)) return;\n\n const exportsPatternMatch = exportsPattern.exec(flattened.keypath);\n if (!exportsPatternMatch || flattened.keypath === 'exports') return;\n\n const [, exportName] = exportsPatternMatch;\n uses[flattened.name] = true;\n\n // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –\n if (flattened.keypath === 'module.exports') {\n moduleExportsAssignments.push(node);\n if (programDepth > 3) {\n moduleAccessScopes.add(scope);\n } else if (!firstTopLevelModuleExportsAssignment) {\n firstTopLevelModuleExportsAssignment = node;\n }\n\n if (defaultIsModuleExports === false) {\n shouldWrap = true;\n } else if (defaultIsModuleExports === 'auto') {\n if (node.right.type === 'ObjectExpression') {\n if (hasDefineEsmProperty(node.right)) {\n shouldWrap = true;\n }\n } else if (defaultIsModuleExports === false) {\n shouldWrap = true;\n }\n }\n } else if (exportName === KEY_COMPILED_ESM) {\n if (programDepth > 3) {\n shouldWrap = true;\n } else {\n topLevelDefineCompiledEsmExpressions.push(node);\n }\n } else {\n const exportsAssignments = exportsAssignmentsByName.get(exportName) || {\n nodes: [],\n scopes: new Set()\n };\n exportsAssignments.nodes.push(node);\n exportsAssignments.scopes.add(scope);\n exportsAccessScopes.add(scope);\n exportsAssignmentsByName.set(exportName, exportsAssignments);\n if (programDepth <= 3) {\n topLevelAssignments.add(node);\n }\n }\n\n skippedNodes.add(node.left);\n } else {\n for (const name of extractAssignedNames(node.left)) {\n reassignedNames.add(name);\n }\n }\n return;\n case 'CallExpression': {\n if (isDefineCompiledEsm(node)) {\n if (programDepth === 3 && parent.type === 'ExpressionStatement') {\n // skip special handling for [module.]exports until we know we render this\n skippedNodes.add(node.arguments[0]);\n topLevelDefineCompiledEsmExpressions.push(node);\n } else {\n shouldWrap = true;\n }\n return;\n }\n\n if (\n node.callee.object &&\n node.callee.object.name === 'require' &&\n node.callee.property.name === 'resolve' &&\n hasDynamicModuleForPath(id, '/', dynamicRequireModuleSet)\n ) {\n const requireNode = node.callee.object;\n magicString.appendLeft(\n node.end - 1,\n `,${JSON.stringify(\n dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath\n )}`\n );\n magicString.overwrite(\n requireNode.start,\n requireNode.end,\n `${HELPERS_NAME}.commonjsRequire`,\n {\n storeName: true\n }\n );\n return;\n }\n\n if (!isStaticRequireStatement(node, scope)) return;\n if (!isDynamicRequireModulesEnabled) {\n skippedNodes.add(node.callee);\n }\n if (!isIgnoredRequireStatement(node, ignoreRequire)) {\n skippedNodes.add(node.callee);\n const usesReturnValue = parent.type !== 'ExpressionStatement';\n\n let canConvertRequire = true;\n let shouldRemoveRequireStatement = false;\n\n if (currentTryBlockEnd !== null) {\n ({\n canConvertRequire,\n shouldRemoveRequireStatement\n } = getIgnoreTryCatchRequireStatementMode(node.arguments[0].value));\n\n if (shouldRemoveRequireStatement) {\n hasRemovedRequire = true;\n }\n }\n\n let sourceId = getRequireStringArg(node);\n const isDynamicRegister = isWrappedId(sourceId, DYNAMIC_REGISTER_SUFFIX);\n if (isDynamicRegister) {\n sourceId = unwrapId(sourceId, DYNAMIC_REGISTER_SUFFIX);\n if (sourceId.endsWith('.json')) {\n sourceId = DYNAMIC_JSON_PREFIX + sourceId;\n }\n dynamicRegisterSources.add(wrapId(sourceId, DYNAMIC_REGISTER_SUFFIX));\n } else {\n if (\n !sourceId.endsWith('.json') &&\n hasDynamicModuleForPath(sourceId, id, dynamicRequireModuleSet)\n ) {\n if (shouldRemoveRequireStatement) {\n magicString.overwrite(node.start, node.end, `undefined`);\n } else if (canConvertRequire) {\n magicString.overwrite(\n node.start,\n node.end,\n `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(sourceId, commonDir)\n )}, ${JSON.stringify(\n dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath\n )})`\n );\n usesDynamicRequire = true;\n }\n return;\n }\n\n if (canConvertRequire) {\n addRequireStatement(sourceId, node, scope, usesReturnValue);\n }\n }\n\n if (usesReturnValue) {\n if (shouldRemoveRequireStatement) {\n magicString.overwrite(node.start, node.end, `undefined`);\n return;\n }\n\n if (\n parent.type === 'VariableDeclarator' &&\n !scope.parent &&\n parent.id.type === 'Identifier'\n ) {\n // This will allow us to reuse this variable name as the imported variable if it is not reassigned\n // and does not conflict with variables in other places where this is imported\n topLevelRequireDeclarators.add(parent);\n }\n } else {\n // This is a bare import, e.g. `require('foo');`\n\n if (!canConvertRequire && !shouldRemoveRequireStatement) {\n return;\n }\n\n magicString.remove(parent.start, parent.end);\n }\n }\n return;\n }\n case 'ConditionalExpression':\n case 'IfStatement':\n // skip dead branches\n if (isFalsy(node.test)) {\n skippedNodes.add(node.consequent);\n } else if (node.alternate && isTruthy(node.test)) {\n skippedNodes.add(node.alternate);\n }\n return;\n case 'Identifier': {\n const { name } = node;\n if (!(isReference(node, parent) && !scope.contains(name))) return;\n switch (name) {\n case 'require':\n if (isNodeRequirePropertyAccess(parent)) {\n if (hasDynamicModuleForPath(id, '/', dynamicRequireModuleSet)) {\n if (parent.property.name === 'cache') {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {\n storeName: true\n });\n }\n }\n\n return;\n }\n\n if (isDynamicRequireModulesEnabled && isRequireStatement(parent, scope)) {\n magicString.appendLeft(\n parent.end - 1,\n `,${JSON.stringify(\n dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath\n )}`\n );\n }\n if (!ignoreDynamicRequires) {\n if (isShorthandProperty(parent)) {\n magicString.appendRight(node.end, `: ${HELPERS_NAME}.commonjsRequire`);\n } else {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {\n storeName: true\n });\n }\n }\n usesDynamicRequire = true;\n return;\n case 'module':\n case 'exports':\n shouldWrap = true;\n uses[name] = true;\n return;\n case 'global':\n uses.global = true;\n if (!ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n }\n return;\n case 'define':\n magicString.overwrite(node.start, node.end, 'undefined', {\n storeName: true\n });\n return;\n default:\n globals.add(name);\n return;\n }\n }\n case 'MemberExpression':\n if (!isDynamicRequireModulesEnabled && isModuleRequire(node, scope)) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {\n storeName: true\n });\n skippedNodes.add(node.object);\n skippedNodes.add(node.property);\n }\n return;\n case 'ReturnStatement':\n // if top-level return, we need to wrap it\n if (lexicalDepth === 0) {\n shouldWrap = true;\n }\n return;\n case 'ThisExpression':\n // rewrite top-level `this` as `commonjsHelpers.commonjsGlobal`\n if (lexicalDepth === 0) {\n uses.global = true;\n if (!ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n }\n }\n return;\n case 'UnaryExpression':\n // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)\n if (node.operator === 'typeof') {\n const flattened = getKeypath(node.argument);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n if (\n flattened.keypath === 'module.exports' ||\n flattened.keypath === 'module' ||\n flattened.keypath === 'exports'\n ) {\n magicString.overwrite(node.start, node.end, `'object'`, {\n storeName: false\n });\n }\n }\n return;\n case 'VariableDeclaration':\n if (!scope.parent) {\n topLevelDeclarations.push(node);\n }\n }\n },\n\n leave(node) {\n programDepth -= 1;\n if (node.scope) scope = scope.parent;\n if (functionType.test(node.type)) lexicalDepth -= 1;\n }\n });\n\n const nameBase = getName(id);\n const exportsName = deconflict([...exportsAccessScopes], globals, nameBase);\n const moduleName = deconflict([...moduleAccessScopes], globals, `${nameBase}Module`);\n const deconflictedExportNames = Object.create(null);\n for (const [exportName, { scopes }] of exportsAssignmentsByName) {\n deconflictedExportNames[exportName] = deconflict([...scopes], globals, exportName);\n }\n\n // We cannot wrap ES/mixed modules\n shouldWrap =\n !isEsModule &&\n !disableWrap &&\n (shouldWrap || (uses.exports && moduleExportsAssignments.length > 0));\n const detectWrappedDefault =\n shouldWrap &&\n (topLevelDefineCompiledEsmExpressions.length > 0 || code.indexOf('__esModule') >= 0);\n\n if (\n !(\n requiredSources.length ||\n dynamicRegisterSources.size ||\n uses.module ||\n uses.exports ||\n uses.require ||\n usesDynamicRequire ||\n hasRemovedRequire ||\n topLevelDefineCompiledEsmExpressions.length > 0\n ) &&\n (ignoreGlobal || !uses.global)\n ) {\n return { meta: { commonjs: { isCommonJS: false } } };\n }\n\n let leadingComment = '';\n if (code.startsWith('/*')) {\n const commentEnd = code.indexOf('*/', 2) + 2;\n leadingComment = `${code.slice(0, commentEnd)}\\n`;\n magicString.remove(0, commentEnd).trim();\n }\n\n const exportMode = shouldWrap\n ? uses.module\n ? 'module'\n : 'exports'\n : firstTopLevelModuleExportsAssignment\n ? exportsAssignmentsByName.size === 0 && topLevelDefineCompiledEsmExpressions.length === 0\n ? 'replace'\n : 'module'\n : moduleExportsAssignments.length === 0\n ? 'exports'\n : 'module';\n\n const importBlock = rewriteRequireExpressionsAndGetImportBlock(\n magicString,\n topLevelDeclarations,\n topLevelRequireDeclarators,\n reassignedNames,\n HELPERS_NAME,\n dynamicRegisterSources,\n moduleName,\n exportsName,\n id,\n exportMode\n );\n\n const exportBlock = isEsModule\n ? ''\n : rewriteExportsAndGetExportsBlock(\n magicString,\n moduleName,\n exportsName,\n shouldWrap,\n moduleExportsAssignments,\n firstTopLevelModuleExportsAssignment,\n exportsAssignmentsByName,\n topLevelAssignments,\n topLevelDefineCompiledEsmExpressions,\n deconflictedExportNames,\n code,\n HELPERS_NAME,\n exportMode,\n detectWrappedDefault,\n defaultIsModuleExports\n );\n\n if (shouldWrap) {\n wrapCode(magicString, uses, moduleName, exportsName);\n }\n\n magicString\n .trim()\n .prepend(leadingComment + importBlock)\n .append(exportBlock);\n\n return {\n code: magicString.toString(),\n map: sourceMap ? magicString.generateMap() : null,\n syntheticNamedExports: isEsModule ? false : '__moduleExports',\n meta: { commonjs: { isCommonJS: !isEsModule } }\n };\n}\n","import { dirname, extname } from 'path';\n\nimport { createFilter } from '@rollup/pluginutils';\nimport getCommonDir from 'commondir';\n\nimport { peerDependencies } from '../package.json';\n\nimport analyzeTopLevelStatements from './analyze-top-level-statements';\n\nimport {\n getDynamicPackagesEntryIntro,\n getDynamicPackagesModule,\n isDynamicModuleImport\n} from './dynamic-packages-manager';\nimport getDynamicRequirePaths from './dynamic-require-paths';\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n DYNAMIC_REGISTER_SUFFIX,\n EXPORTS_SUFFIX,\n EXTERNAL_SUFFIX,\n getHelpersModule,\n HELPERS_ID,\n isWrappedId,\n MODULE_SUFFIX,\n PROXY_SUFFIX,\n unwrapId\n} from './helpers';\nimport { setCommonJSMetaPromise } from './is-cjs';\nimport { hasCjsKeywords } from './parse';\nimport {\n getDynamicJsonProxy,\n getDynamicRequireProxy,\n getSpecificHelperProxy,\n getStaticRequireProxy,\n getUnknownRequireProxy\n} from './proxies';\nimport getResolveId from './resolve-id';\nimport validateRollupVersion from './rollup-version';\nimport transformCommonjs from './transform-commonjs';\nimport { getName, getVirtualPathForDynamicRequirePath, normalizePathSlashes } from './utils';\n\nexport default function commonjs(options = {}) {\n const extensions = options.extensions || ['.js'];\n const filter = createFilter(options.include, options.exclude);\n const {\n ignoreGlobal,\n ignoreDynamicRequires,\n requireReturnsDefault: requireReturnsDefaultOption,\n esmExternals\n } = options;\n const getRequireReturnsDefault =\n typeof requireReturnsDefaultOption === 'function'\n ? requireReturnsDefaultOption\n : () => requireReturnsDefaultOption;\n let esmExternalIds;\n const isEsmExternal =\n typeof esmExternals === 'function'\n ? esmExternals\n : Array.isArray(esmExternals)\n ? ((esmExternalIds = new Set(esmExternals)), (id) => esmExternalIds.has(id))\n : () => esmExternals;\n const defaultIsModuleExports =\n typeof options.defaultIsModuleExports === 'boolean' ? options.defaultIsModuleExports : 'auto';\n\n const { dynamicRequireModuleSet, dynamicRequireModuleDirPaths } = getDynamicRequirePaths(\n options.dynamicRequireTargets\n );\n const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;\n const commonDir = isDynamicRequireModulesEnabled\n ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd()))\n : null;\n\n const esModulesWithDefaultExport = new Set();\n const esModulesWithNamedExports = new Set();\n const commonJsMetaPromises = new Map();\n\n const ignoreRequire =\n typeof options.ignore === 'function'\n ? options.ignore\n : Array.isArray(options.ignore)\n ? (id) => options.ignore.includes(id)\n : () => false;\n\n const getIgnoreTryCatchRequireStatementMode = (id) => {\n const mode =\n typeof options.ignoreTryCatch === 'function'\n ? options.ignoreTryCatch(id)\n : Array.isArray(options.ignoreTryCatch)\n ? options.ignoreTryCatch.includes(id)\n : typeof options.ignoreTryCatch !== 'undefined'\n ? options.ignoreTryCatch\n : true;\n\n return {\n canConvertRequire: mode !== 'remove' && mode !== true,\n shouldRemoveRequireStatement: mode === 'remove'\n };\n };\n\n const resolveId = getResolveId(extensions);\n\n const sourceMap = options.sourceMap !== false;\n\n function transformAndCheckExports(code, id) {\n if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {\n // eslint-disable-next-line no-param-reassign\n code =\n getDynamicPackagesEntryIntro(dynamicRequireModuleDirPaths, dynamicRequireModuleSet) + code;\n }\n\n const { isEsModule, hasDefaultExport, hasNamedExports, ast } = analyzeTopLevelStatements(\n this.parse,\n code,\n id\n );\n if (hasDefaultExport) {\n esModulesWithDefaultExport.add(id);\n }\n if (hasNamedExports) {\n esModulesWithNamedExports.add(id);\n }\n\n if (\n !dynamicRequireModuleSet.has(normalizePathSlashes(id)) &&\n (!hasCjsKeywords(code, ignoreGlobal) || (isEsModule && !options.transformMixedEsModules))\n ) {\n return { meta: { commonjs: { isCommonJS: false } } };\n }\n\n // avoid wrapping as this is a commonjsRegister call\n const disableWrap = isWrappedId(id, DYNAMIC_REGISTER_SUFFIX);\n if (disableWrap) {\n // eslint-disable-next-line no-param-reassign\n id = unwrapId(id, DYNAMIC_REGISTER_SUFFIX);\n }\n\n return transformCommonjs(\n this.parse,\n code,\n id,\n isEsModule,\n ignoreGlobal || isEsModule,\n ignoreRequire,\n ignoreDynamicRequires && !isDynamicRequireModulesEnabled,\n getIgnoreTryCatchRequireStatementMode,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n disableWrap,\n commonDir,\n ast,\n defaultIsModuleExports\n );\n }\n\n return {\n name: 'commonjs',\n\n buildStart() {\n validateRollupVersion(this.meta.rollupVersion, peerDependencies.rollup);\n if (options.namedExports != null) {\n this.warn(\n 'The namedExports option from \"@rollup/plugin-commonjs\" is deprecated. Named exports are now handled automatically.'\n );\n }\n },\n\n resolveId,\n\n load(id) {\n if (id === HELPERS_ID) {\n return getHelpersModule(isDynamicRequireModulesEnabled, ignoreDynamicRequires);\n }\n\n if (id.startsWith(HELPERS_ID)) {\n return getSpecificHelperProxy(id);\n }\n\n if (isWrappedId(id, MODULE_SUFFIX)) {\n const actualId = unwrapId(id, MODULE_SUFFIX);\n let name = getName(actualId);\n let code;\n if (isDynamicRequireModulesEnabled) {\n if (['modulePath', 'commonjsRequire', 'createModule'].includes(name)) {\n name = `${name}_`;\n }\n code =\n `import {commonjsRequire, createModule} from \"${HELPERS_ID}\";\\n` +\n `var ${name} = createModule(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(dirname(actualId), commonDir)\n )});\\n` +\n `export {${name} as __module}`;\n } else {\n code = `var ${name} = {exports: {}}; export {${name} as __module}`;\n }\n return {\n code,\n syntheticNamedExports: '__module',\n meta: { commonjs: { isCommonJS: false } }\n };\n }\n\n if (isWrappedId(id, EXPORTS_SUFFIX)) {\n const actualId = unwrapId(id, EXPORTS_SUFFIX);\n const name = getName(actualId);\n return {\n code: `var ${name} = {}; export {${name} as __exports}`,\n meta: { commonjs: { isCommonJS: false } }\n };\n }\n\n if (isWrappedId(id, EXTERNAL_SUFFIX)) {\n const actualId = unwrapId(id, EXTERNAL_SUFFIX);\n return getUnknownRequireProxy(\n actualId,\n isEsmExternal(actualId) ? getRequireReturnsDefault(actualId) : true\n );\n }\n\n if (id === DYNAMIC_PACKAGES_ID) {\n return getDynamicPackagesModule(dynamicRequireModuleDirPaths, commonDir);\n }\n\n if (id.startsWith(DYNAMIC_JSON_PREFIX)) {\n return getDynamicJsonProxy(id, commonDir);\n }\n\n if (isDynamicModuleImport(id, dynamicRequireModuleSet)) {\n return `export default require(${JSON.stringify(normalizePathSlashes(id))});`;\n }\n\n if (isWrappedId(id, DYNAMIC_REGISTER_SUFFIX)) {\n return getDynamicRequireProxy(\n normalizePathSlashes(unwrapId(id, DYNAMIC_REGISTER_SUFFIX)),\n commonDir\n );\n }\n\n if (isWrappedId(id, PROXY_SUFFIX)) {\n const actualId = unwrapId(id, PROXY_SUFFIX);\n return getStaticRequireProxy(\n actualId,\n getRequireReturnsDefault(actualId),\n esModulesWithDefaultExport,\n esModulesWithNamedExports,\n commonJsMetaPromises\n );\n }\n\n return null;\n },\n\n transform(code, rawId) {\n let id = rawId;\n\n if (isWrappedId(id, DYNAMIC_REGISTER_SUFFIX)) {\n id = unwrapId(id, DYNAMIC_REGISTER_SUFFIX);\n }\n\n const extName = extname(id);\n if (\n extName !== '.cjs' &&\n id !== DYNAMIC_PACKAGES_ID &&\n !id.startsWith(DYNAMIC_JSON_PREFIX) &&\n (!filter(id) || !extensions.includes(extName))\n ) {\n return null;\n }\n\n try {\n return transformAndCheckExports.call(this, code, rawId);\n } catch (err) {\n return this.error(err, err.loc);\n }\n },\n\n moduleParsed({ id, meta: { commonjs: commonjsMeta } }) {\n if (commonjsMeta && commonjsMeta.isCommonJS != null) {\n setCommonJSMetaPromise(commonJsMetaPromises, id, commonjsMeta);\n return;\n }\n setCommonJSMetaPromise(commonJsMetaPromises, id, null);\n }\n };\n}\n"],"names":["nodeResolveSync"],"mappings":";;;;;;;;;;;;;;AAAO,SAAS,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;AAC1C,EAAE,IAAI;AACN,IAAI,OAAO,KAAK,CAAC,IAAI,EAAE,EAAE,0BAA0B,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7D,GAAG,CAAC,OAAO,GAAG,EAAE;AAChB,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/B,IAAI,MAAM,GAAG,CAAC;AACd,GAAG;AACH,CAAC;AACD;AACA,MAAM,eAAe,GAAG,uCAAuC,CAAC;AAChE;AACA,MAAM,iBAAiB,GAAG,gCAAgC,CAAC;AAC3D;AACO,SAAS,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE;AACnD,EAAE,MAAM,SAAS,GAAG,YAAY,GAAG,iBAAiB,GAAG,eAAe,CAAC;AACvE,EAAE,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9B;;AChBA;AAGA;AACe,SAAS,yBAAyB,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;AACnE,EAAE,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;AACxC;AACA,EAAE,IAAI,UAAU,GAAG,KAAK,CAAC;AACzB,EAAE,IAAI,gBAAgB,GAAG,KAAK,CAAC;AAC/B,EAAE,IAAI,eAAe,GAAG,KAAK,CAAC;AAC9B;AACA,EAAE,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,IAAI,EAAE;AAC/B,IAAI,QAAQ,IAAI,CAAC,IAAI;AACrB,MAAM,KAAK,0BAA0B;AACrC,QAAQ,UAAU,GAAG,IAAI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AE,MAAM,KAAK,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAClF;AACO,MAAM,YAAY,GAAG,iBAAiB,CAAC;AACvC,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAC3C,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAC7C,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAC3C,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAChD;AACO,MAAM,uBAAuB,GAAG,4BAA4B,CAAC;AAC7D,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AACvD,MAAM,mBAAmB,GAAG,6BAA6B,CAAC;AACjE;AACO,MAAM,UAAU,GAAG,sBAAsB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,OAAO,GAAG,CAAC;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC;AACF;AACA,MAAM,oBAAoB,GAAG,CAAC,wNAAwN,CAAC,CAAC;AACxP;AACA,MAAM,kBAAkB,GAAG,CAAC;AAC5B;AACA,CAAC,EAAE,oBAAoB,CAAC;AACxB;AACA,CAAC,CAAC;AACF;AACA,MAAM,iBAAiB,GAAG,CAAC,qBAAqB,KAAK,CAAC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE,qBAAqB,GAAG,uBAAuB,GAAG,oBAAoB,CAAC;AAC1E;AACA;AACA;AACA;AACA,CAAC,CAAC;AACF;AACO,SAAS,gBAAgB,CAAC,8BAA8B,EAAE,qBAAqB,EAAE;AACxF,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC;AACpB,IAAI,8BAA8B,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,GAAG,kBAAkB;AAClG,GAAG,CAAC,CAAC;AACL;;ACvQA;AAKA;AACO,SAAS,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE;AACxD,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;AACZ,EAAE,IAAI,YAAY,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACrD,EAAE,MAAM,YAAY,GAAG;AACvB,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AACtF;A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AAE,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACtD,QAAQ;AACR,QAAQ,OAAO,IAAI,CAAC;AACpB,OAAO;AACP;AACA,MAAM,IAAI;AACV,QAAQ,OAAO,wBAAwB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAChE,OAAO,CAAC,OAAO,GAAG,EAAE;AACpB,QAAQ,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;AACxC,OAAO;AACP,KAAK;AACL;AACA,IAAI,YAAY,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE;AAC3D,MAAM,IAAI,YAAY,IAAI,YAAY,CAAC,UAAU,IAAI,IAAI,EAAE;AAC3D,QAAQ,sBAAsB,CAAC,oBAAoB,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC;AACvE,QAAQ,OAAO;AACf,OAAO;AACP,MAAM,sBAAsB,CAAC,oBAAoB,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;AAC7D,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
\ No newline at end of file
diff --git a/node_modules/@rollup/plugin-commonjs/dist/index.js b/node_modules/@rollup/plugin-commonjs/dist/index.js
deleted file mode 100644
index 298614b..0000000
--- a/node_modules/@rollup/plugin-commonjs/dist/index.js
+++ /dev/null
@@ -1,1919 +0,0 @@
-'use strict';
-
-var path = require('path');
-var pluginutils = require('@rollup/pluginutils');
-var getCommonDir = require('commondir');
-var fs = require('fs');
-var glob = require('glob');
-var estreeWalker = require('estree-walker');
-var MagicString = require('magic-string');
-var isReference = require('is-reference');
-var resolve = require('resolve');
-
-function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
-
-var getCommonDir__default = /*#__PURE__*/_interopDefaultLegacy(getCommonDir);
-var glob__default = /*#__PURE__*/_interopDefaultLegacy(glob);
-var MagicString__default = /*#__PURE__*/_interopDefaultLegacy(MagicString);
-var isReference__default = /*#__PURE__*/_interopDefaultLegacy(isReference);
-
-var peerDependencies = {
- rollup: "^2.38.3"
-};
-
-function tryParse(parse, code, id) {
- try {
- return parse(code, { allowReturnOutsideFunction: true });
- } catch (err) {
- err.message += ` in ${id}`;
- throw err;
- }
-}
-
-const firstpassGlobal = /\b(?:require|module|exports|global)\b/;
-
-const firstpassNoGlobal = /\b(?:require|module|exports)\b/;
-
-function hasCjsKeywords(code, ignoreGlobal) {
- const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;
- return firstpass.test(code);
-}
-
-/* eslint-disable no-underscore-dangle */
-
-function analyzeTopLevelStatements(parse, code, id) {
- const ast = tryParse(parse, code, id);
-
- let isEsModule = false;
- let hasDefaultExport = false;
- let hasNamedExports = false;
-
- for (const node of ast.body) {
- switch (node.type) {
- case 'ExportDefaultDeclaration':
- isEsModule = true;
- hasDefaultExport = true;
- break;
- case 'ExportNamedDeclaration':
- isEsModule = true;
- if (node.declaration) {
- hasNamedExports = true;
- } else {
- for (const specifier of node.specifiers) {
- if (specifier.exported.name === 'default') {
- hasDefaultExport = true;
- } else {
- hasNamedExports = true;
- }
- }
- }
- break;
- case 'ExportAllDeclaration':
- isEsModule = true;
- if (node.exported && node.exported.name === 'default') {
- hasDefaultExport = true;
- } else {
- hasNamedExports = true;
- }
- break;
- case 'ImportDeclaration':
- isEsModule = true;
- break;
- }
- }
-
- return { isEsModule, hasDefaultExport, hasNamedExports, ast };
-}
-
-const isWrappedId = (id, suffix) => id.endsWith(suffix);
-const wrapId = (id, suffix) => `\0${id}${suffix}`;
-const unwrapId = (wrappedId, suffix) => wrappedId.slice(1, -suffix.length);
-
-const PROXY_SUFFIX = '?commonjs-proxy';
-const REQUIRE_SUFFIX = '?commonjs-require';
-const EXTERNAL_SUFFIX = '?commonjs-external';
-const EXPORTS_SUFFIX = '?commonjs-exports';
-const MODULE_SUFFIX = '?commonjs-module';
-
-const DYNAMIC_REGISTER_SUFFIX = '?commonjs-dynamic-register';
-const DYNAMIC_JSON_PREFIX = '\0commonjs-dynamic-json:';
-const DYNAMIC_PACKAGES_ID = '\0commonjs-dynamic-packages';
-
-const HELPERS_ID = '\0commonjsHelpers.js';
-
-// `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.
-// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.
-// This will no longer be necessary once Rollup switches to ES6 output, likely
-// in Rollup 3
-
-const HELPERS = `
-export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
-
-export function getDefaultExportFromCjs (x) {
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
-}
-
-export function getDefaultExportFromNamespaceIfPresent (n) {
- return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
-}
-
-export function getDefaultExportFromNamespaceIfNotNamed (n) {
- return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
-}
-
-export function getAugmentedNamespace(n) {
- if (n.__esModule) return n;
- var a = Object.defineProperty({}, '__esModule', {value: true});
- Object.keys(n).forEach(function (k) {
- var d = Object.getOwnPropertyDescriptor(n, k);
- Object.defineProperty(a, k, d.get ? d : {
- enumerable: true,
- get: function () {
- return n[k];
- }
- });
- });
- return a;
-}
-`;
-
-const FAILED_REQUIRE_ERROR = `throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');`;
-
-const HELPER_NON_DYNAMIC = `
-export function commonjsRequire (path) {
- ${FAILED_REQUIRE_ERROR}
-}
-`;
-
-const getDynamicHelpers = (ignoreDynamicRequires) => `
-export function createModule(modulePath) {
- return {
- path: modulePath,
- exports: {},
- require: function (path, base) {
- return commonjsRequire(path, base == null ? modulePath : base);
- }
- };
-}
-
-export function commonjsRegister (path, loader) {
- DYNAMIC_REQUIRE_LOADERS[path] = loader;
-}
-
-export function commonjsRegisterOrShort (path, to) {
- var resolvedPath = commonjsResolveImpl(path, null, true);
- if (resolvedPath !== null && DYNAMIC_REQUIRE_CACHE[resolvedPath]) {
- DYNAMIC_REQUIRE_CACHE[path] = DYNAMIC_REQUIRE_CACHE[resolvedPath];
- } else {
- DYNAMIC_REQUIRE_SHORTS[path] = to;
- }
-}
-
-var DYNAMIC_REQUIRE_LOADERS = Object.create(null);
-var DYNAMIC_REQUIRE_CACHE = Object.create(null);
-var DYNAMIC_REQUIRE_SHORTS = Object.create(null);
-var DEFAULT_PARENT_MODULE = {
- id: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []
-};
-var CHECKED_EXTENSIONS = ['', '.js', '.json'];
-
-function normalize (path) {
- path = path.replace(/\\\\/g, '/');
- var parts = path.split('/');
- var slashed = parts[0] === '';
- for (var i = 1; i < parts.length; i++) {
- if (parts[i] === '.' || parts[i] === '') {
- parts.splice(i--, 1);
- }
- }
- for (var i = 1; i < parts.length; i++) {
- if (parts[i] !== '..') continue;
- if (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {
- parts.splice(--i, 2);
- i--;
- }
- }
- path = parts.join('/');
- if (slashed && path[0] !== '/')
- path = '/' + path;
- else if (path.length === 0)
- path = '.';
- return path;
-}
-
-function join () {
- if (arguments.length === 0)
- return '.';
- var joined;
- for (var i = 0; i < arguments.length; ++i) {
- var arg = arguments[i];
- if (arg.length > 0) {
- if (joined === undefined)
- joined = arg;
- else
- joined += '/' + arg;
- }
- }
- if (joined === undefined)
- return '.';
-
- return joined;
-}
-
-function isPossibleNodeModulesPath (modulePath) {
- var c0 = modulePath[0];
- if (c0 === '/' || c0 === '\\\\') return false;
- var c1 = modulePath[1], c2 = modulePath[2];
- if ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\')) ||
- (c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\'))) return false;
- if (c1 === ':' && (c2 === '/' || c2 === '\\\\'))
- return false;
- return true;
-}
-
-function dirname (path) {
- if (path.length === 0)
- return '.';
-
- var i = path.length - 1;
- while (i > 0) {
- var c = path.charCodeAt(i);
- if ((c === 47 || c === 92) && i !== path.length - 1)
- break;
- i--;
- }
-
- if (i > 0)
- return path.substr(0, i);
-
- if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)
- return path.charAt(0);
-
- return '.';
-}
-
-export function commonjsResolveImpl (path, originalModuleDir, testCache) {
- var shouldTryNodeModules = isPossibleNodeModulesPath(path);
- path = normalize(path);
- var relPath;
- if (path[0] === '/') {
- originalModuleDir = '/';
- }
- while (true) {
- if (!shouldTryNodeModules) {
- relPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;
- } else if (originalModuleDir) {
- relPath = normalize(originalModuleDir + '/node_modules/' + path);
- } else {
- relPath = normalize(join('node_modules', path));
- }
-
- if (relPath.endsWith('/..')) {
- break; // Travelled too far up, avoid infinite loop
- }
-
- for (var extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {
- var resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];
- if (DYNAMIC_REQUIRE_CACHE[resolvedPath]) {
- return resolvedPath;
- }
- if (DYNAMIC_REQUIRE_SHORTS[resolvedPath]) {
- return resolvedPath;
- }
- if (DYNAMIC_REQUIRE_LOADERS[resolvedPath]) {
- return resolvedPath;
- }
- }
- if (!shouldTryNodeModules) break;
- var nextDir = normalize(originalModuleDir + '/..');
- if (nextDir === originalModuleDir) break;
- originalModuleDir = nextDir;
- }
- return null;
-}
-
-export function commonjsResolve (path, originalModuleDir) {
- var resolvedPath = commonjsResolveImpl(path, originalModuleDir);
- if (resolvedPath !== null) {
- return resolvedPath;
- }
- return require.resolve(path);
-}
-
-export function commonjsRequire (path, originalModuleDir) {
- var resolvedPath = commonjsResolveImpl(path, originalModuleDir, true);
- if (resolvedPath !== null) {
- var cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];
- if (cachedModule) return cachedModule.exports;
- var shortTo = DYNAMIC_REQUIRE_SHORTS[resolvedPath];
- if (shortTo) {
- cachedModule = DYNAMIC_REQUIRE_CACHE[shortTo];
- if (cachedModule)
- return cachedModule.exports;
- resolvedPath = commonjsResolveImpl(shortTo, null, true);
- }
- var loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];
- if (loader) {
- DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {
- id: resolvedPath,
- filename: resolvedPath,
- path: dirname(resolvedPath),
- exports: {},
- parent: DEFAULT_PARENT_MODULE,
- loaded: false,
- children: [],
- paths: [],
- require: function (path, base) {
- return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);
- }
- };
- try {
- loader.call(commonjsGlobal, cachedModule, cachedModule.exports);
- } catch (error) {
- delete DYNAMIC_REQUIRE_CACHE[resolvedPath];
- throw error;
- }
- cachedModule.loaded = true;
- return cachedModule.exports;
- };
- }
- ${ignoreDynamicRequires ? 'return require(path);' : FAILED_REQUIRE_ERROR}
-}
-
-commonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;
-commonjsRequire.resolve = commonjsResolve;
-`;
-
-function getHelpersModule(isDynamicRequireModulesEnabled, ignoreDynamicRequires) {
- return `${HELPERS}${
- isDynamicRequireModulesEnabled ? getDynamicHelpers(ignoreDynamicRequires) : HELPER_NON_DYNAMIC
- }`;
-}
-
-/* eslint-disable import/prefer-default-export */
-
-function deconflict(scopes, globals, identifier) {
- let i = 1;
- let deconflicted = pluginutils.makeLegalIdentifier(identifier);
- const hasConflicts = () =>
- scopes.some((scope) => scope.contains(deconflicted)) || globals.has(deconflicted);
-
- while (hasConflicts()) {
- deconflicted = pluginutils.makeLegalIdentifier(`${identifier}_${i}`);
- i += 1;
- }
-
- for (const scope of scopes) {
- scope.declarations[deconflicted] = true;
- }
-
- return deconflicted;
-}
-
-function getName(id) {
- const name = pluginutils.makeLegalIdentifier(path.basename(id, path.extname(id)));
- if (name !== 'index') {
- return name;
- }
- return pluginutils.makeLegalIdentifier(path.basename(path.dirname(id)));
-}
-
-function normalizePathSlashes(path) {
- return path.replace(/\\/g, '/');
-}
-
-const VIRTUAL_PATH_BASE = '/$$rollup_base$$';
-const getVirtualPathForDynamicRequirePath = (path, commonDir) => {
- const normalizedPath = normalizePathSlashes(path);
- return normalizedPath.startsWith(commonDir)
- ? VIRTUAL_PATH_BASE + normalizedPath.slice(commonDir.length)
- : normalizedPath;
-};
-
-function getPackageEntryPoint(dirPath) {
- let entryPoint = 'index.js';
-
- try {
- if (fs.existsSync(path.join(dirPath, 'package.json'))) {
- entryPoint =
- JSON.parse(fs.readFileSync(path.join(dirPath, 'package.json'), { encoding: 'utf8' })).main ||
- entryPoint;
- }
- } catch (ignored) {
- // ignored
- }
-
- return entryPoint;
-}
-
-function getDynamicPackagesModule(dynamicRequireModuleDirPaths, commonDir) {
- let code = `const commonjsRegisterOrShort = require('${HELPERS_ID}?commonjsRegisterOrShort');`;
- for (const dir of dynamicRequireModuleDirPaths) {
- const entryPoint = getPackageEntryPoint(dir);
-
- code += `\ncommonjsRegisterOrShort(${JSON.stringify(
- getVirtualPathForDynamicRequirePath(dir, commonDir)
- )}, ${JSON.stringify(getVirtualPathForDynamicRequirePath(path.join(dir, entryPoint), commonDir))});`;
- }
- return code;
-}
-
-function getDynamicPackagesEntryIntro(
- dynamicRequireModuleDirPaths,
- dynamicRequireModuleSet
-) {
- let dynamicImports = Array.from(
- dynamicRequireModuleSet,
- (dynamicId) => `require(${JSON.stringify(wrapId(dynamicId, DYNAMIC_REGISTER_SUFFIX))});`
- ).join('\n');
-
- if (dynamicRequireModuleDirPaths.length) {
- dynamicImports += `require(${JSON.stringify(
- wrapId(DYNAMIC_PACKAGES_ID, DYNAMIC_REGISTER_SUFFIX)
- )});`;
- }
-
- return dynamicImports;
-}
-
-function isDynamicModuleImport(id, dynamicRequireModuleSet) {
- const normalizedPath = normalizePathSlashes(id);
- return dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json');
-}
-
-function isDirectory(path) {
- try {
- if (fs.statSync(path).isDirectory()) return true;
- } catch (ignored) {
- // Nothing to do here
- }
- return false;
-}
-
-function getDynamicRequirePaths(patterns) {
- const dynamicRequireModuleSet = new Set();
- for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) {
- const isNegated = pattern.startsWith('!');
- const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);
- for (const path$1 of glob__default["default"].sync(isNegated ? pattern.substr(1) : pattern)) {
- modifySet(normalizePathSlashes(path.resolve(path$1)));
- if (isDirectory(path$1)) {
- modifySet(normalizePathSlashes(path.resolve(path.join(path$1, getPackageEntryPoint(path$1)))));
- }
- }
- }
- const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter((path) =>
- isDirectory(path)
- );
- return { dynamicRequireModuleSet, dynamicRequireModuleDirPaths };
-}
-
-function getCommonJSMetaPromise(commonJSMetaPromises, id) {
- let commonJSMetaPromise = commonJSMetaPromises.get(id);
- if (commonJSMetaPromise) return commonJSMetaPromise.promise;
-
- const promise = new Promise((resolve) => {
- commonJSMetaPromise = {
- resolve,
- promise: null
- };
- commonJSMetaPromises.set(id, commonJSMetaPromise);
- });
- commonJSMetaPromise.promise = promise;
-
- return promise;
-}
-
-function setCommonJSMetaPromise(commonJSMetaPromises, id, commonjsMeta) {
- const commonJSMetaPromise = commonJSMetaPromises.get(id);
- if (commonJSMetaPromise) {
- if (commonJSMetaPromise.resolve) {
- commonJSMetaPromise.resolve(commonjsMeta);
- commonJSMetaPromise.resolve = null;
- }
- } else {
- commonJSMetaPromises.set(id, { promise: Promise.resolve(commonjsMeta), resolve: null });
- }
-}
-
-// e.g. id === "commonjsHelpers?commonjsRegister"
-function getSpecificHelperProxy(id) {
- return `export {${id.split('?')[1]} as default} from "${HELPERS_ID}";`;
-}
-
-function getUnknownRequireProxy(id, requireReturnsDefault) {
- if (requireReturnsDefault === true || id.endsWith('.json')) {
- return `export {default} from ${JSON.stringify(id)};`;
- }
- const name = getName(id);
- const exported =
- requireReturnsDefault === 'auto'
- ? `import {getDefaultExportFromNamespaceIfNotNamed} from "${HELPERS_ID}"; export default /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(${name});`
- : requireReturnsDefault === 'preferred'
- ? `import {getDefaultExportFromNamespaceIfPresent} from "${HELPERS_ID}"; export default /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(${name});`
- : !requireReturnsDefault
- ? `import {getAugmentedNamespace} from "${HELPERS_ID}"; export default /*@__PURE__*/getAugmentedNamespace(${name});`
- : `export default ${name};`;
- return `import * as ${name} from ${JSON.stringify(id)}; ${exported}`;
-}
-
-function getDynamicJsonProxy(id, commonDir) {
- const normalizedPath = normalizePathSlashes(id.slice(DYNAMIC_JSON_PREFIX.length));
- return `const commonjsRegister = require('${HELPERS_ID}?commonjsRegister');\ncommonjsRegister(${JSON.stringify(
- getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)
- )}, function (module, exports) {
- module.exports = require(${JSON.stringify(normalizedPath)});
-});`;
-}
-
-function getDynamicRequireProxy(normalizedPath, commonDir) {
- return `const commonjsRegister = require('${HELPERS_ID}?commonjsRegister');\ncommonjsRegister(${JSON.stringify(
- getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)
- )}, function (module, exports) {
- ${fs.readFileSync(normalizedPath, { encoding: 'utf8' })}
-});`;
-}
-
-async function getStaticRequireProxy(
- id,
- requireReturnsDefault,
- esModulesWithDefaultExport,
- esModulesWithNamedExports,
- commonJsMetaPromises
-) {
- const name = getName(id);
- const commonjsMeta = await getCommonJSMetaPromise(commonJsMetaPromises, id);
- if (commonjsMeta && commonjsMeta.isCommonJS) {
- return `export { __moduleExports as default } from ${JSON.stringify(id)};`;
- } else if (commonjsMeta === null) {
- return getUnknownRequireProxy(id, requireReturnsDefault);
- } else if (!requireReturnsDefault) {
- return `import { getAugmentedNamespace } from "${HELPERS_ID}"; import * as ${name} from ${JSON.stringify(
- id
- )}; export default /*@__PURE__*/getAugmentedNamespace(${name});`;
- } else if (
- requireReturnsDefault !== true &&
- (requireReturnsDefault === 'namespace' ||
- !esModulesWithDefaultExport.has(id) ||
- (requireReturnsDefault === 'auto' && esModulesWithNamedExports.has(id)))
- ) {
- return `import * as ${name} from ${JSON.stringify(id)}; export default ${name};`;
- }
- return `export { default } from ${JSON.stringify(id)};`;
-}
-
-/* eslint-disable no-param-reassign, no-undefined */
-
-function getCandidatesForExtension(resolved, extension) {
- return [resolved + extension, `${resolved}${path.sep}index${extension}`];
-}
-
-function getCandidates(resolved, extensions) {
- return extensions.reduce(
- (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)),
- [resolved]
- );
-}
-
-function getResolveId(extensions) {
- function resolveExtensions(importee, importer) {
- // not our problem
- if (importee[0] !== '.' || !importer) return undefined;
-
- const resolved = path.resolve(path.dirname(importer), importee);
- const candidates = getCandidates(resolved, extensions);
-
- for (let i = 0; i < candidates.length; i += 1) {
- try {
- const stats = fs.statSync(candidates[i]);
- if (stats.isFile()) return { id: candidates[i] };
- } catch (err) {
- /* noop */
- }
- }
-
- return undefined;
- }
-
- return function resolveId(importee, rawImporter, resolveOptions) {
- if (isWrappedId(importee, MODULE_SUFFIX) || isWrappedId(importee, EXPORTS_SUFFIX)) {
- return importee;
- }
-
- const importer =
- rawImporter && isWrappedId(rawImporter, DYNAMIC_REGISTER_SUFFIX)
- ? unwrapId(rawImporter, DYNAMIC_REGISTER_SUFFIX)
- : rawImporter;
-
- // Except for exports, proxies are only importing resolved ids,
- // no need to resolve again
- if (importer && isWrappedId(importer, PROXY_SUFFIX)) {
- return importee;
- }
-
- const isProxyModule = isWrappedId(importee, PROXY_SUFFIX);
- const isRequiredModule = isWrappedId(importee, REQUIRE_SUFFIX);
- let isModuleRegistration = false;
-
- if (isProxyModule) {
- importee = unwrapId(importee, PROXY_SUFFIX);
- } else if (isRequiredModule) {
- importee = unwrapId(importee, REQUIRE_SUFFIX);
-
- isModuleRegistration = isWrappedId(importee, DYNAMIC_REGISTER_SUFFIX);
- if (isModuleRegistration) {
- importee = unwrapId(importee, DYNAMIC_REGISTER_SUFFIX);
- }
- }
-
- if (
- importee.startsWith(HELPERS_ID) ||
- importee === DYNAMIC_PACKAGES_ID ||
- importee.startsWith(DYNAMIC_JSON_PREFIX)
- ) {
- return importee;
- }
-
- if (importee.startsWith('\0')) {
- return null;
- }
-
- return this.resolve(
- importee,
- importer,
- Object.assign({}, resolveOptions, {
- skipSelf: true,
- custom: Object.assign({}, resolveOptions.custom, {
- 'node-resolve': { isRequire: isProxyModule || isRequiredModule }
- })
- })
- ).then((resolved) => {
- if (!resolved) {
- resolved = resolveExtensions(importee, importer);
- }
- if (resolved && isProxyModule) {
- resolved.id = wrapId(resolved.id, resolved.external ? EXTERNAL_SUFFIX : PROXY_SUFFIX);
- resolved.external = false;
- } else if (resolved && isModuleRegistration) {
- resolved.id = wrapId(resolved.id, DYNAMIC_REGISTER_SUFFIX);
- } else if (!resolved && (isProxyModule || isRequiredModule)) {
- return { id: wrapId(importee, EXTERNAL_SUFFIX), external: false };
- }
- return resolved;
- });
- };
-}
-
-function validateRollupVersion(rollupVersion, peerDependencyVersion) {
- const [major, minor] = rollupVersion.split('.').map(Number);
- const versionRegexp = /\^(\d+\.\d+)\.\d+/g;
- let minMajor = Infinity;
- let minMinor = Infinity;
- let foundVersion;
- // eslint-disable-next-line no-cond-assign
- while ((foundVersion = versionRegexp.exec(peerDependencyVersion))) {
- const [foundMajor, foundMinor] = foundVersion[1].split('.').map(Number);
- if (foundMajor < minMajor) {
- minMajor = foundMajor;
- minMinor = foundMinor;
- }
- }
- if (major < minMajor || (major === minMajor && minor < minMinor)) {
- throw new Error(
- `Insufficient Rollup version: "@rollup/plugin-commonjs" requires at least rollup@${minMajor}.${minMinor} but found rollup@${rollupVersion}.`
- );
- }
-}
-
-const operators = {
- '==': (x) => equals(x.left, x.right, false),
-
- '!=': (x) => not(operators['=='](x)),
-
- '===': (x) => equals(x.left, x.right, true),
-
- '!==': (x) => not(operators['==='](x)),
-
- '!': (x) => isFalsy(x.argument),
-
- '&&': (x) => isTruthy(x.left) && isTruthy(x.right),
-
- '||': (x) => isTruthy(x.left) || isTruthy(x.right)
-};
-
-function not(value) {
- return value === null ? value : !value;
-}
-
-function equals(a, b, strict) {
- if (a.type !== b.type) return null;
- // eslint-disable-next-line eqeqeq
- if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;
- return null;
-}
-
-function isTruthy(node) {
- if (!node) return false;
- if (node.type === 'Literal') return !!node.value;
- if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);
- if (node.operator in operators) return operators[node.operator](node);
- return null;
-}
-
-function isFalsy(node) {
- return not(isTruthy(node));
-}
-
-function getKeypath(node) {
- const parts = [];
-
- while (node.type === 'MemberExpression') {
- if (node.computed) return null;
-
- parts.unshift(node.property.name);
- // eslint-disable-next-line no-param-reassign
- node = node.object;
- }
-
- if (node.type !== 'Identifier') return null;
-
- const { name } = node;
- parts.unshift(name);
-
- return { name, keypath: parts.join('.') };
-}
-
-const KEY_COMPILED_ESM = '__esModule';
-
-function isDefineCompiledEsm(node) {
- const definedProperty =
- getDefinePropertyCallName(node, 'exports') || getDefinePropertyCallName(node, 'module.exports');
- if (definedProperty && definedProperty.key === KEY_COMPILED_ESM) {
- return isTruthy(definedProperty.value);
- }
- return false;
-}
-
-function getDefinePropertyCallName(node, targetName) {
- const {
- callee: { object, property }
- } = node;
- if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;
- if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;
- if (node.arguments.length !== 3) return;
-
- const targetNames = targetName.split('.');
- const [target, key, value] = node.arguments;
- if (targetNames.length === 1) {
- if (target.type !== 'Identifier' || target.name !== targetNames[0]) {
- return;
- }
- }
-
- if (targetNames.length === 2) {
- if (
- target.type !== 'MemberExpression' ||
- target.object.name !== targetNames[0] ||
- target.property.name !== targetNames[1]
- ) {
- return;
- }
- }
-
- if (value.type !== 'ObjectExpression' || !value.properties) return;
-
- const valueProperty = value.properties.find((p) => p.key && p.key.name === 'value');
- if (!valueProperty || !valueProperty.value) return;
-
- // eslint-disable-next-line consistent-return
- return { key: key.value, value: valueProperty.value };
-}
-
-function isShorthandProperty(parent) {
- return parent && parent.type === 'Property' && parent.shorthand;
-}
-
-function hasDefineEsmProperty(node) {
- return node.properties.some((property) => {
- if (
- property.type === 'Property' &&
- property.key.type === 'Identifier' &&
- property.key.name === '__esModule' &&
- isTruthy(property.value)
- ) {
- return true;
- }
- return false;
- });
-}
-
-function wrapCode(magicString, uses, moduleName, exportsName) {
- const args = [];
- const passedArgs = [];
- if (uses.module) {
- args.push('module');
- passedArgs.push(moduleName);
- }
- if (uses.exports) {
- args.push('exports');
- passedArgs.push(exportsName);
- }
- magicString
- .trim()
- .prepend(`(function (${args.join(', ')}) {\n`)
- .append(`\n}(${passedArgs.join(', ')}));`);
-}
-
-function rewriteExportsAndGetExportsBlock(
- magicString,
- moduleName,
- exportsName,
- wrapped,
- moduleExportsAssignments,
- firstTopLevelModuleExportsAssignment,
- exportsAssignmentsByName,
- topLevelAssignments,
- defineCompiledEsmExpressions,
- deconflictedExportNames,
- code,
- HELPERS_NAME,
- exportMode,
- detectWrappedDefault,
- defaultIsModuleExports
-) {
- const exports = [];
- const exportDeclarations = [];
-
- if (exportMode === 'replace') {
- getExportsForReplacedModuleExports(
- magicString,
- exports,
- exportDeclarations,
- moduleExportsAssignments,
- firstTopLevelModuleExportsAssignment,
- exportsName
- );
- } else {
- exports.push(`${exportsName} as __moduleExports`);
- if (wrapped) {
- getExportsWhenWrapping(
- exportDeclarations,
- exportsName,
- detectWrappedDefault,
- HELPERS_NAME,
- defaultIsModuleExports
- );
- } else {
- getExports(
- magicString,
- exports,
- exportDeclarations,
- moduleExportsAssignments,
- exportsAssignmentsByName,
- deconflictedExportNames,
- topLevelAssignments,
- moduleName,
- exportsName,
- defineCompiledEsmExpressions,
- HELPERS_NAME,
- defaultIsModuleExports
- );
- }
- }
- if (exports.length) {
- exportDeclarations.push(`export { ${exports.join(', ')} };`);
- }
-
- return `\n\n${exportDeclarations.join('\n')}`;
-}
-
-function getExportsForReplacedModuleExports(
- magicString,
- exports,
- exportDeclarations,
- moduleExportsAssignments,
- firstTopLevelModuleExportsAssignment,
- exportsName
-) {
- for (const { left } of moduleExportsAssignments) {
- magicString.overwrite(left.start, left.end, exportsName);
- }
- magicString.prependRight(firstTopLevelModuleExportsAssignment.left.start, 'var ');
- exports.push(`${exportsName} as __moduleExports`);
- exportDeclarations.push(`export default ${exportsName};`);
-}
-
-function getExportsWhenWrapping(
- exportDeclarations,
- exportsName,
- detectWrappedDefault,
- HELPERS_NAME,
- defaultIsModuleExports
-) {
- exportDeclarations.push(
- `export default ${
- detectWrappedDefault && defaultIsModuleExports === 'auto'
- ? `/*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportsName})`
- : defaultIsModuleExports === false
- ? `${exportsName}.default`
- : exportsName
- };`
- );
-}
-
-function getExports(
- magicString,
- exports,
- exportDeclarations,
- moduleExportsAssignments,
- exportsAssignmentsByName,
- deconflictedExportNames,
- topLevelAssignments,
- moduleName,
- exportsName,
- defineCompiledEsmExpressions,
- HELPERS_NAME,
- defaultIsModuleExports
-) {
- let deconflictedDefaultExportName;
- // Collect and rewrite module.exports assignments
- for (const { left } of moduleExportsAssignments) {
- magicString.overwrite(left.start, left.end, `${moduleName}.exports`);
- }
-
- // Collect and rewrite named exports
- for (const [exportName, { nodes }] of exportsAssignmentsByName) {
- const deconflicted = deconflictedExportNames[exportName];
- let needsDeclaration = true;
- for (const node of nodes) {
- let replacement = `${deconflicted} = ${exportsName}.${exportName}`;
- if (needsDeclaration && topLevelAssignments.has(node)) {
- replacement = `var ${replacement}`;
- needsDeclaration = false;
- }
- magicString.overwrite(node.start, node.left.end, replacement);
- }
- if (needsDeclaration) {
- magicString.prepend(`var ${deconflicted};\n`);
- }
-
- if (exportName === 'default') {
- deconflictedDefaultExportName = deconflicted;
- } else {
- exports.push(exportName === deconflicted ? exportName : `${deconflicted} as ${exportName}`);
- }
- }
-
- // Collect and rewrite exports.__esModule assignments
- let isRestorableCompiledEsm = false;
- for (const expression of defineCompiledEsmExpressions) {
- isRestorableCompiledEsm = true;
- const moduleExportsExpression =
- expression.type === 'CallExpression' ? expression.arguments[0] : expression.left.object;
- magicString.overwrite(moduleExportsExpression.start, moduleExportsExpression.end, exportsName);
- }
-
- if (!isRestorableCompiledEsm || defaultIsModuleExports === true) {
- exportDeclarations.push(`export default ${exportsName};`);
- } else if (moduleExportsAssignments.length === 0 || defaultIsModuleExports === false) {
- exports.push(`${deconflictedDefaultExportName || exportsName} as default`);
- } else {
- exportDeclarations.push(
- `export default /*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportsName});`
- );
- }
-}
-
-function isRequireStatement(node, scope) {
- if (!node) return false;
- if (node.type !== 'CallExpression') return false;
-
- // Weird case of `require()` or `module.require()` without arguments
- if (node.arguments.length === 0) return false;
-
- return isRequire(node.callee, scope);
-}
-
-function isRequire(node, scope) {
- return (
- (node.type === 'Identifier' && node.name === 'require' && !scope.contains('require')) ||
- (node.type === 'MemberExpression' && isModuleRequire(node, scope))
- );
-}
-
-function isModuleRequire({ object, property }, scope) {
- return (
- object.type === 'Identifier' &&
- object.name === 'module' &&
- property.type === 'Identifier' &&
- property.name === 'require' &&
- !scope.contains('module')
- );
-}
-
-function isStaticRequireStatement(node, scope) {
- if (!isRequireStatement(node, scope)) return false;
- return !hasDynamicArguments(node);
-}
-
-function hasDynamicArguments(node) {
- return (
- node.arguments.length > 1 ||
- (node.arguments[0].type !== 'Literal' &&
- (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))
- );
-}
-
-const reservedMethod = { resolve: true, cache: true, main: true };
-
-function isNodeRequirePropertyAccess(parent) {
- return parent && parent.property && reservedMethod[parent.property.name];
-}
-
-function isIgnoredRequireStatement(requiredNode, ignoreRequire) {
- return ignoreRequire(requiredNode.arguments[0].value);
-}
-
-function getRequireStringArg(node) {
- return node.arguments[0].type === 'Literal'
- ? node.arguments[0].value
- : node.arguments[0].quasis[0].value.cooked;
-}
-
-function hasDynamicModuleForPath(source, id, dynamicRequireModuleSet) {
- if (!/^(?:\.{0,2}[/\\]|[A-Za-z]:[/\\])/.test(source)) {
- try {
- const resolvedPath = normalizePathSlashes(resolve.sync(source, { basedir: path.dirname(id) }));
- if (dynamicRequireModuleSet.has(resolvedPath)) {
- return true;
- }
- } catch (ex) {
- // Probably a node.js internal module
- return false;
- }
-
- return false;
- }
-
- for (const attemptExt of ['', '.js', '.json']) {
- const resolvedPath = normalizePathSlashes(path.resolve(path.dirname(id), source + attemptExt));
- if (dynamicRequireModuleSet.has(resolvedPath)) {
- return true;
- }
- }
-
- return false;
-}
-
-function getRequireHandlers() {
- const requiredSources = [];
- const requiredBySource = Object.create(null);
- const requiredByNode = new Map();
- const requireExpressionsWithUsedReturnValue = [];
-
- function addRequireStatement(sourceId, node, scope, usesReturnValue) {
- const required = getRequired(sourceId);
- requiredByNode.set(node, { scope, required });
- if (usesReturnValue) {
- required.nodesUsingRequired.push(node);
- requireExpressionsWithUsedReturnValue.push(node);
- }
- }
-
- function getRequired(sourceId) {
- if (!requiredBySource[sourceId]) {
- requiredSources.push(sourceId);
-
- requiredBySource[sourceId] = {
- source: sourceId,
- name: null,
- nodesUsingRequired: []
- };
- }
-
- return requiredBySource[sourceId];
- }
-
- function rewriteRequireExpressionsAndGetImportBlock(
- magicString,
- topLevelDeclarations,
- topLevelRequireDeclarators,
- reassignedNames,
- helpersName,
- dynamicRegisterSources,
- moduleName,
- exportsName,
- id,
- exportMode
- ) {
- setRemainingImportNamesAndRewriteRequires(
- requireExpressionsWithUsedReturnValue,
- requiredByNode,
- magicString
- );
- const imports = [];
- imports.push(`import * as ${helpersName} from "${HELPERS_ID}";`);
- if (exportMode === 'module') {
- imports.push(
- `import { __module as ${moduleName}, exports as ${exportsName} } from ${JSON.stringify(
- wrapId(id, MODULE_SUFFIX)
- )}`
- );
- } else if (exportMode === 'exports') {
- imports.push(
- `import { __exports as ${exportsName} } from ${JSON.stringify(wrapId(id, EXPORTS_SUFFIX))}`
- );
- }
- for (const source of dynamicRegisterSources) {
- imports.push(`import ${JSON.stringify(wrapId(source, REQUIRE_SUFFIX))};`);
- }
- for (const source of requiredSources) {
- if (!source.startsWith('\0')) {
- imports.push(`import ${JSON.stringify(wrapId(source, REQUIRE_SUFFIX))};`);
- }
- const { name, nodesUsingRequired } = requiredBySource[source];
- imports.push(
- `import ${nodesUsingRequired.length ? `${name} from ` : ''}${JSON.stringify(
- source.startsWith('\0') ? source : wrapId(source, PROXY_SUFFIX)
- )};`
- );
- }
- return imports.length ? `${imports.join('\n')}\n\n` : '';
- }
-
- return {
- addRequireStatement,
- requiredSources,
- rewriteRequireExpressionsAndGetImportBlock
- };
-}
-
-function setRemainingImportNamesAndRewriteRequires(
- requireExpressionsWithUsedReturnValue,
- requiredByNode,
- magicString
-) {
- let uid = 0;
- for (const requireExpression of requireExpressionsWithUsedReturnValue) {
- const { required } = requiredByNode.get(requireExpression);
- if (!required.name) {
- let potentialName;
- const isUsedName = (node) => requiredByNode.get(node).scope.contains(potentialName);
- do {
- potentialName = `require$$${uid}`;
- uid += 1;
- } while (required.nodesUsingRequired.some(isUsedName));
- required.name = potentialName;
- }
- magicString.overwrite(requireExpression.start, requireExpression.end, required.name);
- }
-}
-
-/* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */
-
-const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
-
-const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
-
-function transformCommonjs(
- parse,
- code,
- id,
- isEsModule,
- ignoreGlobal,
- ignoreRequire,
- ignoreDynamicRequires,
- getIgnoreTryCatchRequireStatementMode,
- sourceMap,
- isDynamicRequireModulesEnabled,
- dynamicRequireModuleSet,
- disableWrap,
- commonDir,
- astCache,
- defaultIsModuleExports
-) {
- const ast = astCache || tryParse(parse, code, id);
- const magicString = new MagicString__default["default"](code);
- const uses = {
- module: false,
- exports: false,
- global: false,
- require: false
- };
- let usesDynamicRequire = false;
- const virtualDynamicRequirePath =
- isDynamicRequireModulesEnabled && getVirtualPathForDynamicRequirePath(path.dirname(id), commonDir);
- let scope = pluginutils.attachScopes(ast, 'scope');
- let lexicalDepth = 0;
- let programDepth = 0;
- let currentTryBlockEnd = null;
- let shouldWrap = false;
-
- const globals = new Set();
-
- // TODO technically wrong since globals isn't populated yet, but ¯\_(ツ)_/¯
- const HELPERS_NAME = deconflict([scope], globals, 'commonjsHelpers');
- const dynamicRegisterSources = new Set();
- let hasRemovedRequire = false;
-
- const {
- addRequireStatement,
- requiredSources,
- rewriteRequireExpressionsAndGetImportBlock
- } = getRequireHandlers();
-
- // See which names are assigned to. This is necessary to prevent
- // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,
- // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)
- const reassignedNames = new Set();
- const topLevelDeclarations = [];
- const topLevelRequireDeclarators = new Set();
- const skippedNodes = new Set();
- const moduleAccessScopes = new Set([scope]);
- const exportsAccessScopes = new Set([scope]);
- const moduleExportsAssignments = [];
- let firstTopLevelModuleExportsAssignment = null;
- const exportsAssignmentsByName = new Map();
- const topLevelAssignments = new Set();
- const topLevelDefineCompiledEsmExpressions = [];
-
- estreeWalker.walk(ast, {
- enter(node, parent) {
- if (skippedNodes.has(node)) {
- this.skip();
- return;
- }
-
- if (currentTryBlockEnd !== null && node.start > currentTryBlockEnd) {
- currentTryBlockEnd = null;
- }
-
- programDepth += 1;
- if (node.scope) ({ scope } = node);
- if (functionType.test(node.type)) lexicalDepth += 1;
- if (sourceMap) {
- magicString.addSourcemapLocation(node.start);
- magicString.addSourcemapLocation(node.end);
- }
-
- // eslint-disable-next-line default-case
- switch (node.type) {
- case 'TryStatement':
- if (currentTryBlockEnd === null) {
- currentTryBlockEnd = node.block.end;
- }
- return;
- case 'AssignmentExpression':
- if (node.left.type === 'MemberExpression') {
- const flattened = getKeypath(node.left);
- if (!flattened || scope.contains(flattened.name)) return;
-
- const exportsPatternMatch = exportsPattern.exec(flattened.keypath);
- if (!exportsPatternMatch || flattened.keypath === 'exports') return;
-
- const [, exportName] = exportsPatternMatch;
- uses[flattened.name] = true;
-
- // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –
- if (flattened.keypath === 'module.exports') {
- moduleExportsAssignments.push(node);
- if (programDepth > 3) {
- moduleAccessScopes.add(scope);
- } else if (!firstTopLevelModuleExportsAssignment) {
- firstTopLevelModuleExportsAssignment = node;
- }
-
- if (defaultIsModuleExports === false) {
- shouldWrap = true;
- } else if (defaultIsModuleExports === 'auto') {
- if (node.right.type === 'ObjectExpression') {
- if (hasDefineEsmProperty(node.right)) {
- shouldWrap = true;
- }
- } else if (defaultIsModuleExports === false) {
- shouldWrap = true;
- }
- }
- } else if (exportName === KEY_COMPILED_ESM) {
- if (programDepth > 3) {
- shouldWrap = true;
- } else {
- topLevelDefineCompiledEsmExpressions.push(node);
- }
- } else {
- const exportsAssignments = exportsAssignmentsByName.get(exportName) || {
- nodes: [],
- scopes: new Set()
- };
- exportsAssignments.nodes.push(node);
- exportsAssignments.scopes.add(scope);
- exportsAccessScopes.add(scope);
- exportsAssignmentsByName.set(exportName, exportsAssignments);
- if (programDepth <= 3) {
- topLevelAssignments.add(node);
- }
- }
-
- skippedNodes.add(node.left);
- } else {
- for (const name of pluginutils.extractAssignedNames(node.left)) {
- reassignedNames.add(name);
- }
- }
- return;
- case 'CallExpression': {
- if (isDefineCompiledEsm(node)) {
- if (programDepth === 3 && parent.type === 'ExpressionStatement') {
- // skip special handling for [module.]exports until we know we render this
- skippedNodes.add(node.arguments[0]);
- topLevelDefineCompiledEsmExpressions.push(node);
- } else {
- shouldWrap = true;
- }
- return;
- }
-
- if (
- node.callee.object &&
- node.callee.object.name === 'require' &&
- node.callee.property.name === 'resolve' &&
- hasDynamicModuleForPath(id, '/', dynamicRequireModuleSet)
- ) {
- const requireNode = node.callee.object;
- magicString.appendLeft(
- node.end - 1,
- `,${JSON.stringify(
- path.dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath
- )}`
- );
- magicString.overwrite(
- requireNode.start,
- requireNode.end,
- `${HELPERS_NAME}.commonjsRequire`,
- {
- storeName: true
- }
- );
- return;
- }
-
- if (!isStaticRequireStatement(node, scope)) return;
- if (!isDynamicRequireModulesEnabled) {
- skippedNodes.add(node.callee);
- }
- if (!isIgnoredRequireStatement(node, ignoreRequire)) {
- skippedNodes.add(node.callee);
- const usesReturnValue = parent.type !== 'ExpressionStatement';
-
- let canConvertRequire = true;
- let shouldRemoveRequireStatement = false;
-
- if (currentTryBlockEnd !== null) {
- ({
- canConvertRequire,
- shouldRemoveRequireStatement
- } = getIgnoreTryCatchRequireStatementMode(node.arguments[0].value));
-
- if (shouldRemoveRequireStatement) {
- hasRemovedRequire = true;
- }
- }
-
- let sourceId = getRequireStringArg(node);
- const isDynamicRegister = isWrappedId(sourceId, DYNAMIC_REGISTER_SUFFIX);
- if (isDynamicRegister) {
- sourceId = unwrapId(sourceId, DYNAMIC_REGISTER_SUFFIX);
- if (sourceId.endsWith('.json')) {
- sourceId = DYNAMIC_JSON_PREFIX + sourceId;
- }
- dynamicRegisterSources.add(wrapId(sourceId, DYNAMIC_REGISTER_SUFFIX));
- } else {
- if (
- !sourceId.endsWith('.json') &&
- hasDynamicModuleForPath(sourceId, id, dynamicRequireModuleSet)
- ) {
- if (shouldRemoveRequireStatement) {
- magicString.overwrite(node.start, node.end, `undefined`);
- } else if (canConvertRequire) {
- magicString.overwrite(
- node.start,
- node.end,
- `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(
- getVirtualPathForDynamicRequirePath(sourceId, commonDir)
- )}, ${JSON.stringify(
- path.dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath
- )})`
- );
- usesDynamicRequire = true;
- }
- return;
- }
-
- if (canConvertRequire) {
- addRequireStatement(sourceId, node, scope, usesReturnValue);
- }
- }
-
- if (usesReturnValue) {
- if (shouldRemoveRequireStatement) {
- magicString.overwrite(node.start, node.end, `undefined`);
- return;
- }
-
- if (
- parent.type === 'VariableDeclarator' &&
- !scope.parent &&
- parent.id.type === 'Identifier'
- ) {
- // This will allow us to reuse this variable name as the imported variable if it is not reassigned
- // and does not conflict with variables in other places where this is imported
- topLevelRequireDeclarators.add(parent);
- }
- } else {
- // This is a bare import, e.g. `require('foo');`
-
- if (!canConvertRequire && !shouldRemoveRequireStatement) {
- return;
- }
-
- magicString.remove(parent.start, parent.end);
- }
- }
- return;
- }
- case 'ConditionalExpression':
- case 'IfStatement':
- // skip dead branches
- if (isFalsy(node.test)) {
- skippedNodes.add(node.consequent);
- } else if (node.alternate && isTruthy(node.test)) {
- skippedNodes.add(node.alternate);
- }
- return;
- case 'Identifier': {
- const { name } = node;
- if (!(isReference__default["default"](node, parent) && !scope.contains(name))) return;
- switch (name) {
- case 'require':
- if (isNodeRequirePropertyAccess(parent)) {
- if (hasDynamicModuleForPath(id, '/', dynamicRequireModuleSet)) {
- if (parent.property.name === 'cache') {
- magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
- storeName: true
- });
- }
- }
-
- return;
- }
-
- if (isDynamicRequireModulesEnabled && isRequireStatement(parent, scope)) {
- magicString.appendLeft(
- parent.end - 1,
- `,${JSON.stringify(
- path.dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath
- )}`
- );
- }
- if (!ignoreDynamicRequires) {
- if (isShorthandProperty(parent)) {
- magicString.appendRight(node.end, `: ${HELPERS_NAME}.commonjsRequire`);
- } else {
- magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
- storeName: true
- });
- }
- }
- usesDynamicRequire = true;
- return;
- case 'module':
- case 'exports':
- shouldWrap = true;
- uses[name] = true;
- return;
- case 'global':
- uses.global = true;
- if (!ignoreGlobal) {
- magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
- storeName: true
- });
- }
- return;
- case 'define':
- magicString.overwrite(node.start, node.end, 'undefined', {
- storeName: true
- });
- return;
- default:
- globals.add(name);
- return;
- }
- }
- case 'MemberExpression':
- if (!isDynamicRequireModulesEnabled && isModuleRequire(node, scope)) {
- magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
- storeName: true
- });
- skippedNodes.add(node.object);
- skippedNodes.add(node.property);
- }
- return;
- case 'ReturnStatement':
- // if top-level return, we need to wrap it
- if (lexicalDepth === 0) {
- shouldWrap = true;
- }
- return;
- case 'ThisExpression':
- // rewrite top-level `this` as `commonjsHelpers.commonjsGlobal`
- if (lexicalDepth === 0) {
- uses.global = true;
- if (!ignoreGlobal) {
- magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
- storeName: true
- });
- }
- }
- return;
- case 'UnaryExpression':
- // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)
- if (node.operator === 'typeof') {
- const flattened = getKeypath(node.argument);
- if (!flattened) return;
-
- if (scope.contains(flattened.name)) return;
-
- if (
- flattened.keypath === 'module.exports' ||
- flattened.keypath === 'module' ||
- flattened.keypath === 'exports'
- ) {
- magicString.overwrite(node.start, node.end, `'object'`, {
- storeName: false
- });
- }
- }
- return;
- case 'VariableDeclaration':
- if (!scope.parent) {
- topLevelDeclarations.push(node);
- }
- }
- },
-
- leave(node) {
- programDepth -= 1;
- if (node.scope) scope = scope.parent;
- if (functionType.test(node.type)) lexicalDepth -= 1;
- }
- });
-
- const nameBase = getName(id);
- const exportsName = deconflict([...exportsAccessScopes], globals, nameBase);
- const moduleName = deconflict([...moduleAccessScopes], globals, `${nameBase}Module`);
- const deconflictedExportNames = Object.create(null);
- for (const [exportName, { scopes }] of exportsAssignmentsByName) {
- deconflictedExportNames[exportName] = deconflict([...scopes], globals, exportName);
- }
-
- // We cannot wrap ES/mixed modules
- shouldWrap =
- !isEsModule &&
- !disableWrap &&
- (shouldWrap || (uses.exports && moduleExportsAssignments.length > 0));
- const detectWrappedDefault =
- shouldWrap &&
- (topLevelDefineCompiledEsmExpressions.length > 0 || code.indexOf('__esModule') >= 0);
-
- if (
- !(
- requiredSources.length ||
- dynamicRegisterSources.size ||
- uses.module ||
- uses.exports ||
- uses.require ||
- usesDynamicRequire ||
- hasRemovedRequire ||
- topLevelDefineCompiledEsmExpressions.length > 0
- ) &&
- (ignoreGlobal || !uses.global)
- ) {
- return { meta: { commonjs: { isCommonJS: false } } };
- }
-
- let leadingComment = '';
- if (code.startsWith('/*')) {
- const commentEnd = code.indexOf('*/', 2) + 2;
- leadingComment = `${code.slice(0, commentEnd)}\n`;
- magicString.remove(0, commentEnd).trim();
- }
-
- const exportMode = shouldWrap
- ? uses.module
- ? 'module'
- : 'exports'
- : firstTopLevelModuleExportsAssignment
- ? exportsAssignmentsByName.size === 0 && topLevelDefineCompiledEsmExpressions.length === 0
- ? 'replace'
- : 'module'
- : moduleExportsAssignments.length === 0
- ? 'exports'
- : 'module';
-
- const importBlock = rewriteRequireExpressionsAndGetImportBlock(
- magicString,
- topLevelDeclarations,
- topLevelRequireDeclarators,
- reassignedNames,
- HELPERS_NAME,
- dynamicRegisterSources,
- moduleName,
- exportsName,
- id,
- exportMode
- );
-
- const exportBlock = isEsModule
- ? ''
- : rewriteExportsAndGetExportsBlock(
- magicString,
- moduleName,
- exportsName,
- shouldWrap,
- moduleExportsAssignments,
- firstTopLevelModuleExportsAssignment,
- exportsAssignmentsByName,
- topLevelAssignments,
- topLevelDefineCompiledEsmExpressions,
- deconflictedExportNames,
- code,
- HELPERS_NAME,
- exportMode,
- detectWrappedDefault,
- defaultIsModuleExports
- );
-
- if (shouldWrap) {
- wrapCode(magicString, uses, moduleName, exportsName);
- }
-
- magicString
- .trim()
- .prepend(leadingComment + importBlock)
- .append(exportBlock);
-
- return {
- code: magicString.toString(),
- map: sourceMap ? magicString.generateMap() : null,
- syntheticNamedExports: isEsModule ? false : '__moduleExports',
- meta: { commonjs: { isCommonJS: !isEsModule } }
- };
-}
-
-function commonjs(options = {}) {
- const extensions = options.extensions || ['.js'];
- const filter = pluginutils.createFilter(options.include, options.exclude);
- const {
- ignoreGlobal,
- ignoreDynamicRequires,
- requireReturnsDefault: requireReturnsDefaultOption,
- esmExternals
- } = options;
- const getRequireReturnsDefault =
- typeof requireReturnsDefaultOption === 'function'
- ? requireReturnsDefaultOption
- : () => requireReturnsDefaultOption;
- let esmExternalIds;
- const isEsmExternal =
- typeof esmExternals === 'function'
- ? esmExternals
- : Array.isArray(esmExternals)
- ? ((esmExternalIds = new Set(esmExternals)), (id) => esmExternalIds.has(id))
- : () => esmExternals;
- const defaultIsModuleExports =
- typeof options.defaultIsModuleExports === 'boolean' ? options.defaultIsModuleExports : 'auto';
-
- const { dynamicRequireModuleSet, dynamicRequireModuleDirPaths } = getDynamicRequirePaths(
- options.dynamicRequireTargets
- );
- const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;
- const commonDir = isDynamicRequireModulesEnabled
- ? getCommonDir__default["default"](null, Array.from(dynamicRequireModuleSet).concat(process.cwd()))
- : null;
-
- const esModulesWithDefaultExport = new Set();
- const esModulesWithNamedExports = new Set();
- const commonJsMetaPromises = new Map();
-
- const ignoreRequire =
- typeof options.ignore === 'function'
- ? options.ignore
- : Array.isArray(options.ignore)
- ? (id) => options.ignore.includes(id)
- : () => false;
-
- const getIgnoreTryCatchRequireStatementMode = (id) => {
- const mode =
- typeof options.ignoreTryCatch === 'function'
- ? options.ignoreTryCatch(id)
- : Array.isArray(options.ignoreTryCatch)
- ? options.ignoreTryCatch.includes(id)
- : typeof options.ignoreTryCatch !== 'undefined'
- ? options.ignoreTryCatch
- : true;
-
- return {
- canConvertRequire: mode !== 'remove' && mode !== true,
- shouldRemoveRequireStatement: mode === 'remove'
- };
- };
-
- const resolveId = getResolveId(extensions);
-
- const sourceMap = options.sourceMap !== false;
-
- function transformAndCheckExports(code, id) {
- if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {
- // eslint-disable-next-line no-param-reassign
- code =
- getDynamicPackagesEntryIntro(dynamicRequireModuleDirPaths, dynamicRequireModuleSet) + code;
- }
-
- const { isEsModule, hasDefaultExport, hasNamedExports, ast } = analyzeTopLevelStatements(
- this.parse,
- code,
- id
- );
- if (hasDefaultExport) {
- esModulesWithDefaultExport.add(id);
- }
- if (hasNamedExports) {
- esModulesWithNamedExports.add(id);
- }
-
- if (
- !dynamicRequireModuleSet.has(normalizePathSlashes(id)) &&
- (!hasCjsKeywords(code, ignoreGlobal) || (isEsModule && !options.transformMixedEsModules))
- ) {
- return { meta: { commonjs: { isCommonJS: false } } };
- }
-
- // avoid wrapping as this is a commonjsRegister call
- const disableWrap = isWrappedId(id, DYNAMIC_REGISTER_SUFFIX);
- if (disableWrap) {
- // eslint-disable-next-line no-param-reassign
- id = unwrapId(id, DYNAMIC_REGISTER_SUFFIX);
- }
-
- return transformCommonjs(
- this.parse,
- code,
- id,
- isEsModule,
- ignoreGlobal || isEsModule,
- ignoreRequire,
- ignoreDynamicRequires && !isDynamicRequireModulesEnabled,
- getIgnoreTryCatchRequireStatementMode,
- sourceMap,
- isDynamicRequireModulesEnabled,
- dynamicRequireModuleSet,
- disableWrap,
- commonDir,
- ast,
- defaultIsModuleExports
- );
- }
-
- return {
- name: 'commonjs',
-
- buildStart() {
- validateRollupVersion(this.meta.rollupVersion, peerDependencies.rollup);
- if (options.namedExports != null) {
- this.warn(
- 'The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.'
- );
- }
- },
-
- resolveId,
-
- load(id) {
- if (id === HELPERS_ID) {
- return getHelpersModule(isDynamicRequireModulesEnabled, ignoreDynamicRequires);
- }
-
- if (id.startsWith(HELPERS_ID)) {
- return getSpecificHelperProxy(id);
- }
-
- if (isWrappedId(id, MODULE_SUFFIX)) {
- const actualId = unwrapId(id, MODULE_SUFFIX);
- let name = getName(actualId);
- let code;
- if (isDynamicRequireModulesEnabled) {
- if (['modulePath', 'commonjsRequire', 'createModule'].includes(name)) {
- name = `${name}_`;
- }
- code =
- `import {commonjsRequire, createModule} from "${HELPERS_ID}";\n` +
- `var ${name} = createModule(${JSON.stringify(
- getVirtualPathForDynamicRequirePath(path.dirname(actualId), commonDir)
- )});\n` +
- `export {${name} as __module}`;
- } else {
- code = `var ${name} = {exports: {}}; export {${name} as __module}`;
- }
- return {
- code,
- syntheticNamedExports: '__module',
- meta: { commonjs: { isCommonJS: false } }
- };
- }
-
- if (isWrappedId(id, EXPORTS_SUFFIX)) {
- const actualId = unwrapId(id, EXPORTS_SUFFIX);
- const name = getName(actualId);
- return {
- code: `var ${name} = {}; export {${name} as __exports}`,
- meta: { commonjs: { isCommonJS: false } }
- };
- }
-
- if (isWrappedId(id, EXTERNAL_SUFFIX)) {
- const actualId = unwrapId(id, EXTERNAL_SUFFIX);
- return getUnknownRequireProxy(
- actualId,
- isEsmExternal(actualId) ? getRequireReturnsDefault(actualId) : true
- );
- }
-
- if (id === DYNAMIC_PACKAGES_ID) {
- return getDynamicPackagesModule(dynamicRequireModuleDirPaths, commonDir);
- }
-
- if (id.startsWith(DYNAMIC_JSON_PREFIX)) {
- return getDynamicJsonProxy(id, commonDir);
- }
-
- if (isDynamicModuleImport(id, dynamicRequireModuleSet)) {
- return `export default require(${JSON.stringify(normalizePathSlashes(id))});`;
- }
-
- if (isWrappedId(id, DYNAMIC_REGISTER_SUFFIX)) {
- return getDynamicRequireProxy(
- normalizePathSlashes(unwrapId(id, DYNAMIC_REGISTER_SUFFIX)),
- commonDir
- );
- }
-
- if (isWrappedId(id, PROXY_SUFFIX)) {
- const actualId = unwrapId(id, PROXY_SUFFIX);
- return getStaticRequireProxy(
- actualId,
- getRequireReturnsDefault(actualId),
- esModulesWithDefaultExport,
- esModulesWithNamedExports,
- commonJsMetaPromises
- );
- }
-
- return null;
- },
-
- transform(code, rawId) {
- let id = rawId;
-
- if (isWrappedId(id, DYNAMIC_REGISTER_SUFFIX)) {
- id = unwrapId(id, DYNAMIC_REGISTER_SUFFIX);
- }
-
- const extName = path.extname(id);
- if (
- extName !== '.cjs' &&
- id !== DYNAMIC_PACKAGES_ID &&
- !id.startsWith(DYNAMIC_JSON_PREFIX) &&
- (!filter(id) || !extensions.includes(extName))
- ) {
- return null;
- }
-
- try {
- return transformAndCheckExports.call(this, code, rawId);
- } catch (err) {
- return this.error(err, err.loc);
- }
- },
-
- moduleParsed({ id, meta: { commonjs: commonjsMeta } }) {
- if (commonjsMeta && commonjsMeta.isCommonJS != null) {
- setCommonJSMetaPromise(commonJsMetaPromises, id, commonjsMeta);
- return;
- }
- setCommonJSMetaPromise(commonJsMetaPromises, id, null);
- }
- };
-}
-
-module.exports = commonjs;
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@rollup/plugin-commonjs/dist/index.js.map b/node_modules/@rollup/plugin-commonjs/dist/index.js.map
deleted file mode 100644
index 78623c4..0000000
--- a/node_modules/@rollup/plugin-commonjs/dist/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../src/parse.js","../src/analyze-top-level-statements.js","../src/helpers.js","../src/utils.js","../src/dynamic-packages-manager.js","../src/dynamic-require-paths.js","../src/is-cjs.js","../src/proxies.js","../src/resolve-id.js","../src/rollup-version.js","../src/ast-utils.js","../src/generate-exports.js","../src/generate-imports.js","../src/transform-commonjs.js","../src/index.js"],"sourcesContent":["export function tryParse(parse, code, id) {\n try {\n return parse(code, { allowReturnOutsideFunction: true });\n } catch (err) {\n err.message += ` in ${id}`;\n throw err;\n }\n}\n\nconst firstpassGlobal = /\\b(?:require|module|exports|global)\\b/;\n\nconst firstpassNoGlobal = /\\b(?:require|module|exports)\\b/;\n\nexport function hasCjsKeywords(code, ignoreGlobal) {\n const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;\n return firstpass.test(code);\n}\n","/* eslint-disable no-underscore-dangle */\n\nimport { tryParse } from './parse';\n\nexport default function analyzeTopLevelStatements(parse, code, id) {\n const ast = tryParse(parse, code, id);\n\n let isEsModule = false;\n let hasDefaultExport = false;\n let hasNamedExports = false;\n\n for (const node of ast.body) {\n switch (node.type) {\n case 'ExportDefaultDeclaration':\n isEsModule = true;\n hasDefaultExport = true;\n break;\n case 'ExportNamedDeclaration':\n isEsModule = true;\n if (node.declaration) {\n hasNamedExports = true;\n } else {\n for (const specifier of node.specifiers) {\n if (specifier.exported.name === 'default') {\n hasDefaultExport = true;\n } else {\n hasNamedExports = true;\n }\n }\n }\n break;\n case 'ExportAllDeclaration':\n isEsModule = true;\n if (node.exported && node.exported.name === 'default') {\n hasDefaultExport = true;\n } else {\n hasNamedExports = true;\n }\n break;\n case 'ImportDeclaration':\n isEsModule = true;\n break;\n default:\n }\n }\n\n return { isEsModule, hasDefaultExport, hasNamedExports, ast };\n}\n","export const isWrappedId = (id, suffix) => id.endsWith(suffix);\nexport const wrapId = (id, suffix) => `\\0${id}${suffix}`;\nexport const unwrapId = (wrappedId, suffix) => wrappedId.slice(1, -suffix.length);\n\nexport const PROXY_SUFFIX = '?commonjs-proxy';\nexport const REQUIRE_SUFFIX = '?commonjs-require';\nexport const EXTERNAL_SUFFIX = '?commonjs-external';\nexport const EXPORTS_SUFFIX = '?commonjs-exports';\nexport const MODULE_SUFFIX = '?commonjs-module';\n\nexport const DYNAMIC_REGISTER_SUFFIX = '?commonjs-dynamic-register';\nexport const DYNAMIC_JSON_PREFIX = '\\0commonjs-dynamic-json:';\nexport const DYNAMIC_PACKAGES_ID = '\\0commonjs-dynamic-packages';\n\nexport const HELPERS_ID = '\\0commonjsHelpers.js';\n\n// `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.\n// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.\n// This will no longer be necessary once Rollup switches to ES6 output, likely\n// in Rollup 3\n\nconst HELPERS = `\nexport var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nexport function getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nexport function getDefaultExportFromNamespaceIfPresent (n) {\n\treturn n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;\n}\n\nexport function getDefaultExportFromNamespaceIfNotNamed (n) {\n\treturn n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;\n}\n\nexport function getAugmentedNamespace(n) {\n\tif (n.__esModule) return n;\n\tvar a = Object.defineProperty({}, '__esModule', {value: true});\n\tObject.keys(n).forEach(function (k) {\n\t\tvar d = Object.getOwnPropertyDescriptor(n, k);\n\t\tObject.defineProperty(a, k, d.get ? d : {\n\t\t\tenumerable: true,\n\t\t\tget: function () {\n\t\t\t\treturn n[k];\n\t\t\t}\n\t\t});\n\t});\n\treturn a;\n}\n`;\n\nconst FAILED_REQUIRE_ERROR = `throw new Error('Could not dynamically require \"' + path + '\". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');`;\n\nconst HELPER_NON_DYNAMIC = `\nexport function commonjsRequire (path) {\n\t${FAILED_REQUIRE_ERROR}\n}\n`;\n\nconst getDynamicHelpers = (ignoreDynamicRequires) => `\nexport function createModule(modulePath) {\n\treturn {\n\t\tpath: modulePath,\n\t\texports: {},\n\t\trequire: function (path, base) {\n\t\t\treturn commonjsRequire(path, base == null ? modulePath : base);\n\t\t}\n\t};\n}\n\nexport function commonjsRegister (path, loader) {\n\tDYNAMIC_REQUIRE_LOADERS[path] = loader;\n}\n\nexport function commonjsRegisterOrShort (path, to) {\n\tvar resolvedPath = commonjsResolveImpl(path, null, true);\n\tif (resolvedPath !== null && DYNAMIC_REQUIRE_CACHE[resolvedPath]) {\n\t DYNAMIC_REQUIRE_CACHE[path] = DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t} else {\n\t DYNAMIC_REQUIRE_SHORTS[path] = to;\n\t}\n}\n\nvar DYNAMIC_REQUIRE_LOADERS = Object.create(null);\nvar DYNAMIC_REQUIRE_CACHE = Object.create(null);\nvar DYNAMIC_REQUIRE_SHORTS = Object.create(null);\nvar DEFAULT_PARENT_MODULE = {\n\tid: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []\n};\nvar CHECKED_EXTENSIONS = ['', '.js', '.json'];\n\nfunction normalize (path) {\n\tpath = path.replace(/\\\\\\\\/g, '/');\n\tvar parts = path.split('/');\n\tvar slashed = parts[0] === '';\n\tfor (var i = 1; i < parts.length; i++) {\n\t\tif (parts[i] === '.' || parts[i] === '') {\n\t\t\tparts.splice(i--, 1);\n\t\t}\n\t}\n\tfor (var i = 1; i < parts.length; i++) {\n\t\tif (parts[i] !== '..') continue;\n\t\tif (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {\n\t\t\tparts.splice(--i, 2);\n\t\t\ti--;\n\t\t}\n\t}\n\tpath = parts.join('/');\n\tif (slashed && path[0] !== '/')\n\t path = '/' + path;\n\telse if (path.length === 0)\n\t path = '.';\n\treturn path;\n}\n\nfunction join () {\n\tif (arguments.length === 0)\n\t return '.';\n\tvar joined;\n\tfor (var i = 0; i < arguments.length; ++i) {\n\t var arg = arguments[i];\n\t if (arg.length > 0) {\n\t\tif (joined === undefined)\n\t\t joined = arg;\n\t\telse\n\t\t joined += '/' + arg;\n\t }\n\t}\n\tif (joined === undefined)\n\t return '.';\n\n\treturn joined;\n}\n\nfunction isPossibleNodeModulesPath (modulePath) {\n\tvar c0 = modulePath[0];\n\tif (c0 === '/' || c0 === '\\\\\\\\') return false;\n\tvar c1 = modulePath[1], c2 = modulePath[2];\n\tif ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\\\\\')) ||\n\t\t(c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\\\\\'))) return false;\n\tif (c1 === ':' && (c2 === '/' || c2 === '\\\\\\\\'))\n\t\treturn false;\n\treturn true;\n}\n\nfunction dirname (path) {\n if (path.length === 0)\n return '.';\n\n var i = path.length - 1;\n while (i > 0) {\n var c = path.charCodeAt(i);\n if ((c === 47 || c === 92) && i !== path.length - 1)\n break;\n i--;\n }\n\n if (i > 0)\n return path.substr(0, i);\n\n if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)\n return path.charAt(0);\n\n return '.';\n}\n\nexport function commonjsResolveImpl (path, originalModuleDir, testCache) {\n\tvar shouldTryNodeModules = isPossibleNodeModulesPath(path);\n\tpath = normalize(path);\n\tvar relPath;\n\tif (path[0] === '/') {\n\t\toriginalModuleDir = '/';\n\t}\n\twhile (true) {\n\t\tif (!shouldTryNodeModules) {\n\t\t\trelPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;\n\t\t} else if (originalModuleDir) {\n\t\t\trelPath = normalize(originalModuleDir + '/node_modules/' + path);\n\t\t} else {\n\t\t\trelPath = normalize(join('node_modules', path));\n\t\t}\n\n\t\tif (relPath.endsWith('/..')) {\n\t\t\tbreak; // Travelled too far up, avoid infinite loop\n\t\t}\n\n\t\tfor (var extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {\n\t\t\tvar resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];\n\t\t\tif (DYNAMIC_REQUIRE_CACHE[resolvedPath]) {\n\t\t\t\treturn resolvedPath;\n\t\t\t}\n\t\t\tif (DYNAMIC_REQUIRE_SHORTS[resolvedPath]) {\n\t\t\t return resolvedPath;\n\t\t\t}\n\t\t\tif (DYNAMIC_REQUIRE_LOADERS[resolvedPath]) {\n\t\t\t\treturn resolvedPath;\n\t\t\t}\n\t\t}\n\t\tif (!shouldTryNodeModules) break;\n\t\tvar nextDir = normalize(originalModuleDir + '/..');\n\t\tif (nextDir === originalModuleDir) break;\n\t\toriginalModuleDir = nextDir;\n\t}\n\treturn null;\n}\n\nexport function commonjsResolve (path, originalModuleDir) {\n\tvar resolvedPath = commonjsResolveImpl(path, originalModuleDir);\n\tif (resolvedPath !== null) {\n\t\treturn resolvedPath;\n\t}\n\treturn require.resolve(path);\n}\n\nexport function commonjsRequire (path, originalModuleDir) {\n\tvar resolvedPath = commonjsResolveImpl(path, originalModuleDir, true);\n\tif (resolvedPath !== null) {\n var cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];\n if (cachedModule) return cachedModule.exports;\n var shortTo = DYNAMIC_REQUIRE_SHORTS[resolvedPath];\n if (shortTo) {\n cachedModule = DYNAMIC_REQUIRE_CACHE[shortTo];\n if (cachedModule)\n return cachedModule.exports;\n resolvedPath = commonjsResolveImpl(shortTo, null, true);\n }\n var loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];\n if (loader) {\n DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {\n id: resolvedPath,\n filename: resolvedPath,\n path: dirname(resolvedPath),\n exports: {},\n parent: DEFAULT_PARENT_MODULE,\n loaded: false,\n children: [],\n paths: [],\n require: function (path, base) {\n return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);\n }\n };\n try {\n loader.call(commonjsGlobal, cachedModule, cachedModule.exports);\n } catch (error) {\n delete DYNAMIC_REQUIRE_CACHE[resolvedPath];\n throw error;\n }\n cachedModule.loaded = true;\n return cachedModule.exports;\n };\n\t}\n\t${ignoreDynamicRequires ? 'return require(path);' : FAILED_REQUIRE_ERROR}\n}\n\ncommonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;\ncommonjsRequire.resolve = commonjsResolve;\n`;\n\nexport function getHelpersModule(isDynamicRequireModulesEnabled, ignoreDynamicRequires) {\n return `${HELPERS}${\n isDynamicRequireModulesEnabled ? getDynamicHelpers(ignoreDynamicRequires) : HELPER_NON_DYNAMIC\n }`;\n}\n","/* eslint-disable import/prefer-default-export */\n\nimport { basename, dirname, extname } from 'path';\n\nimport { makeLegalIdentifier } from '@rollup/pluginutils';\n\nexport function deconflict(scopes, globals, identifier) {\n let i = 1;\n let deconflicted = makeLegalIdentifier(identifier);\n const hasConflicts = () =>\n scopes.some((scope) => scope.contains(deconflicted)) || globals.has(deconflicted);\n\n while (hasConflicts()) {\n deconflicted = makeLegalIdentifier(`${identifier}_${i}`);\n i += 1;\n }\n\n for (const scope of scopes) {\n scope.declarations[deconflicted] = true;\n }\n\n return deconflicted;\n}\n\nexport function getName(id) {\n const name = makeLegalIdentifier(basename(id, extname(id)));\n if (name !== 'index') {\n return name;\n }\n return makeLegalIdentifier(basename(dirname(id)));\n}\n\nexport function normalizePathSlashes(path) {\n return path.replace(/\\\\/g, '/');\n}\n\nconst VIRTUAL_PATH_BASE = '/$$rollup_base$$';\nexport const getVirtualPathForDynamicRequirePath = (path, commonDir) => {\n const normalizedPath = normalizePathSlashes(path);\n return normalizedPath.startsWith(commonDir)\n ? VIRTUAL_PATH_BASE + normalizedPath.slice(commonDir.length)\n : normalizedPath;\n};\n","import { existsSync, readFileSync } from 'fs';\nimport { join } from 'path';\n\nimport { DYNAMIC_PACKAGES_ID, DYNAMIC_REGISTER_SUFFIX, HELPERS_ID, wrapId } from './helpers';\nimport { getVirtualPathForDynamicRequirePath, normalizePathSlashes } from './utils';\n\nexport function getPackageEntryPoint(dirPath) {\n let entryPoint = 'index.js';\n\n try {\n if (existsSync(join(dirPath, 'package.json'))) {\n entryPoint =\n JSON.parse(readFileSync(join(dirPath, 'package.json'), { encoding: 'utf8' })).main ||\n entryPoint;\n }\n } catch (ignored) {\n // ignored\n }\n\n return entryPoint;\n}\n\nexport function getDynamicPackagesModule(dynamicRequireModuleDirPaths, commonDir) {\n let code = `const commonjsRegisterOrShort = require('${HELPERS_ID}?commonjsRegisterOrShort');`;\n for (const dir of dynamicRequireModuleDirPaths) {\n const entryPoint = getPackageEntryPoint(dir);\n\n code += `\\ncommonjsRegisterOrShort(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(dir, commonDir)\n )}, ${JSON.stringify(getVirtualPathForDynamicRequirePath(join(dir, entryPoint), commonDir))});`;\n }\n return code;\n}\n\nexport function getDynamicPackagesEntryIntro(\n dynamicRequireModuleDirPaths,\n dynamicRequireModuleSet\n) {\n let dynamicImports = Array.from(\n dynamicRequireModuleSet,\n (dynamicId) => `require(${JSON.stringify(wrapId(dynamicId, DYNAMIC_REGISTER_SUFFIX))});`\n ).join('\\n');\n\n if (dynamicRequireModuleDirPaths.length) {\n dynamicImports += `require(${JSON.stringify(\n wrapId(DYNAMIC_PACKAGES_ID, DYNAMIC_REGISTER_SUFFIX)\n )});`;\n }\n\n return dynamicImports;\n}\n\nexport function isDynamicModuleImport(id, dynamicRequireModuleSet) {\n const normalizedPath = normalizePathSlashes(id);\n return dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json');\n}\n","import { statSync } from 'fs';\n\nimport { join, resolve } from 'path';\n\nimport glob from 'glob';\n\nimport { normalizePathSlashes } from './utils';\nimport { getPackageEntryPoint } from './dynamic-packages-manager';\n\nfunction isDirectory(path) {\n try {\n if (statSync(path).isDirectory()) return true;\n } catch (ignored) {\n // Nothing to do here\n }\n return false;\n}\n\nexport default function getDynamicRequirePaths(patterns) {\n const dynamicRequireModuleSet = new Set();\n for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) {\n const isNegated = pattern.startsWith('!');\n const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);\n for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {\n modifySet(normalizePathSlashes(resolve(path)));\n if (isDirectory(path)) {\n modifySet(normalizePathSlashes(resolve(join(path, getPackageEntryPoint(path)))));\n }\n }\n }\n const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter((path) =>\n isDirectory(path)\n );\n return { dynamicRequireModuleSet, dynamicRequireModuleDirPaths };\n}\n","export function getCommonJSMetaPromise(commonJSMetaPromises, id) {\n let commonJSMetaPromise = commonJSMetaPromises.get(id);\n if (commonJSMetaPromise) return commonJSMetaPromise.promise;\n\n const promise = new Promise((resolve) => {\n commonJSMetaPromise = {\n resolve,\n promise: null\n };\n commonJSMetaPromises.set(id, commonJSMetaPromise);\n });\n commonJSMetaPromise.promise = promise;\n\n return promise;\n}\n\nexport function setCommonJSMetaPromise(commonJSMetaPromises, id, commonjsMeta) {\n const commonJSMetaPromise = commonJSMetaPromises.get(id);\n if (commonJSMetaPromise) {\n if (commonJSMetaPromise.resolve) {\n commonJSMetaPromise.resolve(commonjsMeta);\n commonJSMetaPromise.resolve = null;\n }\n } else {\n commonJSMetaPromises.set(id, { promise: Promise.resolve(commonjsMeta), resolve: null });\n }\n}\n","import { readFileSync } from 'fs';\n\nimport { DYNAMIC_JSON_PREFIX, HELPERS_ID } from './helpers';\nimport { getCommonJSMetaPromise } from './is-cjs';\nimport { getName, getVirtualPathForDynamicRequirePath, normalizePathSlashes } from './utils';\n\n// e.g. id === \"commonjsHelpers?commonjsRegister\"\nexport function getSpecificHelperProxy(id) {\n return `export {${id.split('?')[1]} as default} from \"${HELPERS_ID}\";`;\n}\n\nexport function getUnknownRequireProxy(id, requireReturnsDefault) {\n if (requireReturnsDefault === true || id.endsWith('.json')) {\n return `export {default} from ${JSON.stringify(id)};`;\n }\n const name = getName(id);\n const exported =\n requireReturnsDefault === 'auto'\n ? `import {getDefaultExportFromNamespaceIfNotNamed} from \"${HELPERS_ID}\"; export default /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(${name});`\n : requireReturnsDefault === 'preferred'\n ? `import {getDefaultExportFromNamespaceIfPresent} from \"${HELPERS_ID}\"; export default /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(${name});`\n : !requireReturnsDefault\n ? `import {getAugmentedNamespace} from \"${HELPERS_ID}\"; export default /*@__PURE__*/getAugmentedNamespace(${name});`\n : `export default ${name};`;\n return `import * as ${name} from ${JSON.stringify(id)}; ${exported}`;\n}\n\nexport function getDynamicJsonProxy(id, commonDir) {\n const normalizedPath = normalizePathSlashes(id.slice(DYNAMIC_JSON_PREFIX.length));\n return `const commonjsRegister = require('${HELPERS_ID}?commonjsRegister');\\ncommonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizedPath)});\n});`;\n}\n\nexport function getDynamicRequireProxy(normalizedPath, commonDir) {\n return `const commonjsRegister = require('${HELPERS_ID}?commonjsRegister');\\ncommonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n ${readFileSync(normalizedPath, { encoding: 'utf8' })}\n});`;\n}\n\nexport async function getStaticRequireProxy(\n id,\n requireReturnsDefault,\n esModulesWithDefaultExport,\n esModulesWithNamedExports,\n commonJsMetaPromises\n) {\n const name = getName(id);\n const commonjsMeta = await getCommonJSMetaPromise(commonJsMetaPromises, id);\n if (commonjsMeta && commonjsMeta.isCommonJS) {\n return `export { __moduleExports as default } from ${JSON.stringify(id)};`;\n } else if (commonjsMeta === null) {\n return getUnknownRequireProxy(id, requireReturnsDefault);\n } else if (!requireReturnsDefault) {\n return `import { getAugmentedNamespace } from \"${HELPERS_ID}\"; import * as ${name} from ${JSON.stringify(\n id\n )}; export default /*@__PURE__*/getAugmentedNamespace(${name});`;\n } else if (\n requireReturnsDefault !== true &&\n (requireReturnsDefault === 'namespace' ||\n !esModulesWithDefaultExport.has(id) ||\n (requireReturnsDefault === 'auto' && esModulesWithNamedExports.has(id)))\n ) {\n return `import * as ${name} from ${JSON.stringify(id)}; export default ${name};`;\n }\n return `export { default } from ${JSON.stringify(id)};`;\n}\n","/* eslint-disable no-param-reassign, no-undefined */\n\nimport { statSync } from 'fs';\nimport { dirname, resolve, sep } from 'path';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n DYNAMIC_REGISTER_SUFFIX,\n EXPORTS_SUFFIX,\n EXTERNAL_SUFFIX,\n HELPERS_ID,\n isWrappedId,\n MODULE_SUFFIX,\n PROXY_SUFFIX,\n REQUIRE_SUFFIX,\n unwrapId,\n wrapId\n} from './helpers';\n\nfunction getCandidatesForExtension(resolved, extension) {\n return [resolved + extension, `${resolved}${sep}index${extension}`];\n}\n\nfunction getCandidates(resolved, extensions) {\n return extensions.reduce(\n (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)),\n [resolved]\n );\n}\n\nexport default function getResolveId(extensions) {\n function resolveExtensions(importee, importer) {\n // not our problem\n if (importee[0] !== '.' || !importer) return undefined;\n\n const resolved = resolve(dirname(importer), importee);\n const candidates = getCandidates(resolved, extensions);\n\n for (let i = 0; i < candidates.length; i += 1) {\n try {\n const stats = statSync(candidates[i]);\n if (stats.isFile()) return { id: candidates[i] };\n } catch (err) {\n /* noop */\n }\n }\n\n return undefined;\n }\n\n return function resolveId(importee, rawImporter, resolveOptions) {\n if (isWrappedId(importee, MODULE_SUFFIX) || isWrappedId(importee, EXPORTS_SUFFIX)) {\n return importee;\n }\n\n const importer =\n rawImporter && isWrappedId(rawImporter, DYNAMIC_REGISTER_SUFFIX)\n ? unwrapId(rawImporter, DYNAMIC_REGISTER_SUFFIX)\n : rawImporter;\n\n // Except for exports, proxies are only importing resolved ids,\n // no need to resolve again\n if (importer && isWrappedId(importer, PROXY_SUFFIX)) {\n return importee;\n }\n\n const isProxyModule = isWrappedId(importee, PROXY_SUFFIX);\n const isRequiredModule = isWrappedId(importee, REQUIRE_SUFFIX);\n let isModuleRegistration = false;\n\n if (isProxyModule) {\n importee = unwrapId(importee, PROXY_SUFFIX);\n } else if (isRequiredModule) {\n importee = unwrapId(importee, REQUIRE_SUFFIX);\n\n isModuleRegistration = isWrappedId(importee, DYNAMIC_REGISTER_SUFFIX);\n if (isModuleRegistration) {\n importee = unwrapId(importee, DYNAMIC_REGISTER_SUFFIX);\n }\n }\n\n if (\n importee.startsWith(HELPERS_ID) ||\n importee === DYNAMIC_PACKAGES_ID ||\n importee.startsWith(DYNAMIC_JSON_PREFIX)\n ) {\n return importee;\n }\n\n if (importee.startsWith('\\0')) {\n return null;\n }\n\n return this.resolve(\n importee,\n importer,\n Object.assign({}, resolveOptions, {\n skipSelf: true,\n custom: Object.assign({}, resolveOptions.custom, {\n 'node-resolve': { isRequire: isProxyModule || isRequiredModule }\n })\n })\n ).then((resolved) => {\n if (!resolved) {\n resolved = resolveExtensions(importee, importer);\n }\n if (resolved && isProxyModule) {\n resolved.id = wrapId(resolved.id, resolved.external ? EXTERNAL_SUFFIX : PROXY_SUFFIX);\n resolved.external = false;\n } else if (resolved && isModuleRegistration) {\n resolved.id = wrapId(resolved.id, DYNAMIC_REGISTER_SUFFIX);\n } else if (!resolved && (isProxyModule || isRequiredModule)) {\n return { id: wrapId(importee, EXTERNAL_SUFFIX), external: false };\n }\n return resolved;\n });\n };\n}\n","export default function validateRollupVersion(rollupVersion, peerDependencyVersion) {\n const [major, minor] = rollupVersion.split('.').map(Number);\n const versionRegexp = /\\^(\\d+\\.\\d+)\\.\\d+/g;\n let minMajor = Infinity;\n let minMinor = Infinity;\n let foundVersion;\n // eslint-disable-next-line no-cond-assign\n while ((foundVersion = versionRegexp.exec(peerDependencyVersion))) {\n const [foundMajor, foundMinor] = foundVersion[1].split('.').map(Number);\n if (foundMajor < minMajor) {\n minMajor = foundMajor;\n minMinor = foundMinor;\n }\n }\n if (major < minMajor || (major === minMajor && minor < minMinor)) {\n throw new Error(\n `Insufficient Rollup version: \"@rollup/plugin-commonjs\" requires at least rollup@${minMajor}.${minMinor} but found rollup@${rollupVersion}.`\n );\n }\n}\n","export { default as isReference } from 'is-reference';\n\nconst operators = {\n '==': (x) => equals(x.left, x.right, false),\n\n '!=': (x) => not(operators['=='](x)),\n\n '===': (x) => equals(x.left, x.right, true),\n\n '!==': (x) => not(operators['==='](x)),\n\n '!': (x) => isFalsy(x.argument),\n\n '&&': (x) => isTruthy(x.left) && isTruthy(x.right),\n\n '||': (x) => isTruthy(x.left) || isTruthy(x.right)\n};\n\nfunction not(value) {\n return value === null ? value : !value;\n}\n\nfunction equals(a, b, strict) {\n if (a.type !== b.type) return null;\n // eslint-disable-next-line eqeqeq\n if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;\n return null;\n}\n\nexport function isTruthy(node) {\n if (!node) return false;\n if (node.type === 'Literal') return !!node.value;\n if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);\n if (node.operator in operators) return operators[node.operator](node);\n return null;\n}\n\nexport function isFalsy(node) {\n return not(isTruthy(node));\n}\n\nexport function getKeypath(node) {\n const parts = [];\n\n while (node.type === 'MemberExpression') {\n if (node.computed) return null;\n\n parts.unshift(node.property.name);\n // eslint-disable-next-line no-param-reassign\n node = node.object;\n }\n\n if (node.type !== 'Identifier') return null;\n\n const { name } = node;\n parts.unshift(name);\n\n return { name, keypath: parts.join('.') };\n}\n\nexport const KEY_COMPILED_ESM = '__esModule';\n\nexport function isDefineCompiledEsm(node) {\n const definedProperty =\n getDefinePropertyCallName(node, 'exports') || getDefinePropertyCallName(node, 'module.exports');\n if (definedProperty && definedProperty.key === KEY_COMPILED_ESM) {\n return isTruthy(definedProperty.value);\n }\n return false;\n}\n\nfunction getDefinePropertyCallName(node, targetName) {\n const {\n callee: { object, property }\n } = node;\n if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;\n if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;\n if (node.arguments.length !== 3) return;\n\n const targetNames = targetName.split('.');\n const [target, key, value] = node.arguments;\n if (targetNames.length === 1) {\n if (target.type !== 'Identifier' || target.name !== targetNames[0]) {\n return;\n }\n }\n\n if (targetNames.length === 2) {\n if (\n target.type !== 'MemberExpression' ||\n target.object.name !== targetNames[0] ||\n target.property.name !== targetNames[1]\n ) {\n return;\n }\n }\n\n if (value.type !== 'ObjectExpression' || !value.properties) return;\n\n const valueProperty = value.properties.find((p) => p.key && p.key.name === 'value');\n if (!valueProperty || !valueProperty.value) return;\n\n // eslint-disable-next-line consistent-return\n return { key: key.value, value: valueProperty.value };\n}\n\nexport function isShorthandProperty(parent) {\n return parent && parent.type === 'Property' && parent.shorthand;\n}\n\nexport function hasDefineEsmProperty(node) {\n return node.properties.some((property) => {\n if (\n property.type === 'Property' &&\n property.key.type === 'Identifier' &&\n property.key.name === '__esModule' &&\n isTruthy(property.value)\n ) {\n return true;\n }\n return false;\n });\n}\n","export function wrapCode(magicString, uses, moduleName, exportsName) {\n const args = [];\n const passedArgs = [];\n if (uses.module) {\n args.push('module');\n passedArgs.push(moduleName);\n }\n if (uses.exports) {\n args.push('exports');\n passedArgs.push(exportsName);\n }\n magicString\n .trim()\n .prepend(`(function (${args.join(', ')}) {\\n`)\n .append(`\\n}(${passedArgs.join(', ')}));`);\n}\n\nexport function rewriteExportsAndGetExportsBlock(\n magicString,\n moduleName,\n exportsName,\n wrapped,\n moduleExportsAssignments,\n firstTopLevelModuleExportsAssignment,\n exportsAssignmentsByName,\n topLevelAssignments,\n defineCompiledEsmExpressions,\n deconflictedExportNames,\n code,\n HELPERS_NAME,\n exportMode,\n detectWrappedDefault,\n defaultIsModuleExports\n) {\n const exports = [];\n const exportDeclarations = [];\n\n if (exportMode === 'replace') {\n getExportsForReplacedModuleExports(\n magicString,\n exports,\n exportDeclarations,\n moduleExportsAssignments,\n firstTopLevelModuleExportsAssignment,\n exportsName\n );\n } else {\n exports.push(`${exportsName} as __moduleExports`);\n if (wrapped) {\n getExportsWhenWrapping(\n exportDeclarations,\n exportsName,\n detectWrappedDefault,\n HELPERS_NAME,\n defaultIsModuleExports\n );\n } else {\n getExports(\n magicString,\n exports,\n exportDeclarations,\n moduleExportsAssignments,\n exportsAssignmentsByName,\n deconflictedExportNames,\n topLevelAssignments,\n moduleName,\n exportsName,\n defineCompiledEsmExpressions,\n HELPERS_NAME,\n defaultIsModuleExports\n );\n }\n }\n if (exports.length) {\n exportDeclarations.push(`export { ${exports.join(', ')} };`);\n }\n\n return `\\n\\n${exportDeclarations.join('\\n')}`;\n}\n\nfunction getExportsForReplacedModuleExports(\n magicString,\n exports,\n exportDeclarations,\n moduleExportsAssignments,\n firstTopLevelModuleExportsAssignment,\n exportsName\n) {\n for (const { left } of moduleExportsAssignments) {\n magicString.overwrite(left.start, left.end, exportsName);\n }\n magicString.prependRight(firstTopLevelModuleExportsAssignment.left.start, 'var ');\n exports.push(`${exportsName} as __moduleExports`);\n exportDeclarations.push(`export default ${exportsName};`);\n}\n\nfunction getExportsWhenWrapping(\n exportDeclarations,\n exportsName,\n detectWrappedDefault,\n HELPERS_NAME,\n defaultIsModuleExports\n) {\n exportDeclarations.push(\n `export default ${\n detectWrappedDefault && defaultIsModuleExports === 'auto'\n ? `/*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportsName})`\n : defaultIsModuleExports === false\n ? `${exportsName}.default`\n : exportsName\n };`\n );\n}\n\nfunction getExports(\n magicString,\n exports,\n exportDeclarations,\n moduleExportsAssignments,\n exportsAssignmentsByName,\n deconflictedExportNames,\n topLevelAssignments,\n moduleName,\n exportsName,\n defineCompiledEsmExpressions,\n HELPERS_NAME,\n defaultIsModuleExports\n) {\n let deconflictedDefaultExportName;\n // Collect and rewrite module.exports assignments\n for (const { left } of moduleExportsAssignments) {\n magicString.overwrite(left.start, left.end, `${moduleName}.exports`);\n }\n\n // Collect and rewrite named exports\n for (const [exportName, { nodes }] of exportsAssignmentsByName) {\n const deconflicted = deconflictedExportNames[exportName];\n let needsDeclaration = true;\n for (const node of nodes) {\n let replacement = `${deconflicted} = ${exportsName}.${exportName}`;\n if (needsDeclaration && topLevelAssignments.has(node)) {\n replacement = `var ${replacement}`;\n needsDeclaration = false;\n }\n magicString.overwrite(node.start, node.left.end, replacement);\n }\n if (needsDeclaration) {\n magicString.prepend(`var ${deconflicted};\\n`);\n }\n\n if (exportName === 'default') {\n deconflictedDefaultExportName = deconflicted;\n } else {\n exports.push(exportName === deconflicted ? exportName : `${deconflicted} as ${exportName}`);\n }\n }\n\n // Collect and rewrite exports.__esModule assignments\n let isRestorableCompiledEsm = false;\n for (const expression of defineCompiledEsmExpressions) {\n isRestorableCompiledEsm = true;\n const moduleExportsExpression =\n expression.type === 'CallExpression' ? expression.arguments[0] : expression.left.object;\n magicString.overwrite(moduleExportsExpression.start, moduleExportsExpression.end, exportsName);\n }\n\n if (!isRestorableCompiledEsm || defaultIsModuleExports === true) {\n exportDeclarations.push(`export default ${exportsName};`);\n } else if (moduleExportsAssignments.length === 0 || defaultIsModuleExports === false) {\n exports.push(`${deconflictedDefaultExportName || exportsName} as default`);\n } else {\n exportDeclarations.push(\n `export default /*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportsName});`\n );\n }\n}\n","import { dirname, resolve } from 'path';\n\nimport { sync as nodeResolveSync } from 'resolve';\n\nimport {\n EXPORTS_SUFFIX,\n HELPERS_ID,\n MODULE_SUFFIX,\n PROXY_SUFFIX,\n REQUIRE_SUFFIX,\n wrapId\n} from './helpers';\nimport { normalizePathSlashes } from './utils';\n\nexport function isRequireStatement(node, scope) {\n if (!node) return false;\n if (node.type !== 'CallExpression') return false;\n\n // Weird case of `require()` or `module.require()` without arguments\n if (node.arguments.length === 0) return false;\n\n return isRequire(node.callee, scope);\n}\n\nfunction isRequire(node, scope) {\n return (\n (node.type === 'Identifier' && node.name === 'require' && !scope.contains('require')) ||\n (node.type === 'MemberExpression' && isModuleRequire(node, scope))\n );\n}\n\nexport function isModuleRequire({ object, property }, scope) {\n return (\n object.type === 'Identifier' &&\n object.name === 'module' &&\n property.type === 'Identifier' &&\n property.name === 'require' &&\n !scope.contains('module')\n );\n}\n\nexport function isStaticRequireStatement(node, scope) {\n if (!isRequireStatement(node, scope)) return false;\n return !hasDynamicArguments(node);\n}\n\nfunction hasDynamicArguments(node) {\n return (\n node.arguments.length > 1 ||\n (node.arguments[0].type !== 'Literal' &&\n (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))\n );\n}\n\nconst reservedMethod = { resolve: true, cache: true, main: true };\n\nexport function isNodeRequirePropertyAccess(parent) {\n return parent && parent.property && reservedMethod[parent.property.name];\n}\n\nexport function isIgnoredRequireStatement(requiredNode, ignoreRequire) {\n return ignoreRequire(requiredNode.arguments[0].value);\n}\n\nexport function getRequireStringArg(node) {\n return node.arguments[0].type === 'Literal'\n ? node.arguments[0].value\n : node.arguments[0].quasis[0].value.cooked;\n}\n\nexport function hasDynamicModuleForPath(source, id, dynamicRequireModuleSet) {\n if (!/^(?:\\.{0,2}[/\\\\]|[A-Za-z]:[/\\\\])/.test(source)) {\n try {\n const resolvedPath = normalizePathSlashes(nodeResolveSync(source, { basedir: dirname(id) }));\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n } catch (ex) {\n // Probably a node.js internal module\n return false;\n }\n\n return false;\n }\n\n for (const attemptExt of ['', '.js', '.json']) {\n const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function getRequireHandlers() {\n const requiredSources = [];\n const requiredBySource = Object.create(null);\n const requiredByNode = new Map();\n const requireExpressionsWithUsedReturnValue = [];\n\n function addRequireStatement(sourceId, node, scope, usesReturnValue) {\n const required = getRequired(sourceId);\n requiredByNode.set(node, { scope, required });\n if (usesReturnValue) {\n required.nodesUsingRequired.push(node);\n requireExpressionsWithUsedReturnValue.push(node);\n }\n }\n\n function getRequired(sourceId) {\n if (!requiredBySource[sourceId]) {\n requiredSources.push(sourceId);\n\n requiredBySource[sourceId] = {\n source: sourceId,\n name: null,\n nodesUsingRequired: []\n };\n }\n\n return requiredBySource[sourceId];\n }\n\n function rewriteRequireExpressionsAndGetImportBlock(\n magicString,\n topLevelDeclarations,\n topLevelRequireDeclarators,\n reassignedNames,\n helpersName,\n dynamicRegisterSources,\n moduleName,\n exportsName,\n id,\n exportMode\n ) {\n setRemainingImportNamesAndRewriteRequires(\n requireExpressionsWithUsedReturnValue,\n requiredByNode,\n magicString\n );\n const imports = [];\n imports.push(`import * as ${helpersName} from \"${HELPERS_ID}\";`);\n if (exportMode === 'module') {\n imports.push(\n `import { __module as ${moduleName}, exports as ${exportsName} } from ${JSON.stringify(\n wrapId(id, MODULE_SUFFIX)\n )}`\n );\n } else if (exportMode === 'exports') {\n imports.push(\n `import { __exports as ${exportsName} } from ${JSON.stringify(wrapId(id, EXPORTS_SUFFIX))}`\n );\n }\n for (const source of dynamicRegisterSources) {\n imports.push(`import ${JSON.stringify(wrapId(source, REQUIRE_SUFFIX))};`);\n }\n for (const source of requiredSources) {\n if (!source.startsWith('\\0')) {\n imports.push(`import ${JSON.stringify(wrapId(source, REQUIRE_SUFFIX))};`);\n }\n const { name, nodesUsingRequired } = requiredBySource[source];\n imports.push(\n `import ${nodesUsingRequired.length ? `${name} from ` : ''}${JSON.stringify(\n source.startsWith('\\0') ? source : wrapId(source, PROXY_SUFFIX)\n )};`\n );\n }\n return imports.length ? `${imports.join('\\n')}\\n\\n` : '';\n }\n\n return {\n addRequireStatement,\n requiredSources,\n rewriteRequireExpressionsAndGetImportBlock\n };\n}\n\nfunction setRemainingImportNamesAndRewriteRequires(\n requireExpressionsWithUsedReturnValue,\n requiredByNode,\n magicString\n) {\n let uid = 0;\n for (const requireExpression of requireExpressionsWithUsedReturnValue) {\n const { required } = requiredByNode.get(requireExpression);\n if (!required.name) {\n let potentialName;\n const isUsedName = (node) => requiredByNode.get(node).scope.contains(potentialName);\n do {\n potentialName = `require$$${uid}`;\n uid += 1;\n } while (required.nodesUsingRequired.some(isUsedName));\n required.name = potentialName;\n }\n magicString.overwrite(requireExpression.start, requireExpression.end, required.name);\n }\n}\n","/* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */\n\nimport { dirname } from 'path';\n\nimport { attachScopes, extractAssignedNames } from '@rollup/pluginutils';\nimport { walk } from 'estree-walker';\nimport MagicString from 'magic-string';\n\nimport {\n getKeypath,\n isDefineCompiledEsm,\n hasDefineEsmProperty,\n isFalsy,\n isReference,\n isShorthandProperty,\n isTruthy,\n KEY_COMPILED_ESM\n} from './ast-utils';\nimport { rewriteExportsAndGetExportsBlock, wrapCode } from './generate-exports';\nimport {\n getRequireHandlers,\n getRequireStringArg,\n hasDynamicModuleForPath,\n isIgnoredRequireStatement,\n isModuleRequire,\n isNodeRequirePropertyAccess,\n isRequireStatement,\n isStaticRequireStatement\n} from './generate-imports';\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_REGISTER_SUFFIX,\n isWrappedId,\n unwrapId,\n wrapId\n} from './helpers';\nimport { tryParse } from './parse';\nimport { deconflict, getName, getVirtualPathForDynamicRequirePath } from './utils';\n\nconst exportsPattern = /^(?:module\\.)?exports(?:\\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;\n\nconst functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;\n\nexport default function transformCommonjs(\n parse,\n code,\n id,\n isEsModule,\n ignoreGlobal,\n ignoreRequire,\n ignoreDynamicRequires,\n getIgnoreTryCatchRequireStatementMode,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n disableWrap,\n commonDir,\n astCache,\n defaultIsModuleExports\n) {\n const ast = astCache || tryParse(parse, code, id);\n const magicString = new MagicString(code);\n const uses = {\n module: false,\n exports: false,\n global: false,\n require: false\n };\n let usesDynamicRequire = false;\n const virtualDynamicRequirePath =\n isDynamicRequireModulesEnabled && getVirtualPathForDynamicRequirePath(dirname(id), commonDir);\n let scope = attachScopes(ast, 'scope');\n let lexicalDepth = 0;\n let programDepth = 0;\n let currentTryBlockEnd = null;\n let shouldWrap = false;\n\n const globals = new Set();\n\n // TODO technically wrong since globals isn't populated yet, but ¯\\_(ツ)_/¯\n const HELPERS_NAME = deconflict([scope], globals, 'commonjsHelpers');\n const dynamicRegisterSources = new Set();\n let hasRemovedRequire = false;\n\n const {\n addRequireStatement,\n requiredSources,\n rewriteRequireExpressionsAndGetImportBlock\n } = getRequireHandlers();\n\n // See which names are assigned to. This is necessary to prevent\n // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,\n // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)\n const reassignedNames = new Set();\n const topLevelDeclarations = [];\n const topLevelRequireDeclarators = new Set();\n const skippedNodes = new Set();\n const moduleAccessScopes = new Set([scope]);\n const exportsAccessScopes = new Set([scope]);\n const moduleExportsAssignments = [];\n let firstTopLevelModuleExportsAssignment = null;\n const exportsAssignmentsByName = new Map();\n const topLevelAssignments = new Set();\n const topLevelDefineCompiledEsmExpressions = [];\n\n walk(ast, {\n enter(node, parent) {\n if (skippedNodes.has(node)) {\n this.skip();\n return;\n }\n\n if (currentTryBlockEnd !== null && node.start > currentTryBlockEnd) {\n currentTryBlockEnd = null;\n }\n\n programDepth += 1;\n if (node.scope) ({ scope } = node);\n if (functionType.test(node.type)) lexicalDepth += 1;\n if (sourceMap) {\n magicString.addSourcemapLocation(node.start);\n magicString.addSourcemapLocation(node.end);\n }\n\n // eslint-disable-next-line default-case\n switch (node.type) {\n case 'TryStatement':\n if (currentTryBlockEnd === null) {\n currentTryBlockEnd = node.block.end;\n }\n return;\n case 'AssignmentExpression':\n if (node.left.type === 'MemberExpression') {\n const flattened = getKeypath(node.left);\n if (!flattened || scope.contains(flattened.name)) return;\n\n const exportsPatternMatch = exportsPattern.exec(flattened.keypath);\n if (!exportsPatternMatch || flattened.keypath === 'exports') return;\n\n const [, exportName] = exportsPatternMatch;\n uses[flattened.name] = true;\n\n // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –\n if (flattened.keypath === 'module.exports') {\n moduleExportsAssignments.push(node);\n if (programDepth > 3) {\n moduleAccessScopes.add(scope);\n } else if (!firstTopLevelModuleExportsAssignment) {\n firstTopLevelModuleExportsAssignment = node;\n }\n\n if (defaultIsModuleExports === false) {\n shouldWrap = true;\n } else if (defaultIsModuleExports === 'auto') {\n if (node.right.type === 'ObjectExpression') {\n if (hasDefineEsmProperty(node.right)) {\n shouldWrap = true;\n }\n } else if (defaultIsModuleExports === false) {\n shouldWrap = true;\n }\n }\n } else if (exportName === KEY_COMPILED_ESM) {\n if (programDepth > 3) {\n shouldWrap = true;\n } else {\n topLevelDefineCompiledEsmExpressions.push(node);\n }\n } else {\n const exportsAssignments = exportsAssignmentsByName.get(exportName) || {\n nodes: [],\n scopes: new Set()\n };\n exportsAssignments.nodes.push(node);\n exportsAssignments.scopes.add(scope);\n exportsAccessScopes.add(scope);\n exportsAssignmentsByName.set(exportName, exportsAssignments);\n if (programDepth <= 3) {\n topLevelAssignments.add(node);\n }\n }\n\n skippedNodes.add(node.left);\n } else {\n for (const name of extractAssignedNames(node.left)) {\n reassignedNames.add(name);\n }\n }\n return;\n case 'CallExpression': {\n if (isDefineCompiledEsm(node)) {\n if (programDepth === 3 && parent.type === 'ExpressionStatement') {\n // skip special handling for [module.]exports until we know we render this\n skippedNodes.add(node.arguments[0]);\n topLevelDefineCompiledEsmExpressions.push(node);\n } else {\n shouldWrap = true;\n }\n return;\n }\n\n if (\n node.callee.object &&\n node.callee.object.name === 'require' &&\n node.callee.property.name === 'resolve' &&\n hasDynamicModuleForPath(id, '/', dynamicRequireModuleSet)\n ) {\n const requireNode = node.callee.object;\n magicString.appendLeft(\n node.end - 1,\n `,${JSON.stringify(\n dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath\n )}`\n );\n magicString.overwrite(\n requireNode.start,\n requireNode.end,\n `${HELPERS_NAME}.commonjsRequire`,\n {\n storeName: true\n }\n );\n return;\n }\n\n if (!isStaticRequireStatement(node, scope)) return;\n if (!isDynamicRequireModulesEnabled) {\n skippedNodes.add(node.callee);\n }\n if (!isIgnoredRequireStatement(node, ignoreRequire)) {\n skippedNodes.add(node.callee);\n const usesReturnValue = parent.type !== 'ExpressionStatement';\n\n let canConvertRequire = true;\n let shouldRemoveRequireStatement = false;\n\n if (currentTryBlockEnd !== null) {\n ({\n canConvertRequire,\n shouldRemoveRequireStatement\n } = getIgnoreTryCatchRequireStatementMode(node.arguments[0].value));\n\n if (shouldRemoveRequireStatement) {\n hasRemovedRequire = true;\n }\n }\n\n let sourceId = getRequireStringArg(node);\n const isDynamicRegister = isWrappedId(sourceId, DYNAMIC_REGISTER_SUFFIX);\n if (isDynamicRegister) {\n sourceId = unwrapId(sourceId, DYNAMIC_REGISTER_SUFFIX);\n if (sourceId.endsWith('.json')) {\n sourceId = DYNAMIC_JSON_PREFIX + sourceId;\n }\n dynamicRegisterSources.add(wrapId(sourceId, DYNAMIC_REGISTER_SUFFIX));\n } else {\n if (\n !sourceId.endsWith('.json') &&\n hasDynamicModuleForPath(sourceId, id, dynamicRequireModuleSet)\n ) {\n if (shouldRemoveRequireStatement) {\n magicString.overwrite(node.start, node.end, `undefined`);\n } else if (canConvertRequire) {\n magicString.overwrite(\n node.start,\n node.end,\n `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(sourceId, commonDir)\n )}, ${JSON.stringify(\n dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath\n )})`\n );\n usesDynamicRequire = true;\n }\n return;\n }\n\n if (canConvertRequire) {\n addRequireStatement(sourceId, node, scope, usesReturnValue);\n }\n }\n\n if (usesReturnValue) {\n if (shouldRemoveRequireStatement) {\n magicString.overwrite(node.start, node.end, `undefined`);\n return;\n }\n\n if (\n parent.type === 'VariableDeclarator' &&\n !scope.parent &&\n parent.id.type === 'Identifier'\n ) {\n // This will allow us to reuse this variable name as the imported variable if it is not reassigned\n // and does not conflict with variables in other places where this is imported\n topLevelRequireDeclarators.add(parent);\n }\n } else {\n // This is a bare import, e.g. `require('foo');`\n\n if (!canConvertRequire && !shouldRemoveRequireStatement) {\n return;\n }\n\n magicString.remove(parent.start, parent.end);\n }\n }\n return;\n }\n case 'ConditionalExpression':\n case 'IfStatement':\n // skip dead branches\n if (isFalsy(node.test)) {\n skippedNodes.add(node.consequent);\n } else if (node.alternate && isTruthy(node.test)) {\n skippedNodes.add(node.alternate);\n }\n return;\n case 'Identifier': {\n const { name } = node;\n if (!(isReference(node, parent) && !scope.contains(name))) return;\n switch (name) {\n case 'require':\n if (isNodeRequirePropertyAccess(parent)) {\n if (hasDynamicModuleForPath(id, '/', dynamicRequireModuleSet)) {\n if (parent.property.name === 'cache') {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {\n storeName: true\n });\n }\n }\n\n return;\n }\n\n if (isDynamicRequireModulesEnabled && isRequireStatement(parent, scope)) {\n magicString.appendLeft(\n parent.end - 1,\n `,${JSON.stringify(\n dirname(id) === '.' ? null /* default behavior */ : virtualDynamicRequirePath\n )}`\n );\n }\n if (!ignoreDynamicRequires) {\n if (isShorthandProperty(parent)) {\n magicString.appendRight(node.end, `: ${HELPERS_NAME}.commonjsRequire`);\n } else {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {\n storeName: true\n });\n }\n }\n usesDynamicRequire = true;\n return;\n case 'module':\n case 'exports':\n shouldWrap = true;\n uses[name] = true;\n return;\n case 'global':\n uses.global = true;\n if (!ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n }\n return;\n case 'define':\n magicString.overwrite(node.start, node.end, 'undefined', {\n storeName: true\n });\n return;\n default:\n globals.add(name);\n return;\n }\n }\n case 'MemberExpression':\n if (!isDynamicRequireModulesEnabled && isModuleRequire(node, scope)) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {\n storeName: true\n });\n skippedNodes.add(node.object);\n skippedNodes.add(node.property);\n }\n return;\n case 'ReturnStatement':\n // if top-level return, we need to wrap it\n if (lexicalDepth === 0) {\n shouldWrap = true;\n }\n return;\n case 'ThisExpression':\n // rewrite top-level `this` as `commonjsHelpers.commonjsGlobal`\n if (lexicalDepth === 0) {\n uses.global = true;\n if (!ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n }\n }\n return;\n case 'UnaryExpression':\n // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)\n if (node.operator === 'typeof') {\n const flattened = getKeypath(node.argument);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n if (\n flattened.keypath === 'module.exports' ||\n flattened.keypath === 'module' ||\n flattened.keypath === 'exports'\n ) {\n magicString.overwrite(node.start, node.end, `'object'`, {\n storeName: false\n });\n }\n }\n return;\n case 'VariableDeclaration':\n if (!scope.parent) {\n topLevelDeclarations.push(node);\n }\n }\n },\n\n leave(node) {\n programDepth -= 1;\n if (node.scope) scope = scope.parent;\n if (functionType.test(node.type)) lexicalDepth -= 1;\n }\n });\n\n const nameBase = getName(id);\n const exportsName = deconflict([...exportsAccessScopes], globals, nameBase);\n const moduleName = deconflict([...moduleAccessScopes], globals, `${nameBase}Module`);\n const deconflictedExportNames = Object.create(null);\n for (const [exportName, { scopes }] of exportsAssignmentsByName) {\n deconflictedExportNames[exportName] = deconflict([...scopes], globals, exportName);\n }\n\n // We cannot wrap ES/mixed modules\n shouldWrap =\n !isEsModule &&\n !disableWrap &&\n (shouldWrap || (uses.exports && moduleExportsAssignments.length > 0));\n const detectWrappedDefault =\n shouldWrap &&\n (topLevelDefineCompiledEsmExpressions.length > 0 || code.indexOf('__esModule') >= 0);\n\n if (\n !(\n requiredSources.length ||\n dynamicRegisterSources.size ||\n uses.module ||\n uses.exports ||\n uses.require ||\n usesDynamicRequire ||\n hasRemovedRequire ||\n topLevelDefineCompiledEsmExpressions.length > 0\n ) &&\n (ignoreGlobal || !uses.global)\n ) {\n return { meta: { commonjs: { isCommonJS: false } } };\n }\n\n let leadingComment = '';\n if (code.startsWith('/*')) {\n const commentEnd = code.indexOf('*/', 2) + 2;\n leadingComment = `${code.slice(0, commentEnd)}\\n`;\n magicString.remove(0, commentEnd).trim();\n }\n\n const exportMode = shouldWrap\n ? uses.module\n ? 'module'\n : 'exports'\n : firstTopLevelModuleExportsAssignment\n ? exportsAssignmentsByName.size === 0 && topLevelDefineCompiledEsmExpressions.length === 0\n ? 'replace'\n : 'module'\n : moduleExportsAssignments.length === 0\n ? 'exports'\n : 'module';\n\n const importBlock = rewriteRequireExpressionsAndGetImportBlock(\n magicString,\n topLevelDeclarations,\n topLevelRequireDeclarators,\n reassignedNames,\n HELPERS_NAME,\n dynamicRegisterSources,\n moduleName,\n exportsName,\n id,\n exportMode\n );\n\n const exportBlock = isEsModule\n ? ''\n : rewriteExportsAndGetExportsBlock(\n magicString,\n moduleName,\n exportsName,\n shouldWrap,\n moduleExportsAssignments,\n firstTopLevelModuleExportsAssignment,\n exportsAssignmentsByName,\n topLevelAssignments,\n topLevelDefineCompiledEsmExpressions,\n deconflictedExportNames,\n code,\n HELPERS_NAME,\n exportMode,\n detectWrappedDefault,\n defaultIsModuleExports\n );\n\n if (shouldWrap) {\n wrapCode(magicString, uses, moduleName, exportsName);\n }\n\n magicString\n .trim()\n .prepend(leadingComment + importBlock)\n .append(exportBlock);\n\n return {\n code: magicString.toString(),\n map: sourceMap ? magicString.generateMap() : null,\n syntheticNamedExports: isEsModule ? false : '__moduleExports',\n meta: { commonjs: { isCommonJS: !isEsModule } }\n };\n}\n","import { dirname, extname } from 'path';\n\nimport { createFilter } from '@rollup/pluginutils';\nimport getCommonDir from 'commondir';\n\nimport { peerDependencies } from '../package.json';\n\nimport analyzeTopLevelStatements from './analyze-top-level-statements';\n\nimport {\n getDynamicPackagesEntryIntro,\n getDynamicPackagesModule,\n isDynamicModuleImport\n} from './dynamic-packages-manager';\nimport getDynamicRequirePaths from './dynamic-require-paths';\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n DYNAMIC_REGISTER_SUFFIX,\n EXPORTS_SUFFIX,\n EXTERNAL_SUFFIX,\n getHelpersModule,\n HELPERS_ID,\n isWrappedId,\n MODULE_SUFFIX,\n PROXY_SUFFIX,\n unwrapId\n} from './helpers';\nimport { setCommonJSMetaPromise } from './is-cjs';\nimport { hasCjsKeywords } from './parse';\nimport {\n getDynamicJsonProxy,\n getDynamicRequireProxy,\n getSpecificHelperProxy,\n getStaticRequireProxy,\n getUnknownRequireProxy\n} from './proxies';\nimport getResolveId from './resolve-id';\nimport validateRollupVersion from './rollup-version';\nimport transformCommonjs from './transform-commonjs';\nimport { getName, getVirtualPathForDynamicRequirePath, normalizePathSlashes } from './utils';\n\nexport default function commonjs(options = {}) {\n const extensions = options.extensions || ['.js'];\n const filter = createFilter(options.include, options.exclude);\n const {\n ignoreGlobal,\n ignoreDynamicRequires,\n requireReturnsDefault: requireReturnsDefaultOption,\n esmExternals\n } = options;\n const getRequireReturnsDefault =\n typeof requireReturnsDefaultOption === 'function'\n ? requireReturnsDefaultOption\n : () => requireReturnsDefaultOption;\n let esmExternalIds;\n const isEsmExternal =\n typeof esmExternals === 'function'\n ? esmExternals\n : Array.isArray(esmExternals)\n ? ((esmExternalIds = new Set(esmExternals)), (id) => esmExternalIds.has(id))\n : () => esmExternals;\n const defaultIsModuleExports =\n typeof options.defaultIsModuleExports === 'boolean' ? options.defaultIsModuleExports : 'auto';\n\n const { dynamicRequireModuleSet, dynamicRequireModuleDirPaths } = getDynamicRequirePaths(\n options.dynamicRequireTargets\n );\n const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;\n const commonDir = isDynamicRequireModulesEnabled\n ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd()))\n : null;\n\n const esModulesWithDefaultExport = new Set();\n const esModulesWithNamedExports = new Set();\n const commonJsMetaPromises = new Map();\n\n const ignoreRequire =\n typeof options.ignore === 'function'\n ? options.ignore\n : Array.isArray(options.ignore)\n ? (id) => options.ignore.includes(id)\n : () => false;\n\n const getIgnoreTryCatchRequireStatementMode = (id) => {\n const mode =\n typeof options.ignoreTryCatch === 'function'\n ? options.ignoreTryCatch(id)\n : Array.isArray(options.ignoreTryCatch)\n ? options.ignoreTryCatch.includes(id)\n : typeof options.ignoreTryCatch !== 'undefined'\n ? options.ignoreTryCatch\n : true;\n\n return {\n canConvertRequire: mode !== 'remove' && mode !== true,\n shouldRemoveRequireStatement: mode === 'remove'\n };\n };\n\n const resolveId = getResolveId(extensions);\n\n const sourceMap = options.sourceMap !== false;\n\n function transformAndCheckExports(code, id) {\n if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {\n // eslint-disable-next-line no-param-reassign\n code =\n getDynamicPackagesEntryIntro(dynamicRequireModuleDirPaths, dynamicRequireModuleSet) + code;\n }\n\n const { isEsModule, hasDefaultExport, hasNamedExports, ast } = analyzeTopLevelStatements(\n this.parse,\n code,\n id\n );\n if (hasDefaultExport) {\n esModulesWithDefaultExport.add(id);\n }\n if (hasNamedExports) {\n esModulesWithNamedExports.add(id);\n }\n\n if (\n !dynamicRequireModuleSet.has(normalizePathSlashes(id)) &&\n (!hasCjsKeywords(code, ignoreGlobal) || (isEsModule && !options.transformMixedEsModules))\n ) {\n return { meta: { commonjs: { isCommonJS: false } } };\n }\n\n // avoid wrapping as this is a commonjsRegister call\n const disableWrap = isWrappedId(id, DYNAMIC_REGISTER_SUFFIX);\n if (disableWrap) {\n // eslint-disable-next-line no-param-reassign\n id = unwrapId(id, DYNAMIC_REGISTER_SUFFIX);\n }\n\n return transformCommonjs(\n this.parse,\n code,\n id,\n isEsModule,\n ignoreGlobal || isEsModule,\n ignoreRequire,\n ignoreDynamicRequires && !isDynamicRequireModulesEnabled,\n getIgnoreTryCatchRequireStatementMode,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n disableWrap,\n commonDir,\n ast,\n defaultIsModuleExports\n );\n }\n\n return {\n name: 'commonjs',\n\n buildStart() {\n validateRollupVersion(this.meta.rollupVersion, peerDependencies.rollup);\n if (options.namedExports != null) {\n this.warn(\n 'The namedExports option from \"@rollup/plugin-commonjs\" is deprecated. Named exports are now handled automatically.'\n );\n }\n },\n\n resolveId,\n\n load(id) {\n if (id === HELPERS_ID) {\n return getHelpersModule(isDynamicRequireModulesEnabled, ignoreDynamicRequires);\n }\n\n if (id.startsWith(HELPERS_ID)) {\n return getSpecificHelperProxy(id);\n }\n\n if (isWrappedId(id, MODULE_SUFFIX)) {\n const actualId = unwrapId(id, MODULE_SUFFIX);\n let name = getName(actualId);\n let code;\n if (isDynamicRequireModulesEnabled) {\n if (['modulePath', 'commonjsRequire', 'createModule'].includes(name)) {\n name = `${name}_`;\n }\n code =\n `import {commonjsRequire, createModule} from \"${HELPERS_ID}\";\\n` +\n `var ${name} = createModule(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(dirname(actualId), commonDir)\n )});\\n` +\n `export {${name} as __module}`;\n } else {\n code = `var ${name} = {exports: {}}; export {${name} as __module}`;\n }\n return {\n code,\n syntheticNamedExports: '__module',\n meta: { commonjs: { isCommonJS: false } }\n };\n }\n\n if (isWrappedId(id, EXPORTS_SUFFIX)) {\n const actualId = unwrapId(id, EXPORTS_SUFFIX);\n const name = getName(actualId);\n return {\n code: `var ${name} = {}; export {${name} as __exports}`,\n meta: { commonjs: { isCommonJS: false } }\n };\n }\n\n if (isWrappedId(id, EXTERNAL_SUFFIX)) {\n const actualId = unwrapId(id, EXTERNAL_SUFFIX);\n return getUnknownRequireProxy(\n actualId,\n isEsmExternal(actualId) ? getRequireReturnsDefault(actualId) : true\n );\n }\n\n if (id === DYNAMIC_PACKAGES_ID) {\n return getDynamicPackagesModule(dynamicRequireModuleDirPaths, commonDir);\n }\n\n if (id.startsWith(DYNAMIC_JSON_PREFIX)) {\n return getDynamicJsonProxy(id, commonDir);\n }\n\n if (isDynamicModuleImport(id, dynamicRequireModuleSet)) {\n return `export default require(${JSON.stringify(normalizePathSlashes(id))});`;\n }\n\n if (isWrappedId(id, DYNAMIC_REGISTER_SUFFIX)) {\n return getDynamicRequireProxy(\n normalizePathSlashes(unwrapId(id, DYNAMIC_REGISTER_SUFFIX)),\n commonDir\n );\n }\n\n if (isWrappedId(id, PROXY_SUFFIX)) {\n const actualId = unwrapId(id, PROXY_SUFFIX);\n return getStaticRequireProxy(\n actualId,\n getRequireReturnsDefault(actualId),\n esModulesWithDefaultExport,\n esModulesWithNamedExports,\n commonJsMetaPromises\n );\n }\n\n return null;\n },\n\n transform(code, rawId) {\n let id = rawId;\n\n if (isWrappedId(id, DYNAMIC_REGISTER_SUFFIX)) {\n id = unwrapId(id, DYNAMIC_REGISTER_SUFFIX);\n }\n\n const extName = extname(id);\n if (\n extName !== '.cjs' &&\n id !== DYNAMIC_PACKAGES_ID &&\n !id.startsWith(DYNAMIC_JSON_PREFIX) &&\n (!filter(id) || !extensions.includes(extName))\n ) {\n return null;\n }\n\n try {\n return transformAndCheckExports.call(this, code, rawId);\n } catch (err) {\n return this.error(err, err.loc);\n }\n },\n\n moduleParsed({ id, meta: { commonjs: commonjsMeta } }) {\n if (commonjsMeta && commonjsMeta.isCommonJS != null) {\n setCommonJSMetaPromise(commonJsMetaPromises, id, commonjsMeta);\n return;\n }\n setCommonJSMetaPromise(commonJsMetaPromises, id, null);\n }\n };\n}\n"],"names":["makeLegalIdentifier","basename","extname","dirname","existsSync","join","readFileSync","statSync","path","glob","resolve","sep","nodeResolveSync","MagicString","attachScopes","walk","extractAssignedNames","isReference","createFilter","getCommonDir"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAO,SAAS,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;AAC1C,EAAE,IAAI;AACN,IAAI,OAAO,KAAK,CAAC,IAAI,EAAE,EAAE,0BAA0B,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7D,GAAG,CAAC,OAAO,GAAG,EAAE;AAChB,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/B,IAAI,MAAM,GAAG,CAAC;AACd,GAAG;AACH,CAAC;AACD;AACA,MAAM,eAAe,GAAG,uCAAuC,CAAC;AAChE;AACA,MAAM,iBAAiB,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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC;AACF;AACA,MAAM,oBAAoB,GAAG,CAAC,wNAAwN,CAAC,CAAC;AACxP;AACA,MAAM,kBAAkB,GAAG,CAAC;AAC5B;AACA,CAAC,EAAE,oBAAoB,CAAC;AACxB;AACA,CAAC,CAAC;AACF;AACA,MAAM,iBAAiB,GAAG,CAAC,qBAAqB,KAAK,CAAC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AI,IAAI,EAAE;AAC3D,QAAQ,sBAAsB,CAAC,oBAAoB,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC;AACvE,QAAQ,OAAO;AACf,OAAO;AACP,MAAM,sBAAsB,CAAC,oBAAoB,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;AAC7D,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
\ No newline at end of file
diff --git a/node_modules/@rollup/plugin-commonjs/package.json b/node_modules/@rollup/plugin-commonjs/package.json
deleted file mode 100644
index 3439420..0000000
--- a/node_modules/@rollup/plugin-commonjs/package.json
+++ /dev/null
@@ -1,116 +0,0 @@
-{
- "_from": "@rollup/plugin-commonjs",
- "_id": "@rollup/plugin-commonjs@21.0.2",
- "_inBundle": false,
- "_integrity": "sha512-d/OmjaLVO4j/aQX69bwpWPpbvI3TJkQuxoAk7BH8ew1PyoMBLTOuvJTjzG8oEoW7drIIqB0KCJtfFLu/2GClWg==",
- "_location": "/@rollup/plugin-commonjs",
- "_phantomChildren": {},
- "_requested": {
- "type": "tag",
- "registry": true,
- "raw": "@rollup/plugin-commonjs",
- "name": "@rollup/plugin-commonjs",
- "escapedName": "@rollup%2fplugin-commonjs",
- "scope": "@rollup",
- "rawSpec": "",
- "saveSpec": null,
- "fetchSpec": "latest"
- },
- "_requiredBy": [
- "#DEV:/",
- "#USER"
- ],
- "_resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.2.tgz",
- "_shasum": "0b9c539aa1837c94abfaf87945838b0fc8564891",
- "_spec": "@rollup/plugin-commonjs",
- "_where": "/Users/keiferju/Workplace/dllcnx/dTools",
- "author": {
- "name": "Rich Harris",
- "email": "richard.a.harris@gmail.com"
- },
- "ava": {
- "babel": {
- "compileEnhancements": false
- },
- "files": [
- "!**/fixtures/**",
- "!**/helpers/**",
- "!**/recipes/**",
- "!**/types.ts"
- ]
- },
- "bugs": {
- "url": "https://github.com/rollup/plugins/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "@rollup/pluginutils": "^3.1.0",
- "commondir": "^1.0.1",
- "estree-walker": "^2.0.1",
- "glob": "^7.1.6",
- "is-reference": "^1.2.1",
- "magic-string": "^0.25.7",
- "resolve": "^1.17.0"
- },
- "deprecated": false,
- "description": "Convert CommonJS modules to ES2015",
- "devDependencies": {
- "@rollup/plugin-json": "^4.1.0",
- "@rollup/plugin-node-resolve": "^8.4.0",
- "locate-character": "^2.0.5",
- "require-relative": "^0.8.7",
- "rollup": "^2.67.3",
- "shx": "^0.3.2",
- "source-map": "^0.7.3",
- "source-map-support": "^0.5.19",
- "typescript": "^3.9.7"
- },
- "engines": {
- "node": ">= 8.0.0"
- },
- "files": [
- "dist",
- "types",
- "README.md",
- "LICENSE"
- ],
- "homepage": "https://github.com/rollup/plugins/tree/master/packages/commonjs/#readme",
- "keywords": [
- "rollup",
- "plugin",
- "npm",
- "modules",
- "commonjs",
- "require"
- ],
- "license": "MIT",
- "main": "dist/index.js",
- "module": "dist/index.es.js",
- "name": "@rollup/plugin-commonjs",
- "peerDependencies": {
- "rollup": "^2.38.3"
- },
- "publishConfig": {
- "access": "public"
- },
- "repository": {
- "url": "git+https://github.com/rollup/plugins.git",
- "directory": "packages/commonjs"
- },
- "scripts": {
- "build": "rollup -c",
- "ci:coverage": "nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov",
- "ci:lint": "pnpm build && pnpm lint",
- "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
- "ci:test": "pnpm test -- --verbose && pnpm test:ts",
- "prebuild": "del-cli dist",
- "prepare": "if [ ! -d 'dist' ]; then pnpm build; fi",
- "prerelease": "pnpm build",
- "pretest": "pnpm build",
- "release": "pnpm plugin:release --workspace-root -- --pkg $npm_package_name",
- "test": "ava",
- "test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
- },
- "types": "types/index.d.ts",
- "version": "21.0.2"
-}
diff --git a/node_modules/@rollup/plugin-commonjs/types/index.d.ts b/node_modules/@rollup/plugin-commonjs/types/index.d.ts
deleted file mode 100644
index 2b0b067..0000000
--- a/node_modules/@rollup/plugin-commonjs/types/index.d.ts
+++ /dev/null
@@ -1,183 +0,0 @@
-import { FilterPattern } from '@rollup/pluginutils';
-import { Plugin } from 'rollup';
-
-type RequireReturnsDefaultOption = boolean | 'auto' | 'preferred' | 'namespace';
-
-interface RollupCommonJSOptions {
- /**
- * A minimatch pattern, or array of patterns, which specifies the files in
- * the build the plugin should operate on. By default, all files with
- * extension `".cjs"` or those in `extensions` are included, but you can narrow
- * this list by only including specific files. These files will be analyzed
- * and transpiled if either the analysis does not find ES module specific
- * statements or `transformMixedEsModules` is `true`.
- * @default undefined
- */
- include?: FilterPattern;
- /**
- * A minimatch pattern, or array of patterns, which specifies the files in
- * the build the plugin should _ignore_. By default, all files with
- * extensions other than those in `extensions` or `".cjs"` are ignored, but you
- * can exclude additional files. See also the `include` option.
- * @default undefined
- */
- exclude?: FilterPattern;
- /**
- * For extensionless imports, search for extensions other than .js in the
- * order specified. Note that you need to make sure that non-JavaScript files
- * are transpiled by another plugin first.
- * @default [ '.js' ]
- */
- extensions?: ReadonlyArray;
- /**
- * If true then uses of `global` won't be dealt with by this plugin
- * @default false
- */
- ignoreGlobal?: boolean;
- /**
- * If false, skips source map generation for CommonJS modules. This will
- * improve performance.
- * @default true
- */
- sourceMap?: boolean;
- /**
- * Some `require` calls cannot be resolved statically to be translated to
- * imports.
- * When this option is set to `false`, the generated code will either
- * directly throw an error when such a call is encountered or, when
- * `dynamicRequireTargets` is used, when such a call cannot be resolved with a
- * configured dynamic require target.
- * Setting this option to `true` will instead leave the `require` call in the
- * code or use it as a fallback for `dynamicRequireTargets`.
- * @default false
- */
- ignoreDynamicRequires?: boolean;
- /**
- * Instructs the plugin whether to enable mixed module transformations. This
- * is useful in scenarios with modules that contain a mix of ES `import`
- * statements and CommonJS `require` expressions. Set to `true` if `require`
- * calls should be transformed to imports in mixed modules, or `false` if the
- * `require` expressions should survive the transformation. The latter can be
- * important if the code contains environment detection, or you are coding
- * for an environment with special treatment for `require` calls such as
- * ElectronJS. See also the `ignore` option.
- * @default false
- */
- transformMixedEsModules?: boolean;
- /**
- * Sometimes you have to leave require statements unconverted. Pass an array
- * containing the IDs or a `id => boolean` function.
- * @default []
- */
- ignore?: ReadonlyArray | ((id: string) => boolean);
- /**
- * In most cases, where `require` calls are inside a `try-catch` clause,
- * they should be left unconverted as it requires an optional dependency
- * that may or may not be installed beside the rolled up package.
- * Due to the conversion of `require` to a static `import` - the call is hoisted
- * to the top of the file, outside of the `try-catch` clause.
- *
- * - `true`: All `require` calls inside a `try` will be left unconverted.
- * - `false`: All `require` calls inside a `try` will be converted as if the `try-catch` clause is not there.
- * - `remove`: Remove all `require` calls from inside any `try` block.
- * - `string[]`: Pass an array containing the IDs to left unconverted.
- * - `((id: string) => boolean|'remove')`: Pass a function that control individual IDs.
- *
- * @default false
- */
- ignoreTryCatch?:
- | boolean
- | 'remove'
- | ReadonlyArray
- | ((id: string) => boolean | 'remove');
- /**
- * Controls how to render imports from external dependencies. By default,
- * this plugin assumes that all external dependencies are CommonJS. This
- * means they are rendered as default imports to be compatible with e.g.
- * NodeJS where ES modules can only import a default export from a CommonJS
- * dependency.
- *
- * If you set `esmExternals` to `true`, this plugins assumes that all
- * external dependencies are ES modules and respect the
- * `requireReturnsDefault` option. If that option is not set, they will be
- * rendered as namespace imports.
- *
- * You can also supply an array of ids to be treated as ES modules, or a
- * function that will be passed each external id to determine if it is an ES
- * module.
- * @default false
- */
- esmExternals?: boolean | ReadonlyArray | ((id: string) => boolean);
- /**
- * Controls what is returned when requiring an ES module from a CommonJS file.
- * When using the `esmExternals` option, this will also apply to external
- * modules. By default, this plugin will render those imports as namespace
- * imports i.e.
- *
- * ```js
- * // input
- * const foo = require('foo');
- *
- * // output
- * import * as foo from 'foo';
- * ```
- *
- * However there are some situations where this may not be desired.
- * For these situations, you can change Rollup's behaviour either globally or
- * per module. To change it globally, set the `requireReturnsDefault` option
- * to one of the following values:
- *
- * - `false`: This is the default, requiring an ES module returns its
- * namespace. This is the only option that will also add a marker
- * `__esModule: true` to the namespace to support interop patterns in
- * CommonJS modules that are transpiled ES modules.
- * - `"namespace"`: Like `false`, requiring an ES module returns its
- * namespace, but the plugin does not add the `__esModule` marker and thus
- * creates more efficient code. For external dependencies when using
- * `esmExternals: true`, no additional interop code is generated.
- * - `"auto"`: This is complementary to how `output.exports: "auto"` works in
- * Rollup: If a module has a default export and no named exports, requiring
- * that module returns the default export. In all other cases, the namespace
- * is returned. For external dependencies when using `esmExternals: true`, a
- * corresponding interop helper is added.
- * - `"preferred"`: If a module has a default export, requiring that module
- * always returns the default export, no matter whether additional named
- * exports exist. This is similar to how previous versions of this plugin
- * worked. Again for external dependencies when using `esmExternals: true`,
- * an interop helper is added.
- * - `true`: This will always try to return the default export on require
- * without checking if it actually exists. This can throw at build time if
- * there is no default export. This is how external dependencies are handled
- * when `esmExternals` is not used. The advantage over the other options is
- * that, like `false`, this does not add an interop helper for external
- * dependencies, keeping the code lean.
- *
- * To change this for individual modules, you can supply a function for
- * `requireReturnsDefault` instead. This function will then be called once for
- * each required ES module or external dependency with the corresponding id
- * and allows you to return different values for different modules.
- * @default false
- */
- requireReturnsDefault?:
- | RequireReturnsDefaultOption
- | ((id: string) => RequireReturnsDefaultOption);
- /**
- * Some modules contain dynamic `require` calls, or require modules that
- * contain circular dependencies, which are not handled well by static
- * imports. Including those modules as `dynamicRequireTargets` will simulate a
- * CommonJS (NodeJS-like) environment for them with support for dynamic and
- * circular dependencies.
- *
- * Note: In extreme cases, this feature may result in some paths being
- * rendered as absolute in the final bundle. The plugin tries to avoid
- * exposing paths from the local machine, but if you are `dynamicRequirePaths`
- * with paths that are far away from your project's folder, that may require
- * replacing strings like `"/Users/John/Desktop/foo-project/"` -> `"/"`.
- */
- dynamicRequireTargets?: string | ReadonlyArray;
-}
-
-/**
- * Convert CommonJS modules to ES6, so they can be included in a Rollup bundle
- */
-export default function commonjs(options?: RollupCommonJSOptions): Plugin;
diff --git a/node_modules/@rollup/plugin-node-resolve/CHANGELOG.md b/node_modules/@rollup/plugin-node-resolve/CHANGELOG.md
deleted file mode 100755
index fd94c1e..0000000
--- a/node_modules/@rollup/plugin-node-resolve/CHANGELOG.md
+++ /dev/null
@@ -1,518 +0,0 @@
-# @rollup/plugin-node-resolve ChangeLog
-
-## v13.1.3
-
-_2022-01-05_
-
-### Bugfixes
-
-- fix: use correct version when published (#1063)
-
-## v13.1.2
-
-_2021-12-31_
-
-### Bugfixes
-
-- fix: forward meta-information from other plugins (#1062)
-
-## v13.1.1
-
-_2021-12-13_
-
-### Updates
-
-- test: add tests for mixing custom `exportConditions` with `browser: true` (#1043)
-
-## v13.1.0
-
-_2021-12-13_
-
-### Features
-
-- feat: expose plugin version (#1050)
-
-## v13.0.6
-
-_2021-10-19_
-
-### Bugfixes
-
-- fix: pass on isEntry flag (#1016)
-
-## v13.0.5
-
-_2021-09-21_
-
-### Updates
-
-- docs: fix readme heading depth (#999)
-
-## v13.0.4
-
-_2021-07-24_
-
-### Bugfixes
-
-- fix: Fix bug where JS import was converted to a TS import, resulting in an error when using export maps (#921)
-
-## v13.0.3
-
-_2021-07-24_
-
-### Bugfixes
-
-- fix: handle browser-mapped paths correctly in nested contexts (#920)
-
-## v13.0.2
-
-_2021-07-15_
-
-### Bugfixes
-
-- fix: handle "package.json" being in path (#927)
-
-## v13.0.1
-
-_2021-07-15_
-
-### Updates
-
-- docs: Document how to get Node.js exports resolution (#884)
-
-## v13.0.0
-
-_2021-05-04_
-
-### Breaking Changes
-
-- fix!: mark module as external if resolved module is external (#799)
-
-### Features
-
-- feat: Follow up to #843, refining exports and browser field interaction (#866)
-
-## v12.0.0
-
-_2021-05-04_
-
-### Breaking Changes
-
-- fix!: mark module as external if resolved module is external (#799)
-
-### Features
-
-- feat: Follow up to #843, refining exports and browser field interaction (#866)
-
-## v11.2.1
-
-_2021-03-26_
-
-### Bugfixes
-
-- fix: fs.exists is incorrectly promisified (#835)
-
-## v11.2.0
-
-_2021-02-14_
-
-### Features
-
-- feat: add `ignoreSideEffectsForRoot` option (#694)
-
-### Updates
-
-- chore: mark `url` as an external and throw on warning (#783)
-- docs: clearer "Resolving Built-Ins" doc (#782)
-
-## v11.1.1
-
-_2021-01-29_
-
-### Bugfixes
-
-- fix: only log last resolve error (#750)
-
-### Updates
-
-- docs: add clarification on the order of package entrypoints (#768)
-
-## v11.1.0
-
-_2021-01-15_
-
-### Features
-
-- feat: support pkg imports and export array (#693)
-
-## v11.0.1
-
-_2020-12-14_
-
-### Bugfixes
-
-- fix: export map specificity (#675)
-- fix: add missing type import (#668)
-
-### Updates
-
-- docs: corrected word "yse" to "use" (#723)
-
-## v11.0.0
-
-_2020-11-30_
-
-### Breaking Changes
-
-- refactor!: simplify builtins and remove `customResolveOptions` (#656)
-- feat!: Mark built-ins as external (#627)
-- feat!: support package entry points (#540)
-
-### Bugfixes
-
-- fix: refactor handling builtins, do not log warning if no local version (#637)
-
-### Updates
-
-- docs: fix import statements in examples in README.md (#646)
-
-## v10.0.0
-
-_2020-10-27_
-
-### Breaking Changes
-
-- fix!: resolve hash in path (#588)
-
-### Bugfixes
-
-- fix: do not ignore exceptions (#564)
-
-## v9.0.0
-
-_2020-08-13_
-
-### Breaking Changes
-
-- chore: update dependencies (e632469)
-
-### Updates
-
-- refactor: remove deep-freeze from dependencies (#529)
-- chore: clean up changelog (84dfddb)
-
-## v8.4.0
-
-_2020-07-12_
-
-### Features
-
-- feat: preserve search params and hashes (#487)
-- feat: support .js imports in TypeScript (#480)
-
-### Updates
-
-- docs: fix named export use in readme (#456)
-- docs: correct mainFields valid values (#469)
-
-## v8.1.0
-
-_2020-06-22_
-
-### Features
-
-- feat: add native node es modules support (#413)
-
-## v8.0.1
-
-_2020-06-05_
-
-### Bugfixes
-
-- fix: handle nested entry modules with the resolveOnly option (#430)
-
-## v8.0.0
-
-_2020-05-20_
-
-### Breaking Changes
-
-- feat: Add default export (#361)
-- feat: export defaults (#301)
-
-### Bugfixes
-
-- fix: resolve local files if `resolveOption` is set (#337)
-
-### Updates
-
-- docs: correct misspelling (#343)
-
-## v7.1.3
-
-_2020-04-12_
-
-### Bugfixes
-
-- fix: resolve symlinked entry point properly (#291)
-
-## v7.1.2
-
-_2020-04-12_
-
-### Updates
-
-- docs: fix url (#289)
-
-## v7.1.1
-
-_2020-02-03_
-
-### Bugfixes
-
-- fix: main fields regression (#196)
-
-## v7.1.0
-
-_2020-02-01_
-
-### Updates
-
-- refactor: clean codebase and fix external warnings (#155)
-
-## v7.0.0
-
-_2020-01-07_
-
-### Breaking Changes
-
-- feat: dedupe by package name (#99)
-
-## v6.1.0
-
-_2020-01-04_
-
-### Bugfixes
-
-- fix: allow deduplicating custom module dirs (#101)
-
-### Features
-
-- feat: add rootDir option (#98)
-
-### Updates
-
-- docs: improve doc related to mainFields (#138)
-
-## 6.0.0
-
-_2019-11-25_
-
-- **Breaking:** Minimum compatible Rollup version is 1.20.0
-- **Breaking:** Minimum supported Node version is 8.0.0
-- Published as @rollup/plugin-node-resolve
-
-## 5.2.1 (unreleased)
-
-- add missing MIT license file ([#233](https://github.com/rollup/rollup-plugin-node-resolve/pull/233) by @kenjiO)
-- Fix incorrect example of config ([#239](https://github.com/rollup/rollup-plugin-node-resolve/pull/240) by @myshov)
-- Fix typo in readme ([#240](https://github.com/rollup/rollup-plugin-node-resolve/pull/240) by @LinusU)
-
-## 5.2.0 (2019-06-29)
-
-- dedupe accepts a function ([#225](https://github.com/rollup/rollup-plugin-node-resolve/pull/225) by @manucorporat)
-
-## 5.1.1 (2019-06-29)
-
-- Move Rollup version check to buildStart hook to avoid issues ([#232](https://github.com/rollup/rollup-plugin-node-resolve/pull/232) by @lukastaegert)
-
-## 5.1.0 (2019-06-22)
-
-- Fix path fragment inputs ([#229](https://github.com/rollup/rollup-plugin-node-resolve/pull/229) by @bterlson)
-
-## 5.0.4 (2019-06-22)
-
-- Treat sideEffects array as inclusion list ([#227](https://github.com/rollup/rollup-plugin-node-resolve/pull/227) by @mikeharder)
-
-## 5.0.3 (2019-06-16)
-
-- Make empty.js a virtual module ([#224](https://github.com/rollup/rollup-plugin-node-resolve/pull/224) by @manucorporat)
-
-## 5.0.2 (2019-06-13)
-
-- Support resolve 1.11.1, add built-in test ([#223](https://github.com/rollup/rollup-plugin-node-resolve/pull/223) by @bterlson)
-
-## 5.0.1 (2019-05-31)
-
-- Update to resolve@1.11.0 for better performance ([#220](https://github.com/rollup/rollup-plugin-node-resolve/pull/220) by @keithamus)
-
-## 5.0.0 (2019-05-15)
-
-- Replace bublé with babel, update dependencies ([#216](https://github.com/rollup/rollup-plugin-node-resolve/pull/216) by @mecurc)
-- Handle module side-effects ([#219](https://github.com/rollup/rollup-plugin-node-resolve/pull/219) by @lukastaegert)
-
-### Breaking Changes
-
-- Requires at least rollup@1.11.0 to work (v1.12.0 for module side-effects to be respected)
-- If used with rollup-plugin-commonjs, it should be at least v10.0.0
-
-## 4.2.4 (2019-05-11)
-
-- Add note on builtins to Readme ([#215](https://github.com/rollup/rollup-plugin-node-resolve/pull/215) by @keithamus)
-- Add issue templates ([#217](https://github.com/rollup/rollup-plugin-node-resolve/pull/217) by @mecurc)
-- Improve performance by caching `isDir` ([#218](https://github.com/rollup/rollup-plugin-node-resolve/pull/218) by @keithamus)
-
-## 4.2.3 (2019-04-11)
-
-- Fix ordering of jsnext:main when using the jsnext option ([#209](https://github.com/rollup/rollup-plugin-node-resolve/pull/209) by @lukastaegert)
-
-## 4.2.2 (2019-04-10)
-
-- Fix TypeScript typings (rename and export Options interface) ([#206](https://github.com/rollup/rollup-plugin-node-resolve/pull/206) by @Kocal)
-- Fix mainfields typing ([#207](https://github.com/rollup/rollup-plugin-node-resolve/pull/207) by @nicolashenry)
-
-## 4.2.1 (2019-04-06)
-
-- Respect setting the deprecated fields "module", "main", and "jsnext" ([#204](https://github.com/rollup/rollup-plugin-node-resolve/pull/204) by @nick-woodward)
-
-## 4.2.0 (2019-04-06)
-
-- Add new mainfields option ([#182](https://github.com/rollup/rollup-plugin-node-resolve/pull/182) by @keithamus)
-- Added dedupe option to prevent bundling the same package multiple times ([#201](https://github.com/rollup/rollup-plugin-node-resolve/pull/182) by @sormy)
-
-## 4.1.0 (2019-04-05)
-
-- Add TypeScript typings ([#189](https://github.com/rollup/rollup-plugin-node-resolve/pull/189) by @NotWoods)
-- Update dependencies ([#202](https://github.com/rollup/rollup-plugin-node-resolve/pull/202) by @lukastaegert)
-
-## 4.0.1 (2019-02-22)
-
-- Fix issue when external modules are specified in `package.browser` ([#143](https://github.com/rollup/rollup-plugin-node-resolve/pull/143) by @keithamus)
-- Fix `package.browser` mapping issue when `false` is specified ([#183](https://github.com/rollup/rollup-plugin-node-resolve/pull/183) by @allex)
-
-## 4.0.0 (2018-12-09)
-
-This release will support rollup@1.0
-
-### Features
-
-- Resolve modules used to define manual chunks ([#185](https://github.com/rollup/rollup-plugin-node-resolve/pull/185) by @mcshaman)
-- Update dependencies and plugin hook usage ([#187](https://github.com/rollup/rollup-plugin-node-resolve/pull/187) by @lukastaegert)
-
-## 3.4.0 (2018-09-04)
-
-This release now supports `.mjs` files by default
-
-### Features
-
-- feat: Support .mjs files by default (https://github.com/rollup/rollup-plugin-node-resolve/pull/151, by @leebyron)
-
-## 3.3.0 (2018-03-17)
-
-This release adds the `only` option
-
-### New Features
-
-- feat: add `only` option (#83; @arantes555)
-
-### Docs
-
-- docs: correct description of `jail` option (#120; @GeorgeTaveras1231)
-
-## 3.2.0 (2018-03-07)
-
-This release caches reading/statting of files, to improve speed.
-
-### Performance Improvements
-
-- perf: cache file stats/reads (#126; @keithamus)
-
-## 3.0.4 (unreleased)
-
-- Update lockfile [#137](https://github.com/rollup/rollup-plugin-node-resolve/issues/137)
-- Update rollup dependency [#138](https://github.com/rollup/rollup-plugin-node-resolve/issues/138)
-- Enable installation from Github [#142](https://github.com/rollup/rollup-plugin-node-resolve/issues/142)
-
-## 3.0.3
-
-- Fix [#130](https://github.com/rollup/rollup-plugin-node-resolve/issues/130) and [#131](https://github.com/rollup/rollup-plugin-node-resolve/issues/131)
-
-## 3.0.2
-
-- Ensure `pkg.browser` is an object if necessary ([#129](https://github.com/rollup/rollup-plugin-node-resolve/pull/129))
-
-## 3.0.1
-
-- Remove `browser-resolve` dependency ([#127](https://github.com/rollup/rollup-plugin-node-resolve/pull/127))
-
-## 3.0.0
-
-- [BREAKING] Remove `options.skip` ([#90](https://github.com/rollup/rollup-plugin-node-resolve/pull/90))
-- Add `modulesOnly` option ([#96](https://github.com/rollup/rollup-plugin-node-resolve/pull/96))
-
-## 2.1.1
-
-- Prevent `jail` from breaking builds on Windows ([#93](https://github.com/rollup/rollup-plugin-node-resolve/issues/93))
-
-## 2.1.0
-
-- Add `jail` option ([#53](https://github.com/rollup/rollup-plugin-node-resolve/pull/53))
-- Add `customResolveOptions` option ([#79](https://github.com/rollup/rollup-plugin-node-resolve/pull/79))
-- Support symlinked packages ([#82](https://github.com/rollup/rollup-plugin-node-resolve/pull/82))
-
-## 2.0.0
-
-- Add support `module` field in package.json as an official alternative to jsnext
-
-## 1.7.3
-
-- Error messages are more descriptive ([#50](https://github.com/rollup/rollup-plugin-node-resolve/issues/50))
-
-## 1.7.2
-
-- Allow entry point paths beginning with ./
-
-## 1.7.1
-
-- Return a `name`
-
-## 1.7.0
-
-- Allow relative IDs to be external ([#32](https://github.com/rollup/rollup-plugin-node-resolve/pull/32))
-
-## 1.6.0
-
-- Skip IDs containing null character
-
-## 1.5.0
-
-- Prefer built-in options, but allow opting out ([#28](https://github.com/rollup/rollup-plugin-node-resolve/pull/28))
-
-## 1.4.0
-
-- Pass `options.extensions` through to `node-resolve`
-
-## 1.3.0
-
-- `skip: true` skips all packages that don't satisfy the `main` or `jsnext` options ([#16](https://github.com/rollup/rollup-plugin-node-resolve/pull/16))
-
-## 1.2.1
-
-- Support scoped packages in `skip` option ([#15](https://github.com/rollup/rollup-plugin-node-resolve/issues/15))
-
-## 1.2.0
-
-- Support `browser` field ([#8](https://github.com/rollup/rollup-plugin-node-resolve/issues/8))
-- Get tests to pass on Windows
-
-## 1.1.0
-
-- Use node-resolve to handle various corner cases
-
-## 1.0.0
-
-- Add ES6 build, use Rollup 0.20.0
-
-## 0.1.0
-
-- First release
diff --git a/node_modules/@rollup/plugin-node-resolve/LICENSE b/node_modules/@rollup/plugin-node-resolve/LICENSE
deleted file mode 100644
index 5e46702..0000000
--- a/node_modules/@rollup/plugin-node-resolve/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/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.
diff --git a/node_modules/@rollup/plugin-node-resolve/README.md b/node_modules/@rollup/plugin-node-resolve/README.md
deleted file mode 100755
index 905d150..0000000
--- a/node_modules/@rollup/plugin-node-resolve/README.md
+++ /dev/null
@@ -1,229 +0,0 @@
-[npm]: https://img.shields.io/npm/v/@rollup/plugin-node-resolve
-[npm-url]: https://www.npmjs.com/package/@rollup/plugin-node-resolve
-[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-node-resolve
-[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-node-resolve
-
-[![npm][npm]][npm-url]
-[![size][size]][size-url]
-[](https://liberamanifesto.com)
-
-# @rollup/plugin-node-resolve
-
-🍣 A Rollup plugin which locates modules using the [Node resolution algorithm](https://nodejs.org/api/modules.html#modules_all_together), for using third party modules in `node_modules`
-
-## Requirements
-
-This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
-
-## Install
-
-Using npm:
-
-```console
-npm install @rollup/plugin-node-resolve --save-dev
-```
-
-## Usage
-
-Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
-
-```js
-import { nodeResolve } from '@rollup/plugin-node-resolve';
-
-export default {
- input: 'src/index.js',
- output: {
- dir: 'output',
- format: 'cjs'
- },
- plugins: [nodeResolve()]
-};
-```
-
-Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).
-
-## Package entrypoints
-
-This plugin supports the package entrypoints feature from node js, specified in the `exports` or `imports` field of a package. Check the [official documentation](https://nodejs.org/api/packages.html#packages_package_entry_points) for more information on how this works. This is the default behavior. In the abscence of these fields, the fields in `mainFields` will be the ones to be used.
-
-## Options
-
-### `exportConditions`
-
-Type: `Array[...String]`
-Default: `[]`
-
-Additional conditions of the package.json exports field to match when resolving modules. By default, this plugin looks for the `['default', 'module', 'import']` conditions when resolving imports.
-
-When using `@rollup/plugin-commonjs` v16 or higher, this plugin will use the `['default', 'module', 'require']` conditions when resolving require statements.
-
-Setting this option will add extra conditions on top of the default conditions. See https://nodejs.org/api/packages.html#packages_conditional_exports for more information.
-
-In order to get the [resolution behavior of Node.js](https://nodejs.org/api/packages.html#packages_conditional_exports), set this to `['node']`.
-
-### `browser`
-
-Type: `Boolean`
-Default: `false`
-
-If `true`, instructs the plugin to use the browser module resolutions in `package.json` and adds `'browser'` to `exportConditions` if it is not present so browser conditionals in `exports` are applied. If `false`, any browser properties in package files will be ignored. Alternatively, a value of `'browser'` can be added to both the `mainFields` and `exportConditions` options, however this option takes precedence over `mainFields`.
-
-> This option does not work when a package is using [package entrypoints](https://nodejs.org/api/packages.html#packages_package_entry_points)
-
-### `moduleDirectories`
-
-Type: `Array[...String]`
-Default: `['node_modules']`
-
-One or more directories in which to recursively look for modules.
-
-### `dedupe`
-
-Type: `Array[...String]`
-Default: `[]`
-
-An `Array` of modules names, which instructs the plugin to force resolving for the specified modules to the root `node_modules`. Helps to prevent bundling the same package multiple times if package is imported from dependencies.
-
-```js
-dedupe: ['my-package', '@namespace/my-package'];
-```
-
-This will deduplicate bare imports such as:
-
-```js
-import 'my-package';
-import '@namespace/my-package';
-```
-
-And it will deduplicate deep imports such as:
-
-```js
-import 'my-package/foo.js';
-import '@namespace/my-package/bar.js';
-```
-
-### `extensions`
-
-Type: `Array[...String]`
-Default: `['.mjs', '.js', '.json', '.node']`
-
-Specifies the extensions of files that the plugin will operate on.
-
-### `jail`
-
-Type: `String`
-Default: `'/'`
-
-Locks the module search within specified path (e.g. chroot). Modules defined outside this path will be ignored by this plugin.
-
-### `mainFields`
-
-Type: `Array[...String]`
-Default: `['module', 'main']`
-Valid values: `['browser', 'jsnext:main', 'module', 'main']`
-
-Specifies the properties to scan within a `package.json`, used to determine the bundle entry point. The order of property names is significant, as the first-found property is used as the resolved entry point. If the array contains `'browser'`, key/values specified in the `package.json` `browser` property will be used.
-
-### `preferBuiltins`
-
-Type: `Boolean`
-Default: `true` (with warnings if a builtin module is used over a local version. Set to `true` to disable warning.)
-
-If `true`, the plugin will prefer built-in modules (e.g. `fs`, `path`). If `false`, the plugin will look for locally installed modules of the same name.
-
-### `modulesOnly`
-
-Type: `Boolean`
-Default: `false`
-
-If `true`, inspect resolved files to assert that they are ES2015 modules.
-
-### `resolveOnly`
-
-Type: `Array[...String|RegExp]`
-Default: `null`
-
-An `Array` which instructs the plugin to limit module resolution to those whose names match patterns in the array. _Note: Modules not matching any patterns will be marked as external._
-
-Example: `resolveOnly: ['batman', /^@batcave\/.*$/]`
-
-### `rootDir`
-
-Type: `String`
-Default: `process.cwd()`
-
-Specifies the root directory from which to resolve modules. Typically used when resolving entry-point imports, and when resolving deduplicated modules. Useful when executing rollup in a package of a mono-repository.
-
-```
-// Set the root directory to be the parent folder
-rootDir: path.join(process.cwd(), '..')
-```
-
-### `ignoreSideEffectsForRoot`
-
-If you use the `sideEffects` property in the package.json, by default this is respected for files in the root package. Set to `true` to ignore the `sideEffects` configuration for the root package.
-
-## Preserving symlinks
-
-This plugin honours the rollup [`preserveSymlinks`](https://rollupjs.org/guide/en/#preservesymlinks) option.
-
-## Using with @rollup/plugin-commonjs
-
-Since most packages in your node_modules folder are probably legacy CommonJS rather than JavaScript modules, you may need to use [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/master/packages/commonjs):
-
-```js
-// rollup.config.js
-import { nodeResolve } from '@rollup/plugin-node-resolve';
-import commonjs from '@rollup/plugin-commonjs';
-
-export default {
- input: 'main.js',
- output: {
- file: 'bundle.js',
- format: 'iife',
- name: 'MyModule'
- },
- plugins: [nodeResolve(), commonjs()]
-};
-```
-
-## Resolving Built-Ins (like `fs`)
-
-By default this plugin will prefer built-ins over local modules, marking them as external.
-
-See [`preferBuiltins`](#preferbuiltins).
-
-To provide stubbed versions of Node built-ins, use a plugin like [rollup-plugin-node-polyfills](https://github.com/ionic-team/rollup-plugin-node-polyfills) and set `preferBuiltins` to `false`. e.g.
-
-```js
-import { nodeResolve } from '@rollup/plugin-node-resolve';
-import nodePolyfills from 'rollup-plugin-node-polyfills';
-export default ({
- input: ...,
- plugins: [
- nodePolyfills(),
- nodeResolve({ preferBuiltins: false })
- ],
- external: builtins,
- output: ...
-})
-```
-
-## Resolving require statements
-
-According to [NodeJS module resolution](https://nodejs.org/api/packages.html#packages_package_entry_points) `require` statements should resolve using the `require` condition in the package exports field, while es modules should use the `import` condition.
-
-The node resolve plugin uses `import` by default, you can opt into using the `require` semantics by passing an extra option to the resolve function:
-
-```js
-this.resolve(importee, importer, {
- skipSelf: true,
- custom: { 'node-resolve': { isRequire: true } }
-});
-```
-
-## Meta
-
-[CONTRIBUTING](/.github/CONTRIBUTING.md)
-
-[LICENSE (MIT)](/LICENSE)
diff --git a/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js b/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js
deleted file mode 100644
index 55ccc73..0000000
--- a/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js
+++ /dev/null
@@ -1,1199 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-var path = require('path');
-var builtinList = require('builtin-modules');
-var deepMerge = require('deepmerge');
-var isModule = require('is-module');
-var fs = require('fs');
-var util = require('util');
-var url = require('url');
-var resolve = require('resolve');
-var pluginutils = require('@rollup/pluginutils');
-
-function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
-
-var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
-var builtinList__default = /*#__PURE__*/_interopDefaultLegacy(builtinList);
-var deepMerge__default = /*#__PURE__*/_interopDefaultLegacy(deepMerge);
-var isModule__default = /*#__PURE__*/_interopDefaultLegacy(isModule);
-var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
-var resolve__default = /*#__PURE__*/_interopDefaultLegacy(resolve);
-
-var version = "13.1.3";
-
-util.promisify(fs__default["default"].access);
-const readFile$1 = util.promisify(fs__default["default"].readFile);
-const realpath = util.promisify(fs__default["default"].realpath);
-const stat = util.promisify(fs__default["default"].stat);
-
-async function fileExists(filePath) {
- try {
- const res = await stat(filePath);
- return res.isFile();
- } catch {
- return false;
- }
-}
-
-async function resolveSymlink(path) {
- return (await fileExists(path)) ? realpath(path) : path;
-}
-
-const onError = (error) => {
- if (error.code === 'ENOENT') {
- return false;
- }
- throw error;
-};
-
-const makeCache = (fn) => {
- const cache = new Map();
- const wrapped = async (param, done) => {
- if (cache.has(param) === false) {
- cache.set(
- param,
- fn(param).catch((err) => {
- cache.delete(param);
- throw err;
- })
- );
- }
-
- try {
- const result = cache.get(param);
- const value = await result;
- return done(null, value);
- } catch (error) {
- return done(error);
- }
- };
-
- wrapped.clear = () => cache.clear();
-
- return wrapped;
-};
-
-const isDirCached = makeCache(async (file) => {
- try {
- const stats = await stat(file);
- return stats.isDirectory();
- } catch (error) {
- return onError(error);
- }
-});
-
-const isFileCached = makeCache(async (file) => {
- try {
- const stats = await stat(file);
- return stats.isFile();
- } catch (error) {
- return onError(error);
- }
-});
-
-const readCachedFile = makeCache(readFile$1);
-
-function handleDeprecatedOptions(opts) {
- const warnings = [];
-
- if (opts.customResolveOptions) {
- const { customResolveOptions } = opts;
- if (customResolveOptions.moduleDirectory) {
- // eslint-disable-next-line no-param-reassign
- opts.moduleDirectories = Array.isArray(customResolveOptions.moduleDirectory)
- ? customResolveOptions.moduleDirectory
- : [customResolveOptions.moduleDirectory];
-
- warnings.push(
- 'node-resolve: The `customResolveOptions.moduleDirectory` option has been deprecated. Use `moduleDirectories`, which must be an array.'
- );
- }
-
- if (customResolveOptions.preserveSymlinks) {
- throw new Error(
- 'node-resolve: `customResolveOptions.preserveSymlinks` is no longer an option. We now always use the rollup `preserveSymlinks` option.'
- );
- }
-
- [
- 'basedir',
- 'package',
- 'extensions',
- 'includeCoreModules',
- 'readFile',
- 'isFile',
- 'isDirectory',
- 'realpath',
- 'packageFilter',
- 'pathFilter',
- 'paths',
- 'packageIterator'
- ].forEach((resolveOption) => {
- if (customResolveOptions[resolveOption]) {
- throw new Error(
- `node-resolve: \`customResolveOptions.${resolveOption}\` is no longer an option. If you need this, please open an issue.`
- );
- }
- });
- }
-
- return { warnings };
-}
-
-// returns the imported package name for bare module imports
-function getPackageName(id) {
- if (id.startsWith('.') || id.startsWith('/')) {
- return null;
- }
-
- const split = id.split('/');
-
- // @my-scope/my-package/foo.js -> @my-scope/my-package
- // @my-scope/my-package -> @my-scope/my-package
- if (split[0][0] === '@') {
- return `${split[0]}/${split[1]}`;
- }
-
- // my-package/foo.js -> my-package
- // my-package -> my-package
- return split[0];
-}
-
-function getMainFields(options) {
- let mainFields;
- if (options.mainFields) {
- ({ mainFields } = options);
- } else {
- mainFields = ['module', 'main'];
- }
- if (options.browser && mainFields.indexOf('browser') === -1) {
- return ['browser'].concat(mainFields);
- }
- if (!mainFields.length) {
- throw new Error('Please ensure at least one `mainFields` value is specified');
- }
- return mainFields;
-}
-
-function getPackageInfo(options) {
- const {
- cache,
- extensions,
- pkg,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- rootDir,
- ignoreSideEffectsForRoot
- } = options;
- let { pkgPath } = options;
-
- if (cache.has(pkgPath)) {
- return cache.get(pkgPath);
- }
-
- // browserify/resolve doesn't realpath paths returned in its packageFilter callback
- if (!preserveSymlinks) {
- pkgPath = fs.realpathSync(pkgPath);
- }
-
- const pkgRoot = path.dirname(pkgPath);
-
- const packageInfo = {
- // copy as we are about to munge the `main` field of `pkg`.
- packageJson: { ...pkg },
-
- // path to package.json file
- packageJsonPath: pkgPath,
-
- // directory containing the package.json
- root: pkgRoot,
-
- // which main field was used during resolution of this module (main, module, or browser)
- resolvedMainField: 'main',
-
- // whether the browser map was used to resolve the entry point to this module
- browserMappedMain: false,
-
- // the entry point of the module with respect to the selected main field and any
- // relevant browser mappings.
- resolvedEntryPoint: ''
- };
-
- let overriddenMain = false;
- for (let i = 0; i < mainFields.length; i++) {
- const field = mainFields[i];
- if (typeof pkg[field] === 'string') {
- pkg.main = pkg[field];
- packageInfo.resolvedMainField = field;
- overriddenMain = true;
- break;
- }
- }
-
- const internalPackageInfo = {
- cachedPkg: pkg,
- hasModuleSideEffects: () => null,
- hasPackageEntry: overriddenMain !== false || mainFields.indexOf('main') !== -1,
- packageBrowserField:
- useBrowserOverrides &&
- typeof pkg.browser === 'object' &&
- Object.keys(pkg.browser).reduce((browser, key) => {
- let resolved = pkg.browser[key];
- if (resolved && resolved[0] === '.') {
- resolved = path.resolve(pkgRoot, resolved);
- }
- /* eslint-disable no-param-reassign */
- browser[key] = resolved;
- if (key[0] === '.') {
- const absoluteKey = path.resolve(pkgRoot, key);
- browser[absoluteKey] = resolved;
- if (!path.extname(key)) {
- extensions.reduce((subBrowser, ext) => {
- subBrowser[absoluteKey + ext] = subBrowser[key];
- return subBrowser;
- }, browser);
- }
- }
- return browser;
- }, {}),
- packageInfo
- };
-
- const browserMap = internalPackageInfo.packageBrowserField;
- if (
- useBrowserOverrides &&
- typeof pkg.browser === 'object' &&
- // eslint-disable-next-line no-prototype-builtins
- browserMap.hasOwnProperty(pkg.main)
- ) {
- packageInfo.resolvedEntryPoint = browserMap[pkg.main];
- packageInfo.browserMappedMain = true;
- } else {
- // index.node is technically a valid default entrypoint as well...
- packageInfo.resolvedEntryPoint = path.resolve(pkgRoot, pkg.main || 'index.js');
- packageInfo.browserMappedMain = false;
- }
-
- if (!ignoreSideEffectsForRoot || rootDir !== pkgRoot) {
- const packageSideEffects = pkg.sideEffects;
- if (typeof packageSideEffects === 'boolean') {
- internalPackageInfo.hasModuleSideEffects = () => packageSideEffects;
- } else if (Array.isArray(packageSideEffects)) {
- internalPackageInfo.hasModuleSideEffects = pluginutils.createFilter(packageSideEffects, null, {
- resolve: pkgRoot
- });
- }
- }
-
- cache.set(pkgPath, internalPackageInfo);
- return internalPackageInfo;
-}
-
-function normalizeInput(input) {
- if (Array.isArray(input)) {
- return input;
- } else if (typeof input === 'object') {
- return Object.values(input);
- }
-
- // otherwise it's a string
- return [input];
-}
-
-/* eslint-disable no-await-in-loop */
-
-function isModuleDir(current, moduleDirs) {
- return moduleDirs.some((dir) => current.endsWith(dir));
-}
-
-async function findPackageJson(base, moduleDirs) {
- const { root } = path__default["default"].parse(base);
- let current = base;
-
- while (current !== root && !isModuleDir(current, moduleDirs)) {
- const pkgJsonPath = path__default["default"].join(current, 'package.json');
- if (await fileExists(pkgJsonPath)) {
- const pkgJsonString = fs__default["default"].readFileSync(pkgJsonPath, 'utf-8');
- return { pkgJson: JSON.parse(pkgJsonString), pkgPath: current, pkgJsonPath };
- }
- current = path__default["default"].resolve(current, '..');
- }
- return null;
-}
-
-function isUrl(str) {
- try {
- return !!new URL(str);
- } catch (_) {
- return false;
- }
-}
-
-function isConditions(exports) {
- return typeof exports === 'object' && Object.keys(exports).every((k) => !k.startsWith('.'));
-}
-
-function isMappings(exports) {
- return typeof exports === 'object' && !isConditions(exports);
-}
-
-function isMixedExports(exports) {
- const keys = Object.keys(exports);
- return keys.some((k) => k.startsWith('.')) && keys.some((k) => !k.startsWith('.'));
-}
-
-function createBaseErrorMsg(importSpecifier, importer) {
- return `Could not resolve import "${importSpecifier}" in ${importer}`;
-}
-
-function createErrorMsg(context, reason, internal) {
- const { importSpecifier, importer, pkgJsonPath } = context;
- const base = createBaseErrorMsg(importSpecifier, importer);
- const field = internal ? 'imports' : 'exports';
- return `${base} using ${field} defined in ${pkgJsonPath}.${reason ? ` ${reason}` : ''}`;
-}
-
-class ResolveError extends Error {}
-
-class InvalidConfigurationError extends ResolveError {
- constructor(context, reason) {
- super(createErrorMsg(context, `Invalid "exports" field. ${reason}`));
- }
-}
-
-class InvalidModuleSpecifierError extends ResolveError {
- constructor(context, internal, reason) {
- super(createErrorMsg(context, reason, internal));
- }
-}
-
-class InvalidPackageTargetError extends ResolveError {
- constructor(context, reason) {
- super(createErrorMsg(context, reason));
- }
-}
-
-/* eslint-disable no-await-in-loop, no-undefined */
-
-function includesInvalidSegments(pathSegments, moduleDirs) {
- return pathSegments
- .split('/')
- .slice(1)
- .some((t) => ['.', '..', ...moduleDirs].includes(t));
-}
-
-async function resolvePackageTarget(context, { target, subpath, pattern, internal }) {
- if (typeof target === 'string') {
- if (!pattern && subpath.length > 0 && !target.endsWith('/')) {
- throw new InvalidModuleSpecifierError(context);
- }
-
- if (!target.startsWith('./')) {
- if (internal && !['/', '../'].some((p) => target.startsWith(p)) && !isUrl(target)) {
- // this is a bare package import, remap it and resolve it using regular node resolve
- if (pattern) {
- const result = await context.resolveId(
- target.replace(/\*/g, subpath),
- context.pkgURL.href
- );
- return result ? url.pathToFileURL(result.location).href : null;
- }
-
- const result = await context.resolveId(`${target}${subpath}`, context.pkgURL.href);
- return result ? url.pathToFileURL(result.location).href : null;
- }
- throw new InvalidPackageTargetError(context, `Invalid mapping: "${target}".`);
- }
-
- if (includesInvalidSegments(target, context.moduleDirs)) {
- throw new InvalidPackageTargetError(context, `Invalid mapping: "${target}".`);
- }
-
- const resolvedTarget = new URL(target, context.pkgURL);
- if (!resolvedTarget.href.startsWith(context.pkgURL.href)) {
- throw new InvalidPackageTargetError(
- context,
- `Resolved to ${resolvedTarget.href} which is outside package ${context.pkgURL.href}`
- );
- }
-
- if (includesInvalidSegments(subpath, context.moduleDirs)) {
- throw new InvalidModuleSpecifierError(context);
- }
-
- if (pattern) {
- return resolvedTarget.href.replace(/\*/g, subpath);
- }
- return new URL(subpath, resolvedTarget).href;
- }
-
- if (Array.isArray(target)) {
- let lastError;
- for (const item of target) {
- try {
- const resolved = await resolvePackageTarget(context, {
- target: item,
- subpath,
- pattern,
- internal
- });
-
- // return if defined or null, but not undefined
- if (resolved !== undefined) {
- return resolved;
- }
- } catch (error) {
- if (!(error instanceof InvalidPackageTargetError)) {
- throw error;
- } else {
- lastError = error;
- }
- }
- }
-
- if (lastError) {
- throw lastError;
- }
- return null;
- }
-
- if (target && typeof target === 'object') {
- for (const [key, value] of Object.entries(target)) {
- if (key === 'default' || context.conditions.includes(key)) {
- const resolved = await resolvePackageTarget(context, {
- target: value,
- subpath,
- pattern,
- internal
- });
-
- // return if defined or null, but not undefined
- if (resolved !== undefined) {
- return resolved;
- }
- }
- }
- return undefined;
- }
-
- if (target === null) {
- return null;
- }
-
- throw new InvalidPackageTargetError(context, `Invalid exports field.`);
-}
-
-/* eslint-disable no-await-in-loop */
-
-async function resolvePackageImportsExports(context, { matchKey, matchObj, internal }) {
- if (!matchKey.endsWith('*') && matchKey in matchObj) {
- const target = matchObj[matchKey];
- const resolved = await resolvePackageTarget(context, { target, subpath: '', internal });
- return resolved;
- }
-
- const expansionKeys = Object.keys(matchObj)
- .filter((k) => k.endsWith('/') || k.endsWith('*'))
- .sort((a, b) => b.length - a.length);
-
- for (const expansionKey of expansionKeys) {
- const prefix = expansionKey.substring(0, expansionKey.length - 1);
-
- if (expansionKey.endsWith('*') && matchKey.startsWith(prefix)) {
- const target = matchObj[expansionKey];
- const subpath = matchKey.substring(expansionKey.length - 1);
- const resolved = await resolvePackageTarget(context, {
- target,
- subpath,
- pattern: true,
- internal
- });
- return resolved;
- }
-
- if (matchKey.startsWith(expansionKey)) {
- const target = matchObj[expansionKey];
- const subpath = matchKey.substring(expansionKey.length);
-
- const resolved = await resolvePackageTarget(context, { target, subpath, internal });
- return resolved;
- }
- }
-
- throw new InvalidModuleSpecifierError(context, internal);
-}
-
-async function resolvePackageExports(context, subpath, exports) {
- if (isMixedExports(exports)) {
- throw new InvalidConfigurationError(
- context,
- 'All keys must either start with ./, or without one.'
- );
- }
-
- if (subpath === '.') {
- let mainExport;
- // If exports is a String or Array, or an Object containing no keys starting with ".", then
- if (typeof exports === 'string' || Array.isArray(exports) || isConditions(exports)) {
- mainExport = exports;
- } else if (isMappings(exports)) {
- mainExport = exports['.'];
- }
-
- if (mainExport) {
- const resolved = await resolvePackageTarget(context, { target: mainExport, subpath: '' });
- if (resolved) {
- return resolved;
- }
- }
- } else if (isMappings(exports)) {
- const resolvedMatch = await resolvePackageImportsExports(context, {
- matchKey: subpath,
- matchObj: exports
- });
-
- if (resolvedMatch) {
- return resolvedMatch;
- }
- }
-
- throw new InvalidModuleSpecifierError(context);
-}
-
-async function resolvePackageImports({
- importSpecifier,
- importer,
- moduleDirs,
- conditions,
- resolveId
-}) {
- const result = await findPackageJson(importer, moduleDirs);
- if (!result) {
- throw new Error(createBaseErrorMsg('. Could not find a parent package.json.'));
- }
-
- const { pkgPath, pkgJsonPath, pkgJson } = result;
- const pkgURL = url.pathToFileURL(`${pkgPath}/`);
- const context = {
- importer,
- importSpecifier,
- moduleDirs,
- pkgURL,
- pkgJsonPath,
- conditions,
- resolveId
- };
-
- const { imports } = pkgJson;
- if (!imports) {
- throw new InvalidModuleSpecifierError(context, true);
- }
-
- if (importSpecifier === '#' || importSpecifier.startsWith('#/')) {
- throw new InvalidModuleSpecifierError(context, true, 'Invalid import specifier.');
- }
-
- return resolvePackageImportsExports(context, {
- matchKey: importSpecifier,
- matchObj: imports,
- internal: true
- });
-}
-
-const resolveImportPath = util.promisify(resolve__default["default"]);
-const readFile = util.promisify(fs__default["default"].readFile);
-
-async function getPackageJson(importer, pkgName, resolveOptions, moduleDirectories) {
- if (importer) {
- const selfPackageJsonResult = await findPackageJson(importer, moduleDirectories);
- if (selfPackageJsonResult && selfPackageJsonResult.pkgJson.name === pkgName) {
- // the referenced package name is the current package
- return selfPackageJsonResult;
- }
- }
-
- try {
- const pkgJsonPath = await resolveImportPath(`${pkgName}/package.json`, resolveOptions);
- const pkgJson = JSON.parse(await readFile(pkgJsonPath, 'utf-8'));
- return { pkgJsonPath, pkgJson, pkgPath: path.dirname(pkgJsonPath) };
- } catch (_) {
- return null;
- }
-}
-
-async function resolveIdClassic({
- importSpecifier,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
-}) {
- let hasModuleSideEffects = () => null;
- let hasPackageEntry = true;
- let packageBrowserField = false;
- let packageInfo;
-
- const filter = (pkg, pkgPath) => {
- const info = getPackageInfo({
- cache: packageInfoCache,
- extensions,
- pkg,
- pkgPath,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- rootDir,
- ignoreSideEffectsForRoot
- });
-
- ({ packageInfo, hasModuleSideEffects, hasPackageEntry, packageBrowserField } = info);
-
- return info.cachedPkg;
- };
-
- const resolveOptions = {
- basedir: baseDir,
- readFile: readCachedFile,
- isFile: isFileCached,
- isDirectory: isDirCached,
- extensions,
- includeCoreModules: false,
- moduleDirectory: moduleDirectories,
- preserveSymlinks,
- packageFilter: filter
- };
-
- let location;
- try {
- location = await resolveImportPath(importSpecifier, resolveOptions);
- } catch (error) {
- if (error.code !== 'MODULE_NOT_FOUND') {
- throw error;
- }
- return null;
- }
-
- return {
- location: preserveSymlinks ? location : await resolveSymlink(location),
- hasModuleSideEffects,
- hasPackageEntry,
- packageBrowserField,
- packageInfo
- };
-}
-
-async function resolveWithExportMap({
- importer,
- importSpecifier,
- exportConditions,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
-}) {
- if (importSpecifier.startsWith('#')) {
- // this is a package internal import, resolve using package imports field
- const resolveResult = await resolvePackageImports({
- importSpecifier,
- importer,
- moduleDirs: moduleDirectories,
- conditions: exportConditions,
- resolveId(id /* , parent*/) {
- return resolveIdClassic({
- importSpecifier: id,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories
- });
- }
- });
-
- const location = url.fileURLToPath(resolveResult);
- return {
- location: preserveSymlinks ? location : await resolveSymlink(location),
- hasModuleSideEffects: () => null,
- hasPackageEntry: true,
- packageBrowserField: false,
- // eslint-disable-next-line no-undefined
- packageInfo: undefined
- };
- }
-
- const pkgName = getPackageName(importSpecifier);
- if (pkgName) {
- // it's a bare import, find the package.json and resolve using package exports if available
- let hasModuleSideEffects = () => null;
- let hasPackageEntry = true;
- let packageBrowserField = false;
- let packageInfo;
-
- const filter = (pkg, pkgPath) => {
- const info = getPackageInfo({
- cache: packageInfoCache,
- extensions,
- pkg,
- pkgPath,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- rootDir,
- ignoreSideEffectsForRoot
- });
-
- ({ packageInfo, hasModuleSideEffects, hasPackageEntry, packageBrowserField } = info);
-
- return info.cachedPkg;
- };
-
- const resolveOptions = {
- basedir: baseDir,
- readFile: readCachedFile,
- isFile: isFileCached,
- isDirectory: isDirCached,
- extensions,
- includeCoreModules: false,
- moduleDirectory: moduleDirectories,
- preserveSymlinks,
- packageFilter: filter
- };
-
- const result = await getPackageJson(importer, pkgName, resolveOptions, moduleDirectories);
-
- if (result && result.pkgJson.exports) {
- const { pkgJson, pkgJsonPath } = result;
- const subpath =
- pkgName === importSpecifier ? '.' : `.${importSpecifier.substring(pkgName.length)}`;
- const pkgDr = pkgJsonPath.replace('package.json', '');
- const pkgURL = url.pathToFileURL(pkgDr);
-
- const context = {
- importer,
- importSpecifier,
- moduleDirs: moduleDirectories,
- pkgURL,
- pkgJsonPath,
- conditions: exportConditions
- };
- const resolvedPackageExport = await resolvePackageExports(context, subpath, pkgJson.exports);
- const location = url.fileURLToPath(resolvedPackageExport);
- if (location) {
- return {
- location: preserveSymlinks ? location : await resolveSymlink(location),
- hasModuleSideEffects,
- hasPackageEntry,
- packageBrowserField,
- packageInfo
- };
- }
- }
- }
-
- return null;
-}
-
-async function resolveWithClassic({
- importer,
- importSpecifierList,
- exportConditions,
- warn,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
-}) {
- for (let i = 0; i < importSpecifierList.length; i++) {
- // eslint-disable-next-line no-await-in-loop
- const result = await resolveIdClassic({
- importer,
- importSpecifier: importSpecifierList[i],
- exportConditions,
- warn,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
- });
-
- if (result) {
- return result;
- }
- }
-
- return null;
-}
-
-// Resolves to the module if found or `null`.
-// The first import specificer will first be attempted with the exports algorithm.
-// If this is unsuccesful because export maps are not being used, then all of `importSpecifierList`
-// will be tried with the classic resolution algorithm
-async function resolveImportSpecifiers({
- importer,
- importSpecifierList,
- exportConditions,
- warn,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
-}) {
- try {
- const exportMapRes = await resolveWithExportMap({
- importer,
- importSpecifier: importSpecifierList[0],
- exportConditions,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
- });
- if (exportMapRes) return exportMapRes;
- } catch (error) {
- if (error instanceof ResolveError) {
- warn(error);
- return null;
- }
- throw error;
- }
-
- // package has no imports or exports, use classic node resolve
- return resolveWithClassic({
- importer,
- importSpecifierList,
- exportConditions,
- warn,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
- });
-}
-
-/* eslint-disable no-param-reassign, no-shadow, no-undefined */
-
-const builtins = new Set(builtinList__default["default"]);
-const ES6_BROWSER_EMPTY = '\0node-resolve:empty.js';
-const deepFreeze = (object) => {
- Object.freeze(object);
-
- for (const value of Object.values(object)) {
- if (typeof value === 'object' && !Object.isFrozen(value)) {
- deepFreeze(value);
- }
- }
-
- return object;
-};
-
-const baseConditions = ['default', 'module'];
-const baseConditionsEsm = [...baseConditions, 'import'];
-const baseConditionsCjs = [...baseConditions, 'require'];
-const defaults = {
- dedupe: [],
- // It's important that .mjs is listed before .js so that Rollup will interpret npm modules
- // which deploy both ESM .mjs and CommonJS .js files as ESM.
- extensions: ['.mjs', '.js', '.json', '.node'],
- resolveOnly: [],
- moduleDirectories: ['node_modules'],
- ignoreSideEffectsForRoot: false
-};
-const DEFAULTS = deepFreeze(deepMerge__default["default"]({}, defaults));
-
-function nodeResolve(opts = {}) {
- const { warnings } = handleDeprecatedOptions(opts);
-
- const options = { ...defaults, ...opts };
- const { extensions, jail, moduleDirectories, ignoreSideEffectsForRoot } = options;
- const conditionsEsm = [...baseConditionsEsm, ...(options.exportConditions || [])];
- const conditionsCjs = [...baseConditionsCjs, ...(options.exportConditions || [])];
- const packageInfoCache = new Map();
- const idToPackageInfo = new Map();
- const mainFields = getMainFields(options);
- const useBrowserOverrides = mainFields.indexOf('browser') !== -1;
- const isPreferBuiltinsSet = options.preferBuiltins === true || options.preferBuiltins === false;
- const preferBuiltins = isPreferBuiltinsSet ? options.preferBuiltins : true;
- const rootDir = path.resolve(options.rootDir || process.cwd());
- let { dedupe } = options;
- let rollupOptions;
-
- if (typeof dedupe !== 'function') {
- dedupe = (importee) =>
- options.dedupe.includes(importee) || options.dedupe.includes(getPackageName(importee));
- }
-
- const resolveOnly = options.resolveOnly.map((pattern) => {
- if (pattern instanceof RegExp) {
- return pattern;
- }
- const normalized = pattern.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
- return new RegExp(`^${normalized}$`);
- });
-
- const browserMapCache = new Map();
- let preserveSymlinks;
-
- const doResolveId = async (context, importee, importer, custom) => {
- // strip query params from import
- const [importPath, params] = importee.split('?');
- const importSuffix = `${params ? `?${params}` : ''}`;
- importee = importPath;
-
- const baseDir = !importer || dedupe(importee) ? rootDir : path.dirname(importer);
-
- // https://github.com/defunctzombie/package-browser-field-spec
- const browser = browserMapCache.get(importer);
- if (useBrowserOverrides && browser) {
- const resolvedImportee = path.resolve(baseDir, importee);
- if (browser[importee] === false || browser[resolvedImportee] === false) {
- return { id: ES6_BROWSER_EMPTY };
- }
- const browserImportee =
- (importee[0] !== '.' && browser[importee]) ||
- browser[resolvedImportee] ||
- browser[`${resolvedImportee}.js`] ||
- browser[`${resolvedImportee}.json`];
- if (browserImportee) {
- importee = browserImportee;
- }
- }
-
- const parts = importee.split(/[/\\]/);
- let id = parts.shift();
- let isRelativeImport = false;
-
- if (id[0] === '@' && parts.length > 0) {
- // scoped packages
- id += `/${parts.shift()}`;
- } else if (id[0] === '.') {
- // an import relative to the parent dir of the importer
- id = path.resolve(baseDir, importee);
- isRelativeImport = true;
- }
-
- if (
- !isRelativeImport &&
- resolveOnly.length &&
- !resolveOnly.some((pattern) => pattern.test(id))
- ) {
- if (normalizeInput(rollupOptions.input).includes(importee)) {
- return null;
- }
- return false;
- }
-
- const importSpecifierList = [importee];
-
- if (importer === undefined && !importee[0].match(/^\.?\.?\//)) {
- // For module graph roots (i.e. when importer is undefined), we
- // need to handle 'path fragments` like `foo/bar` that are commonly
- // found in rollup config files. If importee doesn't look like a
- // relative or absolute path, we make it relative and attempt to
- // resolve it.
- importSpecifierList.push(`./${importee}`);
- }
-
- // TypeScript files may import '.js' to refer to either '.ts' or '.tsx'
- if (importer && importee.endsWith('.js')) {
- for (const ext of ['.ts', '.tsx']) {
- if (importer.endsWith(ext) && extensions.includes(ext)) {
- importSpecifierList.push(importee.replace(/.js$/, ext));
- }
- }
- }
-
- const warn = (...args) => context.warn(...args);
- const isRequire = custom && custom['node-resolve'] && custom['node-resolve'].isRequire;
- const exportConditions = isRequire ? conditionsCjs : conditionsEsm;
-
- if (useBrowserOverrides && !exportConditions.includes('browser'))
- exportConditions.push('browser');
-
- const resolvedWithoutBuiltins = await resolveImportSpecifiers({
- importer,
- importSpecifierList,
- exportConditions,
- warn,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
- });
-
- const importeeIsBuiltin = builtins.has(importee);
- const resolved =
- importeeIsBuiltin && preferBuiltins
- ? {
- packageInfo: undefined,
- hasModuleSideEffects: () => null,
- hasPackageEntry: true,
- packageBrowserField: false
- }
- : resolvedWithoutBuiltins;
- if (!resolved) {
- return null;
- }
-
- const { packageInfo, hasModuleSideEffects, hasPackageEntry, packageBrowserField } = resolved;
- let { location } = resolved;
- if (packageBrowserField) {
- if (Object.prototype.hasOwnProperty.call(packageBrowserField, location)) {
- if (!packageBrowserField[location]) {
- browserMapCache.set(location, packageBrowserField);
- return { id: ES6_BROWSER_EMPTY };
- }
- location = packageBrowserField[location];
- }
- browserMapCache.set(location, packageBrowserField);
- }
-
- if (hasPackageEntry && !preserveSymlinks) {
- const exists = await fileExists(location);
- if (exists) {
- location = await realpath(location);
- }
- }
-
- idToPackageInfo.set(location, packageInfo);
-
- if (hasPackageEntry) {
- if (importeeIsBuiltin && preferBuiltins) {
- if (!isPreferBuiltinsSet && resolvedWithoutBuiltins && resolved !== importee) {
- context.warn(
- `preferring built-in module '${importee}' over local alternative at '${resolvedWithoutBuiltins.location}', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning`
- );
- }
- return false;
- } else if (jail && location.indexOf(path.normalize(jail.trim(path.sep))) !== 0) {
- return null;
- }
- }
-
- if (options.modulesOnly && (await fileExists(location))) {
- const code = await readFile$1(location, 'utf-8');
- if (isModule__default["default"](code)) {
- return {
- id: `${location}${importSuffix}`,
- moduleSideEffects: hasModuleSideEffects(location)
- };
- }
- return null;
- }
- return {
- id: `${location}${importSuffix}`,
- moduleSideEffects: hasModuleSideEffects(location)
- };
- };
-
- return {
- name: 'node-resolve',
-
- version,
-
- buildStart(options) {
- rollupOptions = options;
-
- for (const warning of warnings) {
- this.warn(warning);
- }
-
- ({ preserveSymlinks } = options);
- },
-
- generateBundle() {
- readCachedFile.clear();
- isFileCached.clear();
- isDirCached.clear();
- },
-
- async resolveId(importee, importer, resolveOptions) {
- if (importee === ES6_BROWSER_EMPTY) {
- return importee;
- }
- // ignore IDs with null character, these belong to other plugins
- if (/\0/.test(importee)) return null;
-
- if (/\0/.test(importer)) {
- importer = undefined;
- }
-
- const resolved = await doResolveId(this, importee, importer, resolveOptions.custom);
- if (resolved) {
- const resolvedResolved = await this.resolve(
- resolved.id,
- importer,
- Object.assign({ skipSelf: true }, resolveOptions)
- );
- if (resolvedResolved) {
- // Handle plugins that manually make the result external
- if (resolvedResolved.external) {
- return false;
- }
- // Pass on meta information added by other plugins
- return { ...resolved, meta: resolvedResolved.meta };
- }
- }
- return resolved;
- },
-
- load(importee) {
- if (importee === ES6_BROWSER_EMPTY) {
- return 'export default {};';
- }
- return null;
- },
-
- getPackageInfoForId(id) {
- return idToPackageInfo.get(id);
- }
- };
-}
-
-exports.DEFAULTS = DEFAULTS;
-exports["default"] = nodeResolve;
-exports.nodeResolve = nodeResolve;
diff --git a/node_modules/@rollup/plugin-node-resolve/dist/es/index.js b/node_modules/@rollup/plugin-node-resolve/dist/es/index.js
deleted file mode 100644
index 86f8f51..0000000
--- a/node_modules/@rollup/plugin-node-resolve/dist/es/index.js
+++ /dev/null
@@ -1,1184 +0,0 @@
-import path, { dirname, resolve, extname, normalize, sep } from 'path';
-import builtinList from 'builtin-modules';
-import deepMerge from 'deepmerge';
-import isModule from 'is-module';
-import fs, { realpathSync } from 'fs';
-import { promisify } from 'util';
-import { pathToFileURL, fileURLToPath } from 'url';
-import resolve$1 from 'resolve';
-import { createFilter } from '@rollup/pluginutils';
-
-var version = "13.1.3";
-
-promisify(fs.access);
-const readFile$1 = promisify(fs.readFile);
-const realpath = promisify(fs.realpath);
-const stat = promisify(fs.stat);
-
-async function fileExists(filePath) {
- try {
- const res = await stat(filePath);
- return res.isFile();
- } catch {
- return false;
- }
-}
-
-async function resolveSymlink(path) {
- return (await fileExists(path)) ? realpath(path) : path;
-}
-
-const onError = (error) => {
- if (error.code === 'ENOENT') {
- return false;
- }
- throw error;
-};
-
-const makeCache = (fn) => {
- const cache = new Map();
- const wrapped = async (param, done) => {
- if (cache.has(param) === false) {
- cache.set(
- param,
- fn(param).catch((err) => {
- cache.delete(param);
- throw err;
- })
- );
- }
-
- try {
- const result = cache.get(param);
- const value = await result;
- return done(null, value);
- } catch (error) {
- return done(error);
- }
- };
-
- wrapped.clear = () => cache.clear();
-
- return wrapped;
-};
-
-const isDirCached = makeCache(async (file) => {
- try {
- const stats = await stat(file);
- return stats.isDirectory();
- } catch (error) {
- return onError(error);
- }
-});
-
-const isFileCached = makeCache(async (file) => {
- try {
- const stats = await stat(file);
- return stats.isFile();
- } catch (error) {
- return onError(error);
- }
-});
-
-const readCachedFile = makeCache(readFile$1);
-
-function handleDeprecatedOptions(opts) {
- const warnings = [];
-
- if (opts.customResolveOptions) {
- const { customResolveOptions } = opts;
- if (customResolveOptions.moduleDirectory) {
- // eslint-disable-next-line no-param-reassign
- opts.moduleDirectories = Array.isArray(customResolveOptions.moduleDirectory)
- ? customResolveOptions.moduleDirectory
- : [customResolveOptions.moduleDirectory];
-
- warnings.push(
- 'node-resolve: The `customResolveOptions.moduleDirectory` option has been deprecated. Use `moduleDirectories`, which must be an array.'
- );
- }
-
- if (customResolveOptions.preserveSymlinks) {
- throw new Error(
- 'node-resolve: `customResolveOptions.preserveSymlinks` is no longer an option. We now always use the rollup `preserveSymlinks` option.'
- );
- }
-
- [
- 'basedir',
- 'package',
- 'extensions',
- 'includeCoreModules',
- 'readFile',
- 'isFile',
- 'isDirectory',
- 'realpath',
- 'packageFilter',
- 'pathFilter',
- 'paths',
- 'packageIterator'
- ].forEach((resolveOption) => {
- if (customResolveOptions[resolveOption]) {
- throw new Error(
- `node-resolve: \`customResolveOptions.${resolveOption}\` is no longer an option. If you need this, please open an issue.`
- );
- }
- });
- }
-
- return { warnings };
-}
-
-// returns the imported package name for bare module imports
-function getPackageName(id) {
- if (id.startsWith('.') || id.startsWith('/')) {
- return null;
- }
-
- const split = id.split('/');
-
- // @my-scope/my-package/foo.js -> @my-scope/my-package
- // @my-scope/my-package -> @my-scope/my-package
- if (split[0][0] === '@') {
- return `${split[0]}/${split[1]}`;
- }
-
- // my-package/foo.js -> my-package
- // my-package -> my-package
- return split[0];
-}
-
-function getMainFields(options) {
- let mainFields;
- if (options.mainFields) {
- ({ mainFields } = options);
- } else {
- mainFields = ['module', 'main'];
- }
- if (options.browser && mainFields.indexOf('browser') === -1) {
- return ['browser'].concat(mainFields);
- }
- if (!mainFields.length) {
- throw new Error('Please ensure at least one `mainFields` value is specified');
- }
- return mainFields;
-}
-
-function getPackageInfo(options) {
- const {
- cache,
- extensions,
- pkg,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- rootDir,
- ignoreSideEffectsForRoot
- } = options;
- let { pkgPath } = options;
-
- if (cache.has(pkgPath)) {
- return cache.get(pkgPath);
- }
-
- // browserify/resolve doesn't realpath paths returned in its packageFilter callback
- if (!preserveSymlinks) {
- pkgPath = realpathSync(pkgPath);
- }
-
- const pkgRoot = dirname(pkgPath);
-
- const packageInfo = {
- // copy as we are about to munge the `main` field of `pkg`.
- packageJson: { ...pkg },
-
- // path to package.json file
- packageJsonPath: pkgPath,
-
- // directory containing the package.json
- root: pkgRoot,
-
- // which main field was used during resolution of this module (main, module, or browser)
- resolvedMainField: 'main',
-
- // whether the browser map was used to resolve the entry point to this module
- browserMappedMain: false,
-
- // the entry point of the module with respect to the selected main field and any
- // relevant browser mappings.
- resolvedEntryPoint: ''
- };
-
- let overriddenMain = false;
- for (let i = 0; i < mainFields.length; i++) {
- const field = mainFields[i];
- if (typeof pkg[field] === 'string') {
- pkg.main = pkg[field];
- packageInfo.resolvedMainField = field;
- overriddenMain = true;
- break;
- }
- }
-
- const internalPackageInfo = {
- cachedPkg: pkg,
- hasModuleSideEffects: () => null,
- hasPackageEntry: overriddenMain !== false || mainFields.indexOf('main') !== -1,
- packageBrowserField:
- useBrowserOverrides &&
- typeof pkg.browser === 'object' &&
- Object.keys(pkg.browser).reduce((browser, key) => {
- let resolved = pkg.browser[key];
- if (resolved && resolved[0] === '.') {
- resolved = resolve(pkgRoot, resolved);
- }
- /* eslint-disable no-param-reassign */
- browser[key] = resolved;
- if (key[0] === '.') {
- const absoluteKey = resolve(pkgRoot, key);
- browser[absoluteKey] = resolved;
- if (!extname(key)) {
- extensions.reduce((subBrowser, ext) => {
- subBrowser[absoluteKey + ext] = subBrowser[key];
- return subBrowser;
- }, browser);
- }
- }
- return browser;
- }, {}),
- packageInfo
- };
-
- const browserMap = internalPackageInfo.packageBrowserField;
- if (
- useBrowserOverrides &&
- typeof pkg.browser === 'object' &&
- // eslint-disable-next-line no-prototype-builtins
- browserMap.hasOwnProperty(pkg.main)
- ) {
- packageInfo.resolvedEntryPoint = browserMap[pkg.main];
- packageInfo.browserMappedMain = true;
- } else {
- // index.node is technically a valid default entrypoint as well...
- packageInfo.resolvedEntryPoint = resolve(pkgRoot, pkg.main || 'index.js');
- packageInfo.browserMappedMain = false;
- }
-
- if (!ignoreSideEffectsForRoot || rootDir !== pkgRoot) {
- const packageSideEffects = pkg.sideEffects;
- if (typeof packageSideEffects === 'boolean') {
- internalPackageInfo.hasModuleSideEffects = () => packageSideEffects;
- } else if (Array.isArray(packageSideEffects)) {
- internalPackageInfo.hasModuleSideEffects = createFilter(packageSideEffects, null, {
- resolve: pkgRoot
- });
- }
- }
-
- cache.set(pkgPath, internalPackageInfo);
- return internalPackageInfo;
-}
-
-function normalizeInput(input) {
- if (Array.isArray(input)) {
- return input;
- } else if (typeof input === 'object') {
- return Object.values(input);
- }
-
- // otherwise it's a string
- return [input];
-}
-
-/* eslint-disable no-await-in-loop */
-
-function isModuleDir(current, moduleDirs) {
- return moduleDirs.some((dir) => current.endsWith(dir));
-}
-
-async function findPackageJson(base, moduleDirs) {
- const { root } = path.parse(base);
- let current = base;
-
- while (current !== root && !isModuleDir(current, moduleDirs)) {
- const pkgJsonPath = path.join(current, 'package.json');
- if (await fileExists(pkgJsonPath)) {
- const pkgJsonString = fs.readFileSync(pkgJsonPath, 'utf-8');
- return { pkgJson: JSON.parse(pkgJsonString), pkgPath: current, pkgJsonPath };
- }
- current = path.resolve(current, '..');
- }
- return null;
-}
-
-function isUrl(str) {
- try {
- return !!new URL(str);
- } catch (_) {
- return false;
- }
-}
-
-function isConditions(exports) {
- return typeof exports === 'object' && Object.keys(exports).every((k) => !k.startsWith('.'));
-}
-
-function isMappings(exports) {
- return typeof exports === 'object' && !isConditions(exports);
-}
-
-function isMixedExports(exports) {
- const keys = Object.keys(exports);
- return keys.some((k) => k.startsWith('.')) && keys.some((k) => !k.startsWith('.'));
-}
-
-function createBaseErrorMsg(importSpecifier, importer) {
- return `Could not resolve import "${importSpecifier}" in ${importer}`;
-}
-
-function createErrorMsg(context, reason, internal) {
- const { importSpecifier, importer, pkgJsonPath } = context;
- const base = createBaseErrorMsg(importSpecifier, importer);
- const field = internal ? 'imports' : 'exports';
- return `${base} using ${field} defined in ${pkgJsonPath}.${reason ? ` ${reason}` : ''}`;
-}
-
-class ResolveError extends Error {}
-
-class InvalidConfigurationError extends ResolveError {
- constructor(context, reason) {
- super(createErrorMsg(context, `Invalid "exports" field. ${reason}`));
- }
-}
-
-class InvalidModuleSpecifierError extends ResolveError {
- constructor(context, internal, reason) {
- super(createErrorMsg(context, reason, internal));
- }
-}
-
-class InvalidPackageTargetError extends ResolveError {
- constructor(context, reason) {
- super(createErrorMsg(context, reason));
- }
-}
-
-/* eslint-disable no-await-in-loop, no-undefined */
-
-function includesInvalidSegments(pathSegments, moduleDirs) {
- return pathSegments
- .split('/')
- .slice(1)
- .some((t) => ['.', '..', ...moduleDirs].includes(t));
-}
-
-async function resolvePackageTarget(context, { target, subpath, pattern, internal }) {
- if (typeof target === 'string') {
- if (!pattern && subpath.length > 0 && !target.endsWith('/')) {
- throw new InvalidModuleSpecifierError(context);
- }
-
- if (!target.startsWith('./')) {
- if (internal && !['/', '../'].some((p) => target.startsWith(p)) && !isUrl(target)) {
- // this is a bare package import, remap it and resolve it using regular node resolve
- if (pattern) {
- const result = await context.resolveId(
- target.replace(/\*/g, subpath),
- context.pkgURL.href
- );
- return result ? pathToFileURL(result.location).href : null;
- }
-
- const result = await context.resolveId(`${target}${subpath}`, context.pkgURL.href);
- return result ? pathToFileURL(result.location).href : null;
- }
- throw new InvalidPackageTargetError(context, `Invalid mapping: "${target}".`);
- }
-
- if (includesInvalidSegments(target, context.moduleDirs)) {
- throw new InvalidPackageTargetError(context, `Invalid mapping: "${target}".`);
- }
-
- const resolvedTarget = new URL(target, context.pkgURL);
- if (!resolvedTarget.href.startsWith(context.pkgURL.href)) {
- throw new InvalidPackageTargetError(
- context,
- `Resolved to ${resolvedTarget.href} which is outside package ${context.pkgURL.href}`
- );
- }
-
- if (includesInvalidSegments(subpath, context.moduleDirs)) {
- throw new InvalidModuleSpecifierError(context);
- }
-
- if (pattern) {
- return resolvedTarget.href.replace(/\*/g, subpath);
- }
- return new URL(subpath, resolvedTarget).href;
- }
-
- if (Array.isArray(target)) {
- let lastError;
- for (const item of target) {
- try {
- const resolved = await resolvePackageTarget(context, {
- target: item,
- subpath,
- pattern,
- internal
- });
-
- // return if defined or null, but not undefined
- if (resolved !== undefined) {
- return resolved;
- }
- } catch (error) {
- if (!(error instanceof InvalidPackageTargetError)) {
- throw error;
- } else {
- lastError = error;
- }
- }
- }
-
- if (lastError) {
- throw lastError;
- }
- return null;
- }
-
- if (target && typeof target === 'object') {
- for (const [key, value] of Object.entries(target)) {
- if (key === 'default' || context.conditions.includes(key)) {
- const resolved = await resolvePackageTarget(context, {
- target: value,
- subpath,
- pattern,
- internal
- });
-
- // return if defined or null, but not undefined
- if (resolved !== undefined) {
- return resolved;
- }
- }
- }
- return undefined;
- }
-
- if (target === null) {
- return null;
- }
-
- throw new InvalidPackageTargetError(context, `Invalid exports field.`);
-}
-
-/* eslint-disable no-await-in-loop */
-
-async function resolvePackageImportsExports(context, { matchKey, matchObj, internal }) {
- if (!matchKey.endsWith('*') && matchKey in matchObj) {
- const target = matchObj[matchKey];
- const resolved = await resolvePackageTarget(context, { target, subpath: '', internal });
- return resolved;
- }
-
- const expansionKeys = Object.keys(matchObj)
- .filter((k) => k.endsWith('/') || k.endsWith('*'))
- .sort((a, b) => b.length - a.length);
-
- for (const expansionKey of expansionKeys) {
- const prefix = expansionKey.substring(0, expansionKey.length - 1);
-
- if (expansionKey.endsWith('*') && matchKey.startsWith(prefix)) {
- const target = matchObj[expansionKey];
- const subpath = matchKey.substring(expansionKey.length - 1);
- const resolved = await resolvePackageTarget(context, {
- target,
- subpath,
- pattern: true,
- internal
- });
- return resolved;
- }
-
- if (matchKey.startsWith(expansionKey)) {
- const target = matchObj[expansionKey];
- const subpath = matchKey.substring(expansionKey.length);
-
- const resolved = await resolvePackageTarget(context, { target, subpath, internal });
- return resolved;
- }
- }
-
- throw new InvalidModuleSpecifierError(context, internal);
-}
-
-async function resolvePackageExports(context, subpath, exports) {
- if (isMixedExports(exports)) {
- throw new InvalidConfigurationError(
- context,
- 'All keys must either start with ./, or without one.'
- );
- }
-
- if (subpath === '.') {
- let mainExport;
- // If exports is a String or Array, or an Object containing no keys starting with ".", then
- if (typeof exports === 'string' || Array.isArray(exports) || isConditions(exports)) {
- mainExport = exports;
- } else if (isMappings(exports)) {
- mainExport = exports['.'];
- }
-
- if (mainExport) {
- const resolved = await resolvePackageTarget(context, { target: mainExport, subpath: '' });
- if (resolved) {
- return resolved;
- }
- }
- } else if (isMappings(exports)) {
- const resolvedMatch = await resolvePackageImportsExports(context, {
- matchKey: subpath,
- matchObj: exports
- });
-
- if (resolvedMatch) {
- return resolvedMatch;
- }
- }
-
- throw new InvalidModuleSpecifierError(context);
-}
-
-async function resolvePackageImports({
- importSpecifier,
- importer,
- moduleDirs,
- conditions,
- resolveId
-}) {
- const result = await findPackageJson(importer, moduleDirs);
- if (!result) {
- throw new Error(createBaseErrorMsg('. Could not find a parent package.json.'));
- }
-
- const { pkgPath, pkgJsonPath, pkgJson } = result;
- const pkgURL = pathToFileURL(`${pkgPath}/`);
- const context = {
- importer,
- importSpecifier,
- moduleDirs,
- pkgURL,
- pkgJsonPath,
- conditions,
- resolveId
- };
-
- const { imports } = pkgJson;
- if (!imports) {
- throw new InvalidModuleSpecifierError(context, true);
- }
-
- if (importSpecifier === '#' || importSpecifier.startsWith('#/')) {
- throw new InvalidModuleSpecifierError(context, true, 'Invalid import specifier.');
- }
-
- return resolvePackageImportsExports(context, {
- matchKey: importSpecifier,
- matchObj: imports,
- internal: true
- });
-}
-
-const resolveImportPath = promisify(resolve$1);
-const readFile = promisify(fs.readFile);
-
-async function getPackageJson(importer, pkgName, resolveOptions, moduleDirectories) {
- if (importer) {
- const selfPackageJsonResult = await findPackageJson(importer, moduleDirectories);
- if (selfPackageJsonResult && selfPackageJsonResult.pkgJson.name === pkgName) {
- // the referenced package name is the current package
- return selfPackageJsonResult;
- }
- }
-
- try {
- const pkgJsonPath = await resolveImportPath(`${pkgName}/package.json`, resolveOptions);
- const pkgJson = JSON.parse(await readFile(pkgJsonPath, 'utf-8'));
- return { pkgJsonPath, pkgJson, pkgPath: dirname(pkgJsonPath) };
- } catch (_) {
- return null;
- }
-}
-
-async function resolveIdClassic({
- importSpecifier,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
-}) {
- let hasModuleSideEffects = () => null;
- let hasPackageEntry = true;
- let packageBrowserField = false;
- let packageInfo;
-
- const filter = (pkg, pkgPath) => {
- const info = getPackageInfo({
- cache: packageInfoCache,
- extensions,
- pkg,
- pkgPath,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- rootDir,
- ignoreSideEffectsForRoot
- });
-
- ({ packageInfo, hasModuleSideEffects, hasPackageEntry, packageBrowserField } = info);
-
- return info.cachedPkg;
- };
-
- const resolveOptions = {
- basedir: baseDir,
- readFile: readCachedFile,
- isFile: isFileCached,
- isDirectory: isDirCached,
- extensions,
- includeCoreModules: false,
- moduleDirectory: moduleDirectories,
- preserveSymlinks,
- packageFilter: filter
- };
-
- let location;
- try {
- location = await resolveImportPath(importSpecifier, resolveOptions);
- } catch (error) {
- if (error.code !== 'MODULE_NOT_FOUND') {
- throw error;
- }
- return null;
- }
-
- return {
- location: preserveSymlinks ? location : await resolveSymlink(location),
- hasModuleSideEffects,
- hasPackageEntry,
- packageBrowserField,
- packageInfo
- };
-}
-
-async function resolveWithExportMap({
- importer,
- importSpecifier,
- exportConditions,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
-}) {
- if (importSpecifier.startsWith('#')) {
- // this is a package internal import, resolve using package imports field
- const resolveResult = await resolvePackageImports({
- importSpecifier,
- importer,
- moduleDirs: moduleDirectories,
- conditions: exportConditions,
- resolveId(id /* , parent*/) {
- return resolveIdClassic({
- importSpecifier: id,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories
- });
- }
- });
-
- const location = fileURLToPath(resolveResult);
- return {
- location: preserveSymlinks ? location : await resolveSymlink(location),
- hasModuleSideEffects: () => null,
- hasPackageEntry: true,
- packageBrowserField: false,
- // eslint-disable-next-line no-undefined
- packageInfo: undefined
- };
- }
-
- const pkgName = getPackageName(importSpecifier);
- if (pkgName) {
- // it's a bare import, find the package.json and resolve using package exports if available
- let hasModuleSideEffects = () => null;
- let hasPackageEntry = true;
- let packageBrowserField = false;
- let packageInfo;
-
- const filter = (pkg, pkgPath) => {
- const info = getPackageInfo({
- cache: packageInfoCache,
- extensions,
- pkg,
- pkgPath,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- rootDir,
- ignoreSideEffectsForRoot
- });
-
- ({ packageInfo, hasModuleSideEffects, hasPackageEntry, packageBrowserField } = info);
-
- return info.cachedPkg;
- };
-
- const resolveOptions = {
- basedir: baseDir,
- readFile: readCachedFile,
- isFile: isFileCached,
- isDirectory: isDirCached,
- extensions,
- includeCoreModules: false,
- moduleDirectory: moduleDirectories,
- preserveSymlinks,
- packageFilter: filter
- };
-
- const result = await getPackageJson(importer, pkgName, resolveOptions, moduleDirectories);
-
- if (result && result.pkgJson.exports) {
- const { pkgJson, pkgJsonPath } = result;
- const subpath =
- pkgName === importSpecifier ? '.' : `.${importSpecifier.substring(pkgName.length)}`;
- const pkgDr = pkgJsonPath.replace('package.json', '');
- const pkgURL = pathToFileURL(pkgDr);
-
- const context = {
- importer,
- importSpecifier,
- moduleDirs: moduleDirectories,
- pkgURL,
- pkgJsonPath,
- conditions: exportConditions
- };
- const resolvedPackageExport = await resolvePackageExports(context, subpath, pkgJson.exports);
- const location = fileURLToPath(resolvedPackageExport);
- if (location) {
- return {
- location: preserveSymlinks ? location : await resolveSymlink(location),
- hasModuleSideEffects,
- hasPackageEntry,
- packageBrowserField,
- packageInfo
- };
- }
- }
- }
-
- return null;
-}
-
-async function resolveWithClassic({
- importer,
- importSpecifierList,
- exportConditions,
- warn,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
-}) {
- for (let i = 0; i < importSpecifierList.length; i++) {
- // eslint-disable-next-line no-await-in-loop
- const result = await resolveIdClassic({
- importer,
- importSpecifier: importSpecifierList[i],
- exportConditions,
- warn,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
- });
-
- if (result) {
- return result;
- }
- }
-
- return null;
-}
-
-// Resolves to the module if found or `null`.
-// The first import specificer will first be attempted with the exports algorithm.
-// If this is unsuccesful because export maps are not being used, then all of `importSpecifierList`
-// will be tried with the classic resolution algorithm
-async function resolveImportSpecifiers({
- importer,
- importSpecifierList,
- exportConditions,
- warn,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
-}) {
- try {
- const exportMapRes = await resolveWithExportMap({
- importer,
- importSpecifier: importSpecifierList[0],
- exportConditions,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
- });
- if (exportMapRes) return exportMapRes;
- } catch (error) {
- if (error instanceof ResolveError) {
- warn(error);
- return null;
- }
- throw error;
- }
-
- // package has no imports or exports, use classic node resolve
- return resolveWithClassic({
- importer,
- importSpecifierList,
- exportConditions,
- warn,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
- });
-}
-
-/* eslint-disable no-param-reassign, no-shadow, no-undefined */
-
-const builtins = new Set(builtinList);
-const ES6_BROWSER_EMPTY = '\0node-resolve:empty.js';
-const deepFreeze = (object) => {
- Object.freeze(object);
-
- for (const value of Object.values(object)) {
- if (typeof value === 'object' && !Object.isFrozen(value)) {
- deepFreeze(value);
- }
- }
-
- return object;
-};
-
-const baseConditions = ['default', 'module'];
-const baseConditionsEsm = [...baseConditions, 'import'];
-const baseConditionsCjs = [...baseConditions, 'require'];
-const defaults = {
- dedupe: [],
- // It's important that .mjs is listed before .js so that Rollup will interpret npm modules
- // which deploy both ESM .mjs and CommonJS .js files as ESM.
- extensions: ['.mjs', '.js', '.json', '.node'],
- resolveOnly: [],
- moduleDirectories: ['node_modules'],
- ignoreSideEffectsForRoot: false
-};
-const DEFAULTS = deepFreeze(deepMerge({}, defaults));
-
-function nodeResolve(opts = {}) {
- const { warnings } = handleDeprecatedOptions(opts);
-
- const options = { ...defaults, ...opts };
- const { extensions, jail, moduleDirectories, ignoreSideEffectsForRoot } = options;
- const conditionsEsm = [...baseConditionsEsm, ...(options.exportConditions || [])];
- const conditionsCjs = [...baseConditionsCjs, ...(options.exportConditions || [])];
- const packageInfoCache = new Map();
- const idToPackageInfo = new Map();
- const mainFields = getMainFields(options);
- const useBrowserOverrides = mainFields.indexOf('browser') !== -1;
- const isPreferBuiltinsSet = options.preferBuiltins === true || options.preferBuiltins === false;
- const preferBuiltins = isPreferBuiltinsSet ? options.preferBuiltins : true;
- const rootDir = resolve(options.rootDir || process.cwd());
- let { dedupe } = options;
- let rollupOptions;
-
- if (typeof dedupe !== 'function') {
- dedupe = (importee) =>
- options.dedupe.includes(importee) || options.dedupe.includes(getPackageName(importee));
- }
-
- const resolveOnly = options.resolveOnly.map((pattern) => {
- if (pattern instanceof RegExp) {
- return pattern;
- }
- const normalized = pattern.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
- return new RegExp(`^${normalized}$`);
- });
-
- const browserMapCache = new Map();
- let preserveSymlinks;
-
- const doResolveId = async (context, importee, importer, custom) => {
- // strip query params from import
- const [importPath, params] = importee.split('?');
- const importSuffix = `${params ? `?${params}` : ''}`;
- importee = importPath;
-
- const baseDir = !importer || dedupe(importee) ? rootDir : dirname(importer);
-
- // https://github.com/defunctzombie/package-browser-field-spec
- const browser = browserMapCache.get(importer);
- if (useBrowserOverrides && browser) {
- const resolvedImportee = resolve(baseDir, importee);
- if (browser[importee] === false || browser[resolvedImportee] === false) {
- return { id: ES6_BROWSER_EMPTY };
- }
- const browserImportee =
- (importee[0] !== '.' && browser[importee]) ||
- browser[resolvedImportee] ||
- browser[`${resolvedImportee}.js`] ||
- browser[`${resolvedImportee}.json`];
- if (browserImportee) {
- importee = browserImportee;
- }
- }
-
- const parts = importee.split(/[/\\]/);
- let id = parts.shift();
- let isRelativeImport = false;
-
- if (id[0] === '@' && parts.length > 0) {
- // scoped packages
- id += `/${parts.shift()}`;
- } else if (id[0] === '.') {
- // an import relative to the parent dir of the importer
- id = resolve(baseDir, importee);
- isRelativeImport = true;
- }
-
- if (
- !isRelativeImport &&
- resolveOnly.length &&
- !resolveOnly.some((pattern) => pattern.test(id))
- ) {
- if (normalizeInput(rollupOptions.input).includes(importee)) {
- return null;
- }
- return false;
- }
-
- const importSpecifierList = [importee];
-
- if (importer === undefined && !importee[0].match(/^\.?\.?\//)) {
- // For module graph roots (i.e. when importer is undefined), we
- // need to handle 'path fragments` like `foo/bar` that are commonly
- // found in rollup config files. If importee doesn't look like a
- // relative or absolute path, we make it relative and attempt to
- // resolve it.
- importSpecifierList.push(`./${importee}`);
- }
-
- // TypeScript files may import '.js' to refer to either '.ts' or '.tsx'
- if (importer && importee.endsWith('.js')) {
- for (const ext of ['.ts', '.tsx']) {
- if (importer.endsWith(ext) && extensions.includes(ext)) {
- importSpecifierList.push(importee.replace(/.js$/, ext));
- }
- }
- }
-
- const warn = (...args) => context.warn(...args);
- const isRequire = custom && custom['node-resolve'] && custom['node-resolve'].isRequire;
- const exportConditions = isRequire ? conditionsCjs : conditionsEsm;
-
- if (useBrowserOverrides && !exportConditions.includes('browser'))
- exportConditions.push('browser');
-
- const resolvedWithoutBuiltins = await resolveImportSpecifiers({
- importer,
- importSpecifierList,
- exportConditions,
- warn,
- packageInfoCache,
- extensions,
- mainFields,
- preserveSymlinks,
- useBrowserOverrides,
- baseDir,
- moduleDirectories,
- rootDir,
- ignoreSideEffectsForRoot
- });
-
- const importeeIsBuiltin = builtins.has(importee);
- const resolved =
- importeeIsBuiltin && preferBuiltins
- ? {
- packageInfo: undefined,
- hasModuleSideEffects: () => null,
- hasPackageEntry: true,
- packageBrowserField: false
- }
- : resolvedWithoutBuiltins;
- if (!resolved) {
- return null;
- }
-
- const { packageInfo, hasModuleSideEffects, hasPackageEntry, packageBrowserField } = resolved;
- let { location } = resolved;
- if (packageBrowserField) {
- if (Object.prototype.hasOwnProperty.call(packageBrowserField, location)) {
- if (!packageBrowserField[location]) {
- browserMapCache.set(location, packageBrowserField);
- return { id: ES6_BROWSER_EMPTY };
- }
- location = packageBrowserField[location];
- }
- browserMapCache.set(location, packageBrowserField);
- }
-
- if (hasPackageEntry && !preserveSymlinks) {
- const exists = await fileExists(location);
- if (exists) {
- location = await realpath(location);
- }
- }
-
- idToPackageInfo.set(location, packageInfo);
-
- if (hasPackageEntry) {
- if (importeeIsBuiltin && preferBuiltins) {
- if (!isPreferBuiltinsSet && resolvedWithoutBuiltins && resolved !== importee) {
- context.warn(
- `preferring built-in module '${importee}' over local alternative at '${resolvedWithoutBuiltins.location}', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning`
- );
- }
- return false;
- } else if (jail && location.indexOf(normalize(jail.trim(sep))) !== 0) {
- return null;
- }
- }
-
- if (options.modulesOnly && (await fileExists(location))) {
- const code = await readFile$1(location, 'utf-8');
- if (isModule(code)) {
- return {
- id: `${location}${importSuffix}`,
- moduleSideEffects: hasModuleSideEffects(location)
- };
- }
- return null;
- }
- return {
- id: `${location}${importSuffix}`,
- moduleSideEffects: hasModuleSideEffects(location)
- };
- };
-
- return {
- name: 'node-resolve',
-
- version,
-
- buildStart(options) {
- rollupOptions = options;
-
- for (const warning of warnings) {
- this.warn(warning);
- }
-
- ({ preserveSymlinks } = options);
- },
-
- generateBundle() {
- readCachedFile.clear();
- isFileCached.clear();
- isDirCached.clear();
- },
-
- async resolveId(importee, importer, resolveOptions) {
- if (importee === ES6_BROWSER_EMPTY) {
- return importee;
- }
- // ignore IDs with null character, these belong to other plugins
- if (/\0/.test(importee)) return null;
-
- if (/\0/.test(importer)) {
- importer = undefined;
- }
-
- const resolved = await doResolveId(this, importee, importer, resolveOptions.custom);
- if (resolved) {
- const resolvedResolved = await this.resolve(
- resolved.id,
- importer,
- Object.assign({ skipSelf: true }, resolveOptions)
- );
- if (resolvedResolved) {
- // Handle plugins that manually make the result external
- if (resolvedResolved.external) {
- return false;
- }
- // Pass on meta information added by other plugins
- return { ...resolved, meta: resolvedResolved.meta };
- }
- }
- return resolved;
- },
-
- load(importee) {
- if (importee === ES6_BROWSER_EMPTY) {
- return 'export default {};';
- }
- return null;
- },
-
- getPackageInfoForId(id) {
- return idToPackageInfo.get(id);
- }
- };
-}
-
-export { DEFAULTS, nodeResolve as default, nodeResolve };
diff --git a/node_modules/@rollup/plugin-node-resolve/dist/es/package.json b/node_modules/@rollup/plugin-node-resolve/dist/es/package.json
deleted file mode 100644
index 7c34deb..0000000
--- a/node_modules/@rollup/plugin-node-resolve/dist/es/package.json
+++ /dev/null
@@ -1 +0,0 @@
-{"type":"module"}
\ No newline at end of file
diff --git a/node_modules/@rollup/plugin-node-resolve/package.json b/node_modules/@rollup/plugin-node-resolve/package.json
deleted file mode 100644
index 0483121..0000000
--- a/node_modules/@rollup/plugin-node-resolve/package.json
+++ /dev/null
@@ -1,120 +0,0 @@
-{
- "_from": "@rollup/plugin-node-resolve",
- "_id": "@rollup/plugin-node-resolve@13.1.3",
- "_inBundle": false,
- "_integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==",
- "_location": "/@rollup/plugin-node-resolve",
- "_phantomChildren": {},
- "_requested": {
- "type": "tag",
- "registry": true,
- "raw": "@rollup/plugin-node-resolve",
- "name": "@rollup/plugin-node-resolve",
- "escapedName": "@rollup%2fplugin-node-resolve",
- "scope": "@rollup",
- "rawSpec": "",
- "saveSpec": null,
- "fetchSpec": "latest"
- },
- "_requiredBy": [
- "#DEV:/",
- "#USER"
- ],
- "_resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz",
- "_shasum": "2ed277fb3ad98745424c1d2ba152484508a92d79",
- "_spec": "@rollup/plugin-node-resolve",
- "_where": "/Users/keiferju/Workplace/dllcnx/dTools",
- "author": {
- "name": "Rich Harris",
- "email": "richard.a.harris@gmail.com"
- },
- "ava": {
- "babel": {
- "compileEnhancements": false
- },
- "files": [
- "!**/fixtures/**",
- "!**/helpers/**",
- "!**/recipes/**",
- "!**/types.ts"
- ]
- },
- "bugs": {
- "url": "https://github.com/rollup/plugins/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "@rollup/pluginutils": "^3.1.0",
- "@types/resolve": "1.17.1",
- "builtin-modules": "^3.1.0",
- "deepmerge": "^4.2.2",
- "is-module": "^1.0.0",
- "resolve": "^1.19.0"
- },
- "deprecated": false,
- "description": "Locate and bundle third-party dependencies in node_modules",
- "devDependencies": {
- "@babel/core": "^7.10.5",
- "@babel/plugin-transform-typescript": "^7.10.5",
- "@rollup/plugin-babel": "^5.1.0",
- "@rollup/plugin-commonjs": "^16.0.0",
- "@rollup/plugin-json": "^4.1.0",
- "es5-ext": "^0.10.53",
- "rollup": "^2.58.0",
- "source-map": "^0.7.3",
- "string-capitalize": "^1.0.1"
- },
- "engines": {
- "node": ">= 10.0.0"
- },
- "exports": {
- "require": "./dist/cjs/index.js",
- "import": "./dist/es/index.js"
- },
- "files": [
- "dist",
- "types",
- "README.md",
- "LICENSE"
- ],
- "homepage": "https://github.com/rollup/plugins/tree/master/packages/node-resolve/#readme",
- "keywords": [
- "rollup",
- "plugin",
- "es2015",
- "npm",
- "modules"
- ],
- "license": "MIT",
- "main": "./dist/cjs/index.js",
- "module": "./dist/es/index.js",
- "name": "@rollup/plugin-node-resolve",
- "peerDependencies": {
- "rollup": "^2.42.0"
- },
- "publishConfig": {
- "access": "public"
- },
- "repository": {
- "url": "git+https://github.com/rollup/plugins.git",
- "directory": "packages/node-resolve"
- },
- "scripts": {
- "build": "rollup -c",
- "ci:coverage": "nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov",
- "ci:lint": "pnpm build && pnpm lint",
- "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
- "ci:test": "pnpm test -- --verbose && pnpm test:ts",
- "prebuild": "del-cli dist",
- "prepare": "if [ ! -d 'dist' ]; then pnpm build; fi",
- "prepublishOnly": "pnpm build",
- "prerelease": "pnpm build",
- "pretest": "pnpm build",
- "release": "pnpm plugin:release --workspace-root -- --pkg $npm_package_name",
- "test": "ava && pnpm test:ts",
- "test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
- },
- "type": "commonjs",
- "types": "types/index.d.ts",
- "version": "13.1.3"
-}
diff --git a/node_modules/@rollup/plugin-node-resolve/types/index.d.ts b/node_modules/@rollup/plugin-node-resolve/types/index.d.ts
deleted file mode 100755
index 8d1f440..0000000
--- a/node_modules/@rollup/plugin-node-resolve/types/index.d.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-import { Plugin } from 'rollup';
-
-export const DEFAULTS: {
- customResolveOptions: {};
- dedupe: [];
- extensions: ['.mjs', '.js', '.json', '.node'];
- resolveOnly: [];
-};
-
-export interface RollupNodeResolveOptions {
- /**
- * Additional conditions of the package.json exports field to match when resolving modules.
- * By default, this plugin looks for the `'default', 'module', 'import']` conditions when resolving imports.
- *
- * When using `@rollup/plugin-commonjs` v16 or higher, this plugin will use the
- * `['default', 'module', 'import']` conditions when resolving require statements.
- *
- * Setting this option will add extra conditions on top of the default conditions.
- * See https://nodejs.org/api/packages.html#packages_conditional_exports for more information.
- */
- exportConditions?: string[];
-
- /**
- * If `true`, instructs the plugin to use the `"browser"` property in `package.json`
- * files to specify alternative files to load for bundling. This is useful when
- * bundling for a browser environment. Alternatively, a value of `'browser'` can be
- * added to the `mainFields` option. If `false`, any `"browser"` properties in
- * package files will be ignored. This option takes precedence over `mainFields`.
- * @default false
- */
- browser?: boolean;
-
- /**
- * One or more directories in which to recursively look for modules.
- * @default ['node_modules']
- */
- moduleDirectories?: string[];
-
- /**
- * An `Array` of modules names, which instructs the plugin to force resolving for the
- * specified modules to the root `node_modules`. Helps to prevent bundling the same
- * package multiple times if package is imported from dependencies.
- */
- dedupe?: string[] | ((importee: string) => boolean);
-
- /**
- * Specifies the extensions of files that the plugin will operate on.
- * @default [ '.mjs', '.js', '.json', '.node' ]
- */
- extensions?: readonly string[];
-
- /**
- * Locks the module search within specified path (e.g. chroot). Modules defined
- * outside this path will be marked as external.
- * @default '/'
- */
- jail?: string;
-
- /**
- * Specifies the properties to scan within a `package.json`, used to determine the
- * bundle entry point.
- * @default ['module', 'main']
- */
- mainFields?: readonly string[];
-
- /**
- * If `true`, inspect resolved files to assert that they are ES2015 modules.
- * @default false
- */
- modulesOnly?: boolean;
-
- /**
- * If `true`, the plugin will prefer built-in modules (e.g. `fs`, `path`). If `false`,
- * the plugin will look for locally installed modules of the same name.
- * @default true
- */
- preferBuiltins?: boolean;
-
- /**
- * An `Array` which instructs the plugin to limit module resolution to those whose
- * names match patterns in the array.
- * @default []
- */
- resolveOnly?: ReadonlyArray | null;
-
- /**
- * Specifies the root directory from which to resolve modules. Typically used when
- * resolving entry-point imports, and when resolving deduplicated modules.
- * @default process.cwd()
- */
- rootDir?: string;
-}
-
-/**
- * Locate modules using the Node resolution algorithm, for using third party modules in node_modules
- */
-export function nodeResolve(options?: RollupNodeResolveOptions): Plugin;
-export default nodeResolve;
diff --git a/node_modules/@rollup/pluginutils/CHANGELOG.md b/node_modules/@rollup/pluginutils/CHANGELOG.md
deleted file mode 100755
index d286908..0000000
--- a/node_modules/@rollup/pluginutils/CHANGELOG.md
+++ /dev/null
@@ -1,315 +0,0 @@
-# @rollup/pluginutils ChangeLog
-
-## v3.1.0
-
-_2020-06-05_
-
-### Bugfixes
-
-- fix: resolve relative paths starting with "./" (#180)
-
-### Features
-
-- feat: add native node es modules support (#419)
-
-### Updates
-
-- refactor: replace micromatch with picomatch. (#306)
-- chore: Don't bundle micromatch (#220)
-- chore: add missing typescript devDep (238b140)
-- chore: Use readonly arrays, add TSDoc (#187)
-- chore: Use typechecking (2ae08eb)
-
-## v3.0.10
-
-_2020-05-02_
-
-### Bugfixes
-
-- fix: resolve relative paths starting with "./" (#180)
-
-### Updates
-
-- refactor: replace micromatch with picomatch. (#306)
-- chore: Don't bundle micromatch (#220)
-- chore: add missing typescript devDep (238b140)
-- chore: Use readonly arrays, add TSDoc (#187)
-- chore: Use typechecking (2ae08eb)
-
-## v3.0.9
-
-_2020-04-12_
-
-### Updates
-
-- chore: support Rollup v2
-
-## v3.0.8
-
-_2020-02-01_
-
-### Bugfixes
-
-- fix: resolve relative paths starting with "./" (#180)
-
-### Updates
-
-- chore: add missing typescript devDep (238b140)
-- chore: Use readonly arrays, add TSDoc (#187)
-- chore: Use typechecking (2ae08eb)
-
-## v3.0.7
-
-_2020-02-01_
-
-### Bugfixes
-
-- fix: resolve relative paths starting with "./" (#180)
-
-### Updates
-
-- chore: Use readonly arrays, add TSDoc (#187)
-- chore: Use typechecking (2ae08eb)
-
-## v3.0.6
-
-_2020-01-27_
-
-### Bugfixes
-
-- fix: resolve relative paths starting with "./" (#180)
-
-## v3.0.5
-
-_2020-01-25_
-
-### Bugfixes
-
-- fix: bring back named exports (#176)
-
-## v3.0.4
-
-_2020-01-10_
-
-### Bugfixes
-
-- fix: keep for(const..) out of scope (#151)
-
-## v3.0.3
-
-_2020-01-07_
-
-### Bugfixes
-
-- fix: createFilter Windows regression (#141)
-
-### Updates
-
-- test: fix windows path failure (0a0de65)
-- chore: fix test script (5eae320)
-
-## v3.0.2
-
-_2020-01-04_
-
-### Bugfixes
-
-- fix: makeLegalIdentifier - potentially unsafe input for blacklisted identifier (#116)
-
-### Updates
-
-- docs: Fix documented type of createFilter's include/exclude (#123)
-- chore: update minor linting correction (bcbf9d2)
-
-## 3.0.1
-
-- fix: Escape glob characters in folder (#84)
-
-## 3.0.0
-
-_2019-11-25_
-
-- **Breaking:** Minimum compatible Rollup version is 1.20.0
-- **Breaking:** Minimum supported Node version is 8.0.0
-- Published as @rollup/plugins-image
-
-## 2.8.2
-
-_2019-09-13_
-
-- Handle optional catch parameter in attachScopes ([#70](https://github.com/rollup/rollup-pluginutils/pulls/70))
-
-## 2.8.1
-
-_2019-06-04_
-
-- Support serialization of many edge cases ([#64](https://github.com/rollup/rollup-pluginutils/issues/64))
-
-## 2.8.0
-
-_2019-05-30_
-
-- Bundle updated micromatch dependency ([#60](https://github.com/rollup/rollup-pluginutils/issues/60))
-
-## 2.7.1
-
-_2019-05-17_
-
-- Do not ignore files with a leading "." in createFilter ([#62](https://github.com/rollup/rollup-pluginutils/issues/62))
-
-## 2.7.0
-
-_2019-05-15_
-
-- Add `resolve` option to createFilter ([#59](https://github.com/rollup/rollup-pluginutils/issues/59))
-
-## 2.6.0
-
-_2019-04-04_
-
-- Add `extractAssignedNames` ([#59](https://github.com/rollup/rollup-pluginutils/issues/59))
-- Provide dedicated TypeScript typings file ([#58](https://github.com/rollup/rollup-pluginutils/issues/58))
-
-## 2.5.0
-
-_2019-03-18_
-
-- Generalize dataToEsm type ([#55](https://github.com/rollup/rollup-pluginutils/issues/55))
-- Handle empty keys in dataToEsm ([#56](https://github.com/rollup/rollup-pluginutils/issues/56))
-
-## 2.4.1
-
-_2019-02-16_
-
-- Remove unnecessary dependency
-
-## 2.4.0
-
-_2019-02-16_
-Update dependencies to solve micromatch vulnerability ([#53](https://github.com/rollup/rollup-pluginutils/issues/53))
-
-## 2.3.3
-
-_2018-09-19_
-
-- Revert micromatch update ([#43](https://github.com/rollup/rollup-pluginutils/issues/43))
-
-## 2.3.2
-
-_2018-09-18_
-
-- Bumb micromatch dependency ([#36](https://github.com/rollup/rollup-pluginutils/issues/36))
-- Bumb dependencies ([#41](https://github.com/rollup/rollup-pluginutils/issues/41))
-- Split up tests ([#40](https://github.com/rollup/rollup-pluginutils/issues/40))
-
-## 2.3.1
-
-_2018-08-06_
-
-- Fixed ObjectPattern scope in attachScopes to recognise { ...rest } syntax ([#37](https://github.com/rollup/rollup-pluginutils/issues/37))
-
-## 2.3.0
-
-_2018-05-21_
-
-- Add option to not generate named exports ([#32](https://github.com/rollup/rollup-pluginutils/issues/32))
-
-## 2.2.1
-
-_2018-05-21_
-
-- Support `null` serialization ([#34](https://github.com/rollup/rollup-pluginutils/issues/34))
-
-## 2.2.0
-
-_2018-05-11_
-
-- Improve white-space handling in `dataToEsm` and add `prepare` script ([#31](https://github.com/rollup/rollup-pluginutils/issues/31))
-
-## 2.1.1
-
-_2018-05-09_
-
-- Update dependencies
-
-## 2.1.0
-
-_2018-05-08_
-
-- Add `dataToEsm` helper to create named exports from objects ([#29](https://github.com/rollup/rollup-pluginutils/issues/29))
-- Support literal keys in object patterns ([#27](https://github.com/rollup/rollup-pluginutils/issues/27))
-- Support function declarations without id in `attachScopes` ([#28](https://github.com/rollup/rollup-pluginutils/issues/28))
-
-## 2.0.1
-
-_2017-01-03_
-
-- Don't add extension to file with trailing dot ([#14](https://github.com/rollup/rollup-pluginutils/issues/14))
-
-## 2.0.0
-
-_2017-01-03_
-
-- Use `micromatch` instead of `minimatch` ([#19](https://github.com/rollup/rollup-pluginutils/issues/19))
-- Allow `createFilter` to take regexes ([#5](https://github.com/rollup/rollup-pluginutils/issues/5))
-
-## 1.5.2
-
-_2016-08-29_
-
-- Treat `arguments` as a reserved word ([#10](https://github.com/rollup/rollup-pluginutils/issues/10))
-
-## 1.5.1
-
-_2016-06-24_
-
-- Add all declarators in a var declaration to scope, not just the first
-
-## 1.5.0
-
-_2016-06-07_
-
-- Exclude IDs with null character (`\0`)
-
-## 1.4.0
-
-_2016-06-07_
-
-- Workaround minimatch issue ([#6](https://github.com/rollup/rollup-pluginutils/pull/6))
-- Exclude non-string IDs in `createFilter`
-
-## 1.3.1
-
-_2015-12-16_
-
-- Build with Rollup directly, rather than via Gobble
-
-## 1.3.0
-
-_2015-12-16_
-
-- Use correct path separator on Windows
-
-## 1.2.0
-
-_2015-11-02_
-
-- Add `attachScopes` and `makeLegalIdentifier`
-
-## 1.1.0
-
-2015-10-24\*
-
-- Add `addExtension` function
-
-## 1.0.1
-
-_2015-10-24_
-
-- Include dist files in package
-
-## 1.0.0
-
-_2015-10-24_
-
-- First release
diff --git a/node_modules/@rollup/pluginutils/LICENSE b/node_modules/@rollup/pluginutils/LICENSE
deleted file mode 100644
index 5e46702..0000000
--- a/node_modules/@rollup/pluginutils/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/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.
diff --git a/node_modules/@rollup/pluginutils/README.md b/node_modules/@rollup/pluginutils/README.md
deleted file mode 100755
index 2a103e6..0000000
--- a/node_modules/@rollup/pluginutils/README.md
+++ /dev/null
@@ -1,237 +0,0 @@
-[npm]: https://img.shields.io/npm/v/@rollup/pluginutils
-[npm-url]: https://www.npmjs.com/package/@rollup/pluginutils
-[size]: https://packagephobia.now.sh/badge?p=@rollup/pluginutils
-[size-url]: https://packagephobia.now.sh/result?p=@rollup/pluginutils
-
-[![npm][npm]][npm-url]
-[![size][size]][size-url]
-[](https://liberamanifesto.com)
-
-# @rollup/pluginutils
-
-A set of utility functions commonly used by 🍣 Rollup plugins.
-
-## Requirements
-
-This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
-
-## Install
-
-Using npm:
-
-```console
-npm install @rollup/pluginutils --save-dev
-```
-
-## Usage
-
-```js
-import utils from '@rollup/pluginutils';
-//...
-```
-
-## API
-
-Available utility functions are listed below:
-
-_Note: Parameter names immediately followed by a `?` indicate that the parameter is optional._
-
-### addExtension
-
-Adds an extension to a module ID if one does not exist.
-
-Parameters: `(filename: String, ext?: String)`
-Returns: `String`
-
-```js
-import { addExtension } from '@rollup/pluginutils';
-
-export default function myPlugin(options = {}) {
- return {
- resolveId(code, id) {
- // only adds an extension if there isn't one already
- id = addExtension(id); // `foo` -> `foo.js`, `foo.js -> foo.js`
- id = addExtension(id, '.myext'); // `foo` -> `foo.myext`, `foo.js -> `foo.js`
- }
- };
-}
-```
-
-### attachScopes
-
-Attaches `Scope` objects to the relevant nodes of an AST. Each `Scope` object has a `scope.contains(name)` method that returns `true` if a given name is defined in the current scope or a parent scope.
-
-Parameters: `(ast: Node, propertyName?: String)`
-Returns: `Object`
-
-See [rollup-plugin-inject](https://github.com/rollup/rollup-plugin-inject) or [rollup-plugin-commonjs](https://github.com/rollup/rollup-plugin-commonjs) for an example of usage.
-
-```js
-import { attachScopes } from '@rollup/pluginutils';
-import { walk } from 'estree-walker';
-
-export default function myPlugin(options = {}) {
- return {
- transform(code) {
- const ast = this.parse(code);
-
- let scope = attachScopes(ast, 'scope');
-
- walk(ast, {
- enter(node) {
- if (node.scope) scope = node.scope;
-
- if (!scope.contains('foo')) {
- // `foo` is not defined, so if we encounter it,
- // we assume it's a global
- }
- },
- leave(node) {
- if (node.scope) scope = scope.parent;
- }
- });
- }
- };
-}
-```
-
-### createFilter
-
-Constructs a filter function which can be used to determine whether or not certain modules should be operated upon.
-
-Parameters: `(include?: , exclude?: , options?: Object)`
-Returns: `String`
-
-#### `include` and `exclude`
-
-Type: `String | RegExp | Array[...String|RegExp]`
-
-A valid [`minimatch`](https://www.npmjs.com/package/minimatch) pattern, or array of patterns. If `options.include` is omitted or has zero length, filter will return `true` by default. Otherwise, an ID must match one or more of the `minimatch` patterns, and must not match any of the `options.exclude` patterns.
-
-#### `options`
-
-##### `resolve`
-
-Type: `String | Boolean | null`
-
-Optionally resolves the patterns against a directory other than `process.cwd()`. If a `String` is specified, then the value will be used as the base directory. Relative paths will be resolved against `process.cwd()` first. If `false`, then the patterns will not be resolved against any directory. This can be useful if you want to create a filter for virtual module names.
-
-#### Usage
-
-```js
-import { createFilter } from '@rollup/pluginutils';
-
-export default function myPlugin(options = {}) {
- // assume that the myPlugin accepts options of `options.include` and `options.exclude`
- var filter = createFilter(options.include, options.exclude, {
- resolve: '/my/base/dir'
- });
-
- return {
- transform(code, id) {
- if (!filter(id)) return;
-
- // proceed with the transformation...
- }
- };
-}
-```
-
-### dataToEsm
-
-Transforms objects into tree-shakable ES Module imports.
-
-Parameters: `(data: Object)`
-Returns: `String`
-
-#### `data`
-
-Type: `Object`
-
-An object to transform into an ES module.
-
-#### Usage
-
-```js
-import { dataToEsm } from '@rollup/pluginutils';
-
-const esModuleSource = dataToEsm(
- {
- custom: 'data',
- to: ['treeshake']
- },
- {
- compact: false,
- indent: '\t',
- preferConst: false,
- objectShorthand: false,
- namedExports: true
- }
-);
-/*
-Outputs the string ES module source:
- export const custom = 'data';
- export const to = ['treeshake'];
- export default { custom, to };
-*/
-```
-
-### extractAssignedNames
-
-Extracts the names of all assignment targets based upon specified patterns.
-
-Parameters: `(param: Node)`
-Returns: `Array[...String]`
-
-#### `param`
-
-Type: `Node`
-
-An `acorn` AST Node.
-
-#### Usage
-
-```js
-import { extractAssignedNames } from '@rollup/pluginutils';
-import { walk } from 'estree-walker';
-
-export default function myPlugin(options = {}) {
- return {
- transform(code) {
- const ast = this.parse(code);
-
- walk(ast, {
- enter(node) {
- if (node.type === 'VariableDeclarator') {
- const declaredNames = extractAssignedNames(node.id);
- // do something with the declared names
- // e.g. for `const {x, y: z} = ... => declaredNames = ['x', 'z']
- }
- }
- });
- }
- };
-}
-```
-
-### makeLegalIdentifier
-
-Constructs a bundle-safe identifier from a `String`.
-
-Parameters: `(str: String)`
-Returns: `String`
-
-#### Usage
-
-```js
-import { makeLegalIdentifier } from '@rollup/pluginutils';
-
-makeLegalIdentifier('foo-bar'); // 'foo_bar'
-makeLegalIdentifier('typeof'); // '_typeof'
-```
-
-## Meta
-
-[CONTRIBUTING](/.github/CONTRIBUTING.md)
-
-[LICENSE (MIT)](/LICENSE)
diff --git a/node_modules/@rollup/pluginutils/dist/cjs/index.js b/node_modules/@rollup/pluginutils/dist/cjs/index.js
deleted file mode 100644
index c980d90..0000000
--- a/node_modules/@rollup/pluginutils/dist/cjs/index.js
+++ /dev/null
@@ -1,447 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
-var path = require('path');
-var pm = _interopDefault(require('picomatch'));
-
-const addExtension = function addExtension(filename, ext = '.js') {
- let result = `${filename}`;
- if (!path.extname(filename))
- result += ext;
- return result;
-};
-
-function walk(ast, { enter, leave }) {
- return visit(ast, null, enter, leave);
-}
-
-let should_skip = false;
-let should_remove = false;
-let replacement = null;
-const context = {
- skip: () => should_skip = true,
- remove: () => should_remove = true,
- replace: (node) => replacement = node
-};
-
-function replace(parent, prop, index, node) {
- if (parent) {
- if (index !== null) {
- parent[prop][index] = node;
- } else {
- parent[prop] = node;
- }
- }
-}
-
-function remove(parent, prop, index) {
- if (parent) {
- if (index !== null) {
- parent[prop].splice(index, 1);
- } else {
- delete parent[prop];
- }
- }
-}
-
-function visit(
- node,
- parent,
- enter,
- leave,
- prop,
- index
-) {
- if (node) {
- if (enter) {
- const _should_skip = should_skip;
- const _should_remove = should_remove;
- const _replacement = replacement;
- should_skip = false;
- should_remove = false;
- replacement = null;
-
- enter.call(context, node, parent, prop, index);
-
- if (replacement) {
- node = replacement;
- replace(parent, prop, index, node);
- }
-
- if (should_remove) {
- remove(parent, prop, index);
- }
-
- const skipped = should_skip;
- const removed = should_remove;
-
- should_skip = _should_skip;
- should_remove = _should_remove;
- replacement = _replacement;
-
- if (skipped) return node;
- if (removed) return null;
- }
-
- for (const key in node) {
- const value = (node )[key];
-
- if (typeof value !== 'object') {
- continue;
- }
-
- else if (Array.isArray(value)) {
- for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
- if (value[j] !== null && typeof value[j].type === 'string') {
- if (!visit(value[j], node, enter, leave, key, k)) {
- // removed
- j--;
- }
- }
- }
- }
-
- else if (value !== null && typeof value.type === 'string') {
- visit(value, node, enter, leave, key, null);
- }
- }
-
- if (leave) {
- const _replacement = replacement;
- const _should_remove = should_remove;
- replacement = null;
- should_remove = false;
-
- leave.call(context, node, parent, prop, index);
-
- if (replacement) {
- node = replacement;
- replace(parent, prop, index, node);
- }
-
- if (should_remove) {
- remove(parent, prop, index);
- }
-
- const removed = should_remove;
-
- replacement = _replacement;
- should_remove = _should_remove;
-
- if (removed) return null;
- }
- }
-
- return node;
-}
-
-const extractors = {
- ArrayPattern(names, param) {
- for (const element of param.elements) {
- if (element)
- extractors[element.type](names, element);
- }
- },
- AssignmentPattern(names, param) {
- extractors[param.left.type](names, param.left);
- },
- Identifier(names, param) {
- names.push(param.name);
- },
- MemberExpression() { },
- ObjectPattern(names, param) {
- for (const prop of param.properties) {
- // @ts-ignore Typescript reports that this is not a valid type
- if (prop.type === 'RestElement') {
- extractors.RestElement(names, prop);
- }
- else {
- extractors[prop.value.type](names, prop.value);
- }
- }
- },
- RestElement(names, param) {
- extractors[param.argument.type](names, param.argument);
- }
-};
-const extractAssignedNames = function extractAssignedNames(param) {
- const names = [];
- extractors[param.type](names, param);
- return names;
-};
-
-const blockDeclarations = {
- const: true,
- let: true
-};
-class Scope {
- constructor(options = {}) {
- this.parent = options.parent;
- this.isBlockScope = !!options.block;
- this.declarations = Object.create(null);
- if (options.params) {
- options.params.forEach((param) => {
- extractAssignedNames(param).forEach((name) => {
- this.declarations[name] = true;
- });
- });
- }
- }
- addDeclaration(node, isBlockDeclaration, isVar) {
- if (!isBlockDeclaration && this.isBlockScope) {
- // it's a `var` or function node, and this
- // is a block scope, so we need to go up
- this.parent.addDeclaration(node, isBlockDeclaration, isVar);
- }
- else if (node.id) {
- extractAssignedNames(node.id).forEach((name) => {
- this.declarations[name] = true;
- });
- }
- }
- contains(name) {
- return this.declarations[name] || (this.parent ? this.parent.contains(name) : false);
- }
-}
-const attachScopes = function attachScopes(ast, propertyName = 'scope') {
- let scope = new Scope();
- walk(ast, {
- enter(n, parent) {
- const node = n;
- // function foo () {...}
- // class Foo {...}
- if (/(Function|Class)Declaration/.test(node.type)) {
- scope.addDeclaration(node, false, false);
- }
- // var foo = 1
- if (node.type === 'VariableDeclaration') {
- const { kind } = node;
- const isBlockDeclaration = blockDeclarations[kind];
- // don't add const/let declarations in the body of a for loop #113
- const parentType = parent ? parent.type : '';
- if (!(isBlockDeclaration && /ForOfStatement/.test(parentType))) {
- node.declarations.forEach((declaration) => {
- scope.addDeclaration(declaration, isBlockDeclaration, true);
- });
- }
- }
- let newScope;
- // create new function scope
- if (/Function/.test(node.type)) {
- const func = node;
- newScope = new Scope({
- parent: scope,
- block: false,
- params: func.params
- });
- // named function expressions - the name is considered
- // part of the function's scope
- if (func.type === 'FunctionExpression' && func.id) {
- newScope.addDeclaration(func, false, false);
- }
- }
- // create new block scope
- if (node.type === 'BlockStatement' && !/Function/.test(parent.type)) {
- newScope = new Scope({
- parent: scope,
- block: true
- });
- }
- // catch clause has its own block scope
- if (node.type === 'CatchClause') {
- newScope = new Scope({
- parent: scope,
- params: node.param ? [node.param] : [],
- block: true
- });
- }
- if (newScope) {
- Object.defineProperty(node, propertyName, {
- value: newScope,
- configurable: true
- });
- scope = newScope;
- }
- },
- leave(n) {
- const node = n;
- if (node[propertyName])
- scope = scope.parent;
- }
- });
- return scope;
-};
-
-// Helper since Typescript can't detect readonly arrays with Array.isArray
-function isArray(arg) {
- return Array.isArray(arg);
-}
-function ensureArray(thing) {
- if (isArray(thing))
- return thing;
- if (thing == null)
- return [];
- return [thing];
-}
-
-function getMatcherString(id, resolutionBase) {
- if (resolutionBase === false) {
- return id;
- }
- // resolve('') is valid and will default to process.cwd()
- const basePath = path.resolve(resolutionBase || '')
- .split(path.sep)
- .join('/')
- // escape all possible (posix + win) path characters that might interfere with regex
- .replace(/[-^$*+?.()|[\]{}]/g, '\\$&');
- // Note that we use posix.join because:
- // 1. the basePath has been normalized to use /
- // 2. the incoming glob (id) matcher, also uses /
- // otherwise Node will force backslash (\) on windows
- return path.posix.join(basePath, id);
-}
-const createFilter = function createFilter(include, exclude, options) {
- const resolutionBase = options && options.resolve;
- const getMatcher = (id) => id instanceof RegExp
- ? id
- : {
- test: (what) => {
- // this refactor is a tad overly verbose but makes for easy debugging
- const pattern = getMatcherString(id, resolutionBase);
- const fn = pm(pattern, { dot: true });
- const result = fn(what);
- return result;
- }
- };
- const includeMatchers = ensureArray(include).map(getMatcher);
- const excludeMatchers = ensureArray(exclude).map(getMatcher);
- return function result(id) {
- if (typeof id !== 'string')
- return false;
- if (/\0/.test(id))
- return false;
- const pathId = id.split(path.sep).join('/');
- for (let i = 0; i < excludeMatchers.length; ++i) {
- const matcher = excludeMatchers[i];
- if (matcher.test(pathId))
- return false;
- }
- for (let i = 0; i < includeMatchers.length; ++i) {
- const matcher = includeMatchers[i];
- if (matcher.test(pathId))
- return true;
- }
- return !includeMatchers.length;
- };
-};
-
-const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public';
-const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl';
-const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' '));
-forbiddenIdentifiers.add('');
-const makeLegalIdentifier = function makeLegalIdentifier(str) {
- let identifier = str
- .replace(/-(\w)/g, (_, letter) => letter.toUpperCase())
- .replace(/[^$_a-zA-Z0-9]/g, '_');
- if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) {
- identifier = `_${identifier}`;
- }
- return identifier || '_';
-};
-
-function stringify(obj) {
- return (JSON.stringify(obj) || 'undefined').replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`);
-}
-function serializeArray(arr, indent, baseIndent) {
- let output = '[';
- const separator = indent ? `\n${baseIndent}${indent}` : '';
- for (let i = 0; i < arr.length; i++) {
- const key = arr[i];
- output += `${i > 0 ? ',' : ''}${separator}${serialize(key, indent, baseIndent + indent)}`;
- }
- return `${output}${indent ? `\n${baseIndent}` : ''}]`;
-}
-function serializeObject(obj, indent, baseIndent) {
- let output = '{';
- const separator = indent ? `\n${baseIndent}${indent}` : '';
- const entries = Object.entries(obj);
- for (let i = 0; i < entries.length; i++) {
- const [key, value] = entries[i];
- const stringKey = makeLegalIdentifier(key) === key ? key : stringify(key);
- output += `${i > 0 ? ',' : ''}${separator}${stringKey}:${indent ? ' ' : ''}${serialize(value, indent, baseIndent + indent)}`;
- }
- return `${output}${indent ? `\n${baseIndent}` : ''}}`;
-}
-function serialize(obj, indent, baseIndent) {
- if (obj === Infinity)
- return 'Infinity';
- if (obj === -Infinity)
- return '-Infinity';
- if (obj === 0 && 1 / obj === -Infinity)
- return '-0';
- if (obj instanceof Date)
- return `new Date(${obj.getTime()})`;
- if (obj instanceof RegExp)
- return obj.toString();
- if (obj !== obj)
- return 'NaN'; // eslint-disable-line no-self-compare
- if (Array.isArray(obj))
- return serializeArray(obj, indent, baseIndent);
- if (obj === null)
- return 'null';
- if (typeof obj === 'object')
- return serializeObject(obj, indent, baseIndent);
- return stringify(obj);
-}
-const dataToEsm = function dataToEsm(data, options = {}) {
- const t = options.compact ? '' : 'indent' in options ? options.indent : '\t';
- const _ = options.compact ? '' : ' ';
- const n = options.compact ? '' : '\n';
- const declarationType = options.preferConst ? 'const' : 'var';
- if (options.namedExports === false ||
- typeof data !== 'object' ||
- Array.isArray(data) ||
- data instanceof Date ||
- data instanceof RegExp ||
- data === null) {
- const code = serialize(data, options.compact ? null : t, '');
- const magic = _ || (/^[{[\-\/]/.test(code) ? '' : ' '); // eslint-disable-line no-useless-escape
- return `export default${magic}${code};`;
- }
- let namedExportCode = '';
- const defaultExportRows = [];
- for (const [key, value] of Object.entries(data)) {
- if (key === makeLegalIdentifier(key)) {
- if (options.objectShorthand)
- defaultExportRows.push(key);
- else
- defaultExportRows.push(`${key}:${_}${key}`);
- namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`;
- }
- else {
- defaultExportRows.push(`${stringify(key)}:${_}${serialize(value, options.compact ? null : t, '')}`);
- }
- }
- return `${namedExportCode}export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`;
-};
-
-// TODO: remove this in next major
-var index = {
- addExtension,
- attachScopes,
- createFilter,
- dataToEsm,
- extractAssignedNames,
- makeLegalIdentifier
-};
-
-exports.addExtension = addExtension;
-exports.attachScopes = attachScopes;
-exports.createFilter = createFilter;
-exports.dataToEsm = dataToEsm;
-exports.default = index;
-exports.extractAssignedNames = extractAssignedNames;
-exports.makeLegalIdentifier = makeLegalIdentifier;
diff --git a/node_modules/@rollup/pluginutils/dist/es/index.js b/node_modules/@rollup/pluginutils/dist/es/index.js
deleted file mode 100644
index a423052..0000000
--- a/node_modules/@rollup/pluginutils/dist/es/index.js
+++ /dev/null
@@ -1,436 +0,0 @@
-import { extname, sep, resolve, posix } from 'path';
-import pm from 'picomatch';
-
-const addExtension = function addExtension(filename, ext = '.js') {
- let result = `${filename}`;
- if (!extname(filename))
- result += ext;
- return result;
-};
-
-function walk(ast, { enter, leave }) {
- return visit(ast, null, enter, leave);
-}
-
-let should_skip = false;
-let should_remove = false;
-let replacement = null;
-const context = {
- skip: () => should_skip = true,
- remove: () => should_remove = true,
- replace: (node) => replacement = node
-};
-
-function replace(parent, prop, index, node) {
- if (parent) {
- if (index !== null) {
- parent[prop][index] = node;
- } else {
- parent[prop] = node;
- }
- }
-}
-
-function remove(parent, prop, index) {
- if (parent) {
- if (index !== null) {
- parent[prop].splice(index, 1);
- } else {
- delete parent[prop];
- }
- }
-}
-
-function visit(
- node,
- parent,
- enter,
- leave,
- prop,
- index
-) {
- if (node) {
- if (enter) {
- const _should_skip = should_skip;
- const _should_remove = should_remove;
- const _replacement = replacement;
- should_skip = false;
- should_remove = false;
- replacement = null;
-
- enter.call(context, node, parent, prop, index);
-
- if (replacement) {
- node = replacement;
- replace(parent, prop, index, node);
- }
-
- if (should_remove) {
- remove(parent, prop, index);
- }
-
- const skipped = should_skip;
- const removed = should_remove;
-
- should_skip = _should_skip;
- should_remove = _should_remove;
- replacement = _replacement;
-
- if (skipped) return node;
- if (removed) return null;
- }
-
- for (const key in node) {
- const value = (node )[key];
-
- if (typeof value !== 'object') {
- continue;
- }
-
- else if (Array.isArray(value)) {
- for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
- if (value[j] !== null && typeof value[j].type === 'string') {
- if (!visit(value[j], node, enter, leave, key, k)) {
- // removed
- j--;
- }
- }
- }
- }
-
- else if (value !== null && typeof value.type === 'string') {
- visit(value, node, enter, leave, key, null);
- }
- }
-
- if (leave) {
- const _replacement = replacement;
- const _should_remove = should_remove;
- replacement = null;
- should_remove = false;
-
- leave.call(context, node, parent, prop, index);
-
- if (replacement) {
- node = replacement;
- replace(parent, prop, index, node);
- }
-
- if (should_remove) {
- remove(parent, prop, index);
- }
-
- const removed = should_remove;
-
- replacement = _replacement;
- should_remove = _should_remove;
-
- if (removed) return null;
- }
- }
-
- return node;
-}
-
-const extractors = {
- ArrayPattern(names, param) {
- for (const element of param.elements) {
- if (element)
- extractors[element.type](names, element);
- }
- },
- AssignmentPattern(names, param) {
- extractors[param.left.type](names, param.left);
- },
- Identifier(names, param) {
- names.push(param.name);
- },
- MemberExpression() { },
- ObjectPattern(names, param) {
- for (const prop of param.properties) {
- // @ts-ignore Typescript reports that this is not a valid type
- if (prop.type === 'RestElement') {
- extractors.RestElement(names, prop);
- }
- else {
- extractors[prop.value.type](names, prop.value);
- }
- }
- },
- RestElement(names, param) {
- extractors[param.argument.type](names, param.argument);
- }
-};
-const extractAssignedNames = function extractAssignedNames(param) {
- const names = [];
- extractors[param.type](names, param);
- return names;
-};
-
-const blockDeclarations = {
- const: true,
- let: true
-};
-class Scope {
- constructor(options = {}) {
- this.parent = options.parent;
- this.isBlockScope = !!options.block;
- this.declarations = Object.create(null);
- if (options.params) {
- options.params.forEach((param) => {
- extractAssignedNames(param).forEach((name) => {
- this.declarations[name] = true;
- });
- });
- }
- }
- addDeclaration(node, isBlockDeclaration, isVar) {
- if (!isBlockDeclaration && this.isBlockScope) {
- // it's a `var` or function node, and this
- // is a block scope, so we need to go up
- this.parent.addDeclaration(node, isBlockDeclaration, isVar);
- }
- else if (node.id) {
- extractAssignedNames(node.id).forEach((name) => {
- this.declarations[name] = true;
- });
- }
- }
- contains(name) {
- return this.declarations[name] || (this.parent ? this.parent.contains(name) : false);
- }
-}
-const attachScopes = function attachScopes(ast, propertyName = 'scope') {
- let scope = new Scope();
- walk(ast, {
- enter(n, parent) {
- const node = n;
- // function foo () {...}
- // class Foo {...}
- if (/(Function|Class)Declaration/.test(node.type)) {
- scope.addDeclaration(node, false, false);
- }
- // var foo = 1
- if (node.type === 'VariableDeclaration') {
- const { kind } = node;
- const isBlockDeclaration = blockDeclarations[kind];
- // don't add const/let declarations in the body of a for loop #113
- const parentType = parent ? parent.type : '';
- if (!(isBlockDeclaration && /ForOfStatement/.test(parentType))) {
- node.declarations.forEach((declaration) => {
- scope.addDeclaration(declaration, isBlockDeclaration, true);
- });
- }
- }
- let newScope;
- // create new function scope
- if (/Function/.test(node.type)) {
- const func = node;
- newScope = new Scope({
- parent: scope,
- block: false,
- params: func.params
- });
- // named function expressions - the name is considered
- // part of the function's scope
- if (func.type === 'FunctionExpression' && func.id) {
- newScope.addDeclaration(func, false, false);
- }
- }
- // create new block scope
- if (node.type === 'BlockStatement' && !/Function/.test(parent.type)) {
- newScope = new Scope({
- parent: scope,
- block: true
- });
- }
- // catch clause has its own block scope
- if (node.type === 'CatchClause') {
- newScope = new Scope({
- parent: scope,
- params: node.param ? [node.param] : [],
- block: true
- });
- }
- if (newScope) {
- Object.defineProperty(node, propertyName, {
- value: newScope,
- configurable: true
- });
- scope = newScope;
- }
- },
- leave(n) {
- const node = n;
- if (node[propertyName])
- scope = scope.parent;
- }
- });
- return scope;
-};
-
-// Helper since Typescript can't detect readonly arrays with Array.isArray
-function isArray(arg) {
- return Array.isArray(arg);
-}
-function ensureArray(thing) {
- if (isArray(thing))
- return thing;
- if (thing == null)
- return [];
- return [thing];
-}
-
-function getMatcherString(id, resolutionBase) {
- if (resolutionBase === false) {
- return id;
- }
- // resolve('') is valid and will default to process.cwd()
- const basePath = resolve(resolutionBase || '')
- .split(sep)
- .join('/')
- // escape all possible (posix + win) path characters that might interfere with regex
- .replace(/[-^$*+?.()|[\]{}]/g, '\\$&');
- // Note that we use posix.join because:
- // 1. the basePath has been normalized to use /
- // 2. the incoming glob (id) matcher, also uses /
- // otherwise Node will force backslash (\) on windows
- return posix.join(basePath, id);
-}
-const createFilter = function createFilter(include, exclude, options) {
- const resolutionBase = options && options.resolve;
- const getMatcher = (id) => id instanceof RegExp
- ? id
- : {
- test: (what) => {
- // this refactor is a tad overly verbose but makes for easy debugging
- const pattern = getMatcherString(id, resolutionBase);
- const fn = pm(pattern, { dot: true });
- const result = fn(what);
- return result;
- }
- };
- const includeMatchers = ensureArray(include).map(getMatcher);
- const excludeMatchers = ensureArray(exclude).map(getMatcher);
- return function result(id) {
- if (typeof id !== 'string')
- return false;
- if (/\0/.test(id))
- return false;
- const pathId = id.split(sep).join('/');
- for (let i = 0; i < excludeMatchers.length; ++i) {
- const matcher = excludeMatchers[i];
- if (matcher.test(pathId))
- return false;
- }
- for (let i = 0; i < includeMatchers.length; ++i) {
- const matcher = includeMatchers[i];
- if (matcher.test(pathId))
- return true;
- }
- return !includeMatchers.length;
- };
-};
-
-const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public';
-const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl';
-const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' '));
-forbiddenIdentifiers.add('');
-const makeLegalIdentifier = function makeLegalIdentifier(str) {
- let identifier = str
- .replace(/-(\w)/g, (_, letter) => letter.toUpperCase())
- .replace(/[^$_a-zA-Z0-9]/g, '_');
- if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) {
- identifier = `_${identifier}`;
- }
- return identifier || '_';
-};
-
-function stringify(obj) {
- return (JSON.stringify(obj) || 'undefined').replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`);
-}
-function serializeArray(arr, indent, baseIndent) {
- let output = '[';
- const separator = indent ? `\n${baseIndent}${indent}` : '';
- for (let i = 0; i < arr.length; i++) {
- const key = arr[i];
- output += `${i > 0 ? ',' : ''}${separator}${serialize(key, indent, baseIndent + indent)}`;
- }
- return `${output}${indent ? `\n${baseIndent}` : ''}]`;
-}
-function serializeObject(obj, indent, baseIndent) {
- let output = '{';
- const separator = indent ? `\n${baseIndent}${indent}` : '';
- const entries = Object.entries(obj);
- for (let i = 0; i < entries.length; i++) {
- const [key, value] = entries[i];
- const stringKey = makeLegalIdentifier(key) === key ? key : stringify(key);
- output += `${i > 0 ? ',' : ''}${separator}${stringKey}:${indent ? ' ' : ''}${serialize(value, indent, baseIndent + indent)}`;
- }
- return `${output}${indent ? `\n${baseIndent}` : ''}}`;
-}
-function serialize(obj, indent, baseIndent) {
- if (obj === Infinity)
- return 'Infinity';
- if (obj === -Infinity)
- return '-Infinity';
- if (obj === 0 && 1 / obj === -Infinity)
- return '-0';
- if (obj instanceof Date)
- return `new Date(${obj.getTime()})`;
- if (obj instanceof RegExp)
- return obj.toString();
- if (obj !== obj)
- return 'NaN'; // eslint-disable-line no-self-compare
- if (Array.isArray(obj))
- return serializeArray(obj, indent, baseIndent);
- if (obj === null)
- return 'null';
- if (typeof obj === 'object')
- return serializeObject(obj, indent, baseIndent);
- return stringify(obj);
-}
-const dataToEsm = function dataToEsm(data, options = {}) {
- const t = options.compact ? '' : 'indent' in options ? options.indent : '\t';
- const _ = options.compact ? '' : ' ';
- const n = options.compact ? '' : '\n';
- const declarationType = options.preferConst ? 'const' : 'var';
- if (options.namedExports === false ||
- typeof data !== 'object' ||
- Array.isArray(data) ||
- data instanceof Date ||
- data instanceof RegExp ||
- data === null) {
- const code = serialize(data, options.compact ? null : t, '');
- const magic = _ || (/^[{[\-\/]/.test(code) ? '' : ' '); // eslint-disable-line no-useless-escape
- return `export default${magic}${code};`;
- }
- let namedExportCode = '';
- const defaultExportRows = [];
- for (const [key, value] of Object.entries(data)) {
- if (key === makeLegalIdentifier(key)) {
- if (options.objectShorthand)
- defaultExportRows.push(key);
- else
- defaultExportRows.push(`${key}:${_}${key}`);
- namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`;
- }
- else {
- defaultExportRows.push(`${stringify(key)}:${_}${serialize(value, options.compact ? null : t, '')}`);
- }
- }
- return `${namedExportCode}export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`;
-};
-
-// TODO: remove this in next major
-var index = {
- addExtension,
- attachScopes,
- createFilter,
- dataToEsm,
- extractAssignedNames,
- makeLegalIdentifier
-};
-
-export default index;
-export { addExtension, attachScopes, createFilter, dataToEsm, extractAssignedNames, makeLegalIdentifier };
diff --git a/node_modules/@rollup/pluginutils/dist/es/package.json b/node_modules/@rollup/pluginutils/dist/es/package.json
deleted file mode 100644
index 7c34deb..0000000
--- a/node_modules/@rollup/pluginutils/dist/es/package.json
+++ /dev/null
@@ -1 +0,0 @@
-{"type":"module"}
\ No newline at end of file
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/CHANGELOG.md b/node_modules/@rollup/pluginutils/node_modules/estree-walker/CHANGELOG.md
deleted file mode 100644
index d7c878c..0000000
--- a/node_modules/@rollup/pluginutils/node_modules/estree-walker/CHANGELOG.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# changelog
-
-## 1.0.1
-
-* Relax node type to `BaseNode` ([#17](https://github.com/Rich-Harris/estree-walker/pull/17))
-
-## 1.0.0
-
-* Don't cache child keys
-
-## 0.9.0
-
-* Add `this.remove()` method
-
-## 0.8.1
-
-* Fix pkg.files
-
-## 0.8.0
-
-* Adopt `estree` types
-
-## 0.7.0
-
-* Add a `this.replace(node)` method
-
-## 0.6.1
-
-* Only traverse nodes that exist and have a type ([#9](https://github.com/Rich-Harris/estree-walker/pull/9))
-* Only cache keys for nodes with a type ([#8](https://github.com/Rich-Harris/estree-walker/pull/8))
-
-## 0.6.0
-
-* Fix walker context type
-* Update deps, remove unncessary Bublé transformation
-
-## 0.5.2
-
-* Add types to package
-
-## 0.5.1
-
-* Prevent context corruption when `walk()` is called during a walk
-
-## 0.5.0
-
-* Export `childKeys`, for manually fixing in case of malformed ASTs
-
-## 0.4.0
-
-* Add TypeScript typings ([#3](https://github.com/Rich-Harris/estree-walker/pull/3))
-
-## 0.3.1
-
-* Include `pkg.repository` ([#2](https://github.com/Rich-Harris/estree-walker/pull/2))
-
-## 0.3.0
-
-* More predictable ordering
-
-## 0.2.1
-
-* Keep `context` shape
-
-## 0.2.0
-
-* Add ES6 build
-
-## 0.1.3
-
-* npm snafu
-
-## 0.1.2
-
-* Pass current prop and index to `enter`/`leave` callbacks
-
-## 0.1.1
-
-* First release
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/README.md b/node_modules/@rollup/pluginutils/node_modules/estree-walker/README.md
deleted file mode 100644
index d877af3..0000000
--- a/node_modules/@rollup/pluginutils/node_modules/estree-walker/README.md
+++ /dev/null
@@ -1,48 +0,0 @@
-# estree-walker
-
-Simple utility for walking an [ESTree](https://github.com/estree/estree)-compliant AST, such as one generated by [acorn](https://github.com/marijnh/acorn).
-
-
-## Installation
-
-```bash
-npm i estree-walker
-```
-
-
-## Usage
-
-```js
-var walk = require( 'estree-walker' ).walk;
-var acorn = require( 'acorn' );
-
-ast = acorn.parse( sourceCode, options ); // https://github.com/acornjs/acorn
-
-walk( ast, {
- enter: function ( node, parent, prop, index ) {
- // some code happens
- },
- leave: function ( node, parent, prop, index ) {
- // some code happens
- }
-});
-```
-
-Inside the `enter` function, calling `this.skip()` will prevent the node's children being walked, or the `leave` function (which is optional) being called.
-
-Call `this.replace(new_node)` in either `enter` or `leave` to replace the current node with a new one.
-
-Call `this.remove()` in either `enter` or `leave` to remove the current node.
-
-## Why not use estraverse?
-
-The ESTree spec is evolving to accommodate ES6/7. I've had a couple of experiences where [estraverse](https://github.com/estools/estraverse) was unable to handle an AST generated by recent versions of acorn, because it hard-codes visitor keys.
-
-estree-walker, by contrast, simply enumerates a node's properties to find child nodes (and child lists of nodes), and is therefore resistant to spec changes. It's also much smaller. (The performance, if you're wondering, is basically identical.)
-
-None of which should be taken as criticism of estraverse, which has more features and has been battle-tested in many more situations, and for which I'm very grateful.
-
-
-## License
-
-MIT
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js b/node_modules/@rollup/pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js
deleted file mode 100644
index f2e012a..0000000
--- a/node_modules/@rollup/pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js
+++ /dev/null
@@ -1,135 +0,0 @@
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
- (factory((global.estreeWalker = {})));
-}(this, (function (exports) { 'use strict';
-
- function walk(ast, { enter, leave }) {
- return visit(ast, null, enter, leave);
- }
-
- let should_skip = false;
- let should_remove = false;
- let replacement = null;
- const context = {
- skip: () => should_skip = true,
- remove: () => should_remove = true,
- replace: (node) => replacement = node
- };
-
- function replace(parent, prop, index, node) {
- if (parent) {
- if (index !== null) {
- parent[prop][index] = node;
- } else {
- parent[prop] = node;
- }
- }
- }
-
- function remove(parent, prop, index) {
- if (parent) {
- if (index !== null) {
- parent[prop].splice(index, 1);
- } else {
- delete parent[prop];
- }
- }
- }
-
- function visit(
- node,
- parent,
- enter,
- leave,
- prop,
- index
- ) {
- if (node) {
- if (enter) {
- const _should_skip = should_skip;
- const _should_remove = should_remove;
- const _replacement = replacement;
- should_skip = false;
- should_remove = false;
- replacement = null;
-
- enter.call(context, node, parent, prop, index);
-
- if (replacement) {
- node = replacement;
- replace(parent, prop, index, node);
- }
-
- if (should_remove) {
- remove(parent, prop, index);
- }
-
- const skipped = should_skip;
- const removed = should_remove;
-
- should_skip = _should_skip;
- should_remove = _should_remove;
- replacement = _replacement;
-
- if (skipped) return node;
- if (removed) return null;
- }
-
- for (const key in node) {
- const value = (node )[key];
-
- if (typeof value !== 'object') {
- continue;
- }
-
- else if (Array.isArray(value)) {
- for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
- if (value[j] !== null && typeof value[j].type === 'string') {
- if (!visit(value[j], node, enter, leave, key, k)) {
- // removed
- j--;
- }
- }
- }
- }
-
- else if (value !== null && typeof value.type === 'string') {
- visit(value, node, enter, leave, key, null);
- }
- }
-
- if (leave) {
- const _replacement = replacement;
- const _should_remove = should_remove;
- replacement = null;
- should_remove = false;
-
- leave.call(context, node, parent, prop, index);
-
- if (replacement) {
- node = replacement;
- replace(parent, prop, index, node);
- }
-
- if (should_remove) {
- remove(parent, prop, index);
- }
-
- const removed = should_remove;
-
- replacement = _replacement;
- should_remove = _should_remove;
-
- if (removed) return null;
- }
- }
-
- return node;
- }
-
- exports.walk = walk;
-
- Object.defineProperty(exports, '__esModule', { value: true });
-
-})));
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js.map b/node_modules/@rollup/pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js.map
deleted file mode 100644
index 7ea2297..0000000
--- a/node_modules/@rollup/pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"estree-walker.umd.js","sources":["../src/estree-walker.js"],"sourcesContent":["export function walk(ast, { enter, leave }) {\n\tvisit(ast, null, enter, leave);\n}\n\nlet shouldSkip = false;\nconst context = { skip: () => shouldSkip = true };\n\nexport const childKeys = {};\n\nconst toString = Object.prototype.toString;\n\nfunction isArray(thing) {\n\treturn toString.call(thing) === '[object Array]';\n}\n\nfunction visit(node, parent, enter, leave, prop, index) {\n\tif (!node) return;\n\n\tif (enter) {\n\t\tconst _shouldSkip = shouldSkip;\n\t\tshouldSkip = false;\n\t\tenter.call(context, node, parent, prop, index);\n\t\tconst skipped = shouldSkip;\n\t\tshouldSkip = _shouldSkip;\n\n\t\tif (skipped) return;\n\t}\n\n\tconst keys = childKeys[node.type] || (\n\t\tchildKeys[node.type] = Object.keys(node).filter(key => typeof node[key] === 'object')\n\t);\n\n\tfor (let i = 0; i < keys.length; i += 1) {\n\t\tconst key = keys[i];\n\t\tconst value = node[key];\n\n\t\tif (isArray(value)) {\n\t\t\tfor (let j = 0; j < value.length; j += 1) {\n\t\t\t\tvisit(value[j], node, enter, leave, key, j);\n\t\t\t}\n\t\t}\n\n\t\telse if (value && value.type) {\n\t\t\tvisit(value, node, enter, leave, key, null);\n\t\t}\n\t}\n\n\tif (leave) {\n\t\tleave(node, parent, prop, index);\n\t}\n}\n"],"names":[],"mappings":";;;;;;CAAO,SAAS,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;CAC5C,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;CAChC,CAAC;;CAED,IAAI,UAAU,GAAG,KAAK,CAAC;CACvB,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,UAAU,GAAG,IAAI,EAAE,CAAC;;AAElD,AAAY,OAAC,SAAS,GAAG,EAAE,CAAC;;CAE5B,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;;CAE3C,SAAS,OAAO,CAAC,KAAK,EAAE;CACxB,CAAC,OAAO,QAAQ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,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;CAChD,IAAI;CACJ,GAAG;;CAEH,OAAO,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE;CAChC,GAAG,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;CAC/C,GAAG;CACH,EAAE;;CAEF,CAAC,IAAI,KAAK,EAAE;CACZ,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;CACnC,EAAE;CACF,CAAC;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/package.json b/node_modules/@rollup/pluginutils/node_modules/estree-walker/package.json
deleted file mode 100644
index 363894a..0000000
--- a/node_modules/@rollup/pluginutils/node_modules/estree-walker/package.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
- "_from": "estree-walker@^1.0.1",
- "_id": "estree-walker@1.0.1",
- "_inBundle": false,
- "_integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==",
- "_location": "/@rollup/pluginutils/estree-walker",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "estree-walker@^1.0.1",
- "name": "estree-walker",
- "escapedName": "estree-walker",
- "rawSpec": "^1.0.1",
- "saveSpec": null,
- "fetchSpec": "^1.0.1"
- },
- "_requiredBy": [
- "/@rollup/pluginutils"
- ],
- "_resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz",
- "_shasum": "31bc5d612c96b704106b477e6dd5d8aa138cb700",
- "_spec": "estree-walker@^1.0.1",
- "_where": "/Users/keiferju/Workplace/dllcnx/dTools/node_modules/@rollup/pluginutils",
- "author": {
- "name": "Rich Harris"
- },
- "bugs": {
- "url": "https://github.com/Rich-Harris/estree-walker/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Traverse an ESTree-compliant AST",
- "devDependencies": {
- "@types/estree": "0.0.39",
- "mocha": "^5.2.0",
- "rollup": "^0.67.3",
- "rollup-plugin-sucrase": "^2.1.0",
- "typescript": "^3.6.3"
- },
- "files": [
- "src",
- "dist",
- "types",
- "README.md"
- ],
- "homepage": "https://github.com/Rich-Harris/estree-walker#readme",
- "license": "MIT",
- "main": "dist/estree-walker.umd.js",
- "module": "src/estree-walker.js",
- "name": "estree-walker",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/Rich-Harris/estree-walker.git"
- },
- "scripts": {
- "build": "tsc && rollup -c",
- "prepublishOnly": "npm run build && npm test",
- "test": "mocha --opts mocha.opts"
- },
- "types": "types/index.d.ts",
- "version": "1.0.1"
-}
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/src/estree-walker.js b/node_modules/@rollup/pluginutils/node_modules/estree-walker/src/estree-walker.js
deleted file mode 100644
index e1b01df..0000000
--- a/node_modules/@rollup/pluginutils/node_modules/estree-walker/src/estree-walker.js
+++ /dev/null
@@ -1,125 +0,0 @@
-function walk(ast, { enter, leave }) {
- return visit(ast, null, enter, leave);
-}
-
-let should_skip = false;
-let should_remove = false;
-let replacement = null;
-const context = {
- skip: () => should_skip = true,
- remove: () => should_remove = true,
- replace: (node) => replacement = node
-};
-
-function replace(parent, prop, index, node) {
- if (parent) {
- if (index !== null) {
- parent[prop][index] = node;
- } else {
- parent[prop] = node;
- }
- }
-}
-
-function remove(parent, prop, index) {
- if (parent) {
- if (index !== null) {
- parent[prop].splice(index, 1);
- } else {
- delete parent[prop];
- }
- }
-}
-
-function visit(
- node,
- parent,
- enter,
- leave,
- prop,
- index
-) {
- if (node) {
- if (enter) {
- const _should_skip = should_skip;
- const _should_remove = should_remove;
- const _replacement = replacement;
- should_skip = false;
- should_remove = false;
- replacement = null;
-
- enter.call(context, node, parent, prop, index);
-
- if (replacement) {
- node = replacement;
- replace(parent, prop, index, node);
- }
-
- if (should_remove) {
- remove(parent, prop, index);
- }
-
- const skipped = should_skip;
- const removed = should_remove;
-
- should_skip = _should_skip;
- should_remove = _should_remove;
- replacement = _replacement;
-
- if (skipped) return node;
- if (removed) return null;
- }
-
- for (const key in node) {
- const value = (node )[key];
-
- if (typeof value !== 'object') {
- continue;
- }
-
- else if (Array.isArray(value)) {
- for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
- if (value[j] !== null && typeof value[j].type === 'string') {
- if (!visit(value[j], node, enter, leave, key, k)) {
- // removed
- j--;
- }
- }
- }
- }
-
- else if (value !== null && typeof value.type === 'string') {
- visit(value, node, enter, leave, key, null);
- }
- }
-
- if (leave) {
- const _replacement = replacement;
- const _should_remove = should_remove;
- replacement = null;
- should_remove = false;
-
- leave.call(context, node, parent, prop, index);
-
- if (replacement) {
- node = replacement;
- replace(parent, prop, index, node);
- }
-
- if (should_remove) {
- remove(parent, prop, index);
- }
-
- const removed = should_remove;
-
- replacement = _replacement;
- should_remove = _should_remove;
-
- if (removed) return null;
- }
- }
-
- return node;
-}
-
-export { walk };
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/src/index.ts b/node_modules/@rollup/pluginutils/node_modules/estree-walker/src/index.ts
deleted file mode 100644
index 09ed516..0000000
--- a/node_modules/@rollup/pluginutils/node_modules/estree-walker/src/index.ts
+++ /dev/null
@@ -1,144 +0,0 @@
-import { BaseNode } from "estree";
-
-type WalkerContext = {
- skip: () => void;
- remove: () => void;
- replace: (node: BaseNode) => void;
-};
-
-type WalkerHandler = (
- this: WalkerContext,
- node: BaseNode,
- parent: BaseNode,
- key: string,
- index: number
-) => void
-
-type Walker = {
- enter?: WalkerHandler;
- leave?: WalkerHandler;
-}
-
-export function walk(ast: BaseNode, { enter, leave }: Walker) {
- return visit(ast, null, enter, leave);
-}
-
-let should_skip = false;
-let should_remove = false;
-let replacement: BaseNode = null;
-const context: WalkerContext = {
- skip: () => should_skip = true,
- remove: () => should_remove = true,
- replace: (node: BaseNode) => replacement = node
-};
-
-function replace(parent: any, prop: string, index: number, node: BaseNode) {
- if (parent) {
- if (index !== null) {
- parent[prop][index] = node;
- } else {
- parent[prop] = node;
- }
- }
-}
-
-function remove(parent: any, prop: string, index: number) {
- if (parent) {
- if (index !== null) {
- parent[prop].splice(index, 1);
- } else {
- delete parent[prop];
- }
- }
-}
-
-function visit(
- node: BaseNode,
- parent: BaseNode,
- enter: WalkerHandler,
- leave: WalkerHandler,
- prop?: string,
- index?: number
-) {
- if (node) {
- if (enter) {
- const _should_skip = should_skip;
- const _should_remove = should_remove;
- const _replacement = replacement;
- should_skip = false;
- should_remove = false;
- replacement = null;
-
- enter.call(context, node, parent, prop, index);
-
- if (replacement) {
- node = replacement;
- replace(parent, prop, index, node);
- }
-
- if (should_remove) {
- remove(parent, prop, index);
- }
-
- const skipped = should_skip;
- const removed = should_remove;
-
- should_skip = _should_skip;
- should_remove = _should_remove;
- replacement = _replacement;
-
- if (skipped) return node;
- if (removed) return null;
- }
-
- for (const key in node) {
- const value = (node as any)[key];
-
- if (typeof value !== 'object') {
- continue;
- }
-
- else if (Array.isArray(value)) {
- for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
- if (value[j] !== null && typeof value[j].type === 'string') {
- if (!visit(value[j], node, enter, leave, key, k)) {
- // removed
- j--;
- }
- }
- }
- }
-
- else if (value !== null && typeof value.type === 'string') {
- visit(value, node, enter, leave, key, null);
- }
- }
-
- if (leave) {
- const _replacement = replacement;
- const _should_remove = should_remove;
- replacement = null;
- should_remove = false;
-
- leave.call(context, node, parent, prop, index);
-
- if (replacement) {
- node = replacement;
- replace(parent, prop, index, node);
- }
-
- if (should_remove) {
- remove(parent, prop, index);
- }
-
- const removed = should_remove;
-
- replacement = _replacement;
- should_remove = _should_remove;
-
- if (removed) return null;
- }
- }
-
- return node;
-}
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/types/index.d.ts b/node_modules/@rollup/pluginutils/node_modules/estree-walker/types/index.d.ts
deleted file mode 100644
index 7540a90..0000000
--- a/node_modules/@rollup/pluginutils/node_modules/estree-walker/types/index.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { BaseNode } from "estree";
-declare type WalkerContext = {
- skip: () => void;
- remove: () => void;
- replace: (node: BaseNode) => void;
-};
-declare type WalkerHandler = (this: WalkerContext, node: BaseNode, parent: BaseNode, key: string, index: number) => void;
-declare type Walker = {
- enter?: WalkerHandler;
- leave?: WalkerHandler;
-};
-export declare function walk(ast: BaseNode, { enter, leave }: Walker): BaseNode;
-export {};
diff --git a/node_modules/@rollup/pluginutils/package.json b/node_modules/@rollup/pluginutils/package.json
deleted file mode 100644
index 8f82ce6..0000000
--- a/node_modules/@rollup/pluginutils/package.json
+++ /dev/null
@@ -1,124 +0,0 @@
-{
- "_from": "@rollup/pluginutils@^3.1.0",
- "_id": "@rollup/pluginutils@3.1.0",
- "_inBundle": false,
- "_integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==",
- "_location": "/@rollup/pluginutils",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "@rollup/pluginutils@^3.1.0",
- "name": "@rollup/pluginutils",
- "escapedName": "@rollup%2fpluginutils",
- "scope": "@rollup",
- "rawSpec": "^3.1.0",
- "saveSpec": null,
- "fetchSpec": "^3.1.0"
- },
- "_requiredBy": [
- "/@rollup/plugin-commonjs",
- "/@rollup/plugin-node-resolve"
- ],
- "_resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz",
- "_shasum": "706b4524ee6dc8b103b3c995533e5ad680c02b9b",
- "_spec": "@rollup/pluginutils@^3.1.0",
- "_where": "/Users/keiferju/Workplace/dllcnx/dTools/node_modules/@rollup/plugin-commonjs",
- "author": {
- "name": "Rich Harris",
- "email": "richard.a.harris@gmail.com"
- },
- "ava": {
- "compileEnhancements": false,
- "extensions": [
- "ts"
- ],
- "require": [
- "ts-node/register"
- ],
- "files": [
- "!**/fixtures/**",
- "!**/helpers/**",
- "!**/recipes/**",
- "!**/types.ts"
- ]
- },
- "bugs": {
- "url": "https://github.com/rollup/plugins/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "@types/estree": "0.0.39",
- "estree-walker": "^1.0.1",
- "picomatch": "^2.2.2"
- },
- "deprecated": false,
- "description": "A set of utility functions commonly used by Rollup plugins",
- "devDependencies": {
- "@rollup/plugin-commonjs": "^11.0.2",
- "@rollup/plugin-node-resolve": "^7.1.1",
- "@rollup/plugin-typescript": "^3.0.0",
- "@types/jest": "^24.9.0",
- "@types/node": "^12.12.25",
- "@types/picomatch": "^2.2.1",
- "typescript": "^3.7.5"
- },
- "engines": {
- "node": ">= 8.0.0"
- },
- "exports": {
- "require": "./dist/cjs/index.js",
- "import": "./dist/es/index.js"
- },
- "files": [
- "dist",
- "types",
- "README.md",
- "LICENSE"
- ],
- "homepage": "https://github.com/rollup/plugins/tree/master/packages/pluginutils#readme",
- "keywords": [
- "rollup",
- "plugin",
- "utils"
- ],
- "license": "MIT",
- "main": "./dist/cjs/index.js",
- "module": "./dist/es/index.js",
- "name": "@rollup/pluginutils",
- "nyc": {
- "extension": [
- ".js",
- ".ts"
- ]
- },
- "peerDependencies": {
- "rollup": "^1.20.0||^2.0.0"
- },
- "publishConfig": {
- "access": "public"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/rollup/plugins.git"
- },
- "scripts": {
- "build": "rollup -c",
- "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
- "ci:lint": "pnpm run build && pnpm run lint",
- "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
- "ci:test": "pnpm run test -- --verbose",
- "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
- "lint:docs": "prettier --single-quote --write README.md",
- "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
- "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
- "prebuild": "del-cli dist",
- "prepare": "pnpm run build",
- "prepublishOnly": "pnpm run lint && pnpm run build",
- "pretest": "pnpm run build -- --sourcemap",
- "test": "ava"
- },
- "type": "commonjs",
- "types": "types/index.d.ts",
- "version": "3.1.0"
-}
diff --git a/node_modules/@rollup/pluginutils/types/index.d.ts b/node_modules/@rollup/pluginutils/types/index.d.ts
deleted file mode 100755
index 33d40e5..0000000
--- a/node_modules/@rollup/pluginutils/types/index.d.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-// eslint-disable-next-line import/no-unresolved
-import { BaseNode } from 'estree';
-
-export interface AttachedScope {
- parent?: AttachedScope;
- isBlockScope: boolean;
- declarations: { [key: string]: boolean };
- addDeclaration(node: BaseNode, isBlockDeclaration: boolean, isVar: boolean): void;
- contains(name: string): boolean;
-}
-
-export interface DataToEsmOptions {
- compact?: boolean;
- indent?: string;
- namedExports?: boolean;
- objectShorthand?: boolean;
- preferConst?: boolean;
-}
-
-/**
- * A valid `minimatch` pattern, or array of patterns.
- */
-export type FilterPattern = ReadonlyArray | string | RegExp | null;
-
-/**
- * Adds an extension to a module ID if one does not exist.
- */
-export function addExtension(filename: string, ext?: string): string;
-
-/**
- * Attaches `Scope` objects to the relevant nodes of an AST.
- * Each `Scope` object has a `scope.contains(name)` method that returns `true`
- * if a given name is defined in the current scope or a parent scope.
- */
-export function attachScopes(ast: BaseNode, propertyName?: string): AttachedScope;
-
-/**
- * Constructs a filter function which can be used to determine whether or not
- * certain modules should be operated upon.
- * @param include If `include` is omitted or has zero length, filter will return `true` by default.
- * @param exclude ID must not match any of the `exclude` patterns.
- * @param options Optionally resolves the patterns against a directory other than `process.cwd()`.
- * If a `string` is specified, then the value will be used as the base directory.
- * Relative paths will be resolved against `process.cwd()` first.
- * If `false`, then the patterns will not be resolved against any directory.
- * This can be useful if you want to create a filter for virtual module names.
- */
-export function createFilter(
- include?: FilterPattern,
- exclude?: FilterPattern,
- options?: { resolve?: string | false | null }
-): (id: string | unknown) => boolean;
-
-/**
- * Transforms objects into tree-shakable ES Module imports.
- * @param data An object to transform into an ES module.
- */
-export function dataToEsm(data: unknown, options?: DataToEsmOptions): string;
-
-/**
- * Extracts the names of all assignment targets based upon specified patterns.
- * @param param An `acorn` AST Node.
- */
-export function extractAssignedNames(param: BaseNode): string[];
-
-/**
- * Constructs a bundle-safe identifier from a `string`.
- */
-export function makeLegalIdentifier(str: string): string;
-
-export type AddExtension = typeof addExtension;
-export type AttachScopes = typeof attachScopes;
-export type CreateFilter = typeof createFilter;
-export type ExtractAssignedNames = typeof extractAssignedNames;
-export type MakeLegalIdentifier = typeof makeLegalIdentifier;
-export type DataToEsm = typeof dataToEsm;
-
-declare const defaultExport: {
- addExtension: AddExtension;
- attachScopes: AttachScopes;
- createFilter: CreateFilter;
- dataToEsm: DataToEsm;
- extractAssignedNames: ExtractAssignedNames;
- makeLegalIdentifier: MakeLegalIdentifier;
-};
-export default defaultExport;
diff --git a/node_modules/@types/estree/LICENSE b/node_modules/@types/estree/LICENSE
deleted file mode 100644
index 4b1ad51..0000000
--- a/node_modules/@types/estree/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
- MIT License
-
- Copyright (c) Microsoft Corporation. All rights reserved.
-
- 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
diff --git a/node_modules/@types/estree/README.md b/node_modules/@types/estree/README.md
deleted file mode 100644
index 3ec0d39..0000000
--- a/node_modules/@types/estree/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Installation
-> `npm install --save @types/estree`
-
-# Summary
-This package contains type definitions for ESTree AST specification (https://github.com/estree/estree).
-
-# Details
-Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree
-
-Additional Details
- * Last updated: Tue, 17 Apr 2018 20:22:09 GMT
- * Dependencies: none
- * Global values: none
-
-# Credits
-These definitions were written by RReverser .
diff --git a/node_modules/@types/estree/index.d.ts b/node_modules/@types/estree/index.d.ts
deleted file mode 100644
index 9109295..0000000
--- a/node_modules/@types/estree/index.d.ts
+++ /dev/null
@@ -1,548 +0,0 @@
-// Type definitions for ESTree AST specification
-// Project: https://github.com/estree/estree
-// Definitions by: RReverser
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-// This definition file follows a somewhat unusual format. ESTree allows
-// runtime type checks based on the `type` parameter. In order to explain this
-// to typescript we want to use discriminated union types:
-// https://github.com/Microsoft/TypeScript/pull/9163
-//
-// For ESTree this is a bit tricky because the high level interfaces like
-// Node or Function are pulling double duty. We want to pass common fields down
-// to the interfaces that extend them (like Identifier or
-// ArrowFunctionExpression), but you can't extend a type union or enforce
-// common fields on them. So we've split the high level interfaces into two
-// types, a base type which passes down inhereted fields, and a type union of
-// all types which extend the base type. Only the type union is exported, and
-// the union is how other types refer to the collection of inheriting types.
-//
-// This makes the definitions file here somewhat more difficult to maintain,
-// but it has the notable advantage of making ESTree much easier to use as
-// an end user.
-
-interface BaseNodeWithoutComments {
- // Every leaf interface that extends BaseNode must specify a type property.
- // The type property should be a string literal. For example, Identifier
- // has: `type: "Identifier"`
- type: string;
- loc?: SourceLocation | null;
- range?: [number, number];
-}
-
-interface BaseNode extends BaseNodeWithoutComments {
- leadingComments?: Array;
- trailingComments?: Array;
-}
-
-export type Node =
- Identifier | Literal | Program | Function | SwitchCase | CatchClause |
- VariableDeclarator | Statement | Expression | Property |
- AssignmentProperty | Super | TemplateElement | SpreadElement | Pattern |
- ClassBody | Class | MethodDefinition | ModuleDeclaration | ModuleSpecifier;
-
-export interface Comment extends BaseNodeWithoutComments {
- type: "Line" | "Block";
- value: string;
-}
-
-interface SourceLocation {
- source?: string | null;
- start: Position;
- end: Position;
-}
-
-export interface Position {
- /** >= 1 */
- line: number;
- /** >= 0 */
- column: number;
-}
-
-export interface Program extends BaseNode {
- type: "Program";
- sourceType: "script" | "module";
- body: Array;
- comments?: Array;
-}
-
-interface BaseFunction extends BaseNode {
- params: Array;
- generator?: boolean;
- async?: boolean;
- // The body is either BlockStatement or Expression because arrow functions
- // can have a body that's either. FunctionDeclarations and
- // FunctionExpressions have only BlockStatement bodies.
- body: BlockStatement | Expression;
-}
-
-export type Function =
- FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
-
-export type Statement =
- ExpressionStatement | BlockStatement | EmptyStatement |
- DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement |
- BreakStatement | ContinueStatement | IfStatement | SwitchStatement |
- ThrowStatement | TryStatement | WhileStatement | DoWhileStatement |
- ForStatement | ForInStatement | ForOfStatement | Declaration;
-
-interface BaseStatement extends BaseNode { }
-
-export interface EmptyStatement extends BaseStatement {
- type: "EmptyStatement";
-}
-
-export interface BlockStatement extends BaseStatement {
- type: "BlockStatement";
- body: Array;
- innerComments?: Array;
-}
-
-export interface ExpressionStatement extends BaseStatement {
- type: "ExpressionStatement";
- expression: Expression;
-}
-
-export interface IfStatement extends BaseStatement {
- type: "IfStatement";
- test: Expression;
- consequent: Statement;
- alternate?: Statement | null;
-}
-
-export interface LabeledStatement extends BaseStatement {
- type: "LabeledStatement";
- label: Identifier;
- body: Statement;
-}
-
-export interface BreakStatement extends BaseStatement {
- type: "BreakStatement";
- label?: Identifier | null;
-}
-
-export interface ContinueStatement extends BaseStatement {
- type: "ContinueStatement";
- label?: Identifier | null;
-}
-
-export interface WithStatement extends BaseStatement {
- type: "WithStatement";
- object: Expression;
- body: Statement;
-}
-
-export interface SwitchStatement extends BaseStatement {
- type: "SwitchStatement";
- discriminant: Expression;
- cases: Array;
-}
-
-export interface ReturnStatement extends BaseStatement {
- type: "ReturnStatement";
- argument?: Expression | null;
-}
-
-export interface ThrowStatement extends BaseStatement {
- type: "ThrowStatement";
- argument: Expression;
-}
-
-export interface TryStatement extends BaseStatement {
- type: "TryStatement";
- block: BlockStatement;
- handler?: CatchClause | null;
- finalizer?: BlockStatement | null;
-}
-
-export interface WhileStatement extends BaseStatement {
- type: "WhileStatement";
- test: Expression;
- body: Statement;
-}
-
-export interface DoWhileStatement extends BaseStatement {
- type: "DoWhileStatement";
- body: Statement;
- test: Expression;
-}
-
-export interface ForStatement extends BaseStatement {
- type: "ForStatement";
- init?: VariableDeclaration | Expression | null;
- test?: Expression | null;
- update?: Expression | null;
- body: Statement;
-}
-
-interface BaseForXStatement extends BaseStatement {
- left: VariableDeclaration | Pattern;
- right: Expression;
- body: Statement;
-}
-
-export interface ForInStatement extends BaseForXStatement {
- type: "ForInStatement";
-}
-
-export interface DebuggerStatement extends BaseStatement {
- type: "DebuggerStatement";
-}
-
-export type Declaration =
- FunctionDeclaration | VariableDeclaration | ClassDeclaration;
-
-interface BaseDeclaration extends BaseStatement { }
-
-export interface FunctionDeclaration extends BaseFunction, BaseDeclaration {
- type: "FunctionDeclaration";
- /** It is null when a function declaration is a part of the `export default function` statement */
- id: Identifier | null;
- body: BlockStatement;
-}
-
-export interface VariableDeclaration extends BaseDeclaration {
- type: "VariableDeclaration";
- declarations: Array;
- kind: "var" | "let" | "const";
-}
-
-export interface VariableDeclarator extends BaseNode {
- type: "VariableDeclarator";
- id: Pattern;
- init?: Expression | null;
-}
-
-type Expression =
- ThisExpression | ArrayExpression | ObjectExpression | FunctionExpression |
- ArrowFunctionExpression | YieldExpression | Literal | UnaryExpression |
- UpdateExpression | BinaryExpression | AssignmentExpression |
- LogicalExpression | MemberExpression | ConditionalExpression |
- CallExpression | NewExpression | SequenceExpression | TemplateLiteral |
- TaggedTemplateExpression | ClassExpression | MetaProperty | Identifier |
- AwaitExpression;
-
-export interface BaseExpression extends BaseNode { }
-
-export interface ThisExpression extends BaseExpression {
- type: "ThisExpression";
-}
-
-export interface ArrayExpression extends BaseExpression {
- type: "ArrayExpression";
- elements: Array;
-}
-
-export interface ObjectExpression extends BaseExpression {
- type: "ObjectExpression";
- properties: Array;
-}
-
-export interface Property extends BaseNode {
- type: "Property";
- key: Expression;
- value: Expression | Pattern; // Could be an AssignmentProperty
- kind: "init" | "get" | "set";
- method: boolean;
- shorthand: boolean;
- computed: boolean;
-}
-
-export interface FunctionExpression extends BaseFunction, BaseExpression {
- id?: Identifier | null;
- type: "FunctionExpression";
- body: BlockStatement;
-}
-
-export interface SequenceExpression extends BaseExpression {
- type: "SequenceExpression";
- expressions: Array;
-}
-
-export interface UnaryExpression extends BaseExpression {
- type: "UnaryExpression";
- operator: UnaryOperator;
- prefix: true;
- argument: Expression;
-}
-
-export interface BinaryExpression extends BaseExpression {
- type: "BinaryExpression";
- operator: BinaryOperator;
- left: Expression;
- right: Expression;
-}
-
-export interface AssignmentExpression extends BaseExpression {
- type: "AssignmentExpression";
- operator: AssignmentOperator;
- left: Pattern | MemberExpression;
- right: Expression;
-}
-
-export interface UpdateExpression extends BaseExpression {
- type: "UpdateExpression";
- operator: UpdateOperator;
- argument: Expression;
- prefix: boolean;
-}
-
-export interface LogicalExpression extends BaseExpression {
- type: "LogicalExpression";
- operator: LogicalOperator;
- left: Expression;
- right: Expression;
-}
-
-export interface ConditionalExpression extends BaseExpression {
- type: "ConditionalExpression";
- test: Expression;
- alternate: Expression;
- consequent: Expression;
-}
-
-interface BaseCallExpression extends BaseExpression {
- callee: Expression | Super;
- arguments: Array;
-}
-export type CallExpression = SimpleCallExpression | NewExpression;
-
-export interface SimpleCallExpression extends BaseCallExpression {
- type: "CallExpression";
-}
-
-export interface NewExpression extends BaseCallExpression {
- type: "NewExpression";
-}
-
-export interface MemberExpression extends BaseExpression, BasePattern {
- type: "MemberExpression";
- object: Expression | Super;
- property: Expression;
- computed: boolean;
-}
-
-export type Pattern =
- Identifier | ObjectPattern | ArrayPattern | RestElement |
- AssignmentPattern | MemberExpression;
-
-interface BasePattern extends BaseNode { }
-
-export interface SwitchCase extends BaseNode {
- type: "SwitchCase";
- test?: Expression | null;
- consequent: Array;
-}
-
-export interface CatchClause extends BaseNode {
- type: "CatchClause";
- param: Pattern;
- body: BlockStatement;
-}
-
-export interface Identifier extends BaseNode, BaseExpression, BasePattern {
- type: "Identifier";
- name: string;
-}
-
-export type Literal = SimpleLiteral | RegExpLiteral;
-
-export interface SimpleLiteral extends BaseNode, BaseExpression {
- type: "Literal";
- value: string | boolean | number | null;
- raw?: string;
-}
-
-export interface RegExpLiteral extends BaseNode, BaseExpression {
- type: "Literal";
- value?: RegExp | null;
- regex: {
- pattern: string;
- flags: string;
- };
- raw?: string;
-}
-
-export type UnaryOperator =
- "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
-
-export type BinaryOperator =
- "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" |
- ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" |
- "instanceof";
-
-export type LogicalOperator = "||" | "&&";
-
-export type AssignmentOperator =
- "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" |
- "|=" | "^=" | "&=";
-
-export type UpdateOperator = "++" | "--";
-
-export interface ForOfStatement extends BaseForXStatement {
- type: "ForOfStatement";
-}
-
-export interface Super extends BaseNode {
- type: "Super";
-}
-
-export interface SpreadElement extends BaseNode {
- type: "SpreadElement";
- argument: Expression;
-}
-
-export interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
- type: "ArrowFunctionExpression";
- expression: boolean;
- body: BlockStatement | Expression;
-}
-
-export interface YieldExpression extends BaseExpression {
- type: "YieldExpression";
- argument?: Expression | null;
- delegate: boolean;
-}
-
-export interface TemplateLiteral extends BaseExpression {
- type: "TemplateLiteral";
- quasis: Array;
- expressions: Array;
-}
-
-export interface TaggedTemplateExpression extends BaseExpression {
- type: "TaggedTemplateExpression";
- tag: Expression;
- quasi: TemplateLiteral;
-}
-
-export interface TemplateElement extends BaseNode {
- type: "TemplateElement";
- tail: boolean;
- value: {
- cooked: string;
- raw: string;
- };
-}
-
-export interface AssignmentProperty extends Property {
- value: Pattern;
- kind: "init";
- method: boolean; // false
-}
-
-export interface ObjectPattern extends BasePattern {
- type: "ObjectPattern";
- properties: Array;
-}
-
-export interface ArrayPattern extends BasePattern {
- type: "ArrayPattern";
- elements: Array;
-}
-
-export interface RestElement extends BasePattern {
- type: "RestElement";
- argument: Pattern;
-}
-
-export interface AssignmentPattern extends BasePattern {
- type: "AssignmentPattern";
- left: Pattern;
- right: Expression;
-}
-
-export type Class = ClassDeclaration | ClassExpression;
-interface BaseClass extends BaseNode {
- superClass?: Expression | null;
- body: ClassBody;
-}
-
-export interface ClassBody extends BaseNode {
- type: "ClassBody";
- body: Array;
-}
-
-export interface MethodDefinition extends BaseNode {
- type: "MethodDefinition";
- key: Expression;
- value: FunctionExpression;
- kind: "constructor" | "method" | "get" | "set";
- computed: boolean;
- static: boolean;
-}
-
-export interface ClassDeclaration extends BaseClass, BaseDeclaration {
- type: "ClassDeclaration";
- /** It is null when a class declaration is a part of the `export default class` statement */
- id: Identifier | null;
-}
-
-export interface ClassExpression extends BaseClass, BaseExpression {
- type: "ClassExpression";
- id?: Identifier | null;
-}
-
-export interface MetaProperty extends BaseExpression {
- type: "MetaProperty";
- meta: Identifier;
- property: Identifier;
-}
-
-export type ModuleDeclaration =
- ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration |
- ExportAllDeclaration;
-interface BaseModuleDeclaration extends BaseNode { }
-
-export type ModuleSpecifier =
- ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier |
- ExportSpecifier;
-interface BaseModuleSpecifier extends BaseNode {
- local: Identifier;
-}
-
-export interface ImportDeclaration extends BaseModuleDeclaration {
- type: "ImportDeclaration";
- specifiers: Array;
- source: Literal;
-}
-
-export interface ImportSpecifier extends BaseModuleSpecifier {
- type: "ImportSpecifier";
- imported: Identifier;
-}
-
-export interface ImportDefaultSpecifier extends BaseModuleSpecifier {
- type: "ImportDefaultSpecifier";
-}
-
-export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
- type: "ImportNamespaceSpecifier";
-}
-
-export interface ExportNamedDeclaration extends BaseModuleDeclaration {
- type: "ExportNamedDeclaration";
- declaration?: Declaration | null;
- specifiers: Array;
- source?: Literal | null;
-}
-
-export interface ExportSpecifier extends BaseModuleSpecifier {
- type: "ExportSpecifier";
- exported: Identifier;
-}
-
-export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
- type: "ExportDefaultDeclaration";
- declaration: Declaration | Expression;
-}
-
-export interface ExportAllDeclaration extends BaseModuleDeclaration {
- type: "ExportAllDeclaration";
- source: Literal;
-}
-
-export interface AwaitExpression extends BaseExpression {
- type: "AwaitExpression";
- argument: Expression;
-}
diff --git a/node_modules/@types/estree/package.json b/node_modules/@types/estree/package.json
deleted file mode 100644
index 53180c7..0000000
--- a/node_modules/@types/estree/package.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "_from": "@types/estree@0.0.39",
- "_id": "@types/estree@0.0.39",
- "_inBundle": false,
- "_integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
- "_location": "/@types/estree",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "@types/estree@0.0.39",
- "name": "@types/estree",
- "escapedName": "@types%2festree",
- "scope": "@types",
- "rawSpec": "0.0.39",
- "saveSpec": null,
- "fetchSpec": "0.0.39"
- },
- "_requiredBy": [
- "/@rollup/pluginutils",
- "/is-reference"
- ],
- "_resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
- "_shasum": "e177e699ee1b8c22d23174caaa7422644389509f",
- "_spec": "@types/estree@0.0.39",
- "_where": "/Users/keiferju/Workplace/dllcnx/dTools/node_modules/@rollup/pluginutils",
- "bugs": {
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "RReverser",
- "url": "https://github.com/RReverser"
- }
- ],
- "dependencies": {},
- "deprecated": false,
- "description": "TypeScript definitions for ESTree AST specification",
- "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
- "license": "MIT",
- "main": "",
- "name": "@types/estree",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git"
- },
- "scripts": {},
- "typeScriptVersion": "2.0",
- "typesPublisherContentHash": "427ba878ebb5570e15aab870f708720d146a1c4b272e4a9d9990db4d1d033170",
- "version": "0.0.39"
-}
diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE
deleted file mode 100755
index 9e841e7..0000000
--- a/node_modules/@types/node/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
- MIT License
-
- Copyright (c) Microsoft Corporation.
-
- 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
diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md
deleted file mode 100755
index 69a9f36..0000000
--- a/node_modules/@types/node/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Installation
-> `npm install --save @types/node`
-
-# Summary
-This package contains type definitions for Node.js (https://nodejs.org/).
-
-# Details
-Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
-
-### Additional Details
- * Last updated: Wed, 23 Feb 2022 16:31:42 GMT
- * Dependencies: none
- * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
-
-# Credits
-These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), and [wafuwafu13](https://github.com/wafuwafu13).
diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts
deleted file mode 100755
index fb71586..0000000
--- a/node_modules/@types/node/assert.d.ts
+++ /dev/null
@@ -1,912 +0,0 @@
-/**
- * The `assert` module provides a set of assertion functions for verifying
- * invariants.
- * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/assert.js)
- */
-declare module 'assert' {
- /**
- * An alias of {@link ok}.
- * @since v0.5.9
- * @param value The input that is checked for being truthy.
- */
- function assert(value: unknown, message?: string | Error): asserts value;
- namespace assert {
- /**
- * Indicates the failure of an assertion. All errors thrown by the `assert` module
- * will be instances of the `AssertionError` class.
- */
- class AssertionError extends Error {
- actual: unknown;
- expected: unknown;
- operator: string;
- generatedMessage: boolean;
- code: 'ERR_ASSERTION';
- constructor(options?: {
- /** If provided, the error message is set to this value. */
- message?: string | undefined;
- /** The `actual` property on the error instance. */
- actual?: unknown | undefined;
- /** The `expected` property on the error instance. */
- expected?: unknown | undefined;
- /** The `operator` property on the error instance. */
- operator?: string | undefined;
- /** If provided, the generated stack trace omits frames before this function. */
- // tslint:disable-next-line:ban-types
- stackStartFn?: Function | undefined;
- });
- }
- /**
- * This feature is currently experimental and behavior might still change.
- * @since v14.2.0, v12.19.0
- * @experimental
- */
- class CallTracker {
- /**
- * The wrapper function is expected to be called exactly `exact` times. If the
- * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
- * error.
- *
- * ```js
- * import assert from 'assert';
- *
- * // Creates call tracker.
- * const tracker = new assert.CallTracker();
- *
- * function func() {}
- *
- * // Returns a function that wraps func() that must be called exact times
- * // before tracker.verify().
- * const callsfunc = tracker.calls(func);
- * ```
- * @since v14.2.0, v12.19.0
- * @param [fn='A no-op function']
- * @param [exact=1]
- * @return that wraps `fn`.
- */
- calls(exact?: number): () => void;
- calls any>(fn?: Func, exact?: number): Func;
- /**
- * The arrays contains information about the expected and actual number of calls of
- * the functions that have not been called the expected number of times.
- *
- * ```js
- * import assert from 'assert';
- *
- * // Creates call tracker.
- * const tracker = new assert.CallTracker();
- *
- * function func() {}
- *
- * function foo() {}
- *
- * // Returns a function that wraps func() that must be called exact times
- * // before tracker.verify().
- * const callsfunc = tracker.calls(func, 2);
- *
- * // Returns an array containing information on callsfunc()
- * tracker.report();
- * // [
- * // {
- * // message: 'Expected the func function to be executed 2 time(s) but was
- * // executed 0 time(s).',
- * // actual: 0,
- * // expected: 2,
- * // operator: 'func',
- * // stack: stack trace
- * // }
- * // ]
- * ```
- * @since v14.2.0, v12.19.0
- * @return of objects containing information about the wrapper functions returned by `calls`.
- */
- report(): CallTrackerReportInformation[];
- /**
- * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that
- * have not been called the expected number of times.
- *
- * ```js
- * import assert from 'assert';
- *
- * // Creates call tracker.
- * const tracker = new assert.CallTracker();
- *
- * function func() {}
- *
- * // Returns a function that wraps func() that must be called exact times
- * // before tracker.verify().
- * const callsfunc = tracker.calls(func, 2);
- *
- * callsfunc();
- *
- * // Will throw an error since callsfunc() was only called once.
- * tracker.verify();
- * ```
- * @since v14.2.0, v12.19.0
- */
- verify(): void;
- }
- interface CallTrackerReportInformation {
- message: string;
- /** The actual number of times the function was called. */
- actual: number;
- /** The number of times the function was expected to be called. */
- expected: number;
- /** The name of the function that is wrapped. */
- operator: string;
- /** A stack trace of the function. */
- stack: object;
- }
- type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
- /**
- * Throws an `AssertionError` with the provided error message or a default
- * error message. If the `message` parameter is an instance of an `Error` then
- * it will be thrown instead of the `AssertionError`.
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.fail();
- * // AssertionError [ERR_ASSERTION]: Failed
- *
- * assert.fail('boom');
- * // AssertionError [ERR_ASSERTION]: boom
- *
- * assert.fail(new TypeError('need array'));
- * // TypeError: need array
- * ```
- *
- * Using `assert.fail()` with more than two arguments is possible but deprecated.
- * See below for further details.
- * @since v0.1.21
- * @param [message='Failed']
- */
- function fail(message?: string | Error): never;
- /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
- function fail(
- actual: unknown,
- expected: unknown,
- message?: string | Error,
- operator?: string,
- // tslint:disable-next-line:ban-types
- stackStartFn?: Function
- ): never;
- /**
- * Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`.
- *
- * If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default
- * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
- * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
- *
- * Be aware that in the `repl` the error message will be different to the one
- * thrown in a file! See below for further details.
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.ok(true);
- * // OK
- * assert.ok(1);
- * // OK
- *
- * assert.ok();
- * // AssertionError: No value argument passed to `assert.ok()`
- *
- * assert.ok(false, 'it\'s false');
- * // AssertionError: it's false
- *
- * // In the repl:
- * assert.ok(typeof 123 === 'string');
- * // AssertionError: false == true
- *
- * // In a file (e.g. test.js):
- * assert.ok(typeof 123 === 'string');
- * // AssertionError: The expression evaluated to a falsy value:
- * //
- * // assert.ok(typeof 123 === 'string')
- *
- * assert.ok(false);
- * // AssertionError: The expression evaluated to a falsy value:
- * //
- * // assert.ok(false)
- *
- * assert.ok(0);
- * // AssertionError: The expression evaluated to a falsy value:
- * //
- * // assert.ok(0)
- * ```
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * // Using `assert()` works the same:
- * assert(0);
- * // AssertionError: The expression evaluated to a falsy value:
- * //
- * // assert(0)
- * ```
- * @since v0.1.21
- */
- function ok(value: unknown, message?: string | Error): asserts value;
- /**
- * **Strict assertion mode**
- *
- * An alias of {@link strictEqual}.
- *
- * **Legacy assertion mode**
- *
- * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
- *
- * Tests shallow, coercive equality between the `actual` and `expected` parameters
- * using the [Abstract Equality Comparison](https://tc39.github.io/ecma262/#sec-abstract-equality-comparison) ( `==` ). `NaN` is special handled
- * and treated as being identical in case both sides are `NaN`.
- *
- * ```js
- * import assert from 'assert';
- *
- * assert.equal(1, 1);
- * // OK, 1 == 1
- * assert.equal(1, '1');
- * // OK, 1 == '1'
- * assert.equal(NaN, NaN);
- * // OK
- *
- * assert.equal(1, 2);
- * // AssertionError: 1 == 2
- * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
- * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
- * ```
- *
- * If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default
- * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
- * @since v0.1.21
- */
- function equal(actual: unknown, expected: unknown, message?: string | Error): void;
- /**
- * **Strict assertion mode**
- *
- * An alias of {@link notStrictEqual}.
- *
- * **Legacy assertion mode**
- *
- * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
- *
- * Tests shallow, coercive inequality with the [Abstract Equality Comparison](https://tc39.github.io/ecma262/#sec-abstract-equality-comparison)(`!=` ). `NaN` is special handled and treated as
- * being identical in case both
- * sides are `NaN`.
- *
- * ```js
- * import assert from 'assert';
- *
- * assert.notEqual(1, 2);
- * // OK
- *
- * assert.notEqual(1, 1);
- * // AssertionError: 1 != 1
- *
- * assert.notEqual(1, '1');
- * // AssertionError: 1 != '1'
- * ```
- *
- * If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error
- * message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
- * @since v0.1.21
- */
- function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
- /**
- * **Strict assertion mode**
- *
- * An alias of {@link deepStrictEqual}.
- *
- * **Legacy assertion mode**
- *
- * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
- *
- * Tests for deep equality between the `actual` and `expected` parameters. Consider
- * using {@link deepStrictEqual} instead. {@link deepEqual} can have
- * surprising results.
- *
- * _Deep equality_ means that the enumerable "own" properties of child objects
- * are also recursively evaluated by the following rules.
- * @since v0.1.21
- */
- function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
- /**
- * **Strict assertion mode**
- *
- * An alias of {@link notDeepStrictEqual}.
- *
- * **Legacy assertion mode**
- *
- * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
- *
- * Tests for any deep inequality. Opposite of {@link deepEqual}.
- *
- * ```js
- * import assert from 'assert';
- *
- * const obj1 = {
- * a: {
- * b: 1
- * }
- * };
- * const obj2 = {
- * a: {
- * b: 2
- * }
- * };
- * const obj3 = {
- * a: {
- * b: 1
- * }
- * };
- * const obj4 = Object.create(obj1);
- *
- * assert.notDeepEqual(obj1, obj1);
- * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
- *
- * assert.notDeepEqual(obj1, obj2);
- * // OK
- *
- * assert.notDeepEqual(obj1, obj3);
- * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
- *
- * assert.notDeepEqual(obj1, obj4);
- * // OK
- * ```
- *
- * If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default
- * error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
- * instead of the `AssertionError`.
- * @since v0.1.21
- */
- function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
- /**
- * Tests strict equality between the `actual` and `expected` parameters as
- * determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue).
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.strictEqual(1, 2);
- * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
- * //
- * // 1 !== 2
- *
- * assert.strictEqual(1, 1);
- * // OK
- *
- * assert.strictEqual('Hello foobar', 'Hello World!');
- * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
- * // + actual - expected
- * //
- * // + 'Hello foobar'
- * // - 'Hello World!'
- * // ^
- *
- * const apples = 1;
- * const oranges = 2;
- * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
- * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
- *
- * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
- * // TypeError: Inputs are not identical
- * ```
- *
- * If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
- * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
- * instead of the `AssertionError`.
- * @since v0.1.21
- */
- function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
- /**
- * Tests strict inequality between the `actual` and `expected` parameters as
- * determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue).
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.notStrictEqual(1, 2);
- * // OK
- *
- * assert.notStrictEqual(1, 1);
- * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
- * //
- * // 1
- *
- * assert.notStrictEqual(1, '1');
- * // OK
- * ```
- *
- * If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
- * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
- * instead of the `AssertionError`.
- * @since v0.1.21
- */
- function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
- /**
- * Tests for deep equality between the `actual` and `expected` parameters.
- * "Deep" equality means that the enumerable "own" properties of child objects
- * are recursively evaluated also by the following rules.
- * @since v1.2.0
- */
- function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
- /**
- * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
- * // OK
- * ```
- *
- * If the values are deeply and strictly equal, an `AssertionError` is thrown
- * with a `message` property set equal to the value of the `message` parameter. If
- * the `message` parameter is undefined, a default error message is assigned. If
- * the `message` parameter is an instance of an `Error` then it will be thrown
- * instead of the `AssertionError`.
- * @since v1.2.0
- */
- function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
- /**
- * Expects the function `fn` to throw an error.
- *
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
- * a validation object where each property will be tested for strict deep equality,
- * or an instance of error where each property will be tested for strict deep
- * equality including the non-enumerable `message` and `name` properties. When
- * using an object, it is also possible to use a regular expression, when
- * validating against a string property. See below for examples.
- *
- * If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation
- * fails.
- *
- * Custom validation object/error instance:
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * const err = new TypeError('Wrong value');
- * err.code = 404;
- * err.foo = 'bar';
- * err.info = {
- * nested: true,
- * baz: 'text'
- * };
- * err.reg = /abc/i;
- *
- * assert.throws(
- * () => {
- * throw err;
- * },
- * {
- * name: 'TypeError',
- * message: 'Wrong value',
- * info: {
- * nested: true,
- * baz: 'text'
- * }
- * // Only properties on the validation object will be tested for.
- * // Using nested objects requires all properties to be present. Otherwise
- * // the validation is going to fail.
- * }
- * );
- *
- * // Using regular expressions to validate error properties:
- * throws(
- * () => {
- * throw err;
- * },
- * {
- * // The `name` and `message` properties are strings and using regular
- * // expressions on those will match against the string. If they fail, an
- * // error is thrown.
- * name: /^TypeError$/,
- * message: /Wrong/,
- * foo: 'bar',
- * info: {
- * nested: true,
- * // It is not possible to use regular expressions for nested properties!
- * baz: 'text'
- * },
- * // The `reg` property contains a regular expression and only if the
- * // validation object contains an identical regular expression, it is going
- * // to pass.
- * reg: /abc/i
- * }
- * );
- *
- * // Fails due to the different `message` and `name` properties:
- * throws(
- * () => {
- * const otherErr = new Error('Not found');
- * // Copy all enumerable properties from `err` to `otherErr`.
- * for (const [key, value] of Object.entries(err)) {
- * otherErr[key] = value;
- * }
- * throw otherErr;
- * },
- * // The error's `message` and `name` properties will also be checked when using
- * // an error as validation object.
- * err
- * );
- * ```
- *
- * Validate instanceof using constructor:
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.throws(
- * () => {
- * throw new Error('Wrong value');
- * },
- * Error
- * );
- * ```
- *
- * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
- *
- * Using a regular expression runs `.toString` on the error object, and will
- * therefore also include the error name.
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.throws(
- * () => {
- * throw new Error('Wrong value');
- * },
- * /^Error: Wrong value$/
- * );
- * ```
- *
- * Custom error validation:
- *
- * The function must return `true` to indicate all internal validations passed.
- * It will otherwise fail with an `AssertionError`.
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.throws(
- * () => {
- * throw new Error('Wrong value');
- * },
- * (err) => {
- * assert(err instanceof Error);
- * assert(/value/.test(err));
- * // Avoid returning anything from validation functions besides `true`.
- * // Otherwise, it's not clear what part of the validation failed. Instead,
- * // throw an error about the specific validation that failed (as done in this
- * // example) and add as much helpful debugging information to that error as
- * // possible.
- * return true;
- * },
- * 'unexpected error'
- * );
- * ```
- *
- * `error` cannot be a string. If a string is provided as the second
- * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same
- * message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
- * a string as the second argument gets considered:
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * function throwingFirst() {
- * throw new Error('First');
- * }
- *
- * function throwingSecond() {
- * throw new Error('Second');
- * }
- *
- * function notThrowing() {}
- *
- * // The second argument is a string and the input function threw an Error.
- * // The first case will not throw as it does not match for the error message
- * // thrown by the input function!
- * assert.throws(throwingFirst, 'Second');
- * // In the next example the message has no benefit over the message from the
- * // error and since it is not clear if the user intended to actually match
- * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
- * assert.throws(throwingSecond, 'Second');
- * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
- *
- * // The string is only used (as message) in case the function does not throw:
- * assert.throws(notThrowing, 'Second');
- * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
- *
- * // If it was intended to match for the error message do this instead:
- * // It does not throw because the error messages match.
- * assert.throws(throwingSecond, /Second$/);
- *
- * // If the error message does not match, an AssertionError is thrown.
- * assert.throws(throwingFirst, /Second$/);
- * // AssertionError [ERR_ASSERTION]
- * ```
- *
- * Due to the confusing error-prone notation, avoid a string as the second
- * argument.
- * @since v0.1.21
- */
- function throws(block: () => unknown, message?: string | Error): void;
- function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
- /**
- * Asserts that the function `fn` does not throw an error.
- *
- * Using `assert.doesNotThrow()` is actually not useful because there
- * is no benefit in catching an error and then rethrowing it. Instead, consider
- * adding a comment next to the specific code path that should not throw and keep
- * error messages as expressive as possible.
- *
- * When `assert.doesNotThrow()` is called, it will immediately call the `fn`function.
- *
- * If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a
- * different type, or if the `error` parameter is undefined, the error is
- * propagated back to the caller.
- *
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
- * function. See {@link throws} for more details.
- *
- * The following, for instance, will throw the `TypeError` because there is no
- * matching error type in the assertion:
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.doesNotThrow(
- * () => {
- * throw new TypeError('Wrong value');
- * },
- * SyntaxError
- * );
- * ```
- *
- * However, the following will result in an `AssertionError` with the message
- * 'Got unwanted exception...':
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.doesNotThrow(
- * () => {
- * throw new TypeError('Wrong value');
- * },
- * TypeError
- * );
- * ```
- *
- * If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message:
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.doesNotThrow(
- * () => {
- * throw new TypeError('Wrong value');
- * },
- * /Wrong value/,
- * 'Whoops'
- * );
- * // Throws: AssertionError: Got unwanted exception: Whoops
- * ```
- * @since v0.1.21
- */
- function doesNotThrow(block: () => unknown, message?: string | Error): void;
- function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
- /**
- * Throws `value` if `value` is not `undefined` or `null`. This is useful when
- * testing the `error` argument in callbacks. The stack trace contains all frames
- * from the error passed to `ifError()` including the potential new frames for`ifError()` itself.
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.ifError(null);
- * // OK
- * assert.ifError(0);
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
- * assert.ifError('error');
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
- * assert.ifError(new Error());
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
- *
- * // Create some random error frames.
- * let err;
- * (function errorFrame() {
- * err = new Error('test error');
- * })();
- *
- * (function ifErrorFrame() {
- * assert.ifError(err);
- * })();
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
- * // at ifErrorFrame
- * // at errorFrame
- * ```
- * @since v0.1.97
- */
- function ifError(value: unknown): asserts value is null | undefined;
- /**
- * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
- * calls the function and awaits the returned promise to complete. It will then
- * check that the promise is rejected.
- *
- * If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the
- * function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error
- * handler is skipped.
- *
- * Besides the async nature to await the completion behaves identically to {@link throws}.
- *
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
- * an object where each property will be tested for, or an instance of error where
- * each property will be tested for including the non-enumerable `message` and`name` properties.
- *
- * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * await assert.rejects(
- * async () => {
- * throw new TypeError('Wrong value');
- * },
- * {
- * name: 'TypeError',
- * message: 'Wrong value'
- * }
- * );
- * ```
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * await assert.rejects(
- * async () => {
- * throw new TypeError('Wrong value');
- * },
- * (err) => {
- * assert.strictEqual(err.name, 'TypeError');
- * assert.strictEqual(err.message, 'Wrong value');
- * return true;
- * }
- * );
- * ```
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.rejects(
- * Promise.reject(new Error('Wrong value')),
- * Error
- * ).then(() => {
- * // ...
- * });
- * ```
- *
- * `error` cannot be a string. If a string is provided as the second
- * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the
- * example in {@link throws} carefully if using a string as the second
- * argument gets considered.
- * @since v10.0.0
- */
- function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise;
- function rejects(block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error): Promise;
- /**
- * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
- * calls the function and awaits the returned promise to complete. It will then
- * check that the promise is not rejected.
- *
- * If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If
- * the function does not return a promise, `assert.doesNotReject()` will return a
- * rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases
- * the error handler is skipped.
- *
- * Using `assert.doesNotReject()` is actually not useful because there is little
- * benefit in catching a rejection and then rejecting it again. Instead, consider
- * adding a comment next to the specific code path that should not reject and keep
- * error messages as expressive as possible.
- *
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
- * function. See {@link throws} for more details.
- *
- * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * await assert.doesNotReject(
- * async () => {
- * throw new TypeError('Wrong value');
- * },
- * SyntaxError
- * );
- * ```
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
- * .then(() => {
- * // ...
- * });
- * ```
- * @since v10.0.0
- */
- function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise;
- function doesNotReject(block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error): Promise;
- /**
- * Expects the `string` input to match the regular expression.
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.match('I will fail', /pass/);
- * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
- *
- * assert.match(123, /pass/);
- * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
- *
- * assert.match('I will pass', /pass/);
- * // OK
- * ```
- *
- * If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
- * to the value of the `message` parameter. If the `message` parameter is
- * undefined, a default error message is assigned. If the `message` parameter is an
- * instance of an `Error` then it will be thrown instead of the `AssertionError`.
- * @since v13.6.0, v12.16.0
- */
- function match(value: string, regExp: RegExp, message?: string | Error): void;
- /**
- * Expects the `string` input not to match the regular expression.
- *
- * ```js
- * import assert from 'assert/strict';
- *
- * assert.doesNotMatch('I will fail', /fail/);
- * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
- *
- * assert.doesNotMatch(123, /pass/);
- * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
- *
- * assert.doesNotMatch('I will pass', /different/);
- * // OK
- * ```
- *
- * If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
- * to the value of the `message` parameter. If the `message` parameter is
- * undefined, a default error message is assigned. If the `message` parameter is an
- * instance of an `Error` then it will be thrown instead of the `AssertionError`.
- * @since v13.6.0, v12.16.0
- */
- function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
- const strict: Omit & {
- (value: unknown, message?: string | Error): asserts value;
- equal: typeof strictEqual;
- notEqual: typeof notStrictEqual;
- deepEqual: typeof deepStrictEqual;
- notDeepEqual: typeof notDeepStrictEqual;
- // Mapped types and assertion functions are incompatible?
- // TS2775: Assertions require every name in the call target
- // to be declared with an explicit type annotation.
- ok: typeof ok;
- strictEqual: typeof strictEqual;
- deepStrictEqual: typeof deepStrictEqual;
- ifError: typeof ifError;
- strict: typeof strict;
- };
- }
- export = assert;
-}
-declare module 'node:assert' {
- import assert = require('assert');
- export = assert;
-}
diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts
deleted file mode 100755
index b4319b9..0000000
--- a/node_modules/@types/node/assert/strict.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-declare module 'assert/strict' {
- import { strict } from 'node:assert';
- export = strict;
-}
-declare module 'node:assert/strict' {
- import { strict } from 'node:assert';
- export = strict;
-}
diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts
deleted file mode 100755
index f53198e..0000000
--- a/node_modules/@types/node/async_hooks.d.ts
+++ /dev/null
@@ -1,501 +0,0 @@
-/**
- * The `async_hooks` module provides an API to track asynchronous resources. It
- * can be accessed using:
- *
- * ```js
- * import async_hooks from 'async_hooks';
- * ```
- * @experimental
- * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/async_hooks.js)
- */
-declare module 'async_hooks' {
- /**
- * ```js
- * import { executionAsyncId } from 'async_hooks';
- *
- * console.log(executionAsyncId()); // 1 - bootstrap
- * fs.open(path, 'r', (err, fd) => {
- * console.log(executionAsyncId()); // 6 - open()
- * });
- * ```
- *
- * The ID returned from `executionAsyncId()` is related to execution timing, not
- * causality (which is covered by `triggerAsyncId()`):
- *
- * ```js
- * const server = net.createServer((conn) => {
- * // Returns the ID of the server, not of the new connection, because the
- * // callback runs in the execution scope of the server's MakeCallback().
- * async_hooks.executionAsyncId();
- *
- * }).listen(port, () => {
- * // Returns the ID of a TickObject (process.nextTick()) because all
- * // callbacks passed to .listen() are wrapped in a nextTick().
- * async_hooks.executionAsyncId();
- * });
- * ```
- *
- * Promise contexts may not get precise `executionAsyncIds` by default.
- * See the section on `promise execution tracking`.
- * @since v8.1.0
- * @return The `asyncId` of the current execution context. Useful to track when something calls.
- */
- function executionAsyncId(): number;
- /**
- * Resource objects returned by `executionAsyncResource()` are most often internal
- * Node.js handle objects with undocumented APIs. Using any functions or properties
- * on the object is likely to crash your application and should be avoided.
- *
- * Using `executionAsyncResource()` in the top-level execution context will
- * return an empty object as there is no handle or request object to use,
- * but having an object representing the top-level can be helpful.
- *
- * ```js
- * import { open } from 'fs';
- * import { executionAsyncId, executionAsyncResource } from 'async_hooks';
- *
- * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
- * open(new URL(import.meta.url), 'r', (err, fd) => {
- * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
- * });
- * ```
- *
- * This can be used to implement continuation local storage without the
- * use of a tracking `Map` to store the metadata:
- *
- * ```js
- * import { createServer } from 'http';
- * import {
- * executionAsyncId,
- * executionAsyncResource,
- * createHook
- * } from 'async_hooks';
- * const sym = Symbol('state'); // Private symbol to avoid pollution
- *
- * createHook({
- * init(asyncId, type, triggerAsyncId, resource) {
- * const cr = executionAsyncResource();
- * if (cr) {
- * resource[sym] = cr[sym];
- * }
- * }
- * }).enable();
- *
- * const server = createServer((req, res) => {
- * executionAsyncResource()[sym] = { state: req.url };
- * setTimeout(function() {
- * res.end(JSON.stringify(executionAsyncResource()[sym]));
- * }, 100);
- * }).listen(3000);
- * ```
- * @since v13.9.0, v12.17.0
- * @return The resource representing the current execution. Useful to store data within the resource.
- */
- function executionAsyncResource(): object;
- /**
- * ```js
- * const server = net.createServer((conn) => {
- * // The resource that caused (or triggered) this callback to be called
- * // was that of the new connection. Thus the return value of triggerAsyncId()
- * // is the asyncId of "conn".
- * async_hooks.triggerAsyncId();
- *
- * }).listen(port, () => {
- * // Even though all callbacks passed to .listen() are wrapped in a nextTick()
- * // the callback itself exists because the call to the server's .listen()
- * // was made. So the return value would be the ID of the server.
- * async_hooks.triggerAsyncId();
- * });
- * ```
- *
- * Promise contexts may not get valid `triggerAsyncId`s by default. See
- * the section on `promise execution tracking`.
- * @return The ID of the resource responsible for calling the callback that is currently being executed.
- */
- function triggerAsyncId(): number;
- interface HookCallbacks {
- /**
- * Called when a class is constructed that has the possibility to emit an asynchronous event.
- * @param asyncId a unique ID for the async resource
- * @param type the type of the async resource
- * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
- * @param resource reference to the resource representing the async operation, needs to be released during destroy
- */
- init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
- /**
- * When an asynchronous operation is initiated or completes a callback is called to notify the user.
- * The before callback is called just before said callback is executed.
- * @param asyncId the unique identifier assigned to the resource about to execute the callback.
- */
- before?(asyncId: number): void;
- /**
- * Called immediately after the callback specified in before is completed.
- * @param asyncId the unique identifier assigned to the resource which has executed the callback.
- */
- after?(asyncId: number): void;
- /**
- * Called when a promise has resolve() called. This may not be in the same execution id
- * as the promise itself.
- * @param asyncId the unique id for the promise that was resolve()d.
- */
- promiseResolve?(asyncId: number): void;
- /**
- * Called after the resource corresponding to asyncId is destroyed
- * @param asyncId a unique ID for the async resource
- */
- destroy?(asyncId: number): void;
- }
- interface AsyncHook {
- /**
- * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
- */
- enable(): this;
- /**
- * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
- */
- disable(): this;
- }
- /**
- * Registers functions to be called for different lifetime events of each async
- * operation.
- *
- * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
- * respective asynchronous event during a resource's lifetime.
- *
- * All callbacks are optional. For example, if only resource cleanup needs to
- * be tracked, then only the `destroy` callback needs to be passed. The
- * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
- *
- * ```js
- * import { createHook } from 'async_hooks';
- *
- * const asyncHook = createHook({
- * init(asyncId, type, triggerAsyncId, resource) { },
- * destroy(asyncId) { }
- * });
- * ```
- *
- * The callbacks will be inherited via the prototype chain:
- *
- * ```js
- * class MyAsyncCallbacks {
- * init(asyncId, type, triggerAsyncId, resource) { }
- * destroy(asyncId) {}
- * }
- *
- * class MyAddedCallbacks extends MyAsyncCallbacks {
- * before(asyncId) { }
- * after(asyncId) { }
- * }
- *
- * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
- * ```
- *
- * Because promises are asynchronous resources whose lifecycle is tracked
- * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
- * @since v8.1.0
- * @param callbacks The `Hook Callbacks` to register
- * @return Instance used for disabling and enabling hooks
- */
- function createHook(callbacks: HookCallbacks): AsyncHook;
- interface AsyncResourceOptions {
- /**
- * The ID of the execution context that created this async event.
- * @default executionAsyncId()
- */
- triggerAsyncId?: number | undefined;
- /**
- * Disables automatic `emitDestroy` when the object is garbage collected.
- * This usually does not need to be set (even if `emitDestroy` is called
- * manually), unless the resource's `asyncId` is retrieved and the
- * sensitive API's `emitDestroy` is called with it.
- * @default false
- */
- requireManualDestroy?: boolean | undefined;
- }
- /**
- * The class `AsyncResource` is designed to be extended by the embedder's async
- * resources. Using this, users can easily trigger the lifetime events of their
- * own resources.
- *
- * The `init` hook will trigger when an `AsyncResource` is instantiated.
- *
- * The following is an overview of the `AsyncResource` API.
- *
- * ```js
- * import { AsyncResource, executionAsyncId } from 'async_hooks';
- *
- * // AsyncResource() is meant to be extended. Instantiating a
- * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
- * // async_hook.executionAsyncId() is used.
- * const asyncResource = new AsyncResource(
- * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }
- * );
- *
- * // Run a function in the execution context of the resource. This will
- * // * establish the context of the resource
- * // * trigger the AsyncHooks before callbacks
- * // * call the provided function `fn` with the supplied arguments
- * // * trigger the AsyncHooks after callbacks
- * // * restore the original execution context
- * asyncResource.runInAsyncScope(fn, thisArg, ...args);
- *
- * // Call AsyncHooks destroy callbacks.
- * asyncResource.emitDestroy();
- *
- * // Return the unique ID assigned to the AsyncResource instance.
- * asyncResource.asyncId();
- *
- * // Return the trigger ID for the AsyncResource instance.
- * asyncResource.triggerAsyncId();
- * ```
- */
- class AsyncResource {
- /**
- * AsyncResource() is meant to be extended. Instantiating a
- * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
- * async_hook.executionAsyncId() is used.
- * @param type The type of async event.
- * @param triggerAsyncId The ID of the execution context that created
- * this async event (default: `executionAsyncId()`), or an
- * AsyncResourceOptions object (since 9.3)
- */
- constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
- /**
- * Binds the given function to the current execution context.
- *
- * The returned function will have an `asyncResource` property referencing
- * the `AsyncResource` to which the function is bound.
- * @since v14.8.0, v12.19.0
- * @param fn The function to bind to the current execution context.
- * @param type An optional name to associate with the underlying `AsyncResource`.
- */
- static bind any, ThisArg>(
- fn: Func,
- type?: string,
- thisArg?: ThisArg
- ): Func & {
- asyncResource: AsyncResource;
- };
- /**
- * Binds the given function to execute to this `AsyncResource`'s scope.
- *
- * The returned function will have an `asyncResource` property referencing
- * the `AsyncResource` to which the function is bound.
- * @since v14.8.0, v12.19.0
- * @param fn The function to bind to the current `AsyncResource`.
- */
- bind any>(
- fn: Func
- ): Func & {
- asyncResource: AsyncResource;
- };
- /**
- * Call the provided function with the provided arguments in the execution context
- * of the async resource. This will establish the context, trigger the AsyncHooks
- * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
- * then restore the original execution context.
- * @since v9.6.0
- * @param fn The function to call in the execution context of this async resource.
- * @param thisArg The receiver to be used for the function call.
- * @param args Optional arguments to pass to the function.
- */
- runInAsyncScope(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
- /**
- * Call all `destroy` hooks. This should only ever be called once. An error will
- * be thrown if it is called more than once. This **must** be manually called. If
- * the resource is left to be collected by the GC then the `destroy` hooks will
- * never be called.
- * @return A reference to `asyncResource`.
- */
- emitDestroy(): this;
- /**
- * @return The unique `asyncId` assigned to the resource.
- */
- asyncId(): number;
- /**
- *
- * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
- */
- triggerAsyncId(): number;
- }
- /**
- * This class creates stores that stay coherent through asynchronous operations.
- *
- * While you can create your own implementation on top of the `async_hooks` module,`AsyncLocalStorage` should be preferred as it is a performant and memory safe
- * implementation that involves significant optimizations that are non-obvious to
- * implement.
- *
- * The following example uses `AsyncLocalStorage` to build a simple logger
- * that assigns IDs to incoming HTTP requests and includes them in messages
- * logged within each request.
- *
- * ```js
- * import http from 'http';
- * import { AsyncLocalStorage } from 'async_hooks';
- *
- * const asyncLocalStorage = new AsyncLocalStorage();
- *
- * function logWithId(msg) {
- * const id = asyncLocalStorage.getStore();
- * console.log(`${id !== undefined ? id : '-'}:`, msg);
- * }
- *
- * let idSeq = 0;
- * http.createServer((req, res) => {
- * asyncLocalStorage.run(idSeq++, () => {
- * logWithId('start');
- * // Imagine any chain of async operations here
- * setImmediate(() => {
- * logWithId('finish');
- * res.end();
- * });
- * });
- * }).listen(8080);
- *
- * http.get('http://localhost:8080');
- * http.get('http://localhost:8080');
- * // Prints:
- * // 0: start
- * // 1: start
- * // 0: finish
- * // 1: finish
- * ```
- *
- * Each instance of `AsyncLocalStorage` maintains an independent storage context.
- * Multiple instances can safely exist simultaneously without risk of interfering
- * with each other data.
- * @since v13.10.0, v12.17.0
- */
- class AsyncLocalStorage {
- /**
- * Disables the instance of `AsyncLocalStorage`. All subsequent calls
- * to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
- *
- * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
- * instance will be exited.
- *
- * Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores
- * provided by the `asyncLocalStorage`, as those objects are garbage collected
- * along with the corresponding async resources.
- *
- * Use this method when the `asyncLocalStorage` is not in use anymore
- * in the current process.
- * @since v13.10.0, v12.17.0
- * @experimental
- */
- disable(): void;
- /**
- * Returns the current store.
- * If called outside of an asynchronous context initialized by
- * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
- * returns `undefined`.
- * @since v13.10.0, v12.17.0
- */
- getStore(): T | undefined;
- /**
- * Runs a function synchronously within a context and returns its
- * return value. The store is not accessible outside of the callback function.
- * The store is accessible to any asynchronous operations created within the
- * callback.
- *
- * The optional `args` are passed to the callback function.
- *
- * If the callback function throws an error, the error is thrown by `run()` too.
- * The stacktrace is not impacted by this call and the context is exited.
- *
- * Example:
- *
- * ```js
- * const store = { id: 2 };
- * try {
- * asyncLocalStorage.run(store, () => {
- * asyncLocalStorage.getStore(); // Returns the store object
- * setTimeout(() => {
- * asyncLocalStorage.getStore(); // Returns the store object
- * }, 200);
- * throw new Error();
- * });
- * } catch (e) {
- * asyncLocalStorage.getStore(); // Returns undefined
- * // The error will be caught here
- * }
- * ```
- * @since v13.10.0, v12.17.0
- */
- run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
- /**
- * Runs a function synchronously outside of a context and returns its
- * return value. The store is not accessible within the callback function or
- * the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`.
- *
- * The optional `args` are passed to the callback function.
- *
- * If the callback function throws an error, the error is thrown by `exit()` too.
- * The stacktrace is not impacted by this call and the context is re-entered.
- *
- * Example:
- *
- * ```js
- * // Within a call to run
- * try {
- * asyncLocalStorage.getStore(); // Returns the store object or value
- * asyncLocalStorage.exit(() => {
- * asyncLocalStorage.getStore(); // Returns undefined
- * throw new Error();
- * });
- * } catch (e) {
- * asyncLocalStorage.getStore(); // Returns the same object or value
- * // The error will be caught here
- * }
- * ```
- * @since v13.10.0, v12.17.0
- * @experimental
- */
- exit(callback: (...args: TArgs) => R, ...args: TArgs): R;
- /**
- * Transitions into the context for the remainder of the current
- * synchronous execution and then persists the store through any following
- * asynchronous calls.
- *
- * Example:
- *
- * ```js
- * const store = { id: 1 };
- * // Replaces previous store with the given store object
- * asyncLocalStorage.enterWith(store);
- * asyncLocalStorage.getStore(); // Returns the store object
- * someAsyncOperation(() => {
- * asyncLocalStorage.getStore(); // Returns the same object
- * });
- * ```
- *
- * This transition will continue for the _entire_ synchronous execution.
- * This means that if, for example, the context is entered within an event
- * handler subsequent event handlers will also run within that context unless
- * specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons
- * to use the latter method.
- *
- * ```js
- * const store = { id: 1 };
- *
- * emitter.on('my-event', () => {
- * asyncLocalStorage.enterWith(store);
- * });
- * emitter.on('my-event', () => {
- * asyncLocalStorage.getStore(); // Returns the same object
- * });
- *
- * asyncLocalStorage.getStore(); // Returns undefined
- * emitter.emit('my-event');
- * asyncLocalStorage.getStore(); // Returns the same object
- * ```
- * @since v13.11.0, v12.17.0
- * @experimental
- */
- enterWith(store: T): void;
- }
-}
-declare module 'node:async_hooks' {
- export * from 'async_hooks';
-}
diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts
deleted file mode 100755
index 1a26043..0000000
--- a/node_modules/@types/node/buffer.d.ts
+++ /dev/null
@@ -1,2232 +0,0 @@
-/**
- * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
- * Node.js APIs support `Buffer`s.
- *
- * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and
- * extends it with methods that cover additional use cases. Node.js APIs accept
- * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well.
- *
- * While the `Buffer` class is available within the global scope, it is still
- * recommended to explicitly reference it via an import or require statement.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * // Creates a zero-filled Buffer of length 10.
- * const buf1 = Buffer.alloc(10);
- *
- * // Creates a Buffer of length 10,
- * // filled with bytes which all have the value `1`.
- * const buf2 = Buffer.alloc(10, 1);
- *
- * // Creates an uninitialized buffer of length 10.
- * // This is faster than calling Buffer.alloc() but the returned
- * // Buffer instance might contain old data that needs to be
- * // overwritten using fill(), write(), or other functions that fill the Buffer's
- * // contents.
- * const buf3 = Buffer.allocUnsafe(10);
- *
- * // Creates a Buffer containing the bytes [1, 2, 3].
- * const buf4 = Buffer.from([1, 2, 3]);
- *
- * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries
- * // are all truncated using `(value & 255)` to fit into the range 0–255.
- * const buf5 = Buffer.from([257, 257.5, -255, '1']);
- *
- * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést':
- * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation)
- * // [116, 195, 169, 115, 116] (in decimal notation)
- * const buf6 = Buffer.from('tést');
- *
- * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
- * const buf7 = Buffer.from('tést', 'latin1');
- * ```
- * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/buffer.js)
- */
-declare module 'buffer' {
- import { BinaryLike } from 'node:crypto';
- export const INSPECT_MAX_BYTES: number;
- export const kMaxLength: number;
- export const kStringMaxLength: number;
- export const constants: {
- MAX_LENGTH: number;
- MAX_STRING_LENGTH: number;
- };
- export type TranscodeEncoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'latin1' | 'binary';
- /**
- * Re-encodes the given `Buffer` or `Uint8Array` instance from one character
- * encoding to another. Returns a new `Buffer` instance.
- *
- * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
- * conversion from `fromEnc` to `toEnc` is not permitted.
- *
- * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
- *
- * The transcoding process will use substitution characters if a given byte
- * sequence cannot be adequately represented in the target encoding. For instance:
- *
- * ```js
- * import { Buffer, transcode } from 'buffer';
- *
- * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii');
- * console.log(newBuf.toString('ascii'));
- * // Prints: '?'
- * ```
- *
- * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced
- * with `?` in the transcoded `Buffer`.
- * @since v7.1.0
- * @param source A `Buffer` or `Uint8Array` instance.
- * @param fromEnc The current encoding.
- * @param toEnc To target encoding.
- */
- export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
- export const SlowBuffer: {
- /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
- new (size: number): Buffer;
- prototype: Buffer;
- };
- /**
- * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
- * a prior call to `URL.createObjectURL()`.
- * @since v16.7.0
- * @experimental
- * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
- */
- export function resolveObjectURL(id: string): Blob | undefined;
- export { Buffer };
- /**
- * @experimental
- */
- export interface BlobOptions {
- /**
- * @default 'utf8'
- */
- encoding?: BufferEncoding | undefined;
- /**
- * The Blob content-type. The intent is for `type` to convey
- * the MIME media type of the data, however no validation of the type format
- * is performed.
- */
- type?: string | undefined;
- }
- /**
- * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
- * multiple worker threads.
- * @since v15.7.0, v14.18.0
- * @experimental
- */
- export class Blob {
- /**
- * The total size of the `Blob` in bytes.
- * @since v15.7.0, v14.18.0
- */
- readonly size: number;
- /**
- * The content-type of the `Blob`.
- * @since v15.7.0, v14.18.0
- */
- readonly type: string;
- /**
- * Creates a new `Blob` object containing a concatenation of the given sources.
- *
- * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
- * the 'Blob' and can therefore be safely modified after the 'Blob' is created.
- *
- * String sources are also copied into the `Blob`.
- */
- constructor(sources: Array, options?: BlobOptions);
- /**
- * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
- * the `Blob` data.
- * @since v15.7.0, v14.18.0
- */
- arrayBuffer(): Promise;
- /**
- * Creates and returns a new `Blob` containing a subset of this `Blob` objects
- * data. The original `Blob` is not altered.
- * @since v15.7.0, v14.18.0
- * @param start The starting index.
- * @param end The ending index.
- * @param type The content-type for the new `Blob`
- */
- slice(start?: number, end?: number, type?: string): Blob;
- /**
- * Returns a promise that fulfills with the contents of the `Blob` decoded as a
- * UTF-8 string.
- * @since v15.7.0, v14.18.0
- */
- text(): Promise;
- /**
- * Returns a new `ReadableStream` that allows the content of the `Blob` to be read.
- * @since v16.7.0
- */
- stream(): unknown; // pending web streams types
- }
- export import atob = globalThis.atob;
- export import btoa = globalThis.btoa;
- global {
- // Buffer class
- type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
- type WithImplicitCoercion =
- | T
- | {
- valueOf(): T;
- };
- /**
- * Raw data is stored in instances of the Buffer class.
- * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
- * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
- */
- interface BufferConstructor {
- /**
- * Allocates a new buffer containing the given {str}.
- *
- * @param str String to store in buffer.
- * @param encoding encoding to use, optional. Default is 'utf8'
- * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
- */
- new (str: string, encoding?: BufferEncoding): Buffer;
- /**
- * Allocates a new buffer of {size} octets.
- *
- * @param size count of octets to allocate.
- * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
- */
- new (size: number): Buffer;
- /**
- * Allocates a new buffer containing the given {array} of octets.
- *
- * @param array The octets to store.
- * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
- */
- new (array: Uint8Array): Buffer;
- /**
- * Produces a Buffer backed by the same allocated memory as
- * the given {ArrayBuffer}/{SharedArrayBuffer}.
- *
- *
- * @param arrayBuffer The ArrayBuffer with which to share memory.
- * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
- */
- new (arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
- /**
- * Allocates a new buffer containing the given {array} of octets.
- *
- * @param array The octets to store.
- * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
- */
- new (array: ReadonlyArray): Buffer;
- /**
- * Copies the passed {buffer} data onto a new {Buffer} instance.
- *
- * @param buffer The buffer to copy.
- * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
- */
- new (buffer: Buffer): Buffer;
- /**
- * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
- * Array entries outside that range will be truncated to fit into it.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
- * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
- * ```
- *
- * A `TypeError` will be thrown if `array` is not an `Array` or another type
- * appropriate for `Buffer.from()` variants.
- *
- * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does.
- * @since v5.10.0
- */
- from(arrayBuffer: WithImplicitCoercion, byteOffset?: number, length?: number): Buffer;
- /**
- * Creates a new Buffer using the passed {data}
- * @param data data to create a new Buffer
- */
- from(data: Uint8Array | ReadonlyArray): Buffer;
- from(data: WithImplicitCoercion | string>): Buffer;
- /**
- * Creates a new Buffer containing the given JavaScript string {str}.
- * If provided, the {encoding} parameter identifies the character encoding.
- * If not provided, {encoding} defaults to 'utf8'.
- */
- from(
- str:
- | WithImplicitCoercion
- | {
- [Symbol.toPrimitive](hint: 'string'): string;
- },
- encoding?: BufferEncoding
- ): Buffer;
- /**
- * Creates a new Buffer using the passed {data}
- * @param values to create a new Buffer
- */
- of(...items: number[]): Buffer;
- /**
- * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * Buffer.isBuffer(Buffer.alloc(10)); // true
- * Buffer.isBuffer(Buffer.from('foo')); // true
- * Buffer.isBuffer('a string'); // false
- * Buffer.isBuffer([]); // false
- * Buffer.isBuffer(new Uint8Array(1024)); // false
- * ```
- * @since v0.1.101
- */
- isBuffer(obj: any): obj is Buffer;
- /**
- * Returns `true` if `encoding` is the name of a supported character encoding,
- * or `false` otherwise.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * console.log(Buffer.isEncoding('utf8'));
- * // Prints: true
- *
- * console.log(Buffer.isEncoding('hex'));
- * // Prints: true
- *
- * console.log(Buffer.isEncoding('utf/8'));
- * // Prints: false
- *
- * console.log(Buffer.isEncoding(''));
- * // Prints: false
- * ```
- * @since v0.9.1
- * @param encoding A character encoding name to check.
- */
- isEncoding(encoding: string): encoding is BufferEncoding;
- /**
- * Returns the byte length of a string when encoded using `encoding`.
- * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
- * for the encoding that is used to convert the string into bytes.
- *
- * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input.
- * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
- * return value might be greater than the length of a `Buffer` created from the
- * string.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const str = '\u00bd + \u00bc = \u00be';
- *
- * console.log(`${str}: ${str.length} characters, ` +
- * `${Buffer.byteLength(str, 'utf8')} bytes`);
- * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes
- * ```
- *
- * When `string` is a
- * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/-
- * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop-
- * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned.
- * @since v0.1.90
- * @param string A value to calculate the length of.
- * @param [encoding='utf8'] If `string` is a string, this is its encoding.
- * @return The number of bytes contained within `string`.
- */
- byteLength(string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, encoding?: BufferEncoding): number;
- /**
- * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
- *
- * If the list has no items, or if the `totalLength` is 0, then a new zero-length`Buffer` is returned.
- *
- * If `totalLength` is not provided, it is calculated from the `Buffer` instances
- * in `list` by adding their lengths.
- *
- * If `totalLength` is provided, it is coerced to an unsigned integer. If the
- * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
- * truncated to `totalLength`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * // Create a single `Buffer` from a list of three `Buffer` instances.
- *
- * const buf1 = Buffer.alloc(10);
- * const buf2 = Buffer.alloc(14);
- * const buf3 = Buffer.alloc(18);
- * const totalLength = buf1.length + buf2.length + buf3.length;
- *
- * console.log(totalLength);
- * // Prints: 42
- *
- * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
- *
- * console.log(bufA);
- * // Prints:
- * console.log(bufA.length);
- * // Prints: 42
- * ```
- *
- * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
- * @since v0.7.11
- * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
- * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
- */
- concat(list: ReadonlyArray, totalLength?: number): Buffer;
- /**
- * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf1 = Buffer.from('1234');
- * const buf2 = Buffer.from('0123');
- * const arr = [buf1, buf2];
- *
- * console.log(arr.sort(Buffer.compare));
- * // Prints: [ , ]
- * // (This result is equal to: [buf2, buf1].)
- * ```
- * @since v0.11.13
- * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
- */
- compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
- /**
- * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.alloc(5);
- *
- * console.log(buf);
- * // Prints:
- * ```
- *
- * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
- *
- * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.alloc(5, 'a');
- *
- * console.log(buf);
- * // Prints:
- * ```
- *
- * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
- * initialized by calling `buf.fill(fill, encoding)`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
- *
- * console.log(buf);
- * // Prints:
- * ```
- *
- * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
- * contents will never contain sensitive data from previous allocations, including
- * data that might not have been allocated for `Buffer`s.
- *
- * A `TypeError` will be thrown if `size` is not a number.
- * @since v5.10.0
- * @param size The desired length of the new `Buffer`.
- * @param [fill=0] A value to pre-fill the new `Buffer` with.
- * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
- */
- alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
- /**
- * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
- *
- * The underlying memory for `Buffer` instances created in this way is _not_
- * _initialized_. The contents of the newly created `Buffer` are unknown and_may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(10);
- *
- * console.log(buf);
- * // Prints (contents may vary):
- *
- * buf.fill(0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- *
- * A `TypeError` will be thrown if `size` is not a number.
- *
- * The `Buffer` module pre-allocates an internal `Buffer` instance of
- * size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`,`Buffer.from(array)`, `Buffer.concat()`, and the
- * deprecated`new Buffer(size)` constructor only when `size` is less than or equal
- * to `Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two).
- *
- * Use of this pre-allocated internal memory pool is a key difference between
- * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
- * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
- * than or equal to half `Buffer.poolSize`. The
- * difference is subtle but can be important when an application requires the
- * additional performance that `Buffer.allocUnsafe()` provides.
- * @since v5.10.0
- * @param size The desired length of the new `Buffer`.
- */
- allocUnsafe(size: number): Buffer;
- /**
- * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. A zero-length `Buffer` is created
- * if `size` is 0.
- *
- * The underlying memory for `Buffer` instances created in this way is _not_
- * _initialized_. The contents of the newly created `Buffer` are unknown and_may contain sensitive data_. Use `buf.fill(0)` to initialize
- * such `Buffer` instances with zeroes.
- *
- * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
- * allocations under 4 KB are sliced from a single pre-allocated `Buffer`. This
- * allows applications to avoid the garbage collection overhead of creating many
- * individually allocated `Buffer` instances. This approach improves both
- * performance and memory usage by eliminating the need to track and clean up as
- * many individual `ArrayBuffer` objects.
- *
- * However, in the case where a developer may need to retain a small chunk of
- * memory from a pool for an indeterminate amount of time, it may be appropriate
- * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
- * then copying out the relevant bits.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * // Need to keep around a few small chunks of memory.
- * const store = [];
- *
- * socket.on('readable', () => {
- * let data;
- * while (null !== (data = readable.read())) {
- * // Allocate for retained data.
- * const sb = Buffer.allocUnsafeSlow(10);
- *
- * // Copy the data into the new allocation.
- * data.copy(sb, 0, 0, 10);
- *
- * store.push(sb);
- * }
- * });
- * ```
- *
- * A `TypeError` will be thrown if `size` is not a number.
- * @since v5.12.0
- * @param size The desired length of the new `Buffer`.
- */
- allocUnsafeSlow(size: number): Buffer;
- /**
- * This is the size (in bytes) of pre-allocated internal `Buffer` instances used
- * for pooling. This value may be modified.
- * @since v0.11.3
- */
- poolSize: number;
- }
- interface Buffer extends Uint8Array {
- /**
- * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did
- * not contain enough space to fit the entire string, only part of `string` will be
- * written. However, partially encoded characters will not be written.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.alloc(256);
- *
- * const len = buf.write('\u00bd + \u00bc = \u00be', 0);
- *
- * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
- * // Prints: 12 bytes: ½ + ¼ = ¾
- *
- * const buffer = Buffer.alloc(10);
- *
- * const length = buffer.write('abcd', 8);
- *
- * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`);
- * // Prints: 2 bytes : ab
- * ```
- * @since v0.1.90
- * @param string String to write to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write `string`.
- * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`).
- * @param [encoding='utf8'] The character encoding of `string`.
- * @return Number of bytes written.
- */
- write(string: string, encoding?: BufferEncoding): number;
- write(string: string, offset: number, encoding?: BufferEncoding): number;
- write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
- /**
- * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`.
- *
- * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8,
- * then each invalid byte is replaced with the replacement character `U+FFFD`.
- *
- * The maximum length of a string instance (in UTF-16 code units) is available
- * as {@link constants.MAX_STRING_LENGTH}.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf1 = Buffer.allocUnsafe(26);
- *
- * for (let i = 0; i < 26; i++) {
- * // 97 is the decimal ASCII value for 'a'.
- * buf1[i] = i + 97;
- * }
- *
- * console.log(buf1.toString('utf8'));
- * // Prints: abcdefghijklmnopqrstuvwxyz
- * console.log(buf1.toString('utf8', 0, 5));
- * // Prints: abcde
- *
- * const buf2 = Buffer.from('tést');
- *
- * console.log(buf2.toString('hex'));
- * // Prints: 74c3a97374
- * console.log(buf2.toString('utf8', 0, 3));
- * // Prints: té
- * console.log(buf2.toString(undefined, 0, 3));
- * // Prints: té
- * ```
- * @since v0.1.90
- * @param [encoding='utf8'] The character encoding to use.
- * @param [start=0] The byte offset to start decoding at.
- * @param [end=buf.length] The byte offset to stop decoding at (not inclusive).
- */
- toString(encoding?: BufferEncoding, start?: number, end?: number): string;
- /**
- * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls
- * this function when stringifying a `Buffer` instance.
- *
- * `Buffer.from()` accepts objects in the format returned from this method.
- * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]);
- * const json = JSON.stringify(buf);
- *
- * console.log(json);
- * // Prints: {"type":"Buffer","data":[1,2,3,4,5]}
- *
- * const copy = JSON.parse(json, (key, value) => {
- * return value && value.type === 'Buffer' ?
- * Buffer.from(value) :
- * value;
- * });
- *
- * console.log(copy);
- * // Prints:
- * ```
- * @since v0.9.2
- */
- toJSON(): {
- type: 'Buffer';
- data: number[];
- };
- /**
- * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf1 = Buffer.from('ABC');
- * const buf2 = Buffer.from('414243', 'hex');
- * const buf3 = Buffer.from('ABCD');
- *
- * console.log(buf1.equals(buf2));
- * // Prints: true
- * console.log(buf1.equals(buf3));
- * // Prints: false
- * ```
- * @since v0.11.13
- * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`.
- */
- equals(otherBuffer: Uint8Array): boolean;
- /**
- * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order.
- * Comparison is based on the actual sequence of bytes in each `Buffer`.
- *
- * * `0` is returned if `target` is the same as `buf`
- * * `1` is returned if `target` should come _before_`buf` when sorted.
- * * `-1` is returned if `target` should come _after_`buf` when sorted.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf1 = Buffer.from('ABC');
- * const buf2 = Buffer.from('BCD');
- * const buf3 = Buffer.from('ABCD');
- *
- * console.log(buf1.compare(buf1));
- * // Prints: 0
- * console.log(buf1.compare(buf2));
- * // Prints: -1
- * console.log(buf1.compare(buf3));
- * // Prints: -1
- * console.log(buf2.compare(buf1));
- * // Prints: 1
- * console.log(buf2.compare(buf3));
- * // Prints: 1
- * console.log([buf1, buf2, buf3].sort(Buffer.compare));
- * // Prints: [ , , ]
- * // (This result is equal to: [buf1, buf3, buf2].)
- * ```
- *
- * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]);
- * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]);
- *
- * console.log(buf1.compare(buf2, 5, 9, 0, 4));
- * // Prints: 0
- * console.log(buf1.compare(buf2, 0, 6, 4));
- * // Prints: -1
- * console.log(buf1.compare(buf2, 5, 6, 5));
- * // Prints: 1
- * ```
- *
- * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
- * @since v0.11.13
- * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`.
- * @param [targetStart=0] The offset within `target` at which to begin comparison.
- * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive).
- * @param [sourceStart=0] The offset within `buf` at which to begin comparison.
- * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
- */
- compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): -1 | 0 | 1;
- /**
- * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
- *
- * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available
- * for all TypedArrays, including Node.js `Buffer`s, although it takes
- * different function arguments.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * // Create two `Buffer` instances.
- * const buf1 = Buffer.allocUnsafe(26);
- * const buf2 = Buffer.allocUnsafe(26).fill('!');
- *
- * for (let i = 0; i < 26; i++) {
- * // 97 is the decimal ASCII value for 'a'.
- * buf1[i] = i + 97;
- * }
- *
- * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`.
- * buf1.copy(buf2, 8, 16, 20);
- * // This is equivalent to:
- * // buf2.set(buf1.subarray(16, 20), 8);
- *
- * console.log(buf2.toString('ascii', 0, 25));
- * // Prints: !!!!!!!!qrst!!!!!!!!!!!!!
- * ```
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * // Create a `Buffer` and copy data from one region to an overlapping region
- * // within the same `Buffer`.
- *
- * const buf = Buffer.allocUnsafe(26);
- *
- * for (let i = 0; i < 26; i++) {
- * // 97 is the decimal ASCII value for 'a'.
- * buf[i] = i + 97;
- * }
- *
- * buf.copy(buf, 0, 4, 10);
- *
- * console.log(buf.toString());
- * // Prints: efghijghijklmnopqrstuvwxyz
- * ```
- * @since v0.1.90
- * @param target A `Buffer` or {@link Uint8Array} to copy into.
- * @param [targetStart=0] The offset within `target` at which to begin writing.
- * @param [sourceStart=0] The offset within `buf` from which to begin copying.
- * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive).
- * @return The number of bytes copied.
- */
- copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
- /**
- * Returns a new `Buffer` that references the same memory as the original, but
- * offset and cropped by the `start` and `end` indices.
- *
- * This is the same behavior as `buf.subarray()`.
- *
- * This method is not compatible with the `Uint8Array.prototype.slice()`,
- * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from('buffer');
- *
- * const copiedBuf = Uint8Array.prototype.slice.call(buf);
- * copiedBuf[0]++;
- * console.log(copiedBuf.toString());
- * // Prints: cuffer
- *
- * console.log(buf.toString());
- * // Prints: buffer
- * ```
- * @since v0.3.0
- * @param [start=0] Where the new `Buffer` will start.
- * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
- */
- slice(start?: number, end?: number): Buffer;
- /**
- * Returns a new `Buffer` that references the same memory as the original, but
- * offset and cropped by the `start` and `end` indices.
- *
- * Specifying `end` greater than `buf.length` will return the same result as
- * that of `end` equal to `buf.length`.
- *
- * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray).
- *
- * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte
- * // from the original `Buffer`.
- *
- * const buf1 = Buffer.allocUnsafe(26);
- *
- * for (let i = 0; i < 26; i++) {
- * // 97 is the decimal ASCII value for 'a'.
- * buf1[i] = i + 97;
- * }
- *
- * const buf2 = buf1.subarray(0, 3);
- *
- * console.log(buf2.toString('ascii', 0, buf2.length));
- * // Prints: abc
- *
- * buf1[0] = 33;
- *
- * console.log(buf2.toString('ascii', 0, buf2.length));
- * // Prints: !bc
- * ```
- *
- * Specifying negative indexes causes the slice to be generated relative to the
- * end of `buf` rather than the beginning.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from('buffer');
- *
- * console.log(buf.subarray(-6, -1).toString());
- * // Prints: buffe
- * // (Equivalent to buf.subarray(0, 5).)
- *
- * console.log(buf.subarray(-6, -2).toString());
- * // Prints: buff
- * // (Equivalent to buf.subarray(0, 4).)
- *
- * console.log(buf.subarray(-5, -2).toString());
- * // Prints: uff
- * // (Equivalent to buf.subarray(1, 4).)
- * ```
- * @since v3.0.0
- * @param [start=0] Where the new `Buffer` will start.
- * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
- */
- subarray(start?: number, end?: number): Buffer;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian.
- *
- * `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(8);
- *
- * buf.writeBigInt64BE(0x0102030405060708n, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v12.0.0, v10.20.0
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
- * @return `offset` plus the number of bytes written.
- */
- writeBigInt64BE(value: bigint, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian.
- *
- * `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(8);
- *
- * buf.writeBigInt64LE(0x0102030405060708n, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v12.0.0, v10.20.0
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
- * @return `offset` plus the number of bytes written.
- */
- writeBigInt64LE(value: bigint, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian.
- *
- * This function is also available under the `writeBigUint64BE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(8);
- *
- * buf.writeBigUInt64BE(0xdecafafecacefaden, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v12.0.0, v10.20.0
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
- * @return `offset` plus the number of bytes written.
- */
- writeBigUInt64BE(value: bigint, offset?: number): number;
- /**
- * @alias Buffer.writeBigUInt64BE
- * @since v14.10.0, v12.19.0
- */
- writeBigUint64BE(value: bigint, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(8);
- *
- * buf.writeBigUInt64LE(0xdecafafecacefaden, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- *
- * This function is also available under the `writeBigUint64LE` alias.
- * @since v12.0.0, v10.20.0
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
- * @return `offset` plus the number of bytes written.
- */
- writeBigUInt64LE(value: bigint, offset?: number): number;
- /**
- * @alias Buffer.writeBigUInt64LE
- * @since v14.10.0, v12.19.0
- */
- writeBigUint64LE(value: bigint, offset?: number): number;
- /**
- * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
- * when `value` is anything other than an unsigned integer.
- *
- * This function is also available under the `writeUintLE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(6);
- *
- * buf.writeUIntLE(0x1234567890ab, 0, 6);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
- * @return `offset` plus the number of bytes written.
- */
- writeUIntLE(value: number, offset: number, byteLength: number): number;
- /**
- * @alias Buffer.writeUIntLE
- * @since v14.9.0, v12.19.0
- */
- writeUintLE(value: number, offset: number, byteLength: number): number;
- /**
- * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined
- * when `value` is anything other than an unsigned integer.
- *
- * This function is also available under the `writeUintBE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(6);
- *
- * buf.writeUIntBE(0x1234567890ab, 0, 6);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
- * @return `offset` plus the number of bytes written.
- */
- writeUIntBE(value: number, offset: number, byteLength: number): number;
- /**
- * @alias Buffer.writeUIntBE
- * @since v14.9.0, v12.19.0
- */
- writeUintBE(value: number, offset: number, byteLength: number): number;
- /**
- * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
- * when `value` is anything other than a signed integer.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(6);
- *
- * buf.writeIntLE(0x1234567890ab, 0, 6);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.11.15
- * @param value Number to be written to `buf`.
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
- * @return `offset` plus the number of bytes written.
- */
- writeIntLE(value: number, offset: number, byteLength: number): number;
- /**
- * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a
- * signed integer.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(6);
- *
- * buf.writeIntBE(0x1234567890ab, 0, 6);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.11.15
- * @param value Number to be written to `buf`.
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
- * @return `offset` plus the number of bytes written.
- */
- writeIntBE(value: number, offset: number, byteLength: number): number;
- /**
- * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`.
- *
- * This function is also available under the `readBigUint64BE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
- *
- * console.log(buf.readBigUInt64BE(0));
- * // Prints: 4294967295n
- * ```
- * @since v12.0.0, v10.20.0
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
- */
- readBigUInt64BE(offset?: number): bigint;
- /**
- * @alias Buffer.readBigUInt64BE
- * @since v14.10.0, v12.19.0
- */
- readBigUint64BE(offset?: number): bigint;
- /**
- * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`.
- *
- * This function is also available under the `readBigUint64LE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
- *
- * console.log(buf.readBigUInt64LE(0));
- * // Prints: 18446744069414584320n
- * ```
- * @since v12.0.0, v10.20.0
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
- */
- readBigUInt64LE(offset?: number): bigint;
- /**
- * @alias Buffer.readBigUInt64LE
- * @since v14.10.0, v12.19.0
- */
- readBigUint64LE(offset?: number): bigint;
- /**
- * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed
- * values.
- * @since v12.0.0, v10.20.0
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
- */
- readBigInt64BE(offset?: number): bigint;
- /**
- * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed
- * values.
- * @since v12.0.0, v10.20.0
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
- */
- readBigInt64LE(offset?: number): bigint;
- /**
- * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned, little-endian integer supporting
- * up to 48 bits of accuracy.
- *
- * This function is also available under the `readUintLE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
- *
- * console.log(buf.readUIntLE(0, 6).toString(16));
- * // Prints: ab9078563412
- * ```
- * @since v0.11.15
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
- */
- readUIntLE(offset: number, byteLength: number): number;
- /**
- * @alias Buffer.readUIntLE
- * @since v14.9.0, v12.19.0
- */
- readUintLE(offset: number, byteLength: number): number;
- /**
- * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting
- * up to 48 bits of accuracy.
- *
- * This function is also available under the `readUintBE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
- *
- * console.log(buf.readUIntBE(0, 6).toString(16));
- * // Prints: 1234567890ab
- * console.log(buf.readUIntBE(1, 6).toString(16));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.11.15
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
- */
- readUIntBE(offset: number, byteLength: number): number;
- /**
- * @alias Buffer.readUIntBE
- * @since v14.9.0, v12.19.0
- */
- readUintBE(offset: number, byteLength: number): number;
- /**
- * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value
- * supporting up to 48 bits of accuracy.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
- *
- * console.log(buf.readIntLE(0, 6).toString(16));
- * // Prints: -546f87a9cbee
- * ```
- * @since v0.11.15
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
- */
- readIntLE(offset: number, byteLength: number): number;
- /**
- * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a big-endian, two's complement signed value
- * supporting up to 48 bits of accuracy.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
- *
- * console.log(buf.readIntBE(0, 6).toString(16));
- * // Prints: 1234567890ab
- * console.log(buf.readIntBE(1, 6).toString(16));
- * // Throws ERR_OUT_OF_RANGE.
- * console.log(buf.readIntBE(1, 0).toString(16));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.11.15
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
- */
- readIntBE(offset: number, byteLength: number): number;
- /**
- * Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
- *
- * This function is also available under the `readUint8` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([1, -2]);
- *
- * console.log(buf.readUInt8(0));
- * // Prints: 1
- * console.log(buf.readUInt8(1));
- * // Prints: 254
- * console.log(buf.readUInt8(2));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.5.0
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
- */
- readUInt8(offset?: number): number;
- /**
- * @alias Buffer.readUInt8
- * @since v14.9.0, v12.19.0
- */
- readUint8(offset?: number): number;
- /**
- * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`.
- *
- * This function is also available under the `readUint16LE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56]);
- *
- * console.log(buf.readUInt16LE(0).toString(16));
- * // Prints: 3412
- * console.log(buf.readUInt16LE(1).toString(16));
- * // Prints: 5634
- * console.log(buf.readUInt16LE(2).toString(16));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
- */
- readUInt16LE(offset?: number): number;
- /**
- * @alias Buffer.readUInt16LE
- * @since v14.9.0, v12.19.0
- */
- readUint16LE(offset?: number): number;
- /**
- * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`.
- *
- * This function is also available under the `readUint16BE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56]);
- *
- * console.log(buf.readUInt16BE(0).toString(16));
- * // Prints: 1234
- * console.log(buf.readUInt16BE(1).toString(16));
- * // Prints: 3456
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
- */
- readUInt16BE(offset?: number): number;
- /**
- * @alias Buffer.readUInt16BE
- * @since v14.9.0, v12.19.0
- */
- readUint16BE(offset?: number): number;
- /**
- * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`.
- *
- * This function is also available under the `readUint32LE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
- *
- * console.log(buf.readUInt32LE(0).toString(16));
- * // Prints: 78563412
- * console.log(buf.readUInt32LE(1).toString(16));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
- */
- readUInt32LE(offset?: number): number;
- /**
- * @alias Buffer.readUInt32LE
- * @since v14.9.0, v12.19.0
- */
- readUint32LE(offset?: number): number;
- /**
- * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`.
- *
- * This function is also available under the `readUint32BE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
- *
- * console.log(buf.readUInt32BE(0).toString(16));
- * // Prints: 12345678
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
- */
- readUInt32BE(offset?: number): number;
- /**
- * @alias Buffer.readUInt32BE
- * @since v14.9.0, v12.19.0
- */
- readUint32BE(offset?: number): number;
- /**
- * Reads a signed 8-bit integer from `buf` at the specified `offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed values.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([-1, 5]);
- *
- * console.log(buf.readInt8(0));
- * // Prints: -1
- * console.log(buf.readInt8(1));
- * // Prints: 5
- * console.log(buf.readInt8(2));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.5.0
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
- */
- readInt8(offset?: number): number;
- /**
- * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed values.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0, 5]);
- *
- * console.log(buf.readInt16LE(0));
- * // Prints: 1280
- * console.log(buf.readInt16LE(1));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
- */
- readInt16LE(offset?: number): number;
- /**
- * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed values.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0, 5]);
- *
- * console.log(buf.readInt16BE(0));
- * // Prints: 5
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
- */
- readInt16BE(offset?: number): number;
- /**
- * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed values.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0, 0, 0, 5]);
- *
- * console.log(buf.readInt32LE(0));
- * // Prints: 83886080
- * console.log(buf.readInt32LE(1));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
- */
- readInt32LE(offset?: number): number;
- /**
- * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed values.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([0, 0, 0, 5]);
- *
- * console.log(buf.readInt32BE(0));
- * // Prints: 5
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
- */
- readInt32BE(offset?: number): number;
- /**
- * Reads a 32-bit, little-endian float from `buf` at the specified `offset`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([1, 2, 3, 4]);
- *
- * console.log(buf.readFloatLE(0));
- * // Prints: 1.539989614439558e-36
- * console.log(buf.readFloatLE(1));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.11.15
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
- */
- readFloatLE(offset?: number): number;
- /**
- * Reads a 32-bit, big-endian float from `buf` at the specified `offset`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([1, 2, 3, 4]);
- *
- * console.log(buf.readFloatBE(0));
- * // Prints: 2.387939260590663e-38
- * ```
- * @since v0.11.15
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
- */
- readFloatBE(offset?: number): number;
- /**
- * Reads a 64-bit, little-endian double from `buf` at the specified `offset`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
- *
- * console.log(buf.readDoubleLE(0));
- * // Prints: 5.447603722011605e-270
- * console.log(buf.readDoubleLE(1));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.11.15
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
- */
- readDoubleLE(offset?: number): number;
- /**
- * Reads a 64-bit, big-endian double from `buf` at the specified `offset`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
- *
- * console.log(buf.readDoubleBE(0));
- * // Prints: 8.20788039913184e-304
- * ```
- * @since v0.11.15
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
- */
- readDoubleBE(offset?: number): number;
- reverse(): this;
- /**
- * Interprets `buf` as an array of unsigned 16-bit integers and swaps the
- * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
- *
- * console.log(buf1);
- * // Prints:
- *
- * buf1.swap16();
- *
- * console.log(buf1);
- * // Prints:
- *
- * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
- *
- * buf2.swap16();
- * // Throws ERR_INVALID_BUFFER_SIZE.
- * ```
- *
- * One convenient use of `buf.swap16()` is to perform a fast in-place conversion
- * between UTF-16 little-endian and UTF-16 big-endian:
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le');
- * buf.swap16(); // Convert to big-endian UTF-16 text.
- * ```
- * @since v5.10.0
- * @return A reference to `buf`.
- */
- swap16(): Buffer;
- /**
- * Interprets `buf` as an array of unsigned 32-bit integers and swaps the
- * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
- *
- * console.log(buf1);
- * // Prints:
- *
- * buf1.swap32();
- *
- * console.log(buf1);
- * // Prints:
- *
- * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
- *
- * buf2.swap32();
- * // Throws ERR_INVALID_BUFFER_SIZE.
- * ```
- * @since v5.10.0
- * @return A reference to `buf`.
- */
- swap32(): Buffer;
- /**
- * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_.
- * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
- *
- * console.log(buf1);
- * // Prints:
- *
- * buf1.swap64();
- *
- * console.log(buf1);
- * // Prints:
- *
- * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
- *
- * buf2.swap64();
- * // Throws ERR_INVALID_BUFFER_SIZE.
- * ```
- * @since v6.3.0
- * @return A reference to `buf`.
- */
- swap64(): Buffer;
- /**
- * Writes `value` to `buf` at the specified `offset`. `value` must be a
- * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
- * other than an unsigned 8-bit integer.
- *
- * This function is also available under the `writeUint8` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeUInt8(0x3, 0);
- * buf.writeUInt8(0x4, 1);
- * buf.writeUInt8(0x23, 2);
- * buf.writeUInt8(0x42, 3);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.0
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
- * @return `offset` plus the number of bytes written.
- */
- writeUInt8(value: number, offset?: number): number;
- /**
- * @alias Buffer.writeUInt8
- * @since v14.9.0, v12.19.0
- */
- writeUint8(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
- * anything other than an unsigned 16-bit integer.
- *
- * This function is also available under the `writeUint16LE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeUInt16LE(0xdead, 0);
- * buf.writeUInt16LE(0xbeef, 2);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
- * @return `offset` plus the number of bytes written.
- */
- writeUInt16LE(value: number, offset?: number): number;
- /**
- * @alias Buffer.writeUInt16LE
- * @since v14.9.0, v12.19.0
- */
- writeUint16LE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
- * unsigned 16-bit integer.
- *
- * This function is also available under the `writeUint16BE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeUInt16BE(0xdead, 0);
- * buf.writeUInt16BE(0xbeef, 2);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
- * @return `offset` plus the number of bytes written.
- */
- writeUInt16BE(value: number, offset?: number): number;
- /**
- * @alias Buffer.writeUInt16BE
- * @since v14.9.0, v12.19.0
- */
- writeUint16BE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
- * anything other than an unsigned 32-bit integer.
- *
- * This function is also available under the `writeUint32LE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeUInt32LE(0xfeedface, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
- * @return `offset` plus the number of bytes written.
- */
- writeUInt32LE(value: number, offset?: number): number;
- /**
- * @alias Buffer.writeUInt32LE
- * @since v14.9.0, v12.19.0
- */
- writeUint32LE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
- * unsigned 32-bit integer.
- *
- * This function is also available under the `writeUint32BE` alias.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeUInt32BE(0xfeedface, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
- * @return `offset` plus the number of bytes written.
- */
- writeUInt32BE(value: number, offset?: number): number;
- /**
- * @alias Buffer.writeUInt32BE
- * @since v14.9.0, v12.19.0
- */
- writeUint32BE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset`. `value` must be a valid
- * signed 8-bit integer. Behavior is undefined when `value` is anything other than
- * a signed 8-bit integer.
- *
- * `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(2);
- *
- * buf.writeInt8(2, 0);
- * buf.writeInt8(-2, 1);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.0
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
- * @return `offset` plus the number of bytes written.
- */
- writeInt8(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
- * anything other than a signed 16-bit integer.
- *
- * The `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(2);
- *
- * buf.writeInt16LE(0x0304, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
- * @return `offset` plus the number of bytes written.
- */
- writeInt16LE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
- * anything other than a signed 16-bit integer.
- *
- * The `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(2);
- *
- * buf.writeInt16BE(0x0102, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
- * @return `offset` plus the number of bytes written.
- */
- writeInt16BE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
- * anything other than a signed 32-bit integer.
- *
- * The `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeInt32LE(0x05060708, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
- * @return `offset` plus the number of bytes written.
- */
- writeInt32LE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
- * anything other than a signed 32-bit integer.
- *
- * The `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeInt32BE(0x01020304, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
- * @return `offset` plus the number of bytes written.
- */
- writeInt32BE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is
- * undefined when `value` is anything other than a JavaScript number.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeFloatLE(0xcafebabe, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.11.15
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
- * @return `offset` plus the number of bytes written.
- */
- writeFloatLE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is
- * undefined when `value` is anything other than a JavaScript number.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeFloatBE(0xcafebabe, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.11.15
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
- * @return `offset` plus the number of bytes written.
- */
- writeFloatBE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
- * other than a JavaScript number.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(8);
- *
- * buf.writeDoubleLE(123.456, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.11.15
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
- * @return `offset` plus the number of bytes written.
- */
- writeDoubleLE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
- * other than a JavaScript number.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(8);
- *
- * buf.writeDoubleBE(123.456, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.11.15
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
- * @return `offset` plus the number of bytes written.
- */
- writeDoubleBE(value: number, offset?: number): number;
- /**
- * Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
- * the entire `buf` will be filled:
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * // Fill a `Buffer` with the ASCII character 'h'.
- *
- * const b = Buffer.allocUnsafe(50).fill('h');
- *
- * console.log(b.toString());
- * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
- * ```
- *
- * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or
- * integer. If the resulting integer is greater than `255` (decimal), `buf` will be
- * filled with `value & 255`.
- *
- * If the final write of a `fill()` operation falls on a multi-byte character,
- * then only the bytes of that character that fit into `buf` are written:
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * // Fill a `Buffer` with character that takes up two bytes in UTF-8.
- *
- * console.log(Buffer.allocUnsafe(5).fill('\u0222'));
- * // Prints:
- * ```
- *
- * If `value` contains invalid characters, it is truncated; if no valid
- * fill data remains, an exception is thrown:
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.allocUnsafe(5);
- *
- * console.log(buf.fill('a'));
- * // Prints:
- * console.log(buf.fill('aazz', 'hex'));
- * // Prints:
- * console.log(buf.fill('zz', 'hex'));
- * // Throws an exception.
- * ```
- * @since v0.5.0
- * @param value The value with which to fill `buf`.
- * @param [offset=0] Number of bytes to skip before starting to fill `buf`.
- * @param [end=buf.length] Where to stop filling `buf` (not inclusive).
- * @param [encoding='utf8'] The encoding for `value` if `value` is a string.
- * @return A reference to `buf`.
- */
- fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
- /**
- * If `value` is:
- *
- * * a string, `value` is interpreted according to the character encoding in`encoding`.
- * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
- * To compare a partial `Buffer`, use `buf.slice()`.
- * * a number, `value` will be interpreted as an unsigned 8-bit integer
- * value between `0` and `255`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from('this is a buffer');
- *
- * console.log(buf.indexOf('this'));
- * // Prints: 0
- * console.log(buf.indexOf('is'));
- * // Prints: 2
- * console.log(buf.indexOf(Buffer.from('a buffer')));
- * // Prints: 8
- * console.log(buf.indexOf(97));
- * // Prints: 8 (97 is the decimal ASCII value for 'a')
- * console.log(buf.indexOf(Buffer.from('a buffer example')));
- * // Prints: -1
- * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8)));
- * // Prints: 8
- *
- * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
- *
- * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le'));
- * // Prints: 4
- * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le'));
- * // Prints: 6
- * ```
- *
- * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
- * an integer between 0 and 255.
- *
- * If `byteOffset` is not a number, it will be coerced to a number. If the result
- * of coercion is `NaN` or `0`, then the entire buffer will be searched. This
- * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf).
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const b = Buffer.from('abcdef');
- *
- * // Passing a value that's a number, but not a valid byte.
- * // Prints: 2, equivalent to searching for 99 or 'c'.
- * console.log(b.indexOf(99.9));
- * console.log(b.indexOf(256 + 99));
- *
- * // Passing a byteOffset that coerces to NaN or 0.
- * // Prints: 1, searching the whole buffer.
- * console.log(b.indexOf('b', undefined));
- * console.log(b.indexOf('b', {}));
- * console.log(b.indexOf('b', null));
- * console.log(b.indexOf('b', []));
- * ```
- *
- * If `value` is an empty string or empty `Buffer` and `byteOffset` is less
- * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned.
- * @since v1.5.0
- * @param value What to search for.
- * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
- * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
- * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
- */
- indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
- /**
- * Identical to `buf.indexOf()`, except the last occurrence of `value` is found
- * rather than the first occurrence.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from('this buffer is a buffer');
- *
- * console.log(buf.lastIndexOf('this'));
- * // Prints: 0
- * console.log(buf.lastIndexOf('buffer'));
- * // Prints: 17
- * console.log(buf.lastIndexOf(Buffer.from('buffer')));
- * // Prints: 17
- * console.log(buf.lastIndexOf(97));
- * // Prints: 15 (97 is the decimal ASCII value for 'a')
- * console.log(buf.lastIndexOf(Buffer.from('yolo')));
- * // Prints: -1
- * console.log(buf.lastIndexOf('buffer', 5));
- * // Prints: 5
- * console.log(buf.lastIndexOf('buffer', 4));
- * // Prints: -1
- *
- * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
- *
- * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le'));
- * // Prints: 6
- * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le'));
- * // Prints: 4
- * ```
- *
- * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
- * an integer between 0 and 255.
- *
- * If `byteOffset` is not a number, it will be coerced to a number. Any arguments
- * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer.
- * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf).
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const b = Buffer.from('abcdef');
- *
- * // Passing a value that's a number, but not a valid byte.
- * // Prints: 2, equivalent to searching for 99 or 'c'.
- * console.log(b.lastIndexOf(99.9));
- * console.log(b.lastIndexOf(256 + 99));
- *
- * // Passing a byteOffset that coerces to NaN.
- * // Prints: 1, searching the whole buffer.
- * console.log(b.lastIndexOf('b', undefined));
- * console.log(b.lastIndexOf('b', {}));
- *
- * // Passing a byteOffset that coerces to 0.
- * // Prints: -1, equivalent to passing 0.
- * console.log(b.lastIndexOf('b', null));
- * console.log(b.lastIndexOf('b', []));
- * ```
- *
- * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned.
- * @since v6.0.0
- * @param value What to search for.
- * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
- * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
- * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
- */
- lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
- /**
- * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `[index, byte]` pairs from the contents
- * of `buf`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * // Log the entire contents of a `Buffer`.
- *
- * const buf = Buffer.from('buffer');
- *
- * for (const pair of buf.entries()) {
- * console.log(pair);
- * }
- * // Prints:
- * // [0, 98]
- * // [1, 117]
- * // [2, 102]
- * // [3, 102]
- * // [4, 101]
- * // [5, 114]
- * ```
- * @since v1.1.0
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Equivalent to `buf.indexOf() !== -1`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from('this is a buffer');
- *
- * console.log(buf.includes('this'));
- * // Prints: true
- * console.log(buf.includes('is'));
- * // Prints: true
- * console.log(buf.includes(Buffer.from('a buffer')));
- * // Prints: true
- * console.log(buf.includes(97));
- * // Prints: true (97 is the decimal ASCII value for 'a')
- * console.log(buf.includes(Buffer.from('a buffer example')));
- * // Prints: false
- * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8)));
- * // Prints: true
- * console.log(buf.includes('this', 4));
- * // Prints: false
- * ```
- * @since v5.3.0
- * @param value What to search for.
- * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
- * @param [encoding='utf8'] If `value` is a string, this is its encoding.
- * @return `true` if `value` was found in `buf`, `false` otherwise.
- */
- includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
- /**
- * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices).
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from('buffer');
- *
- * for (const key of buf.keys()) {
- * console.log(key);
- * }
- * // Prints:
- * // 0
- * // 1
- * // 2
- * // 3
- * // 4
- * // 5
- * ```
- * @since v1.1.0
- */
- keys(): IterableIterator;
- /**
- * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) for `buf` values (bytes). This function is
- * called automatically when a `Buffer` is used in a `for..of` statement.
- *
- * ```js
- * import { Buffer } from 'buffer';
- *
- * const buf = Buffer.from('buffer');
- *
- * for (const value of buf.values()) {
- * console.log(value);
- * }
- * // Prints:
- * // 98
- * // 117
- * // 102
- * // 102
- * // 101
- * // 114
- *
- * for (const value of buf) {
- * console.log(value);
- * }
- * // Prints:
- * // 98
- * // 117
- * // 102
- * // 102
- * // 101
- * // 114
- * ```
- * @since v1.1.0
- */
- values(): IterableIterator;
- }
- var Buffer: BufferConstructor;
- /**
- * Decodes a string of Base64-encoded data into bytes, and encodes those bytes
- * into a string using Latin-1 (ISO-8859-1).
- *
- * The `data` may be any JavaScript-value that can be coerced into a string.
- *
- * **This function is only provided for compatibility with legacy web platform APIs**
- * **and should never be used in new code, because they use strings to represent**
- * **binary data and predate the introduction of typed arrays in JavaScript.**
- * **For code running using Node.js APIs, converting between base64-encoded strings**
- * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
- * @since v15.13.0, v14.17.0
- * @deprecated Use `Buffer.from(data, 'base64')` instead.
- * @param data The Base64-encoded input string.
- */
- function atob(data: string): string;
- /**
- * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes
- * into a string using Base64.
- *
- * The `data` may be any JavaScript-value that can be coerced into a string.
- *
- * **This function is only provided for compatibility with legacy web platform APIs**
- * **and should never be used in new code, because they use strings to represent**
- * **binary data and predate the introduction of typed arrays in JavaScript.**
- * **For code running using Node.js APIs, converting between base64-encoded strings**
- * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
- * @since v15.13.0, v14.17.0
- * @deprecated Use `buf.toString('base64')` instead.
- * @param data An ASCII (Latin1) string.
- */
- function btoa(data: string): string;
- }
-}
-declare module 'node:buffer' {
- export * from 'buffer';
-}
diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts
deleted file mode 100755
index 7eae502..0000000
--- a/node_modules/@types/node/child_process.d.ts
+++ /dev/null
@@ -1,1366 +0,0 @@
-/**
- * The `child_process` module provides the ability to spawn subprocesses in
- * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability
- * is primarily provided by the {@link spawn} function:
- *
- * ```js
- * const { spawn } = require('child_process');
- * const ls = spawn('ls', ['-lh', '/usr']);
- *
- * ls.stdout.on('data', (data) => {
- * console.log(`stdout: ${data}`);
- * });
- *
- * ls.stderr.on('data', (data) => {
- * console.error(`stderr: ${data}`);
- * });
- *
- * ls.on('close', (code) => {
- * console.log(`child process exited with code ${code}`);
- * });
- * ```
- *
- * By default, pipes for `stdin`, `stdout`, and `stderr` are established between
- * the parent Node.js process and the spawned subprocess. These pipes have
- * limited (and platform-specific) capacity. If the subprocess writes to
- * stdout in excess of that limit without the output being captured, the
- * subprocess blocks waiting for the pipe buffer to accept more data. This is
- * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed.
- *
- * The command lookup is performed using the `options.env.PATH` environment
- * variable if it is in the `options` object. Otherwise, `process.env.PATH` is
- * used.
- *
- * On Windows, environment variables are case-insensitive. Node.js
- * lexicographically sorts the `env` keys and uses the first one that
- * case-insensitively matches. Only first (in lexicographic order) entry will be
- * passed to the subprocess. This might lead to issues on Windows when passing
- * objects to the `env` option that have multiple variants of the same key, such as`PATH` and `Path`.
- *
- * The {@link spawn} method spawns the child process asynchronously,
- * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks
- * the event loop until the spawned process either exits or is terminated.
- *
- * For convenience, the `child_process` module provides a handful of synchronous
- * and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on
- * top of {@link spawn} or {@link spawnSync}.
- *
- * * {@link exec}: spawns a shell and runs a command within that
- * shell, passing the `stdout` and `stderr` to a callback function when
- * complete.
- * * {@link execFile}: similar to {@link exec} except
- * that it spawns the command directly without first spawning a shell by
- * default.
- * * {@link fork}: spawns a new Node.js process and invokes a
- * specified module with an IPC communication channel established that allows
- * sending messages between parent and child.
- * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop.
- * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop.
- *
- * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
- * the synchronous methods can have significant impact on performance due to
- * stalling the event loop while spawned processes complete.
- * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/child_process.js)
- */
-declare module 'child_process' {
- import { ObjectEncodingOptions } from 'node:fs';
- import { EventEmitter, Abortable } from 'node:events';
- import * as net from 'node:net';
- import { Writable, Readable, Stream, Pipe } from 'node:stream';
- import { URL } from 'node:url';
- type Serializable = string | object | number | boolean | bigint;
- type SendHandle = net.Socket | net.Server;
- /**
- * Instances of the `ChildProcess` represent spawned child processes.
- *
- * Instances of `ChildProcess` are not intended to be created directly. Rather,
- * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create
- * instances of `ChildProcess`.
- * @since v2.2.0
- */
- class ChildProcess extends EventEmitter {
- /**
- * A `Writable Stream` that represents the child process's `stdin`.
- *
- * If a child process waits to read all of its input, the child will not continue
- * until this stream has been closed via `end()`.
- *
- * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`,
- * then this will be `null`.
- *
- * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
- * refer to the same value.
- *
- * The `subprocess.stdin` property can be `undefined` if the child process could
- * not be successfully spawned.
- * @since v0.1.90
- */
- stdin: Writable | null;
- /**
- * A `Readable Stream` that represents the child process's `stdout`.
- *
- * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`,
- * then this will be `null`.
- *
- * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will
- * refer to the same value.
- *
- * ```js
- * const { spawn } = require('child_process');
- *
- * const subprocess = spawn('ls');
- *
- * subprocess.stdout.on('data', (data) => {
- * console.log(`Received chunk ${data}`);
- * });
- * ```
- *
- * The `subprocess.stdout` property can be `null` if the child process could
- * not be successfully spawned.
- * @since v0.1.90
- */
- stdout: Readable | null;
- /**
- * A `Readable Stream` that represents the child process's `stderr`.
- *
- * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`,
- * then this will be `null`.
- *
- * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
- * refer to the same value.
- *
- * The `subprocess.stderr` property can be `null` if the child process could
- * not be successfully spawned.
- * @since v0.1.90
- */
- stderr: Readable | null;
- /**
- * The `subprocess.channel` property is a reference to the child's IPC channel. If
- * no IPC channel currently exists, this property is `undefined`.
- * @since v7.1.0
- */
- readonly channel?: Pipe | null | undefined;
- /**
- * A sparse array of pipes to the child process, corresponding with positions in
- * the `stdio` option passed to {@link spawn} that have been set
- * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and`subprocess.stdio[2]` are also available as `subprocess.stdin`,`subprocess.stdout`, and `subprocess.stderr`,
- * respectively.
- *
- * In the following example, only the child's fd `1` (stdout) is configured as a
- * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values
- * in the array are `null`.
- *
- * ```js
- * const assert = require('assert');
- * const fs = require('fs');
- * const child_process = require('child_process');
- *
- * const subprocess = child_process.spawn('ls', {
- * stdio: [
- * 0, // Use parent's stdin for child.
- * 'pipe', // Pipe child's stdout to parent.
- * fs.openSync('err.out', 'w'), // Direct child's stderr to a file.
- * ]
- * });
- *
- * assert.strictEqual(subprocess.stdio[0], null);
- * assert.strictEqual(subprocess.stdio[0], subprocess.stdin);
- *
- * assert(subprocess.stdout);
- * assert.strictEqual(subprocess.stdio[1], subprocess.stdout);
- *
- * assert.strictEqual(subprocess.stdio[2], null);
- * assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
- * ```
- *
- * The `subprocess.stdio` property can be `undefined` if the child process could
- * not be successfully spawned.
- * @since v0.7.10
- */
- readonly stdio: [
- Writable | null,
- // stdin
- Readable | null,
- // stdout
- Readable | null,
- // stderr
- Readable | Writable | null | undefined,
- // extra
- Readable | Writable | null | undefined // extra
- ];
- /**
- * The `subprocess.killed` property indicates whether the child process
- * successfully received a signal from `subprocess.kill()`. The `killed` property
- * does not indicate that the child process has been terminated.
- * @since v0.5.10
- */
- readonly killed: boolean;
- /**
- * Returns the process identifier (PID) of the child process. If the child process
- * fails to spawn due to errors, then the value is `undefined` and `error` is
- * emitted.
- *
- * ```js
- * const { spawn } = require('child_process');
- * const grep = spawn('grep', ['ssh']);
- *
- * console.log(`Spawned child pid: ${grep.pid}`);
- * grep.stdin.end();
- * ```
- * @since v0.1.90
- */
- readonly pid?: number | undefined;
- /**
- * The `subprocess.connected` property indicates whether it is still possible to
- * send and receive messages from a child process. When `subprocess.connected` is`false`, it is no longer possible to send or receive messages.
- * @since v0.7.2
- */
- readonly connected: boolean;
- /**
- * The `subprocess.exitCode` property indicates the exit code of the child process.
- * If the child process is still running, the field will be `null`.
- */
- readonly exitCode: number | null;
- /**
- * The `subprocess.signalCode` property indicates the signal received by
- * the child process if any, else `null`.
- */
- readonly signalCode: NodeJS.Signals | null;
- /**
- * The `subprocess.spawnargs` property represents the full list of command-line
- * arguments the child process was launched with.
- */
- readonly spawnargs: string[];
- /**
- * The `subprocess.spawnfile` property indicates the executable file name of
- * the child process that is launched.
- *
- * For {@link fork}, its value will be equal to `process.execPath`.
- * For {@link spawn}, its value will be the name of
- * the executable file.
- * For {@link exec}, its value will be the name of the shell
- * in which the child process is launched.
- */
- readonly spawnfile: string;
- /**
- * The `subprocess.kill()` method sends a signal to the child process. If no
- * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function
- * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
- *
- * ```js
- * const { spawn } = require('child_process');
- * const grep = spawn('grep', ['ssh']);
- *
- * grep.on('close', (code, signal) => {
- * console.log(
- * `child process terminated due to receipt of signal ${signal}`);
- * });
- *
- * // Send SIGHUP to process.
- * grep.kill('SIGHUP');
- * ```
- *
- * The `ChildProcess` object may emit an `'error'` event if the signal
- * cannot be delivered. Sending a signal to a child process that has already exited
- * is not an error but may have unforeseen consequences. Specifically, if the
- * process identifier (PID) has been reassigned to another process, the signal will
- * be delivered to that process instead which can have unexpected results.
- *
- * While the function is called `kill`, the signal delivered to the child process
- * may not actually terminate the process.
- *
- * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference.
- *
- * On Windows, where POSIX signals do not exist, the `signal` argument will be
- * ignored, and the process will be killed forcefully and abruptly (similar to`'SIGKILL'`).
- * See `Signal Events` for more details.
- *
- * On Linux, child processes of child processes will not be terminated
- * when attempting to kill their parent. This is likely to happen when running a
- * new process in a shell or with the use of the `shell` option of `ChildProcess`:
- *
- * ```js
- * 'use strict';
- * const { spawn } = require('child_process');
- *
- * const subprocess = spawn(
- * 'sh',
- * [
- * '-c',
- * `node -e "setInterval(() => {
- * console.log(process.pid, 'is alive')
- * }, 500);"`,
- * ], {
- * stdio: ['inherit', 'inherit', 'inherit']
- * }
- * );
- *
- * setTimeout(() => {
- * subprocess.kill(); // Does not terminate the Node.js process in the shell.
- * }, 2000);
- * ```
- * @since v0.1.90
- */
- kill(signal?: NodeJS.Signals | number): boolean;
- /**
- * When an IPC channel has been established between the parent and child (
- * i.e. when using {@link fork}), the `subprocess.send()` method can
- * be used to send messages to the child process. When the child process is a
- * Node.js instance, these messages can be received via the `'message'` event.
- *
- * The message goes through serialization and parsing. The resulting
- * message might not be the same as what is originally sent.
- *
- * For example, in the parent script:
- *
- * ```js
- * const cp = require('child_process');
- * const n = cp.fork(`${__dirname}/sub.js`);
- *
- * n.on('message', (m) => {
- * console.log('PARENT got message:', m);
- * });
- *
- * // Causes the child to print: CHILD got message: { hello: 'world' }
- * n.send({ hello: 'world' });
- * ```
- *
- * And then the child script, `'sub.js'` might look like this:
- *
- * ```js
- * process.on('message', (m) => {
- * console.log('CHILD got message:', m);
- * });
- *
- * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null }
- * process.send({ foo: 'bar', baz: NaN });
- * ```
- *
- * Child Node.js processes will have a `process.send()` method of their own
- * that allows the child to send messages back to the parent.
- *
- * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages
- * containing a `NODE_` prefix in the `cmd` property are reserved for use within
- * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the`'internalMessage'` event and are consumed internally by Node.js.
- * Applications should avoid using such messages or listening for`'internalMessage'` events as it is subject to change without notice.
- *
- * The optional `sendHandle` argument that may be passed to `subprocess.send()` is
- * for passing a TCP server or socket object to the child process. The child will
- * receive the object as the second argument passed to the callback function
- * registered on the `'message'` event. Any data that is received
- * and buffered in the socket will not be sent to the child.
- *
- * The optional `callback` is a function that is invoked after the message is
- * sent but before the child may have received it. The function is called with a
- * single argument: `null` on success, or an `Error` object on failure.
- *
- * If no `callback` function is provided and the message cannot be sent, an`'error'` event will be emitted by the `ChildProcess` object. This can
- * happen, for instance, when the child process has already exited.
- *
- * `subprocess.send()` will return `false` if the channel has closed or when the
- * backlog of unsent messages exceeds a threshold that makes it unwise to send
- * more. Otherwise, the method returns `true`. The `callback` function can be
- * used to implement flow control.
- *
- * #### Example: sending a server object
- *
- * The `sendHandle` argument can be used, for instance, to pass the handle of
- * a TCP server object to the child process as illustrated in the example below:
- *
- * ```js
- * const subprocess = require('child_process').fork('subprocess.js');
- *
- * // Open up the server object and send the handle.
- * const server = require('net').createServer();
- * server.on('connection', (socket) => {
- * socket.end('handled by parent');
- * });
- * server.listen(1337, () => {
- * subprocess.send('server', server);
- * });
- * ```
- *
- * The child would then receive the server object as:
- *
- * ```js
- * process.on('message', (m, server) => {
- * if (m === 'server') {
- * server.on('connection', (socket) => {
- * socket.end('handled by child');
- * });
- * }
- * });
- * ```
- *
- * Once the server is now shared between the parent and child, some connections
- * can be handled by the parent and some by the child.
- *
- * While the example above uses a server created using the `net` module, `dgram`module servers use exactly the same workflow with the exceptions of listening on
- * a `'message'` event instead of `'connection'` and using `server.bind()` instead
- * of `server.listen()`. This is, however, currently only supported on Unix
- * platforms.
- *
- * #### Example: sending a socket object
- *
- * Similarly, the `sendHandler` argument can be used to pass the handle of a
- * socket to the child process. The example below spawns two children that each
- * handle connections with "normal" or "special" priority:
- *
- * ```js
- * const { fork } = require('child_process');
- * const normal = fork('subprocess.js', ['normal']);
- * const special = fork('subprocess.js', ['special']);
- *
- * // Open up the server and send sockets to child. Use pauseOnConnect to prevent
- * // the sockets from being read before they are sent to the child process.
- * const server = require('net').createServer({ pauseOnConnect: true });
- * server.on('connection', (socket) => {
- *
- * // If this is special priority...
- * if (socket.remoteAddress === '74.125.127.100') {
- * special.send('socket', socket);
- * return;
- * }
- * // This is normal priority.
- * normal.send('socket', socket);
- * });
- * server.listen(1337);
- * ```
- *
- * The `subprocess.js` would receive the socket handle as the second argument
- * passed to the event callback function:
- *
- * ```js
- * process.on('message', (m, socket) => {
- * if (m === 'socket') {
- * if (socket) {
- * // Check that the client socket exists.
- * // It is possible for the socket to be closed between the time it is
- * // sent and the time it is received in the child process.
- * socket.end(`Request handled with ${process.argv[2]} priority`);
- * }
- * }
- * });
- * ```
- *
- * Do not use `.maxConnections` on a socket that has been passed to a subprocess.
- * The parent cannot track when the socket is destroyed.
- *
- * Any `'message'` handlers in the subprocess should verify that `socket` exists,
- * as the connection may have been closed during the time it takes to send the
- * connection to the child.
- * @since v0.5.9
- * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
- */
- send(message: Serializable, callback?: (error: Error | null) => void): boolean;
- send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
- send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
- /**
- * Closes the IPC channel between parent and child, allowing the child to exit
- * gracefully once there are no other connections keeping it alive. After calling
- * this method the `subprocess.connected` and `process.connected` properties in
- * both the parent and child (respectively) will be set to `false`, and it will be
- * no longer possible to pass messages between the processes.
- *
- * The `'disconnect'` event will be emitted when there are no messages in the
- * process of being received. This will most often be triggered immediately after
- * calling `subprocess.disconnect()`.
- *
- * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked
- * within the child process to close the IPC channel as well.
- * @since v0.7.2
- */
- disconnect(): void;
- /**
- * By default, the parent will wait for the detached child to exit. To prevent the
- * parent from waiting for a given `subprocess` to exit, use the`subprocess.unref()` method. Doing so will cause the parent's event loop to not
- * include the child in its reference count, allowing the parent to exit
- * independently of the child, unless there is an established IPC channel between
- * the child and the parent.
- *
- * ```js
- * const { spawn } = require('child_process');
- *
- * const subprocess = spawn(process.argv[0], ['child_program.js'], {
- * detached: true,
- * stdio: 'ignore'
- * });
- *
- * subprocess.unref();
- * ```
- * @since v0.7.10
- */
- unref(): void;
- /**
- * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will
- * restore the removed reference count for the child process, forcing the parent
- * to wait for the child to exit before exiting itself.
- *
- * ```js
- * const { spawn } = require('child_process');
- *
- * const subprocess = spawn(process.argv[0], ['child_program.js'], {
- * detached: true,
- * stdio: 'ignore'
- * });
- *
- * subprocess.unref();
- * subprocess.ref();
- * ```
- * @since v0.7.10
- */
- ref(): void;
- /**
- * events.EventEmitter
- * 1. close
- * 2. disconnect
- * 3. error
- * 4. exit
- * 5. message
- * 6. spawn
- */
- addListener(event: string, listener: (...args: any[]) => void): this;
- addListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
- addListener(event: 'disconnect', listener: () => void): this;
- addListener(event: 'error', listener: (err: Error) => void): this;
- addListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
- addListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
- addListener(event: 'spawn', listener: () => void): this;
- emit(event: string | symbol, ...args: any[]): boolean;
- emit(event: 'close', code: number | null, signal: NodeJS.Signals | null): boolean;
- emit(event: 'disconnect'): boolean;
- emit(event: 'error', err: Error): boolean;
- emit(event: 'exit', code: number | null, signal: NodeJS.Signals | null): boolean;
- emit(event: 'message', message: Serializable, sendHandle: SendHandle): boolean;
- emit(event: 'spawn', listener: () => void): boolean;
- on(event: string, listener: (...args: any[]) => void): this;
- on(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
- on(event: 'disconnect', listener: () => void): this;
- on(event: 'error', listener: (err: Error) => void): this;
- on(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
- on(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
- on(event: 'spawn', listener: () => void): this;
- once(event: string, listener: (...args: any[]) => void): this;
- once(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
- once(event: 'disconnect', listener: () => void): this;
- once(event: 'error', listener: (err: Error) => void): this;
- once(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
- once(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
- once(event: 'spawn', listener: () => void): this;
- prependListener(event: string, listener: (...args: any[]) => void): this;
- prependListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
- prependListener(event: 'disconnect', listener: () => void): this;
- prependListener(event: 'error', listener: (err: Error) => void): this;
- prependListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
- prependListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
- prependListener(event: 'spawn', listener: () => void): this;
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
- prependOnceListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
- prependOnceListener(event: 'disconnect', listener: () => void): this;
- prependOnceListener(event: 'error', listener: (err: Error) => void): this;
- prependOnceListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
- prependOnceListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
- prependOnceListener(event: 'spawn', listener: () => void): this;
- }
- // return this object when stdio option is undefined or not specified
- interface ChildProcessWithoutNullStreams extends ChildProcess {
- stdin: Writable;
- stdout: Readable;
- stderr: Readable;
- readonly stdio: [
- Writable,
- Readable,
- Readable,
- // stderr
- Readable | Writable | null | undefined,
- // extra, no modification
- Readable | Writable | null | undefined // extra, no modification
- ];
- }
- // return this object when stdio option is a tuple of 3
- interface ChildProcessByStdio extends ChildProcess {
- stdin: I;
- stdout: O;
- stderr: E;
- readonly stdio: [
- I,
- O,
- E,
- Readable | Writable | null | undefined,
- // extra, no modification
- Readable | Writable | null | undefined // extra, no modification
- ];
- }
- interface MessageOptions {
- keepOpen?: boolean | undefined;
- }
- type IOType = 'overlapped' | 'pipe' | 'ignore' | 'inherit';
- type StdioOptions = IOType | Array;
- type SerializationType = 'json' | 'advanced';
- interface MessagingOptions extends Abortable {
- /**
- * Specify the kind of serialization used for sending messages between processes.
- * @default 'json'
- */
- serialization?: SerializationType | undefined;
- /**
- * The signal value to be used when the spawned process will be killed by the abort signal.
- * @default 'SIGTERM'
- */
- killSignal?: NodeJS.Signals | number | undefined;
- /**
- * In milliseconds the maximum amount of time the process is allowed to run.
- */
- timeout?: number | undefined;
- }
- interface ProcessEnvOptions {
- uid?: number | undefined;
- gid?: number | undefined;
- cwd?: string | URL | undefined;
- env?: NodeJS.ProcessEnv | undefined;
- }
- interface CommonOptions extends ProcessEnvOptions {
- /**
- * @default true
- */
- windowsHide?: boolean | undefined;
- /**
- * @default 0
- */
- timeout?: number | undefined;
- }
- interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable {
- argv0?: string | undefined;
- stdio?: StdioOptions | undefined;
- shell?: boolean | string | undefined;
- windowsVerbatimArguments?: boolean | undefined;
- }
- interface SpawnOptions extends CommonSpawnOptions {
- detached?: boolean | undefined;
- }
- interface SpawnOptionsWithoutStdio extends SpawnOptions {
- stdio?: StdioPipeNamed | StdioPipe[] | undefined;
- }
- type StdioNull = 'inherit' | 'ignore' | Stream;
- type StdioPipeNamed = 'pipe' | 'overlapped';
- type StdioPipe = undefined | null | StdioPipeNamed;
- interface SpawnOptionsWithStdioTuple extends SpawnOptions {
- stdio: [Stdin, Stdout, Stderr];
- }
- /**
- * The `child_process.spawn()` method spawns a new process using the given`command`, with command-line arguments in `args`. If omitted, `args` defaults
- * to an empty array.
- *
- * **If the `shell` option is enabled, do not pass unsanitized user input to this**
- * **function. Any input containing shell metacharacters may be used to trigger**
- * **arbitrary command execution.**
- *
- * A third argument may be used to specify additional options, with these defaults:
- *
- * ```js
- * const defaults = {
- * cwd: undefined,
- * env: process.env
- * };
- * ```
- *
- * Use `cwd` to specify the working directory from which the process is spawned.
- * If not given, the default is to inherit the current working directory. If given,
- * but the path does not exist, the child process emits an `ENOENT` error
- * and exits immediately. `ENOENT` is also emitted when the command
- * does not exist.
- *
- * Use `env` to specify environment variables that will be visible to the new
- * process, the default is `process.env`.
- *
- * `undefined` values in `env` will be ignored.
- *
- * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the
- * exit code:
- *
- * ```js
- * const { spawn } = require('child_process');
- * const ls = spawn('ls', ['-lh', '/usr']);
- *
- * ls.stdout.on('data', (data) => {
- * console.log(`stdout: ${data}`);
- * });
- *
- * ls.stderr.on('data', (data) => {
- * console.error(`stderr: ${data}`);
- * });
- *
- * ls.on('close', (code) => {
- * console.log(`child process exited with code ${code}`);
- * });
- * ```
- *
- * Example: A very elaborate way to run `ps ax | grep ssh`
- *
- * ```js
- * const { spawn } = require('child_process');
- * const ps = spawn('ps', ['ax']);
- * const grep = spawn('grep', ['ssh']);
- *
- * ps.stdout.on('data', (data) => {
- * grep.stdin.write(data);
- * });
- *
- * ps.stderr.on('data', (data) => {
- * console.error(`ps stderr: ${data}`);
- * });
- *
- * ps.on('close', (code) => {
- * if (code !== 0) {
- * console.log(`ps process exited with code ${code}`);
- * }
- * grep.stdin.end();
- * });
- *
- * grep.stdout.on('data', (data) => {
- * console.log(data.toString());
- * });
- *
- * grep.stderr.on('data', (data) => {
- * console.error(`grep stderr: ${data}`);
- * });
- *
- * grep.on('close', (code) => {
- * if (code !== 0) {
- * console.log(`grep process exited with code ${code}`);
- * }
- * });
- * ```
- *
- * Example of checking for failed `spawn`:
- *
- * ```js
- * const { spawn } = require('child_process');
- * const subprocess = spawn('bad_command');
- *
- * subprocess.on('error', (err) => {
- * console.error('Failed to start subprocess.');
- * });
- * ```
- *
- * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process
- * title while others (Windows, SunOS) will use `command`.
- *
- * Node.js currently overwrites `argv[0]` with `process.execPath` on startup, so`process.argv[0]` in a Node.js child process will not match the `argv0`parameter passed to `spawn` from the parent,
- * retrieve it with the`process.argv0` property instead.
- *
- * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
- * the error passed to the callback will be an `AbortError`:
- *
- * ```js
- * const { spawn } = require('child_process');
- * const controller = new AbortController();
- * const { signal } = controller;
- * const grep = spawn('grep', ['ssh'], { signal });
- * grep.on('error', (err) => {
- * // This will be called with err being an AbortError if the controller aborts
- * });
- * controller.abort(); // Stops the child process
- * ```
- * @since v0.1.90
- * @param command The command to run.
- * @param args List of string arguments.
- */
- function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
- function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, options: SpawnOptions): ChildProcess;
- // overloads of spawn with 'args'
- function spawn(command: string, args?: ReadonlyArray, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
- function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
- function spawn(command: string, args: ReadonlyArray, options: SpawnOptions): ChildProcess;
- interface ExecOptions extends CommonOptions {
- shell?: string | undefined;
- signal?: AbortSignal | undefined;
- maxBuffer?: number | undefined;
- killSignal?: NodeJS.Signals | number | undefined;
- }
- interface ExecOptionsWithStringEncoding extends ExecOptions {
- encoding: BufferEncoding;
- }
- interface ExecOptionsWithBufferEncoding extends ExecOptions {
- encoding: BufferEncoding | null; // specify `null`.
- }
- interface ExecException extends Error {
- cmd?: string | undefined;
- killed?: boolean | undefined;
- code?: number | undefined;
- signal?: NodeJS.Signals | undefined;
- }
- /**
- * Spawns a shell then executes the `command` within that shell, buffering any
- * generated output. The `command` string passed to the exec function is processed
- * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
- * need to be dealt with accordingly:
- *
- * ```js
- * const { exec } = require('child_process');
- *
- * exec('"/path/to/test file/test.sh" arg1 arg2');
- * // Double quotes are used so that the space in the path is not interpreted as
- * // a delimiter of multiple arguments.
- *
- * exec('echo "The \\$HOME variable is $HOME"');
- * // The $HOME variable is escaped in the first instance, but not in the second.
- * ```
- *
- * **Never pass unsanitized user input to this function. Any input containing shell**
- * **metacharacters may be used to trigger arbitrary command execution.**
- *
- * If a `callback` function is provided, it is called with the arguments`(error, stdout, stderr)`. On success, `error` will be `null`. On error,`error` will be an instance of `Error`. The
- * `error.code` property will be
- * the exit code of the process. By convention, any exit code other than `0`indicates an error. `error.signal` will be the signal that terminated the
- * process.
- *
- * The `stdout` and `stderr` arguments passed to the callback will contain the
- * stdout and stderr output of the child process. By default, Node.js will decode
- * the output as UTF-8 and pass strings to the callback. The `encoding` option
- * can be used to specify the character encoding used to decode the stdout and
- * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
- * encoding, `Buffer` objects will be passed to the callback instead.
- *
- * ```js
- * const { exec } = require('child_process');
- * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => {
- * if (error) {
- * console.error(`exec error: ${error}`);
- * return;
- * }
- * console.log(`stdout: ${stdout}`);
- * console.error(`stderr: ${stderr}`);
- * });
- * ```
- *
- * If `timeout` is greater than `0`, the parent will send the signal
- * identified by the `killSignal` property (the default is `'SIGTERM'`) if the
- * child runs longer than `timeout` milliseconds.
- *
- * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace
- * the existing process and uses a shell to execute the command.
- *
- * If this method is invoked as its `util.promisify()` ed version, it returns
- * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In
- * case of an error (including any error resulting in an exit code other than 0), a
- * rejected promise is returned, with the same `error` object given in the
- * callback, but with two additional properties `stdout` and `stderr`.
- *
- * ```js
- * const util = require('util');
- * const exec = util.promisify(require('child_process').exec);
- *
- * async function lsExample() {
- * const { stdout, stderr } = await exec('ls');
- * console.log('stdout:', stdout);
- * console.error('stderr:', stderr);
- * }
- * lsExample();
- * ```
- *
- * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
- * the error passed to the callback will be an `AbortError`:
- *
- * ```js
- * const { exec } = require('child_process');
- * const controller = new AbortController();
- * const { signal } = controller;
- * const child = exec('grep ssh', { signal }, (error) => {
- * console.log(error); // an AbortError
- * });
- * controller.abort();
- * ```
- * @since v0.1.90
- * @param command The command to run, with space-separated arguments.
- * @param callback called with the output when process terminates.
- */
- function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
- // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
- function exec(
- command: string,
- options: {
- encoding: 'buffer' | null;
- } & ExecOptions,
- callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void
- ): ChildProcess;
- // `options` with well known `encoding` means stdout/stderr are definitely `string`.
- function exec(
- command: string,
- options: {
- encoding: BufferEncoding;
- } & ExecOptions,
- callback?: (error: ExecException | null, stdout: string, stderr: string) => void
- ): ChildProcess;
- // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
- // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
- function exec(
- command: string,
- options: {
- encoding: BufferEncoding;
- } & ExecOptions,
- callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void
- ): ChildProcess;
- // `options` without an `encoding` means stdout/stderr are definitely `string`.
- function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
- // fallback if nothing else matches. Worst case is always `string | Buffer`.
- function exec(
- command: string,
- options: (ObjectEncodingOptions & ExecOptions) | undefined | null,
- callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void
- ): ChildProcess;
- interface PromiseWithChild extends Promise {
- child: ChildProcess;
- }
- namespace exec {
- function __promisify__(command: string): PromiseWithChild<{
- stdout: string;
- stderr: string;
- }>;
- function __promisify__(
- command: string,
- options: {
- encoding: 'buffer' | null;
- } & ExecOptions
- ): PromiseWithChild<{
- stdout: Buffer;
- stderr: Buffer;
- }>;
- function __promisify__(
- command: string,
- options: {
- encoding: BufferEncoding;
- } & ExecOptions
- ): PromiseWithChild<{
- stdout: string;
- stderr: string;
- }>;
- function __promisify__(
- command: string,
- options: ExecOptions
- ): PromiseWithChild<{
- stdout: string;
- stderr: string;
- }>;
- function __promisify__(
- command: string,
- options?: (ObjectEncodingOptions & ExecOptions) | null
- ): PromiseWithChild<{
- stdout: string | Buffer;
- stderr: string | Buffer;
- }>;
- }
- interface ExecFileOptions extends CommonOptions, Abortable {
- maxBuffer?: number | undefined;
- killSignal?: NodeJS.Signals | number | undefined;
- windowsVerbatimArguments?: boolean | undefined;
- shell?: boolean | string | undefined;
- signal?: AbortSignal | undefined;
- }
- interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
- encoding: BufferEncoding;
- }
- interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
- encoding: 'buffer' | null;
- }
- interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
- encoding: BufferEncoding;
- }
- type ExecFileException = ExecException & NodeJS.ErrnoException;
- /**
- * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
- * executable `file` is spawned directly as a new process making it slightly more
- * efficient than {@link exec}.
- *
- * The same options as {@link exec} are supported. Since a shell is
- * not spawned, behaviors such as I/O redirection and file globbing are not
- * supported.
- *
- * ```js
- * const { execFile } = require('child_process');
- * const child = execFile('node', ['--version'], (error, stdout, stderr) => {
- * if (error) {
- * throw error;
- * }
- * console.log(stdout);
- * });
- * ```
- *
- * The `stdout` and `stderr` arguments passed to the callback will contain the
- * stdout and stderr output of the child process. By default, Node.js will decode
- * the output as UTF-8 and pass strings to the callback. The `encoding` option
- * can be used to specify the character encoding used to decode the stdout and
- * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
- * encoding, `Buffer` objects will be passed to the callback instead.
- *
- * If this method is invoked as its `util.promisify()` ed version, it returns
- * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In
- * case of an error (including any error resulting in an exit code other than 0), a
- * rejected promise is returned, with the same `error` object given in the
- * callback, but with two additional properties `stdout` and `stderr`.
- *
- * ```js
- * const util = require('util');
- * const execFile = util.promisify(require('child_process').execFile);
- * async function getVersion() {
- * const { stdout } = await execFile('node', ['--version']);
- * console.log(stdout);
- * }
- * getVersion();
- * ```
- *
- * **If the `shell` option is enabled, do not pass unsanitized user input to this**
- * **function. Any input containing shell metacharacters may be used to trigger**
- * **arbitrary command execution.**
- *
- * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
- * the error passed to the callback will be an `AbortError`:
- *
- * ```js
- * const { execFile } = require('child_process');
- * const controller = new AbortController();
- * const { signal } = controller;
- * const child = execFile('node', ['--version'], { signal }, (error) => {
- * console.log(error); // an AbortError
- * });
- * controller.abort();
- * ```
- * @since v0.1.91
- * @param file The name or path of the executable file to run.
- * @param args List of string arguments.
- * @param callback Called with the output when process terminates.
- */
- function execFile(file: string): ChildProcess;
- function execFile(file: string, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
- function execFile(file: string, args?: ReadonlyArray | null): ChildProcess;
- function execFile(file: string, args: ReadonlyArray | undefined | null, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
- // no `options` definitely means stdout/stderr are `string`.
- function execFile(file: string, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
- function execFile(file: string, args: ReadonlyArray | undefined | null, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
- // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
- function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
- function execFile(
- file: string,
- args: ReadonlyArray | undefined | null,
- options: ExecFileOptionsWithBufferEncoding,
- callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void
- ): ChildProcess;
- // `options` with well known `encoding` means stdout/stderr are definitely `string`.
- function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
- function execFile(
- file: string,
- args: ReadonlyArray | undefined | null,
- options: ExecFileOptionsWithStringEncoding,
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
- ): ChildProcess;
- // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
- // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
- function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
- function execFile(
- file: string,
- args: ReadonlyArray | undefined | null,
- options: ExecFileOptionsWithOtherEncoding,
- callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void
- ): ChildProcess;
- // `options` without an `encoding` means stdout/stderr are definitely `string`.
- function execFile(file: string, options: ExecFileOptions, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
- function execFile(
- file: string,
- args: ReadonlyArray | undefined | null,
- options: ExecFileOptions,
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
- ): ChildProcess;
- // fallback if nothing else matches. Worst case is always `string | Buffer`.
- function execFile(
- file: string,
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
- callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null
- ): ChildProcess;
- function execFile(
- file: string,
- args: ReadonlyArray | undefined | null,
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
- callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null
- ): ChildProcess;
- namespace execFile {
- function __promisify__(file: string): PromiseWithChild<{
- stdout: string;
- stderr: string;
- }>;
- function __promisify__(
- file: string,
- args: ReadonlyArray | undefined | null
- ): PromiseWithChild<{
- stdout: string;
- stderr: string;
- }>;
- function __promisify__(
- file: string,
- options: ExecFileOptionsWithBufferEncoding
- ): PromiseWithChild<{
- stdout: Buffer;
- stderr: Buffer;
- }>;
- function __promisify__(
- file: string,
- args: ReadonlyArray | undefined | null,
- options: ExecFileOptionsWithBufferEncoding
- ): PromiseWithChild<{
- stdout: Buffer;
- stderr: Buffer;
- }>;
- function __promisify__(
- file: string,
- options: ExecFileOptionsWithStringEncoding
- ): PromiseWithChild<{
- stdout: string;
- stderr: string;
- }>;
- function __promisify__(
- file: string,
- args: ReadonlyArray | undefined | null,
- options: ExecFileOptionsWithStringEncoding
- ): PromiseWithChild<{
- stdout: string;
- stderr: string;
- }>;
- function __promisify__(
- file: string,
- options: ExecFileOptionsWithOtherEncoding
- ): PromiseWithChild<{
- stdout: string | Buffer;
- stderr: string | Buffer;
- }>;
- function __promisify__(
- file: string,
- args: ReadonlyArray | undefined | null,
- options: ExecFileOptionsWithOtherEncoding
- ): PromiseWithChild<{
- stdout: string | Buffer;
- stderr: string | Buffer;
- }>;
- function __promisify__(
- file: string,
- options: ExecFileOptions
- ): PromiseWithChild<{
- stdout: string;
- stderr: string;
- }>;
- function __promisify__(
- file: string,
- args: ReadonlyArray | undefined | null,
- options: ExecFileOptions
- ): PromiseWithChild<{
- stdout: string;
- stderr: string;
- }>;
- function __promisify__(
- file: string,
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null
- ): PromiseWithChild<{
- stdout: string | Buffer;
- stderr: string | Buffer;
- }>;
- function __promisify__(
- file: string,
- args: ReadonlyArray | undefined | null,
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null
- ): PromiseWithChild<{
- stdout: string | Buffer;
- stderr: string | Buffer;
- }>;
- }
- interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
- execPath?: string | undefined;
- execArgv?: string[] | undefined;
- silent?: boolean | undefined;
- stdio?: StdioOptions | undefined;
- detached?: boolean | undefined;
- windowsVerbatimArguments?: boolean | undefined;
- }
- /**
- * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes.
- * Like {@link spawn}, a `ChildProcess` object is returned. The
- * returned `ChildProcess` will have an additional communication channel
- * built-in that allows messages to be passed back and forth between the parent and
- * child. See `subprocess.send()` for details.
- *
- * Keep in mind that spawned Node.js child processes are
- * independent of the parent with exception of the IPC communication channel
- * that is established between the two. Each process has its own memory, with
- * their own V8 instances. Because of the additional resource allocations
- * required, spawning a large number of child Node.js processes is not
- * recommended.
- *
- * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the`options` object allows for an alternative
- * execution path to be used.
- *
- * Node.js processes launched with a custom `execPath` will communicate with the
- * parent process using the file descriptor (fd) identified using the
- * environment variable `NODE_CHANNEL_FD` on the child process.
- *
- * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the
- * current process.
- *
- * The `shell` option available in {@link spawn} is not supported by`child_process.fork()` and will be ignored if set.
- *
- * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
- * the error passed to the callback will be an `AbortError`:
- *
- * ```js
- * if (process.argv[2] === 'child') {
- * setTimeout(() => {
- * console.log(`Hello from ${process.argv[2]}!`);
- * }, 1_000);
- * } else {
- * const { fork } = require('child_process');
- * const controller = new AbortController();
- * const { signal } = controller;
- * const child = fork(__filename, ['child'], { signal });
- * child.on('error', (err) => {
- * // This will be called with err being an AbortError if the controller aborts
- * });
- * controller.abort(); // Stops the child process
- * }
- * ```
- * @since v0.5.0
- * @param modulePath The module to run in the child.
- * @param args List of string arguments.
- */
- function fork(modulePath: string, options?: ForkOptions): ChildProcess;
- function fork(modulePath: string, args?: ReadonlyArray, options?: ForkOptions): ChildProcess;
- interface SpawnSyncOptions extends CommonSpawnOptions {
- input?: string | NodeJS.ArrayBufferView | undefined;
- maxBuffer?: number | undefined;
- encoding?: BufferEncoding | 'buffer' | null | undefined;
- }
- interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
- encoding: BufferEncoding;
- }
- interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
- encoding?: 'buffer' | null | undefined;
- }
- interface SpawnSyncReturns {
- pid: number;
- output: Array;
- stdout: T;
- stderr: T;
- status: number | null;
- signal: NodeJS.Signals | null;
- error?: Error | undefined;
- }
- /**
- * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
- * until the child process has fully closed. When a timeout has been encountered
- * and `killSignal` is sent, the method won't return until the process has
- * completely exited. If the process intercepts and handles the `SIGTERM` signal
- * and doesn't exit, the parent process will wait until the child process has
- * exited.
- *
- * **If the `shell` option is enabled, do not pass unsanitized user input to this**
- * **function. Any input containing shell metacharacters may be used to trigger**
- * **arbitrary command execution.**
- * @since v0.11.12
- * @param command The command to run.
- * @param args List of string arguments.
- */
- function spawnSync(command: string): SpawnSyncReturns;
- function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns;
- function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns;
- function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns;
- function spawnSync(command: string, args: ReadonlyArray): SpawnSyncReturns;
- function spawnSync(command: string, args: ReadonlyArray, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns;
- function spawnSync(command: string, args: ReadonlyArray, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns;
- function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptions): SpawnSyncReturns;
- interface CommonExecOptions extends CommonOptions {
- input?: string | NodeJS.ArrayBufferView | undefined;
- stdio?: StdioOptions | undefined;
- killSignal?: NodeJS.Signals | number | undefined;
- maxBuffer?: number | undefined;
- encoding?: BufferEncoding | 'buffer' | null | undefined;
- }
- interface ExecSyncOptions extends CommonExecOptions {
- shell?: string | undefined;
- }
- interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
- encoding: BufferEncoding;
- }
- interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
- encoding?: 'buffer' | null | undefined;
- }
- /**
- * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return
- * until the child process has fully closed. When a timeout has been encountered
- * and `killSignal` is sent, the method won't return until the process has
- * completely exited. If the child process intercepts and handles the `SIGTERM`signal and doesn't exit, the parent process will wait until the child process
- * has exited.
- *
- * If the process times out or has a non-zero exit code, this method will throw.
- * The `Error` object will contain the entire result from {@link spawnSync}.
- *
- * **Never pass unsanitized user input to this function. Any input containing shell**
- * **metacharacters may be used to trigger arbitrary command execution.**
- * @since v0.11.12
- * @param command The command to run.
- * @return The stdout from the command.
- */
- function execSync(command: string): Buffer;
- function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
- function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer;
- function execSync(command: string, options?: ExecSyncOptions): string | Buffer;
- interface ExecFileSyncOptions extends CommonExecOptions {
- shell?: boolean | string | undefined;
- }
- interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
- encoding: BufferEncoding;
- }
- interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
- encoding?: 'buffer' | null; // specify `null`.
- }
- /**
- * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
- * return until the child process has fully closed. When a timeout has been
- * encountered and `killSignal` is sent, the method won't return until the process
- * has completely exited.
- *
- * If the child process intercepts and handles the `SIGTERM` signal and
- * does not exit, the parent process will still wait until the child process has
- * exited.
- *
- * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}.
- *
- * **If the `shell` option is enabled, do not pass unsanitized user input to this**
- * **function. Any input containing shell metacharacters may be used to trigger**
- * **arbitrary command execution.**
- * @since v0.11.12
- * @param file The name or path of the executable file to run.
- * @param args List of string arguments.
- * @return The stdout from the command.
- */
- function execFileSync(file: string): Buffer;
- function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
- function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
- function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer;
- function execFileSync(file: string, args: ReadonlyArray): Buffer;
- function execFileSync(file: string, args: ReadonlyArray, options: ExecFileSyncOptionsWithStringEncoding): string;
- function execFileSync(file: string, args: ReadonlyArray, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
- function execFileSync(file: string, args?: ReadonlyArray, options?: ExecFileSyncOptions): string | Buffer;
-}
-declare module 'node:child_process' {
- export * from 'child_process';
-}
diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts
deleted file mode 100755
index c48084d..0000000
--- a/node_modules/@types/node/cluster.d.ts
+++ /dev/null
@@ -1,414 +0,0 @@
-/**
- * A single instance of Node.js runs in a single thread. To take advantage of
- * multi-core systems, the user will sometimes want to launch a cluster of Node.js
- * processes to handle the load.
- *
- * The cluster module allows easy creation of child processes that all share
- * server ports.
- *
- * ```js
- * import cluster from 'cluster';
- * import http from 'http';
- * import { cpus } from 'os';
- * import process from 'process';
- *
- * const numCPUs = cpus().length;
- *
- * if (cluster.isPrimary) {
- * console.log(`Primary ${process.pid} is running`);
- *
- * // Fork workers.
- * for (let i = 0; i < numCPUs; i++) {
- * cluster.fork();
- * }
- *
- * cluster.on('exit', (worker, code, signal) => {
- * console.log(`worker ${worker.process.pid} died`);
- * });
- * } else {
- * // Workers can share any TCP connection
- * // In this case it is an HTTP server
- * http.createServer((req, res) => {
- * res.writeHead(200);
- * res.end('hello world\n');
- * }).listen(8000);
- *
- * console.log(`Worker ${process.pid} started`);
- * }
- * ```
- *
- * Running Node.js will now share port 8000 between the workers:
- *
- * ```console
- * $ node server.js
- * Primary 3596 is running
- * Worker 4324 started
- * Worker 4520 started
- * Worker 6056 started
- * Worker 5644 started
- * ```
- *
- * On Windows, it is not yet possible to set up a named pipe server in a worker.
- * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/cluster.js)
- */
-declare module 'cluster' {
- import * as child from 'node:child_process';
- import EventEmitter = require('node:events');
- import * as net from 'node:net';
- export interface ClusterSettings {
- execArgv?: string[] | undefined; // default: process.execArgv
- exec?: string | undefined;
- args?: string[] | undefined;
- silent?: boolean | undefined;
- stdio?: any[] | undefined;
- uid?: number | undefined;
- gid?: number | undefined;
- inspectPort?: number | (() => number) | undefined;
- }
- export interface Address {
- address: string;
- port: number;
- addressType: number | 'udp4' | 'udp6'; // 4, 6, -1, "udp4", "udp6"
- }
- /**
- * A `Worker` object contains all public information and method about a worker.
- * In the primary it can be obtained using `cluster.workers`. In a worker
- * it can be obtained using `cluster.worker`.
- * @since v0.7.0
- */
- export class Worker extends EventEmitter {
- /**
- * Each new worker is given its own unique id, this id is stored in the`id`.
- *
- * While a worker is alive, this is the key that indexes it in`cluster.workers`.
- * @since v0.8.0
- */
- id: number;
- /**
- * All workers are created using `child_process.fork()`, the returned object
- * from this function is stored as `.process`. In a worker, the global `process`is stored.
- *
- * See: `Child Process module`.
- *
- * Workers will call `process.exit(0)` if the `'disconnect'` event occurs
- * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
- * accidental disconnection.
- * @since v0.7.0
- */
- process: child.ChildProcess;
- /**
- * Send a message to a worker or primary, optionally with a handle.
- *
- * In the primary this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
- *
- * In a worker this sends a message to the primary. It is identical to`process.send()`.
- *
- * This example will echo back all messages from the primary:
- *
- * ```js
- * if (cluster.isPrimary) {
- * const worker = cluster.fork();
- * worker.send('hi there');
- *
- * } else if (cluster.isWorker) {
- * process.on('message', (msg) => {
- * process.send(msg);
- * });
- * }
- * ```
- * @since v0.7.0
- * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
- */
- send(message: child.Serializable, callback?: (error: Error | null) => void): boolean;
- send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean;
- send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean;
- /**
- * This function will kill the worker. In the primary, it does this
- * by disconnecting the `worker.process`, and once disconnected, killing
- * with `signal`. In the worker, it does it by disconnecting the channel,
- * and then exiting with code `0`.
- *
- * Because `kill()` attempts to gracefully disconnect the worker process, it is
- * susceptible to waiting indefinitely for the disconnect to complete. For example,
- * if the worker enters an infinite loop, a graceful disconnect will never occur.
- * If the graceful disconnect behavior is not needed, use `worker.process.kill()`.
- *
- * Causes `.exitedAfterDisconnect` to be set.
- *
- * This method is aliased as `worker.destroy()` for backward compatibility.
- *
- * In a worker, `process.kill()` exists, but it is not this function;
- * it is `kill()`.
- * @since v0.9.12
- * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
- */
- kill(signal?: string): void;
- destroy(signal?: string): void;
- /**
- * In a worker, this function will close all servers, wait for the `'close'` event
- * on those servers, and then disconnect the IPC channel.
- *
- * In the primary, an internal message is sent to the worker causing it to call`.disconnect()` on itself.
- *
- * Causes `.exitedAfterDisconnect` to be set.
- *
- * After a server is closed, it will no longer accept new connections,
- * but connections may be accepted by any other listening worker. Existing
- * connections will be allowed to close as usual. When no more connections exist,
- * see `server.close()`, the IPC channel to the worker will close allowing it
- * to die gracefully.
- *
- * The above applies _only_ to server connections, client connections are not
- * automatically closed by workers, and disconnect does not wait for them to close
- * before exiting.
- *
- * In a worker, `process.disconnect` exists, but it is not this function;
- * it is `disconnect()`.
- *
- * Because long living server connections may block workers from disconnecting, it
- * may be useful to send a message, so application specific actions may be taken to
- * close them. It also may be useful to implement a timeout, killing a worker if
- * the `'disconnect'` event has not been emitted after some time.
- *
- * ```js
- * if (cluster.isPrimary) {
- * const worker = cluster.fork();
- * let timeout;
- *
- * worker.on('listening', (address) => {
- * worker.send('shutdown');
- * worker.disconnect();
- * timeout = setTimeout(() => {
- * worker.kill();
- * }, 2000);
- * });
- *
- * worker.on('disconnect', () => {
- * clearTimeout(timeout);
- * });
- *
- * } else if (cluster.isWorker) {
- * const net = require('net');
- * const server = net.createServer((socket) => {
- * // Connections never end
- * });
- *
- * server.listen(8000);
- *
- * process.on('message', (msg) => {
- * if (msg === 'shutdown') {
- * // Initiate graceful close of any connections to server
- * }
- * });
- * }
- * ```
- * @since v0.7.7
- * @return A reference to `worker`.
- */
- disconnect(): void;
- /**
- * This function returns `true` if the worker is connected to its primary via its
- * IPC channel, `false` otherwise. A worker is connected to its primary after it
- * has been created. It is disconnected after the `'disconnect'` event is emitted.
- * @since v0.11.14
- */
- isConnected(): boolean;
- /**
- * This function returns `true` if the worker's process has terminated (either
- * because of exiting or being signaled). Otherwise, it returns `false`.
- *
- * ```js
- * import cluster from 'cluster';
- * import http from 'http';
- * import { cpus } from 'os';
- * import process from 'process';
- *
- * const numCPUs = cpus().length;
- *
- * if (cluster.isPrimary) {
- * console.log(`Primary ${process.pid} is running`);
- *
- * // Fork workers.
- * for (let i = 0; i < numCPUs; i++) {
- * cluster.fork();
- * }
- *
- * cluster.on('fork', (worker) => {
- * console.log('worker is dead:', worker.isDead());
- * });
- *
- * cluster.on('exit', (worker, code, signal) => {
- * console.log('worker is dead:', worker.isDead());
- * });
- * } else {
- * // Workers can share any TCP connection. In this case, it is an HTTP server.
- * http.createServer((req, res) => {
- * res.writeHead(200);
- * res.end(`Current process\n ${process.pid}`);
- * process.kill(process.pid);
- * }).listen(8000);
- * }
- * ```
- * @since v0.11.14
- */
- isDead(): boolean;
- /**
- * This property is `true` if the worker exited due to `.kill()` or`.disconnect()`. If the worker exited any other way, it is `false`. If the
- * worker has not exited, it is `undefined`.
- *
- * The boolean `worker.exitedAfterDisconnect` allows distinguishing between
- * voluntary and accidental exit, the primary may choose not to respawn a worker
- * based on this value.
- *
- * ```js
- * cluster.on('exit', (worker, code, signal) => {
- * if (worker.exitedAfterDisconnect === true) {
- * console.log('Oh, it was just voluntary – no need to worry');
- * }
- * });
- *
- * // kill worker
- * worker.kill();
- * ```
- * @since v6.0.0
- */
- exitedAfterDisconnect: boolean;
- /**
- * events.EventEmitter
- * 1. disconnect
- * 2. error
- * 3. exit
- * 4. listening
- * 5. message
- * 6. online
- */
- addListener(event: string, listener: (...args: any[]) => void): this;
- addListener(event: 'disconnect', listener: () => void): this;
- addListener(event: 'error', listener: (error: Error) => void): this;
- addListener(event: 'exit', listener: (code: number, signal: string) => void): this;
- addListener(event: 'listening', listener: (address: Address) => void): this;
- addListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
- addListener(event: 'online', listener: () => void): this;
- emit(event: string | symbol, ...args: any[]): boolean;
- emit(event: 'disconnect'): boolean;
- emit(event: 'error', error: Error): boolean;
- emit(event: 'exit', code: number, signal: string): boolean;
- emit(event: 'listening', address: Address): boolean;
- emit(event: 'message', message: any, handle: net.Socket | net.Server): boolean;
- emit(event: 'online'): boolean;
- on(event: string, listener: (...args: any[]) => void): this;
- on(event: 'disconnect', listener: () => void): this;
- on(event: 'error', listener: (error: Error) => void): this;
- on(event: 'exit', listener: (code: number, signal: string) => void): this;
- on(event: 'listening', listener: (address: Address) => void): this;
- on(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
- on(event: 'online', listener: () => void): this;
- once(event: string, listener: (...args: any[]) => void): this;
- once(event: 'disconnect', listener: () => void): this;
- once(event: 'error', listener: (error: Error) => void): this;
- once(event: 'exit', listener: (code: number, signal: string) => void): this;
- once(event: 'listening', listener: (address: Address) => void): this;
- once(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
- once(event: 'online', listener: () => void): this;
- prependListener(event: string, listener: (...args: any[]) => void): this;
- prependListener(event: 'disconnect', listener: () => void): this;
- prependListener(event: 'error', listener: (error: Error) => void): this;
- prependListener(event: 'exit', listener: (code: number, signal: string) => void): this;
- prependListener(event: 'listening', listener: (address: Address) => void): this;
- prependListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
- prependListener(event: 'online', listener: () => void): this;
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
- prependOnceListener(event: 'disconnect', listener: () => void): this;
- prependOnceListener(event: 'error', listener: (error: Error) => void): this;
- prependOnceListener(event: 'exit', listener: (code: number, signal: string) => void): this;
- prependOnceListener(event: 'listening', listener: (address: Address) => void): this;
- prependOnceListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
- prependOnceListener(event: 'online', listener: () => void): this;
- }
- export interface Cluster extends EventEmitter {
- disconnect(callback?: () => void): void;
- fork(env?: any): Worker;
- /** @deprecated since v16.0.0 - use isPrimary. */
- readonly isMaster: boolean;
- readonly isPrimary: boolean;
- readonly isWorker: boolean;
- schedulingPolicy: number;
- readonly settings: ClusterSettings;
- /** @deprecated since v16.0.0 - use setupPrimary. */
- setupMaster(settings?: ClusterSettings): void;
- /**
- * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings.
- */
- setupPrimary(settings?: ClusterSettings): void;
- readonly worker?: Worker | undefined;
- readonly workers?: NodeJS.Dict | undefined;
- readonly SCHED_NONE: number;
- readonly SCHED_RR: number;
- /**
- * events.EventEmitter
- * 1. disconnect
- * 2. exit
- * 3. fork
- * 4. listening
- * 5. message
- * 6. online
- * 7. setup
- */
- addListener(event: string, listener: (...args: any[]) => void): this;
- addListener(event: 'disconnect', listener: (worker: Worker) => void): this;
- addListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
- addListener(event: 'fork', listener: (worker: Worker) => void): this;
- addListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
- addListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
- addListener(event: 'online', listener: (worker: Worker) => void): this;
- addListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
- emit(event: string | symbol, ...args: any[]): boolean;
- emit(event: 'disconnect', worker: Worker): boolean;
- emit(event: 'exit', worker: Worker, code: number, signal: string): boolean;
- emit(event: 'fork', worker: Worker): boolean;
- emit(event: 'listening', worker: Worker, address: Address): boolean;
- emit(event: 'message', worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
- emit(event: 'online', worker: Worker): boolean;
- emit(event: 'setup', settings: ClusterSettings): boolean;
- on(event: string, listener: (...args: any[]) => void): this;
- on(event: 'disconnect', listener: (worker: Worker) => void): this;
- on(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
- on(event: 'fork', listener: (worker: Worker) => void): this;
- on(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
- on(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
- on(event: 'online', listener: (worker: Worker) => void): this;
- on(event: 'setup', listener: (settings: ClusterSettings) => void): this;
- once(event: string, listener: (...args: any[]) => void): this;
- once(event: 'disconnect', listener: (worker: Worker) => void): this;
- once(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
- once(event: 'fork', listener: (worker: Worker) => void): this;
- once(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
- once(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
- once(event: 'online', listener: (worker: Worker) => void): this;
- once(event: 'setup', listener: (settings: ClusterSettings) => void): this;
- prependListener(event: string, listener: (...args: any[]) => void): this;
- prependListener(event: 'disconnect', listener: (worker: Worker) => void): this;
- prependListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
- prependListener(event: 'fork', listener: (worker: Worker) => void): this;
- prependListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
- // the handle is a net.Socket or net.Server object, or undefined.
- prependListener(event: 'message', listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void): this;
- prependListener(event: 'online', listener: (worker: Worker) => void): this;
- prependListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
- prependOnceListener(event: 'disconnect', listener: (worker: Worker) => void): this;
- prependOnceListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
- prependOnceListener(event: 'fork', listener: (worker: Worker) => void): this;
- prependOnceListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
- // the handle is a net.Socket or net.Server object, or undefined.
- prependOnceListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
- prependOnceListener(event: 'online', listener: (worker: Worker) => void): this;
- prependOnceListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
- }
- const cluster: Cluster;
- export default cluster;
-}
-declare module 'node:cluster' {
- export * from 'cluster';
- export { default as default } from 'cluster';
-}
diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts
deleted file mode 100755
index 9297018..0000000
--- a/node_modules/@types/node/console.d.ts
+++ /dev/null
@@ -1,412 +0,0 @@
-/**
- * The `console` module provides a simple debugging console that is similar to the
- * JavaScript console mechanism provided by web browsers.
- *
- * The module exports two specific components:
- *
- * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
- * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
- *
- * _**Warning**_: The global console object's methods are neither consistently
- * synchronous like the browser APIs they resemble, nor are they consistently
- * asynchronous like all other Node.js streams. See the `note on process I/O` for
- * more information.
- *
- * Example using the global `console`:
- *
- * ```js
- * console.log('hello world');
- * // Prints: hello world, to stdout
- * console.log('hello %s', 'world');
- * // Prints: hello world, to stdout
- * console.error(new Error('Whoops, something bad happened'));
- * // Prints error message and stack trace to stderr:
- * // Error: Whoops, something bad happened
- * // at [eval]:5:15
- * // at Script.runInThisContext (node:vm:132:18)
- * // at Object.runInThisContext (node:vm:309:38)
- * // at node:internal/process/execution:77:19
- * // at [eval]-wrapper:6:22
- * // at evalScript (node:internal/process/execution:76:60)
- * // at node:internal/main/eval_string:23:3
- *
- * const name = 'Will Robinson';
- * console.warn(`Danger ${name}! Danger!`);
- * // Prints: Danger Will Robinson! Danger!, to stderr
- * ```
- *
- * Example using the `Console` class:
- *
- * ```js
- * const out = getStreamSomehow();
- * const err = getStreamSomehow();
- * const myConsole = new console.Console(out, err);
- *
- * myConsole.log('hello world');
- * // Prints: hello world, to out
- * myConsole.log('hello %s', 'world');
- * // Prints: hello world, to out
- * myConsole.error(new Error('Whoops, something bad happened'));
- * // Prints: [Error: Whoops, something bad happened], to err
- *
- * const name = 'Will Robinson';
- * myConsole.warn(`Danger ${name}! Danger!`);
- * // Prints: Danger Will Robinson! Danger!, to err
- * ```
- * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/console.js)
- */
-declare module 'console' {
- import console = require('node:console');
- export = console;
-}
-declare module 'node:console' {
- import { InspectOptions } from 'node:util';
- global {
- // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
- interface Console {
- Console: console.ConsoleConstructor;
- /**
- * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
- * writes a message and does not otherwise affect execution. The output always
- * starts with `"Assertion failed"`. If provided, `message` is formatted using `util.format()`.
- *
- * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
- *
- * ```js
- * console.assert(true, 'does nothing');
- *
- * console.assert(false, 'Whoops %s work', 'didn\'t');
- * // Assertion failed: Whoops didn't work
- *
- * console.assert();
- * // Assertion failed
- * ```
- * @since v0.1.101
- * @param value The value tested for being truthy.
- * @param message All arguments besides `value` are used as error message.
- */
- assert(value: any, message?: string, ...optionalParams: any[]): void;
- /**
- * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the
- * TTY. When `stdout` is not a TTY, this method does nothing.
- *
- * The specific operation of `console.clear()` can vary across operating systems
- * and terminal types. For most Linux operating systems, `console.clear()`operates similarly to the `clear` shell command. On Windows, `console.clear()`will clear only the output in the
- * current terminal viewport for the Node.js
- * binary.
- * @since v8.3.0
- */
- clear(): void;
- /**
- * Maintains an internal counter specific to `label` and outputs to `stdout` the
- * number of times `console.count()` has been called with the given `label`.
- *
- * ```js
- * > console.count()
- * default: 1
- * undefined
- * > console.count('default')
- * default: 2
- * undefined
- * > console.count('abc')
- * abc: 1
- * undefined
- * > console.count('xyz')
- * xyz: 1
- * undefined
- * > console.count('abc')
- * abc: 2
- * undefined
- * > console.count()
- * default: 3
- * undefined
- * >
- * ```
- * @since v8.3.0
- * @param label The display label for the counter.
- */
- count(label?: string): void;
- /**
- * Resets the internal counter specific to `label`.
- *
- * ```js
- * > console.count('abc');
- * abc: 1
- * undefined
- * > console.countReset('abc');
- * undefined
- * > console.count('abc');
- * abc: 1
- * undefined
- * >
- * ```
- * @since v8.3.0
- * @param label The display label for the counter.
- */
- countReset(label?: string): void;
- /**
- * The `console.debug()` function is an alias for {@link log}.
- * @since v8.0.0
- */
- debug(message?: any, ...optionalParams: any[]): void;
- /**
- * Uses `util.inspect()` on `obj` and prints the resulting string to `stdout`.
- * This function bypasses any custom `inspect()` function defined on `obj`.
- * @since v0.1.101
- */
- dir(obj: any, options?: InspectOptions): void;
- /**
- * This method calls `console.log()` passing it the arguments received.
- * This method does not produce any XML formatting.
- * @since v8.0.0
- */
- dirxml(...data: any[]): void;
- /**
- * Prints to `stderr` with newline. Multiple arguments can be passed, with the
- * first used as the primary message and all additional used as substitution
- * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
- *
- * ```js
- * const code = 5;
- * console.error('error #%d', code);
- * // Prints: error #5, to stderr
- * console.error('error', code);
- * // Prints: error 5, to stderr
- * ```
- *
- * If formatting elements (e.g. `%d`) are not found in the first string then `util.inspect()` is called on each argument and the resulting string
- * values are concatenated. See `util.format()` for more information.
- * @since v0.1.100
- */
- error(message?: any, ...optionalParams: any[]): void;
- /**
- * Increases indentation of subsequent lines by spaces for `groupIndentation`length.
- *
- * If one or more `label`s are provided, those are printed first without the
- * additional indentation.
- * @since v8.5.0
- */
- group(...label: any[]): void;
- /**
- * An alias for {@link group}.
- * @since v8.5.0
- */
- groupCollapsed(...label: any[]): void;
- /**
- * Decreases indentation of subsequent lines by spaces for `groupIndentation`length.
- * @since v8.5.0
- */
- groupEnd(): void;
- /**
- * The `console.info()` function is an alias for {@link log}.
- * @since v0.1.100
- */
- info(message?: any, ...optionalParams: any[]): void;
- /**
- * Prints to `stdout` with newline. Multiple arguments can be passed, with the
- * first used as the primary message and all additional used as substitution
- * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
- *
- * ```js
- * const count = 5;
- * console.log('count: %d', count);
- * // Prints: count: 5, to stdout
- * console.log('count:', count);
- * // Prints: count: 5, to stdout
- * ```
- *
- * See `util.format()` for more information.
- * @since v0.1.100
- */
- log(message?: any, ...optionalParams: any[]): void;
- /**
- * Try to construct a table with the columns of the properties of `tabularData`(or use `properties`) and rows of `tabularData` and log it. Falls back to just
- * logging the argument if it can’t be parsed as tabular.
- *
- * ```js
- * // These can't be parsed as tabular data
- * console.table(Symbol());
- * // Symbol()
- *
- * console.table(undefined);
- * // undefined
- *
- * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
- * // ┌─────────┬─────┬─────┐
- * // │ (index) │ a │ b │
- * // ├─────────┼─────┼─────┤
- * // │ 0 │ 1 │ 'Y' │
- * // │ 1 │ 'Z' │ 2 │
- * // └─────────┴─────┴─────┘
- *
- * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
- * // ┌─────────┬─────┐
- * // │ (index) │ a │
- * // ├─────────┼─────┤
- * // │ 0 │ 1 │
- * // │ 1 │ 'Z' │
- * // └─────────┴─────┘
- * ```
- * @since v10.0.0
- * @param properties Alternate properties for constructing the table.
- */
- table(tabularData: any, properties?: ReadonlyArray): void;
- /**
- * Starts a timer that can be used to compute the duration of an operation. Timers
- * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in
- * suitable time units to `stdout`. For example, if the elapsed
- * time is 3869ms, `console.timeEnd()` displays "3.869s".
- * @since v0.1.104
- */
- time(label?: string): void;
- /**
- * Stops a timer that was previously started by calling {@link time} and
- * prints the result to `stdout`:
- *
- * ```js
- * console.time('100-elements');
- * for (let i = 0; i < 100; i++) {}
- * console.timeEnd('100-elements');
- * // prints 100-elements: 225.438ms
- * ```
- * @since v0.1.104
- */
- timeEnd(label?: string): void;
- /**
- * For a timer that was previously started by calling {@link time}, prints
- * the elapsed time and other `data` arguments to `stdout`:
- *
- * ```js
- * console.time('process');
- * const value = expensiveProcess1(); // Returns 42
- * console.timeLog('process', value);
- * // Prints "process: 365.227ms 42".
- * doExpensiveProcess2(value);
- * console.timeEnd('process');
- * ```
- * @since v10.7.0
- */
- timeLog(label?: string, ...data: any[]): void;
- /**
- * Prints to `stderr` the string `'Trace: '`, followed by the `util.format()` formatted message and stack trace to the current position in the code.
- *
- * ```js
- * console.trace('Show me');
- * // Prints: (stack trace will vary based on where trace is called)
- * // Trace: Show me
- * // at repl:2:9
- * // at REPLServer.defaultEval (repl.js:248:27)
- * // at bound (domain.js:287:14)
- * // at REPLServer.runBound [as eval] (domain.js:300:12)
- * // at REPLServer. (repl.js:412:12)
- * // at emitOne (events.js:82:20)
- * // at REPLServer.emit (events.js:169:7)
- * // at REPLServer.Interface._onLine (readline.js:210:10)
- * // at REPLServer.Interface._line (readline.js:549:8)
- * // at REPLServer.Interface._ttyWrite (readline.js:826:14)
- * ```
- * @since v0.1.104
- */
- trace(message?: any, ...optionalParams: any[]): void;
- /**
- * The `console.warn()` function is an alias for {@link error}.
- * @since v0.1.100
- */
- warn(message?: any, ...optionalParams: any[]): void;
- // --- Inspector mode only ---
- /**
- * This method does not display anything unless used in the inspector.
- * Starts a JavaScript CPU profile with an optional label.
- */
- profile(label?: string): void;
- /**
- * This method does not display anything unless used in the inspector.
- * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
- */
- profileEnd(label?: string): void;
- /**
- * This method does not display anything unless used in the inspector.
- * Adds an event with the label `label` to the Timeline panel of the inspector.
- */
- timeStamp(label?: string): void;
- }
- /**
- * The `console` module provides a simple debugging console that is similar to the
- * JavaScript console mechanism provided by web browsers.
- *
- * The module exports two specific components:
- *
- * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
- * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
- *
- * _**Warning**_: The global console object's methods are neither consistently
- * synchronous like the browser APIs they resemble, nor are they consistently
- * asynchronous like all other Node.js streams. See the `note on process I/O` for
- * more information.
- *
- * Example using the global `console`:
- *
- * ```js
- * console.log('hello world');
- * // Prints: hello world, to stdout
- * console.log('hello %s', 'world');
- * // Prints: hello world, to stdout
- * console.error(new Error('Whoops, something bad happened'));
- * // Prints error message and stack trace to stderr:
- * // Error: Whoops, something bad happened
- * // at [eval]:5:15
- * // at Script.runInThisContext (node:vm:132:18)
- * // at Object.runInThisContext (node:vm:309:38)
- * // at node:internal/process/execution:77:19
- * // at [eval]-wrapper:6:22
- * // at evalScript (node:internal/process/execution:76:60)
- * // at node:internal/main/eval_string:23:3
- *
- * const name = 'Will Robinson';
- * console.warn(`Danger ${name}! Danger!`);
- * // Prints: Danger Will Robinson! Danger!, to stderr
- * ```
- *
- * Example using the `Console` class:
- *
- * ```js
- * const out = getStreamSomehow();
- * const err = getStreamSomehow();
- * const myConsole = new console.Console(out, err);
- *
- * myConsole.log('hello world');
- * // Prints: hello world, to out
- * myConsole.log('hello %s', 'world');
- * // Prints: hello world, to out
- * myConsole.error(new Error('Whoops, something bad happened'));
- * // Prints: [Error: Whoops, something bad happened], to err
- *
- * const name = 'Will Robinson';
- * myConsole.warn(`Danger ${name}! Danger!`);
- * // Prints: Danger Will Robinson! Danger!, to err
- * ```
- * @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/console.js)
- */
- namespace console {
- interface ConsoleConstructorOptions {
- stdout: NodeJS.WritableStream;
- stderr?: NodeJS.WritableStream | undefined;
- ignoreErrors?: boolean | undefined;
- colorMode?: boolean | 'auto' | undefined;
- inspectOptions?: InspectOptions | undefined;
- /**
- * Set group indentation
- * @default 2
- */
- groupIndentation?: number | undefined;
- }
- interface ConsoleConstructor {
- prototype: Console;
- new (stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
- new (options: ConsoleConstructorOptions): Console;
- }
- }
- var console: Console;
- }
- export = globalThis.console;
-}
diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts
deleted file mode 100755
index 208020d..0000000
--- a/node_modules/@types/node/constants.d.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
-declare module 'constants' {
- import { constants as osConstants, SignalConstants } from 'node:os';
- import { constants as cryptoConstants } from 'node:crypto';
- import { constants as fsConstants } from 'node:fs';
-
- const exp: typeof osConstants.errno &
- typeof osConstants.priority &
- SignalConstants &
- typeof cryptoConstants &
- typeof fsConstants;
- export = exp;
-}
-
-declare module 'node:constants' {
- import constants = require('constants');
- export = constants;
-}
diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts
deleted file mode 100755
index 4dff488..0000000
--- a/node_modules/@types/node/crypto.d.ts
+++ /dev/null
@@ -1,3307 +0,0 @@
-/**
- * The `crypto` module provides cryptographic functionality that includes a set of
- * wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions.
- *
- * ```js
- * const { createHmac } = await import('crypto');
- *
- * const secret = 'abcdefg';
- * const hash = createHmac('sha256', secret)
- * .update('I love cupcakes')
- * .digest('hex');
- * console.log(hash);
- * // Prints:
- * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
- * ```
- * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/crypto.js)
- */
-declare module 'crypto' {
- import * as stream from 'node:stream';
- import { PeerCertificate } from 'node:tls';
- interface Certificate {
- /**
- * @deprecated
- * @param spkac
- * @returns The challenge component of the `spkac` data structure,
- * which includes a public key and a challenge.
- */
- exportChallenge(spkac: BinaryLike): Buffer;
- /**
- * @deprecated
- * @param spkac
- * @param encoding The encoding of the spkac string.
- * @returns The public key component of the `spkac` data structure,
- * which includes a public key and a challenge.
- */
- exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
- /**
- * @deprecated
- * @param spkac
- * @returns `true` if the given `spkac` data structure is valid,
- * `false` otherwise.
- */
- verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
- }
- const Certificate: Certificate & {
- /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
- new (): Certificate;
- /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
- (): Certificate;
- /**
- * @param spkac
- * @returns The challenge component of the `spkac` data structure,
- * which includes a public key and a challenge.
- */
- exportChallenge(spkac: BinaryLike): Buffer;
- /**
- * @param spkac
- * @param encoding The encoding of the spkac string.
- * @returns The public key component of the `spkac` data structure,
- * which includes a public key and a challenge.
- */
- exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
- /**
- * @param spkac
- * @returns `true` if the given `spkac` data structure is valid,
- * `false` otherwise.
- */
- verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
- };
- namespace constants {
- // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
- const OPENSSL_VERSION_NUMBER: number;
- /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
- const SSL_OP_ALL: number;
- /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
- const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
- /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
- const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
- /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */
- const SSL_OP_CISCO_ANYCONNECT: number;
- /** Instructs OpenSSL to turn on cookie exchange. */
- const SSL_OP_COOKIE_EXCHANGE: number;
- /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
- const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
- /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
- const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
- /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */
- const SSL_OP_EPHEMERAL_RSA: number;
- /** Allows initial connection to servers that do not support RI. */
- const SSL_OP_LEGACY_SERVER_CONNECT: number;
- const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
- const SSL_OP_MICROSOFT_SESS_ID_BUG: number;
- /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */
- const SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
- const SSL_OP_NETSCAPE_CA_DN_BUG: number;
- const SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
- const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
- const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
- /** Instructs OpenSSL to disable support for SSL/TLS compression. */
- const SSL_OP_NO_COMPRESSION: number;
- const SSL_OP_NO_QUERY_MTU: number;
- /** Instructs OpenSSL to always start a new session when performing renegotiation. */
- const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
- const SSL_OP_NO_SSLv2: number;
- const SSL_OP_NO_SSLv3: number;
- const SSL_OP_NO_TICKET: number;
- const SSL_OP_NO_TLSv1: number;
- const SSL_OP_NO_TLSv1_1: number;
- const SSL_OP_NO_TLSv1_2: number;
- const SSL_OP_PKCS1_CHECK_1: number;
- const SSL_OP_PKCS1_CHECK_2: number;
- /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */
- const SSL_OP_SINGLE_DH_USE: number;
- /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */
- const SSL_OP_SINGLE_ECDH_USE: number;
- const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
- const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
- const SSL_OP_TLS_BLOCK_PADDING_BUG: number;
- const SSL_OP_TLS_D5_BUG: number;
- /** Instructs OpenSSL to disable version rollback attack detection. */
- const SSL_OP_TLS_ROLLBACK_BUG: number;
- const ENGINE_METHOD_RSA: number;
- const ENGINE_METHOD_DSA: number;
- const ENGINE_METHOD_DH: number;
- const ENGINE_METHOD_RAND: number;
- const ENGINE_METHOD_EC: number;
- const ENGINE_METHOD_CIPHERS: number;
- const ENGINE_METHOD_DIGESTS: number;
- const ENGINE_METHOD_PKEY_METHS: number;
- const ENGINE_METHOD_PKEY_ASN1_METHS: number;
- const ENGINE_METHOD_ALL: number;
- const ENGINE_METHOD_NONE: number;
- const DH_CHECK_P_NOT_SAFE_PRIME: number;
- const DH_CHECK_P_NOT_PRIME: number;
- const DH_UNABLE_TO_CHECK_GENERATOR: number;
- const DH_NOT_SUITABLE_GENERATOR: number;
- const ALPN_ENABLED: number;
- const RSA_PKCS1_PADDING: number;
- const RSA_SSLV23_PADDING: number;
- const RSA_NO_PADDING: number;
- const RSA_PKCS1_OAEP_PADDING: number;
- const RSA_X931_PADDING: number;
- const RSA_PKCS1_PSS_PADDING: number;
- /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
- const RSA_PSS_SALTLEN_DIGEST: number;
- /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
- const RSA_PSS_SALTLEN_MAX_SIGN: number;
- /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
- const RSA_PSS_SALTLEN_AUTO: number;
- const POINT_CONVERSION_COMPRESSED: number;
- const POINT_CONVERSION_UNCOMPRESSED: number;
- const POINT_CONVERSION_HYBRID: number;
- /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
- const defaultCoreCipherList: string;
- /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */
- const defaultCipherList: string;
- }
- interface HashOptions extends stream.TransformOptions {
- /**
- * For XOF hash functions such as `shake256`, the
- * outputLength option can be used to specify the desired output length in bytes.
- */
- outputLength?: number | undefined;
- }
- /** @deprecated since v10.0.0 */
- const fips: boolean;
- /**
- * Creates and returns a `Hash` object that can be used to generate hash digests
- * using the given `algorithm`. Optional `options` argument controls stream
- * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option
- * can be used to specify the desired output length in bytes.
- *
- * The `algorithm` is dependent on the available algorithms supported by the
- * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
- * On recent releases of OpenSSL, `openssl list -digest-algorithms`(`openssl list-message-digest-algorithms` for older versions of OpenSSL) will
- * display the available digest algorithms.
- *
- * Example: generating the sha256 sum of a file
- *
- * ```js
- * import {
- * createReadStream
- * } from 'fs';
- * import { argv } from 'process';
- * const {
- * createHash
- * } = await import('crypto');
- *
- * const filename = argv[2];
- *
- * const hash = createHash('sha256');
- *
- * const input = createReadStream(filename);
- * input.on('readable', () => {
- * // Only one element is going to be produced by the
- * // hash stream.
- * const data = input.read();
- * if (data)
- * hash.update(data);
- * else {
- * console.log(`${hash.digest('hex')} ${filename}`);
- * }
- * });
- * ```
- * @since v0.1.92
- * @param options `stream.transform` options
- */
- function createHash(algorithm: string, options?: HashOptions): Hash;
- /**
- * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`.
- * Optional `options` argument controls stream behavior.
- *
- * The `algorithm` is dependent on the available algorithms supported by the
- * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
- * On recent releases of OpenSSL, `openssl list -digest-algorithms`(`openssl list-message-digest-algorithms` for older versions of OpenSSL) will
- * display the available digest algorithms.
- *
- * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is
- * a `KeyObject`, its type must be `secret`.
- *
- * Example: generating the sha256 HMAC of a file
- *
- * ```js
- * import {
- * createReadStream
- * } from 'fs';
- * import { argv } from 'process';
- * const {
- * createHmac
- * } = await import('crypto');
- *
- * const filename = argv[2];
- *
- * const hmac = createHmac('sha256', 'a secret');
- *
- * const input = createReadStream(filename);
- * input.on('readable', () => {
- * // Only one element is going to be produced by the
- * // hash stream.
- * const data = input.read();
- * if (data)
- * hmac.update(data);
- * else {
- * console.log(`${hmac.digest('hex')} ${filename}`);
- * }
- * });
- * ```
- * @since v0.1.94
- * @param options `stream.transform` options
- */
- function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
- // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
- type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary';
- type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
- type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
- type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
- type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
- /**
- * The `Hash` class is a utility for creating hash digests of data. It can be
- * used in one of two ways:
- *
- * * As a `stream` that is both readable and writable, where data is written
- * to produce a computed hash digest on the readable side, or
- * * Using the `hash.update()` and `hash.digest()` methods to produce the
- * computed hash.
- *
- * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword.
- *
- * Example: Using `Hash` objects as streams:
- *
- * ```js
- * const {
- * createHash
- * } = await import('crypto');
- *
- * const hash = createHash('sha256');
- *
- * hash.on('readable', () => {
- * // Only one element is going to be produced by the
- * // hash stream.
- * const data = hash.read();
- * if (data) {
- * console.log(data.toString('hex'));
- * // Prints:
- * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
- * }
- * });
- *
- * hash.write('some data to hash');
- * hash.end();
- * ```
- *
- * Example: Using `Hash` and piped streams:
- *
- * ```js
- * import { createReadStream } from 'fs';
- * import { stdout } from 'process';
- * const { createHash } = await import('crypto');
- *
- * const hash = createHash('sha256');
- *
- * const input = createReadStream('test.js');
- * input.pipe(hash).setEncoding('hex').pipe(stdout);
- * ```
- *
- * Example: Using the `hash.update()` and `hash.digest()` methods:
- *
- * ```js
- * const {
- * createHash
- * } = await import('crypto');
- *
- * const hash = createHash('sha256');
- *
- * hash.update('some data to hash');
- * console.log(hash.digest('hex'));
- * // Prints:
- * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
- * ```
- * @since v0.1.92
- */
- class Hash extends stream.Transform {
- private constructor();
- /**
- * Creates a new `Hash` object that contains a deep copy of the internal state
- * of the current `Hash` object.
- *
- * The optional `options` argument controls stream behavior. For XOF hash
- * functions such as `'shake256'`, the `outputLength` option can be used to
- * specify the desired output length in bytes.
- *
- * An error is thrown when an attempt is made to copy the `Hash` object after
- * its `hash.digest()` method has been called.
- *
- * ```js
- * // Calculate a rolling hash.
- * const {
- * createHash
- * } = await import('crypto');
- *
- * const hash = createHash('sha256');
- *
- * hash.update('one');
- * console.log(hash.copy().digest('hex'));
- *
- * hash.update('two');
- * console.log(hash.copy().digest('hex'));
- *
- * hash.update('three');
- * console.log(hash.copy().digest('hex'));
- *
- * // Etc.
- * ```
- * @since v13.1.0
- * @param options `stream.transform` options
- */
- copy(options?: stream.TransformOptions): Hash;
- /**
- * Updates the hash content with the given `data`, the encoding of which
- * is given in `inputEncoding`.
- * If `encoding` is not provided, and the `data` is a string, an
- * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
- *
- * This can be called many times with new data as it is streamed.
- * @since v0.1.92
- * @param inputEncoding The `encoding` of the `data` string.
- */
- update(data: BinaryLike): Hash;
- update(data: string, inputEncoding: Encoding): Hash;
- /**
- * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method).
- * If `encoding` is provided a string will be returned; otherwise
- * a `Buffer` is returned.
- *
- * The `Hash` object can not be used again after `hash.digest()` method has been
- * called. Multiple calls will cause an error to be thrown.
- * @since v0.1.92
- * @param encoding The `encoding` of the return value.
- */
- digest(): Buffer;
- digest(encoding: BinaryToTextEncoding): string;
- }
- /**
- * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can
- * be used in one of two ways:
- *
- * * As a `stream` that is both readable and writable, where data is written
- * to produce a computed HMAC digest on the readable side, or
- * * Using the `hmac.update()` and `hmac.digest()` methods to produce the
- * computed HMAC digest.
- *
- * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword.
- *
- * Example: Using `Hmac` objects as streams:
- *
- * ```js
- * const {
- * createHmac
- * } = await import('crypto');
- *
- * const hmac = createHmac('sha256', 'a secret');
- *
- * hmac.on('readable', () => {
- * // Only one element is going to be produced by the
- * // hash stream.
- * const data = hmac.read();
- * if (data) {
- * console.log(data.toString('hex'));
- * // Prints:
- * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
- * }
- * });
- *
- * hmac.write('some data to hash');
- * hmac.end();
- * ```
- *
- * Example: Using `Hmac` and piped streams:
- *
- * ```js
- * import { createReadStream } from 'fs';
- * import { stdout } from 'process';
- * const {
- * createHmac
- * } = await import('crypto');
- *
- * const hmac = createHmac('sha256', 'a secret');
- *
- * const input = createReadStream('test.js');
- * input.pipe(hmac).pipe(stdout);
- * ```
- *
- * Example: Using the `hmac.update()` and `hmac.digest()` methods:
- *
- * ```js
- * const {
- * createHmac
- * } = await import('crypto');
- *
- * const hmac = createHmac('sha256', 'a secret');
- *
- * hmac.update('some data to hash');
- * console.log(hmac.digest('hex'));
- * // Prints:
- * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
- * ```
- * @since v0.1.94
- */
- class Hmac extends stream.Transform {
- private constructor();
- /**
- * Updates the `Hmac` content with the given `data`, the encoding of which
- * is given in `inputEncoding`.
- * If `encoding` is not provided, and the `data` is a string, an
- * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
- *
- * This can be called many times with new data as it is streamed.
- * @since v0.1.94
- * @param inputEncoding The `encoding` of the `data` string.
- */
- update(data: BinaryLike): Hmac;
- update(data: string, inputEncoding: Encoding): Hmac;
- /**
- * Calculates the HMAC digest of all of the data passed using `hmac.update()`.
- * If `encoding` is
- * provided a string is returned; otherwise a `Buffer` is returned;
- *
- * The `Hmac` object can not be used again after `hmac.digest()` has been
- * called. Multiple calls to `hmac.digest()` will result in an error being thrown.
- * @since v0.1.94
- * @param encoding The `encoding` of the return value.
- */
- digest(): Buffer;
- digest(encoding: BinaryToTextEncoding): string;
- }
- type KeyObjectType = 'secret' | 'public' | 'private';
- interface KeyExportOptions {
- type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
- format: T;
- cipher?: string | undefined;
- passphrase?: string | Buffer | undefined;
- }
- interface JwkKeyExportOptions {
- format: 'jwk';
- }
- interface JsonWebKey {
- crv?: string | undefined;
- d?: string | undefined;
- dp?: string | undefined;
- dq?: string | undefined;
- e?: string | undefined;
- k?: string | undefined;
- kty?: string | undefined;
- n?: string | undefined;
- p?: string | undefined;
- q?: string | undefined;
- qi?: string | undefined;
- x?: string | undefined;
- y?: string | undefined;
- [key: string]: unknown;
- }
- interface AsymmetricKeyDetails {
- /**
- * Key size in bits (RSA, DSA).
- */
- modulusLength?: number | undefined;
- /**
- * Public exponent (RSA).
- */
- publicExponent?: bigint | undefined;
- /**
- * Name of the message digest (RSA-PSS).
- */
- hashAlgorithm?: string | undefined;
- /**
- * Name of the message digest used by MGF1 (RSA-PSS).
- */
- mgf1HashAlgorithm?: string | undefined;
- /**
- * Minimal salt length in bytes (RSA-PSS).
- */
- saltLength?: number | undefined;
- /**
- * Size of q in bits (DSA).
- */
- divisorLength?: number | undefined;
- /**
- * Name of the curve (EC).
- */
- namedCurve?: string | undefined;
- }
- interface JwkKeyExportOptions {
- format: 'jwk';
- }
- /**
- * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key,
- * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject`
- * objects are not to be created directly using the `new`keyword.
- *
- * Most applications should consider using the new `KeyObject` API instead of
- * passing keys as strings or `Buffer`s due to improved security features.
- *
- * `KeyObject` instances can be passed to other threads via `postMessage()`.
- * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to
- * be listed in the `transferList` argument.
- * @since v11.6.0
- */
- class KeyObject {
- private constructor();
- /**
- * Example: Converting a `CryptoKey` instance to a `KeyObject`:
- *
- * ```js
- * const { webcrypto, KeyObject } = await import('crypto');
- * const { subtle } = webcrypto;
- *
- * const key = await subtle.generateKey({
- * name: 'HMAC',
- * hash: 'SHA-256',
- * length: 256
- * }, true, ['sign', 'verify']);
- *
- * const keyObject = KeyObject.from(key);
- * console.log(keyObject.symmetricKeySize);
- * // Prints: 32 (symmetric key size in bytes)
- * ```
- * @since v15.0.0
- */
- static from(key: webcrypto.CryptoKey): KeyObject;
- /**
- * For asymmetric keys, this property represents the type of the key. Supported key
- * types are:
- *
- * * `'rsa'` (OID 1.2.840.113549.1.1.1)
- * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10)
- * * `'dsa'` (OID 1.2.840.10040.4.1)
- * * `'ec'` (OID 1.2.840.10045.2.1)
- * * `'x25519'` (OID 1.3.101.110)
- * * `'x448'` (OID 1.3.101.111)
- * * `'ed25519'` (OID 1.3.101.112)
- * * `'ed448'` (OID 1.3.101.113)
- * * `'dh'` (OID 1.2.840.113549.1.3.1)
- *
- * This property is `undefined` for unrecognized `KeyObject` types and symmetric
- * keys.
- * @since v11.6.0
- */
- asymmetricKeyType?: KeyType | undefined;
- /**
- * For asymmetric keys, this property represents the size of the embedded key in
- * bytes. This property is `undefined` for symmetric keys.
- */
- asymmetricKeySize?: number | undefined;
- /**
- * This property exists only on asymmetric keys. Depending on the type of the key,
- * this object contains information about the key. None of the information obtained
- * through this property can be used to uniquely identify a key or to compromise
- * the security of the key.
- *
- * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence,
- * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be
- * set.
- *
- * Other key details might be exposed via this API using additional attributes.
- * @since v15.7.0
- */
- asymmetricKeyDetails?: AsymmetricKeyDetails | undefined;
- /**
- * For symmetric keys, the following encoding options can be used:
- *
- * For public keys, the following encoding options can be used:
- *
- * For private keys, the following encoding options can be used:
- *
- * The result type depends on the selected encoding format, when PEM the
- * result is a string, when DER it will be a buffer containing the data
- * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object.
- *
- * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are
- * ignored.
- *
- * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of
- * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be
- * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for
- * encrypted private keys. Since PKCS#8 defines its own
- * encryption mechanism, PEM-level encryption is not supported when encrypting
- * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for
- * PKCS#1 and SEC1 encryption.
- * @since v11.6.0
- */
- export(options: KeyExportOptions<'pem'>): string | Buffer;
- export(options?: KeyExportOptions<'der'>): Buffer;
- export(options?: JwkKeyExportOptions): JsonWebKey;
- /**
- * For secret keys, this property represents the size of the key in bytes. This
- * property is `undefined` for asymmetric keys.
- * @since v11.6.0
- */
- symmetricKeySize?: number | undefined;
- /**
- * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys
- * or `'private'` for private (asymmetric) keys.
- * @since v11.6.0
- */
- type: KeyObjectType;
- }
- type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
- type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
- type BinaryLike = string | NodeJS.ArrayBufferView;
- type CipherKey = BinaryLike | KeyObject;
- interface CipherCCMOptions extends stream.TransformOptions {
- authTagLength: number;
- }
- interface CipherGCMOptions extends stream.TransformOptions {
- authTagLength?: number | undefined;
- }
- /**
- * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
- *
- * The `options` argument controls stream behavior and is optional except when a
- * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
- * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
- * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
- *
- * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
- * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
- * display the available cipher algorithms.
- *
- * The `password` is used to derive the cipher key and initialization vector (IV).
- * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`.
- *
- * The implementation of `crypto.createCipher()` derives keys using the OpenSSL
- * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
- * iteration, and no salt. The lack of salt allows dictionary attacks as the same
- * password always creates the same key. The low iteration count and
- * non-cryptographically secure hash algorithm allow passwords to be tested very
- * rapidly.
- *
- * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
- * developers derive a key and IV on
- * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode
- * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when
- * they are used in order to avoid the risk of IV reuse that causes
- * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details.
- * @since v0.1.94
- * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead.
- * @param options `stream.transform` options
- */
- function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
- /** @deprecated since v10.0.0 use `createCipheriv()` */
- function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
- /** @deprecated since v10.0.0 use `createCipheriv()` */
- function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
- /**
- * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
- * initialization vector (`iv`).
- *
- * The `options` argument controls stream behavior and is optional except when a
- * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
- * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
- * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
- *
- * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
- * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
- * display the available cipher algorithms.
- *
- * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
- * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
- * a `KeyObject` of type `secret`. If the cipher does not need
- * an initialization vector, `iv` may be `null`.
- *
- * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
- *
- * Initialization vectors should be unpredictable and unique; ideally, they will be
- * cryptographically random. They do not have to be secret: IVs are typically just
- * added to ciphertext messages unencrypted. It may sound contradictory that
- * something has to be unpredictable and unique, but does not have to be secret;
- * remember that an attacker must not be able to predict ahead of time what a
- * given IV will be.
- * @since v0.1.94
- * @param options `stream.transform` options
- */
- function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike | null, options: CipherCCMOptions): CipherCCM;
- function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): CipherGCM;
- function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher;
- /**
- * Instances of the `Cipher` class are used to encrypt data. The class can be
- * used in one of two ways:
- *
- * * As a `stream` that is both readable and writable, where plain unencrypted
- * data is written to produce encrypted data on the readable side, or
- * * Using the `cipher.update()` and `cipher.final()` methods to produce
- * the encrypted data.
- *
- * The {@link createCipher} or {@link createCipheriv} methods are
- * used to create `Cipher` instances. `Cipher` objects are not to be created
- * directly using the `new` keyword.
- *
- * Example: Using `Cipher` objects as streams:
- *
- * ```js
- * const {
- * scrypt,
- * randomFill,
- * createCipheriv
- * } = await import('crypto');
- *
- * const algorithm = 'aes-192-cbc';
- * const password = 'Password used to generate key';
- *
- * // First, we'll generate the key. The key length is dependent on the algorithm.
- * // In this case for aes192, it is 24 bytes (192 bits).
- * scrypt(password, 'salt', 24, (err, key) => {
- * if (err) throw err;
- * // Then, we'll generate a random initialization vector
- * randomFill(new Uint8Array(16), (err, iv) => {
- * if (err) throw err;
- *
- * // Once we have the key and iv, we can create and use the cipher...
- * const cipher = createCipheriv(algorithm, key, iv);
- *
- * let encrypted = '';
- * cipher.setEncoding('hex');
- *
- * cipher.on('data', (chunk) => encrypted += chunk);
- * cipher.on('end', () => console.log(encrypted));
- *
- * cipher.write('some clear text data');
- * cipher.end();
- * });
- * });
- * ```
- *
- * Example: Using `Cipher` and piped streams:
- *
- * ```js
- * import {
- * createReadStream,
- * createWriteStream,
- * } from 'fs';
- *
- * import {
- * pipeline
- * } from 'stream';
- *
- * const {
- * scrypt,
- * randomFill,
- * createCipheriv
- * } = await import('crypto');
- *
- * const algorithm = 'aes-192-cbc';
- * const password = 'Password used to generate key';
- *
- * // First, we'll generate the key. The key length is dependent on the algorithm.
- * // In this case for aes192, it is 24 bytes (192 bits).
- * scrypt(password, 'salt', 24, (err, key) => {
- * if (err) throw err;
- * // Then, we'll generate a random initialization vector
- * randomFill(new Uint8Array(16), (err, iv) => {
- * if (err) throw err;
- *
- * const cipher = createCipheriv(algorithm, key, iv);
- *
- * const input = createReadStream('test.js');
- * const output = createWriteStream('test.enc');
- *
- * pipeline(input, cipher, output, (err) => {
- * if (err) throw err;
- * });
- * });
- * });
- * ```
- *
- * Example: Using the `cipher.update()` and `cipher.final()` methods:
- *
- * ```js
- * const {
- * scrypt,
- * randomFill,
- * createCipheriv
- * } = await import('crypto');
- *
- * const algorithm = 'aes-192-cbc';
- * const password = 'Password used to generate key';
- *
- * // First, we'll generate the key. The key length is dependent on the algorithm.
- * // In this case for aes192, it is 24 bytes (192 bits).
- * scrypt(password, 'salt', 24, (err, key) => {
- * if (err) throw err;
- * // Then, we'll generate a random initialization vector
- * randomFill(new Uint8Array(16), (err, iv) => {
- * if (err) throw err;
- *
- * const cipher = createCipheriv(algorithm, key, iv);
- *
- * let encrypted = cipher.update('some clear text data', 'utf8', 'hex');
- * encrypted += cipher.final('hex');
- * console.log(encrypted);
- * });
- * });
- * ```
- * @since v0.1.94
- */
- class Cipher extends stream.Transform {
- private constructor();
- /**
- * Updates the cipher with `data`. If the `inputEncoding` argument is given,
- * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`,
- * `TypedArray`, or `DataView`, then`inputEncoding` is ignored.
- *
- * The `outputEncoding` specifies the output format of the enciphered
- * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
- *
- * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being
- * thrown.
- * @since v0.1.94
- * @param inputEncoding The `encoding` of the data.
- * @param outputEncoding The `encoding` of the return value.
- */
- update(data: BinaryLike): Buffer;
- update(data: string, inputEncoding: Encoding): Buffer;
- update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
- update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
- /**
- * Once the `cipher.final()` method has been called, the `Cipher` object can no
- * longer be used to encrypt data. Attempts to call `cipher.final()` more than
- * once will result in an error being thrown.
- * @since v0.1.94
- * @param outputEncoding The `encoding` of the return value.
- * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
- */
- final(): Buffer;
- final(outputEncoding: BufferEncoding): string;
- /**
- * When using block encryption algorithms, the `Cipher` class will automatically
- * add padding to the input data to the appropriate block size. To disable the
- * default padding call `cipher.setAutoPadding(false)`.
- *
- * When `autoPadding` is `false`, the length of the entire input data must be a
- * multiple of the cipher's block size or `cipher.final()` will throw an error.
- * Disabling automatic padding is useful for non-standard padding, for instance
- * using `0x0` instead of PKCS padding.
- *
- * The `cipher.setAutoPadding()` method must be called before `cipher.final()`.
- * @since v0.7.1
- * @param [autoPadding=true]
- * @return for method chaining.
- */
- setAutoPadding(autoPadding?: boolean): this;
- }
- interface CipherCCM extends Cipher {
- setAAD(
- buffer: NodeJS.ArrayBufferView,
- options: {
- plaintextLength: number;
- }
- ): this;
- getAuthTag(): Buffer;
- }
- interface CipherGCM extends Cipher {
- setAAD(
- buffer: NodeJS.ArrayBufferView,
- options?: {
- plaintextLength: number;
- }
- ): this;
- getAuthTag(): Buffer;
- }
- /**
- * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
- *
- * The `options` argument controls stream behavior and is optional except when a
- * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
- * authentication tag in bytes, see `CCM mode`.
- *
- * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL
- * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
- * iteration, and no salt. The lack of salt allows dictionary attacks as the same
- * password always creates the same key. The low iteration count and
- * non-cryptographically secure hash algorithm allow passwords to be tested very
- * rapidly.
- *
- * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
- * developers derive a key and IV on
- * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object.
- * @since v0.1.94
- * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead.
- * @param options `stream.transform` options
- */
- function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
- /** @deprecated since v10.0.0 use `createDecipheriv()` */
- function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
- /** @deprecated since v10.0.0 use `createDecipheriv()` */
- function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
- /**
- * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`).
- *
- * The `options` argument controls stream behavior and is optional except when a
- * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
- * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags
- * to those with the specified length.
- *
- * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
- * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
- * display the available cipher algorithms.
- *
- * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
- * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
- * a `KeyObject` of type `secret`. If the cipher does not need
- * an initialization vector, `iv` may be `null`.
- *
- * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
- *
- * Initialization vectors should be unpredictable and unique; ideally, they will be
- * cryptographically random. They do not have to be secret: IVs are typically just
- * added to ciphertext messages unencrypted. It may sound contradictory that
- * something has to be unpredictable and unique, but does not have to be secret;
- * remember that an attacker must not be able to predict ahead of time what a given
- * IV will be.
- * @since v0.1.94
- * @param options `stream.transform` options
- */
- function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike | null, options: CipherCCMOptions): DecipherCCM;
- function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): DecipherGCM;
- function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
- /**
- * Instances of the `Decipher` class are used to decrypt data. The class can be
- * used in one of two ways:
- *
- * * As a `stream` that is both readable and writable, where plain encrypted
- * data is written to produce unencrypted data on the readable side, or
- * * Using the `decipher.update()` and `decipher.final()` methods to
- * produce the unencrypted data.
- *
- * The {@link createDecipher} or {@link createDecipheriv} methods are
- * used to create `Decipher` instances. `Decipher` objects are not to be created
- * directly using the `new` keyword.
- *
- * Example: Using `Decipher` objects as streams:
- *
- * ```js
- * import { Buffer } from 'buffer';
- * const {
- * scryptSync,
- * createDecipheriv
- * } = await import('crypto');
- *
- * const algorithm = 'aes-192-cbc';
- * const password = 'Password used to generate key';
- * // Key length is dependent on the algorithm. In this case for aes192, it is
- * // 24 bytes (192 bits).
- * // Use the async `crypto.scrypt()` instead.
- * const key = scryptSync(password, 'salt', 24);
- * // The IV is usually passed along with the ciphertext.
- * const iv = Buffer.alloc(16, 0); // Initialization vector.
- *
- * const decipher = createDecipheriv(algorithm, key, iv);
- *
- * let decrypted = '';
- * decipher.on('readable', () => {
- * while (null !== (chunk = decipher.read())) {
- * decrypted += chunk.toString('utf8');
- * }
- * });
- * decipher.on('end', () => {
- * console.log(decrypted);
- * // Prints: some clear text data
- * });
- *
- * // Encrypted with same algorithm, key and iv.
- * const encrypted =
- * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
- * decipher.write(encrypted, 'hex');
- * decipher.end();
- * ```
- *
- * Example: Using `Decipher` and piped streams:
- *
- * ```js
- * import {
- * createReadStream,
- * createWriteStream,
- * } from 'fs';
- * import { Buffer } from 'buffer';
- * const {
- * scryptSync,
- * createDecipheriv
- * } = await import('crypto');
- *
- * const algorithm = 'aes-192-cbc';
- * const password = 'Password used to generate key';
- * // Use the async `crypto.scrypt()` instead.
- * const key = scryptSync(password, 'salt', 24);
- * // The IV is usually passed along with the ciphertext.
- * const iv = Buffer.alloc(16, 0); // Initialization vector.
- *
- * const decipher = createDecipheriv(algorithm, key, iv);
- *
- * const input = createReadStream('test.enc');
- * const output = createWriteStream('test.js');
- *
- * input.pipe(decipher).pipe(output);
- * ```
- *
- * Example: Using the `decipher.update()` and `decipher.final()` methods:
- *
- * ```js
- * import { Buffer } from 'buffer';
- * const {
- * scryptSync,
- * createDecipheriv
- * } = await import('crypto');
- *
- * const algorithm = 'aes-192-cbc';
- * const password = 'Password used to generate key';
- * // Use the async `crypto.scrypt()` instead.
- * const key = scryptSync(password, 'salt', 24);
- * // The IV is usually passed along with the ciphertext.
- * const iv = Buffer.alloc(16, 0); // Initialization vector.
- *
- * const decipher = createDecipheriv(algorithm, key, iv);
- *
- * // Encrypted using same algorithm, key and iv.
- * const encrypted =
- * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
- * let decrypted = decipher.update(encrypted, 'hex', 'utf8');
- * decrypted += decipher.final('utf8');
- * console.log(decrypted);
- * // Prints: some clear text data
- * ```
- * @since v0.1.94
- */
- class Decipher extends stream.Transform {
- private constructor();
- /**
- * Updates the decipher with `data`. If the `inputEncoding` argument is given,
- * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
- * ignored.
- *
- * The `outputEncoding` specifies the output format of the enciphered
- * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
- *
- * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error
- * being thrown.
- * @since v0.1.94
- * @param inputEncoding The `encoding` of the `data` string.
- * @param outputEncoding The `encoding` of the return value.
- */
- update(data: NodeJS.ArrayBufferView): Buffer;
- update(data: string, inputEncoding: Encoding): Buffer;
- update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
- update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
- /**
- * Once the `decipher.final()` method has been called, the `Decipher` object can
- * no longer be used to decrypt data. Attempts to call `decipher.final()` more
- * than once will result in an error being thrown.
- * @since v0.1.94
- * @param outputEncoding The `encoding` of the return value.
- * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
- */
- final(): Buffer;
- final(outputEncoding: BufferEncoding): string;
- /**
- * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
- * removing padding.
- *
- * Turning auto padding off will only work if the input data's length is a
- * multiple of the ciphers block size.
- *
- * The `decipher.setAutoPadding()` method must be called before `decipher.final()`.
- * @since v0.7.1
- * @param [autoPadding=true]
- * @return for method chaining.
- */
- setAutoPadding(auto_padding?: boolean): this;
- }
- interface DecipherCCM extends Decipher {
- setAuthTag(buffer: NodeJS.ArrayBufferView): this;
- setAAD(
- buffer: NodeJS.ArrayBufferView,
- options: {
- plaintextLength: number;
- }
- ): this;
- }
- interface DecipherGCM extends Decipher {
- setAuthTag(buffer: NodeJS.ArrayBufferView): this;
- setAAD(
- buffer: NodeJS.ArrayBufferView,
- options?: {
- plaintextLength: number;
- }
- ): this;
- }
- interface PrivateKeyInput {
- key: string | Buffer;
- format?: KeyFormat | undefined;
- type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
- passphrase?: string | Buffer | undefined;
- }
- interface PublicKeyInput {
- key: string | Buffer;
- format?: KeyFormat | undefined;
- type?: 'pkcs1' | 'spki' | undefined;
- }
- /**
- * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
- *
- * ```js
- * const {
- * generateKey
- * } = await import('crypto');
- *
- * generateKey('hmac', { length: 64 }, (err, key) => {
- * if (err) throw err;
- * console.log(key.export().toString('hex')); // 46e..........620
- * });
- * ```
- * @since v15.0.0
- * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
- */
- function generateKey(
- type: 'hmac' | 'aes',
- options: {
- length: number;
- },
- callback: (err: Error | null, key: KeyObject) => void
- ): void;
- /**
- * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
- *
- * ```js
- * const {
- * generateKeySync
- * } = await import('crypto');
- *
- * const key = generateKeySync('hmac', { length: 64 });
- * console.log(key.export().toString('hex')); // e89..........41e
- * ```
- * @since v15.0.0
- * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
- */
- function generateKeySync(
- type: 'hmac' | 'aes',
- options: {
- length: number;
- }
- ): KeyObject;
- interface JsonWebKeyInput {
- key: JsonWebKey;
- format: 'jwk';
- }
- /**
- * Creates and returns a new key object containing a private key. If `key` is a
- * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above.
- *
- * If the private key is encrypted, a `passphrase` must be specified. The length
- * of the passphrase is limited to 1024 bytes.
- * @since v11.6.0
- */
- function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject;
- /**
- * Creates and returns a new key object containing a public key. If `key` is a
- * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key;
- * otherwise, `key` must be an object with the properties described above.
- *
- * If the format is `'pem'`, the `'key'` may also be an X.509 certificate.
- *
- * Because public keys can be derived from private keys, a private key may be
- * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the
- * returned `KeyObject` will be `'public'` and that the private key cannot be
- * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned
- * and it will be impossible to extract the private key from the returned object.
- * @since v11.6.0
- */
- function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject;
- /**
- * Creates and returns a new key object containing a secret key for symmetric
- * encryption or `Hmac`.
- * @since v11.6.0
- * @param encoding The string encoding when `key` is a string.
- */
- function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
- function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
- /**
- * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms.
- * Optional `options` argument controls the `stream.Writable` behavior.
- *
- * In some cases, a `Sign` instance can be created using the name of a signature
- * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
- * the corresponding digest algorithm. This does not work for all signature
- * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
- * algorithm names.
- * @since v0.1.92
- * @param options `stream.Writable` options
- */
- function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
- type DSAEncoding = 'der' | 'ieee-p1363';
- interface SigningOptions {
- /**
- * @See crypto.constants.RSA_PKCS1_PADDING
- */
- padding?: number | undefined;
- saltLength?: number | undefined;
- dsaEncoding?: DSAEncoding | undefined;
- }
- interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
- interface SignKeyObjectInput extends SigningOptions {
- key: KeyObject;
- }
- interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
- interface VerifyKeyObjectInput extends SigningOptions {
- key: KeyObject;
- }
- type KeyLike = string | Buffer | KeyObject;
- /**
- * The `Sign` class is a utility for generating signatures. It can be used in one
- * of two ways:
- *
- * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or
- * * Using the `sign.update()` and `sign.sign()` methods to produce the
- * signature.
- *
- * The {@link createSign} method is used to create `Sign` instances. The
- * argument is the string name of the hash function to use. `Sign` objects are not
- * to be created directly using the `new` keyword.
- *
- * Example: Using `Sign` and `Verify` objects as streams:
- *
- * ```js
- * const {
- * generateKeyPairSync,
- * createSign,
- * createVerify
- * } = await import('crypto');
- *
- * const { privateKey, publicKey } = generateKeyPairSync('ec', {
- * namedCurve: 'sect239k1'
- * });
- *
- * const sign = createSign('SHA256');
- * sign.write('some data to sign');
- * sign.end();
- * const signature = sign.sign(privateKey, 'hex');
- *
- * const verify = createVerify('SHA256');
- * verify.write('some data to sign');
- * verify.end();
- * console.log(verify.verify(publicKey, signature, 'hex'));
- * // Prints: true
- * ```
- *
- * Example: Using the `sign.update()` and `verify.update()` methods:
- *
- * ```js
- * const {
- * generateKeyPairSync,
- * createSign,
- * createVerify
- * } = await import('crypto');
- *
- * const { privateKey, publicKey } = generateKeyPairSync('rsa', {
- * modulusLength: 2048,
- * });
- *
- * const sign = createSign('SHA256');
- * sign.update('some data to sign');
- * sign.end();
- * const signature = sign.sign(privateKey);
- *
- * const verify = createVerify('SHA256');
- * verify.update('some data to sign');
- * verify.end();
- * console.log(verify.verify(publicKey, signature));
- * // Prints: true
- * ```
- * @since v0.1.92
- */
- class Sign extends stream.Writable {
- private constructor();
- /**
- * Updates the `Sign` content with the given `data`, the encoding of which
- * is given in `inputEncoding`.
- * If `encoding` is not provided, and the `data` is a string, an
- * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
- *
- * This can be called many times with new data as it is streamed.
- * @since v0.1.92
- * @param inputEncoding The `encoding` of the `data` string.
- */
- update(data: BinaryLike): this;
- update(data: string, inputEncoding: Encoding): this;
- /**
- * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
- *
- * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
- * object, the following additional properties can be passed:
- *
- * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned.
- *
- * The `Sign` object can not be again used after `sign.sign()` method has been
- * called. Multiple calls to `sign.sign()` will result in an error being thrown.
- * @since v0.1.92
- */
- sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
- sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string;
- }
- /**
- * Creates and returns a `Verify` object that uses the given algorithm.
- * Use {@link getHashes} to obtain an array of names of the available
- * signing algorithms. Optional `options` argument controls the`stream.Writable` behavior.
- *
- * In some cases, a `Verify` instance can be created using the name of a signature
- * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
- * the corresponding digest algorithm. This does not work for all signature
- * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
- * algorithm names.
- * @since v0.1.92
- * @param options `stream.Writable` options
- */
- function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
- /**
- * The `Verify` class is a utility for verifying signatures. It can be used in one
- * of two ways:
- *
- * * As a writable `stream` where written data is used to validate against the
- * supplied signature, or
- * * Using the `verify.update()` and `verify.verify()` methods to verify
- * the signature.
- *
- * The {@link createVerify} method is used to create `Verify` instances.`Verify` objects are not to be created directly using the `new` keyword.
- *
- * See `Sign` for examples.
- * @since v0.1.92
- */
- class Verify extends stream.Writable {
- private constructor();
- /**
- * Updates the `Verify` content with the given `data`, the encoding of which
- * is given in `inputEncoding`.
- * If `inputEncoding` is not provided, and the `data` is a string, an
- * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
- *
- * This can be called many times with new data as it is streamed.
- * @since v0.1.92
- * @param inputEncoding The `encoding` of the `data` string.
- */
- update(data: BinaryLike): Verify;
- update(data: string, inputEncoding: Encoding): Verify;
- /**
- * Verifies the provided data using the given `object` and `signature`.
- *
- * If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an
- * object, the following additional properties can be passed:
- *
- * The `signature` argument is the previously calculated signature for the data, in
- * the `signatureEncoding`.
- * If a `signatureEncoding` is specified, the `signature` is expected to be a
- * string; otherwise `signature` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
- *
- * The `verify` object can not be used again after `verify.verify()` has been
- * called. Multiple calls to `verify.verify()` will result in an error being
- * thrown.
- *
- * Because public keys can be derived from private keys, a private key may
- * be passed instead of a public key.
- * @since v0.1.92
- */
- verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
- verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
- }
- /**
- * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
- * optional specific `generator`.
- *
- * The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used.
- *
- * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise
- * a `Buffer`, `TypedArray`, or `DataView` is expected.
- *
- * If `generatorEncoding` is specified, `generator` is expected to be a string;
- * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected.
- * @since v0.11.12
- * @param primeEncoding The `encoding` of the `prime` string.
- * @param [generator=2]
- * @param generatorEncoding The `encoding` of the `generator` string.
- */
- function createDiffieHellman(primeLength: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
- function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
- function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding): DiffieHellman;
- function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman;
- function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
- /**
- * The `DiffieHellman` class is a utility for creating Diffie-Hellman key
- * exchanges.
- *
- * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function.
- *
- * ```js
- * import assert from 'assert';
- *
- * const {
- * createDiffieHellman
- * } = await import('crypto');
- *
- * // Generate Alice's keys...
- * const alice = createDiffieHellman(2048);
- * const aliceKey = alice.generateKeys();
- *
- * // Generate Bob's keys...
- * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator());
- * const bobKey = bob.generateKeys();
- *
- * // Exchange and generate the secret...
- * const aliceSecret = alice.computeSecret(bobKey);
- * const bobSecret = bob.computeSecret(aliceKey);
- *
- * // OK
- * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
- * ```
- * @since v0.5.0
- */
- class DiffieHellman {
- private constructor();
- /**
- * Generates private and public Diffie-Hellman key values, and returns
- * the public key in the specified `encoding`. This key should be
- * transferred to the other party.
- * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
- * @since v0.5.0
- * @param encoding The `encoding` of the return value.
- */
- generateKeys(): Buffer;
- generateKeys(encoding: BinaryToTextEncoding): string;
- /**
- * Computes the shared secret using `otherPublicKey` as the other
- * party's public key and returns the computed shared secret. The supplied
- * key is interpreted using the specified `inputEncoding`, and secret is
- * encoded using specified `outputEncoding`.
- * If the `inputEncoding` is not
- * provided, `otherPublicKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
- *
- * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned.
- * @since v0.5.0
- * @param inputEncoding The `encoding` of an `otherPublicKey` string.
- * @param outputEncoding The `encoding` of the return value.
- */
- computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
- computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
- computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
- computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
- /**
- * Returns the Diffie-Hellman prime in the specified `encoding`.
- * If `encoding` is provided a string is
- * returned; otherwise a `Buffer` is returned.
- * @since v0.5.0
- * @param encoding The `encoding` of the return value.
- */
- getPrime(): Buffer;
- getPrime(encoding: BinaryToTextEncoding): string;
- /**
- * Returns the Diffie-Hellman generator in the specified `encoding`.
- * If `encoding` is provided a string is
- * returned; otherwise a `Buffer` is returned.
- * @since v0.5.0
- * @param encoding The `encoding` of the return value.
- */
- getGenerator(): Buffer;
- getGenerator(encoding: BinaryToTextEncoding): string;
- /**
- * Returns the Diffie-Hellman public key in the specified `encoding`.
- * If `encoding` is provided a
- * string is returned; otherwise a `Buffer` is returned.
- * @since v0.5.0
- * @param encoding The `encoding` of the return value.
- */
- getPublicKey(): Buffer;
- getPublicKey(encoding: BinaryToTextEncoding): string;
- /**
- * Returns the Diffie-Hellman private key in the specified `encoding`.
- * If `encoding` is provided a
- * string is returned; otherwise a `Buffer` is returned.
- * @since v0.5.0
- * @param encoding The `encoding` of the return value.
- */
- getPrivateKey(): Buffer;
- getPrivateKey(encoding: BinaryToTextEncoding): string;
- /**
- * Sets the Diffie-Hellman public key. If the `encoding` argument is provided,`publicKey` is expected
- * to be a string. If no `encoding` is provided, `publicKey` is expected
- * to be a `Buffer`, `TypedArray`, or `DataView`.
- * @since v0.5.0
- * @param encoding The `encoding` of the `publicKey` string.
- */
- setPublicKey(publicKey: NodeJS.ArrayBufferView): void;
- setPublicKey(publicKey: string, encoding: BufferEncoding): void;
- /**
- * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
- * to be a string. If no `encoding` is provided, `privateKey` is expected
- * to be a `Buffer`, `TypedArray`, or `DataView`.
- * @since v0.5.0
- * @param encoding The `encoding` of the `privateKey` string.
- */
- setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
- setPrivateKey(privateKey: string, encoding: BufferEncoding): void;
- /**
- * A bit field containing any warnings and/or errors resulting from a check
- * performed during initialization of the `DiffieHellman` object.
- *
- * The following values are valid for this property (as defined in `constants`module):
- *
- * * `DH_CHECK_P_NOT_SAFE_PRIME`
- * * `DH_CHECK_P_NOT_PRIME`
- * * `DH_UNABLE_TO_CHECK_GENERATOR`
- * * `DH_NOT_SUITABLE_GENERATOR`
- * @since v0.11.12
- */
- verifyError: number;
- }
- /**
- * Creates a predefined `DiffieHellmanGroup` key exchange object. The
- * supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt), but see `Caveats`) and `'modp14'`, `'modp15'`,`'modp16'`, `'modp17'`,
- * `'modp18'` (defined in [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt)). The
- * returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
- * the keys (with `diffieHellman.setPublicKey()`, for example). The
- * advantage of using this method is that the parties do not have to
- * generate nor exchange a group modulus beforehand, saving both processor
- * and communication time.
- *
- * Example (obtaining a shared secret):
- *
- * ```js
- * const {
- * getDiffieHellman
- * } = await import('crypto');
- * const alice = getDiffieHellman('modp14');
- * const bob = getDiffieHellman('modp14');
- *
- * alice.generateKeys();
- * bob.generateKeys();
- *
- * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex');
- * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex');
- *
- * // aliceSecret and bobSecret should be the same
- * console.log(aliceSecret === bobSecret);
- * ```
- * @since v0.7.5
- */
- function getDiffieHellman(groupName: string): DiffieHellman;
- /**
- * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
- * implementation. A selected HMAC digest algorithm specified by `digest` is
- * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
- *
- * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set;
- * otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be
- * thrown if any of the input arguments specify invalid values or types.
- *
- * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated,
- * please specify a `digest` explicitly.
- *
- * The `iterations` argument must be a number set as high as possible. The
- * higher the number of iterations, the more secure the derived key will be,
- * but will take a longer amount of time to complete.
- *
- * The `salt` should be as unique as possible. It is recommended that a salt is
- * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
- *
- * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
- *
- * ```js
- * const {
- * pbkdf2
- * } = await import('crypto');
- *
- * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
- * if (err) throw err;
- * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
- * });
- * ```
- *
- * The `crypto.DEFAULT_ENCODING` property can be used to change the way the`derivedKey` is passed to the callback. This property, however, has been
- * deprecated and use should be avoided.
- *
- * ```js
- * import crypto from 'crypto';
- * crypto.DEFAULT_ENCODING = 'hex';
- * crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => {
- * if (err) throw err;
- * console.log(derivedKey); // '3745e48...aa39b34'
- * });
- * ```
- *
- * An array of supported digest functions can be retrieved using {@link getHashes}.
- *
- * This API uses libuv's threadpool, which can have surprising and
- * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
- * @since v0.5.5
- */
- function pbkdf2(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void): void;
- /**
- * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
- * implementation. A selected HMAC digest algorithm specified by `digest` is
- * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
- *
- * If an error occurs an `Error` will be thrown, otherwise the derived key will be
- * returned as a `Buffer`.
- *
- * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated,
- * please specify a `digest` explicitly.
- *
- * The `iterations` argument must be a number set as high as possible. The
- * higher the number of iterations, the more secure the derived key will be,
- * but will take a longer amount of time to complete.
- *
- * The `salt` should be as unique as possible. It is recommended that a salt is
- * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
- *
- * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
- *
- * ```js
- * const {
- * pbkdf2Sync
- * } = await import('crypto');
- *
- * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
- * console.log(key.toString('hex')); // '3745e48...08d59ae'
- * ```
- *
- * The `crypto.DEFAULT_ENCODING` property may be used to change the way the`derivedKey` is returned. This property, however, is deprecated and use
- * should be avoided.
- *
- * ```js
- * import crypto from 'crypto';
- * crypto.DEFAULT_ENCODING = 'hex';
- * const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 512, 'sha512');
- * console.log(key); // '3745e48...aa39b34'
- * ```
- *
- * An array of supported digest functions can be retrieved using {@link getHashes}.
- * @since v0.9.3
- */
- function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
- /**
- * Generates cryptographically strong pseudorandom data. The `size` argument
- * is a number indicating the number of bytes to generate.
- *
- * If a `callback` function is provided, the bytes are generated asynchronously
- * and the `callback` function is invoked with two arguments: `err` and `buf`.
- * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes.
- *
- * ```js
- * // Asynchronous
- * const {
- * randomBytes
- * } = await import('crypto');
- *
- * randomBytes(256, (err, buf) => {
- * if (err) throw err;
- * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`);
- * });
- * ```
- *
- * If the `callback` function is not provided, the random bytes are generated
- * synchronously and returned as a `Buffer`. An error will be thrown if
- * there is a problem generating the bytes.
- *
- * ```js
- * // Synchronous
- * const {
- * randomBytes
- * } = await import('crypto');
- *
- * const buf = randomBytes(256);
- * console.log(
- * `${buf.length} bytes of random data: ${buf.toString('hex')}`);
- * ```
- *
- * The `crypto.randomBytes()` method will not complete until there is
- * sufficient entropy available.
- * This should normally never take longer than a few milliseconds. The only time
- * when generating the random bytes may conceivably block for a longer period of
- * time is right after boot, when the whole system is still low on entropy.
- *
- * This API uses libuv's threadpool, which can have surprising and
- * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
- *
- * The asynchronous version of `crypto.randomBytes()` is carried out in a single
- * threadpool request. To minimize threadpool task length variation, partition
- * large `randomBytes` requests when doing so as part of fulfilling a client
- * request.
- * @since v0.5.8
- * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
- * @return if the `callback` function is not provided.
- */
- function randomBytes(size: number): Buffer;
- function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
- function pseudoRandomBytes(size: number): Buffer;
- function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
- /**
- * Return a random integer `n` such that `min <= n < max`. This
- * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
- *
- * The range (`max - min`) must be less than 248. `min` and `max` must
- * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
- *
- * If the `callback` function is not provided, the random integer is
- * generated synchronously.
- *
- * ```js
- * // Asynchronous
- * const {
- * randomInt
- * } = await import('crypto');
- *
- * randomInt(3, (err, n) => {
- * if (err) throw err;
- * console.log(`Random number chosen from (0, 1, 2): ${n}`);
- * });
- * ```
- *
- * ```js
- * // Synchronous
- * const {
- * randomInt
- * } = await import('crypto');
- *
- * const n = randomInt(3);
- * console.log(`Random number chosen from (0, 1, 2): ${n}`);
- * ```
- *
- * ```js
- * // With `min` argument
- * const {
- * randomInt
- * } = await import('crypto');
- *
- * const n = randomInt(1, 7);
- * console.log(`The dice rolled: ${n}`);
- * ```
- * @since v14.10.0, v12.19.0
- * @param [min=0] Start of random range (inclusive).
- * @param max End of random range (exclusive).
- * @param callback `function(err, n) {}`.
- */
- function randomInt(max: number): number;
- function randomInt(min: number, max: number): number;
- function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
- function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
- /**
- * Synchronous version of {@link randomFill}.
- *
- * ```js
- * import { Buffer } from 'buffer';
- * const { randomFillSync } = await import('crypto');
- *
- * const buf = Buffer.alloc(10);
- * console.log(randomFillSync(buf).toString('hex'));
- *
- * randomFillSync(buf, 5);
- * console.log(buf.toString('hex'));
- *
- * // The above is equivalent to the following:
- * randomFillSync(buf, 5, 5);
- * console.log(buf.toString('hex'));
- * ```
- *
- * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`.
- *
- * ```js
- * import { Buffer } from 'buffer';
- * const { randomFillSync } = await import('crypto');
- *
- * const a = new Uint32Array(10);
- * console.log(Buffer.from(randomFillSync(a).buffer,
- * a.byteOffset, a.byteLength).toString('hex'));
- *
- * const b = new DataView(new ArrayBuffer(10));
- * console.log(Buffer.from(randomFillSync(b).buffer,
- * b.byteOffset, b.byteLength).toString('hex'));
- *
- * const c = new ArrayBuffer(10);
- * console.log(Buffer.from(randomFillSync(c)).toString('hex'));
- * ```
- * @since v7.10.0, v6.13.0
- * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
- * @param [offset=0]
- * @param [size=buffer.length - offset]
- * @return The object passed as `buffer` argument.
- */
- function randomFillSync(buffer: T, offset?: number, size?: number): T;
- /**
- * This function is similar to {@link randomBytes} but requires the first
- * argument to be a `Buffer` that will be filled. It also
- * requires that a callback is passed in.
- *
- * If the `callback` function is not provided, an error will be thrown.
- *
- * ```js
- * import { Buffer } from 'buffer';
- * const { randomFill } = await import('crypto');
- *
- * const buf = Buffer.alloc(10);
- * randomFill(buf, (err, buf) => {
- * if (err) throw err;
- * console.log(buf.toString('hex'));
- * });
- *
- * randomFill(buf, 5, (err, buf) => {
- * if (err) throw err;
- * console.log(buf.toString('hex'));
- * });
- *
- * // The above is equivalent to the following:
- * randomFill(buf, 5, 5, (err, buf) => {
- * if (err) throw err;
- * console.log(buf.toString('hex'));
- * });
- * ```
- *
- * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`.
- *
- * While this includes instances of `Float32Array` and `Float64Array`, this
- * function should not be used to generate random floating-point numbers. The
- * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array
- * contains finite numbers only, they are not drawn from a uniform random
- * distribution and have no meaningful lower or upper bounds.
- *
- * ```js
- * import { Buffer } from 'buffer';
- * const { randomFill } = await import('crypto');
- *
- * const a = new Uint32Array(10);
- * randomFill(a, (err, buf) => {
- * if (err) throw err;
- * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
- * .toString('hex'));
- * });
- *
- * const b = new DataView(new ArrayBuffer(10));
- * randomFill(b, (err, buf) => {
- * if (err) throw err;
- * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
- * .toString('hex'));
- * });
- *
- * const c = new ArrayBuffer(10);
- * randomFill(c, (err, buf) => {
- * if (err) throw err;
- * console.log(Buffer.from(buf).toString('hex'));
- * });
- * ```
- *
- * This API uses libuv's threadpool, which can have surprising and
- * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
- *
- * The asynchronous version of `crypto.randomFill()` is carried out in a single
- * threadpool request. To minimize threadpool task length variation, partition
- * large `randomFill` requests when doing so as part of fulfilling a client
- * request.
- * @since v7.10.0, v6.13.0
- * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
- * @param [offset=0]
- * @param [size=buffer.length - offset]
- * @param callback `function(err, buf) {}`.
- */
- function randomFill(buffer: T, callback: (err: Error | null, buf: T) => void): void;
- function randomFill(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
- function randomFill(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
- interface ScryptOptions {
- cost?: number | undefined;
- blockSize?: number | undefined;
- parallelization?: number | undefined;
- N?: number | undefined;
- r?: number | undefined;
- p?: number | undefined;
- maxmem?: number | undefined;
- }
- /**
- * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
- * key derivation function that is designed to be expensive computationally and
- * memory-wise in order to make brute-force attacks unrewarding.
- *
- * The `salt` should be as unique as possible. It is recommended that a salt is
- * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
- *
- * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
- *
- * The `callback` function is called with two arguments: `err` and `derivedKey`.`err` is an exception object when key derivation fails, otherwise `err` is`null`. `derivedKey` is passed to the
- * callback as a `Buffer`.
- *
- * An exception is thrown when any of the input arguments specify invalid values
- * or types.
- *
- * ```js
- * const {
- * scrypt
- * } = await import('crypto');
- *
- * // Using the factory defaults.
- * scrypt('password', 'salt', 64, (err, derivedKey) => {
- * if (err) throw err;
- * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
- * });
- * // Using a custom N parameter. Must be a power of two.
- * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => {
- * if (err) throw err;
- * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34'
- * });
- * ```
- * @since v10.5.0
- */
- function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void): void;
- function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, options: ScryptOptions, callback: (err: Error | null, derivedKey: Buffer) => void): void;
- /**
- * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
- * key derivation function that is designed to be expensive computationally and
- * memory-wise in order to make brute-force attacks unrewarding.
- *
- * The `salt` should be as unique as possible. It is recommended that a salt is
- * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
- *
- * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
- *
- * An exception is thrown when key derivation fails, otherwise the derived key is
- * returned as a `Buffer`.
- *
- * An exception is thrown when any of the input arguments specify invalid values
- * or types.
- *
- * ```js
- * const {
- * scryptSync
- * } = await import('crypto');
- * // Using the factory defaults.
- *
- * const key1 = scryptSync('password', 'salt', 64);
- * console.log(key1.toString('hex')); // '3745e48...08d59ae'
- * // Using a custom N parameter. Must be a power of two.
- * const key2 = scryptSync('password', 'salt', 64, { N: 1024 });
- * console.log(key2.toString('hex')); // '3745e48...aa39b34'
- * ```
- * @since v10.5.0
- */
- function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer;
- interface RsaPublicKey {
- key: KeyLike;
- padding?: number | undefined;
- }
- interface RsaPrivateKey {
- key: KeyLike;
- passphrase?: string | undefined;
- /**
- * @default 'sha1'
- */
- oaepHash?: string | undefined;
- oaepLabel?: NodeJS.TypedArray | undefined;
- padding?: number | undefined;
- }
- /**
- * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
- * the corresponding private key, for example using {@link privateDecrypt}.
- *
- * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
- * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
- *
- * Because RSA public keys can be derived from private keys, a private key may
- * be passed instead of a public key.
- * @since v0.11.14
- */
- function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
- /**
- * Decrypts `buffer` with `key`.`buffer` was previously encrypted using
- * the corresponding private key, for example using {@link privateEncrypt}.
- *
- * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
- * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
- *
- * Because RSA public keys can be derived from private keys, a private key may
- * be passed instead of a public key.
- * @since v1.1.0
- */
- function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
- /**
- * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
- * the corresponding public key, for example using {@link publicEncrypt}.
- *
- * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
- * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
- * @since v0.11.14
- */
- function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
- /**
- * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
- * the corresponding public key, for example using {@link publicDecrypt}.
- *
- * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
- * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
- * @since v1.1.0
- */
- function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
- /**
- * ```js
- * const {
- * getCiphers
- * } = await import('crypto');
- *
- * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...]
- * ```
- * @since v0.9.3
- * @return An array with the names of the supported cipher algorithms.
- */
- function getCiphers(): string[];
- /**
- * ```js
- * const {
- * getCurves
- * } = await import('crypto');
- *
- * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...]
- * ```
- * @since v2.3.0
- * @return An array with the names of the supported elliptic curves.
- */
- function getCurves(): string[];
- /**
- * @since v10.0.0
- * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}.
- */
- function getFips(): 1 | 0;
- /**
- * ```js
- * const {
- * getHashes
- * } = await import('crypto');
- *
- * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...]
- * ```
- * @since v0.9.3
- * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms.
- */
- function getHashes(): string[];
- /**
- * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH)
- * key exchanges.
- *
- * Instances of the `ECDH` class can be created using the {@link createECDH} function.
- *
- * ```js
- * import assert from 'assert';
- *
- * const {
- * createECDH
- * } = await import('crypto');
- *
- * // Generate Alice's keys...
- * const alice = createECDH('secp521r1');
- * const aliceKey = alice.generateKeys();
- *
- * // Generate Bob's keys...
- * const bob = createECDH('secp521r1');
- * const bobKey = bob.generateKeys();
- *
- * // Exchange and generate the secret...
- * const aliceSecret = alice.computeSecret(bobKey);
- * const bobSecret = bob.computeSecret(aliceKey);
- *
- * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
- * // OK
- * ```
- * @since v0.11.14
- */
- class ECDH {
- private constructor();
- /**
- * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the
- * format specified by `format`. The `format` argument specifies point encoding
- * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is
- * interpreted using the specified `inputEncoding`, and the returned key is encoded
- * using the specified `outputEncoding`.
- *
- * Use {@link getCurves} to obtain a list of available curve names.
- * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display
- * the name and description of each available elliptic curve.
- *
- * If `format` is not specified the point will be returned in `'uncompressed'`format.
- *
- * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
- *
- * Example (uncompressing a key):
- *
- * ```js
- * const {
- * createECDH,
- * ECDH
- * } = await import('crypto');
- *
- * const ecdh = createECDH('secp256k1');
- * ecdh.generateKeys();
- *
- * const compressedKey = ecdh.getPublicKey('hex', 'compressed');
- *
- * const uncompressedKey = ECDH.convertKey(compressedKey,
- * 'secp256k1',
- * 'hex',
- * 'hex',
- * 'uncompressed');
- *
- * // The converted key and the uncompressed public key should be the same
- * console.log(uncompressedKey === ecdh.getPublicKey('hex'));
- * ```
- * @since v10.0.0
- * @param inputEncoding The `encoding` of the `key` string.
- * @param outputEncoding The `encoding` of the return value.
- * @param [format='uncompressed']
- */
- static convertKey(
- key: BinaryLike,
- curve: string,
- inputEncoding?: BinaryToTextEncoding,
- outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url',
- format?: 'uncompressed' | 'compressed' | 'hybrid'
- ): Buffer | string;
- /**
- * Generates private and public EC Diffie-Hellman key values, and returns
- * the public key in the specified `format` and `encoding`. This key should be
- * transferred to the other party.
- *
- * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
- *
- * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
- * @since v0.11.14
- * @param encoding The `encoding` of the return value.
- * @param [format='uncompressed']
- */
- generateKeys(): Buffer;
- generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
- /**
- * Computes the shared secret using `otherPublicKey` as the other
- * party's public key and returns the computed shared secret. The supplied
- * key is interpreted using specified `inputEncoding`, and the returned secret
- * is encoded using the specified `outputEncoding`.
- * If the `inputEncoding` is not
- * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`.
- *
- * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned.
- *
- * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is
- * usually supplied from a remote user over an insecure network,
- * be sure to handle this exception accordingly.
- * @since v0.11.14
- * @param inputEncoding The `encoding` of the `otherPublicKey` string.
- * @param outputEncoding The `encoding` of the return value.
- */
- computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
- computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
- computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
- computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
- /**
- * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
- * returned.
- * @since v0.11.14
- * @param encoding The `encoding` of the return value.
- * @return The EC Diffie-Hellman in the specified `encoding`.
- */
- getPrivateKey(): Buffer;
- getPrivateKey(encoding: BinaryToTextEncoding): string;
- /**
- * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
- *
- * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
- * returned.
- * @since v0.11.14
- * @param encoding The `encoding` of the return value.
- * @param [format='uncompressed']
- * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
- */
- getPublicKey(): Buffer;
- getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
- /**
- * Sets the EC Diffie-Hellman private key.
- * If `encoding` is provided, `privateKey` is expected
- * to be a string; otherwise `privateKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
- *
- * If `privateKey` is not valid for the curve specified when the `ECDH` object was
- * created, an error is thrown. Upon setting the private key, the associated
- * public point (key) is also generated and set in the `ECDH` object.
- * @since v0.11.14
- * @param encoding The `encoding` of the `privateKey` string.
- */
- setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
- setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void;
- }
- /**
- * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a
- * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent
- * OpenSSL releases, `openssl ecparam -list_curves` will also display the name
- * and description of each available elliptic curve.
- * @since v0.11.14
- */
- function createECDH(curveName: string): ECDH;
- /**
- * This function is based on a constant-time algorithm.
- * Returns true if `a` is equal to `b`, without leaking timing information that
- * would allow an attacker to guess one of the values. This is suitable for
- * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
- *
- * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
- * must have the same byte length.
- *
- * If at least one of `a` and `b` is a `TypedArray` with more than one byte per
- * entry, such as `Uint16Array`, the result will be computed using the platform
- * byte order.
- *
- * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code
- * is timing-safe. Care should be taken to ensure that the surrounding code does
- * not introduce timing vulnerabilities.
- * @since v6.6.0
- */
- function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
- /** @deprecated since v10.0.0 */
- const DEFAULT_ENCODING: BufferEncoding;
- type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
- type KeyFormat = 'pem' | 'der';
- interface BasePrivateKeyEncodingOptions {
- format: T;
- cipher?: string | undefined;
- passphrase?: string | undefined;
- }
- interface KeyPairKeyObjectResult {
- publicKey: KeyObject;
- privateKey: KeyObject;
- }
- interface ED25519KeyPairKeyObjectOptions {}
- interface ED448KeyPairKeyObjectOptions {}
- interface X25519KeyPairKeyObjectOptions {}
- interface X448KeyPairKeyObjectOptions {}
- interface ECKeyPairKeyObjectOptions {
- /**
- * Name of the curve to use
- */
- namedCurve: string;
- }
- interface RSAKeyPairKeyObjectOptions {
- /**
- * Key size in bits
- */
- modulusLength: number;
- /**
- * Public exponent
- * @default 0x10001
- */
- publicExponent?: number | undefined;
- }
- interface RSAPSSKeyPairKeyObjectOptions {
- /**
- * Key size in bits
- */
- modulusLength: number;
- /**
- * Public exponent
- * @default 0x10001
- */
- publicExponent?: number | undefined;
- /**
- * Name of the message digest
- */
- hashAlgorithm?: string;
- /**
- * Name of the message digest used by MGF1
- */
- mgf1HashAlgorithm?: string;
- /**
- * Minimal salt length in bytes
- */
- saltLength?: string;
- }
- interface DSAKeyPairKeyObjectOptions {
- /**
- * Key size in bits
- */
- modulusLength: number;
- /**
- * Size of q in bits
- */
- divisorLength: number;
- }
- interface RSAKeyPairOptions {
- /**
- * Key size in bits
- */
- modulusLength: number;
- /**
- * Public exponent
- * @default 0x10001
- */
- publicExponent?: number | undefined;
- publicKeyEncoding: {
- type: 'pkcs1' | 'spki';
- format: PubF;
- };
- privateKeyEncoding: BasePrivateKeyEncodingOptions & {
- type: 'pkcs1' | 'pkcs8';
- };
- }
- interface RSAPSSKeyPairOptions {
- /**
- * Key size in bits
- */
- modulusLength: number;
- /**
- * Public exponent
- * @default 0x10001
- */
- publicExponent?: number | undefined;
- /**
- * Name of the message digest
- */
- hashAlgorithm?: string;
- /**
- * Name of the message digest used by MGF1
- */
- mgf1HashAlgorithm?: string;
- /**
- * Minimal salt length in bytes
- */
- saltLength?: string;
- publicKeyEncoding: {
- type: 'spki';
- format: PubF;
- };
- privateKeyEncoding: BasePrivateKeyEncodingOptions & {
- type: 'pkcs8';
- };
- }
- interface DSAKeyPairOptions {
- /**
- * Key size in bits
- */
- modulusLength: number;
- /**
- * Size of q in bits
- */
- divisorLength: number;
- publicKeyEncoding: {
- type: 'spki';
- format: PubF;
- };
- privateKeyEncoding: BasePrivateKeyEncodingOptions & {
- type: 'pkcs8';
- };
- }
- interface ECKeyPairOptions {
- /**
- * Name of the curve to use.
- */
- namedCurve: string;
- publicKeyEncoding: {
- type: 'pkcs1' | 'spki';
- format: PubF;
- };
- privateKeyEncoding: BasePrivateKeyEncodingOptions & {
- type: 'sec1' | 'pkcs8';
- };
- }
- interface ED25519KeyPairOptions {
- publicKeyEncoding: {
- type: 'spki';
- format: PubF;
- };
- privateKeyEncoding: BasePrivateKeyEncodingOptions & {
- type: 'pkcs8';
- };
- }
- interface ED448KeyPairOptions {
- publicKeyEncoding: {
- type: 'spki';
- format: PubF;
- };
- privateKeyEncoding: BasePrivateKeyEncodingOptions & {
- type: 'pkcs8';
- };
- }
- interface X25519KeyPairOptions {
- publicKeyEncoding: {
- type: 'spki';
- format: PubF;
- };
- privateKeyEncoding: BasePrivateKeyEncodingOptions & {
- type: 'pkcs8';
- };
- }
- interface X448KeyPairOptions {
- publicKeyEncoding: {
- type: 'spki';
- format: PubF;
- };
- privateKeyEncoding: BasePrivateKeyEncodingOptions & {
- type: 'pkcs8';
- };
- }
- interface KeyPairSyncResult {
- publicKey: T1;
- privateKey: T2;
- }
- /**
- * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
- * Ed25519, Ed448, X25519, X448, and DH are currently supported.
- *
- * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
- * behaves as if `keyObject.export()` had been called on its result. Otherwise,
- * the respective part of the key is returned as a `KeyObject`.
- *
- * When encoding public keys, it is recommended to use `'spki'`. When encoding
- * private keys, it is recommended to use `'pkcs8'` with a strong passphrase,
- * and to keep the passphrase confidential.
- *
- * ```js
- * const {
- * generateKeyPairSync
- * } = await import('crypto');
- *
- * const {
- * publicKey,
- * privateKey,
- * } = generateKeyPairSync('rsa', {
- * modulusLength: 4096,
- * publicKeyEncoding: {
- * type: 'spki',
- * format: 'pem'
- * },
- * privateKeyEncoding: {
- * type: 'pkcs8',
- * format: 'pem',
- * cipher: 'aes-256-cbc',
- * passphrase: 'top secret'
- * }
- * });
- * ```
- *
- * The return value `{ publicKey, privateKey }` represents the generated key pair.
- * When PEM encoding was selected, the respective key will be a string, otherwise
- * it will be a buffer containing the data encoded as DER.
- * @since v10.12.0
- * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
- */
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult;
- function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
- /**
- * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
- * Ed25519, Ed448, X25519, X448, and DH are currently supported.
- *
- * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
- * behaves as if `keyObject.export()` had been called on its result. Otherwise,
- * the respective part of the key is returned as a `KeyObject`.
- *
- * It is recommended to encode public keys as `'spki'` and private keys as`'pkcs8'` with encryption for long-term storage:
- *
- * ```js
- * const {
- * generateKeyPair
- * } = await import('crypto');
- *
- * generateKeyPair('rsa', {
- * modulusLength: 4096,
- * publicKeyEncoding: {
- * type: 'spki',
- * format: 'pem'
- * },
- * privateKeyEncoding: {
- * type: 'pkcs8',
- * format: 'pem',
- * cipher: 'aes-256-cbc',
- * passphrase: 'top secret'
- * }
- * }, (err, publicKey, privateKey) => {
- * // Handle errors and use the generated key pair.
- * });
- * ```
- *
- * On completion, `callback` will be called with `err` set to `undefined` and`publicKey` / `privateKey` representing the generated key pair.
- *
- * If this method is invoked as its `util.promisify()` ed version, it returns
- * a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
- * @since v10.12.0
- * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
- */
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
- function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
- namespace generateKeyPair {
- function __promisify__(
- type: 'rsa',
- options: RSAKeyPairOptions<'pem', 'pem'>
- ): Promise<{
- publicKey: string;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'rsa',
- options: RSAKeyPairOptions<'pem', 'der'>
- ): Promise<{
- publicKey: string;
- privateKey: Buffer;
- }>;
- function __promisify__(
- type: 'rsa',
- options: RSAKeyPairOptions<'der', 'pem'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'rsa',
- options: RSAKeyPairOptions<'der', 'der'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: Buffer;
- }>;
- function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise;
- function __promisify__(
- type: 'rsa-pss',
- options: RSAPSSKeyPairOptions<'pem', 'pem'>
- ): Promise<{
- publicKey: string;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'rsa-pss',
- options: RSAPSSKeyPairOptions<'pem', 'der'>
- ): Promise<{
- publicKey: string;
- privateKey: Buffer;
- }>;
- function __promisify__(
- type: 'rsa-pss',
- options: RSAPSSKeyPairOptions<'der', 'pem'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'rsa-pss',
- options: RSAPSSKeyPairOptions<'der', 'der'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: Buffer;
- }>;
- function __promisify__(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): Promise;
- function __promisify__(
- type: 'dsa',
- options: DSAKeyPairOptions<'pem', 'pem'>
- ): Promise<{
- publicKey: string;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'dsa',
- options: DSAKeyPairOptions<'pem', 'der'>
- ): Promise<{
- publicKey: string;
- privateKey: Buffer;
- }>;
- function __promisify__(
- type: 'dsa',
- options: DSAKeyPairOptions<'der', 'pem'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'dsa',
- options: DSAKeyPairOptions<'der', 'der'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: Buffer;
- }>;
- function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise;
- function __promisify__(
- type: 'ec',
- options: ECKeyPairOptions<'pem', 'pem'>
- ): Promise<{
- publicKey: string;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'ec',
- options: ECKeyPairOptions<'pem', 'der'>
- ): Promise<{
- publicKey: string;
- privateKey: Buffer;
- }>;
- function __promisify__(
- type: 'ec',
- options: ECKeyPairOptions<'der', 'pem'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'ec',
- options: ECKeyPairOptions<'der', 'der'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: Buffer;
- }>;
- function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise;
- function __promisify__(
- type: 'ed25519',
- options: ED25519KeyPairOptions<'pem', 'pem'>
- ): Promise<{
- publicKey: string;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'ed25519',
- options: ED25519KeyPairOptions<'pem', 'der'>
- ): Promise<{
- publicKey: string;
- privateKey: Buffer;
- }>;
- function __promisify__(
- type: 'ed25519',
- options: ED25519KeyPairOptions<'der', 'pem'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'ed25519',
- options: ED25519KeyPairOptions<'der', 'der'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: Buffer;
- }>;
- function __promisify__(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): Promise;
- function __promisify__(
- type: 'ed448',
- options: ED448KeyPairOptions<'pem', 'pem'>
- ): Promise<{
- publicKey: string;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'ed448',
- options: ED448KeyPairOptions<'pem', 'der'>
- ): Promise<{
- publicKey: string;
- privateKey: Buffer;
- }>;
- function __promisify__(
- type: 'ed448',
- options: ED448KeyPairOptions<'der', 'pem'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'ed448',
- options: ED448KeyPairOptions<'der', 'der'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: Buffer;
- }>;
- function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise;
- function __promisify__(
- type: 'x25519',
- options: X25519KeyPairOptions<'pem', 'pem'>
- ): Promise<{
- publicKey: string;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'x25519',
- options: X25519KeyPairOptions<'pem', 'der'>
- ): Promise<{
- publicKey: string;
- privateKey: Buffer;
- }>;
- function __promisify__(
- type: 'x25519',
- options: X25519KeyPairOptions<'der', 'pem'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'x25519',
- options: X25519KeyPairOptions<'der', 'der'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: Buffer;
- }>;
- function __promisify__(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): Promise;
- function __promisify__(
- type: 'x448',
- options: X448KeyPairOptions<'pem', 'pem'>
- ): Promise<{
- publicKey: string;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'x448',
- options: X448KeyPairOptions<'pem', 'der'>
- ): Promise<{
- publicKey: string;
- privateKey: Buffer;
- }>;
- function __promisify__(
- type: 'x448',
- options: X448KeyPairOptions<'der', 'pem'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: string;
- }>;
- function __promisify__(
- type: 'x448',
- options: X448KeyPairOptions<'der', 'der'>
- ): Promise<{
- publicKey: Buffer;
- privateKey: Buffer;
- }>;
- function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise