diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f6a30e1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +dist/**/* linguist-generated=true diff --git a/.gitignore b/.gitignore index e43b0f9..6968267 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .DS_Store +node_modules/ + diff --git a/README.md b/README.md index 6bb6b35..0be4db2 100644 --- a/README.md +++ b/README.md @@ -4,50 +4,22 @@ Download, install, and setup [Bun](https://bun.sh) in GitHub Actions. ## Usage -### Latest release - ```yaml - uses: oven-sh/setup-bun@v1 with: bun-version: latest ``` -### Specific release +## Inputs -```yaml -- uses: oven-sh/setup-bun@v1 - with: - bun-version: "0.5.6" -``` +| Name | Description | Default | Examples | +| ------------- | ------------------------------------------- | -------- | -------------------------- | +| `bun-version` | The version of Bun to download and install. | `latest` | `canary`, `1.0.0`, `` | -### Canary release +## Outputs -```yaml -- uses: oven-sh/setup-bun@v1 - with: - bun-version: canary -``` - -### Specific canary release - -```yaml -- uses: oven-sh/setup-bun@v1 - with: - bun-version: 9be68ac2350b965037f408ce4d47c3b9d9a76b63 -``` - -### Action run - -```yaml -- uses: oven-sh/setup-bun@v1 - with: - bun-version: "action:4308768069" -``` - -### Custom download URL - -```yaml -- uses: oven-sh/setup-bun@v1 - with: - bun-download-url: https://example.com/path/to/bun.zip -``` +| Name | Description | Example | +| -------------- | ------------------------------------------ | ------------------------------------------------ | +| `cache-hit` | If the Bun executable was read from cache. | `true` | +| `bun-version` | The output from `bun --version`. | `1.0.0` | +| `bun-revision` | The output from `bun --revision`. | `1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a7983` | diff --git a/bun.lockb b/bun.lockb index efadae1..2a3c716 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/dist/action.js b/dist/action.js index a097883..53c1876 100644 --- a/dist/action.js +++ b/dist/action.js @@ -1,17 +1,70989 @@ -import { tmpdir } from "node:os"; -import * as action from "@actions/core"; -import setup from "./setup.js"; -if (!process.env.RUNNER_TEMP) { - process.env.RUNNER_TEMP = tmpdir(); -} -setup({ - version: action.getInput("bun-version") || undefined, - customUrl: action.getInput("bun-download-url") || undefined, -}) - .then(({ version, cacheHit }) => { - action.setOutput("bun-version", version); - action.setOutput("cache-hit", cacheHit); -}) - .catch((error) => { - action.setFailed(error); +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// node_modules/@actions/core/lib/utils.js +var require_utils = __commonJS({ + "node_modules/@actions/core/lib/utils.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toCommandProperties = exports.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports.toCommandProperties = toCommandProperties; + } }); + +// node_modules/@actions/core/lib/command.js +var require_command = __commonJS({ + "node_modules/@actions/core/lib/command.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.issue = exports.issueCommand = void 0; + var os = __importStar2(require("os")); + var utils_1 = require_utils(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); + } + exports.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + import_crypto.default.randomFillSync(rnds8Pool); + poolPtr = 0; + } + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} +var import_crypto, rnds8Pool, poolPtr; +var init_rng = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js"() { + import_crypto = __toESM(require("crypto")); + rnds8Pool = new Uint8Array(256); + poolPtr = rnds8Pool.length; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js +var regex_default; +var init_regex = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js"() { + regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js +function validate(uuid) { + return typeof uuid === "string" && regex_default.test(uuid); +} +var validate_default; +var init_validate = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js"() { + init_regex(); + validate_default = validate; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js +function stringify(arr, offset = 0) { + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); + if (!validate_default(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; +} +var byteToHex, stringify_default; +var init_stringify = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js"() { + init_validate(); + byteToHex = []; + for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 256).toString(16).substr(1)); + } + stringify_default = stringify; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng)(); + if (node == null) { + node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + if (clockseq == null) { + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; + if (dt < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b[i++] = tl >>> 24 & 255; + b[i++] = tl >>> 16 & 255; + b[i++] = tl >>> 8 & 255; + b[i++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + b[i++] = tmh >>> 8 & 255; + b[i++] = tmh & 255; + b[i++] = tmh >>> 24 & 15 | 16; + b[i++] = tmh >>> 16 & 255; + b[i++] = clockseq >>> 8 | 128; + b[i++] = clockseq & 255; + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + return buf || stringify_default(b); +} +var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; +var init_v1 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js"() { + init_rng(); + init_stringify(); + _lastMSecs = 0; + _lastNSecs = 0; + v1_default = v1; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js +function parse(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + let v; + const arr = new Uint8Array(16); + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 255; + arr[2] = v >>> 8 & 255; + arr[3] = v & 255; + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 255; + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 255; + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 255; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v / 4294967296 & 255; + arr[12] = v >>> 24 & 255; + arr[13] = v >>> 16 & 255; + arr[14] = v >>> 8 & 255; + arr[15] = v & 255; + return arr; +} +var parse_default; +var init_parse = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js"() { + init_validate(); + parse_default = parse; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); + const bytes = []; + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + return bytes; +} +function v35_default(name, version3, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === "string") { + value = stringToBytes(value); + } + if (typeof namespace === "string") { + namespace = parse_default(namespace); + } + if (namespace.length !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version3; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + return buf; + } + return stringify_default(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS; + generateUUID.URL = URL2; + return generateUUID; +} +var DNS, URL2; +var init_v35 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js"() { + init_stringify(); + init_parse(); + DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto2.default.createHash("md5").update(bytes).digest(); +} +var import_crypto2, md5_default; +var init_md5 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js"() { + import_crypto2 = __toESM(require("crypto")); + md5_default = md5; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js +var v3, v3_default; +var init_v3 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js"() { + init_v35(); + init_md5(); + v3 = v35_default("v3", 48, md5_default); + v3_default = v3; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js +function v4(options, buf, offset) { + options = options || {}; + const rnds = options.random || (options.rng || rng)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + return buf; + } + return stringify_default(rnds); +} +var v4_default; +var init_v4 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js"() { + init_rng(); + init_stringify(); + v4_default = v4; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto3.default.createHash("sha1").update(bytes).digest(); +} +var import_crypto3, sha1_default; +var init_sha1 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js"() { + import_crypto3 = __toESM(require("crypto")); + sha1_default = sha1; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js +var v5, v5_default; +var init_v5 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js"() { + init_v35(); + init_sha1(); + v5 = v35_default("v5", 80, sha1_default); + v5_default = v5; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js +var nil_default; +var init_nil = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js"() { + nil_default = "00000000-0000-0000-0000-000000000000"; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js +function version(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.substr(14, 1), 16); +} +var version_default; +var init_version = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js"() { + init_validate(); + version_default = version; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js +var esm_node_exports = {}; +__export(esm_node_exports, { + NIL: () => nil_default, + parse: () => parse_default, + stringify: () => stringify_default, + v1: () => v1_default, + v3: () => v3_default, + v4: () => v4_default, + v5: () => v5_default, + validate: () => validate_default, + version: () => version_default +}); +var init_esm_node = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js"() { + init_v1(); + init_v3(); + init_v4(); + init_v5(); + init_nil(); + init_version(); + init_validate(); + init_stringify(); + init_parse(); + } +}); + +// node_modules/@actions/core/lib/file-command.js +var require_file_command = __commonJS({ + "node_modules/@actions/core/lib/file-command.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; + var fs = __importStar2(require("fs")); + var os = __importStar2(require("os")); + var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); + var utils_1 = require_utils(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: "utf8" + }); + } + exports.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + const convertedValue = utils_1.toCommandValue(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; + } + exports.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/http-client/lib/proxy.js +var require_proxy = __commonJS({ + "node_modules/@actions/http-client/lib/proxy.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.checkBypass = exports.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + return new URL(proxyVar); + } else { + return void 0; + } + } + exports.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperReqHosts.some((x) => x === upperNoProxyItem)) { + return true; + } + } + return false; + } + exports.checkBypass = checkBypass; + } +}); + +// node_modules/tunnel/lib/tunnel.js +var require_tunnel = __commonJS({ + "node_modules/tunnel/lib/tunnel.js"(exports) { + "use strict"; + var net = require("net"); + var tls = require("tls"); + var http = require("http"); + var https = require("https"); + var events = require("events"); + var assert = require("assert"); + var util = require("util"); + exports.httpOverHttp = httpOverHttp; + exports.httpsOverHttp = httpsOverHttp; + exports.httpOverHttps = httpOverHttps; + exports.httpsOverHttps = httpsOverHttps; + function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; + } + function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; + } + function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function TunnelingAgent(options) { + var self2 = this; + self2.options = options || {}; + self2.proxyOptions = self2.options.proxy || {}; + self2.maxSockets = self2.options.maxSockets || http.Agent.defaultMaxSockets; + self2.requests = []; + self2.sockets = []; + self2.on("free", function onFree(socket, host, port, localAddress) { + var options2 = toOptions(host, port, localAddress); + for (var i = 0, len = self2.requests.length; i < len; ++i) { + var pending = self2.requests[i]; + if (pending.host === options2.host && pending.port === options2.port) { + self2.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self2.removeSocket(socket); + }); + } + util.inherits(TunnelingAgent, events.EventEmitter); + TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self2 = this; + var options = mergeOptions({ request: req }, self2.options, toOptions(host, port, localAddress)); + if (self2.sockets.length >= this.maxSockets) { + self2.requests.push(options); + return; + } + self2.createSocket(options, function(socket) { + socket.on("free", onFree); + socket.on("close", onCloseOrRemove); + socket.on("agentRemove", onCloseOrRemove); + req.onSocket(socket); + function onFree() { + self2.emit("free", socket, options); + } + function onCloseOrRemove(err) { + self2.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } + }); + }; + TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self2 = this; + var placeholder = {}; + self2.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self2.proxyOptions, { + method: "CONNECT", + path: options.host + ":" + options.port, + agent: false, + headers: { + host: options.host + ":" + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); + } + debug("making CONNECT request"); + var connectReq = self2.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; + connectReq.once("response", onResponse); + connectReq.once("upgrade", onUpgrade); + connectReq.once("connect", onConnect); + connectReq.once("error", onError); + connectReq.end(); + function onResponse(res) { + res.upgrade = true; + } + function onUpgrade(res, socket, head) { + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + if (res.statusCode !== 200) { + debug( + "tunneling socket could not be established, statusCode=%d", + res.statusCode + ); + socket.destroy(); + var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self2.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug("got illegal response body from proxy"); + socket.destroy(); + var error = new Error("got illegal response body from proxy"); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self2.removeSocket(placeholder); + return; + } + debug("tunneling connection has established"); + self2.sockets[self2.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + function onError(cause) { + connectReq.removeAllListeners(); + debug( + "tunneling socket could not be established, cause=%s\n", + cause.message, + cause.stack + ); + var error = new Error("tunneling socket could not be established, cause=" + cause.message); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self2.removeSocket(placeholder); + } + }; + TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket); + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); + var pending = this.requests.shift(); + if (pending) { + this.createSocket(pending, function(socket2) { + pending.request.onSocket(socket2); + }); + } + }; + function createSecureSocket(options, cb) { + var self2 = this; + TunnelingAgent.prototype.createSocket.call(self2, options, function(socket) { + var hostHeader = options.request.getHeader("host"); + var tlsOptions = mergeOptions({}, self2.options, { + socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host + }); + var secureSocket = tls.connect(0, tlsOptions); + self2.sockets[self2.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); + } + function toOptions(host, port, localAddress) { + if (typeof host === "string") { + return { + host, + port, + localAddress + }; + } + return host; + } + function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === "object") { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== void 0) { + target[k] = overrides[k]; + } + } + } + } + return target; + } + var debug; + if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === "string") { + args[0] = "TUNNEL: " + args[0]; + } else { + args.unshift("TUNNEL:"); + } + console.error.apply(console, args); + }; + } else { + debug = function() { + }; + } + exports.debug = debug; + } +}); + +// node_modules/tunnel/index.js +var require_tunnel2 = __commonJS({ + "node_modules/tunnel/index.js"(exports, module2) { + module2.exports = require_tunnel(); + } +}); + +// node_modules/@actions/http-client/lib/index.js +var require_lib = __commonJS({ + "node_modules/@actions/http-client/lib/index.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers = exports.Headers || (exports.Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve(output.toString()); + }); + })); + }); + } + }; + exports.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports.isHttps = isHttps; + var HttpClient = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info2 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info2, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info2, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info2 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info2, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info2, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve(res); + } + } + this.requestRawWithCallback(info2, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info2, data, onResult) { + if (typeof data === "string") { + if (!info2.options.headers) { + info2.options.headers = {}; + } + info2.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info2.httpModule.request(info2.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info2.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info2 = {}; + info2.parsedUrl = requestUrl; + const usingSsl = info2.parsedUrl.protocol === "https:"; + info2.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info2.options = {}; + info2.options.host = info2.parsedUrl.hostname; + info2.options.port = info2.parsedUrl.port ? parseInt(info2.parsedUrl.port) : defaultPort; + info2.options.path = (info2.parsedUrl.pathname || "") + (info2.parsedUrl.search || ""); + info2.options.method = method; + info2.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info2.options.headers["user-agent"] = this.userAgent; + } + info2.options.agent = this._getAgent(info2.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info2.options); + } + } + return info2; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve) => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve(response); + } + })); + }); + } + }; + exports.HttpClient = HttpClient; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/http-client/lib/auth.js +var require_auth = __commonJS({ + "node_modules/@actions/http-client/lib/auth.js"(exports) { + "use strict"; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils = __commonJS({ + "node_modules/@actions/core/lib/oidc-utils.js"(exports) { + "use strict"; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.OidcClient = void 0; + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var core_1 = require_core(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error.statusCode} + + Error Message: ${error.result.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; + } catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } + }; + exports.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/core/lib/summary.js +var require_summary = __commonJS({ + "node_modules/@actions/core/lib/summary.js"(exports) { + "use strict"; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports.markdownSummary = _summary; + exports.summary = _summary; + } +}); + +// node_modules/@actions/core/lib/path-utils.js +var require_path_utils = __commonJS({ + "node_modules/@actions/core/lib/path-utils.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; + var path = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path.sep); + } + exports.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/core/lib/core.js +var require_core = __commonJS({ + "node_modules/@actions/core/lib/core.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; + var command_1 = require_command(); + var file_command_1 = require_file_command(); + var utils_1 = require_utils(); + var os = __importStar2(require("os")); + var path = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode = exports.ExitCode || (exports.ExitCode = {})); + function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return file_command_1.issueFileCommand("ENV", file_command_1.prepareKeyValueMessage(name, val)); + } + command_1.issueCommand("set-env", { name }, convertedVal); + } + exports.exportVariable = exportVariable; + function setSecret(secret) { + command_1.issueCommand("add-mask", {}, secret); + } + exports.setSecret = setSecret; + function addPath2(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + file_command_1.issueFileCommand("PATH", inputPath); + } else { + command_1.issueCommand("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`; + } + exports.addPath = addPath2; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); + } + process.stdout.write(os.EOL); + command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); + } + exports.setOutput = setOutput2; + function setCommandEcho(enabled) { + command_1.issue("echo", enabled ? "on" : "off"); + } + exports.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error(message); + } + exports.setFailed = setFailed2; + function isDebug() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports.isDebug = isDebug; + function debug(message) { + command_1.issueCommand("debug", {}, message); + } + exports.debug = debug; + function error(message, properties = {}) { + command_1.issueCommand("error", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + } + exports.error = error; + function warning2(message, properties = {}) { + command_1.issueCommand("warning", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + } + exports.warning = warning2; + function notice(message, properties = {}) { + command_1.issueCommand("notice", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + } + exports.notice = notice; + function info2(message) { + process.stdout.write(message + os.EOL); + } + exports.info = info2; + function startGroup(name) { + command_1.issue("group", name); + } + exports.startGroup = startGroup; + function endGroup() { + command_1.issue("endgroup"); + } + exports.endGroup = endGroup; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } finally { + endGroup(); + } + return result; + }); + } + exports.group = group; + function saveState(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return file_command_1.issueFileCommand("STATE", file_command_1.prepareKeyValueMessage(name, value)); + } + command_1.issueCommand("save-state", { name }, utils_1.toCommandValue(value)); + } + exports.saveState = saveState; + function getState(name) { + return process.env[`STATE_${name}`] || ""; + } + exports.getState = getState; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports.getIDToken = getIDToken; + var summary_1 = require_summary(); + Object.defineProperty(exports, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary(); + Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils(); + Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + } +}); + +// node_modules/@actions/io/lib/io-util.js +var require_io_util = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; + var fs = __importStar2(require("fs")); + var path = __importStar2(require("path")); + _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; + exports.IS_WINDOWS = process.platform === "win32"; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports.IS_WINDOWS) { + const upperExt = path.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports.IS_WINDOWS) { + try { + const directory = path.dirname(filePath); + const upperName = path.basename(filePath).toUpperCase(); + for (const actualName of yield exports.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; + var assert_1 = require("assert"); + var childProcess = __importStar2(require("child_process")); + var path = __importStar2(require("path")); + var util_1 = require("util"); + var ioUtil = __importStar2(require_io_util()); + var exec = util_1.promisify(childProcess.exec); + var execFile = util_1.promisify(childProcess.execFile); + function cp2(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path.join(dest, path.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports.cp = cp2; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path.join(dest, path.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF2(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP2(path.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports.mv = mv; + function rmRF2(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + try { + const cmdPath = ioUtil.getCmdPath(); + if (yield ioUtil.isDirectory(inputPath, true)) { + yield exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, { + env: { inputPath } + }); + } else { + yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, { + env: { inputPath } + }); + } + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + try { + yield ioUtil.unlink(inputPath); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + } else { + let isDir = false; + try { + isDir = yield ioUtil.isDirectory(inputPath); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + return; + } + if (isDir) { + yield execFile(`rm`, [`-rf`, `${inputPath}`]); + } else { + yield ioUtil.unlink(inputPath); + } + } + }); + } + exports.rmRF = rmRF2; + function mkdirP2(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports.mkdirP = mkdirP2; + function which(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports.which = which; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP2(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/semver/semver.js +var require_semver = __commonJS({ + "node_modules/semver/semver.js"(exports, module2) { + exports = module2.exports = SemVer; + var debug; + if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments, 0); + args.unshift("SEMVER"); + console.log.apply(console, args); + }; + } else { + debug = function() { + }; + } + exports.SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ + 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var re = exports.re = []; + var src = exports.src = []; + var t = exports.tokens = {}; + var R = 0; + function tok(n) { + t[n] = R++; + } + tok("NUMERICIDENTIFIER"); + src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; + tok("NUMERICIDENTIFIERLOOSE"); + src[t.NUMERICIDENTIFIERLOOSE] = "[0-9]+"; + tok("NONNUMERICIDENTIFIER"); + src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*"; + tok("MAINVERSION"); + src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; + tok("MAINVERSIONLOOSE"); + src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; + tok("PRERELEASEIDENTIFIER"); + src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; + tok("PRERELEASEIDENTIFIERLOOSE"); + src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; + tok("PRERELEASE"); + src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; + tok("PRERELEASELOOSE"); + src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; + tok("BUILDIDENTIFIER"); + src[t.BUILDIDENTIFIER] = "[0-9A-Za-z-]+"; + tok("BUILD"); + src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; + tok("FULL"); + tok("FULLPLAIN"); + src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; + src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; + tok("LOOSEPLAIN"); + src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; + tok("LOOSE"); + src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; + tok("GTLT"); + src[t.GTLT] = "((?:<|>)?=?)"; + tok("XRANGEIDENTIFIERLOOSE"); + src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; + tok("XRANGEIDENTIFIER"); + src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; + tok("XRANGEPLAIN"); + src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; + tok("XRANGEPLAINLOOSE"); + src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; + tok("XRANGE"); + src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; + tok("XRANGELOOSE"); + src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; + tok("COERCE"); + src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; + tok("COERCERTL"); + re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); + tok("LONETILDE"); + src[t.LONETILDE] = "(?:~>?)"; + tok("TILDETRIM"); + src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; + re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); + var tildeTrimReplace = "$1~"; + tok("TILDE"); + src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; + tok("TILDELOOSE"); + src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; + tok("LONECARET"); + src[t.LONECARET] = "(?:\\^)"; + tok("CARETTRIM"); + src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; + re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); + var caretTrimReplace = "$1^"; + tok("CARET"); + src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; + tok("CARETLOOSE"); + src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; + tok("COMPARATORLOOSE"); + src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; + tok("COMPARATOR"); + src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; + tok("COMPARATORTRIM"); + src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; + re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); + var comparatorTrimReplace = "$1$2$3"; + tok("HYPHENRANGE"); + src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; + tok("HYPHENRANGELOOSE"); + src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; + tok("STAR"); + src[t.STAR] = "(<|>)?=?\\s*\\*"; + for (i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) { + re[i] = new RegExp(src[i]); + } + } + var i; + exports.parse = parse3; + function parse3(version3, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (version3 instanceof SemVer) { + return version3; + } + if (typeof version3 !== "string") { + return null; + } + if (version3.length > MAX_LENGTH) { + return null; + } + var r = options.loose ? re[t.LOOSE] : re[t.FULL]; + if (!r.test(version3)) { + return null; + } + try { + return new SemVer(version3, options); + } catch (er) { + return null; + } + } + exports.valid = valid; + function valid(version3, options) { + var v = parse3(version3, options); + return v ? v.version : null; + } + exports.clean = clean; + function clean(version3, options) { + var s = parse3(version3.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + } + exports.SemVer = SemVer; + function SemVer(version3, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (version3 instanceof SemVer) { + if (version3.loose === options.loose) { + return version3; + } else { + version3 = version3.version; + } + } else if (typeof version3 !== "string") { + throw new TypeError("Invalid Version: " + version3); + } + if (version3.length > MAX_LENGTH) { + throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); + } + if (!(this instanceof SemVer)) { + return new SemVer(version3, options); + } + debug("SemVer", version3, options); + this.options = options; + this.loose = !!options.loose; + var m = version3.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError("Invalid Version: " + version3); + } + this.raw = version3; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + SemVer.prototype.format = function() { + this.version = this.major + "." + this.minor + "." + this.patch; + if (this.prerelease.length) { + this.version += "-" + this.prerelease.join("."); + } + return this.version; + }; + SemVer.prototype.toString = function() { + return this.version; + }; + SemVer.prototype.compare = function(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + return this.compareMain(other) || this.comparePre(other); + }; + SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + }; + SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + var i2 = 0; + do { + var a = this.prerelease[i2]; + var b = other.prerelease[i2]; + debug("prerelease compare", i2, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i2); + }; + SemVer.prototype.compareBuild = function(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + var i2 = 0; + do { + var a = this.build[i2]; + var b = other.build[i2]; + debug("prerelease compare", i2, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i2); + }; + SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier); + this.inc("pre", identifier); + break; + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier); + } + this.inc("pre", identifier); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + case "pre": + if (this.prerelease.length === 0) { + this.prerelease = [0]; + } else { + var i2 = this.prerelease.length; + while (--i2 >= 0) { + if (typeof this.prerelease[i2] === "number") { + this.prerelease[i2]++; + i2 = -2; + } + } + if (i2 === -1) { + this.prerelease.push(0); + } + } + if (identifier) { + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0]; + } + } else { + this.prerelease = [identifier, 0]; + } + } + break; + default: + throw new Error("invalid increment argument: " + release); + } + this.format(); + this.raw = this.version; + return this; + }; + exports.inc = inc; + function inc(version3, release, loose, identifier) { + if (typeof loose === "string") { + identifier = loose; + loose = void 0; + } + try { + return new SemVer(version3, loose).inc(release, identifier).version; + } catch (er) { + return null; + } + } + exports.diff = diff; + function diff(version1, version22) { + if (eq(version1, version22)) { + return null; + } else { + var v13 = parse3(version1); + var v2 = parse3(version22); + var prefix = ""; + if (v13.prerelease.length || v2.prerelease.length) { + prefix = "pre"; + var defaultResult = "prerelease"; + } + for (var key in v13) { + if (key === "major" || key === "minor" || key === "patch") { + if (v13[key] !== v2[key]) { + return prefix + key; + } + } + } + return defaultResult; + } + } + exports.compareIdentifiers = compareIdentifiers; + var numeric = /^[0-9]+$/; + function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + } + exports.rcompareIdentifiers = rcompareIdentifiers; + function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); + } + exports.major = major; + function major(a, loose) { + return new SemVer(a, loose).major; + } + exports.minor = minor; + function minor(a, loose) { + return new SemVer(a, loose).minor; + } + exports.patch = patch; + function patch(a, loose) { + return new SemVer(a, loose).patch; + } + exports.compare = compare; + function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); + } + exports.compareLoose = compareLoose; + function compareLoose(a, b) { + return compare(a, b, true); + } + exports.compareBuild = compareBuild; + function compareBuild(a, b, loose) { + var versionA = new SemVer(a, loose); + var versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + } + exports.rcompare = rcompare; + function rcompare(a, b, loose) { + return compare(b, a, loose); + } + exports.sort = sort; + function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compareBuild(a, b, loose); + }); + } + exports.rsort = rsort; + function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.compareBuild(b, a, loose); + }); + } + exports.gt = gt; + function gt(a, b, loose) { + return compare(a, b, loose) > 0; + } + exports.lt = lt; + function lt(a, b, loose) { + return compare(a, b, loose) < 0; + } + exports.eq = eq; + function eq(a, b, loose) { + return compare(a, b, loose) === 0; + } + exports.neq = neq; + function neq(a, b, loose) { + return compare(a, b, loose) !== 0; + } + exports.gte = gte; + function gte(a, b, loose) { + return compare(a, b, loose) >= 0; + } + exports.lte = lte; + function lte(a, b, loose) { + return compare(a, b, loose) <= 0; + } + exports.cmp = cmp; + function cmp(a, op, b, loose) { + switch (op) { + case "===": + if (typeof a === "object") + a = a.version; + if (typeof b === "object") + b = b.version; + return a === b; + case "!==": + if (typeof a === "object") + a = a.version; + if (typeof b === "object") + b = b.version; + return a !== b; + case "": + case "=": + case "==": + return eq(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt(a, b, loose); + case ">=": + return gte(a, b, loose); + case "<": + return lt(a, b, loose); + case "<=": + return lte(a, b, loose); + default: + throw new TypeError("Invalid operator: " + op); + } + } + exports.Comparator = Comparator; + function Comparator(comp, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + if (!(this instanceof Comparator)) { + return new Comparator(comp, options); + } + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug("comp", this); + } + var ANY = {}; + Comparator.prototype.parse = function(comp) { + var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + var m = comp.match(r); + if (!m) { + throw new TypeError("Invalid comparator: " + comp); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + }; + Comparator.prototype.toString = function() { + return this.value; + }; + Comparator.prototype.test = function(version3) { + debug("Comparator.test", version3, this.options.loose); + if (this.semver === ANY || version3 === ANY) { + return true; + } + if (typeof version3 === "string") { + try { + version3 = new SemVer(version3, this.options); + } catch (er) { + return false; + } + } + return cmp(version3, this.operator, this.semver, this.options); + }; + Comparator.prototype.intersects = function(comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + var rangeTmp; + if (this.operator === "") { + if (this.value === "") { + return true; + } + rangeTmp = new Range(comp.value, options); + return satisfies(this.value, rangeTmp, options); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + rangeTmp = new Range(this.value, options); + return satisfies(comp.semver, rangeTmp, options); + } + var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); + var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); + var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<")); + var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">")); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + }; + exports.Range = Range; + function Range(range, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (range instanceof Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new Range(range.raw, options); + } + } + if (range instanceof Comparator) { + return new Range(range.value, options); + } + if (!(this instanceof Range)) { + return new Range(range, options); + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range2) { + return this.parseRange(range2.trim()); + }, this).filter(function(c) { + return c.length; + }); + if (!this.set.length) { + throw new TypeError("Invalid SemVer Range: " + range); + } + this.format(); + } + Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(" ").trim(); + }).join("||").trim(); + return this.range; + }; + Range.prototype.toString = function() { + return this.range; + }; + Range.prototype.parseRange = function(range) { + var loose = this.options.loose; + range = range.trim(); + var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range, re[t.COMPARATORTRIM]); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + range = range.split(/\s+/).join(" "); + var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + var set = range.split(" ").map(function(comp) { + return parseComparator(comp, this.options); + }, this).join(" ").split(/\s+/); + if (this.options.loose) { + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, this.options); + }, this); + return set; + }; + Range.prototype.intersects = function(range, options) { + if (!(range instanceof Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some(function(thisComparators) { + return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { + return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { + return rangeComparators.every(function(rangeComparator) { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + }; + function isSatisfiable(comparators, options) { + var result = true; + var remainingComparators = comparators.slice(); + var testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every(function(otherComparator) { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + } + exports.toComparators = toComparators; + function toComparators(range, options) { + return new Range(range, options).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(" ").trim().split(" "); + }); + } + function parseComparator(comp, options) { + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + } + function isX(id) { + return !id || id.toLowerCase() === "x" || id === "*"; + } + function replaceTildes(comp, options) { + return comp.trim().split(/\s+/).map(function(comp2) { + return replaceTilde(comp2, options); + }).join(" "); + } + function replaceTilde(comp, options) { + var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug("tilde", comp, _, M, m, p, pr); + var ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; + } else if (isX(p)) { + ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; + } else if (pr) { + debug("replaceTilde pr", pr); + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; + } else { + ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; + } + debug("tilde return", ret); + return ret; + }); + } + function replaceCarets(comp, options) { + return comp.trim().split(/\s+/).map(function(comp2) { + return replaceCaret(comp2, options); + }).join(" "); + } + function replaceCaret(comp, options) { + debug("caret", comp, options); + var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug("caret", comp, _, M, m, p, pr); + var ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; + } else if (isX(p)) { + if (M === "0") { + ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; + } else { + ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; + } + } else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); + } else { + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; + } + } else { + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; + } + } else { + debug("no pr"); + if (M === "0") { + if (m === "0") { + ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); + } else { + ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; + } + } else { + ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; + } + } + debug("caret return", ret); + return ret; + }); + } + function replaceXRanges(comp, options) { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map(function(comp2) { + return replaceXRange(comp2, options); + }).join(" "); + } + function replaceXRange(comp, options) { + comp = comp.trim(); + var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug("xRange", comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret = "<0.0.0-0"; + } else { + ret = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + ret = gtlt + M + "." + m + "." + p + pr; + } else if (xm) { + ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; + } else if (xp) { + ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; + } + debug("xRange return", ret); + return ret; + }); + } + function replaceStars(comp, options) { + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); + } + function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = ">=" + fM + ".0.0"; + } else if (isX(fp)) { + from = ">=" + fM + "." + fm + ".0"; + } else { + from = ">=" + from; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = "<" + (+tM + 1) + ".0.0"; + } else if (isX(tp)) { + to = "<" + tM + "." + (+tm + 1) + ".0"; + } else if (tpr) { + to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; + } else { + to = "<=" + to; + } + return (from + " " + to).trim(); + } + Range.prototype.test = function(version3) { + if (!version3) { + return false; + } + if (typeof version3 === "string") { + try { + version3 = new SemVer(version3, this.options); + } catch (er) { + return false; + } + } + for (var i2 = 0; i2 < this.set.length; i2++) { + if (testSet(this.set[i2], version3, this.options)) { + return true; + } + } + return false; + }; + function testSet(set, version3, options) { + for (var i2 = 0; i2 < set.length; i2++) { + if (!set[i2].test(version3)) { + return false; + } + } + if (version3.prerelease.length && !options.includePrerelease) { + for (i2 = 0; i2 < set.length; i2++) { + debug(set[i2].semver); + if (set[i2].semver === ANY) { + continue; + } + if (set[i2].semver.prerelease.length > 0) { + var allowed = set[i2].semver; + if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { + return true; + } + } + } + return false; + } + return true; + } + exports.satisfies = satisfies; + function satisfies(version3, range, options) { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version3); + } + exports.maxSatisfying = maxSatisfying; + function maxSatisfying(versions, range, options) { + var max = null; + var maxSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function(v) { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + } + exports.minSatisfying = minSatisfying; + function minSatisfying(versions, range, options) { + var min = null; + var minSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function(v) { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + } + exports.minVersion = minVersion; + function minVersion(range, loose) { + range = new Range(range, loose); + var minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (var i2 = 0; i2 < range.set.length; ++i2) { + var comparators = range.set[i2]; + comparators.forEach(function(comparator) { + var compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + case "": + case ">=": + if (!minver || gt(minver, compver)) { + minver = compver; + } + break; + case "<": + case "<=": + break; + default: + throw new Error("Unexpected operation: " + comparator.operator); + } + }); + } + if (minver && range.test(minver)) { + return minver; + } + return null; + } + exports.validRange = validRange; + function validRange(range, options) { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + } + exports.ltr = ltr; + function ltr(version3, range, options) { + return outside(version3, range, "<", options); + } + exports.gtr = gtr; + function gtr(version3, range, options) { + return outside(version3, range, ">", options); + } + exports.outside = outside; + function outside(version3, range, hilo, options) { + version3 = new SemVer(version3, options); + range = new Range(range, options); + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (satisfies(version3, range, options)) { + return false; + } + for (var i2 = 0; i2 < range.set.length; ++i2) { + var comparators = range.set[i2]; + var high = null; + var low = null; + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + if (high.operator === comp || high.operator === ecomp) { + return false; + } + if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version3, low.semver)) { + return false; + } + } + return true; + } + exports.prerelease = prerelease; + function prerelease(version3, options) { + var parsed = parse3(version3, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + } + exports.intersects = intersects; + function intersects(r1, r2, options) { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2); + } + exports.coerce = coerce; + function coerce(version3, options) { + if (version3 instanceof SemVer) { + return version3; + } + if (typeof version3 === "number") { + version3 = String(version3); + } + if (typeof version3 !== "string") { + return null; + } + options = options || {}; + var match = null; + if (!options.rtl) { + match = version3.match(re[t.COERCE]); + } else { + var next; + while ((next = re[t.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) { + match = next; + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + } + re[t.COERCERTL].lastIndex = -1; + } + if (match === null) { + return null; + } + return parse3(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); + } + } +}); + +// node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "node_modules/@actions/tool-cache/lib/manifest.js"(exports, module2) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0; + var semver = __importStar2(require_semver()); + var core_1 = require_core(); + var os = require("os"); + var cp2 = require("child_process"); + var fs = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter2(this, void 0, void 0, function* () { + const platFilter = os.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version3 = candidate.version; + core_1.debug(`check ${version3} satisfies ${versionSpec}`); + if (semver.satisfies(version3, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + core_1.debug(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + exports._findMatch = _findMatch; + function _getOsVersion() { + const plat = os.platform(); + let version3 = ""; + if (plat === "darwin") { + version3 = cp2.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version3 = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version3; + } + exports._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs.existsSync(lsbReleaseFile)) { + contents = fs.readFileSync(lsbReleaseFile).toString(); + } else if (fs.existsSync(osReleaseFile)) { + contents = fs.readFileSync(osReleaseFile).toString(); + } + return contents; + } + exports._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// node_modules/uuid/lib/rng.js +var require_rng = __commonJS({ + "node_modules/uuid/lib/rng.js"(exports, module2) { + var crypto7 = require("crypto"); + module2.exports = function nodeRNG() { + return crypto7.randomBytes(16); + }; + } +}); + +// node_modules/uuid/lib/bytesToUuid.js +var require_bytesToUuid = __commonJS({ + "node_modules/uuid/lib/bytesToUuid.js"(exports, module2) { + var byteToHex3 = []; + for (i = 0; i < 256; ++i) { + byteToHex3[i] = (i + 256).toString(16).substr(1); + } + var i; + function bytesToUuid(buf, offset) { + var i2 = offset || 0; + var bth = byteToHex3; + return [ + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]] + ].join(""); + } + module2.exports = bytesToUuid; + } +}); + +// node_modules/uuid/v4.js +var require_v4 = __commonJS({ + "node_modules/uuid/v4.js"(exports, module2) { + var rng3 = require_rng(); + var bytesToUuid = require_bytesToUuid(); + function v43(options, buf, offset) { + var i = buf && offset || 0; + if (typeof options == "string") { + buf = options === "binary" ? new Array(16) : null; + options = null; + } + options = options || {}; + var rnds = options.random || (options.rng || rng3)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + return buf || bytesToUuid(rnds); + } + module2.exports = v43; + } +}); + +// node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner = __commonJS({ + "node_modules/@actions/exec/lib/toolrunner.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.argStringToArray = exports.ToolRunner = void 0; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path = __importStar2(require("path")); + var io = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str, end) { + return str.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io.which(this.toolPath, true); + return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp2 = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp2.stdout) { + cp2.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp2.stderr) { + cp2.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp2.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp2.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp2.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp2.removeAllListeners(); + if (error) { + reject(error); + } else { + resolve(exitCode); + } + }); + if (this.options.input) { + if (!cp2.stdin) { + throw new Error("child process missing stdin"); + } + cp2.stdin.end(this.options.input); + } + })); + }); + } + }; + exports.ToolRunner = ToolRunner; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error; + if (this.processExited) { + if (this.processError) { + error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/exec/lib/exec.js +var require_exec = __commonJS({ + "node_modules/@actions/exec/lib/exec.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getExecOutput = exports.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports.exec = exec; + function getExecOutput2(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports.getExecOutput = getExecOutput2; + } +}); + +// node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.RetryHelper = void 0; + var core = __importStar2(require_core()); + var RetryHelper = class { + constructor(maxAttempts, minSeconds, maxSeconds) { + if (maxAttempts < 1) { + throw new Error("max attempts should be greater than or equal to 1"); + } + this.maxAttempts = maxAttempts; + this.minSeconds = Math.floor(minSeconds); + this.maxSeconds = Math.floor(maxSeconds); + if (this.minSeconds > this.maxSeconds) { + throw new Error("min seconds should be less than or equal to max seconds"); + } + } + execute(action3, isRetryable) { + return __awaiter2(this, void 0, void 0, function* () { + let attempt = 1; + while (attempt < this.maxAttempts) { + try { + return yield action3(); + } catch (err) { + if (isRetryable && !isRetryable(err)) { + throw err; + } + core.info(err.message); + } + const seconds = this.getSleepAmount(); + core.info(`Waiting ${seconds} seconds before trying again`); + yield this.sleep(seconds); + attempt++; + } + return yield action3(); + }); + } + getSleepAmount() { + return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; + } + sleep(seconds) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); + }); + } + }; + exports.RetryHelper = RetryHelper; + } +}); + +// node_modules/@actions/tool-cache/lib/tool-cache.js +var require_tool_cache = __commonJS({ + "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0; + var core = __importStar2(require_core()); + var io = __importStar2(require_io()); + var fs = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os = __importStar2(require("os")); + var path = __importStar2(require("path")); + var httpm = __importStar2(require_lib()); + var semver = __importStar2(require_semver()); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var assert_1 = require("assert"); + var v4_1 = __importDefault2(require_v4()); + var exec_1 = require_exec(); + var retry_helper_1 = require_retry_helper(); + var HTTPError = class extends Error { + constructor(httpStatusCode) { + super(`Unexpected HTTP response: ${httpStatusCode}`); + this.httpStatusCode = httpStatusCode; + Object.setPrototypeOf(this, new.target.prototype); + } + }; + exports.HTTPError = HTTPError; + var IS_WINDOWS = process.platform === "win32"; + var IS_MAC = process.platform === "darwin"; + var userAgent = "actions/tool-cache"; + function downloadTool2(url, dest, auth, headers) { + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path.join(_getTempDirectory(), v4_1.default()); + yield io.mkdirP(path.dirname(dest)); + core.debug(`Downloading ${url}`); + core.debug(`Destination ${dest}`); + const maxAttempts = 3; + const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); + const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); + const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); + return yield retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { + return yield downloadToolAttempt(url, dest || "", auth, headers); + }), (err) => { + if (err instanceof HTTPError && err.httpStatusCode) { + if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { + return false; + } + } + return true; + }); + }); + } + exports.downloadTool = downloadTool2; + function downloadToolAttempt(url, dest, auth, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (fs.existsSync(dest)) { + throw new Error(`Destination file path ${dest} already exists`); + } + const http = new httpm.HttpClient(userAgent, [], { + allowRetries: false + }); + if (auth) { + core.debug("set auth"); + if (headers === void 0) { + headers = {}; + } + headers.authorization = auth; + } + const response = yield http.get(url, headers); + if (response.message.statusCode !== 200) { + const err = new HTTPError(response.message.statusCode); + core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + throw err; + } + const pipeline = util.promisify(stream.pipeline); + const responseMessageFactory = _getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY", () => response.message); + const readStream = responseMessageFactory(); + let succeeded = false; + try { + yield pipeline(readStream, fs.createWriteStream(dest)); + core.debug("download complete"); + succeeded = true; + return dest; + } finally { + if (!succeeded) { + core.debug("download failed"); + try { + yield io.rmRF(dest); + } catch (err) { + core.debug(`Failed to delete '${dest}'. ${err.message}`); + } + } + } + }); + } + function extract7z(file, dest, _7zPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(IS_WINDOWS, "extract7z() not supported on current OS"); + assert_1.ok(file, 'parameter "file" is required'); + dest = yield _createExtractFolder(dest); + const originalCwd = process.cwd(); + process.chdir(dest); + if (_7zPath) { + try { + const logLevel = core.isDebug() ? "-bb1" : "-bb0"; + const args = [ + "x", + logLevel, + "-bd", + "-sccUTF-8", + file + ]; + const options = { + silent: true + }; + yield exec_1.exec(`"${_7zPath}"`, args, options); + } finally { + process.chdir(originalCwd); + } + } else { + const escapedScript = path.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; + const args = [ + "-NoLogo", + "-Sta", + "-NoProfile", + "-NonInteractive", + "-ExecutionPolicy", + "Unrestricted", + "-Command", + command + ]; + const options = { + silent: true + }; + try { + const powershellPath = yield io.which("powershell", true); + yield exec_1.exec(`"${powershellPath}"`, args, options); + } finally { + process.chdir(originalCwd); + } + } + return dest; + }); + } + exports.extract7z = extract7z; + function extractTar(file, dest, flags = "xz") { + return __awaiter2(this, void 0, void 0, function* () { + if (!file) { + throw new Error("parameter 'file' is required"); + } + dest = yield _createExtractFolder(dest); + core.debug("Checking tar --version"); + let versionOutput = ""; + yield exec_1.exec("tar --version", [], { + ignoreReturnCode: true, + silent: true, + listeners: { + stdout: (data) => versionOutput += data.toString(), + stderr: (data) => versionOutput += data.toString() + } + }); + core.debug(versionOutput.trim()); + const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); + let args; + if (flags instanceof Array) { + args = flags; + } else { + args = [flags]; + } + if (core.isDebug() && !flags.includes("v")) { + args.push("-v"); + } + let destArg = dest; + let fileArg = file; + if (IS_WINDOWS && isGnuTar) { + args.push("--force-local"); + destArg = dest.replace(/\\/g, "/"); + fileArg = file.replace(/\\/g, "/"); + } + if (isGnuTar) { + args.push("--warning=no-unknown-keyword"); + args.push("--overwrite"); + } + args.push("-C", destArg, "-f", fileArg); + yield exec_1.exec(`tar`, args); + return dest; + }); + } + exports.extractTar = extractTar; + function extractXar(file, dest, flags = []) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(IS_MAC, "extractXar() not supported on current OS"); + assert_1.ok(file, 'parameter "file" is required'); + dest = yield _createExtractFolder(dest); + let args; + if (flags instanceof Array) { + args = flags; + } else { + args = [flags]; + } + args.push("-x", "-C", dest, "-f", file); + if (core.isDebug()) { + args.push("-v"); + } + const xarPath = yield io.which("xar", true); + yield exec_1.exec(`"${xarPath}"`, _unique(args)); + return dest; + }); + } + exports.extractXar = extractXar; + function extractZip2(file, dest) { + return __awaiter2(this, void 0, void 0, function* () { + if (!file) { + throw new Error("parameter 'file' is required"); + } + dest = yield _createExtractFolder(dest); + if (IS_WINDOWS) { + yield extractZipWin(file, dest); + } else { + yield extractZipNix(file, dest); + } + return dest; + }); + } + exports.extractZip = extractZip2; + function extractZipWin(file, dest) { + return __awaiter2(this, void 0, void 0, function* () { + const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const pwshPath = yield io.which("pwsh", false); + if (pwshPath) { + const pwshCommand = [ + `$ErrorActionPreference = 'Stop' ;`, + `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`, + `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`, + `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;` + ].join(" "); + const args = [ + "-NoLogo", + "-NoProfile", + "-NonInteractive", + "-ExecutionPolicy", + "Unrestricted", + "-Command", + pwshCommand + ]; + core.debug(`Using pwsh at path: ${pwshPath}`); + yield exec_1.exec(`"${pwshPath}"`, args); + } else { + const powershellCommand = [ + `$ErrorActionPreference = 'Stop' ;`, + `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`, + `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`, + `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }` + ].join(" "); + const args = [ + "-NoLogo", + "-Sta", + "-NoProfile", + "-NonInteractive", + "-ExecutionPolicy", + "Unrestricted", + "-Command", + powershellCommand + ]; + const powershellPath = yield io.which("powershell", true); + core.debug(`Using powershell at path: ${powershellPath}`); + yield exec_1.exec(`"${powershellPath}"`, args); + } + }); + } + function extractZipNix(file, dest) { + return __awaiter2(this, void 0, void 0, function* () { + const unzipPath = yield io.which("unzip", true); + const args = [file]; + if (!core.isDebug()) { + args.unshift("-q"); + } + args.unshift("-o"); + yield exec_1.exec(`"${unzipPath}"`, args, { cwd: dest }); + }); + } + function cacheDir(sourceDir, tool, version3, arch) { + return __awaiter2(this, void 0, void 0, function* () { + version3 = semver.clean(version3) || version3; + arch = arch || os.arch(); + core.debug(`Caching tool ${tool} ${version3} ${arch}`); + core.debug(`source dir: ${sourceDir}`); + if (!fs.statSync(sourceDir).isDirectory()) { + throw new Error("sourceDir is not a directory"); + } + const destPath = yield _createToolPath(tool, version3, arch); + for (const itemName of fs.readdirSync(sourceDir)) { + const s = path.join(sourceDir, itemName); + yield io.cp(s, destPath, { recursive: true }); + } + _completeToolPath(tool, version3, arch); + return destPath; + }); + } + exports.cacheDir = cacheDir; + function cacheFile(sourceFile, targetFile, tool, version3, arch) { + return __awaiter2(this, void 0, void 0, function* () { + version3 = semver.clean(version3) || version3; + arch = arch || os.arch(); + core.debug(`Caching tool ${tool} ${version3} ${arch}`); + core.debug(`source file: ${sourceFile}`); + if (!fs.statSync(sourceFile).isFile()) { + throw new Error("sourceFile is not a file"); + } + const destFolder = yield _createToolPath(tool, version3, arch); + const destPath = path.join(destFolder, targetFile); + core.debug(`destination file ${destPath}`); + yield io.cp(sourceFile, destPath); + _completeToolPath(tool, version3, arch); + return destFolder; + }); + } + exports.cacheFile = cacheFile; + function find(toolName, versionSpec, arch) { + if (!toolName) { + throw new Error("toolName parameter is required"); + } + if (!versionSpec) { + throw new Error("versionSpec parameter is required"); + } + arch = arch || os.arch(); + if (!isExplicitVersion(versionSpec)) { + const localVersions = findAllVersions(toolName, arch); + const match = evaluateVersions(localVersions, versionSpec); + versionSpec = match; + } + let toolPath = ""; + if (versionSpec) { + versionSpec = semver.clean(versionSpec) || ""; + const cachePath = path.join(_getCacheDirectory(), toolName, versionSpec, arch); + core.debug(`checking cache: ${cachePath}`); + if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) { + core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); + toolPath = cachePath; + } else { + core.debug("not found"); + } + } + return toolPath; + } + exports.find = find; + function findAllVersions(toolName, arch) { + const versions = []; + arch = arch || os.arch(); + const toolPath = path.join(_getCacheDirectory(), toolName); + if (fs.existsSync(toolPath)) { + const children2 = fs.readdirSync(toolPath); + for (const child of children2) { + if (isExplicitVersion(child)) { + const fullPath = path.join(toolPath, child, arch || ""); + if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) { + versions.push(child); + } + } + } + } + return versions; + } + exports.findAllVersions = findAllVersions; + function getManifestFromRepo(owner, repo, auth, branch = "master") { + return __awaiter2(this, void 0, void 0, function* () { + let releases = []; + const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; + const http = new httpm.HttpClient("tool-cache"); + const headers = {}; + if (auth) { + core.debug("set auth"); + headers.authorization = auth; + } + const response = yield http.getJson(treeUrl, headers); + if (!response.result) { + return releases; + } + let manifestUrl = ""; + for (const item of response.result.tree) { + if (item.path === "versions-manifest.json") { + manifestUrl = item.url; + break; + } + } + headers["accept"] = "application/vnd.github.VERSION.raw"; + let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody(); + if (versionsRaw) { + versionsRaw = versionsRaw.replace(/^\uFEFF/, ""); + try { + releases = JSON.parse(versionsRaw); + } catch (_a) { + core.debug("Invalid json"); + } + } + return releases; + }); + } + exports.getManifestFromRepo = getManifestFromRepo; + function findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) { + return __awaiter2(this, void 0, void 0, function* () { + const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); + return match; + }); + } + exports.findFromManifest = findFromManifest; + function _createExtractFolder(dest) { + return __awaiter2(this, void 0, void 0, function* () { + if (!dest) { + dest = path.join(_getTempDirectory(), v4_1.default()); + } + yield io.mkdirP(dest); + return dest; + }); + } + function _createToolPath(tool, version3, arch) { + return __awaiter2(this, void 0, void 0, function* () { + const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version3) || version3, arch || ""); + core.debug(`destination ${folderPath}`); + const markerPath = `${folderPath}.complete`; + yield io.rmRF(folderPath); + yield io.rmRF(markerPath); + yield io.mkdirP(folderPath); + return folderPath; + }); + } + function _completeToolPath(tool, version3, arch) { + const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version3) || version3, arch || ""); + const markerPath = `${folderPath}.complete`; + fs.writeFileSync(markerPath, ""); + core.debug("finished caching tool"); + } + function isExplicitVersion(versionSpec) { + const c = semver.clean(versionSpec) || ""; + core.debug(`isExplicit: ${c}`); + const valid = semver.valid(c) != null; + core.debug(`explicit? ${valid}`); + return valid; + } + exports.isExplicitVersion = isExplicitVersion; + function evaluateVersions(versions, versionSpec) { + let version3 = ""; + core.debug(`evaluating ${versions.length} versions`); + versions = versions.sort((a, b) => { + if (semver.gt(a, b)) { + return 1; + } + return -1; + }); + for (let i = versions.length - 1; i >= 0; i--) { + const potential = versions[i]; + const satisfied = semver.satisfies(potential, versionSpec); + if (satisfied) { + version3 = potential; + break; + } + } + if (version3) { + core.debug(`matched: ${version3}`); + } else { + core.debug("match not found"); + } + return version3; + } + exports.evaluateVersions = evaluateVersions; + function _getCacheDirectory() { + const cacheDirectory = process.env["RUNNER_TOOL_CACHE"] || ""; + assert_1.ok(cacheDirectory, "Expected RUNNER_TOOL_CACHE to be defined"); + return cacheDirectory; + } + function _getTempDirectory() { + const tempDirectory = process.env["RUNNER_TEMP"] || ""; + assert_1.ok(tempDirectory, "Expected RUNNER_TEMP to be defined"); + return tempDirectory; + } + function _getGlobal(key, defaultValue) { + const value = global[key]; + return value !== void 0 ? value : defaultValue; + } + function _unique(values) { + return Array.from(new Set(values)); + } + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getOptions = void 0; + var core = __importStar2(require_core()); + function getOptions(copy) { + const result = { + followSymbolicLinks: true, + implicitDescendants: true, + omitBrokenSymbolicLinks: true + }; + if (copy) { + if (typeof copy.followSymbolicLinks === "boolean") { + result.followSymbolicLinks = copy.followSymbolicLinks; + core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + } + if (typeof copy.implicitDescendants === "boolean") { + result.implicitDescendants = copy.implicitDescendants; + core.debug(`implicitDescendants '${result.implicitDescendants}'`); + } + if (typeof copy.omitBrokenSymbolicLinks === "boolean") { + result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; + core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + } + } + return result; + } + exports.getOptions = getOptions; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +var require_internal_path_helper = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault2 = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.safeTrimTrailingSeparator = exports.normalizeSeparators = exports.hasRoot = exports.hasAbsoluteRoot = exports.ensureAbsoluteRoot = exports.dirname = void 0; + var path = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); + var IS_WINDOWS = process.platform === "win32"; + function dirname(p) { + p = safeTrimTrailingSeparator(p); + if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { + return p; + } + let result = path.dirname(p); + if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { + result = safeTrimTrailingSeparator(result); + } + return result; + } + exports.dirname = dirname; + function ensureAbsoluteRoot(root, itemPath) { + assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + if (hasAbsoluteRoot(itemPath)) { + return itemPath; + } + if (IS_WINDOWS) { + if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { + let cwd = process.cwd(); + assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { + if (itemPath.length === 2) { + return `${itemPath[0]}:\\${cwd.substr(3)}`; + } else { + if (!cwd.endsWith("\\")) { + cwd += "\\"; + } + return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; + } + } else { + return `${itemPath[0]}:\\${itemPath.substr(2)}`; + } + } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { + const cwd = process.cwd(); + assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + return `${cwd[0]}:\\${itemPath.substr(1)}`; + } + } + assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { + } else { + root += path.sep; + } + return root + itemPath; + } + exports.ensureAbsoluteRoot = ensureAbsoluteRoot; + function hasAbsoluteRoot(itemPath) { + assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + itemPath = normalizeSeparators(itemPath); + if (IS_WINDOWS) { + return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); + } + return itemPath.startsWith("/"); + } + exports.hasAbsoluteRoot = hasAbsoluteRoot; + function hasRoot(itemPath) { + assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + itemPath = normalizeSeparators(itemPath); + if (IS_WINDOWS) { + return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); + } + return itemPath.startsWith("/"); + } + exports.hasRoot = hasRoot; + function normalizeSeparators(p) { + p = p || ""; + if (IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + const isUnc = /^\\\\+[^\\]/.test(p); + return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + exports.normalizeSeparators = normalizeSeparators; + function safeTrimTrailingSeparator(p) { + if (!p) { + return ""; + } + p = normalizeSeparators(p); + if (!p.endsWith(path.sep)) { + return p; + } + if (p === path.sep) { + return p; + } + if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { + return p; + } + return p.substr(0, p.length - 1); + } + exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +var require_internal_match_kind = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MatchKind = void 0; + var MatchKind; + (function(MatchKind2) { + MatchKind2[MatchKind2["None"] = 0] = "None"; + MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; + MatchKind2[MatchKind2["File"] = 2] = "File"; + MatchKind2[MatchKind2["All"] = 3] = "All"; + })(MatchKind = exports.MatchKind || (exports.MatchKind = {})); + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +var require_internal_pattern_helper = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.partialMatch = exports.match = exports.getSearchPaths = void 0; + var pathHelper = __importStar2(require_internal_path_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var IS_WINDOWS = process.platform === "win32"; + function getSearchPaths(patterns) { + patterns = patterns.filter((x) => !x.negate); + const searchPathMap = {}; + for (const pattern of patterns) { + const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; + searchPathMap[key] = "candidate"; + } + const result = []; + for (const pattern of patterns) { + const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; + if (searchPathMap[key] === "included") { + continue; + } + let foundAncestor = false; + let tempKey = key; + let parent = pathHelper.dirname(tempKey); + while (parent !== tempKey) { + if (searchPathMap[parent]) { + foundAncestor = true; + break; + } + tempKey = parent; + parent = pathHelper.dirname(tempKey); + } + if (!foundAncestor) { + result.push(pattern.searchPath); + searchPathMap[key] = "included"; + } + } + return result; + } + exports.getSearchPaths = getSearchPaths; + function match(patterns, itemPath) { + let result = internal_match_kind_1.MatchKind.None; + for (const pattern of patterns) { + if (pattern.negate) { + result &= ~pattern.match(itemPath); + } else { + result |= pattern.match(itemPath); + } + } + return result; + } + exports.match = match; + function partialMatch(patterns, itemPath) { + return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); + } + exports.partialMatch = partialMatch; + } +}); + +// node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "node_modules/concat-map/index.js"(exports, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) + res.push.apply(res, x); + else + res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "node_modules/balanced-match/index.js"(exports, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str) { + if (a instanceof RegExp) + a = maybeMatch(a, str); + if (b instanceof RegExp) + b = maybeMatch(b, str); + var r = range(a, b, str); + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + if (a === b) { + return [ai, bi]; + } + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "node_modules/brace-expansion/index.js"(exports, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str) { + if (!str) + return [""]; + var parts = []; + var m = balanced("{", "}", str); + if (!m) + return str.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str) { + if (!str) + return []; + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); + } + return expand(escapeBraces(str), true).map(unescapeBraces); + } + function embrace(str) { + return "{" + str + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte(i, y) { + return i >= y; + } + function expand(str, isTop) { + var expansions = []; + var m = balanced("{", "}", str); + if (!m || /\$$/.test(m.pre)) + return [str]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str = m.pre + "{" + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "node_modules/minimatch/minimatch.js"(exports, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path = function() { + try { + return require("path"); + } catch (e) { + } + }() || { + sep: "/" + }; + minimatch.sep = path.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set, c) { + set[c] = true; + return set; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) + options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) + options = {}; + pattern = pattern.trim(); + if (path.sep !== "/") { + pattern = pattern.split(path.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set = this.globSet = this.braceExpand(); + if (options.debug) + this.debug = function debug() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set); + set = this.globParts = set.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set); + set = set.map(function(s, si, set2) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set); + set = set.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set); + this.set = set; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) + return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) + this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse3; + var SUBPARSE = {}; + function parse3(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") + return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) + c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) + clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) + return this.regexp; + var set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) + re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") + partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) + return false; + if (this.empty) + return f === ""; + if (f === "/" && partial) + return true; + var options = this.options; + if (path.sep !== "/") { + f = f.split(path.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set = this.set; + this.debug(this.pattern, "set", set); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) + break; + } + for (i = 0; i < set.length; i++) { + var pattern = set[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) + return true; + return !this.negate; + } + } + if (options.flipNegate) + return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug( + "matchOne", + { "this": this, file, pattern } + ); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) + return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") + return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) + return true; + } + return false; + } + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) + return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +var require_internal_path = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault2 = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Path = void 0; + var path = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); + var IS_WINDOWS = process.platform === "win32"; + var Path = class { + /** + * Constructs a Path + * @param itemPath Path or array of segments + */ + constructor(itemPath) { + this.segments = []; + if (typeof itemPath === "string") { + assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + if (!pathHelper.hasRoot(itemPath)) { + this.segments = itemPath.split(path.sep); + } else { + let remaining = itemPath; + let dir = pathHelper.dirname(remaining); + while (dir !== remaining) { + const basename = path.basename(remaining); + this.segments.unshift(basename); + remaining = dir; + dir = pathHelper.dirname(remaining); + } + this.segments.unshift(remaining); + } + } else { + assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + for (let i = 0; i < itemPath.length; i++) { + let segment = itemPath[i]; + assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + segment = pathHelper.normalizeSeparators(itemPath[i]); + if (i === 0 && pathHelper.hasRoot(segment)) { + segment = pathHelper.safeTrimTrailingSeparator(segment); + assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + this.segments.push(segment); + } else { + assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`); + this.segments.push(segment); + } + } + } + } + /** + * Converts the path to it's string representation + */ + toString() { + let result = this.segments[0]; + let skipSlash = result.endsWith(path.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + for (let i = 1; i < this.segments.length; i++) { + if (skipSlash) { + skipSlash = false; + } else { + result += path.sep; + } + result += this.segments[i]; + } + return result; + } + }; + exports.Path = Path; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +var require_internal_pattern = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault2 = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Pattern = void 0; + var os = __importStar2(require("os")); + var path = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); + var minimatch_1 = require_minimatch(); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_path_1 = require_internal_path(); + var IS_WINDOWS = process.platform === "win32"; + var Pattern = class _Pattern { + constructor(patternOrNegate, isImplicitPattern = false, segments, homedir2) { + this.negate = false; + let pattern; + if (typeof patternOrNegate === "string") { + pattern = patternOrNegate.trim(); + } else { + segments = segments || []; + assert_1.default(segments.length, `Parameter 'segments' must not empty`); + const root = _Pattern.getLiteral(segments[0]); + assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + pattern = new internal_path_1.Path(segments).toString().trim(); + if (patternOrNegate) { + pattern = `!${pattern}`; + } + } + while (pattern.startsWith("!")) { + this.negate = !this.negate; + pattern = pattern.substr(1).trim(); + } + pattern = _Pattern.fixupPattern(pattern, homedir2); + this.segments = new internal_path_1.Path(pattern).segments; + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path.sep); + pattern = pathHelper.safeTrimTrailingSeparator(pattern); + let foundGlob = false; + const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); + this.searchPath = new internal_path_1.Path(searchSegments).toString(); + this.rootRegExp = new RegExp(_Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? "i" : ""); + this.isImplicitPattern = isImplicitPattern; + const minimatchOptions = { + dot: true, + nobrace: true, + nocase: IS_WINDOWS, + nocomment: true, + noext: true, + nonegate: true + }; + pattern = IS_WINDOWS ? pattern.replace(/\\/g, "/") : pattern; + this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); + } + /** + * Matches the pattern against the specified path + */ + match(itemPath) { + if (this.segments[this.segments.length - 1] === "**") { + itemPath = pathHelper.normalizeSeparators(itemPath); + if (!itemPath.endsWith(path.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path.sep}`; + } + } else { + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + } + if (this.minimatch.match(itemPath)) { + return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; + } + return internal_match_kind_1.MatchKind.None; + } + /** + * Indicates whether the pattern may match descendants of the specified path + */ + partialMatch(itemPath) { + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + if (pathHelper.dirname(itemPath) === itemPath) { + return this.rootRegExp.test(itemPath); + } + return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); + } + /** + * Escapes glob patterns within a path + */ + static globEscape(s) { + return (IS_WINDOWS ? s : s.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); + } + /** + * Normalizes slashes and ensures absolute root + */ + static fixupPattern(pattern, homedir2) { + assert_1.default(pattern, "pattern cannot be empty"); + const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); + assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + pattern = pathHelper.normalizeSeparators(pattern); + if (pattern === "." || pattern.startsWith(`.${path.sep}`)) { + pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); + } else if (pattern === "~" || pattern.startsWith(`~${path.sep}`)) { + homedir2 = homedir2 || os.homedir(); + assert_1.default(homedir2, "Unable to determine HOME directory"); + assert_1.default(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); + pattern = _Pattern.globEscape(homedir2) + pattern.substr(1); + } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { + let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); + if (pattern.length > 2 && !root.endsWith("\\")) { + root += "\\"; + } + pattern = _Pattern.globEscape(root) + pattern.substr(2); + } else if (IS_WINDOWS && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { + let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); + if (!root.endsWith("\\")) { + root += "\\"; + } + pattern = _Pattern.globEscape(root) + pattern.substr(1); + } else { + pattern = pathHelper.ensureAbsoluteRoot(_Pattern.globEscape(process.cwd()), pattern); + } + return pathHelper.normalizeSeparators(pattern); + } + /** + * Attempts to unescape a pattern segment to create a literal path segment. + * Otherwise returns empty string. + */ + static getLiteral(segment) { + let literal = ""; + for (let i = 0; i < segment.length; i++) { + const c = segment[i]; + if (c === "\\" && !IS_WINDOWS && i + 1 < segment.length) { + literal += segment[++i]; + continue; + } else if (c === "*" || c === "?") { + return ""; + } else if (c === "[" && i + 1 < segment.length) { + let set = ""; + let closed = -1; + for (let i2 = i + 1; i2 < segment.length; i2++) { + const c2 = segment[i2]; + if (c2 === "\\" && !IS_WINDOWS && i2 + 1 < segment.length) { + set += segment[++i2]; + continue; + } else if (c2 === "]") { + closed = i2; + break; + } else { + set += c2; + } + } + if (closed >= 0) { + if (set.length > 1) { + return ""; + } + if (set) { + literal += set; + i = closed; + continue; + } + } + } + literal += c; + } + return literal; + } + /** + * Escapes regexp special characters + * https://javascript.info/regexp-escaping + */ + static regExpEscape(s) { + return s.replace(/[[\\^$.|?*+()]/g, "\\$&"); + } + }; + exports.Pattern = Pattern; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +var require_internal_search_state = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SearchState = void 0; + var SearchState = class { + constructor(path, level) { + this.path = path; + this.level = level; + } + }; + exports.SearchState = SearchState; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +var require_internal_globber = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports) { + "use strict"; + var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports && exports.__asyncValues || function(o) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d }); + }, reject); + } + }; + var __await2 = exports && exports.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); + }; + var __asyncGenerator2 = exports && exports.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) + resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DefaultGlobber = void 0; + var core = __importStar2(require_core()); + var fs = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter2(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues2(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) + yield _a.call(_b); + } finally { + if (e_1) + throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core.debug(`Search path '${searchPath}'`); + try { + yield __await2(fs.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await2( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await2(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await2(fs.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await2(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter2(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter2(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports) { + "use strict"; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create(patterns, options) { + return __awaiter2(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports.create = create; + } +}); + +// node_modules/uuid/v1.js +var require_v1 = __commonJS({ + "node_modules/uuid/v1.js"(exports, module2) { + var rng3 = require_rng(); + var bytesToUuid = require_bytesToUuid(); + var _nodeId3; + var _clockseq3; + var _lastMSecs3 = 0; + var _lastNSecs3 = 0; + function v13(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + options = options || {}; + var node = options.node || _nodeId3; + var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq3; + if (node == null || clockseq == null) { + var seedBytes = rng3(); + if (node == null) { + node = _nodeId3 = [ + seedBytes[0] | 1, + seedBytes[1], + seedBytes[2], + seedBytes[3], + seedBytes[4], + seedBytes[5] + ]; + } + if (clockseq == null) { + clockseq = _clockseq3 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + var msecs = options.msecs !== void 0 ? options.msecs : (/* @__PURE__ */ new Date()).getTime(); + var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs3 + 1; + var dt = msecs - _lastMSecs3 + (nsecs - _lastNSecs3) / 1e4; + if (dt < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt < 0 || msecs > _lastMSecs3) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs3 = msecs; + _lastNSecs3 = nsecs; + _clockseq3 = clockseq; + msecs += 122192928e5; + var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b[i++] = tl >>> 24 & 255; + b[i++] = tl >>> 16 & 255; + b[i++] = tl >>> 8 & 255; + b[i++] = tl & 255; + var tmh = msecs / 4294967296 * 1e4 & 268435455; + b[i++] = tmh >>> 8 & 255; + b[i++] = tmh & 255; + b[i++] = tmh >>> 24 & 15 | 16; + b[i++] = tmh >>> 16 & 255; + b[i++] = clockseq >>> 8 | 128; + b[i++] = clockseq & 255; + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + return buf ? buf : bytesToUuid(b); + } + module2.exports = v13; + } +}); + +// node_modules/uuid/index.js +var require_uuid = __commonJS({ + "node_modules/uuid/index.js"(exports, module2) { + var v13 = require_v1(); + var v43 = require_v4(); + var uuid = v43; + uuid.v1 = v13; + uuid.v4 = v43; + module2.exports = uuid; + } +}); + +// node_modules/@actions/cache/lib/internal/constants.js +var require_constants = __commonJS({ + "node_modules/@actions/cache/lib/internal/constants.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var CacheFilename; + (function(CacheFilename2) { + CacheFilename2["Gzip"] = "cache.tgz"; + CacheFilename2["Zstd"] = "cache.tzst"; + })(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {})); + var CompressionMethod; + (function(CompressionMethod2) { + CompressionMethod2["Gzip"] = "gzip"; + CompressionMethod2["ZstdWithoutLong"] = "zstd-without-long"; + CompressionMethod2["Zstd"] = "zstd"; + })(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {})); + var ArchiveToolType; + (function(ArchiveToolType2) { + ArchiveToolType2["GNU"] = "gnu"; + ArchiveToolType2["BSD"] = "bsd"; + })(ArchiveToolType = exports.ArchiveToolType || (exports.ArchiveToolType = {})); + exports.DefaultRetryAttempts = 2; + exports.DefaultRetryDelay = 5e3; + exports.SocketTimeout = 5e3; + exports.GnuTarPathOnWindows = `${process.env["PROGRAMFILES"]}\\Git\\usr\\bin\\tar.exe`; + exports.SystemTarPathOnWindows = `${process.env["SYSTEMDRIVE"]}\\Windows\\System32\\tar.exe`; + exports.TarFilename = "cache.tar"; + exports.ManifestFilename = "manifest.txt"; + } +}); + +// node_modules/@actions/cache/lib/internal/cacheUtils.js +var require_cacheUtils = __commonJS({ + "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports) { + "use strict"; + var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports && exports.__asyncValues || function(o) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d }); + }, reject); + } + }; + var __importStar2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) + result[k] = mod[k]; + } + result["default"] = mod; + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + var core = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob = __importStar2(require_glob()); + var io = __importStar2(require_io()); + var fs = __importStar2(require("fs")); + var path = __importStar2(require("path")); + var semver = __importStar2(require_semver()); + var util = __importStar2(require("util")); + var uuid_1 = require_uuid(); + var constants_1 = require_constants(); + function createTempDirectory() { + return __awaiter2(this, void 0, void 0, function* () { + const IS_WINDOWS = process.platform === "win32"; + let tempDirectory = process.env["RUNNER_TEMP"] || ""; + if (!tempDirectory) { + let baseLocation; + if (IS_WINDOWS) { + baseLocation = process.env["USERPROFILE"] || "C:\\"; + } else { + if (process.platform === "darwin") { + baseLocation = "/Users"; + } else { + baseLocation = "/home"; + } + } + tempDirectory = path.join(baseLocation, "actions", "temp"); + } + const dest = path.join(tempDirectory, uuid_1.v4()); + yield io.mkdirP(dest); + return dest; + }); + } + exports.createTempDirectory = createTempDirectory; + function getArchiveFileSizeInBytes(filePath) { + return fs.statSync(filePath).size; + } + exports.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + function resolvePaths(patterns) { + var e_1, _a; + var _b; + return __awaiter2(this, void 0, void 0, function* () { + const paths = []; + const workspace = (_b = process.env["GITHUB_WORKSPACE"]) !== null && _b !== void 0 ? _b : process.cwd(); + const globber = yield glob.create(patterns.join("\n"), { + implicitDescendants: false + }); + try { + for (var _c = __asyncValues2(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done; ) { + const file = _d.value; + const relativeFile = path.relative(workspace, file).replace(new RegExp(`\\${path.sep}`, "g"), "/"); + core.debug(`Matched: ${relativeFile}`); + if (relativeFile === "") { + paths.push("."); + } else { + paths.push(`${relativeFile}`); + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_d && !_d.done && (_a = _c.return)) + yield _a.call(_c); + } finally { + if (e_1) + throw e_1.error; + } + } + return paths; + }); + } + exports.resolvePaths = resolvePaths; + function unlinkFile(filePath) { + return __awaiter2(this, void 0, void 0, function* () { + return util.promisify(fs.unlink)(filePath); + }); + } + exports.unlinkFile = unlinkFile; + function getVersion(app, additionalArgs = []) { + return __awaiter2(this, void 0, void 0, function* () { + let versionOutput = ""; + additionalArgs.push("--version"); + core.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + try { + yield exec.exec(`${app}`, additionalArgs, { + ignoreReturnCode: true, + silent: true, + listeners: { + stdout: (data) => versionOutput += data.toString(), + stderr: (data) => versionOutput += data.toString() + } + }); + } catch (err) { + core.debug(err.message); + } + versionOutput = versionOutput.trim(); + core.debug(versionOutput); + return versionOutput; + }); + } + function getCompressionMethod() { + return __awaiter2(this, void 0, void 0, function* () { + const versionOutput = yield getVersion("zstd", ["--quiet"]); + const version3 = semver.clean(versionOutput); + core.debug(`zstd version: ${version3}`); + if (versionOutput === "") { + return constants_1.CompressionMethod.Gzip; + } else { + return constants_1.CompressionMethod.ZstdWithoutLong; + } + }); + } + exports.getCompressionMethod = getCompressionMethod; + function getCacheFileName(compressionMethod) { + return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; + } + exports.getCacheFileName = getCacheFileName; + function getGnuTarPathOnWindows() { + return __awaiter2(this, void 0, void 0, function* () { + if (fs.existsSync(constants_1.GnuTarPathOnWindows)) { + return constants_1.GnuTarPathOnWindows; + } + const versionOutput = yield getVersion("tar"); + return versionOutput.toLowerCase().includes("gnu tar") ? io.which("tar") : ""; + }); + } + exports.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + function assertDefined(name, value) { + if (value === void 0) { + throw Error(`Expected ${name} but value was undefiend`); + } + return value; + } + exports.assertDefined = assertDefined; + function isGhes() { + const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); + return ghUrl.hostname.toUpperCase() !== "GITHUB.COM"; + } + exports.isGhes = isGhes; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/rng.js +function rng2() { + if (poolPtr2 > rnds8Pool2.length - 16) { + import_crypto4.default.randomFillSync(rnds8Pool2); + poolPtr2 = 0; + } + return rnds8Pool2.slice(poolPtr2, poolPtr2 += 16); +} +var import_crypto4, rnds8Pool2, poolPtr2; +var init_rng2 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/rng.js"() { + import_crypto4 = __toESM(require("crypto")); + rnds8Pool2 = new Uint8Array(256); + poolPtr2 = rnds8Pool2.length; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/regex.js +var regex_default2; +var init_regex2 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/regex.js"() { + regex_default2 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/validate.js +function validate2(uuid) { + return typeof uuid === "string" && regex_default2.test(uuid); +} +var validate_default2; +var init_validate2 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/validate.js"() { + init_regex2(); + validate_default2 = validate2; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/stringify.js +function stringify2(arr, offset = 0) { + const uuid = (byteToHex2[arr[offset + 0]] + byteToHex2[arr[offset + 1]] + byteToHex2[arr[offset + 2]] + byteToHex2[arr[offset + 3]] + "-" + byteToHex2[arr[offset + 4]] + byteToHex2[arr[offset + 5]] + "-" + byteToHex2[arr[offset + 6]] + byteToHex2[arr[offset + 7]] + "-" + byteToHex2[arr[offset + 8]] + byteToHex2[arr[offset + 9]] + "-" + byteToHex2[arr[offset + 10]] + byteToHex2[arr[offset + 11]] + byteToHex2[arr[offset + 12]] + byteToHex2[arr[offset + 13]] + byteToHex2[arr[offset + 14]] + byteToHex2[arr[offset + 15]]).toLowerCase(); + if (!validate_default2(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; +} +var byteToHex2, stringify_default2; +var init_stringify2 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/stringify.js"() { + init_validate2(); + byteToHex2 = []; + for (let i = 0; i < 256; ++i) { + byteToHex2.push((i + 256).toString(16).substr(1)); + } + stringify_default2 = stringify2; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v1.js +function v12(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId2; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq2; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng2)(); + if (node == null) { + node = _nodeId2 = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + if (clockseq == null) { + clockseq = _clockseq2 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs2 + 1; + const dt = msecs - _lastMSecs2 + (nsecs - _lastNSecs2) / 1e4; + if (dt < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt < 0 || msecs > _lastMSecs2) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs2 = msecs; + _lastNSecs2 = nsecs; + _clockseq2 = clockseq; + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b[i++] = tl >>> 24 & 255; + b[i++] = tl >>> 16 & 255; + b[i++] = tl >>> 8 & 255; + b[i++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + b[i++] = tmh >>> 8 & 255; + b[i++] = tmh & 255; + b[i++] = tmh >>> 24 & 15 | 16; + b[i++] = tmh >>> 16 & 255; + b[i++] = clockseq >>> 8 | 128; + b[i++] = clockseq & 255; + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + return buf || stringify_default2(b); +} +var _nodeId2, _clockseq2, _lastMSecs2, _lastNSecs2, v1_default2; +var init_v12 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v1.js"() { + init_rng2(); + init_stringify2(); + _lastMSecs2 = 0; + _lastNSecs2 = 0; + v1_default2 = v12; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/parse.js +function parse2(uuid) { + if (!validate_default2(uuid)) { + throw TypeError("Invalid UUID"); + } + let v; + const arr = new Uint8Array(16); + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 255; + arr[2] = v >>> 8 & 255; + arr[3] = v & 255; + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 255; + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 255; + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 255; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v / 4294967296 & 255; + arr[12] = v >>> 24 & 255; + arr[13] = v >>> 16 & 255; + arr[14] = v >>> 8 & 255; + arr[15] = v & 255; + return arr; +} +var parse_default2; +var init_parse2 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/parse.js"() { + init_validate2(); + parse_default2 = parse2; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v35.js +function stringToBytes2(str) { + str = unescape(encodeURIComponent(str)); + const bytes = []; + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + return bytes; +} +function v35_default2(name, version3, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === "string") { + value = stringToBytes2(value); + } + if (typeof namespace === "string") { + namespace = parse_default2(namespace); + } + if (namespace.length !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version3; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + return buf; + } + return stringify_default2(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS2; + generateUUID.URL = URL3; + return generateUUID; +} +var DNS2, URL3; +var init_v352 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v35.js"() { + init_stringify2(); + init_parse2(); + DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/md5.js +function md52(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto5.default.createHash("md5").update(bytes).digest(); +} +var import_crypto5, md5_default2; +var init_md52 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/md5.js"() { + import_crypto5 = __toESM(require("crypto")); + md5_default2 = md52; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v3.js +var v32, v3_default2; +var init_v32 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v3.js"() { + init_v352(); + init_md52(); + v32 = v35_default2("v3", 48, md5_default2); + v3_default2 = v32; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v4.js +function v42(options, buf, offset) { + options = options || {}; + const rnds = options.random || (options.rng || rng2)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + return buf; + } + return stringify_default2(rnds); +} +var v4_default2; +var init_v42 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v4.js"() { + init_rng2(); + init_stringify2(); + v4_default2 = v42; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/sha1.js +function sha12(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto6.default.createHash("sha1").update(bytes).digest(); +} +var import_crypto6, sha1_default2; +var init_sha12 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/sha1.js"() { + import_crypto6 = __toESM(require("crypto")); + sha1_default2 = sha12; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v5.js +var v52, v5_default2; +var init_v52 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v5.js"() { + init_v352(); + init_sha12(); + v52 = v35_default2("v5", 80, sha1_default2); + v5_default2 = v52; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/nil.js +var nil_default2; +var init_nil2 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/nil.js"() { + nil_default2 = "00000000-0000-0000-0000-000000000000"; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/version.js +function version2(uuid) { + if (!validate_default2(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.substr(14, 1), 16); +} +var version_default2; +var init_version2 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/version.js"() { + init_validate2(); + version_default2 = version2; + } +}); + +// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/index.js +var esm_node_exports2 = {}; +__export(esm_node_exports2, { + NIL: () => nil_default2, + parse: () => parse_default2, + stringify: () => stringify_default2, + v1: () => v1_default2, + v3: () => v3_default2, + v4: () => v4_default2, + v5: () => v5_default2, + validate: () => validate_default2, + version: () => version_default2 +}); +var init_esm_node2 = __esm({ + "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/index.js"() { + init_v12(); + init_v32(); + init_v42(); + init_v52(); + init_nil2(); + init_version2(); + init_validate2(); + init_stringify2(); + init_parse2(); + } +}); + +// node_modules/tslib/tslib.es6.js +var tslib_es6_exports = {}; +__export(tslib_es6_exports, { + __assign: () => __assign, + __asyncDelegator: () => __asyncDelegator, + __asyncGenerator: () => __asyncGenerator, + __asyncValues: () => __asyncValues, + __await: () => __await, + __awaiter: () => __awaiter, + __classPrivateFieldGet: () => __classPrivateFieldGet, + __classPrivateFieldIn: () => __classPrivateFieldIn, + __classPrivateFieldSet: () => __classPrivateFieldSet, + __createBinding: () => __createBinding, + __decorate: () => __decorate, + __esDecorate: () => __esDecorate, + __exportStar: () => __exportStar, + __extends: () => __extends, + __generator: () => __generator, + __importDefault: () => __importDefault, + __importStar: () => __importStar, + __makeTemplateObject: () => __makeTemplateObject, + __metadata: () => __metadata, + __param: () => __param, + __propKey: () => __propKey, + __read: () => __read, + __rest: () => __rest, + __runInitializers: () => __runInitializers, + __setFunctionName: () => __setFunctionName, + __spread: () => __spread, + __spreadArray: () => __spreadArray, + __spreadArrays: () => __spreadArrays, + __values: () => __values2 +}); +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} +function __rest(s, e) { + var t = {}; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") + r = Reflect.decorate(decorators, target, key, desc); + else + for (var i = decorators.length - 1; i >= 0; i--) + if (d = decorators[i]) + r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} +function __param(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; +} +function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { + if (f !== void 0 && typeof f !== "function") + throw new TypeError("Function expected"); + return f; + } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) + context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) + context.access[p] = contextIn.access[p]; + context.addInitializer = function(f) { + if (done) + throw new TypeError("Cannot add initializers after decoration has completed"); + extraInitializers.push(accept(f || null)); + }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) + continue; + if (result === null || typeof result !== "object") + throw new TypeError("Object expected"); + if (_ = accept(result.get)) + descriptor.get = _; + if (_ = accept(result.set)) + descriptor.set = _; + if (_ = accept(result.init)) + initializers.push(_); + } else if (_ = accept(result)) { + if (kind === "field") + initializers.push(_); + else + descriptor[key] = _; + } + } + if (target) + Object.defineProperty(target, contextIn.name, descriptor); + done = true; +} +function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +} +function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +} +function __setFunctionName(f, name, prefix) { + if (typeof name === "symbol") + name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +} +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") + return Reflect.metadata(metadataKey, metadataValue); +} +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +} +function __exportStar(m, o) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) + __createBinding(o, m, p); +} +function __values2(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; +} +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) + s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) + for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) + ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) + resume(q[0][0], q[0][1]); + } +} +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function(e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function() { + return this; + }, i; + function verb(n, f) { + i[n] = o[n] ? function(v) { + return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; + } : f; + } +} +function __asyncValues(o) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values2 === "function" ? __values2(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d }); + }, reject); + } +} +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } else { + cooked.raw = raw; + } + return cooked; +} +function __importStar(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { default: mod }; +} +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) + throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") + throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) + throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; +} +function __classPrivateFieldIn(state, receiver) { + if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") + throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); +} +var extendStatics, __assign, __createBinding, __setModuleDefault; +var init_tslib_es6 = __esm({ + "node_modules/tslib/tslib.es6.js"() { + extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + __assign = function() { + __assign = Object.assign || function __assign2(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + __createBinding = Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }; + __setModuleDefault = Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }; + } +}); + +// node_modules/xml2js/lib/defaults.js +var require_defaults = __commonJS({ + "node_modules/xml2js/lib/defaults.js"(exports) { + (function() { + exports.defaults = { + "0.1": { + explicitCharkey: false, + trim: true, + normalize: true, + normalizeTags: false, + attrkey: "@", + charkey: "#", + explicitArray: false, + ignoreAttrs: false, + mergeAttrs: false, + explicitRoot: false, + validator: null, + xmlns: false, + explicitChildren: false, + childkey: "@@", + charsAsChildren: false, + includeWhiteChars: false, + async: false, + strict: true, + attrNameProcessors: null, + attrValueProcessors: null, + tagNameProcessors: null, + valueProcessors: null, + emptyTag: "" + }, + "0.2": { + explicitCharkey: false, + trim: false, + normalize: false, + normalizeTags: false, + attrkey: "$", + charkey: "_", + explicitArray: true, + ignoreAttrs: false, + mergeAttrs: false, + explicitRoot: true, + validator: null, + xmlns: false, + explicitChildren: false, + preserveChildrenOrder: false, + childkey: "$$", + charsAsChildren: false, + includeWhiteChars: false, + async: false, + strict: true, + attrNameProcessors: null, + attrValueProcessors: null, + tagNameProcessors: null, + valueProcessors: null, + rootName: "root", + xmldec: { + "version": "1.0", + "encoding": "UTF-8", + "standalone": true + }, + doctype: null, + renderOpts: { + "pretty": true, + "indent": " ", + "newline": "\n" + }, + headless: false, + chunkSize: 1e4, + emptyTag: "", + cdata: false + } + }; + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/Utility.js +var require_Utility = __commonJS({ + "node_modules/xmlbuilder/lib/Utility.js"(exports, module2) { + (function() { + var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject, slice = [].slice, hasProp = {}.hasOwnProperty; + assign = function() { + var i, key, len, source, sources, target; + target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : []; + if (isFunction(Object.assign)) { + Object.assign.apply(null, arguments); + } else { + for (i = 0, len = sources.length; i < len; i++) { + source = sources[i]; + if (source != null) { + for (key in source) { + if (!hasProp.call(source, key)) + continue; + target[key] = source[key]; + } + } + } + } + return target; + }; + isFunction = function(val) { + return !!val && Object.prototype.toString.call(val) === "[object Function]"; + }; + isObject = function(val) { + var ref; + return !!val && ((ref = typeof val) === "function" || ref === "object"); + }; + isArray = function(val) { + if (isFunction(Array.isArray)) { + return Array.isArray(val); + } else { + return Object.prototype.toString.call(val) === "[object Array]"; + } + }; + isEmpty = function(val) { + var key; + if (isArray(val)) { + return !val.length; + } else { + for (key in val) { + if (!hasProp.call(val, key)) + continue; + return false; + } + return true; + } + }; + isPlainObject = function(val) { + var ctor, proto; + return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && typeof ctor === "function" && ctor instanceof ctor && Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object); + }; + getValue = function(obj) { + if (isFunction(obj.valueOf)) { + return obj.valueOf(); + } else { + return obj; + } + }; + module2.exports.assign = assign; + module2.exports.isFunction = isFunction; + module2.exports.isObject = isObject; + module2.exports.isArray = isArray; + module2.exports.isEmpty = isEmpty; + module2.exports.isPlainObject = isPlainObject; + module2.exports.getValue = getValue; + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDOMImplementation.js +var require_XMLDOMImplementation = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDOMImplementation.js"(exports, module2) { + (function() { + var XMLDOMImplementation; + module2.exports = XMLDOMImplementation = function() { + function XMLDOMImplementation2() { + } + XMLDOMImplementation2.prototype.hasFeature = function(feature, version3) { + return true; + }; + XMLDOMImplementation2.prototype.createDocumentType = function(qualifiedName, publicId, systemId) { + throw new Error("This DOM method is not implemented."); + }; + XMLDOMImplementation2.prototype.createDocument = function(namespaceURI, qualifiedName, doctype) { + throw new Error("This DOM method is not implemented."); + }; + XMLDOMImplementation2.prototype.createHTMLDocument = function(title) { + throw new Error("This DOM method is not implemented."); + }; + XMLDOMImplementation2.prototype.getFeature = function(feature, version3) { + throw new Error("This DOM method is not implemented."); + }; + return XMLDOMImplementation2; + }(); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js +var require_XMLDOMErrorHandler = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js"(exports, module2) { + (function() { + var XMLDOMErrorHandler; + module2.exports = XMLDOMErrorHandler = function() { + function XMLDOMErrorHandler2() { + } + XMLDOMErrorHandler2.prototype.handleError = function(error) { + throw new Error(error); + }; + return XMLDOMErrorHandler2; + }(); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDOMStringList.js +var require_XMLDOMStringList = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDOMStringList.js"(exports, module2) { + (function() { + var XMLDOMStringList; + module2.exports = XMLDOMStringList = function() { + function XMLDOMStringList2(arr) { + this.arr = arr || []; + } + Object.defineProperty(XMLDOMStringList2.prototype, "length", { + get: function() { + return this.arr.length; + } + }); + XMLDOMStringList2.prototype.item = function(index) { + return this.arr[index] || null; + }; + XMLDOMStringList2.prototype.contains = function(str) { + return this.arr.indexOf(str) !== -1; + }; + return XMLDOMStringList2; + }(); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDOMConfiguration.js +var require_XMLDOMConfiguration = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDOMConfiguration.js"(exports, module2) { + (function() { + var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList; + XMLDOMErrorHandler = require_XMLDOMErrorHandler(); + XMLDOMStringList = require_XMLDOMStringList(); + module2.exports = XMLDOMConfiguration = function() { + function XMLDOMConfiguration2() { + var clonedSelf; + this.defaultParams = { + "canonical-form": false, + "cdata-sections": false, + "comments": false, + "datatype-normalization": false, + "element-content-whitespace": true, + "entities": true, + "error-handler": new XMLDOMErrorHandler(), + "infoset": true, + "validate-if-schema": false, + "namespaces": true, + "namespace-declarations": true, + "normalize-characters": false, + "schema-location": "", + "schema-type": "", + "split-cdata-sections": true, + "validate": false, + "well-formed": true + }; + this.params = clonedSelf = Object.create(this.defaultParams); + } + Object.defineProperty(XMLDOMConfiguration2.prototype, "parameterNames", { + get: function() { + return new XMLDOMStringList(Object.keys(this.defaultParams)); + } + }); + XMLDOMConfiguration2.prototype.getParameter = function(name) { + if (this.params.hasOwnProperty(name)) { + return this.params[name]; + } else { + return null; + } + }; + XMLDOMConfiguration2.prototype.canSetParameter = function(name, value) { + return true; + }; + XMLDOMConfiguration2.prototype.setParameter = function(name, value) { + if (value != null) { + return this.params[name] = value; + } else { + return delete this.params[name]; + } + }; + return XMLDOMConfiguration2; + }(); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/NodeType.js +var require_NodeType = __commonJS({ + "node_modules/xmlbuilder/lib/NodeType.js"(exports, module2) { + (function() { + module2.exports = { + Element: 1, + Attribute: 2, + Text: 3, + CData: 4, + EntityReference: 5, + EntityDeclaration: 6, + ProcessingInstruction: 7, + Comment: 8, + Document: 9, + DocType: 10, + DocumentFragment: 11, + NotationDeclaration: 12, + Declaration: 201, + Raw: 202, + AttributeDeclaration: 203, + ElementDeclaration: 204, + Dummy: 205 + }; + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLAttribute.js +var require_XMLAttribute = __commonJS({ + "node_modules/xmlbuilder/lib/XMLAttribute.js"(exports, module2) { + (function() { + var NodeType, XMLAttribute, XMLNode; + NodeType = require_NodeType(); + XMLNode = require_XMLNode(); + module2.exports = XMLAttribute = function() { + function XMLAttribute2(parent, name, value) { + this.parent = parent; + if (this.parent) { + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + if (name == null) { + throw new Error("Missing attribute name. " + this.debugInfo(name)); + } + this.name = this.stringify.name(name); + this.value = this.stringify.attValue(value); + this.type = NodeType.Attribute; + this.isId = false; + this.schemaTypeInfo = null; + } + Object.defineProperty(XMLAttribute2.prototype, "nodeType", { + get: function() { + return this.type; + } + }); + Object.defineProperty(XMLAttribute2.prototype, "ownerElement", { + get: function() { + return this.parent; + } + }); + Object.defineProperty(XMLAttribute2.prototype, "textContent", { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ""; + } + }); + Object.defineProperty(XMLAttribute2.prototype, "namespaceURI", { + get: function() { + return ""; + } + }); + Object.defineProperty(XMLAttribute2.prototype, "prefix", { + get: function() { + return ""; + } + }); + Object.defineProperty(XMLAttribute2.prototype, "localName", { + get: function() { + return this.name; + } + }); + Object.defineProperty(XMLAttribute2.prototype, "specified", { + get: function() { + return true; + } + }); + XMLAttribute2.prototype.clone = function() { + return Object.create(this); + }; + XMLAttribute2.prototype.toString = function(options) { + return this.options.writer.attribute(this, this.options.writer.filterOptions(options)); + }; + XMLAttribute2.prototype.debugInfo = function(name) { + name = name || this.name; + if (name == null) { + return "parent: <" + this.parent.name + ">"; + } else { + return "attribute: {" + name + "}, parent: <" + this.parent.name + ">"; + } + }; + XMLAttribute2.prototype.isEqualNode = function(node) { + if (node.namespaceURI !== this.namespaceURI) { + return false; + } + if (node.prefix !== this.prefix) { + return false; + } + if (node.localName !== this.localName) { + return false; + } + if (node.value !== this.value) { + return false; + } + return true; + }; + return XMLAttribute2; + }(); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLNamedNodeMap.js +var require_XMLNamedNodeMap = __commonJS({ + "node_modules/xmlbuilder/lib/XMLNamedNodeMap.js"(exports, module2) { + (function() { + var XMLNamedNodeMap; + module2.exports = XMLNamedNodeMap = function() { + function XMLNamedNodeMap2(nodes) { + this.nodes = nodes; + } + Object.defineProperty(XMLNamedNodeMap2.prototype, "length", { + get: function() { + return Object.keys(this.nodes).length || 0; + } + }); + XMLNamedNodeMap2.prototype.clone = function() { + return this.nodes = null; + }; + XMLNamedNodeMap2.prototype.getNamedItem = function(name) { + return this.nodes[name]; + }; + XMLNamedNodeMap2.prototype.setNamedItem = function(node) { + var oldNode; + oldNode = this.nodes[node.nodeName]; + this.nodes[node.nodeName] = node; + return oldNode || null; + }; + XMLNamedNodeMap2.prototype.removeNamedItem = function(name) { + var oldNode; + oldNode = this.nodes[name]; + delete this.nodes[name]; + return oldNode || null; + }; + XMLNamedNodeMap2.prototype.item = function(index) { + return this.nodes[Object.keys(this.nodes)[index]] || null; + }; + XMLNamedNodeMap2.prototype.getNamedItemNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented."); + }; + XMLNamedNodeMap2.prototype.setNamedItemNS = function(node) { + throw new Error("This DOM method is not implemented."); + }; + XMLNamedNodeMap2.prototype.removeNamedItemNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented."); + }; + return XMLNamedNodeMap2; + }(); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLElement.js +var require_XMLElement = __commonJS({ + "node_modules/xmlbuilder/lib/XMLElement.js"(exports, module2) { + (function() { + var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + ref = require_Utility(), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue; + XMLNode = require_XMLNode(); + NodeType = require_NodeType(); + XMLAttribute = require_XMLAttribute(); + XMLNamedNodeMap = require_XMLNamedNodeMap(); + module2.exports = XMLElement = function(superClass) { + extend(XMLElement2, superClass); + function XMLElement2(parent, name, attributes) { + var child, j, len, ref1; + XMLElement2.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing element name. " + this.debugInfo()); + } + this.name = this.stringify.name(name); + this.type = NodeType.Element; + this.attribs = {}; + this.schemaTypeInfo = null; + if (attributes != null) { + this.attribute(attributes); + } + if (parent.type === NodeType.Document) { + this.isRoot = true; + this.documentObject = parent; + parent.rootObject = this; + if (parent.children) { + ref1 = parent.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (child.type === NodeType.DocType) { + child.name = this.name; + break; + } + } + } + } + } + Object.defineProperty(XMLElement2.prototype, "tagName", { + get: function() { + return this.name; + } + }); + Object.defineProperty(XMLElement2.prototype, "namespaceURI", { + get: function() { + return ""; + } + }); + Object.defineProperty(XMLElement2.prototype, "prefix", { + get: function() { + return ""; + } + }); + Object.defineProperty(XMLElement2.prototype, "localName", { + get: function() { + return this.name; + } + }); + Object.defineProperty(XMLElement2.prototype, "id", { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + Object.defineProperty(XMLElement2.prototype, "className", { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + Object.defineProperty(XMLElement2.prototype, "classList", { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + Object.defineProperty(XMLElement2.prototype, "attributes", { + get: function() { + if (!this.attributeMap || !this.attributeMap.nodes) { + this.attributeMap = new XMLNamedNodeMap(this.attribs); + } + return this.attributeMap; + } + }); + XMLElement2.prototype.clone = function() { + var att, attName, clonedSelf, ref1; + clonedSelf = Object.create(this); + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null; + } + clonedSelf.attribs = {}; + ref1 = this.attribs; + for (attName in ref1) { + if (!hasProp.call(ref1, attName)) + continue; + att = ref1[attName]; + clonedSelf.attribs[attName] = att.clone(); + } + clonedSelf.children = []; + this.children.forEach(function(child) { + var clonedChild; + clonedChild = child.clone(); + clonedChild.parent = clonedSelf; + return clonedSelf.children.push(clonedChild); + }); + return clonedSelf; + }; + XMLElement2.prototype.attribute = function(name, value) { + var attName, attValue; + if (name != null) { + name = getValue(name); + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) + continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (this.options.keepNullAttributes && value == null) { + this.attribs[name] = new XMLAttribute(this, name, ""); + } else if (value != null) { + this.attribs[name] = new XMLAttribute(this, name, value); + } + } + return this; + }; + XMLElement2.prototype.removeAttribute = function(name) { + var attName, j, len; + if (name == null) { + throw new Error("Missing attribute name. " + this.debugInfo()); + } + name = getValue(name); + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + attName = name[j]; + delete this.attribs[attName]; + } + } else { + delete this.attribs[name]; + } + return this; + }; + XMLElement2.prototype.toString = function(options) { + return this.options.writer.element(this, this.options.writer.filterOptions(options)); + }; + XMLElement2.prototype.att = function(name, value) { + return this.attribute(name, value); + }; + XMLElement2.prototype.a = function(name, value) { + return this.attribute(name, value); + }; + XMLElement2.prototype.getAttribute = function(name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].value; + } else { + return null; + } + }; + XMLElement2.prototype.setAttribute = function(name, value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.getAttributeNode = function(name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name]; + } else { + return null; + } + }; + XMLElement2.prototype.setAttributeNode = function(newAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.removeAttributeNode = function(oldAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.getElementsByTagName = function(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.getAttributeNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.removeAttributeNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.getAttributeNodeNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.setAttributeNodeNS = function(newAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.hasAttribute = function(name) { + return this.attribs.hasOwnProperty(name); + }; + XMLElement2.prototype.hasAttributeNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.setIdAttribute = function(name, isId) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].isId; + } else { + return isId; + } + }; + XMLElement2.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.setIdAttributeNode = function(idAttr, isId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.getElementsByTagName = function(tagname) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.getElementsByClassName = function(classNames) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLElement2.prototype.isEqualNode = function(node) { + var i, j, ref1; + if (!XMLElement2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { + return false; + } + if (node.namespaceURI !== this.namespaceURI) { + return false; + } + if (node.prefix !== this.prefix) { + return false; + } + if (node.localName !== this.localName) { + return false; + } + if (node.attribs.length !== this.attribs.length) { + return false; + } + for (i = j = 0, ref1 = this.attribs.length - 1; 0 <= ref1 ? j <= ref1 : j >= ref1; i = 0 <= ref1 ? ++j : --j) { + if (!this.attribs[i].isEqualNode(node.attribs[i])) { + return false; + } + } + return true; + }; + return XMLElement2; + }(XMLNode); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLCharacterData.js +var require_XMLCharacterData = __commonJS({ + "node_modules/xmlbuilder/lib/XMLCharacterData.js"(exports, module2) { + (function() { + var XMLCharacterData, XMLNode, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + XMLNode = require_XMLNode(); + module2.exports = XMLCharacterData = function(superClass) { + extend(XMLCharacterData2, superClass); + function XMLCharacterData2(parent) { + XMLCharacterData2.__super__.constructor.call(this, parent); + this.value = ""; + } + Object.defineProperty(XMLCharacterData2.prototype, "data", { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ""; + } + }); + Object.defineProperty(XMLCharacterData2.prototype, "length", { + get: function() { + return this.value.length; + } + }); + Object.defineProperty(XMLCharacterData2.prototype, "textContent", { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ""; + } + }); + XMLCharacterData2.prototype.clone = function() { + return Object.create(this); + }; + XMLCharacterData2.prototype.substringData = function(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLCharacterData2.prototype.appendData = function(arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLCharacterData2.prototype.insertData = function(offset, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLCharacterData2.prototype.deleteData = function(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLCharacterData2.prototype.replaceData = function(offset, count, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLCharacterData2.prototype.isEqualNode = function(node) { + if (!XMLCharacterData2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { + return false; + } + if (node.data !== this.data) { + return false; + } + return true; + }; + return XMLCharacterData2; + }(XMLNode); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLCData.js +var require_XMLCData = __commonJS({ + "node_modules/xmlbuilder/lib/XMLCData.js"(exports, module2) { + (function() { + var NodeType, XMLCData, XMLCharacterData, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + NodeType = require_NodeType(); + XMLCharacterData = require_XMLCharacterData(); + module2.exports = XMLCData = function(superClass) { + extend(XMLCData2, superClass); + function XMLCData2(parent, text) { + XMLCData2.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing CDATA text. " + this.debugInfo()); + } + this.name = "#cdata-section"; + this.type = NodeType.CData; + this.value = this.stringify.cdata(text); + } + XMLCData2.prototype.clone = function() { + return Object.create(this); + }; + XMLCData2.prototype.toString = function(options) { + return this.options.writer.cdata(this, this.options.writer.filterOptions(options)); + }; + return XMLCData2; + }(XMLCharacterData); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLComment.js +var require_XMLComment = __commonJS({ + "node_modules/xmlbuilder/lib/XMLComment.js"(exports, module2) { + (function() { + var NodeType, XMLCharacterData, XMLComment, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + NodeType = require_NodeType(); + XMLCharacterData = require_XMLCharacterData(); + module2.exports = XMLComment = function(superClass) { + extend(XMLComment2, superClass); + function XMLComment2(parent, text) { + XMLComment2.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing comment text. " + this.debugInfo()); + } + this.name = "#comment"; + this.type = NodeType.Comment; + this.value = this.stringify.comment(text); + } + XMLComment2.prototype.clone = function() { + return Object.create(this); + }; + XMLComment2.prototype.toString = function(options) { + return this.options.writer.comment(this, this.options.writer.filterOptions(options)); + }; + return XMLComment2; + }(XMLCharacterData); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDeclaration.js +var require_XMLDeclaration = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDeclaration.js"(exports, module2) { + (function() { + var NodeType, XMLDeclaration, XMLNode, isObject, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + isObject = require_Utility().isObject; + XMLNode = require_XMLNode(); + NodeType = require_NodeType(); + module2.exports = XMLDeclaration = function(superClass) { + extend(XMLDeclaration2, superClass); + function XMLDeclaration2(parent, version3, encoding, standalone) { + var ref; + XMLDeclaration2.__super__.constructor.call(this, parent); + if (isObject(version3)) { + ref = version3, version3 = ref.version, encoding = ref.encoding, standalone = ref.standalone; + } + if (!version3) { + version3 = "1.0"; + } + this.type = NodeType.Declaration; + this.version = this.stringify.xmlVersion(version3); + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding); + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone); + } + } + XMLDeclaration2.prototype.toString = function(options) { + return this.options.writer.declaration(this, this.options.writer.filterOptions(options)); + }; + return XMLDeclaration2; + }(XMLNode); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDTDAttList.js +var require_XMLDTDAttList = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDTDAttList.js"(exports, module2) { + (function() { + var NodeType, XMLDTDAttList, XMLNode, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + XMLNode = require_XMLNode(); + NodeType = require_NodeType(); + module2.exports = XMLDTDAttList = function(superClass) { + extend(XMLDTDAttList2, superClass); + function XMLDTDAttList2(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { + XMLDTDAttList2.__super__.constructor.call(this, parent); + if (elementName == null) { + throw new Error("Missing DTD element name. " + this.debugInfo()); + } + if (attributeName == null) { + throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName)); + } + if (!attributeType) { + throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName)); + } + if (!defaultValueType) { + throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName)); + } + if (defaultValueType.indexOf("#") !== 0) { + defaultValueType = "#" + defaultValueType; + } + if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { + throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName)); + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName)); + } + this.elementName = this.stringify.name(elementName); + this.type = NodeType.AttributeDeclaration; + this.attributeName = this.stringify.name(attributeName); + this.attributeType = this.stringify.dtdAttType(attributeType); + if (defaultValue) { + this.defaultValue = this.stringify.dtdAttDefault(defaultValue); + } + this.defaultValueType = defaultValueType; + } + XMLDTDAttList2.prototype.toString = function(options) { + return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options)); + }; + return XMLDTDAttList2; + }(XMLNode); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDTDEntity.js +var require_XMLDTDEntity = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDTDEntity.js"(exports, module2) { + (function() { + var NodeType, XMLDTDEntity, XMLNode, isObject, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + isObject = require_Utility().isObject; + XMLNode = require_XMLNode(); + NodeType = require_NodeType(); + module2.exports = XMLDTDEntity = function(superClass) { + extend(XMLDTDEntity2, superClass); + function XMLDTDEntity2(parent, pe, name, value) { + XMLDTDEntity2.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing DTD entity name. " + this.debugInfo(name)); + } + if (value == null) { + throw new Error("Missing DTD entity value. " + this.debugInfo(name)); + } + this.pe = !!pe; + this.name = this.stringify.name(name); + this.type = NodeType.EntityDeclaration; + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value); + this.internal = true; + } else { + if (!value.pubID && !value.sysID) { + throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name)); + } + if (value.pubID && !value.sysID) { + throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name)); + } + this.internal = false; + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData); + } + if (this.pe && this.nData) { + throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name)); + } + } + } + Object.defineProperty(XMLDTDEntity2.prototype, "publicId", { + get: function() { + return this.pubID; + } + }); + Object.defineProperty(XMLDTDEntity2.prototype, "systemId", { + get: function() { + return this.sysID; + } + }); + Object.defineProperty(XMLDTDEntity2.prototype, "notationName", { + get: function() { + return this.nData || null; + } + }); + Object.defineProperty(XMLDTDEntity2.prototype, "inputEncoding", { + get: function() { + return null; + } + }); + Object.defineProperty(XMLDTDEntity2.prototype, "xmlEncoding", { + get: function() { + return null; + } + }); + Object.defineProperty(XMLDTDEntity2.prototype, "xmlVersion", { + get: function() { + return null; + } + }); + XMLDTDEntity2.prototype.toString = function(options) { + return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options)); + }; + return XMLDTDEntity2; + }(XMLNode); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDTDElement.js +var require_XMLDTDElement = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDTDElement.js"(exports, module2) { + (function() { + var NodeType, XMLDTDElement, XMLNode, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + XMLNode = require_XMLNode(); + NodeType = require_NodeType(); + module2.exports = XMLDTDElement = function(superClass) { + extend(XMLDTDElement2, superClass); + function XMLDTDElement2(parent, name, value) { + XMLDTDElement2.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing DTD element name. " + this.debugInfo()); + } + if (!value) { + value = "(#PCDATA)"; + } + if (Array.isArray(value)) { + value = "(" + value.join(",") + ")"; + } + this.name = this.stringify.name(name); + this.type = NodeType.ElementDeclaration; + this.value = this.stringify.dtdElementValue(value); + } + XMLDTDElement2.prototype.toString = function(options) { + return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options)); + }; + return XMLDTDElement2; + }(XMLNode); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDTDNotation.js +var require_XMLDTDNotation = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDTDNotation.js"(exports, module2) { + (function() { + var NodeType, XMLDTDNotation, XMLNode, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + XMLNode = require_XMLNode(); + NodeType = require_NodeType(); + module2.exports = XMLDTDNotation = function(superClass) { + extend(XMLDTDNotation2, superClass); + function XMLDTDNotation2(parent, name, value) { + XMLDTDNotation2.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing DTD notation name. " + this.debugInfo(name)); + } + if (!value.pubID && !value.sysID) { + throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name)); + } + this.name = this.stringify.name(name); + this.type = NodeType.NotationDeclaration; + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + } + Object.defineProperty(XMLDTDNotation2.prototype, "publicId", { + get: function() { + return this.pubID; + } + }); + Object.defineProperty(XMLDTDNotation2.prototype, "systemId", { + get: function() { + return this.sysID; + } + }); + XMLDTDNotation2.prototype.toString = function(options) { + return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options)); + }; + return XMLDTDNotation2; + }(XMLNode); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDocType.js +var require_XMLDocType = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDocType.js"(exports, module2) { + (function() { + var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + isObject = require_Utility().isObject; + XMLNode = require_XMLNode(); + NodeType = require_NodeType(); + XMLDTDAttList = require_XMLDTDAttList(); + XMLDTDEntity = require_XMLDTDEntity(); + XMLDTDElement = require_XMLDTDElement(); + XMLDTDNotation = require_XMLDTDNotation(); + XMLNamedNodeMap = require_XMLNamedNodeMap(); + module2.exports = XMLDocType = function(superClass) { + extend(XMLDocType2, superClass); + function XMLDocType2(parent, pubID, sysID) { + var child, i, len, ref, ref1, ref2; + XMLDocType2.__super__.constructor.call(this, parent); + this.type = NodeType.DocType; + if (parent.children) { + ref = parent.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.Element) { + this.name = child.name; + break; + } + } + } + this.documentObject = parent; + if (isObject(pubID)) { + ref1 = pubID, pubID = ref1.pubID, sysID = ref1.sysID; + } + if (sysID == null) { + ref2 = [pubID, sysID], sysID = ref2[0], pubID = ref2[1]; + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID); + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID); + } + } + Object.defineProperty(XMLDocType2.prototype, "entities", { + get: function() { + var child, i, len, nodes, ref; + nodes = {}; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.EntityDeclaration && !child.pe) { + nodes[child.name] = child; + } + } + return new XMLNamedNodeMap(nodes); + } + }); + Object.defineProperty(XMLDocType2.prototype, "notations", { + get: function() { + var child, i, len, nodes, ref; + nodes = {}; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.NotationDeclaration) { + nodes[child.name] = child; + } + } + return new XMLNamedNodeMap(nodes); + } + }); + Object.defineProperty(XMLDocType2.prototype, "publicId", { + get: function() { + return this.pubID; + } + }); + Object.defineProperty(XMLDocType2.prototype, "systemId", { + get: function() { + return this.sysID; + } + }); + Object.defineProperty(XMLDocType2.prototype, "internalSubset", { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + XMLDocType2.prototype.element = function(name, value) { + var child; + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + }; + XMLDocType2.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var child; + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + }; + XMLDocType2.prototype.entity = function(name, value) { + var child; + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + }; + XMLDocType2.prototype.pEntity = function(name, value) { + var child; + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + }; + XMLDocType2.prototype.notation = function(name, value) { + var child; + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + }; + XMLDocType2.prototype.toString = function(options) { + return this.options.writer.docType(this, this.options.writer.filterOptions(options)); + }; + XMLDocType2.prototype.ele = function(name, value) { + return this.element(name, value); + }; + XMLDocType2.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); + }; + XMLDocType2.prototype.ent = function(name, value) { + return this.entity(name, value); + }; + XMLDocType2.prototype.pent = function(name, value) { + return this.pEntity(name, value); + }; + XMLDocType2.prototype.not = function(name, value) { + return this.notation(name, value); + }; + XMLDocType2.prototype.up = function() { + return this.root() || this.documentObject; + }; + XMLDocType2.prototype.isEqualNode = function(node) { + if (!XMLDocType2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { + return false; + } + if (node.name !== this.name) { + return false; + } + if (node.publicId !== this.publicId) { + return false; + } + if (node.systemId !== this.systemId) { + return false; + } + return true; + }; + return XMLDocType2; + }(XMLNode); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLRaw.js +var require_XMLRaw = __commonJS({ + "node_modules/xmlbuilder/lib/XMLRaw.js"(exports, module2) { + (function() { + var NodeType, XMLNode, XMLRaw, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + NodeType = require_NodeType(); + XMLNode = require_XMLNode(); + module2.exports = XMLRaw = function(superClass) { + extend(XMLRaw2, superClass); + function XMLRaw2(parent, text) { + XMLRaw2.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing raw text. " + this.debugInfo()); + } + this.type = NodeType.Raw; + this.value = this.stringify.raw(text); + } + XMLRaw2.prototype.clone = function() { + return Object.create(this); + }; + XMLRaw2.prototype.toString = function(options) { + return this.options.writer.raw(this, this.options.writer.filterOptions(options)); + }; + return XMLRaw2; + }(XMLNode); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLText.js +var require_XMLText = __commonJS({ + "node_modules/xmlbuilder/lib/XMLText.js"(exports, module2) { + (function() { + var NodeType, XMLCharacterData, XMLText, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + NodeType = require_NodeType(); + XMLCharacterData = require_XMLCharacterData(); + module2.exports = XMLText = function(superClass) { + extend(XMLText2, superClass); + function XMLText2(parent, text) { + XMLText2.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing element text. " + this.debugInfo()); + } + this.name = "#text"; + this.type = NodeType.Text; + this.value = this.stringify.text(text); + } + Object.defineProperty(XMLText2.prototype, "isElementContentWhitespace", { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + Object.defineProperty(XMLText2.prototype, "wholeText", { + get: function() { + var next, prev, str; + str = ""; + prev = this.previousSibling; + while (prev) { + str = prev.data + str; + prev = prev.previousSibling; + } + str += this.data; + next = this.nextSibling; + while (next) { + str = str + next.data; + next = next.nextSibling; + } + return str; + } + }); + XMLText2.prototype.clone = function() { + return Object.create(this); + }; + XMLText2.prototype.toString = function(options) { + return this.options.writer.text(this, this.options.writer.filterOptions(options)); + }; + XMLText2.prototype.splitText = function(offset) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLText2.prototype.replaceWholeText = function(content) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + return XMLText2; + }(XMLCharacterData); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLProcessingInstruction.js +var require_XMLProcessingInstruction = __commonJS({ + "node_modules/xmlbuilder/lib/XMLProcessingInstruction.js"(exports, module2) { + (function() { + var NodeType, XMLCharacterData, XMLProcessingInstruction, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + NodeType = require_NodeType(); + XMLCharacterData = require_XMLCharacterData(); + module2.exports = XMLProcessingInstruction = function(superClass) { + extend(XMLProcessingInstruction2, superClass); + function XMLProcessingInstruction2(parent, target, value) { + XMLProcessingInstruction2.__super__.constructor.call(this, parent); + if (target == null) { + throw new Error("Missing instruction target. " + this.debugInfo()); + } + this.type = NodeType.ProcessingInstruction; + this.target = this.stringify.insTarget(target); + this.name = this.target; + if (value) { + this.value = this.stringify.insValue(value); + } + } + XMLProcessingInstruction2.prototype.clone = function() { + return Object.create(this); + }; + XMLProcessingInstruction2.prototype.toString = function(options) { + return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options)); + }; + XMLProcessingInstruction2.prototype.isEqualNode = function(node) { + if (!XMLProcessingInstruction2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { + return false; + } + if (node.target !== this.target) { + return false; + } + return true; + }; + return XMLProcessingInstruction2; + }(XMLCharacterData); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDummy.js +var require_XMLDummy = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDummy.js"(exports, module2) { + (function() { + var NodeType, XMLDummy, XMLNode, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + XMLNode = require_XMLNode(); + NodeType = require_NodeType(); + module2.exports = XMLDummy = function(superClass) { + extend(XMLDummy2, superClass); + function XMLDummy2(parent) { + XMLDummy2.__super__.constructor.call(this, parent); + this.type = NodeType.Dummy; + } + XMLDummy2.prototype.clone = function() { + return Object.create(this); + }; + XMLDummy2.prototype.toString = function(options) { + return ""; + }; + return XMLDummy2; + }(XMLNode); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLNodeList.js +var require_XMLNodeList = __commonJS({ + "node_modules/xmlbuilder/lib/XMLNodeList.js"(exports, module2) { + (function() { + var XMLNodeList; + module2.exports = XMLNodeList = function() { + function XMLNodeList2(nodes) { + this.nodes = nodes; + } + Object.defineProperty(XMLNodeList2.prototype, "length", { + get: function() { + return this.nodes.length || 0; + } + }); + XMLNodeList2.prototype.clone = function() { + return this.nodes = null; + }; + XMLNodeList2.prototype.item = function(index) { + return this.nodes[index] || null; + }; + return XMLNodeList2; + }(); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/DocumentPosition.js +var require_DocumentPosition = __commonJS({ + "node_modules/xmlbuilder/lib/DocumentPosition.js"(exports, module2) { + (function() { + module2.exports = { + Disconnected: 1, + Preceding: 2, + Following: 4, + Contains: 8, + ContainedBy: 16, + ImplementationSpecific: 32 + }; + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLNode.js +var require_XMLNode = __commonJS({ + "node_modules/xmlbuilder/lib/XMLNode.js"(exports, module2) { + (function() { + var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1, hasProp = {}.hasOwnProperty; + ref1 = require_Utility(), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue; + XMLElement = null; + XMLCData = null; + XMLComment = null; + XMLDeclaration = null; + XMLDocType = null; + XMLRaw = null; + XMLText = null; + XMLProcessingInstruction = null; + XMLDummy = null; + NodeType = null; + XMLNodeList = null; + XMLNamedNodeMap = null; + DocumentPosition = null; + module2.exports = XMLNode = function() { + function XMLNode2(parent1) { + this.parent = parent1; + if (this.parent) { + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + this.value = null; + this.children = []; + this.baseURI = null; + if (!XMLElement) { + XMLElement = require_XMLElement(); + XMLCData = require_XMLCData(); + XMLComment = require_XMLComment(); + XMLDeclaration = require_XMLDeclaration(); + XMLDocType = require_XMLDocType(); + XMLRaw = require_XMLRaw(); + XMLText = require_XMLText(); + XMLProcessingInstruction = require_XMLProcessingInstruction(); + XMLDummy = require_XMLDummy(); + NodeType = require_NodeType(); + XMLNodeList = require_XMLNodeList(); + XMLNamedNodeMap = require_XMLNamedNodeMap(); + DocumentPosition = require_DocumentPosition(); + } + } + Object.defineProperty(XMLNode2.prototype, "nodeName", { + get: function() { + return this.name; + } + }); + Object.defineProperty(XMLNode2.prototype, "nodeType", { + get: function() { + return this.type; + } + }); + Object.defineProperty(XMLNode2.prototype, "nodeValue", { + get: function() { + return this.value; + } + }); + Object.defineProperty(XMLNode2.prototype, "parentNode", { + get: function() { + return this.parent; + } + }); + Object.defineProperty(XMLNode2.prototype, "childNodes", { + get: function() { + if (!this.childNodeList || !this.childNodeList.nodes) { + this.childNodeList = new XMLNodeList(this.children); + } + return this.childNodeList; + } + }); + Object.defineProperty(XMLNode2.prototype, "firstChild", { + get: function() { + return this.children[0] || null; + } + }); + Object.defineProperty(XMLNode2.prototype, "lastChild", { + get: function() { + return this.children[this.children.length - 1] || null; + } + }); + Object.defineProperty(XMLNode2.prototype, "previousSibling", { + get: function() { + var i; + i = this.parent.children.indexOf(this); + return this.parent.children[i - 1] || null; + } + }); + Object.defineProperty(XMLNode2.prototype, "nextSibling", { + get: function() { + var i; + i = this.parent.children.indexOf(this); + return this.parent.children[i + 1] || null; + } + }); + Object.defineProperty(XMLNode2.prototype, "ownerDocument", { + get: function() { + return this.document() || null; + } + }); + Object.defineProperty(XMLNode2.prototype, "textContent", { + get: function() { + var child, j, len, ref2, str; + if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { + str = ""; + ref2 = this.children; + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j]; + if (child.textContent) { + str += child.textContent; + } + } + return str; + } else { + return null; + } + }, + set: function(value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + XMLNode2.prototype.setParent = function(parent) { + var child, j, len, ref2, results; + this.parent = parent; + if (parent) { + this.options = parent.options; + this.stringify = parent.stringify; + } + ref2 = this.children; + results = []; + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j]; + results.push(child.setParent(this)); + } + return results; + }; + XMLNode2.prototype.element = function(name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val; + lastChild = null; + if (attributes === null && text == null) { + ref2 = [{}, null], attributes = ref2[0], text = ref2[1]; + } + if (attributes == null) { + attributes = {}; + } + attributes = getValue(attributes); + if (!isObject(attributes)) { + ref3 = [attributes, text], text = ref3[0], attributes = ref3[1]; + } + if (name != null) { + name = getValue(name); + } + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j]; + lastChild = this.element(item); + } + } else if (isFunction(name)) { + lastChild = this.element(name.apply()); + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) + continue; + val = name[key]; + if (isFunction(val)) { + val = val.apply(); + } + if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { + lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); + } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { + lastChild = this.dummy(); + } else if (isObject(val) && isEmpty(val)) { + lastChild = this.element(key); + } else if (!this.options.keepNullNodes && val == null) { + lastChild = this.dummy(); + } else if (!this.options.separateArrayItems && Array.isArray(val)) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k]; + childNode = {}; + childNode[key] = item; + lastChild = this.element(childNode); + } + } else if (isObject(val)) { + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.element(val); + } else { + lastChild = this.element(key); + lastChild.element(val); + } + } else { + lastChild = this.element(key, val); + } + } + } else if (!this.options.keepNullNodes && text === null) { + lastChild = this.dummy(); + } else { + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.text(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { + lastChild = this.cdata(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { + lastChild = this.comment(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { + lastChild = this.raw(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { + lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); + } else { + lastChild = this.node(name, attributes, text); + } + } + if (lastChild == null) { + throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); + } + return lastChild; + }; + XMLNode2.prototype.insertBefore = function(name, attributes, text) { + var child, i, newChild, refChild, removed; + if (name != null ? name.type : void 0) { + newChild = name; + refChild = attributes; + newChild.setParent(this); + if (refChild) { + i = children.indexOf(refChild); + removed = children.splice(i); + children.push(newChild); + Array.prototype.push.apply(children, removed); + } else { + children.push(newChild); + } + return newChild; + } else { + if (this.isRoot) { + throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + } + }; + XMLNode2.prototype.insertAfter = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + XMLNode2.prototype.remove = function() { + var i, ref2; + if (this.isRoot) { + throw new Error("Cannot remove the root element. " + this.debugInfo()); + } + i = this.parent.children.indexOf(this); + [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2; + return this.parent; + }; + XMLNode2.prototype.node = function(name, attributes, text) { + var child, ref2; + if (name != null) { + name = getValue(name); + } + attributes || (attributes = {}); + attributes = getValue(attributes); + if (!isObject(attributes)) { + ref2 = [attributes, text], text = ref2[0], attributes = ref2[1]; + } + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + }; + XMLNode2.prototype.text = function(value) { + var child; + if (isObject(value)) { + this.element(value); + } + child = new XMLText(this, value); + this.children.push(child); + return this; + }; + XMLNode2.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + XMLNode2.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + XMLNode2.prototype.commentBefore = function(value) { + var child, i, removed; + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.comment(value); + Array.prototype.push.apply(this.parent.children, removed); + return this; + }; + XMLNode2.prototype.commentAfter = function(value) { + var child, i, removed; + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.comment(value); + Array.prototype.push.apply(this.parent.children, removed); + return this; + }; + XMLNode2.prototype.raw = function(value) { + var child; + child = new XMLRaw(this, value); + this.children.push(child); + return this; + }; + XMLNode2.prototype.dummy = function() { + var child; + child = new XMLDummy(this); + return child; + }; + XMLNode2.prototype.instruction = function(target, value) { + var insTarget, insValue, instruction, j, len; + if (target != null) { + target = getValue(target); + } + if (value != null) { + value = getValue(value); + } + if (Array.isArray(target)) { + for (j = 0, len = target.length; j < len; j++) { + insTarget = target[j]; + this.instruction(insTarget); + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) + continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + instruction = new XMLProcessingInstruction(this, target, value); + this.children.push(instruction); + } + return this; + }; + XMLNode2.prototype.instructionBefore = function(target, value) { + var child, i, removed; + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.instruction(target, value); + Array.prototype.push.apply(this.parent.children, removed); + return this; + }; + XMLNode2.prototype.instructionAfter = function(target, value) { + var child, i, removed; + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.instruction(target, value); + Array.prototype.push.apply(this.parent.children, removed); + return this; + }; + XMLNode2.prototype.declaration = function(version3, encoding, standalone) { + var doc, xmldec; + doc = this.document(); + xmldec = new XMLDeclaration(doc, version3, encoding, standalone); + if (doc.children.length === 0) { + doc.children.unshift(xmldec); + } else if (doc.children[0].type === NodeType.Declaration) { + doc.children[0] = xmldec; + } else { + doc.children.unshift(xmldec); + } + return doc.root() || doc; + }; + XMLNode2.prototype.dtd = function(pubID, sysID) { + var child, doc, doctype, i, j, k, len, len1, ref2, ref3; + doc = this.document(); + doctype = new XMLDocType(doc, pubID, sysID); + ref2 = doc.children; + for (i = j = 0, len = ref2.length; j < len; i = ++j) { + child = ref2[i]; + if (child.type === NodeType.DocType) { + doc.children[i] = doctype; + return doctype; + } + } + ref3 = doc.children; + for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) { + child = ref3[i]; + if (child.isRoot) { + doc.children.splice(i, 0, doctype); + return doctype; + } + } + doc.children.push(doctype); + return doctype; + }; + XMLNode2.prototype.up = function() { + if (this.isRoot) { + throw new Error("The root node has no parent. Use doc() if you need to get the document object."); + } + return this.parent; + }; + XMLNode2.prototype.root = function() { + var node; + node = this; + while (node) { + if (node.type === NodeType.Document) { + return node.rootObject; + } else if (node.isRoot) { + return node; + } else { + node = node.parent; + } + } + }; + XMLNode2.prototype.document = function() { + var node; + node = this; + while (node) { + if (node.type === NodeType.Document) { + return node; + } else { + node = node.parent; + } + } + }; + XMLNode2.prototype.end = function(options) { + return this.document().end(options); + }; + XMLNode2.prototype.prev = function() { + var i; + i = this.parent.children.indexOf(this); + if (i < 1) { + throw new Error("Already at the first node. " + this.debugInfo()); + } + return this.parent.children[i - 1]; + }; + XMLNode2.prototype.next = function() { + var i; + i = this.parent.children.indexOf(this); + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error("Already at the last node. " + this.debugInfo()); + } + return this.parent.children[i + 1]; + }; + XMLNode2.prototype.importDocument = function(doc) { + var clonedRoot; + clonedRoot = doc.root().clone(); + clonedRoot.parent = this; + clonedRoot.isRoot = false; + this.children.push(clonedRoot); + return this; + }; + XMLNode2.prototype.debugInfo = function(name) { + var ref2, ref3; + name = name || this.name; + if (name == null && !((ref2 = this.parent) != null ? ref2.name : void 0)) { + return ""; + } else if (name == null) { + return "parent: <" + this.parent.name + ">"; + } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) { + return "node: <" + name + ">"; + } else { + return "node: <" + name + ">, parent: <" + this.parent.name + ">"; + } + }; + XMLNode2.prototype.ele = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + XMLNode2.prototype.nod = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + XMLNode2.prototype.txt = function(value) { + return this.text(value); + }; + XMLNode2.prototype.dat = function(value) { + return this.cdata(value); + }; + XMLNode2.prototype.com = function(value) { + return this.comment(value); + }; + XMLNode2.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + XMLNode2.prototype.doc = function() { + return this.document(); + }; + XMLNode2.prototype.dec = function(version3, encoding, standalone) { + return this.declaration(version3, encoding, standalone); + }; + XMLNode2.prototype.e = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + XMLNode2.prototype.n = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + XMLNode2.prototype.t = function(value) { + return this.text(value); + }; + XMLNode2.prototype.d = function(value) { + return this.cdata(value); + }; + XMLNode2.prototype.c = function(value) { + return this.comment(value); + }; + XMLNode2.prototype.r = function(value) { + return this.raw(value); + }; + XMLNode2.prototype.i = function(target, value) { + return this.instruction(target, value); + }; + XMLNode2.prototype.u = function() { + return this.up(); + }; + XMLNode2.prototype.importXMLBuilder = function(doc) { + return this.importDocument(doc); + }; + XMLNode2.prototype.replaceChild = function(newChild, oldChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLNode2.prototype.removeChild = function(oldChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLNode2.prototype.appendChild = function(newChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLNode2.prototype.hasChildNodes = function() { + return this.children.length !== 0; + }; + XMLNode2.prototype.cloneNode = function(deep) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLNode2.prototype.normalize = function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLNode2.prototype.isSupported = function(feature, version3) { + return true; + }; + XMLNode2.prototype.hasAttributes = function() { + return this.attribs.length !== 0; + }; + XMLNode2.prototype.compareDocumentPosition = function(other) { + var ref, res; + ref = this; + if (ref === other) { + return 0; + } else if (this.document() !== other.document()) { + res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; + if (Math.random() < 0.5) { + res |= DocumentPosition.Preceding; + } else { + res |= DocumentPosition.Following; + } + return res; + } else if (ref.isAncestor(other)) { + return DocumentPosition.Contains | DocumentPosition.Preceding; + } else if (ref.isDescendant(other)) { + return DocumentPosition.Contains | DocumentPosition.Following; + } else if (ref.isPreceding(other)) { + return DocumentPosition.Preceding; + } else { + return DocumentPosition.Following; + } + }; + XMLNode2.prototype.isSameNode = function(other) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLNode2.prototype.lookupPrefix = function(namespaceURI) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLNode2.prototype.isDefaultNamespace = function(namespaceURI) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLNode2.prototype.lookupNamespaceURI = function(prefix) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLNode2.prototype.isEqualNode = function(node) { + var i, j, ref2; + if (node.nodeType !== this.nodeType) { + return false; + } + if (node.children.length !== this.children.length) { + return false; + } + for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) { + if (!this.children[i].isEqualNode(node.children[i])) { + return false; + } + } + return true; + }; + XMLNode2.prototype.getFeature = function(feature, version3) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLNode2.prototype.setUserData = function(key, data, handler) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLNode2.prototype.getUserData = function(key) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLNode2.prototype.contains = function(other) { + if (!other) { + return false; + } + return other === this || this.isDescendant(other); + }; + XMLNode2.prototype.isDescendant = function(node) { + var child, isDescendantChild, j, len, ref2; + ref2 = this.children; + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j]; + if (node === child) { + return true; + } + isDescendantChild = child.isDescendant(node); + if (isDescendantChild) { + return true; + } + } + return false; + }; + XMLNode2.prototype.isAncestor = function(node) { + return node.isDescendant(this); + }; + XMLNode2.prototype.isPreceding = function(node) { + var nodePos, thisPos; + nodePos = this.treePosition(node); + thisPos = this.treePosition(this); + if (nodePos === -1 || thisPos === -1) { + return false; + } else { + return nodePos < thisPos; + } + }; + XMLNode2.prototype.isFollowing = function(node) { + var nodePos, thisPos; + nodePos = this.treePosition(node); + thisPos = this.treePosition(this); + if (nodePos === -1 || thisPos === -1) { + return false; + } else { + return nodePos > thisPos; + } + }; + XMLNode2.prototype.treePosition = function(node) { + var found, pos; + pos = 0; + found = false; + this.foreachTreeNode(this.document(), function(childNode) { + pos++; + if (!found && childNode === node) { + return found = true; + } + }); + if (found) { + return pos; + } else { + return -1; + } + }; + XMLNode2.prototype.foreachTreeNode = function(node, func) { + var child, j, len, ref2, res; + node || (node = this.document()); + ref2 = node.children; + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j]; + if (res = func(child)) { + return res; + } else { + res = this.foreachTreeNode(child, func); + if (res) { + return res; + } + } + } + }; + return XMLNode2; + }(); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLStringifier.js +var require_XMLStringifier = __commonJS({ + "node_modules/xmlbuilder/lib/XMLStringifier.js"(exports, module2) { + (function() { + var XMLStringifier, bind = function(fn, me) { + return function() { + return fn.apply(me, arguments); + }; + }, hasProp = {}.hasOwnProperty; + module2.exports = XMLStringifier = function() { + function XMLStringifier2(options) { + this.assertLegalName = bind(this.assertLegalName, this); + this.assertLegalChar = bind(this.assertLegalChar, this); + var key, ref, value; + options || (options = {}); + this.options = options; + if (!this.options.version) { + this.options.version = "1.0"; + } + ref = options.stringify || {}; + for (key in ref) { + if (!hasProp.call(ref, key)) + continue; + value = ref[key]; + this[key] = value; + } + } + XMLStringifier2.prototype.name = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalName("" + val || ""); + }; + XMLStringifier2.prototype.text = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar(this.textEscape("" + val || "")); + }; + XMLStringifier2.prototype.cdata = function(val) { + if (this.options.noValidation) { + return val; + } + val = "" + val || ""; + val = val.replace("]]>", "]]]]>"); + return this.assertLegalChar(val); + }; + XMLStringifier2.prototype.comment = function(val) { + if (this.options.noValidation) { + return val; + } + val = "" + val || ""; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(val); + }; + XMLStringifier2.prototype.raw = function(val) { + if (this.options.noValidation) { + return val; + } + return "" + val || ""; + }; + XMLStringifier2.prototype.attValue = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar(this.attEscape(val = "" + val || "")); + }; + XMLStringifier2.prototype.insTarget = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar("" + val || ""); + }; + XMLStringifier2.prototype.insValue = function(val) { + if (this.options.noValidation) { + return val; + } + val = "" + val || ""; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return this.assertLegalChar(val); + }; + XMLStringifier2.prototype.xmlVersion = function(val) { + if (this.options.noValidation) { + return val; + } + val = "" + val || ""; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + }; + XMLStringifier2.prototype.xmlEncoding = function(val) { + if (this.options.noValidation) { + return val; + } + val = "" + val || ""; + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) { + throw new Error("Invalid encoding: " + val); + } + return this.assertLegalChar(val); + }; + XMLStringifier2.prototype.xmlStandalone = function(val) { + if (this.options.noValidation) { + return val; + } + if (val) { + return "yes"; + } else { + return "no"; + } + }; + XMLStringifier2.prototype.dtdPubID = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar("" + val || ""); + }; + XMLStringifier2.prototype.dtdSysID = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar("" + val || ""); + }; + XMLStringifier2.prototype.dtdElementValue = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar("" + val || ""); + }; + XMLStringifier2.prototype.dtdAttType = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar("" + val || ""); + }; + XMLStringifier2.prototype.dtdAttDefault = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar("" + val || ""); + }; + XMLStringifier2.prototype.dtdEntityValue = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar("" + val || ""); + }; + XMLStringifier2.prototype.dtdNData = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar("" + val || ""); + }; + XMLStringifier2.prototype.convertAttKey = "@"; + XMLStringifier2.prototype.convertPIKey = "?"; + XMLStringifier2.prototype.convertTextKey = "#text"; + XMLStringifier2.prototype.convertCDataKey = "#cdata"; + XMLStringifier2.prototype.convertCommentKey = "#comment"; + XMLStringifier2.prototype.convertRawKey = "#raw"; + XMLStringifier2.prototype.assertLegalChar = function(str) { + var regex, res; + if (this.options.noValidation) { + return str; + } + regex = ""; + if (this.options.version === "1.0") { + regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + if (res = str.match(regex)) { + throw new Error("Invalid character in string: " + str + " at index " + res.index); + } + } else if (this.options.version === "1.1") { + regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + if (res = str.match(regex)) { + throw new Error("Invalid character in string: " + str + " at index " + res.index); + } + } + return str; + }; + XMLStringifier2.prototype.assertLegalName = function(str) { + var regex; + if (this.options.noValidation) { + return str; + } + this.assertLegalChar(str); + regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/; + if (!str.match(regex)) { + throw new Error("Invalid character in name"); + } + return str; + }; + XMLStringifier2.prototype.textEscape = function(str) { + var ampregex; + if (this.options.noValidation) { + return str; + } + ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; + return str.replace(ampregex, "&").replace(//g, ">").replace(/\r/g, " "); + }; + XMLStringifier2.prototype.attEscape = function(str) { + var ampregex; + if (this.options.noValidation) { + return str; + } + ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; + return str.replace(ampregex, "&").replace(/ 0) { + return new Array(indentLevel).join(options.indent); + } + } + return ""; + }; + XMLWriterBase2.prototype.endline = function(node, options, level) { + if (!options.pretty || options.suppressPrettyCount) { + return ""; + } else { + return options.newline; + } + }; + XMLWriterBase2.prototype.attribute = function(att, options, level) { + var r; + this.openAttribute(att, options, level); + r = " " + att.name + '="' + att.value + '"'; + this.closeAttribute(att, options, level); + return r; + }; + XMLWriterBase2.prototype.cdata = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + "" + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + XMLWriterBase2.prototype.comment = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + "" + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + XMLWriterBase2.prototype.declaration = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + ""; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + XMLWriterBase2.prototype.docType = function(node, options, level) { + var child, i, len, r, ref; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + r += " 0) { + r += " ["; + r += this.endline(node, options, level); + options.state = WriterState.InsideTag; + ref = node.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + r += this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + r += "]"; + } + options.state = WriterState.CloseTag; + r += options.spaceBeforeSlash + ">"; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + XMLWriterBase2.prototype.element = function(node, options, level) { + var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2; + level || (level = 0); + prettySuppressed = false; + r = ""; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r += this.indent(node, options, level) + "<" + node.name; + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) + continue; + att = ref[name]; + r += this.attribute(att, options, level); + } + childNodeCount = node.children.length; + firstChildNode = childNodeCount === 0 ? null : node.children[0]; + if (childNodeCount === 0 || node.children.every(function(e) { + return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ""; + })) { + if (options.allowEmpty) { + r += ">"; + options.state = WriterState.CloseTag; + r += "" + this.endline(node, options, level); + } else { + options.state = WriterState.CloseTag; + r += options.spaceBeforeSlash + "/>" + this.endline(node, options, level); + } + } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && firstChildNode.value != null) { + r += ">"; + options.state = WriterState.InsideTag; + options.suppressPrettyCount++; + prettySuppressed = true; + r += this.writeChildNode(firstChildNode, options, level + 1); + options.suppressPrettyCount--; + prettySuppressed = false; + options.state = WriterState.CloseTag; + r += "" + this.endline(node, options, level); + } else { + if (options.dontPrettyTextNodes) { + ref1 = node.children; + for (i = 0, len = ref1.length; i < len; i++) { + child = ref1[i]; + if ((child.type === NodeType.Text || child.type === NodeType.Raw) && child.value != null) { + options.suppressPrettyCount++; + prettySuppressed = true; + break; + } + } + } + r += ">" + this.endline(node, options, level); + options.state = WriterState.InsideTag; + ref2 = node.children; + for (j = 0, len1 = ref2.length; j < len1; j++) { + child = ref2[j]; + r += this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + r += this.indent(node, options, level) + ""; + if (prettySuppressed) { + options.suppressPrettyCount--; + } + r += this.endline(node, options, level); + options.state = WriterState.None; + } + this.closeNode(node, options, level); + return r; + }; + XMLWriterBase2.prototype.writeChildNode = function(node, options, level) { + switch (node.type) { + case NodeType.CData: + return this.cdata(node, options, level); + case NodeType.Comment: + return this.comment(node, options, level); + case NodeType.Element: + return this.element(node, options, level); + case NodeType.Raw: + return this.raw(node, options, level); + case NodeType.Text: + return this.text(node, options, level); + case NodeType.ProcessingInstruction: + return this.processingInstruction(node, options, level); + case NodeType.Dummy: + return ""; + case NodeType.Declaration: + return this.declaration(node, options, level); + case NodeType.DocType: + return this.docType(node, options, level); + case NodeType.AttributeDeclaration: + return this.dtdAttList(node, options, level); + case NodeType.ElementDeclaration: + return this.dtdElement(node, options, level); + case NodeType.EntityDeclaration: + return this.dtdEntity(node, options, level); + case NodeType.NotationDeclaration: + return this.dtdNotation(node, options, level); + default: + throw new Error("Unknown XML node type: " + node.constructor.name); + } + }; + XMLWriterBase2.prototype.processingInstruction = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + ""; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + XMLWriterBase2.prototype.raw = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + options.state = WriterState.InsideTag; + r += node.value; + options.state = WriterState.CloseTag; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + XMLWriterBase2.prototype.text = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + options.state = WriterState.InsideTag; + r += node.value; + options.state = WriterState.CloseTag; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + XMLWriterBase2.prototype.dtdAttList = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + "" + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + XMLWriterBase2.prototype.dtdElement = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + "" + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + XMLWriterBase2.prototype.dtdEntity = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + "" + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + XMLWriterBase2.prototype.dtdNotation = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + "" + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + XMLWriterBase2.prototype.openNode = function(node, options, level) { + }; + XMLWriterBase2.prototype.closeNode = function(node, options, level) { + }; + XMLWriterBase2.prototype.openAttribute = function(att, options, level) { + }; + XMLWriterBase2.prototype.closeAttribute = function(att, options, level) { + }; + return XMLWriterBase2; + }(); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLStringWriter.js +var require_XMLStringWriter = __commonJS({ + "node_modules/xmlbuilder/lib/XMLStringWriter.js"(exports, module2) { + (function() { + var XMLStringWriter, XMLWriterBase, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + XMLWriterBase = require_XMLWriterBase(); + module2.exports = XMLStringWriter = function(superClass) { + extend(XMLStringWriter2, superClass); + function XMLStringWriter2(options) { + XMLStringWriter2.__super__.constructor.call(this, options); + } + XMLStringWriter2.prototype.document = function(doc, options) { + var child, i, len, r, ref; + options = this.filterOptions(options); + r = ""; + ref = doc.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + r += this.writeChildNode(child, options, 0); + } + if (options.pretty && r.slice(-options.newline.length) === options.newline) { + r = r.slice(0, -options.newline.length); + } + return r; + }; + return XMLStringWriter2; + }(XMLWriterBase); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDocument.js +var require_XMLDocument = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDocument.js"(exports, module2) { + (function() { + var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + isPlainObject = require_Utility().isPlainObject; + XMLDOMImplementation = require_XMLDOMImplementation(); + XMLDOMConfiguration = require_XMLDOMConfiguration(); + XMLNode = require_XMLNode(); + NodeType = require_NodeType(); + XMLStringifier = require_XMLStringifier(); + XMLStringWriter = require_XMLStringWriter(); + module2.exports = XMLDocument = function(superClass) { + extend(XMLDocument2, superClass); + function XMLDocument2(options) { + XMLDocument2.__super__.constructor.call(this, null); + this.name = "#document"; + this.type = NodeType.Document; + this.documentURI = null; + this.domConfig = new XMLDOMConfiguration(); + options || (options = {}); + if (!options.writer) { + options.writer = new XMLStringWriter(); + } + this.options = options; + this.stringify = new XMLStringifier(options); + } + Object.defineProperty(XMLDocument2.prototype, "implementation", { + value: new XMLDOMImplementation() + }); + Object.defineProperty(XMLDocument2.prototype, "doctype", { + get: function() { + var child, i, len, ref; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.DocType) { + return child; + } + } + return null; + } + }); + Object.defineProperty(XMLDocument2.prototype, "documentElement", { + get: function() { + return this.rootObject || null; + } + }); + Object.defineProperty(XMLDocument2.prototype, "inputEncoding", { + get: function() { + return null; + } + }); + Object.defineProperty(XMLDocument2.prototype, "strictErrorChecking", { + get: function() { + return false; + } + }); + Object.defineProperty(XMLDocument2.prototype, "xmlEncoding", { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].encoding; + } else { + return null; + } + } + }); + Object.defineProperty(XMLDocument2.prototype, "xmlStandalone", { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].standalone === "yes"; + } else { + return false; + } + } + }); + Object.defineProperty(XMLDocument2.prototype, "xmlVersion", { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].version; + } else { + return "1.0"; + } + } + }); + Object.defineProperty(XMLDocument2.prototype, "URL", { + get: function() { + return this.documentURI; + } + }); + Object.defineProperty(XMLDocument2.prototype, "origin", { + get: function() { + return null; + } + }); + Object.defineProperty(XMLDocument2.prototype, "compatMode", { + get: function() { + return null; + } + }); + Object.defineProperty(XMLDocument2.prototype, "characterSet", { + get: function() { + return null; + } + }); + Object.defineProperty(XMLDocument2.prototype, "contentType", { + get: function() { + return null; + } + }); + XMLDocument2.prototype.end = function(writer) { + var writerOptions; + writerOptions = {}; + if (!writer) { + writer = this.options.writer; + } else if (isPlainObject(writer)) { + writerOptions = writer; + writer = this.options.writer; + } + return writer.document(this, writer.filterOptions(writerOptions)); + }; + XMLDocument2.prototype.toString = function(options) { + return this.options.writer.document(this, this.options.writer.filterOptions(options)); + }; + XMLDocument2.prototype.createElement = function(tagName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createDocumentFragment = function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createTextNode = function(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createComment = function(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createCDATASection = function(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createProcessingInstruction = function(target, data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createAttribute = function(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createEntityReference = function(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.getElementsByTagName = function(tagname) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.importNode = function(importedNode, deep) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createElementNS = function(namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createAttributeNS = function(namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.getElementById = function(elementId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.adoptNode = function(source) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.normalizeDocument = function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.renameNode = function(node, namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.getElementsByClassName = function(classNames) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createEvent = function(eventInterface) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createRange = function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createNodeIterator = function(root, whatToShow, filter) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + XMLDocument2.prototype.createTreeWalker = function(root, whatToShow, filter) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + return XMLDocument2; + }(XMLNode); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLDocumentCB.js +var require_XMLDocumentCB = __commonJS({ + "node_modules/xmlbuilder/lib/XMLDocumentCB.js"(exports, module2) { + (function() { + var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, ref, hasProp = {}.hasOwnProperty; + ref = require_Utility(), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue; + NodeType = require_NodeType(); + XMLDocument = require_XMLDocument(); + XMLElement = require_XMLElement(); + XMLCData = require_XMLCData(); + XMLComment = require_XMLComment(); + XMLRaw = require_XMLRaw(); + XMLText = require_XMLText(); + XMLProcessingInstruction = require_XMLProcessingInstruction(); + XMLDeclaration = require_XMLDeclaration(); + XMLDocType = require_XMLDocType(); + XMLDTDAttList = require_XMLDTDAttList(); + XMLDTDEntity = require_XMLDTDEntity(); + XMLDTDElement = require_XMLDTDElement(); + XMLDTDNotation = require_XMLDTDNotation(); + XMLAttribute = require_XMLAttribute(); + XMLStringifier = require_XMLStringifier(); + XMLStringWriter = require_XMLStringWriter(); + WriterState = require_WriterState(); + module2.exports = XMLDocumentCB = function() { + function XMLDocumentCB2(options, onData, onEnd) { + var writerOptions; + this.name = "?xml"; + this.type = NodeType.Document; + options || (options = {}); + writerOptions = {}; + if (!options.writer) { + options.writer = new XMLStringWriter(); + } else if (isPlainObject(options.writer)) { + writerOptions = options.writer; + options.writer = new XMLStringWriter(); + } + this.options = options; + this.writer = options.writer; + this.writerOptions = this.writer.filterOptions(writerOptions); + this.stringify = new XMLStringifier(options); + this.onDataCallback = onData || function() { + }; + this.onEndCallback = onEnd || function() { + }; + this.currentNode = null; + this.currentLevel = -1; + this.openTags = {}; + this.documentStarted = false; + this.documentCompleted = false; + this.root = null; + } + XMLDocumentCB2.prototype.createChildNode = function(node) { + var att, attName, attributes, child, i, len, ref1, ref2; + switch (node.type) { + case NodeType.CData: + this.cdata(node.value); + break; + case NodeType.Comment: + this.comment(node.value); + break; + case NodeType.Element: + attributes = {}; + ref1 = node.attribs; + for (attName in ref1) { + if (!hasProp.call(ref1, attName)) + continue; + att = ref1[attName]; + attributes[attName] = att.value; + } + this.node(node.name, attributes); + break; + case NodeType.Dummy: + this.dummy(); + break; + case NodeType.Raw: + this.raw(node.value); + break; + case NodeType.Text: + this.text(node.value); + break; + case NodeType.ProcessingInstruction: + this.instruction(node.target, node.value); + break; + default: + throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name); + } + ref2 = node.children; + for (i = 0, len = ref2.length; i < len; i++) { + child = ref2[i]; + this.createChildNode(child); + if (child.type === NodeType.Element) { + this.up(); + } + } + return this; + }; + XMLDocumentCB2.prototype.dummy = function() { + return this; + }; + XMLDocumentCB2.prototype.node = function(name, attributes, text) { + var ref1; + if (name == null) { + throw new Error("Missing node name."); + } + if (this.root && this.currentLevel === -1) { + throw new Error("Document can only have one root node. " + this.debugInfo(name)); + } + this.openCurrent(); + name = getValue(name); + if (attributes == null) { + attributes = {}; + } + attributes = getValue(attributes); + if (!isObject(attributes)) { + ref1 = [attributes, text], text = ref1[0], attributes = ref1[1]; + } + this.currentNode = new XMLElement(this, name, attributes); + this.currentNode.children = false; + this.currentLevel++; + this.openTags[this.currentLevel] = this.currentNode; + if (text != null) { + this.text(text); + } + return this; + }; + XMLDocumentCB2.prototype.element = function(name, attributes, text) { + var child, i, len, oldValidationFlag, ref1, root; + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + this.dtdElement.apply(this, arguments); + } else { + if (Array.isArray(name) || isObject(name) || isFunction(name)) { + oldValidationFlag = this.options.noValidation; + this.options.noValidation = true; + root = new XMLDocument(this.options).element("TEMP_ROOT"); + root.element(name); + this.options.noValidation = oldValidationFlag; + ref1 = root.children; + for (i = 0, len = ref1.length; i < len; i++) { + child = ref1[i]; + this.createChildNode(child); + if (child.type === NodeType.Element) { + this.up(); + } + } + } else { + this.node(name, attributes, text); + } + } + return this; + }; + XMLDocumentCB2.prototype.attribute = function(name, value) { + var attName, attValue; + if (!this.currentNode || this.currentNode.children) { + throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name)); + } + if (name != null) { + name = getValue(name); + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) + continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (this.options.keepNullAttributes && value == null) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, ""); + } else if (value != null) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, value); + } + } + return this; + }; + XMLDocumentCB2.prototype.text = function(value) { + var node; + this.openCurrent(); + node = new XMLText(this, value); + this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + XMLDocumentCB2.prototype.cdata = function(value) { + var node; + this.openCurrent(); + node = new XMLCData(this, value); + this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + XMLDocumentCB2.prototype.comment = function(value) { + var node; + this.openCurrent(); + node = new XMLComment(this, value); + this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + XMLDocumentCB2.prototype.raw = function(value) { + var node; + this.openCurrent(); + node = new XMLRaw(this, value); + this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + XMLDocumentCB2.prototype.instruction = function(target, value) { + var i, insTarget, insValue, len, node; + this.openCurrent(); + if (target != null) { + target = getValue(target); + } + if (value != null) { + value = getValue(value); + } + if (Array.isArray(target)) { + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i]; + this.instruction(insTarget); + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) + continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + node = new XMLProcessingInstruction(this, target, value); + this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + } + return this; + }; + XMLDocumentCB2.prototype.declaration = function(version3, encoding, standalone) { + var node; + this.openCurrent(); + if (this.documentStarted) { + throw new Error("declaration() must be the first node."); + } + node = new XMLDeclaration(this, version3, encoding, standalone); + this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + XMLDocumentCB2.prototype.doctype = function(root, pubID, sysID) { + this.openCurrent(); + if (root == null) { + throw new Error("Missing root node name."); + } + if (this.root) { + throw new Error("dtd() must come before the root node."); + } + this.currentNode = new XMLDocType(this, pubID, sysID); + this.currentNode.rootNodeName = root; + this.currentNode.children = false; + this.currentLevel++; + this.openTags[this.currentLevel] = this.currentNode; + return this; + }; + XMLDocumentCB2.prototype.dtdElement = function(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDElement(this, name, value); + this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + XMLDocumentCB2.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var node; + this.openCurrent(); + node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + XMLDocumentCB2.prototype.entity = function(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDEntity(this, false, name, value); + this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + XMLDocumentCB2.prototype.pEntity = function(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDEntity(this, true, name, value); + this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + XMLDocumentCB2.prototype.notation = function(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDNotation(this, name, value); + this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + XMLDocumentCB2.prototype.up = function() { + if (this.currentLevel < 0) { + throw new Error("The document node has no parent."); + } + if (this.currentNode) { + if (this.currentNode.children) { + this.closeNode(this.currentNode); + } else { + this.openNode(this.currentNode); + } + this.currentNode = null; + } else { + this.closeNode(this.openTags[this.currentLevel]); + } + delete this.openTags[this.currentLevel]; + this.currentLevel--; + return this; + }; + XMLDocumentCB2.prototype.end = function() { + while (this.currentLevel >= 0) { + this.up(); + } + return this.onEnd(); + }; + XMLDocumentCB2.prototype.openCurrent = function() { + if (this.currentNode) { + this.currentNode.children = true; + return this.openNode(this.currentNode); + } + }; + XMLDocumentCB2.prototype.openNode = function(node) { + var att, chunk, name, ref1; + if (!node.isOpen) { + if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) { + this.root = node; + } + chunk = ""; + if (node.type === NodeType.Element) { + this.writerOptions.state = WriterState.OpenTag; + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + "<" + node.name; + ref1 = node.attribs; + for (name in ref1) { + if (!hasProp.call(ref1, name)) + continue; + att = ref1[name]; + chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel); + } + chunk += (node.children ? ">" : "/>") + this.writer.endline(node, this.writerOptions, this.currentLevel); + this.writerOptions.state = WriterState.InsideTag; + } else { + this.writerOptions.state = WriterState.OpenTag; + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ""; + } + chunk += this.writer.endline(node, this.writerOptions, this.currentLevel); + } + this.onData(chunk, this.currentLevel); + return node.isOpen = true; + } + }; + XMLDocumentCB2.prototype.closeNode = function(node) { + var chunk; + if (!node.isClosed) { + chunk = ""; + this.writerOptions.state = WriterState.CloseTag; + if (node.type === NodeType.Element) { + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + "" + this.writer.endline(node, this.writerOptions, this.currentLevel); + } else { + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + "]>" + this.writer.endline(node, this.writerOptions, this.currentLevel); + } + this.writerOptions.state = WriterState.None; + this.onData(chunk, this.currentLevel); + return node.isClosed = true; + } + }; + XMLDocumentCB2.prototype.onData = function(chunk, level) { + this.documentStarted = true; + return this.onDataCallback(chunk, level + 1); + }; + XMLDocumentCB2.prototype.onEnd = function() { + this.documentCompleted = true; + return this.onEndCallback(); + }; + XMLDocumentCB2.prototype.debugInfo = function(name) { + if (name == null) { + return ""; + } else { + return "node: <" + name + ">"; + } + }; + XMLDocumentCB2.prototype.ele = function() { + return this.element.apply(this, arguments); + }; + XMLDocumentCB2.prototype.nod = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + XMLDocumentCB2.prototype.txt = function(value) { + return this.text(value); + }; + XMLDocumentCB2.prototype.dat = function(value) { + return this.cdata(value); + }; + XMLDocumentCB2.prototype.com = function(value) { + return this.comment(value); + }; + XMLDocumentCB2.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + XMLDocumentCB2.prototype.dec = function(version3, encoding, standalone) { + return this.declaration(version3, encoding, standalone); + }; + XMLDocumentCB2.prototype.dtd = function(root, pubID, sysID) { + return this.doctype(root, pubID, sysID); + }; + XMLDocumentCB2.prototype.e = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + XMLDocumentCB2.prototype.n = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + XMLDocumentCB2.prototype.t = function(value) { + return this.text(value); + }; + XMLDocumentCB2.prototype.d = function(value) { + return this.cdata(value); + }; + XMLDocumentCB2.prototype.c = function(value) { + return this.comment(value); + }; + XMLDocumentCB2.prototype.r = function(value) { + return this.raw(value); + }; + XMLDocumentCB2.prototype.i = function(target, value) { + return this.instruction(target, value); + }; + XMLDocumentCB2.prototype.att = function() { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList.apply(this, arguments); + } else { + return this.attribute.apply(this, arguments); + } + }; + XMLDocumentCB2.prototype.a = function() { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList.apply(this, arguments); + } else { + return this.attribute.apply(this, arguments); + } + }; + XMLDocumentCB2.prototype.ent = function(name, value) { + return this.entity(name, value); + }; + XMLDocumentCB2.prototype.pent = function(name, value) { + return this.pEntity(name, value); + }; + XMLDocumentCB2.prototype.not = function(name, value) { + return this.notation(name, value); + }; + return XMLDocumentCB2; + }(); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/XMLStreamWriter.js +var require_XMLStreamWriter = __commonJS({ + "node_modules/xmlbuilder/lib/XMLStreamWriter.js"(exports, module2) { + (function() { + var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty; + NodeType = require_NodeType(); + XMLWriterBase = require_XMLWriterBase(); + WriterState = require_WriterState(); + module2.exports = XMLStreamWriter = function(superClass) { + extend(XMLStreamWriter2, superClass); + function XMLStreamWriter2(stream, options) { + this.stream = stream; + XMLStreamWriter2.__super__.constructor.call(this, options); + } + XMLStreamWriter2.prototype.endline = function(node, options, level) { + if (node.isLastRootNode && options.state === WriterState.CloseTag) { + return ""; + } else { + return XMLStreamWriter2.__super__.endline.call(this, node, options, level); + } + }; + XMLStreamWriter2.prototype.document = function(doc, options) { + var child, i, j, k, len, len1, ref, ref1, results; + ref = doc.children; + for (i = j = 0, len = ref.length; j < len; i = ++j) { + child = ref[i]; + child.isLastRootNode = i === doc.children.length - 1; + } + options = this.filterOptions(options); + ref1 = doc.children; + results = []; + for (k = 0, len1 = ref1.length; k < len1; k++) { + child = ref1[k]; + results.push(this.writeChildNode(child, options, 0)); + } + return results; + }; + XMLStreamWriter2.prototype.attribute = function(att, options, level) { + return this.stream.write(XMLStreamWriter2.__super__.attribute.call(this, att, options, level)); + }; + XMLStreamWriter2.prototype.cdata = function(node, options, level) { + return this.stream.write(XMLStreamWriter2.__super__.cdata.call(this, node, options, level)); + }; + XMLStreamWriter2.prototype.comment = function(node, options, level) { + return this.stream.write(XMLStreamWriter2.__super__.comment.call(this, node, options, level)); + }; + XMLStreamWriter2.prototype.declaration = function(node, options, level) { + return this.stream.write(XMLStreamWriter2.__super__.declaration.call(this, node, options, level)); + }; + XMLStreamWriter2.prototype.docType = function(node, options, level) { + var child, j, len, ref; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + this.stream.write(this.indent(node, options, level)); + this.stream.write(" 0) { + this.stream.write(" ["); + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.InsideTag; + ref = node.children; + for (j = 0, len = ref.length; j < len; j++) { + child = ref[j]; + this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + this.stream.write("]"); + } + options.state = WriterState.CloseTag; + this.stream.write(options.spaceBeforeSlash + ">"); + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.None; + return this.closeNode(node, options, level); + }; + XMLStreamWriter2.prototype.element = function(node, options, level) { + var att, child, childNodeCount, firstChildNode, j, len, name, prettySuppressed, ref, ref1; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + this.stream.write(this.indent(node, options, level) + "<" + node.name); + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) + continue; + att = ref[name]; + this.attribute(att, options, level); + } + childNodeCount = node.children.length; + firstChildNode = childNodeCount === 0 ? null : node.children[0]; + if (childNodeCount === 0 || node.children.every(function(e) { + return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ""; + })) { + if (options.allowEmpty) { + this.stream.write(">"); + options.state = WriterState.CloseTag; + this.stream.write(""); + } else { + options.state = WriterState.CloseTag; + this.stream.write(options.spaceBeforeSlash + "/>"); + } + } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && firstChildNode.value != null) { + this.stream.write(">"); + options.state = WriterState.InsideTag; + options.suppressPrettyCount++; + prettySuppressed = true; + this.writeChildNode(firstChildNode, options, level + 1); + options.suppressPrettyCount--; + prettySuppressed = false; + options.state = WriterState.CloseTag; + this.stream.write(""); + } else { + this.stream.write(">" + this.endline(node, options, level)); + options.state = WriterState.InsideTag; + ref1 = node.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + this.stream.write(this.indent(node, options, level) + ""); + } + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.None; + return this.closeNode(node, options, level); + }; + XMLStreamWriter2.prototype.processingInstruction = function(node, options, level) { + return this.stream.write(XMLStreamWriter2.__super__.processingInstruction.call(this, node, options, level)); + }; + XMLStreamWriter2.prototype.raw = function(node, options, level) { + return this.stream.write(XMLStreamWriter2.__super__.raw.call(this, node, options, level)); + }; + XMLStreamWriter2.prototype.text = function(node, options, level) { + return this.stream.write(XMLStreamWriter2.__super__.text.call(this, node, options, level)); + }; + XMLStreamWriter2.prototype.dtdAttList = function(node, options, level) { + return this.stream.write(XMLStreamWriter2.__super__.dtdAttList.call(this, node, options, level)); + }; + XMLStreamWriter2.prototype.dtdElement = function(node, options, level) { + return this.stream.write(XMLStreamWriter2.__super__.dtdElement.call(this, node, options, level)); + }; + XMLStreamWriter2.prototype.dtdEntity = function(node, options, level) { + return this.stream.write(XMLStreamWriter2.__super__.dtdEntity.call(this, node, options, level)); + }; + XMLStreamWriter2.prototype.dtdNotation = function(node, options, level) { + return this.stream.write(XMLStreamWriter2.__super__.dtdNotation.call(this, node, options, level)); + }; + return XMLStreamWriter2; + }(XMLWriterBase); + }).call(exports); + } +}); + +// node_modules/xmlbuilder/lib/index.js +var require_lib2 = __commonJS({ + "node_modules/xmlbuilder/lib/index.js"(exports, module2) { + (function() { + var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref; + ref = require_Utility(), assign = ref.assign, isFunction = ref.isFunction; + XMLDOMImplementation = require_XMLDOMImplementation(); + XMLDocument = require_XMLDocument(); + XMLDocumentCB = require_XMLDocumentCB(); + XMLStringWriter = require_XMLStringWriter(); + XMLStreamWriter = require_XMLStreamWriter(); + NodeType = require_NodeType(); + WriterState = require_WriterState(); + module2.exports.create = function(name, xmldec, doctype, options) { + var doc, root; + if (name == null) { + throw new Error("Root element needs a name."); + } + options = assign({}, xmldec, doctype, options); + doc = new XMLDocument(options); + root = doc.element(name); + if (!options.headless) { + doc.declaration(options); + if (options.pubID != null || options.sysID != null) { + doc.dtd(options); + } + } + return root; + }; + module2.exports.begin = function(options, onData, onEnd) { + var ref1; + if (isFunction(options)) { + ref1 = [options, onData], onData = ref1[0], onEnd = ref1[1]; + options = {}; + } + if (onData) { + return new XMLDocumentCB(options, onData, onEnd); + } else { + return new XMLDocument(options); + } + }; + module2.exports.stringWriter = function(options) { + return new XMLStringWriter(options); + }; + module2.exports.streamWriter = function(stream, options) { + return new XMLStreamWriter(stream, options); + }; + module2.exports.implementation = new XMLDOMImplementation(); + module2.exports.nodeType = NodeType; + module2.exports.writerState = WriterState; + }).call(exports); + } +}); + +// node_modules/xml2js/lib/builder.js +var require_builder = __commonJS({ + "node_modules/xml2js/lib/builder.js"(exports) { + (function() { + "use strict"; + var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA, hasProp = {}.hasOwnProperty; + builder = require_lib2(); + defaults = require_defaults().defaults; + requiresCDATA = function(entry) { + return typeof entry === "string" && (entry.indexOf("&") >= 0 || entry.indexOf(">") >= 0 || entry.indexOf("<") >= 0); + }; + wrapCDATA = function(entry) { + return ""; + }; + escapeCDATA = function(entry) { + return entry.replace("]]>", "]]]]>"); + }; + exports.Builder = function() { + function Builder(opts) { + var key, ref, value; + this.options = {}; + ref = defaults["0.2"]; + for (key in ref) { + if (!hasProp.call(ref, key)) + continue; + value = ref[key]; + this.options[key] = value; + } + for (key in opts) { + if (!hasProp.call(opts, key)) + continue; + value = opts[key]; + this.options[key] = value; + } + } + Builder.prototype.buildObject = function(rootObj) { + var attrkey, charkey, render, rootElement, rootName; + attrkey = this.options.attrkey; + charkey = this.options.charkey; + if (Object.keys(rootObj).length === 1 && this.options.rootName === defaults["0.2"].rootName) { + rootName = Object.keys(rootObj)[0]; + rootObj = rootObj[rootName]; + } else { + rootName = this.options.rootName; + } + render = function(_this) { + return function(element, obj) { + var attr, child, entry, index, key, value; + if (typeof obj !== "object") { + if (_this.options.cdata && requiresCDATA(obj)) { + element.raw(wrapCDATA(obj)); + } else { + element.txt(obj); + } + } else if (Array.isArray(obj)) { + for (index in obj) { + if (!hasProp.call(obj, index)) + continue; + child = obj[index]; + for (key in child) { + entry = child[key]; + element = render(element.ele(key), entry).up(); + } + } + } else { + for (key in obj) { + if (!hasProp.call(obj, key)) + continue; + child = obj[key]; + if (key === attrkey) { + if (typeof child === "object") { + for (attr in child) { + value = child[attr]; + element = element.att(attr, value); + } + } + } else if (key === charkey) { + if (_this.options.cdata && requiresCDATA(child)) { + element = element.raw(wrapCDATA(child)); + } else { + element = element.txt(child); + } + } else if (Array.isArray(child)) { + for (index in child) { + if (!hasProp.call(child, index)) + continue; + entry = child[index]; + if (typeof entry === "string") { + if (_this.options.cdata && requiresCDATA(entry)) { + element = element.ele(key).raw(wrapCDATA(entry)).up(); + } else { + element = element.ele(key, entry).up(); + } + } else { + element = render(element.ele(key), entry).up(); + } + } + } else if (typeof child === "object") { + element = render(element.ele(key), child).up(); + } else { + if (typeof child === "string" && _this.options.cdata && requiresCDATA(child)) { + element = element.ele(key).raw(wrapCDATA(child)).up(); + } else { + if (child == null) { + child = ""; + } + element = element.ele(key, child.toString()).up(); + } + } + } + } + return element; + }; + }(this); + rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, { + headless: this.options.headless, + allowSurrogateChars: this.options.allowSurrogateChars + }); + return render(rootElement, rootObj).end(this.options.renderOpts); + }; + return Builder; + }(); + }).call(exports); + } +}); + +// node_modules/sax/lib/sax.js +var require_sax = __commonJS({ + "node_modules/sax/lib/sax.js"(exports) { + (function(sax) { + sax.parser = function(strict, opt) { + return new SAXParser(strict, opt); + }; + sax.SAXParser = SAXParser; + sax.SAXStream = SAXStream; + sax.createStream = createStream; + sax.MAX_BUFFER_LENGTH = 64 * 1024; + var buffers = [ + "comment", + "sgmlDecl", + "textNode", + "tagName", + "doctype", + "procInstName", + "procInstBody", + "entity", + "attribName", + "attribValue", + "cdata", + "script" + ]; + sax.EVENTS = [ + "text", + "processinginstruction", + "sgmldeclaration", + "doctype", + "comment", + "opentagstart", + "attribute", + "opentag", + "closetag", + "opencdata", + "cdata", + "closecdata", + "error", + "end", + "ready", + "script", + "opennamespace", + "closenamespace" + ]; + function SAXParser(strict, opt) { + if (!(this instanceof SAXParser)) { + return new SAXParser(strict, opt); + } + var parser = this; + clearBuffers(parser); + parser.q = parser.c = ""; + parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH; + parser.opt = opt || {}; + parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags; + parser.looseCase = parser.opt.lowercase ? "toLowerCase" : "toUpperCase"; + parser.tags = []; + parser.closed = parser.closedRoot = parser.sawRoot = false; + parser.tag = parser.error = null; + parser.strict = !!strict; + parser.noscript = !!(strict || parser.opt.noscript); + parser.state = S.BEGIN; + parser.strictEntities = parser.opt.strictEntities; + parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES); + parser.attribList = []; + if (parser.opt.xmlns) { + parser.ns = Object.create(rootNS); + } + parser.trackPosition = parser.opt.position !== false; + if (parser.trackPosition) { + parser.position = parser.line = parser.column = 0; + } + emit(parser, "onready"); + } + if (!Object.create) { + Object.create = function(o) { + function F() { + } + F.prototype = o; + var newf = new F(); + return newf; + }; + } + if (!Object.keys) { + Object.keys = function(o) { + var a = []; + for (var i in o) + if (o.hasOwnProperty(i)) + a.push(i); + return a; + }; + } + function checkBufferLength(parser) { + var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10); + var maxActual = 0; + for (var i = 0, l = buffers.length; i < l; i++) { + var len = parser[buffers[i]].length; + if (len > maxAllowed) { + switch (buffers[i]) { + case "textNode": + closeText(parser); + break; + case "cdata": + emitNode(parser, "oncdata", parser.cdata); + parser.cdata = ""; + break; + case "script": + emitNode(parser, "onscript", parser.script); + parser.script = ""; + break; + default: + error(parser, "Max buffer length exceeded: " + buffers[i]); + } + } + maxActual = Math.max(maxActual, len); + } + var m = sax.MAX_BUFFER_LENGTH - maxActual; + parser.bufferCheckPosition = m + parser.position; + } + function clearBuffers(parser) { + for (var i = 0, l = buffers.length; i < l; i++) { + parser[buffers[i]] = ""; + } + } + function flushBuffers(parser) { + closeText(parser); + if (parser.cdata !== "") { + emitNode(parser, "oncdata", parser.cdata); + parser.cdata = ""; + } + if (parser.script !== "") { + emitNode(parser, "onscript", parser.script); + parser.script = ""; + } + } + SAXParser.prototype = { + end: function() { + end(this); + }, + write, + resume: function() { + this.error = null; + return this; + }, + close: function() { + return this.write(null); + }, + flush: function() { + flushBuffers(this); + } + }; + var Stream; + try { + Stream = require("stream").Stream; + } catch (ex) { + Stream = function() { + }; + } + var streamWraps = sax.EVENTS.filter(function(ev) { + return ev !== "error" && ev !== "end"; + }); + function createStream(strict, opt) { + return new SAXStream(strict, opt); + } + function SAXStream(strict, opt) { + if (!(this instanceof SAXStream)) { + return new SAXStream(strict, opt); + } + Stream.apply(this); + this._parser = new SAXParser(strict, opt); + this.writable = true; + this.readable = true; + var me = this; + this._parser.onend = function() { + me.emit("end"); + }; + this._parser.onerror = function(er) { + me.emit("error", er); + me._parser.error = null; + }; + this._decoder = null; + streamWraps.forEach(function(ev) { + Object.defineProperty(me, "on" + ev, { + get: function() { + return me._parser["on" + ev]; + }, + set: function(h) { + if (!h) { + me.removeAllListeners(ev); + me._parser["on" + ev] = h; + return h; + } + me.on(ev, h); + }, + enumerable: true, + configurable: false + }); + }); + } + SAXStream.prototype = Object.create(Stream.prototype, { + constructor: { + value: SAXStream + } + }); + SAXStream.prototype.write = function(data) { + if (typeof Buffer === "function" && typeof Buffer.isBuffer === "function" && Buffer.isBuffer(data)) { + if (!this._decoder) { + var SD = require("string_decoder").StringDecoder; + this._decoder = new SD("utf8"); + } + data = this._decoder.write(data); + } + this._parser.write(data.toString()); + this.emit("data", data); + return true; + }; + SAXStream.prototype.end = function(chunk) { + if (chunk && chunk.length) { + this.write(chunk); + } + this._parser.end(); + return true; + }; + SAXStream.prototype.on = function(ev, handler) { + var me = this; + if (!me._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) { + me._parser["on" + ev] = function() { + var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments); + args.splice(0, 0, ev); + me.emit.apply(me, args); + }; + } + return Stream.prototype.on.call(me, ev, handler); + }; + var CDATA = "[CDATA["; + var DOCTYPE = "DOCTYPE"; + var XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"; + var XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"; + var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }; + var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; + var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/; + var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; + var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/; + function isWhitespace(c) { + return c === " " || c === "\n" || c === "\r" || c === " "; + } + function isQuote(c) { + return c === '"' || c === "'"; + } + function isAttribEnd(c) { + return c === ">" || isWhitespace(c); + } + function isMatch(regex, c) { + return regex.test(c); + } + function notMatch(regex, c) { + return !isMatch(regex, c); + } + var S = 0; + sax.STATE = { + BEGIN: S++, + // leading byte order mark or whitespace + BEGIN_WHITESPACE: S++, + // leading whitespace + TEXT: S++, + // general stuff + TEXT_ENTITY: S++, + // & and such. + OPEN_WAKA: S++, + // < + SGML_DECL: S++, + // + SCRIPT: S++, + // - -``` - -This library also works if you use AMD (Asynchronous Module Definition), which is used in tools like [RequireJS](http://requirejs.org/). Just list `browser-source-map-support` as a dependency: - -```html - -``` - -## Options - -This module installs two things: a change to the `stack` property on `Error` objects and a handler for uncaught exceptions that mimics node's default exception handler (the handler can be seen in the demos below). You may want to disable the handler if you have your own uncaught exception handler. This can be done by passing an argument to the installer: - -```js -require('@cspotcode/source-map-support').install({ - handleUncaughtExceptions: false -}); -``` - -This module loads source maps from the filesystem by default. You can provide alternate loading behavior through a callback as shown below. For example, [Meteor](https://github.com/meteor) keeps all source maps cached in memory to avoid disk access. - -```js -require('@cspotcode/source-map-support').install({ - retrieveSourceMap: function(source) { - if (source === 'compiled.js') { - return { - url: 'original.js', - map: fs.readFileSync('compiled.js.map', 'utf8') - }; - } - return null; - } -}); -``` - -The module will by default assume a browser environment if XMLHttpRequest and window are defined. If either of these do not exist it will instead assume a node environment. -In some rare cases, e.g. when running a browser emulation and where both variables are also set, you can explictly specify the environment to be either 'browser' or 'node'. - -```js -require('@cspotcode/source-map-support').install({ - environment: 'node' -}); -``` - -To support files with inline source maps, the `hookRequire` options can be specified, which will monitor all source files for inline source maps. - - -```js -require('@cspotcode/source-map-support').install({ - hookRequire: true -}); -``` - -This monkey patches the `require` module loading chain, so is not enabled by default and is not recommended for any sort of production usage. - -## Demos - -#### Basic Demo - -original.js: - -```js -throw new Error('test'); // This is the original code -``` - -compiled.js: - -```js -require('@cspotcode/source-map-support').install(); - -throw new Error('test'); // This is the compiled code -// The next line defines the sourceMapping. -//# sourceMappingURL=compiled.js.map -``` - -compiled.js.map: - -```json -{ - "version": 3, - "file": "compiled.js", - "sources": ["original.js"], - "names": [], - "mappings": ";;AAAA,MAAM,IAAI" -} -``` - -Run compiled.js using node (notice how the stack trace uses original.js instead of compiled.js): - -``` -$ node compiled.js - -original.js:1 -throw new Error('test'); // This is the original code - ^ -Error: test - at Object. (original.js:1:7) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) - at node.js:901:3 -``` - -#### TypeScript Demo - -demo.ts: - -```typescript -declare function require(name: string); -require('@cspotcode/source-map-support').install(); -class Foo { - constructor() { this.bar(); } - bar() { throw new Error('this is a demo'); } -} -new Foo(); -``` - -Compile and run the file using the TypeScript compiler from the terminal: - -``` -$ npm install source-map-support typescript -$ node_modules/typescript/bin/tsc -sourcemap demo.ts -$ node demo.js - -demo.ts:5 - bar() { throw new Error('this is a demo'); } - ^ -Error: this is a demo - at Foo.bar (demo.ts:5:17) - at new Foo (demo.ts:4:24) - at Object. (demo.ts:7:1) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) - at node.js:901:3 -``` - -There is also the option to use `-r source-map-support/register` with typescript, without the need add the `require('@cspotcode/source-map-support').install()` in the code base: - -``` -$ npm install source-map-support typescript -$ node_modules/typescript/bin/tsc -sourcemap demo.ts -$ node -r source-map-support/register demo.js - -demo.ts:5 - bar() { throw new Error('this is a demo'); } - ^ -Error: this is a demo - at Foo.bar (demo.ts:5:17) - at new Foo (demo.ts:4:24) - at Object. (demo.ts:7:1) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) - at node.js:901:3 -``` - -#### CoffeeScript Demo - -demo.coffee: - -```coffee -require('@cspotcode/source-map-support').install() -foo = -> - bar = -> throw new Error 'this is a demo' - bar() -foo() -``` - -Compile and run the file using the CoffeeScript compiler from the terminal: - -```sh -$ npm install @cspotcode/source-map-support coffeescript -$ node_modules/.bin/coffee --map --compile demo.coffee -$ node demo.js - -demo.coffee:3 - bar = -> throw new Error 'this is a demo' - ^ -Error: this is a demo - at bar (demo.coffee:3:22) - at foo (demo.coffee:4:3) - at Object. (demo.coffee:5:1) - at Object. (demo.coffee:1:1) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) -``` - -## Tests - -This repo contains both automated tests for node and manual tests for the browser. The automated tests can be run using mocha (type `mocha` in the root directory). To run the manual tests: - -* Build the tests using `build.js` -* Launch the HTTP server (`npm run serve-tests`) and visit - * http://127.0.0.1:1336/amd-test - * http://127.0.0.1:1336/browser-test - * http://127.0.0.1:1336/browserify-test - **Currently not working** due to a bug with browserify (see [pull request #66](https://github.com/evanw/node-source-map-support/pull/66) for details). -* For `header-test`, run `server.js` inside that directory and visit http://127.0.0.1:1337/ - -## License - -This code is available under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/node_modules/@cspotcode/source-map-support/browser-source-map-support.js b/node_modules/@cspotcode/source-map-support/browser-source-map-support.js deleted file mode 100644 index 782da50..0000000 --- a/node_modules/@cspotcode/source-map-support/browser-source-map-support.js +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Support for source maps in V8 stack traces - * https://github.com/evanw/node-source-map-support - */ -/* - The buffer module from node.js, for the browser. - - @author Feross Aboukhadijeh - license MIT -*/ -(this.define||function(R,U){this.sourceMapSupport=U()})("browser-source-map-support",function(R){(function e(C,J,A){function p(f,c){if(!J[f]){if(!C[f]){var l="function"==typeof require&&require;if(!c&&l)return l(f,!0);if(t)return t(f,!0);throw Error("Cannot find module '"+f+"'");}l=J[f]={exports:{}};C[f][0].call(l.exports,function(q){var r=C[f][1][q];return p(r?r:q)},l,l.exports,e,C,J,A)}return J[f].exports}for(var t="function"==typeof require&&require,m=0;mm)return-1;if(58>m)return m-48+52;if(91>m)return m-65;if(123>m)return m-97+26}var t="undefined"!==typeof Uint8Array?Uint8Array:Array;e.toByteArray=function(m){function f(d){q[k++]=d}if(0>16);f((u&65280)>>8);f(u&255)}2===l?(u=p(m.charAt(c))<<2|p(m.charAt(c+1))>>4,f(u&255)):1===l&&(u=p(m.charAt(c))<<10|p(m.charAt(c+1))<<4|p(m.charAt(c+2))>>2,f(u>>8&255),f(u&255));return q};e.fromByteArray=function(m){var f=m.length%3,c="",l;var q=0;for(l=m.length-f;q> -18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r&63);c+=r}switch(f){case 1:r=m[m.length-1];c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<4&63);c+="==";break;case 2:r=(m[m.length-2]<<8)+ -m[m.length-1],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>10),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>4&63),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<2&63),c+="="}return c}})("undefined"===typeof A?this.base64js={}:A)},{}],3:[function(C,J,A){},{}],4:[function(C,J,A){(function(e){var p=Object.prototype.toString,t="function"===typeof e.alloc&&"function"===typeof e.allocUnsafe&&"function"=== -typeof e.from;J.exports=function(m,f,c){if("number"===typeof m)throw new TypeError('"value" argument must not be a number');if("ArrayBuffer"===p.call(m).slice(8,-1)){f>>>=0;var l=m.byteLength-f;if(0>l)throw new RangeError("'offset' is out of bounds");if(void 0===c)c=l;else if(c>>>=0,c>l)throw new RangeError("'length' is out of bounds");return t?e.from(m.slice(f,f+c)):new e(new Uint8Array(m.slice(f,f+c)))}if("string"===typeof m){c=f;if("string"!==typeof c||""===c)c="utf8";if(!e.isEncoding(c))throw new TypeError('"encoding" must be a valid string encoding'); -return t?e.from(m,c):new e(m,c)}return t?e.from(m):new e(m)}}).call(this,C("buffer").Buffer)},{buffer:5}],5:[function(C,J,A){function e(a,b,h){if(!(this instanceof e))return new e(a,b,h);var w=typeof a;if("number"===w)var y=0>>0:0;else if("string"===w){if("base64"===b)for(a=(a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")).replace(L,"");0!==a.length%4;)a+="=";y=e.byteLength(a,b)}else if("object"===w&&null!==a)"Buffer"===a.type&&z(a.data)&&(a=a.data),y=0<+a.length?Math.floor(+a.length):0;else throw new TypeError("must start with number, buffer, array or string"); -if(this.length>G)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G.toString(16)+" bytes");if(e.TYPED_ARRAY_SUPPORT)var I=e._augment(new Uint8Array(y));else I=this,I.length=y,I._isBuffer=!0;if(e.TYPED_ARRAY_SUPPORT&&"number"===typeof a.byteLength)I._set(a);else{var K=a;if(z(K)||e.isBuffer(K)||K&&"object"===typeof K&&"number"===typeof K.length)if(e.isBuffer(a))for(b=0;ba)throw new RangeError("offset is not uint");if(a+b>h)throw new RangeError("Trying to access beyond buffer length");}function m(a,b,h,w,y,I){if(!e.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>y||ba.length)throw new TypeError("index out of range"); -}function f(a,b,h,w){0>b&&(b=65535+b+1);for(var y=0,I=Math.min(a.length-h,2);y>>8*(w?y:1-y)}function c(a,b,h,w){0>b&&(b=4294967295+b+1);for(var y=0,I=Math.min(a.length-h,4);y>>8*(w?y:3-y)&255}function l(a,b,h,w,y,I){if(b>y||ba.length)throw new TypeError("index out of range");}function q(a,b,h,w,y){y||l(a,b,h,4,3.4028234663852886E38,-3.4028234663852886E38);v.write(a,b,h,w,23,4);return h+4}function r(a, -b,h,w,y){y||l(a,b,h,8,1.7976931348623157E308,-1.7976931348623157E308);v.write(a,b,h,w,52,8);return h+8}function k(a){for(var b=[],h=0;h=w)b.push(w);else{var y=h;55296<=w&&57343>=w&&h++;w=encodeURIComponent(a.slice(y,h+1)).substr(1).split("%");for(y=0;y=b.length||y>=a.length);y++)b[y+ -h]=a[y];return y}function g(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}var n=C("base64-js"),v=C("ieee754"),z=C("is-array");A.Buffer=e;A.SlowBuffer=e;A.INSPECT_MAX_BYTES=50;e.poolSize=8192;var G=1073741823;e.TYPED_ARRAY_SUPPORT=function(){try{var a=new ArrayBuffer(0),b=new Uint8Array(a);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray&&0===(new Uint8Array(1)).subarray(1,1).byteLength}catch(h){return!1}}();e.isBuffer=function(a){return!(null== -a||!a._isBuffer)};e.compare=function(a,b){if(!e.isBuffer(a)||!e.isBuffer(b))throw new TypeError("Arguments must be Buffers");for(var h=a.length,w=b.length,y=0,I=Math.min(h,w);y>>1;break;case "utf8":case "utf-8":h=k(a).length;break;case "base64":h=n.toByteArray(a).length; -break;default:h=a.length}return h};e.prototype.length=void 0;e.prototype.parent=void 0;e.prototype.toString=function(a,b,h){var w=!1;b>>>=0;h=void 0===h||Infinity===h?this.length:h>>>0;a||(a="utf8");0>b&&(b=0);h>this.length&&(h=this.length);if(h<=b)return"";for(;;)switch(a){case "hex":a=b;b=h;h=this.length;if(!a||0>a)a=0;if(!b||0>b||b>h)b=h;w="";for(h=a;hw?"0"+w.toString(16):w.toString(16),w=a+w;return w;case "utf8":case "utf-8":w=a="";for(h=Math.min(this.length,h);b= -this[b]?(a+=g(w)+String.fromCharCode(this[b]),w=""):w+="%"+this[b].toString(16);return a+g(w);case "ascii":return p(this,b,h);case "binary":return p(this,b,h);case "base64":return b=0===b&&h===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(b,h)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,h);h="";for(a=0;ab&&(a+=" ... "));return""};e.prototype.compare=function(a){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");return e.compare(this,a)};e.prototype.get=function(a){console.log(".get() is deprecated. Access using array indexes instead."); -return this.readUInt8(a)};e.prototype.set=function(a,b){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(a,b)};e.prototype.write=function(a,b,h,w){if(isFinite(b))isFinite(h)||(w=h,h=void 0);else{var y=w;w=b;b=h;h=y}b=Number(b)||0;y=this.length-b;h?(h=Number(h),h>y&&(h=y)):h=y;w=String(w||"utf8").toLowerCase();switch(w){case "hex":b=Number(b)||0;w=this.length-b;h?(h=Number(h),h>w&&(h=w)):h=w;w=a.length;if(0!==w%2)throw Error("Invalid hex string");h>w/ -2&&(h=w/2);for(w=0;w>8;K%=256;y.push(K);y.push(w)}a=d(y,this,b,h,2);break;default:throw new TypeError("Unknown encoding: "+ -w);}return a};e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};e.prototype.slice=function(a,b){var h=this.length;a=~~a;b=void 0===b?h:~~b;0>a?(a+=h,0>a&&(a=0)):a>h&&(a=h);0>b?(b+=h,0>b&&(b=0)):b>h&&(b=h);b>>=0;h||m(this,a,b,1,255,0);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[b]=a;return b+1};e.prototype.writeUInt16LE=function(a, -b,h){a=+a;b>>>=0;h||m(this,a,b,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):f(this,a,b,!0);return b+2};e.prototype.writeUInt16BE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):f(this,a,b,!1);return b+2};e.prototype.writeUInt32LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a):c(this,a,b,!0);return b+4};e.prototype.writeUInt32BE=function(a, -b,h){a=+a;b>>>=0;h||m(this,a,b,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):c(this,a,b,!1);return b+4};e.prototype.writeInt8=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,1,127,-128);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[b]=a;return b+1};e.prototype.writeInt16LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):f(this,a,b,!0);return b+2};e.prototype.writeInt16BE=function(a, -b,h){a=+a;b>>>=0;h||m(this,a,b,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):f(this,a,b,!1);return b+2};e.prototype.writeInt32LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,2147483647,-2147483648);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):c(this,a,b,!0);return b+4};e.prototype.writeInt32BE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,2147483647,-2147483648);0>a&&(a=4294967295+a+1);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+ -2]=a>>>8,this[b+3]=a):c(this,a,b,!1);return b+4};e.prototype.writeFloatLE=function(a,b,h){return q(this,a,b,!0,h)};e.prototype.writeFloatBE=function(a,b,h){return q(this,a,b,!1,h)};e.prototype.writeDoubleLE=function(a,b,h){return r(this,a,b,!0,h)};e.prototype.writeDoubleBE=function(a,b,h){return r(this,a,b,!1,h)};e.prototype.copy=function(a,b,h,w){h||(h=0);w||0===w||(w=this.length);b||(b=0);if(w!==h&&0!==a.length&&0!==this.length){if(wb||b>=a.length)throw new TypeError("targetStart out of bounds"); -if(0>h||h>=this.length)throw new TypeError("sourceStart out of bounds");if(0>w||w>this.length)throw new TypeError("sourceEnd out of bounds");w>this.length&&(w=this.length);a.length-bw||!e.TYPED_ARRAY_SUPPORT)for(var y=0;yb||b>=this.length)throw new TypeError("start out of bounds"); -if(0>h||h>this.length)throw new TypeError("end out of bounds");if("number"===typeof a)for(;b>1,r=-7;f=t?f-1:0;var k=t?-1:1,u=e[p+f];f+=k;t=u&(1<<-r)-1;u>>=-r;for(r+=c;0>=-r;for(r+=m;0>1,u=23===f?Math.pow(2,-24)-Math.pow(2,-77):0;c=m?0:c-1;var d=m?1:-1,g=0>p||0===p&&0>1/p?1:0;p=Math.abs(p);isNaN(p)||Infinity===p?(p=isNaN(p)?1:0,m=r):(m=Math.floor(Math.log(p)/Math.LN2),1>p*(l=Math.pow(2,-m))&&(m--,l*=2),p=1<=m+k?p+u/l:p+u*Math.pow(2,1-k),2<=p*l&&(m++,l/=2),m+k>=r?(p=0,m=r):1<=m+k?(p=(p*l-1)*Math.pow(2,f),m+=k):(p=p*Math.pow(2,k-1)*Math.pow(2,f),m=0));for(;8<=f;e[t+c]=p&255,c+= -d,p/=256,f-=8);m=m<z?[]:n.slice(v,z-v+1)}c=A.resolve(c).substr(1);l=A.resolve(l).substr(1); -for(var r=q(c.split("/")),k=q(l.split("/")),u=Math.min(r.length,k.length),d=u,g=0;gl&&(l=c.length+l);return c.substr(l,q)}}).call(this,C("g5I+bs"))},{"g5I+bs":9}],9:[function(C,J,A){function e(){}C=J.exports={};C.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(t){return window.setImmediate(t)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var p=[];window.addEventListener("message",function(t){var m=t.source;m!==window&&null!== -m||"process-tick"!==t.data||(t.stopPropagation(),0p?(-p<<1)+1:p<<1;do p=m&31,m>>>=5,0=f)throw Error("Expected more digits in base 64 VLQ value.");var q=e.decode(p.charCodeAt(t++));if(-1===q)throw Error("Invalid base64 digit: "+p.charAt(t-1));var r=!!(q&32);q&=31;c+=q<>1;m.value=1===(c&1)?-p:p;m.rest=t}},{"./base64":12}],12:[function(C, -J,A){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");A.encode=function(p){if(0<=p&&p=p?p-65:97<=p&&122>=p?p-97+26:48<=p&&57>=p?p-48+52:43==p?62:47==p?63:-1}},{}],13:[function(C,J,A){function e(p,t,m,f,c,l){var q=Math.floor((t-p)/2)+p,r=c(m,f[q],!0);return 0===r?q:0p?-1:p}A.GREATEST_LOWER_BOUND=1;A.LEAST_UPPER_BOUND=2;A.search=function(p,t,m,f){if(0===t.length)return-1;p=e(-1,t.length,p,t,m,f||A.GREATEST_LOWER_BOUND);if(0>p)return-1;for(;0<=p-1&&0===m(t[p],t[p-1],!0);)--p;return p}},{}],14:[function(C,J,A){function e(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var p=C("./util");e.prototype.unsortedForEach=function(t,m){this._array.forEach(t,m)};e.prototype.add=function(t){var m=this._last,f=m.generatedLine, -c=t.generatedLine,l=m.generatedColumn,q=t.generatedColumn;c>f||c==f&&q>=l||0>=p.compareByGeneratedPositionsInflated(m,t)?this._last=t:this._sorted=!1;this._array.push(t)};e.prototype.toArray=function(){this._sorted||(this._array.sort(p.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};A.MappingList=e},{"./util":19}],15:[function(C,J,A){function e(t,m,f){var c=t[m];t[m]=t[f];t[f]=c}function p(t,m,f,c){if(f=m(t[r],q)&&(l+=1,e(t,l,r));e(t,l+1,r);l+=1;p(t,m,f,l-1);p(t,m,l+1,c)}}A.quickSort=function(t,m){p(t,m,0,t.length-1)}},{}],16:[function(C,J,A){function e(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));return null!=d.sections?new m(d,u):new p(d,u)}function p(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));var g=f.getArg(d,"version"),n=f.getArg(d,"sources"),v=f.getArg(d,"names",[]),z=f.getArg(d,"sourceRoot",null),G=f.getArg(d,"sourcesContent",null),D=f.getArg(d, -"mappings");d=f.getArg(d,"file",null);if(g!=this._version)throw Error("Unsupported version: "+g);z&&(z=f.normalize(z));n=n.map(String).map(f.normalize).map(function(L){return z&&f.isAbsolute(z)&&f.isAbsolute(L)?f.relative(z,L):L});this._names=l.fromArray(v.map(String),!0);this._sources=l.fromArray(n,!0);this.sourceRoot=z;this.sourcesContent=G;this._mappings=D;this._sourceMapURL=u;this.file=d}function t(){this.generatedColumn=this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source= -null}function m(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));var g=f.getArg(d,"version");d=f.getArg(d,"sections");if(g!=this._version)throw Error("Unsupported version: "+g);this._sources=new l;this._names=new l;var n={line:-1,column:0};this._sections=d.map(function(v){if(v.url)throw Error("Support for url field in sections not implemented.");var z=f.getArg(v,"offset"),G=f.getArg(z,"line"),D=f.getArg(z,"column");if(G=k[d])throw new TypeError("Line must be greater than or equal to 1, got "+ -k[d]);if(0>k[g])throw new TypeError("Column must be greater than or equal to 0, got "+k[g]);return c.search(k,u,n,v)};p.prototype.computeColumnSpans=function(){for(var k=0;k=this._sources.size()&&!this.sourcesContent.some(function(k){return null==k}):!1};p.prototype.sourceContentFor=function(k,u){if(!this.sourcesContent)return null;var d=k;null!=this.sourceRoot&&(d=f.relative(this.sourceRoot,d));if(this._sources.has(d))return this.sourcesContent[this._sources.indexOf(d)]; -var g=this.sources,n;for(n=0;n -g||95!==d.charCodeAt(g-1)||95!==d.charCodeAt(g-2)||111!==d.charCodeAt(g-3)||116!==d.charCodeAt(g-4)||111!==d.charCodeAt(g-5)||114!==d.charCodeAt(g-6)||112!==d.charCodeAt(g-7)||95!==d.charCodeAt(g-8)||95!==d.charCodeAt(g-9))return!1;for(g-=10;0<=g;g--)if(36!==d.charCodeAt(g))return!1;return!0}function r(d,g){return d===g?0:null===d?1:null===g?-1:d>g?1:-1}A.getArg=function(d,g,n){if(g in d)return d[g];if(3===arguments.length)return n;throw Error('"'+g+'" is a required argument.');};var k=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/, -u=/^data:.+,.+$/;A.urlParse=e;A.urlGenerate=p;A.normalize=t;A.join=m;A.isAbsolute=function(d){return"/"===d.charAt(0)||k.test(d)};A.relative=function(d,g){""===d&&(d=".");d=d.replace(/\/$/,"");for(var n=0;0!==g.indexOf(d+"/");){var v=d.lastIndexOf("/");if(0>v)return g;d=d.slice(0,v);if(d.match(/^([^\/]+:\/)?\/*$/))return g;++n}return Array(n+1).join("../")+g.substr(d.length+1)};C=!("__proto__"in Object.create(null));A.toSetString=C?f:c;A.fromSetString=C?f:l;A.compareByOriginalPositions=function(d, -g,n){var v=r(d.source,g.source);if(0!==v)return v;v=d.originalLine-g.originalLine;if(0!==v)return v;v=d.originalColumn-g.originalColumn;if(0!==v||n)return v;v=d.generatedColumn-g.generatedColumn;if(0!==v)return v;v=d.generatedLine-g.generatedLine;return 0!==v?v:r(d.name,g.name)};A.compareByGeneratedPositionsDeflated=function(d,g,n){var v=d.generatedLine-g.generatedLine;if(0!==v)return v;v=d.generatedColumn-g.generatedColumn;if(0!==v||n)return v;v=r(d.source,g.source);if(0!==v)return v;v=d.originalLine- -g.originalLine;if(0!==v)return v;v=d.originalColumn-g.originalColumn;return 0!==v?v:r(d.name,g.name)};A.compareByGeneratedPositionsInflated=function(d,g){var n=d.generatedLine-g.generatedLine;if(0!==n)return n;n=d.generatedColumn-g.generatedColumn;if(0!==n)return n;n=r(d.source,g.source);if(0!==n)return n;n=d.originalLine-g.originalLine;if(0!==n)return n;n=d.originalColumn-g.originalColumn;return 0!==n?n:r(d.name,g.name)};A.parseSourceMapInput=function(d){return JSON.parse(d.replace(/^\)]}'[^\n]*\n/, -""))};A.computeSourceURL=function(d,g,n){g=g||"";d&&("/"!==d[d.length-1]&&"/"!==g[0]&&(d+="/"),g=d+g);if(n){d=e(n);if(!d)throw Error("sourceMapURL could not be parsed");d.path&&(n=d.path.lastIndexOf("/"),0<=n&&(d.path=d.path.substring(0,n+1)));g=m(p(d),g)}return t(g)}},{}],20:[function(C,J,A){A.SourceMapGenerator=C("./lib/source-map-generator").SourceMapGenerator;A.SourceMapConsumer=C("./lib/source-map-consumer").SourceMapConsumer;A.SourceNode=C("./lib/source-node").SourceNode},{"./lib/source-map-consumer":16, -"./lib/source-map-generator":17,"./lib/source-node":18}],21:[function(C,J,A){(function(e){function p(){return"browser"===a?!0:"node"===a?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function t(x){return function(B){for(var F=0;F";B=this.getLineNumber();null!=B&&(x+=":"+B,(B= -this.getColumnNumber())&&(x+=":"+B))}B="";var F=this.getFunctionName(),E=!0,H=this.isConstructor();if(this.isToplevel()||H)H?B+="new "+(F||""):F?B+=F:(B+=x,E=!1);else{H=this.getTypeName();"[object Object]"===H&&(H="null");var M=this.getMethodName();F?(H&&0!=F.indexOf(H)&&(B+=H+"."),B+=F,M&&F.indexOf("."+M)!=F.length-M.length-1&&(B+=" [as "+M+"]")):B+=H+"."+(M||"")}E&&(B+=" ("+x+")");return B}function q(x){var B={};Object.getOwnPropertyNames(Object.getPrototypeOf(x)).forEach(function(F){B[F]= -/^(?:is|get)/.test(F)?function(){return x[F].call(x)}:x[F]});B.toString=l;return B}function r(x,B){void 0===B&&(B={nextPosition:null,curPosition:null});if(x.isNative())return B.curPosition=null,x;var F=x.getFileName()||x.getScriptNameOrSourceURL();if(F){var E=x.getLineNumber(),H=x.getColumnNumber()-1,M=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,S=M.test;var V="object"===typeof e&&null!==e?e.version:"";M=S.call(M,V)?0:62;1===E&&H>M&&!p()&&!x.isEval()&&(H-=M);var O= -f({source:F,line:E,column:H});B.curPosition=O;x=q(x);var T=x.getFunctionName;x.getFunctionName=function(){return null==B.nextPosition?T():B.nextPosition.name||T()};x.getFileName=function(){return O.source};x.getLineNumber=function(){return O.line};x.getColumnNumber=function(){return O.column+1};x.getScriptNameOrSourceURL=function(){return O.source};return x}var Q=x.isEval()&&x.getEvalOrigin();Q&&(Q=c(Q),x=q(x),x.getEvalOrigin=function(){return Q});return x}function k(x,B){L&&(b={},h={});for(var F= -(x.name||"Error")+": "+(x.message||""),E={nextPosition:null,curPosition:null},H=[],M=B.length-1;0<=M;M--)H.push("\n at "+r(B[M],E)),E.nextPosition=E.curPosition;E.curPosition=E.nextPosition=null;return F+H.reverse().join("")}function u(x){var B=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(x.stack);if(B){x=B[1];var F=+B[2];B=+B[3];var E=b[x];if(!E&&v&&v.existsSync(x))try{E=v.readFileSync(x,"utf8")}catch(H){E=""}if(E&&(E=E.split(/(?:\r\n|\r|\n)/)[F-1]))return x+":"+F+"\n"+E+"\n"+Array(B).join(" ")+ -"^"}return null}function d(){var x=e.emit;e.emit=function(B){if("uncaughtException"===B){var F=arguments[1]&&arguments[1].stack,E=0=12" - }, - "volta": { - "node": "16.11.0", - "npm": "7.24.2" - } -} diff --git a/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts b/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts deleted file mode 100755 index a787e69..0000000 --- a/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// tslint:disable:no-useless-files - -// For following usage: -// import '@cspotcode/source-map-support/register-hook-require' -// Instead of: -// import sourceMapSupport from '@cspotcode/source-map-support' -// sourceMapSupport.install({hookRequire: true}) diff --git a/node_modules/@cspotcode/source-map-support/register-hook-require.js b/node_modules/@cspotcode/source-map-support/register-hook-require.js deleted file mode 100644 index 6bc12ab..0000000 --- a/node_modules/@cspotcode/source-map-support/register-hook-require.js +++ /dev/null @@ -1,3 +0,0 @@ -require('./').install({ - hookRequire: true -}); diff --git a/node_modules/@cspotcode/source-map-support/register.d.ts b/node_modules/@cspotcode/source-map-support/register.d.ts deleted file mode 100755 index 063cd7c..0000000 --- a/node_modules/@cspotcode/source-map-support/register.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// tslint:disable:no-useless-files - -// For following usage: -// import '@cspotcode/source-map-support/register' -// Instead of: -// import sourceMapSupport from '@cspotcode/source-map-support' -// sourceMapSupport.install() diff --git a/node_modules/@cspotcode/source-map-support/register.js b/node_modules/@cspotcode/source-map-support/register.js deleted file mode 100644 index 4f68e67..0000000 --- a/node_modules/@cspotcode/source-map-support/register.js +++ /dev/null @@ -1 +0,0 @@ -require('./').install(); diff --git a/node_modules/@cspotcode/source-map-support/source-map-support.d.ts b/node_modules/@cspotcode/source-map-support/source-map-support.d.ts deleted file mode 100755 index d8cb9d8..0000000 --- a/node_modules/@cspotcode/source-map-support/source-map-support.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -// Type definitions for source-map-support 0.5 -// Project: https://github.com/evanw/node-source-map-support -// Definitions by: Bart van der Schoor -// Jason Cheatham -// Alcedo Nathaniel De Guzman Jr -// Griffin Yourick -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export interface RawSourceMap { - version: 3; - sources: string[]; - names: string[]; - sourceRoot?: string; - sourcesContent?: string[]; - mappings: string; - file: string; -} - -/** - * Output of retrieveSourceMap(). - * From source-map-support: - * The map field may be either a string or the parsed JSON object (i.e., - * it must be a valid argument to the SourceMapConsumer constructor). - */ -export interface UrlAndMap { - url: string; - map: string | RawSourceMap; -} - -/** - * Options to install(). - */ -export interface Options { - handleUncaughtExceptions?: boolean | undefined; - hookRequire?: boolean | undefined; - emptyCacheBetweenOperations?: boolean | undefined; - environment?: 'auto' | 'browser' | 'node' | undefined; - overrideRetrieveFile?: boolean | undefined; - overrideRetrieveSourceMap?: boolean | undefined; - retrieveFile?(path: string): string; - retrieveSourceMap?(source: string): UrlAndMap | null; - /** - * Set false to disable redirection of require / import `source-map-support` to `@cspotcode/source-map-support` - */ - redirectConflictingLibrary?: boolean; - /** - * Callback will be called every time we redirect due to `redirectConflictingLibrary` - * This allows consumers to log helpful warnings if they choose. - * @param parent NodeJS.Module which made the require() or require.resolve() call - * @param options options object internally passed to node's `_resolveFilename` hook - */ - onConflictingLibraryRedirect?: (request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void; -} - -export interface Position { - source: string; - line: number; - column: number; -} - -export function wrapCallSite(frame: any /* StackFrame */): any /* StackFrame */; -export function getErrorSource(error: Error): string | null; -export function mapSourcePosition(position: Position): Position; -export function retrieveSourceMap(source: string): UrlAndMap | null; -export function resetRetrieveHandlers(): void; - -/** - * Install SourceMap support. - * @param options Can be used to e.g. disable uncaughtException handler. - */ -export function install(options?: Options): void; - -/** - * Uninstall SourceMap support. - */ -export function uninstall(): void; diff --git a/node_modules/@cspotcode/source-map-support/source-map-support.js b/node_modules/@cspotcode/source-map-support/source-map-support.js deleted file mode 100644 index ad830b6..0000000 --- a/node_modules/@cspotcode/source-map-support/source-map-support.js +++ /dev/null @@ -1,938 +0,0 @@ -const { TraceMap, originalPositionFor, AnyMap } = require('@jridgewell/trace-mapping'); -var path = require('path'); -const { fileURLToPath, pathToFileURL } = require('url'); -var util = require('util'); - -var fs; -try { - fs = require('fs'); - if (!fs.existsSync || !fs.readFileSync) { - // fs doesn't have all methods we need - fs = null; - } -} catch (err) { - /* nop */ -} - -/** - * Requires a module which is protected against bundler minification. - * - * @param {NodeModule} mod - * @param {string} request - */ -function dynamicRequire(mod, request) { - return mod.require(request); -} - -/** - * @typedef {{ - * enabled: boolean; - * originalValue: any; - * installedValue: any; - * }} HookState - * Used for installing and uninstalling hooks - */ - -// Increment this if the format of sharedData changes in a breaking way. -var sharedDataVersion = 1; - -/** - * @template T - * @param {T} defaults - * @returns {T} - */ -function initializeSharedData(defaults) { - var sharedDataKey = 'source-map-support/sharedData'; - if (typeof Symbol !== 'undefined') { - sharedDataKey = Symbol.for(sharedDataKey); - } - var sharedData = this[sharedDataKey]; - if (!sharedData) { - sharedData = { version: sharedDataVersion }; - if (Object.defineProperty) { - Object.defineProperty(this, sharedDataKey, { value: sharedData }); - } else { - this[sharedDataKey] = sharedData; - } - } - if (sharedDataVersion !== sharedData.version) { - throw new Error("Multiple incompatible instances of source-map-support were loaded"); - } - for (var key in defaults) { - if (!(key in sharedData)) { - sharedData[key] = defaults[key]; - } - } - return sharedData; -} - -// If multiple instances of source-map-support are loaded into the same -// context, they shouldn't overwrite each other. By storing handlers, caches, -// and other state on a shared object, different instances of -// source-map-support can work together in a limited way. This does require -// that future versions of source-map-support continue to support the fields on -// this object. If this internal contract ever needs to be broken, increment -// sharedDataVersion. (This version number is not the same as any of the -// package's version numbers, which should reflect the *external* API of -// source-map-support.) -var sharedData = initializeSharedData({ - - // Only install once if called multiple times - // Remember how the environment looked before installation so we can restore if able - /** @type {HookState} */ - errorPrepareStackTraceHook: undefined, - /** @type {HookState} */ - processEmitHook: undefined, - /** @type {HookState} */ - moduleResolveFilenameHook: undefined, - - /** @type {Array<(request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void>} */ - onConflictingLibraryRedirectArr: [], - - // If true, the caches are reset before a stack trace formatting operation - emptyCacheBetweenOperations: false, - - // Maps a file path to a string containing the file contents - fileContentsCache: Object.create(null), - - // Maps a file path to a source map for that file - /** @type {Record C:/dir/file - '/'; // file:///root-dir/file -> /root-dir/file - }); - } - const key = getCacheKey(path); - if(hasFileContentsCacheFromKey(key)) { - return getFileContentsCacheFromKey(key); - } - - var contents = ''; - try { - if (!fs) { - // Use SJAX if we are in the browser - var xhr = new XMLHttpRequest(); - xhr.open('GET', path, /** async */ false); - xhr.send(null); - if (xhr.readyState === 4 && xhr.status === 200) { - contents = xhr.responseText; - } - } else if (fs.existsSync(path)) { - // Otherwise, use the filesystem - contents = fs.readFileSync(path, 'utf8'); - } - } catch (er) { - /* ignore any errors */ - } - - return setFileContentsCache(path, contents); -}); - -// Support URLs relative to a directory, but be careful about a protocol prefix -// in case we are in the browser (i.e. directories may start with "http://" or "file:///") -function supportRelativeURL(file, url) { - if(!file) return url; - // given that this happens within error formatting codepath, probably best to - // fallback instead of throwing if anything goes wrong - try { - // if should output a URL - if(isAbsoluteUrl(file) || isSchemeRelativeUrl(file)) { - if(isAbsoluteUrl(url) || isSchemeRelativeUrl(url)) { - return new URL(url, file).toString(); - } - if(path.isAbsolute(url)) { - return new URL(pathToFileURL(url), file).toString(); - } - // url is relative path or URL - return new URL(url.replace(/\\/g, '/'), file).toString(); - } - // if should output a path (unless URL is something like https://) - if(path.isAbsolute(file)) { - if(isFileUrl(url)) { - return fileURLToPath(url); - } - if(isSchemeRelativeUrl(url)) { - return fileURLToPath(new URL(url, 'file://')); - } - if(isAbsoluteUrl(url)) { - // url is a non-file URL - // Go with the URL - return url; - } - if(path.isAbsolute(url)) { - // Normalize at all? decodeURI or normalize slashes? - return path.normalize(url); - } - // url is relative path or URL - return path.join(file, '..', decodeURI(url)); - } - // If we get here, file is relative. - // Shouldn't happen since node identifies modules with absolute paths or URLs. - // But we can take a stab at returning something meaningful anyway. - if(isAbsoluteUrl(url) || isSchemeRelativeUrl(url)) { - return url; - } - return path.join(file, '..', url); - } catch(e) { - return url; - } -} - -// Return pathOrUrl in the same style as matchStyleOf: either a file URL or a native path -function matchStyleOfPathOrUrl(matchStyleOf, pathOrUrl) { - try { - if(isAbsoluteUrl(matchStyleOf) || isSchemeRelativeUrl(matchStyleOf)) { - if(isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) return pathOrUrl; - if(path.isAbsolute(pathOrUrl)) return pathToFileURL(pathOrUrl).toString(); - } else if(path.isAbsolute(matchStyleOf)) { - if(isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) { - return fileURLToPath(new URL(pathOrUrl, 'file://')); - } - } - return pathOrUrl; - } catch(e) { - return pathOrUrl; - } -} - -function retrieveSourceMapURL(source) { - var fileData; - - if (isInBrowser()) { - try { - var xhr = new XMLHttpRequest(); - xhr.open('GET', source, false); - xhr.send(null); - fileData = xhr.readyState === 4 ? xhr.responseText : null; - - // Support providing a sourceMappingURL via the SourceMap header - var sourceMapHeader = xhr.getResponseHeader("SourceMap") || - xhr.getResponseHeader("X-SourceMap"); - if (sourceMapHeader) { - return sourceMapHeader; - } - } catch (e) { - } - } - - // Get the URL of the source map - fileData = retrieveFile(tryFileURLToPath(source)); - var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg; - // Keep executing the search to find the *last* sourceMappingURL to avoid - // picking up sourceMappingURLs from comments, strings, etc. - var lastMatch, match; - while (match = re.exec(fileData)) lastMatch = match; - if (!lastMatch) return null; - return lastMatch[1]; -}; - -// Can be overridden by the retrieveSourceMap option to install. Takes a -// generated source filename; returns a {map, optional url} object, or null if -// there is no source map. The map field may be either a string or the parsed -// JSON object (ie, it must be a valid argument to the SourceMapConsumer -// constructor). -/** @type {(source: string) => import('./source-map-support').UrlAndMap | null} */ -var retrieveSourceMap = handlerExec(sharedData.retrieveMapHandlers, sharedData.internalRetrieveMapHandlers); -sharedData.internalRetrieveMapHandlers.push(function(source) { - var sourceMappingURL = retrieveSourceMapURL(source); - if (!sourceMappingURL) return null; - - // Read the contents of the source map - var sourceMapData; - if (reSourceMap.test(sourceMappingURL)) { - // Support source map URL as a data url - var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1); - sourceMapData = Buffer.from(rawData, "base64").toString(); - sourceMappingURL = source; - } else { - // Support source map URLs relative to the source URL - sourceMappingURL = supportRelativeURL(source, sourceMappingURL); - sourceMapData = retrieveFile(tryFileURLToPath(sourceMappingURL)); - } - - if (!sourceMapData) { - return null; - } - - return { - url: sourceMappingURL, - map: sourceMapData - }; -}); - -function mapSourcePosition(position) { - var sourceMap = getSourceMapCache(position.source); - if (!sourceMap) { - // Call the (overrideable) retrieveSourceMap function to get the source map. - var urlAndMap = retrieveSourceMap(position.source); - if (urlAndMap) { - sourceMap = setSourceMapCache(position.source, { - url: urlAndMap.url, - map: new AnyMap(urlAndMap.map, urlAndMap.url) - }); - - // Overwrite trace-mapping's resolutions, because they do not handle - // Windows paths the way we want. - // TODO Remove now that windows path support was added to resolve-uri and thus trace-mapping? - sourceMap.map.resolvedSources = sourceMap.map.sources.map(s => supportRelativeURL(sourceMap.url, s)); - - // Load all sources stored inline with the source map into the file cache - // to pretend like they are already loaded. They may not exist on disk. - if (sourceMap.map.sourcesContent) { - sourceMap.map.resolvedSources.forEach(function(resolvedSource, i) { - var contents = sourceMap.map.sourcesContent[i]; - if (contents) { - setFileContentsCache(resolvedSource, contents); - } - }); - } - } else { - sourceMap = setSourceMapCache(position.source, { - url: null, - map: null - }); - } - } - - // Resolve the source URL relative to the URL of the source map - if (sourceMap && sourceMap.map) { - var originalPosition = originalPositionFor(sourceMap.map, position); - - // Only return the original position if a matching line was found. If no - // matching line is found then we return position instead, which will cause - // the stack trace to print the path and line for the compiled file. It is - // better to give a precise location in the compiled file than a vague - // location in the original file. - if (originalPosition.source !== null) { - // originalPosition.source has *already* been resolved against sourceMap.url - // so is *already* as absolute as possible. - // However, we want to ensure we output in same format as input: URL or native path - originalPosition.source = matchStyleOfPathOrUrl( - position.source, originalPosition.source); - return originalPosition; - } - } - - return position; -} - -// Parses code generated by FormatEvalOrigin(), a function inside V8: -// https://code.google.com/p/v8/source/browse/trunk/src/messages.js -function mapEvalOrigin(origin) { - // Most eval() calls are in this format - var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin); - if (match) { - var position = mapSourcePosition({ - source: match[2], - line: +match[3], - column: match[4] - 1 - }); - return 'eval at ' + match[1] + ' (' + position.source + ':' + - position.line + ':' + (position.column + 1) + ')'; - } - - // Parse nested eval() calls using recursion - match = /^eval at ([^(]+) \((.+)\)$/.exec(origin); - if (match) { - return 'eval at ' + match[1] + ' (' + mapEvalOrigin(match[2]) + ')'; - } - - // Make sure we still return useful information if we didn't find anything - return origin; -} - -// This is copied almost verbatim from the V8 source code at -// https://code.google.com/p/v8/source/browse/trunk/src/messages.js -// Update 2022-04-29: -// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/builtins/builtins-callsite.cc#L175-L179 -// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/objects/call-site-info.cc#L795-L804 -// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/objects/call-site-info.cc#L717-L750 -// The implementation of wrapCallSite() used to just forward to the actual source -// code of CallSite.prototype.toString but unfortunately a new release of V8 -// did something to the prototype chain and broke the shim. The only fix I -// could find was copy/paste. -function CallSiteToString() { - var fileName; - var fileLocation = ""; - if (this.isNative()) { - fileLocation = "native"; - } else { - fileName = this.getScriptNameOrSourceURL(); - if (!fileName && this.isEval()) { - fileLocation = this.getEvalOrigin(); - fileLocation += ", "; // Expecting source position to follow. - } - - if (fileName) { - fileLocation += fileName; - } else { - // Source code does not originate from a file and is not native, but we - // can still get the source position inside the source string, e.g. in - // an eval string. - fileLocation += ""; - } - var lineNumber = this.getLineNumber(); - if (lineNumber != null) { - fileLocation += ":" + lineNumber; - var columnNumber = this.getColumnNumber(); - if (columnNumber) { - fileLocation += ":" + columnNumber; - } - } - } - - var line = ""; - var isAsync = this.isAsync ? this.isAsync() : false; - if(isAsync) { - line += 'async '; - var isPromiseAll = this.isPromiseAll ? this.isPromiseAll() : false; - var isPromiseAny = this.isPromiseAny ? this.isPromiseAny() : false; - if(isPromiseAny || isPromiseAll) { - line += isPromiseAll ? 'Promise.all (index ' : 'Promise.any (index '; - var promiseIndex = this.getPromiseIndex(); - line += promiseIndex + ')'; - } - } - var functionName = this.getFunctionName(); - var addSuffix = true; - var isConstructor = this.isConstructor(); - var isMethodCall = !(this.isToplevel() || isConstructor); - if (isMethodCall) { - var typeName = this.getTypeName(); - // Fixes shim to be backward compatable with Node v0 to v4 - if (typeName === "[object Object]") { - typeName = "null"; - } - var methodName = this.getMethodName(); - if (functionName) { - if (typeName && functionName.indexOf(typeName) != 0) { - line += typeName + "."; - } - line += functionName; - if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) { - line += " [as " + methodName + "]"; - } - } else { - line += typeName + "." + (methodName || ""); - } - } else if (isConstructor) { - line += "new " + (functionName || ""); - } else if (functionName) { - line += functionName; - } else { - line += fileLocation; - addSuffix = false; - } - if (addSuffix) { - line += " (" + fileLocation + ")"; - } - return line; -} - -function cloneCallSite(frame) { - var object = {}; - Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) { - object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name]; - }); - object.toString = CallSiteToString; - return object; -} - -function wrapCallSite(frame, state) { - // provides interface backward compatibility - if (state === undefined) { - state = { nextPosition: null, curPosition: null } - } - if(frame.isNative()) { - state.curPosition = null; - return frame; - } - - // Most call sites will return the source file from getFileName(), but code - // passed to eval() ending in "//# sourceURL=..." will return the source file - // from getScriptNameOrSourceURL() instead - var source = frame.getFileName() || frame.getScriptNameOrSourceURL(); - if (source) { - // v8 does not expose its internal isWasm, etc methods, so we do this instead. - if(source.startsWith('wasm://')) { - state.curPosition = null; - return frame; - } - - var line = frame.getLineNumber(); - var column = frame.getColumnNumber() - 1; - - // Fix position in Node where some (internal) code is prepended. - // See https://github.com/evanw/node-source-map-support/issues/36 - // Header removed in node at ^10.16 || >=11.11.0 - // v11 is not an LTS candidate, we can just test the one version with it. - // Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11 - var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/; - var headerLength = noHeader.test(process.version) ? 0 : 62; - if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) { - column -= headerLength; - } - - var position = mapSourcePosition({ - source: source, - line: line, - column: column - }); - state.curPosition = position; - frame = cloneCallSite(frame); - var originalFunctionName = frame.getFunctionName; - frame.getFunctionName = function() { - if (state.nextPosition == null) { - return originalFunctionName(); - } - return state.nextPosition.name || originalFunctionName(); - }; - frame.getFileName = function() { return position.source; }; - frame.getLineNumber = function() { return position.line; }; - frame.getColumnNumber = function() { return position.column + 1; }; - frame.getScriptNameOrSourceURL = function() { return position.source; }; - return frame; - } - - // Code called using eval() needs special handling - var origin = frame.isEval() && frame.getEvalOrigin(); - if (origin) { - origin = mapEvalOrigin(origin); - frame = cloneCallSite(frame); - frame.getEvalOrigin = function() { return origin; }; - return frame; - } - - // If we get here then we were unable to change the source position - return frame; -} - -var kIsNodeError = undefined; -try { - // Get a deliberate ERR_INVALID_ARG_TYPE - // TODO is there a better way to reliably get an instance of NodeError? - path.resolve(123); -} catch(e) { - const symbols = Object.getOwnPropertySymbols(e); - const symbol = symbols.find(function (s) {return s.toString().indexOf('kIsNodeError') >= 0}); - if(symbol) kIsNodeError = symbol; -} - -const ErrorPrototypeToString = (err) =>Error.prototype.toString.call(err); - -/** @param {HookState} hookState */ -function createPrepareStackTrace(hookState) { - return prepareStackTrace; - - // This function is part of the V8 stack trace API, for more info see: - // https://v8.dev/docs/stack-trace-api - function prepareStackTrace(error, stack) { - if(!hookState.enabled) return hookState.originalValue.apply(this, arguments); - - if (sharedData.emptyCacheBetweenOperations) { - clearCaches(); - } - - // node gives its own errors special treatment. Mimic that behavior - // https://github.com/nodejs/node/blob/3cbaabc4622df1b4009b9d026a1a970bdbae6e89/lib/internal/errors.js#L118-L128 - // https://github.com/nodejs/node/pull/39182 - var errorString; - if (kIsNodeError) { - if(kIsNodeError in error) { - errorString = `${error.name} [${error.code}]: ${error.message}`; - } else { - errorString = ErrorPrototypeToString(error); - } - } else { - var name = error.name || 'Error'; - var message = error.message || ''; - errorString = message ? name + ": " + message : name; - } - - var state = { nextPosition: null, curPosition: null }; - var processedStack = []; - for (var i = stack.length - 1; i >= 0; i--) { - processedStack.push('\n at ' + wrapCallSite(stack[i], state)); - state.nextPosition = state.curPosition; - } - state.curPosition = state.nextPosition = null; - return errorString + processedStack.reverse().join(''); - } -} - -// Generate position and snippet of original source with pointer -function getErrorSource(error) { - var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack); - if (match) { - var source = match[1]; - var line = +match[2]; - var column = +match[3]; - - // Support the inline sourceContents inside the source map - var contents = getFileContentsCache(source); - - const sourceAsPath = tryFileURLToPath(source); - - // Support files on disk - if (!contents && fs && fs.existsSync(sourceAsPath)) { - try { - contents = fs.readFileSync(sourceAsPath, 'utf8'); - } catch (er) { - contents = ''; - } - } - - // Format the line from the original source code like node does - if (contents) { - var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1]; - if (code) { - return source + ':' + line + '\n' + code + '\n' + - new Array(column).join(' ') + '^'; - } - } - } - return null; -} - -function printFatalErrorUponExit (error) { - var source = getErrorSource(error); - - // Ensure error is printed synchronously and not truncated - if (process.stderr._handle && process.stderr._handle.setBlocking) { - process.stderr._handle.setBlocking(true); - } - - if (source) { - console.error(source); - } - - // Matches node's behavior for colorized output - console.error( - util.inspect(error, { - customInspect: false, - colors: process.stderr.isTTY - }) - ); -} - -function shimEmitUncaughtException () { - const originalValue = process.emit; - var hook = sharedData.processEmitHook = { - enabled: true, - originalValue, - installedValue: undefined - }; - var isTerminatingDueToFatalException = false; - var fatalException; - - process.emit = sharedData.processEmitHook.installedValue = function (type) { - const hadListeners = originalValue.apply(this, arguments); - if(hook.enabled) { - if (type === 'uncaughtException' && !hadListeners) { - isTerminatingDueToFatalException = true; - fatalException = arguments[1]; - process.exit(1); - } - if (type === 'exit' && isTerminatingDueToFatalException) { - printFatalErrorUponExit(fatalException); - } - } - return hadListeners; - }; -} - -var originalRetrieveFileHandlers = sharedData.retrieveFileHandlers.slice(0); -var originalRetrieveMapHandlers = sharedData.retrieveMapHandlers.slice(0); - -exports.wrapCallSite = wrapCallSite; -exports.getErrorSource = getErrorSource; -exports.mapSourcePosition = mapSourcePosition; -exports.retrieveSourceMap = retrieveSourceMap; - -exports.install = function(options) { - options = options || {}; - - if (options.environment) { - environment = options.environment; - if (["node", "browser", "auto"].indexOf(environment) === -1) { - throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}") - } - } - - // Use dynamicRequire to avoid including in browser bundles - var Module = dynamicRequire(module, 'module'); - - // Redirect subsequent imports of "source-map-support" - // to this package - const {redirectConflictingLibrary = true, onConflictingLibraryRedirect} = options; - if(redirectConflictingLibrary) { - if (!sharedData.moduleResolveFilenameHook) { - const originalValue = Module._resolveFilename; - const moduleResolveFilenameHook = sharedData.moduleResolveFilenameHook = { - enabled: true, - originalValue, - installedValue: undefined, - } - Module._resolveFilename = sharedData.moduleResolveFilenameHook.installedValue = function (request, parent, isMain, options) { - if (moduleResolveFilenameHook.enabled) { - // Match all source-map-support entrypoints: source-map-support, source-map-support/register - let requestRedirect; - if (request === 'source-map-support') { - requestRedirect = './'; - } else if (request === 'source-map-support/register') { - requestRedirect = './register'; - } - - if (requestRedirect !== undefined) { - const newRequest = require.resolve(requestRedirect); - for (const cb of sharedData.onConflictingLibraryRedirectArr) { - cb(request, parent, isMain, options, newRequest); - } - request = newRequest; - } - } - - return originalValue.call(this, request, parent, isMain, options); - } - } - if (onConflictingLibraryRedirect) { - sharedData.onConflictingLibraryRedirectArr.push(onConflictingLibraryRedirect); - } - } - - // Allow sources to be found by methods other than reading the files - // directly from disk. - if (options.retrieveFile) { - if (options.overrideRetrieveFile) { - sharedData.retrieveFileHandlers.length = 0; - } - - sharedData.retrieveFileHandlers.unshift(options.retrieveFile); - } - - // Allow source maps to be found by methods other than reading the files - // directly from disk. - if (options.retrieveSourceMap) { - if (options.overrideRetrieveSourceMap) { - sharedData.retrieveMapHandlers.length = 0; - } - - sharedData.retrieveMapHandlers.unshift(options.retrieveSourceMap); - } - - // Support runtime transpilers that include inline source maps - if (options.hookRequire && !isInBrowser()) { - var $compile = Module.prototype._compile; - - if (!$compile.__sourceMapSupport) { - Module.prototype._compile = function(content, filename) { - setFileContentsCache(filename, content); - setSourceMapCache(filename, undefined); - return $compile.call(this, content, filename); - }; - - Module.prototype._compile.__sourceMapSupport = true; - } - } - - // Configure options - if (!sharedData.emptyCacheBetweenOperations) { - sharedData.emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ? - options.emptyCacheBetweenOperations : false; - } - - - // Install the error reformatter - if (!sharedData.errorPrepareStackTraceHook) { - const originalValue = Error.prepareStackTrace; - sharedData.errorPrepareStackTraceHook = { - enabled: true, - originalValue, - installedValue: undefined - }; - Error.prepareStackTrace = sharedData.errorPrepareStackTraceHook.installedValue = createPrepareStackTrace(sharedData.errorPrepareStackTraceHook); - } - - if (!sharedData.processEmitHook) { - var installHandler = 'handleUncaughtExceptions' in options ? - options.handleUncaughtExceptions : true; - - // Do not override 'uncaughtException' with our own handler in Node.js - // Worker threads. Workers pass the error to the main thread as an event, - // rather than printing something to stderr and exiting. - try { - // We need to use `dynamicRequire` because `require` on it's own will be optimized by WebPack/Browserify. - var worker_threads = dynamicRequire(module, 'worker_threads'); - if (worker_threads.isMainThread === false) { - installHandler = false; - } - } catch(e) {} - - // Provide the option to not install the uncaught exception handler. This is - // to support other uncaught exception handlers (in test frameworks, for - // example). If this handler is not installed and there are no other uncaught - // exception handlers, uncaught exceptions will be caught by node's built-in - // exception handler and the process will still be terminated. However, the - // generated JavaScript code will be shown above the stack trace instead of - // the original source code. - if (installHandler && hasGlobalProcessEventEmitter()) { - shimEmitUncaughtException(); - } - } -}; - -exports.uninstall = function() { - if(sharedData.processEmitHook) { - // Disable behavior - sharedData.processEmitHook.enabled = false; - // If possible, remove our hook function. May not be possible if subsequent third-party hooks have wrapped around us. - if(process.emit === sharedData.processEmitHook.installedValue) { - process.emit = sharedData.processEmitHook.originalValue; - } - sharedData.processEmitHook = undefined; - } - if(sharedData.errorPrepareStackTraceHook) { - // Disable behavior - sharedData.errorPrepareStackTraceHook.enabled = false; - // If possible or necessary, remove our hook function. - // In vanilla environments, prepareStackTrace is `undefined`. - // We cannot delegate to `undefined` the way we can to a function w/`.apply()`; our only option is to remove the function. - // If we are the *first* hook installed, and another was installed on top of us, we have no choice but to remove both. - if(Error.prepareStackTrace === sharedData.errorPrepareStackTraceHook.installedValue || typeof sharedData.errorPrepareStackTraceHook.originalValue !== 'function') { - Error.prepareStackTrace = sharedData.errorPrepareStackTraceHook.originalValue; - } - sharedData.errorPrepareStackTraceHook = undefined; - } - if (sharedData.moduleResolveFilenameHook) { - // Disable behavior - sharedData.moduleResolveFilenameHook.enabled = false; - // If possible, remove our hook function. May not be possible if subsequent third-party hooks have wrapped around us. - var Module = dynamicRequire(module, 'module'); - if(Module._resolveFilename === sharedData.moduleResolveFilenameHook.installedValue) { - Module._resolveFilename = sharedData.moduleResolveFilenameHook.originalValue; - } - sharedData.moduleResolveFilenameHook = undefined; - } - sharedData.onConflictingLibraryRedirectArr.length = 0; -} - -exports.resetRetrieveHandlers = function() { - sharedData.retrieveFileHandlers.length = 0; - sharedData.retrieveMapHandlers.length = 0; -} diff --git a/node_modules/@esbuild/darwin-arm64/bin/esbuild b/node_modules/@esbuild/darwin-arm64/bin/esbuild index 4c7bfae..a350205 100755 Binary files a/node_modules/@esbuild/darwin-arm64/bin/esbuild and b/node_modules/@esbuild/darwin-arm64/bin/esbuild differ diff --git a/node_modules/@esbuild/darwin-arm64/package.json b/node_modules/@esbuild/darwin-arm64/package.json index 5430f96..d849e6e 100644 --- a/node_modules/@esbuild/darwin-arm64/package.json +++ b/node_modules/@esbuild/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/darwin-arm64", - "version": "0.17.10", + "version": "0.19.2", "description": "The macOS ARM 64-bit binary for esbuild, a JavaScript bundler.", "repository": "https://github.com/evanw/esbuild", "license": "MIT", diff --git a/node_modules/@jridgewell/resolve-uri/LICENSE b/node_modules/@jridgewell/resolve-uri/LICENSE deleted file mode 100644 index 0a81b2a..0000000 --- a/node_modules/@jridgewell/resolve-uri/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2019 Justin Ridgewell - -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. \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/README.md b/node_modules/@jridgewell/resolve-uri/README.md deleted file mode 100644 index 2fe70df..0000000 --- a/node_modules/@jridgewell/resolve-uri/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# @jridgewell/resolve-uri - -> Resolve a URI relative to an optional base URI - -Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths. - -## Installation - -```sh -npm install @jridgewell/resolve-uri -``` - -## Usage - -```typescript -function resolve(input: string, base?: string): string; -``` - -```js -import resolve from '@jridgewell/resolve-uri'; - -resolve('foo', 'https://example.com'); // => 'https://example.com/foo' -``` - -| Input | Base | Resolution | Explanation | -|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------| -| `https://example.com` | _any_ | `https://example.com/` | Input is normalized only | -| `//example.com` | `https://base.com/` | `https://example.com/` | Input inherits the base's protocol | -| `//example.com` | _rest_ | `//example.com/` | Input is normalized only | -| `/example` | `https://base.com/` | `https://base.com/example` | Input inherits the base's origin | -| `/example` | `//base.com/` | `//base.com/example` | Input inherits the base's host and remains protocol relative | -| `/example` | _rest_ | `/example` | Input is normalized only | -| `example` | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base | -| `example` | `https://base.com/file` | `https://base.com/example` | Input is joined with the base without its file | -| `example` | `//base.com/dir/` | `//base.com/dir/example` | Input is joined with the base's last directory | -| `example` | `//base.com/file` | `//base.com/example` | Input is joined with the base without its file | -| `example` | `/base/dir/` | `/base/dir/example` | Input is joined with the base's last directory | -| `example` | `/base/file` | `/base/example` | Input is joined with the base without its file | -| `example` | `base/dir/` | `base/dir/example` | Input is joined with the base's last directory | -| `example` | `base/file` | `base/example` | Input is joined with the base without its file | diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs deleted file mode 100644 index 94d8dce..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs +++ /dev/null @@ -1,242 +0,0 @@ -// Matches the scheme of a URL, eg "http://" -const schemeRegex = /^[\w+.-]+:\/\//; -/** - * Matches the parts of a URL: - * 1. Scheme, including ":", guaranteed. - * 2. User/password, including "@", optional. - * 3. Host, guaranteed. - * 4. Port, including ":", optional. - * 5. Path, including "/", optional. - * 6. Query, including "?", optional. - * 7. Hash, including "#", optional. - */ -const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; -/** - * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start - * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). - * - * 1. Host, optional. - * 2. Path, which may include "/", guaranteed. - * 3. Query, including "?", optional. - * 4. Hash, including "#", optional. - */ -const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; -var UrlType; -(function (UrlType) { - UrlType[UrlType["Empty"] = 1] = "Empty"; - UrlType[UrlType["Hash"] = 2] = "Hash"; - UrlType[UrlType["Query"] = 3] = "Query"; - UrlType[UrlType["RelativePath"] = 4] = "RelativePath"; - UrlType[UrlType["AbsolutePath"] = 5] = "AbsolutePath"; - UrlType[UrlType["SchemeRelative"] = 6] = "SchemeRelative"; - UrlType[UrlType["Absolute"] = 7] = "Absolute"; -})(UrlType || (UrlType = {})); -function isAbsoluteUrl(input) { - return schemeRegex.test(input); -} -function isSchemeRelativeUrl(input) { - return input.startsWith('//'); -} -function isAbsolutePath(input) { - return input.startsWith('/'); -} -function isFileUrl(input) { - return input.startsWith('file:'); -} -function isRelative(input) { - return /^[.?#]/.test(input); -} -function parseAbsoluteUrl(input) { - const match = urlRegex.exec(input); - return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); -} -function parseFileUrl(input) { - const match = fileRegex.exec(input); - const path = match[2]; - return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); -} -function makeUrl(scheme, user, host, port, path, query, hash) { - return { - scheme, - user, - host, - port, - path, - query, - hash, - type: UrlType.Absolute, - }; -} -function parseUrl(input) { - if (isSchemeRelativeUrl(input)) { - const url = parseAbsoluteUrl('http:' + input); - url.scheme = ''; - url.type = UrlType.SchemeRelative; - return url; - } - if (isAbsolutePath(input)) { - const url = parseAbsoluteUrl('http://foo.com' + input); - url.scheme = ''; - url.host = ''; - url.type = UrlType.AbsolutePath; - return url; - } - if (isFileUrl(input)) - return parseFileUrl(input); - if (isAbsoluteUrl(input)) - return parseAbsoluteUrl(input); - const url = parseAbsoluteUrl('http://foo.com/' + input); - url.scheme = ''; - url.host = ''; - url.type = input - ? input.startsWith('?') - ? UrlType.Query - : input.startsWith('#') - ? UrlType.Hash - : UrlType.RelativePath - : UrlType.Empty; - return url; -} -function stripPathFilename(path) { - // If a path ends with a parent directory "..", then it's a relative path with excess parent - // paths. It's not a file, so we can't strip it. - if (path.endsWith('/..')) - return path; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); -} -function mergePaths(url, base) { - normalizePath(base, base.type); - // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative - // path). - if (url.path === '/') { - url.path = base.path; - } - else { - // Resolution happens relative to the base path's directory, not the file. - url.path = stripPathFilename(base.path) + url.path; - } -} -/** - * The path can have empty directories "//", unneeded parents "foo/..", or current directory - * "foo/.". We need to normalize to a standard representation. - */ -function normalizePath(url, type) { - const rel = type <= UrlType.RelativePath; - const pieces = url.path.split('/'); - // We need to preserve the first piece always, so that we output a leading slash. The item at - // pieces[0] is an empty string. - let pointer = 1; - // Positive is the number of real directories we've output, used for popping a parent directory. - // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". - let positive = 0; - // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will - // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a - // real directory, we won't need to append, unless the other conditions happen again. - let addTrailingSlash = false; - for (let i = 1; i < pieces.length; i++) { - const piece = pieces[i]; - // An empty directory, could be a trailing slash, or just a double "//" in the path. - if (!piece) { - addTrailingSlash = true; - continue; - } - // If we encounter a real directory, then we don't need to append anymore. - addTrailingSlash = false; - // A current directory, which we can always drop. - if (piece === '.') - continue; - // A parent directory, we need to see if there are any real directories we can pop. Else, we - // have an excess of parents, and we'll need to keep the "..". - if (piece === '..') { - if (positive) { - addTrailingSlash = true; - positive--; - pointer--; - } - else if (rel) { - // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute - // URL, protocol relative URL, or an absolute path, we don't need to keep excess. - pieces[pointer++] = piece; - } - continue; - } - // We've encountered a real directory. Move it to the next insertion pointer, which accounts for - // any popped or dropped directories. - pieces[pointer++] = piece; - positive++; - } - let path = ''; - for (let i = 1; i < pointer; i++) { - path += '/' + pieces[i]; - } - if (!path || (addTrailingSlash && !path.endsWith('/..'))) { - path += '/'; - } - url.path = path; -} -/** - * Attempts to resolve `input` URL/path relative to `base`. - */ -function resolve(input, base) { - if (!input && !base) - return ''; - const url = parseUrl(input); - let inputType = url.type; - if (base && inputType !== UrlType.Absolute) { - const baseUrl = parseUrl(base); - const baseType = baseUrl.type; - switch (inputType) { - case UrlType.Empty: - url.hash = baseUrl.hash; - // fall through - case UrlType.Hash: - url.query = baseUrl.query; - // fall through - case UrlType.Query: - case UrlType.RelativePath: - mergePaths(url, baseUrl); - // fall through - case UrlType.AbsolutePath: - // The host, user, and port are joined, you can't copy one without the others. - url.user = baseUrl.user; - url.host = baseUrl.host; - url.port = baseUrl.port; - // fall through - case UrlType.SchemeRelative: - // The input doesn't have a schema at least, so we need to copy at least that over. - url.scheme = baseUrl.scheme; - } - if (baseType > inputType) - inputType = baseType; - } - normalizePath(url, inputType); - const queryHash = url.query + url.hash; - switch (inputType) { - // This is impossible, because of the empty checks at the start of the function. - // case UrlType.Empty: - case UrlType.Hash: - case UrlType.Query: - return queryHash; - case UrlType.RelativePath: { - // The first char is always a "/", and we need it to be relative. - const path = url.path.slice(1); - if (!path) - return queryHash || '.'; - if (isRelative(base || input) && !isRelative(path)) { - // If base started with a leading ".", or there is no base and input started with a ".", - // then we need to ensure that the relative path starts with a ".". We don't know if - // relative starts with a "..", though, so check before prepending. - return './' + path + queryHash; - } - return path + queryHash; - } - case UrlType.AbsolutePath: - return url.path + queryHash; - default: - return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; - } -} - -export { resolve as default }; -//# sourceMappingURL=resolve-uri.mjs.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map deleted file mode 100644 index 009d043..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-uri.mjs","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nenum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":"AAAA;AACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;;;;;;;;;AAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;AAE5F;;;;;;;;;AASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;AAapF,IAAK,OAQJ;AARD,WAAK,OAAO;IACV,uCAAS,CAAA;IACT,qCAAQ,CAAA;IACR,uCAAS,CAAA;IACT,qDAAgB,CAAA;IAChB,qDAAgB,CAAA;IAChB,yDAAkB,CAAA;IAClB,6CAAY,CAAA;AACd,CAAC,EARI,OAAO,KAAP,OAAO,QAQX;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;IACpC,OAAO,OAAO,CACZ,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,C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C/B;QACD,IAAI,QAAQ,GAAG,SAAS;YAAE,SAAS,GAAG,QAAQ,CAAC;KAChD;IAED,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAE9B,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC;IACvC,QAAQ,SAAS;;;QAIf,KAAK,OAAO,CAAC,IAAI,CAAC;QAClB,KAAK,OAAO,CAAC,KAAK;YAChB,OAAO,SAAS,CAAC;QAEnB,KAAK,OAAO,CAAC,YAAY,EAAE;;YAEzB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAE/B,IAAI,CAAC,IAAI;gBAAE,OAAO,SAAS,IAAI,GAAG,CAAC;YAEnC,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;;;;gBAIlD,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;aAChC;YAED,OAAO,IAAI,GAAG,SAAS,CAAC;SACzB;QAED,KAAK,OAAO,CAAC,YAAY;YACvB,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;QAE9B;YACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;KACpF;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js deleted file mode 100644 index 0700a2d..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js +++ /dev/null @@ -1,250 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory()); -})(this, (function () { 'use strict'; - - // Matches the scheme of a URL, eg "http://" - const schemeRegex = /^[\w+.-]+:\/\//; - /** - * Matches the parts of a URL: - * 1. Scheme, including ":", guaranteed. - * 2. User/password, including "@", optional. - * 3. Host, guaranteed. - * 4. Port, including ":", optional. - * 5. Path, including "/", optional. - * 6. Query, including "?", optional. - * 7. Hash, including "#", optional. - */ - const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; - /** - * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start - * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). - * - * 1. Host, optional. - * 2. Path, which may include "/", guaranteed. - * 3. Query, including "?", optional. - * 4. Hash, including "#", optional. - */ - const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; - var UrlType; - (function (UrlType) { - UrlType[UrlType["Empty"] = 1] = "Empty"; - UrlType[UrlType["Hash"] = 2] = "Hash"; - UrlType[UrlType["Query"] = 3] = "Query"; - UrlType[UrlType["RelativePath"] = 4] = "RelativePath"; - UrlType[UrlType["AbsolutePath"] = 5] = "AbsolutePath"; - UrlType[UrlType["SchemeRelative"] = 6] = "SchemeRelative"; - UrlType[UrlType["Absolute"] = 7] = "Absolute"; - })(UrlType || (UrlType = {})); - function isAbsoluteUrl(input) { - return schemeRegex.test(input); - } - function isSchemeRelativeUrl(input) { - return input.startsWith('//'); - } - function isAbsolutePath(input) { - return input.startsWith('/'); - } - function isFileUrl(input) { - return input.startsWith('file:'); - } - function isRelative(input) { - return /^[.?#]/.test(input); - } - function parseAbsoluteUrl(input) { - const match = urlRegex.exec(input); - return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); - } - function parseFileUrl(input) { - const match = fileRegex.exec(input); - const path = match[2]; - return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); - } - function makeUrl(scheme, user, host, port, path, query, hash) { - return { - scheme, - user, - host, - port, - path, - query, - hash, - type: UrlType.Absolute, - }; - } - function parseUrl(input) { - if (isSchemeRelativeUrl(input)) { - const url = parseAbsoluteUrl('http:' + input); - url.scheme = ''; - url.type = UrlType.SchemeRelative; - return url; - } - if (isAbsolutePath(input)) { - const url = parseAbsoluteUrl('http://foo.com' + input); - url.scheme = ''; - url.host = ''; - url.type = UrlType.AbsolutePath; - return url; - } - if (isFileUrl(input)) - return parseFileUrl(input); - if (isAbsoluteUrl(input)) - return parseAbsoluteUrl(input); - const url = parseAbsoluteUrl('http://foo.com/' + input); - url.scheme = ''; - url.host = ''; - url.type = input - ? input.startsWith('?') - ? UrlType.Query - : input.startsWith('#') - ? UrlType.Hash - : UrlType.RelativePath - : UrlType.Empty; - return url; - } - function stripPathFilename(path) { - // If a path ends with a parent directory "..", then it's a relative path with excess parent - // paths. It's not a file, so we can't strip it. - if (path.endsWith('/..')) - return path; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); - } - function mergePaths(url, base) { - normalizePath(base, base.type); - // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative - // path). - if (url.path === '/') { - url.path = base.path; - } - else { - // Resolution happens relative to the base path's directory, not the file. - url.path = stripPathFilename(base.path) + url.path; - } - } - /** - * The path can have empty directories "//", unneeded parents "foo/..", or current directory - * "foo/.". We need to normalize to a standard representation. - */ - function normalizePath(url, type) { - const rel = type <= UrlType.RelativePath; - const pieces = url.path.split('/'); - // We need to preserve the first piece always, so that we output a leading slash. The item at - // pieces[0] is an empty string. - let pointer = 1; - // Positive is the number of real directories we've output, used for popping a parent directory. - // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". - let positive = 0; - // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will - // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a - // real directory, we won't need to append, unless the other conditions happen again. - let addTrailingSlash = false; - for (let i = 1; i < pieces.length; i++) { - const piece = pieces[i]; - // An empty directory, could be a trailing slash, or just a double "//" in the path. - if (!piece) { - addTrailingSlash = true; - continue; - } - // If we encounter a real directory, then we don't need to append anymore. - addTrailingSlash = false; - // A current directory, which we can always drop. - if (piece === '.') - continue; - // A parent directory, we need to see if there are any real directories we can pop. Else, we - // have an excess of parents, and we'll need to keep the "..". - if (piece === '..') { - if (positive) { - addTrailingSlash = true; - positive--; - pointer--; - } - else if (rel) { - // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute - // URL, protocol relative URL, or an absolute path, we don't need to keep excess. - pieces[pointer++] = piece; - } - continue; - } - // We've encountered a real directory. Move it to the next insertion pointer, which accounts for - // any popped or dropped directories. - pieces[pointer++] = piece; - positive++; - } - let path = ''; - for (let i = 1; i < pointer; i++) { - path += '/' + pieces[i]; - } - if (!path || (addTrailingSlash && !path.endsWith('/..'))) { - path += '/'; - } - url.path = path; - } - /** - * Attempts to resolve `input` URL/path relative to `base`. - */ - function resolve(input, base) { - if (!input && !base) - return ''; - const url = parseUrl(input); - let inputType = url.type; - if (base && inputType !== UrlType.Absolute) { - const baseUrl = parseUrl(base); - const baseType = baseUrl.type; - switch (inputType) { - case UrlType.Empty: - url.hash = baseUrl.hash; - // fall through - case UrlType.Hash: - url.query = baseUrl.query; - // fall through - case UrlType.Query: - case UrlType.RelativePath: - mergePaths(url, baseUrl); - // fall through - case UrlType.AbsolutePath: - // The host, user, and port are joined, you can't copy one without the others. - url.user = baseUrl.user; - url.host = baseUrl.host; - url.port = baseUrl.port; - // fall through - case UrlType.SchemeRelative: - // The input doesn't have a schema at least, so we need to copy at least that over. - url.scheme = baseUrl.scheme; - } - if (baseType > inputType) - inputType = baseType; - } - normalizePath(url, inputType); - const queryHash = url.query + url.hash; - switch (inputType) { - // This is impossible, because of the empty checks at the start of the function. - // case UrlType.Empty: - case UrlType.Hash: - case UrlType.Query: - return queryHash; - case UrlType.RelativePath: { - // The first char is always a "/", and we need it to be relative. - const path = url.path.slice(1); - if (!path) - return queryHash || '.'; - if (isRelative(base || input) && !isRelative(path)) { - // If base started with a leading ".", or there is no base and input started with a ".", - // then we need to ensure that the relative path starts with a ".". We don't know if - // relative starts with a "..", though, so check before prepending. - return './' + path + queryHash; - } - return path + queryHash; - } - case UrlType.AbsolutePath: - return url.path + queryHash; - default: - return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; - } - } - - return resolve; - -})); -//# sourceMappingURL=resolve-uri.umd.js.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map deleted file mode 100644 index a3e39eb..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-uri.umd.js","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nenum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":";;;;;;IAAA;IACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;IAErC;;;;;;;;;;IAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;IAE5F;;;;;;;;;IASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;IAapF,IAAK,OAQJ;IARD,WAAK,OAAO;QACV,uCAAS,CAAA;QACT,qCAAQ,CAAA;QACR,uCAAS,CAAA;QACT,qDAAgB,CAAA;QAChB,qDAAgB,CAAA;QAChB,yDAAkB,CAAA;QAClB,6CAAY,CAAA;IACd,CAAC,EARI,OAAO,KAAP,OAAO,QAQX;IAED,SAAS,aAAa,CAAC,KAAa;QAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,mBAAmB,CAAC,KAAa;QACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,SAAS,cAAc,CAAC,KAAa;QACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,SAAS,SAAS,CAAC,KAAa;QAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,SAAS,UAAU,CAAC,KAAa;QAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,gBAAgB,CAAC,KAAa;QACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;QACpC,OAAO,OAAO,CACZ,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAA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AAE,SAAS,GAAG,QAAQ,CAAC;SAChD;QAED,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAE9B,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC;QACvC,QAAQ,SAAS;;;YAIf,KAAK,OAAO,CAAC,IAAI,CAAC;YAClB,KAAK,OAAO,CAAC,KAAK;gBAChB,OAAO,SAAS,CAAC;YAEnB,KAAK,OAAO,CAAC,YAAY,EAAE;;gBAEzB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAE/B,IAAI,CAAC,IAAI;oBAAE,OAAO,SAAS,IAAI,GAAG,CAAC;gBAEnC,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;;;;oBAIlD,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;iBAChC;gBAED,OAAO,IAAI,GAAG,SAAS,CAAC;aACzB;YAED,KAAK,OAAO,CAAC,YAAY;gBACvB,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;YAE9B;gBACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;SACpF;IACH;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts deleted file mode 100644 index b7f0b3b..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Attempts to resolve `input` URL/path relative to `base`. - */ -export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/resolve-uri/package.json b/node_modules/@jridgewell/resolve-uri/package.json deleted file mode 100644 index 114937a..0000000 --- a/node_modules/@jridgewell/resolve-uri/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "@jridgewell/resolve-uri", - "version": "3.1.0", - "description": "Resolve a URI relative to an optional base URI", - "keywords": [ - "resolve", - "uri", - "url", - "path" - ], - "author": "Justin Ridgewell ", - "license": "MIT", - "repository": "https://github.com/jridgewell/resolve-uri", - "main": "dist/resolve-uri.umd.js", - "module": "dist/resolve-uri.mjs", - "typings": "dist/types/resolve-uri.d.ts", - "exports": { - ".": [ - { - "types": "./dist/types/resolve-uri.d.ts", - "browser": "./dist/resolve-uri.umd.js", - "require": "./dist/resolve-uri.umd.js", - "import": "./dist/resolve-uri.mjs" - }, - "./dist/resolve-uri.umd.js" - ], - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], - "engines": { - "node": ">=6.0.0" - }, - "scripts": { - "prebuild": "rm -rf dist", - "build": "run-s -n build:*", - "build:rollup": "rollup -c rollup.config.js", - "build:ts": "tsc --project tsconfig.build.json", - "lint": "run-s -n lint:*", - "lint:prettier": "npm run test:lint:prettier -- --write", - "lint:ts": "npm run test:lint:ts -- --fix", - "pretest": "run-s build:rollup", - "test": "run-s -n test:lint test:only", - "test:debug": "mocha --inspect-brk", - "test:lint": "run-s -n test:lint:*", - "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", - "test:lint:ts": "eslint '{src,test}/**/*.ts'", - "test:only": "mocha", - "test:coverage": "c8 mocha", - "test:watch": "mocha --watch", - "prepublishOnly": "npm run preversion", - "preversion": "run-s test build" - }, - "devDependencies": { - "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*", - "@rollup/plugin-typescript": "8.3.0", - "@typescript-eslint/eslint-plugin": "5.10.0", - "@typescript-eslint/parser": "5.10.0", - "c8": "7.11.0", - "eslint": "8.7.0", - "eslint-config-prettier": "8.3.0", - "mocha": "9.2.0", - "npm-run-all": "4.1.5", - "prettier": "2.5.1", - "rollup": "2.66.0", - "typescript": "4.5.5" - } -} diff --git a/node_modules/@jridgewell/sourcemap-codec/LICENSE b/node_modules/@jridgewell/sourcemap-codec/LICENSE deleted file mode 100644 index a331065..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2015 Rich Harris - -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/@jridgewell/sourcemap-codec/README.md b/node_modules/@jridgewell/sourcemap-codec/README.md deleted file mode 100644 index 2b9e397..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/README.md +++ /dev/null @@ -1,200 +0,0 @@ -# sourcemap-codec - -Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). - - -## Why? - -Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap. - -This package makes the process slightly easier. - - -## Installation - -```bash -npm install sourcemap-codec -``` - - -## Usage - -```js -import { encode, decode } from 'sourcemap-codec'; - -var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); - -assert.deepEqual( decoded, [ - // the first line (of the generated code) has no mappings, - // as shown by the starting semi-colon (which separates lines) - [], - - // the second line contains four (comma-separated) segments - [ - // segments are encoded as you'd expect: - // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ] - - // i.e. the first segment begins at column 2, and maps back to the second column - // of the second line (both zero-based) of the 0th source, and uses the 0th - // name in the `map.names` array - [ 2, 0, 2, 2, 0 ], - - // the remaining segments are 4-length rather than 5-length, - // because they don't map a name - [ 4, 0, 2, 4 ], - [ 6, 0, 2, 5 ], - [ 7, 0, 2, 7 ] - ], - - // the final line contains two segments - [ - [ 2, 1, 10, 19 ], - [ 12, 1, 11, 20 ] - ] -]); - -var encoded = encode( decoded ); -assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); -``` - -## Benchmarks - -``` -node v18.0.0 - -amp.js.map - 45120 segments - -Decode Memory Usage: -@jridgewell/sourcemap-codec 5479160 bytes -sourcemap-codec 5659336 bytes -source-map-0.6.1 17144440 bytes -source-map-0.8.0 6867424 bytes -Smallest memory usage is @jridgewell/sourcemap-codec - -Decode speed: -decode: @jridgewell/sourcemap-codec x 502 ops/sec ±1.03% (90 runs sampled) -decode: sourcemap-codec x 445 ops/sec ±0.97% (92 runs sampled) -decode: source-map-0.6.1 x 36.01 ops/sec ±1.64% (49 runs sampled) -decode: source-map-0.8.0 x 367 ops/sec ±0.04% (95 runs sampled) -Fastest is decode: @jridgewell/sourcemap-codec - -Encode Memory Usage: -@jridgewell/sourcemap-codec 1261620 bytes -sourcemap-codec 9119248 bytes -source-map-0.6.1 8968560 bytes -source-map-0.8.0 8952952 bytes -Smallest memory usage is @jridgewell/sourcemap-codec - -Encode speed: -encode: @jridgewell/sourcemap-codec x 738 ops/sec ±0.42% (98 runs sampled) -encode: sourcemap-codec x 238 ops/sec ±0.73% (88 runs sampled) -encode: source-map-0.6.1 x 162 ops/sec ±0.43% (84 runs sampled) -encode: source-map-0.8.0 x 191 ops/sec ±0.34% (90 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec - - -*** - - -babel.min.js.map - 347793 segments - -Decode Memory Usage: -@jridgewell/sourcemap-codec 35338184 bytes -sourcemap-codec 35922736 bytes -source-map-0.6.1 62366360 bytes -source-map-0.8.0 44337416 bytes -Smallest memory usage is @jridgewell/sourcemap-codec - -Decode speed: -decode: @jridgewell/sourcemap-codec x 40.35 ops/sec ±4.47% (54 runs sampled) -decode: sourcemap-codec x 36.76 ops/sec ±3.67% (51 runs sampled) -decode: source-map-0.6.1 x 4.44 ops/sec ±2.15% (16 runs sampled) -decode: source-map-0.8.0 x 59.35 ops/sec ±0.05% (78 runs sampled) -Fastest is decode: source-map-0.8.0 - -Encode Memory Usage: -@jridgewell/sourcemap-codec 7212604 bytes -sourcemap-codec 21421456 bytes -source-map-0.6.1 25286888 bytes -source-map-0.8.0 25498744 bytes -Smallest memory usage is @jridgewell/sourcemap-codec - -Encode speed: -encode: @jridgewell/sourcemap-codec x 112 ops/sec ±0.13% (84 runs sampled) -encode: sourcemap-codec x 30.23 ops/sec ±2.76% (53 runs sampled) -encode: source-map-0.6.1 x 19.43 ops/sec ±3.70% (37 runs sampled) -encode: source-map-0.8.0 x 19.40 ops/sec ±3.26% (37 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec - - -*** - - -preact.js.map - 1992 segments - -Decode Memory Usage: -@jridgewell/sourcemap-codec 500272 bytes -sourcemap-codec 516864 bytes -source-map-0.6.1 1596672 bytes -source-map-0.8.0 517272 bytes -Smallest memory usage is @jridgewell/sourcemap-codec - -Decode speed: -decode: @jridgewell/sourcemap-codec x 16,137 ops/sec ±0.17% (99 runs sampled) -decode: sourcemap-codec x 12,139 ops/sec ±0.13% (99 runs sampled) -decode: source-map-0.6.1 x 1,264 ops/sec ±0.12% (100 runs sampled) -decode: source-map-0.8.0 x 9,894 ops/sec ±0.08% (101 runs sampled) -Fastest is decode: @jridgewell/sourcemap-codec - -Encode Memory Usage: -@jridgewell/sourcemap-codec 321026 bytes -sourcemap-codec 830832 bytes -source-map-0.6.1 586608 bytes -source-map-0.8.0 586680 bytes -Smallest memory usage is @jridgewell/sourcemap-codec - -Encode speed: -encode: @jridgewell/sourcemap-codec x 19,876 ops/sec ±0.78% (95 runs sampled) -encode: sourcemap-codec x 6,983 ops/sec ±0.15% (100 runs sampled) -encode: source-map-0.6.1 x 5,070 ops/sec ±0.12% (102 runs sampled) -encode: source-map-0.8.0 x 5,641 ops/sec ±0.17% (100 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec - - -*** - - -react.js.map - 5726 segments - -Decode Memory Usage: -@jridgewell/sourcemap-codec 734848 bytes -sourcemap-codec 954200 bytes -source-map-0.6.1 2276432 bytes -source-map-0.8.0 955488 bytes -Smallest memory usage is @jridgewell/sourcemap-codec - -Decode speed: -decode: @jridgewell/sourcemap-codec x 5,723 ops/sec ±0.12% (98 runs sampled) -decode: sourcemap-codec x 4,555 ops/sec ±0.09% (101 runs sampled) -decode: source-map-0.6.1 x 437 ops/sec ±0.11% (93 runs sampled) -decode: source-map-0.8.0 x 3,441 ops/sec ±0.15% (100 runs sampled) -Fastest is decode: @jridgewell/sourcemap-codec - -Encode Memory Usage: -@jridgewell/sourcemap-codec 638672 bytes -sourcemap-codec 1109840 bytes -source-map-0.6.1 1321224 bytes -source-map-0.8.0 1324448 bytes -Smallest memory usage is @jridgewell/sourcemap-codec - -Encode speed: -encode: @jridgewell/sourcemap-codec x 6,801 ops/sec ±0.48% (98 runs sampled) -encode: sourcemap-codec x 2,533 ops/sec ±0.13% (101 runs sampled) -encode: source-map-0.6.1 x 2,248 ops/sec ±0.08% (100 runs sampled) -encode: source-map-0.8.0 x 2,303 ops/sec ±0.15% (100 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec -``` - -# License - -MIT diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs deleted file mode 100644 index 3dff372..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +++ /dev/null @@ -1,164 +0,0 @@ -const comma = ','.charCodeAt(0); -const semicolon = ';'.charCodeAt(0); -const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -const intToChar = new Uint8Array(64); // 64 possible chars. -const charToInt = new Uint8Array(128); // z is 122 in ASCII -for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; -} -// Provide a fallback for older environments. -const td = typeof TextDecoder !== 'undefined' - ? /* #__PURE__ */ new TextDecoder() - : typeof Buffer !== 'undefined' - ? { - decode(buf) { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - }, - } - : { - decode(buf) { - let out = ''; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - }, - }; -function decode(mappings) { - const state = new Int32Array(5); - const decoded = []; - let index = 0; - do { - const semi = indexOf(mappings, index); - const line = []; - let sorted = true; - let lastCol = 0; - state[0] = 0; - for (let i = index; i < semi; i++) { - let seg; - i = decodeInteger(mappings, i, state, 0); // genColumn - const col = state[0]; - if (col < lastCol) - sorted = false; - lastCol = col; - if (hasMoreVlq(mappings, i, semi)) { - i = decodeInteger(mappings, i, state, 1); // sourcesIndex - i = decodeInteger(mappings, i, state, 2); // sourceLine - i = decodeInteger(mappings, i, state, 3); // sourceColumn - if (hasMoreVlq(mappings, i, semi)) { - i = decodeInteger(mappings, i, state, 4); // namesIndex - seg = [col, state[1], state[2], state[3], state[4]]; - } - else { - seg = [col, state[1], state[2], state[3]]; - } - } - else { - seg = [col]; - } - line.push(seg); - } - if (!sorted) - sort(line); - decoded.push(line); - index = semi + 1; - } while (index <= mappings.length); - return decoded; -} -function indexOf(mappings, index) { - const idx = mappings.indexOf(';', index); - return idx === -1 ? mappings.length : idx; -} -function decodeInteger(mappings, pos, state, j) { - let value = 0; - let shift = 0; - let integer = 0; - do { - const c = mappings.charCodeAt(pos++); - integer = charToInt[c]; - value |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - const shouldNegate = value & 1; - value >>>= 1; - if (shouldNegate) { - value = -0x80000000 | -value; - } - state[j] += value; - return pos; -} -function hasMoreVlq(mappings, i, length) { - if (i >= length) - return false; - return mappings.charCodeAt(i) !== comma; -} -function sort(line) { - line.sort(sortComparator); -} -function sortComparator(a, b) { - return a[0] - b[0]; -} -function encode(decoded) { - const state = new Int32Array(5); - const bufLength = 1024 * 16; - const subLength = bufLength - 36; - const buf = new Uint8Array(bufLength); - const sub = buf.subarray(0, subLength); - let pos = 0; - let out = ''; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) { - if (pos === bufLength) { - out += td.decode(buf); - pos = 0; - } - buf[pos++] = semicolon; - } - if (line.length === 0) - continue; - state[0] = 0; - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - // We can push up to 5 ints, each int can take at most 7 chars, and we - // may push a comma. - if (pos > subLength) { - out += td.decode(sub); - buf.copyWithin(0, subLength, pos); - pos -= subLength; - } - if (j > 0) - buf[pos++] = comma; - pos = encodeInteger(buf, pos, state, segment, 0); // genColumn - if (segment.length === 1) - continue; - pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex - pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine - pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn - if (segment.length === 4) - continue; - pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex - } - } - return out + td.decode(buf.subarray(0, pos)); -} -function encodeInteger(buf, pos, state, segment, j) { - const next = segment[j]; - let num = next - state[j]; - state[j] = next; - num = num < 0 ? (-num << 1) | 1 : num << 1; - do { - let clamped = num & 0b011111; - num >>>= 5; - if (num > 0) - clamped |= 0b100000; - buf[pos++] = intToChar[clamped]; - } while (num > 0); - return pos; -} - -export { decode, encode }; -//# sourceMappingURL=sourcemap-codec.mjs.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map deleted file mode 100644 index 36d7249..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-codec.mjs","sources":["../src/sourcemap-codec.ts"],"sourcesContent":[null],"names":[],"mappings":"AAOA,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AACpC,MAAM,KAAK,GAAG,kEAAkE,CAAC;AACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;AAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC9B,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACjB,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAClB;AAED;AACA,MAAM,EAAE,GACN,OAAO,WAAW,KAAK,WAAW;sBACd,IAAI,WAAW,EAAE;MACjC,OAAO,MAAM,KAAK,WAAW;UAC7B;YACE,MAAM,CAAC,GAAe;gBACpB,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,G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AG,EAAE,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;KACjC,QAAQ,GAAG,GAAG,CAAC,EAAE;IAElB,OAAO,GAAG,CAAC;AACb;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js deleted file mode 100644 index bec92a9..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +++ /dev/null @@ -1,175 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {})); -})(this, (function (exports) { 'use strict'; - - const comma = ','.charCodeAt(0); - const semicolon = ';'.charCodeAt(0); - const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - const intToChar = new Uint8Array(64); // 64 possible chars. - const charToInt = new Uint8Array(128); // z is 122 in ASCII - for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; - } - // Provide a fallback for older environments. - const td = typeof TextDecoder !== 'undefined' - ? /* #__PURE__ */ new TextDecoder() - : typeof Buffer !== 'undefined' - ? { - decode(buf) { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - }, - } - : { - decode(buf) { - let out = ''; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - }, - }; - function decode(mappings) { - const state = new Int32Array(5); - const decoded = []; - let index = 0; - do { - const semi = indexOf(mappings, index); - const line = []; - let sorted = true; - let lastCol = 0; - state[0] = 0; - for (let i = index; i < semi; i++) { - let seg; - i = decodeInteger(mappings, i, state, 0); // genColumn - const col = state[0]; - if (col < lastCol) - sorted = false; - lastCol = col; - if (hasMoreVlq(mappings, i, semi)) { - i = decodeInteger(mappings, i, state, 1); // sourcesIndex - i = decodeInteger(mappings, i, state, 2); // sourceLine - i = decodeInteger(mappings, i, state, 3); // sourceColumn - if (hasMoreVlq(mappings, i, semi)) { - i = decodeInteger(mappings, i, state, 4); // namesIndex - seg = [col, state[1], state[2], state[3], state[4]]; - } - else { - seg = [col, state[1], state[2], state[3]]; - } - } - else { - seg = [col]; - } - line.push(seg); - } - if (!sorted) - sort(line); - decoded.push(line); - index = semi + 1; - } while (index <= mappings.length); - return decoded; - } - function indexOf(mappings, index) { - const idx = mappings.indexOf(';', index); - return idx === -1 ? mappings.length : idx; - } - function decodeInteger(mappings, pos, state, j) { - let value = 0; - let shift = 0; - let integer = 0; - do { - const c = mappings.charCodeAt(pos++); - integer = charToInt[c]; - value |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - const shouldNegate = value & 1; - value >>>= 1; - if (shouldNegate) { - value = -0x80000000 | -value; - } - state[j] += value; - return pos; - } - function hasMoreVlq(mappings, i, length) { - if (i >= length) - return false; - return mappings.charCodeAt(i) !== comma; - } - function sort(line) { - line.sort(sortComparator); - } - function sortComparator(a, b) { - return a[0] - b[0]; - } - function encode(decoded) { - const state = new Int32Array(5); - const bufLength = 1024 * 16; - const subLength = bufLength - 36; - const buf = new Uint8Array(bufLength); - const sub = buf.subarray(0, subLength); - let pos = 0; - let out = ''; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) { - if (pos === bufLength) { - out += td.decode(buf); - pos = 0; - } - buf[pos++] = semicolon; - } - if (line.length === 0) - continue; - state[0] = 0; - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - // We can push up to 5 ints, each int can take at most 7 chars, and we - // may push a comma. - if (pos > subLength) { - out += td.decode(sub); - buf.copyWithin(0, subLength, pos); - pos -= subLength; - } - if (j > 0) - buf[pos++] = comma; - pos = encodeInteger(buf, pos, state, segment, 0); // genColumn - if (segment.length === 1) - continue; - pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex - pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine - pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn - if (segment.length === 4) - continue; - pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex - } - } - return out + td.decode(buf.subarray(0, pos)); - } - function encodeInteger(buf, pos, state, segment, j) { - const next = segment[j]; - let num = next - state[j]; - state[j] = next; - num = num < 0 ? (-num << 1) | 1 : num << 1; - do { - let clamped = num & 0b011111; - num >>>= 5; - if (num > 0) - clamped |= 0b100000; - buf[pos++] = intToChar[clamped]; - } while (num > 0); - return pos; - } - - exports.decode = decode; - exports.encode = encode; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); -//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map deleted file mode 100644 index a7a4628..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-codec.umd.js","sources":["../src/sourcemap-codec.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;IAOA,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,kEAAkE,CAAC;IACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,SAAS,CAAC,CAAC,CAA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AAC;QAC1B,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;QAEhB,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;QAC3C,GAAG;YACD,IAAI,OAAO,GAAG,GAAG,GAAG,QAAQ,CAAC;YAC7B,GAAG,MAAM,CAAC,CAAC;YACX,IAAI,GAAG,GAAG,CAAC;gBAAE,OAAO,IAAI,QAAQ,CAAC;YACjC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;SACjC,QAAQ,GAAG,GAAG,CAAC,EAAE;QAElB,OAAO,GAAG,CAAC;IACb;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts deleted file mode 100644 index 410d320..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; -export declare type SourceMapLine = SourceMapSegment[]; -export declare type SourceMapMappings = SourceMapLine[]; -export declare function decode(mappings: string): SourceMapMappings; -export declare function encode(decoded: SourceMapMappings): string; -export declare function encode(decoded: Readonly): string; diff --git a/node_modules/@jridgewell/sourcemap-codec/package.json b/node_modules/@jridgewell/sourcemap-codec/package.json deleted file mode 100644 index 5945072..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "@jridgewell/sourcemap-codec", - "version": "1.4.14", - "description": "Encode/decode sourcemap mappings", - "keywords": [ - "sourcemap", - "vlq" - ], - "main": "dist/sourcemap-codec.umd.js", - "module": "dist/sourcemap-codec.mjs", - "typings": "dist/types/sourcemap-codec.d.ts", - "files": [ - "dist", - "src" - ], - "exports": { - ".": [ - { - "types": "./dist/types/sourcemap-codec.d.ts", - "browser": "./dist/sourcemap-codec.umd.js", - "import": "./dist/sourcemap-codec.mjs", - "require": "./dist/sourcemap-codec.umd.js" - }, - "./dist/sourcemap-codec.umd.js" - ], - "./package.json": "./package.json" - }, - "scripts": { - "benchmark": "run-s build:rollup benchmark:*", - "benchmark:install": "cd benchmark && npm install", - "benchmark:only": "node --expose-gc benchmark/index.js", - "build": "run-s -n build:*", - "build:rollup": "rollup -c rollup.config.js", - "build:ts": "tsc --project tsconfig.build.json", - "lint": "run-s -n lint:*", - "lint:prettier": "npm run test:lint:prettier -- --write", - "lint:ts": "npm run test:lint:ts -- --fix", - "prebuild": "rm -rf dist", - "prepublishOnly": "npm run preversion", - "preversion": "run-s test build", - "pretest": "run-s build:rollup", - "test": "run-s -n test:lint test:only", - "test:debug": "mocha --inspect-brk", - "test:lint": "run-s -n test:lint:*", - "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", - "test:lint:ts": "eslint '{src,test}/**/*.ts'", - "test:only": "mocha", - "test:coverage": "c8 mocha", - "test:watch": "mocha --watch" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/jridgewell/sourcemap-codec.git" - }, - "author": "Rich Harris", - "license": "MIT", - "devDependencies": { - "@rollup/plugin-typescript": "8.3.0", - "@types/node": "17.0.15", - "@typescript-eslint/eslint-plugin": "5.10.0", - "@typescript-eslint/parser": "5.10.0", - "benchmark": "2.1.4", - "c8": "7.11.2", - "eslint": "8.7.0", - "eslint-config-prettier": "8.3.0", - "mocha": "9.2.0", - "npm-run-all": "4.1.5", - "prettier": "2.5.1", - "rollup": "2.64.0", - "source-map": "0.6.1", - "source-map-js": "1.0.2", - "sourcemap-codec": "1.4.8", - "typescript": "4.5.4" - } -} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts b/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts deleted file mode 100644 index cafd90e..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts +++ /dev/null @@ -1,198 +0,0 @@ -export type SourceMapSegment = - | [number] - | [number, number, number, number] - | [number, number, number, number, number]; -export type SourceMapLine = SourceMapSegment[]; -export type SourceMapMappings = SourceMapLine[]; - -const comma = ','.charCodeAt(0); -const semicolon = ';'.charCodeAt(0); -const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -const intToChar = new Uint8Array(64); // 64 possible chars. -const charToInt = new Uint8Array(128); // z is 122 in ASCII - -for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; -} - -// Provide a fallback for older environments. -const td = - typeof TextDecoder !== 'undefined' - ? /* #__PURE__ */ new TextDecoder() - : typeof Buffer !== 'undefined' - ? { - decode(buf: Uint8Array) { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - }, - } - : { - decode(buf: Uint8Array) { - let out = ''; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - }, - }; - -export function decode(mappings: string): SourceMapMappings { - const state: [number, number, number, number, number] = new Int32Array(5) as any; - const decoded: SourceMapMappings = []; - - let index = 0; - do { - const semi = indexOf(mappings, index); - const line: SourceMapLine = []; - let sorted = true; - let lastCol = 0; - state[0] = 0; - - for (let i = index; i < semi; i++) { - let seg: SourceMapSegment; - - i = decodeInteger(mappings, i, state, 0); // genColumn - const col = state[0]; - if (col < lastCol) sorted = false; - lastCol = col; - - if (hasMoreVlq(mappings, i, semi)) { - i = decodeInteger(mappings, i, state, 1); // sourcesIndex - i = decodeInteger(mappings, i, state, 2); // sourceLine - i = decodeInteger(mappings, i, state, 3); // sourceColumn - - if (hasMoreVlq(mappings, i, semi)) { - i = decodeInteger(mappings, i, state, 4); // namesIndex - seg = [col, state[1], state[2], state[3], state[4]]; - } else { - seg = [col, state[1], state[2], state[3]]; - } - } else { - seg = [col]; - } - - line.push(seg); - } - - if (!sorted) sort(line); - decoded.push(line); - index = semi + 1; - } while (index <= mappings.length); - - return decoded; -} - -function indexOf(mappings: string, index: number): number { - const idx = mappings.indexOf(';', index); - return idx === -1 ? mappings.length : idx; -} - -function decodeInteger(mappings: string, pos: number, state: SourceMapSegment, j: number): number { - let value = 0; - let shift = 0; - let integer = 0; - - do { - const c = mappings.charCodeAt(pos++); - integer = charToInt[c]; - value |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - - const shouldNegate = value & 1; - value >>>= 1; - - if (shouldNegate) { - value = -0x80000000 | -value; - } - - state[j] += value; - return pos; -} - -function hasMoreVlq(mappings: string, i: number, length: number): boolean { - if (i >= length) return false; - return mappings.charCodeAt(i) !== comma; -} - -function sort(line: SourceMapSegment[]) { - line.sort(sortComparator); -} - -function sortComparator(a: SourceMapSegment, b: SourceMapSegment): number { - return a[0] - b[0]; -} - -export function encode(decoded: SourceMapMappings): string; -export function encode(decoded: Readonly): string; -export function encode(decoded: Readonly): string { - const state: [number, number, number, number, number] = new Int32Array(5) as any; - const bufLength = 1024 * 16; - const subLength = bufLength - 36; - const buf = new Uint8Array(bufLength); - const sub = buf.subarray(0, subLength); - let pos = 0; - let out = ''; - - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) { - if (pos === bufLength) { - out += td.decode(buf); - pos = 0; - } - buf[pos++] = semicolon; - } - if (line.length === 0) continue; - - state[0] = 0; - - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - // We can push up to 5 ints, each int can take at most 7 chars, and we - // may push a comma. - if (pos > subLength) { - out += td.decode(sub); - buf.copyWithin(0, subLength, pos); - pos -= subLength; - } - if (j > 0) buf[pos++] = comma; - - pos = encodeInteger(buf, pos, state, segment, 0); // genColumn - - if (segment.length === 1) continue; - pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex - pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine - pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn - - if (segment.length === 4) continue; - pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex - } - } - - return out + td.decode(buf.subarray(0, pos)); -} - -function encodeInteger( - buf: Uint8Array, - pos: number, - state: SourceMapSegment, - segment: SourceMapSegment, - j: number, -): number { - const next = segment[j]; - let num = next - state[j]; - state[j] = next; - - num = num < 0 ? (-num << 1) | 1 : num << 1; - do { - let clamped = num & 0b011111; - num >>>= 5; - if (num > 0) clamped |= 0b100000; - buf[pos++] = intToChar[clamped]; - } while (num > 0); - - return pos; -} diff --git a/node_modules/@jridgewell/trace-mapping/LICENSE b/node_modules/@jridgewell/trace-mapping/LICENSE deleted file mode 100644 index 37bb488..0000000 --- a/node_modules/@jridgewell/trace-mapping/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2022 Justin Ridgewell - -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/@jridgewell/trace-mapping/README.md b/node_modules/@jridgewell/trace-mapping/README.md deleted file mode 100644 index 8286cee..0000000 --- a/node_modules/@jridgewell/trace-mapping/README.md +++ /dev/null @@ -1,193 +0,0 @@ -# @jridgewell/trace-mapping - -> Trace the original position through a source map - -`trace-mapping` allows you to take the line and column of an output file and trace it to the -original location in the source file through a source map. - -You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This -provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM. - -## Installation - -```sh -npm install @jridgewell/trace-mapping -``` - -## Usage - -```typescript -import { TraceMap, originalPositionFor, generatedPositionFor } from '@jridgewell/trace-mapping'; - -const tracer = new TraceMap({ - version: 3, - sources: ['input.js'], - names: ['foo'], - mappings: 'KAyCIA', -}); - -// Lines start at line 1, columns at column 0. -const traced = originalPositionFor(tracer, { line: 1, column: 5 }); -assert.deepEqual(traced, { - source: 'input.js', - line: 42, - column: 4, - name: 'foo', -}); - -const generated = generatedPositionFor(tracer, { - source: 'input.js', - line: 42, - column: 4, -}); -assert.deepEqual(generated, { - line: 1, - column: 5, -}); -``` - -We also provide a lower level API to get the actual segment that matches our line and column. Unlike -`originalPositionFor`, `traceSegment` uses a 0-base for `line`: - -```typescript -import { traceSegment } from '@jridgewell/trace-mapping'; - -// line is 0-base. -const traced = traceSegment(tracer, /* line */ 0, /* column */ 5); - -// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] -// Again, line is 0-base and so is sourceLine -assert.deepEqual(traced, [5, 0, 41, 4, 0]); -``` - -### SectionedSourceMaps - -The sourcemap spec defines a special `sections` field that's designed to handle concatenation of -output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool -produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap` -helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a -`TraceMap` instance: - -```typescript -import { AnyMap } from '@jridgewell/trace-mapping'; -const fooOutput = 'foo'; -const barOutput = 'bar'; -const output = [fooOutput, barOutput].join('\n'); - -const sectioned = new AnyMap({ - version: 3, - sections: [ - { - // 0-base line and column - offset: { line: 0, column: 0 }, - // fooOutput's sourcemap - map: { - version: 3, - sources: ['foo.js'], - names: ['foo'], - mappings: 'AAAAA', - }, - }, - { - // barOutput's sourcemap will not affect the first line, only the second - offset: { line: 1, column: 0 }, - map: { - version: 3, - sources: ['bar.js'], - names: ['bar'], - mappings: 'AAAAA', - }, - }, - ], -}); - -const traced = originalPositionFor(sectioned, { - line: 2, - column: 0, -}); - -assert.deepEqual(traced, { - source: 'bar.js', - line: 1, - column: 0, - name: 'bar', -}); -``` - -## Benchmarks - -``` -node v18.0.0 - -amp.js.map -trace-mapping: decoded JSON input x 183 ops/sec ±0.41% (87 runs sampled) -trace-mapping: encoded JSON input x 384 ops/sec ±0.89% (89 runs sampled) -trace-mapping: decoded Object input x 3,085 ops/sec ±0.24% (100 runs sampled) -trace-mapping: encoded Object input x 452 ops/sec ±0.80% (84 runs sampled) -source-map-js: encoded Object input x 88.82 ops/sec ±0.45% (77 runs sampled) -source-map-0.6.1: encoded Object input x 38.39 ops/sec ±1.88% (52 runs sampled) -Fastest is trace-mapping: decoded Object input - -trace-mapping: decoded originalPositionFor x 4,025,347 ops/sec ±0.15% (97 runs sampled) -trace-mapping: encoded originalPositionFor x 3,333,136 ops/sec ±1.26% (90 runs sampled) -source-map-js: encoded originalPositionFor x 824,978 ops/sec ±1.06% (94 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 741,300 ops/sec ±0.93% (92 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 2,587,603 ops/sec ±0.75% (97 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - -*** - -babel.min.js.map -trace-mapping: decoded JSON input x 17.43 ops/sec ±8.81% (33 runs sampled) -trace-mapping: encoded JSON input x 34.18 ops/sec ±4.67% (50 runs sampled) -trace-mapping: decoded Object input x 1,010 ops/sec ±0.41% (98 runs sampled) -trace-mapping: encoded Object input x 39.45 ops/sec ±4.01% (52 runs sampled) -source-map-js: encoded Object input x 6.57 ops/sec ±3.04% (21 runs sampled) -source-map-0.6.1: encoded Object input x 4.23 ops/sec ±2.93% (15 runs sampled) -Fastest is trace-mapping: decoded Object input - -trace-mapping: decoded originalPositionFor x 7,576,265 ops/sec ±0.74% (96 runs sampled) -trace-mapping: encoded originalPositionFor x 5,019,743 ops/sec ±0.74% (94 runs sampled) -source-map-js: encoded originalPositionFor x 3,396,137 ops/sec ±42.32% (95 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 3,753,176 ops/sec ±0.72% (95 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 6,423,633 ops/sec ±0.74% (95 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - -*** - -preact.js.map -trace-mapping: decoded JSON input x 3,499 ops/sec ±0.18% (98 runs sampled) -trace-mapping: encoded JSON input x 6,078 ops/sec ±0.25% (99 runs sampled) -trace-mapping: decoded Object input x 254,788 ops/sec ±0.13% (100 runs sampled) -trace-mapping: encoded Object input x 14,063 ops/sec ±0.27% (94 runs sampled) -source-map-js: encoded Object input x 2,465 ops/sec ±0.25% (98 runs sampled) -source-map-0.6.1: encoded Object input x 1,174 ops/sec ±1.90% (95 runs sampled) -Fastest is trace-mapping: decoded Object input - -trace-mapping: decoded originalPositionFor x 7,720,171 ops/sec ±0.14% (97 runs sampled) -trace-mapping: encoded originalPositionFor x 6,864,485 ops/sec ±0.16% (101 runs sampled) -source-map-js: encoded originalPositionFor x 2,387,219 ops/sec ±0.28% (98 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 1,565,339 ops/sec ±0.32% (101 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 3,819,732 ops/sec ±0.38% (98 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - -*** - -react.js.map -trace-mapping: decoded JSON input x 1,719 ops/sec ±0.19% (99 runs sampled) -trace-mapping: encoded JSON input x 4,284 ops/sec ±0.51% (99 runs sampled) -trace-mapping: decoded Object input x 94,668 ops/sec ±0.08% (99 runs sampled) -trace-mapping: encoded Object input x 5,287 ops/sec ±0.24% (99 runs sampled) -source-map-js: encoded Object input x 814 ops/sec ±0.20% (98 runs sampled) -source-map-0.6.1: encoded Object input x 429 ops/sec ±0.24% (94 runs sampled) -Fastest is trace-mapping: decoded Object input - -trace-mapping: decoded originalPositionFor x 28,927,989 ops/sec ±0.61% (94 runs sampled) -trace-mapping: encoded originalPositionFor x 27,394,475 ops/sec ±0.55% (97 runs sampled) -source-map-js: encoded originalPositionFor x 16,856,730 ops/sec ±0.45% (96 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 12,258,950 ops/sec ±0.41% (97 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 22,272,990 ops/sec ±0.58% (95 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor -``` - -[source-map]: https://www.npmjs.com/package/source-map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs deleted file mode 100644 index 8fce400..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +++ /dev/null @@ -1,514 +0,0 @@ -import { encode, decode } from '@jridgewell/sourcemap-codec'; -import resolveUri from '@jridgewell/resolve-uri'; - -function resolve(input, base) { - // The base is always treated as a directory, if it's not empty. - // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 - // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 - if (base && !base.endsWith('/')) - base += '/'; - return resolveUri(input, base); -} - -/** - * Removes everything after the last "/", but leaves the slash. - */ -function stripFilename(path) { - if (!path) - return ''; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); -} - -const COLUMN = 0; -const SOURCES_INDEX = 1; -const SOURCE_LINE = 2; -const SOURCE_COLUMN = 3; -const NAMES_INDEX = 4; -const REV_GENERATED_LINE = 1; -const REV_GENERATED_COLUMN = 2; - -function maybeSort(mappings, owned) { - const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); - if (unsortedIndex === mappings.length) - return mappings; - // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If - // not, we do not want to modify the consumer's input array. - if (!owned) - mappings = mappings.slice(); - for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { - mappings[i] = sortSegments(mappings[i], owned); - } - return mappings; -} -function nextUnsortedSegmentLine(mappings, start) { - for (let i = start; i < mappings.length; i++) { - if (!isSorted(mappings[i])) - return i; - } - return mappings.length; -} -function isSorted(line) { - for (let j = 1; j < line.length; j++) { - if (line[j][COLUMN] < line[j - 1][COLUMN]) { - return false; - } - } - return true; -} -function sortSegments(line, owned) { - if (!owned) - line = line.slice(); - return line.sort(sortComparator); -} -function sortComparator(a, b) { - return a[COLUMN] - b[COLUMN]; -} - -let found = false; -/** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ -function binarySearch(haystack, needle, low, high) { - while (low <= high) { - const mid = low + ((high - low) >> 1); - const cmp = haystack[mid][COLUMN] - needle; - if (cmp === 0) { - found = true; - return mid; - } - if (cmp < 0) { - low = mid + 1; - } - else { - high = mid - 1; - } - } - found = false; - return low - 1; -} -function upperBound(haystack, needle, index) { - for (let i = index + 1; i < haystack.length; i++, index++) { - if (haystack[i][COLUMN] !== needle) - break; - } - return index; -} -function lowerBound(haystack, needle, index) { - for (let i = index - 1; i >= 0; i--, index--) { - if (haystack[i][COLUMN] !== needle) - break; - } - return index; -} -function memoizedState() { - return { - lastKey: -1, - lastNeedle: -1, - lastIndex: -1, - }; -} -/** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ -function memoizedBinarySearch(haystack, needle, state, key) { - const { lastKey, lastNeedle, lastIndex } = state; - let low = 0; - let high = haystack.length - 1; - if (key === lastKey) { - if (needle === lastNeedle) { - found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; - return lastIndex; - } - if (needle >= lastNeedle) { - // lastIndex may be -1 if the previous needle was not found. - low = lastIndex === -1 ? 0 : lastIndex; - } - else { - high = lastIndex; - } - } - state.lastKey = key; - state.lastNeedle = needle; - return (state.lastIndex = binarySearch(haystack, needle, low, high)); -} - -// Rebuilds the original source files, with mappings that are ordered by source line/column instead -// of generated line/column. -function buildBySources(decoded, memos) { - const sources = memos.map(buildNullArray); - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - if (seg.length === 1) - continue; - const sourceIndex = seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - const originalSource = sources[sourceIndex]; - const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); - const memo = memos[sourceIndex]; - // The binary search either found a match, or it found the left-index just before where the - // segment should go. Either way, we want to insert after that. And there may be multiple - // generated segments associated with an original location, so there may need to move several - // indexes before we find where we need to insert. - const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); - insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]); - } - } - return sources; -} -function insert(array, index, value) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; -} -// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like -// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. -// Numeric properties on objects are magically sorted in ascending order by the engine regardless of -// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending -// order when iterating with for-in. -function buildNullArray() { - return { __proto__: null }; -} - -const AnyMap = function (map, mapUrl) { - const parsed = typeof map === 'string' ? JSON.parse(map) : map; - if (!('sections' in parsed)) - return new TraceMap(parsed, mapUrl); - const mappings = []; - const sources = []; - const sourcesContent = []; - const names = []; - const { sections } = parsed; - let i = 0; - for (; i < sections.length - 1; i++) { - const no = sections[i + 1].offset; - addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, no.line, no.column); - } - if (sections.length > 0) { - addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, Infinity, Infinity); - } - const joined = { - version: 3, - file: parsed.file, - names, - sources, - sourcesContent, - mappings, - }; - return presortedDecodedMap(joined); -}; -function addSection(section, mapUrl, mappings, sources, sourcesContent, names, stopLine, stopColumn) { - const map = AnyMap(section.map, mapUrl); - const { line: lineOffset, column: columnOffset } = section.offset; - const sourcesOffset = sources.length; - const namesOffset = names.length; - const decoded = decodedMappings(map); - const { resolvedSources } = map; - append(sources, resolvedSources); - append(sourcesContent, map.sourcesContent || fillSourcesContent(resolvedSources.length)); - append(names, map.names); - // If this section jumps forwards several lines, we need to add lines to the output mappings catch up. - for (let i = mappings.length; i <= lineOffset; i++) - mappings.push([]); - // We can only add so many lines before we step into the range that the next section's map - // controls. When we get to the last line, then we'll start checking the segments to see if - // they've crossed into the column range. - const stopI = stopLine - lineOffset; - const len = Math.min(decoded.length, stopI + 1); - for (let i = 0; i < len; i++) { - const line = decoded[i]; - // On the 0th loop, the line will already exist due to a previous section, or the line catch up - // loop above. - const out = i === 0 ? mappings[lineOffset] : (mappings[lineOffset + i] = []); - // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the - // map can be multiple lines), it doesn't. - const cOffset = i === 0 ? columnOffset : 0; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const column = cOffset + seg[COLUMN]; - // If this segment steps into the column range that the next section's map controls, we need - // to stop early. - if (i === stopI && column >= stopColumn) - break; - if (seg.length === 1) { - out.push([column]); - continue; - } - const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - if (seg.length === 4) { - out.push([column, sourcesIndex, sourceLine, sourceColumn]); - continue; - } - out.push([column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); - } - } -} -function append(arr, other) { - for (let i = 0; i < other.length; i++) - arr.push(other[i]); -} -// Sourcemaps don't need to have sourcesContent, and if they don't, we need to create an array of -// equal length to the sources. This is because the sources and sourcesContent are paired arrays, -// where `sourcesContent[i]` is the content of the `sources[i]` file. If we didn't, then joined -// sourcemap would desynchronize the sources/contents. -function fillSourcesContent(len) { - const sourcesContent = []; - for (let i = 0; i < len; i++) - sourcesContent[i] = null; - return sourcesContent; -} - -const INVALID_ORIGINAL_MAPPING = Object.freeze({ - source: null, - line: null, - column: null, - name: null, -}); -const INVALID_GENERATED_MAPPING = Object.freeze({ - line: null, - column: null, -}); -const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; -const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; -const LEAST_UPPER_BOUND = -1; -const GREATEST_LOWER_BOUND = 1; -/** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ -let encodedMappings; -/** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ -let decodedMappings; -/** - * A low-level API to find the segment associated with a generated line/column (think, from a - * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. - */ -let traceSegment; -/** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ -let originalPositionFor; -/** - * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided - * the found mapping is from the same source and line as the originalPositionFor mapping. - * - * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` - * using the same needle that would return `id` when calling `originalPositionFor`. - */ -let generatedPositionFor; -/** - * Iterates each mapping in generated position order. - */ -let eachMapping; -/** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ -let presortedDecodedMap; -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -let decodedMap; -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -let encodedMap; -class TraceMap { - constructor(map, mapUrl) { - this._decodedMemo = memoizedState(); - this._bySources = undefined; - this._bySourceMemos = undefined; - const isString = typeof map === 'string'; - if (!isString && map.constructor === TraceMap) - return map; - const parsed = (isString ? JSON.parse(map) : map); - const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; - this.version = version; - this.file = file; - this.names = names; - this.sourceRoot = sourceRoot; - this.sources = sources; - this.sourcesContent = sourcesContent; - if (sourceRoot || mapUrl) { - const from = resolve(sourceRoot || '', stripFilename(mapUrl)); - this.resolvedSources = sources.map((s) => resolve(s || '', from)); - } - else { - this.resolvedSources = sources.map((s) => s || ''); - } - const { mappings } = parsed; - if (typeof mappings === 'string') { - this._encoded = mappings; - this._decoded = undefined; - } - else { - this._encoded = undefined; - this._decoded = maybeSort(mappings, isString); - } - } -} -(() => { - encodedMappings = (map) => { - var _a; - return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = encode(map._decoded))); - }; - decodedMappings = (map) => { - return (map._decoded || (map._decoded = decode(map._encoded))); - }; - traceSegment = (map, line, column) => { - const decoded = decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return null; - return traceSegmentInternal(decoded[line], map._decodedMemo, line, column, GREATEST_LOWER_BOUND); - }; - originalPositionFor = (map, { line, column, bias }) => { - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const decoded = decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return INVALID_ORIGINAL_MAPPING; - const segment = traceSegmentInternal(decoded[line], map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); - if (segment == null) - return INVALID_ORIGINAL_MAPPING; - if (segment.length == 1) - return INVALID_ORIGINAL_MAPPING; - const { names, resolvedSources } = map; - return { - source: resolvedSources[segment[SOURCES_INDEX]], - line: segment[SOURCE_LINE] + 1, - column: segment[SOURCE_COLUMN], - name: segment.length === 5 ? names[segment[NAMES_INDEX]] : null, - }; - }; - generatedPositionFor = (map, { source, line, column, bias }) => { - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const { sources, resolvedSources } = map; - let sourceIndex = sources.indexOf(source); - if (sourceIndex === -1) - sourceIndex = resolvedSources.indexOf(source); - if (sourceIndex === -1) - return INVALID_GENERATED_MAPPING; - const generated = (map._bySources || (map._bySources = buildBySources(decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState))))); - const memos = map._bySourceMemos; - const segments = generated[sourceIndex][line]; - if (segments == null) - return INVALID_GENERATED_MAPPING; - const segment = traceSegmentInternal(segments, memos[sourceIndex], line, column, bias || GREATEST_LOWER_BOUND); - if (segment == null) - return INVALID_GENERATED_MAPPING; - return { - line: segment[REV_GENERATED_LINE] + 1, - column: segment[REV_GENERATED_COLUMN], - }; - }; - eachMapping = (map, cb) => { - const decoded = decodedMappings(map); - const { names, resolvedSources } = map; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generatedLine = i + 1; - const generatedColumn = seg[0]; - let source = null; - let originalLine = null; - let originalColumn = null; - let name = null; - if (seg.length !== 1) { - source = resolvedSources[seg[1]]; - originalLine = seg[2] + 1; - originalColumn = seg[3]; - } - if (seg.length === 5) - name = names[seg[4]]; - cb({ - generatedLine, - generatedColumn, - source, - originalLine, - originalColumn, - name, - }); - } - } - }; - presortedDecodedMap = (map, mapUrl) => { - const clone = Object.assign({}, map); - clone.mappings = []; - const tracer = new TraceMap(clone, mapUrl); - tracer._decoded = map.mappings; - return tracer; - }; - decodedMap = (map) => { - return { - version: 3, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings: decodedMappings(map), - }; - }; - encodedMap = (map) => { - return { - version: 3, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings: encodedMappings(map), - }; - }; -})(); -function traceSegmentInternal(segments, memo, line, column, bias) { - let index = memoizedBinarySearch(segments, column, memo, line); - if (found) { - index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); - } - else if (bias === LEAST_UPPER_BOUND) - index++; - if (index === -1 || index === segments.length) - return null; - return segments[index]; -} - -export { AnyMap, GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap, decodedMap, decodedMappings, eachMapping, encodedMap, encodedMappings, generatedPositionFor, originalPositionFor, presortedDecodedMap, traceSegment }; -//# sourceMappingURL=trace-mapping.mjs.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map deleted file mode 100644 index fec7769..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trace-mapping.mjs","sources":["../../src/resolve.ts","../../src/strip-filename.ts","../../src/sourcemap-segment.ts","../../src/sort.ts","../../src/binary-search.ts","../../src/by-source.ts","../../src/any-map.ts","../../src/trace-mapping.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["bsFound"],"mappings":";;;SAEwB,OAAO,CAAC,KAAa,EAAE,IAAwB;;;;IAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,IAAI,IAAI,GAAG,CAAC;IAE7C,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACjC;;ACTA;;;SAGwB,aAAa,CAAC,IAA+B;IACnE,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAI,CA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node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js deleted file mode 100644 index 8b755bd..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +++ /dev/null @@ -1,528 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/sourcemap-codec'), require('@jridgewell/resolve-uri')) : - typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/sourcemap-codec', '@jridgewell/resolve-uri'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.traceMapping = {}, global.sourcemapCodec, global.resolveURI)); -})(this, (function (exports, sourcemapCodec, resolveUri) { 'use strict'; - - function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - - var resolveUri__default = /*#__PURE__*/_interopDefaultLegacy(resolveUri); - - function resolve(input, base) { - // The base is always treated as a directory, if it's not empty. - // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 - // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 - if (base && !base.endsWith('/')) - base += '/'; - return resolveUri__default["default"](input, base); - } - - /** - * Removes everything after the last "/", but leaves the slash. - */ - function stripFilename(path) { - if (!path) - return ''; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); - } - - const COLUMN = 0; - const SOURCES_INDEX = 1; - const SOURCE_LINE = 2; - const SOURCE_COLUMN = 3; - const NAMES_INDEX = 4; - const REV_GENERATED_LINE = 1; - const REV_GENERATED_COLUMN = 2; - - function maybeSort(mappings, owned) { - const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); - if (unsortedIndex === mappings.length) - return mappings; - // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If - // not, we do not want to modify the consumer's input array. - if (!owned) - mappings = mappings.slice(); - for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { - mappings[i] = sortSegments(mappings[i], owned); - } - return mappings; - } - function nextUnsortedSegmentLine(mappings, start) { - for (let i = start; i < mappings.length; i++) { - if (!isSorted(mappings[i])) - return i; - } - return mappings.length; - } - function isSorted(line) { - for (let j = 1; j < line.length; j++) { - if (line[j][COLUMN] < line[j - 1][COLUMN]) { - return false; - } - } - return true; - } - function sortSegments(line, owned) { - if (!owned) - line = line.slice(); - return line.sort(sortComparator); - } - function sortComparator(a, b) { - return a[COLUMN] - b[COLUMN]; - } - - let found = false; - /** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ - function binarySearch(haystack, needle, low, high) { - while (low <= high) { - const mid = low + ((high - low) >> 1); - const cmp = haystack[mid][COLUMN] - needle; - if (cmp === 0) { - found = true; - return mid; - } - if (cmp < 0) { - low = mid + 1; - } - else { - high = mid - 1; - } - } - found = false; - return low - 1; - } - function upperBound(haystack, needle, index) { - for (let i = index + 1; i < haystack.length; i++, index++) { - if (haystack[i][COLUMN] !== needle) - break; - } - return index; - } - function lowerBound(haystack, needle, index) { - for (let i = index - 1; i >= 0; i--, index--) { - if (haystack[i][COLUMN] !== needle) - break; - } - return index; - } - function memoizedState() { - return { - lastKey: -1, - lastNeedle: -1, - lastIndex: -1, - }; - } - /** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ - function memoizedBinarySearch(haystack, needle, state, key) { - const { lastKey, lastNeedle, lastIndex } = state; - let low = 0; - let high = haystack.length - 1; - if (key === lastKey) { - if (needle === lastNeedle) { - found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; - return lastIndex; - } - if (needle >= lastNeedle) { - // lastIndex may be -1 if the previous needle was not found. - low = lastIndex === -1 ? 0 : lastIndex; - } - else { - high = lastIndex; - } - } - state.lastKey = key; - state.lastNeedle = needle; - return (state.lastIndex = binarySearch(haystack, needle, low, high)); - } - - // Rebuilds the original source files, with mappings that are ordered by source line/column instead - // of generated line/column. - function buildBySources(decoded, memos) { - const sources = memos.map(buildNullArray); - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - if (seg.length === 1) - continue; - const sourceIndex = seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - const originalSource = sources[sourceIndex]; - const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); - const memo = memos[sourceIndex]; - // The binary search either found a match, or it found the left-index just before where the - // segment should go. Either way, we want to insert after that. And there may be multiple - // generated segments associated with an original location, so there may need to move several - // indexes before we find where we need to insert. - const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); - insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]); - } - } - return sources; - } - function insert(array, index, value) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; - } - // Null arrays allow us to use ordered index keys without actually allocating contiguous memory like - // a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. - // Numeric properties on objects are magically sorted in ascending order by the engine regardless of - // the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending - // order when iterating with for-in. - function buildNullArray() { - return { __proto__: null }; - } - - const AnyMap = function (map, mapUrl) { - const parsed = typeof map === 'string' ? JSON.parse(map) : map; - if (!('sections' in parsed)) - return new TraceMap(parsed, mapUrl); - const mappings = []; - const sources = []; - const sourcesContent = []; - const names = []; - const { sections } = parsed; - let i = 0; - for (; i < sections.length - 1; i++) { - const no = sections[i + 1].offset; - addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, no.line, no.column); - } - if (sections.length > 0) { - addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, Infinity, Infinity); - } - const joined = { - version: 3, - file: parsed.file, - names, - sources, - sourcesContent, - mappings, - }; - return exports.presortedDecodedMap(joined); - }; - function addSection(section, mapUrl, mappings, sources, sourcesContent, names, stopLine, stopColumn) { - const map = AnyMap(section.map, mapUrl); - const { line: lineOffset, column: columnOffset } = section.offset; - const sourcesOffset = sources.length; - const namesOffset = names.length; - const decoded = exports.decodedMappings(map); - const { resolvedSources } = map; - append(sources, resolvedSources); - append(sourcesContent, map.sourcesContent || fillSourcesContent(resolvedSources.length)); - append(names, map.names); - // If this section jumps forwards several lines, we need to add lines to the output mappings catch up. - for (let i = mappings.length; i <= lineOffset; i++) - mappings.push([]); - // We can only add so many lines before we step into the range that the next section's map - // controls. When we get to the last line, then we'll start checking the segments to see if - // they've crossed into the column range. - const stopI = stopLine - lineOffset; - const len = Math.min(decoded.length, stopI + 1); - for (let i = 0; i < len; i++) { - const line = decoded[i]; - // On the 0th loop, the line will already exist due to a previous section, or the line catch up - // loop above. - const out = i === 0 ? mappings[lineOffset] : (mappings[lineOffset + i] = []); - // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the - // map can be multiple lines), it doesn't. - const cOffset = i === 0 ? columnOffset : 0; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const column = cOffset + seg[COLUMN]; - // If this segment steps into the column range that the next section's map controls, we need - // to stop early. - if (i === stopI && column >= stopColumn) - break; - if (seg.length === 1) { - out.push([column]); - continue; - } - const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - if (seg.length === 4) { - out.push([column, sourcesIndex, sourceLine, sourceColumn]); - continue; - } - out.push([column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); - } - } - } - function append(arr, other) { - for (let i = 0; i < other.length; i++) - arr.push(other[i]); - } - // Sourcemaps don't need to have sourcesContent, and if they don't, we need to create an array of - // equal length to the sources. This is because the sources and sourcesContent are paired arrays, - // where `sourcesContent[i]` is the content of the `sources[i]` file. If we didn't, then joined - // sourcemap would desynchronize the sources/contents. - function fillSourcesContent(len) { - const sourcesContent = []; - for (let i = 0; i < len; i++) - sourcesContent[i] = null; - return sourcesContent; - } - - const INVALID_ORIGINAL_MAPPING = Object.freeze({ - source: null, - line: null, - column: null, - name: null, - }); - const INVALID_GENERATED_MAPPING = Object.freeze({ - line: null, - column: null, - }); - const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; - const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; - const LEAST_UPPER_BOUND = -1; - const GREATEST_LOWER_BOUND = 1; - /** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ - exports.encodedMappings = void 0; - /** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ - exports.decodedMappings = void 0; - /** - * A low-level API to find the segment associated with a generated line/column (think, from a - * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. - */ - exports.traceSegment = void 0; - /** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ - exports.originalPositionFor = void 0; - /** - * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided - * the found mapping is from the same source and line as the originalPositionFor mapping. - * - * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` - * using the same needle that would return `id` when calling `originalPositionFor`. - */ - exports.generatedPositionFor = void 0; - /** - * Iterates each mapping in generated position order. - */ - exports.eachMapping = void 0; - /** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ - exports.presortedDecodedMap = void 0; - /** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ - exports.decodedMap = void 0; - /** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ - exports.encodedMap = void 0; - class TraceMap { - constructor(map, mapUrl) { - this._decodedMemo = memoizedState(); - this._bySources = undefined; - this._bySourceMemos = undefined; - const isString = typeof map === 'string'; - if (!isString && map.constructor === TraceMap) - return map; - const parsed = (isString ? JSON.parse(map) : map); - const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; - this.version = version; - this.file = file; - this.names = names; - this.sourceRoot = sourceRoot; - this.sources = sources; - this.sourcesContent = sourcesContent; - if (sourceRoot || mapUrl) { - const from = resolve(sourceRoot || '', stripFilename(mapUrl)); - this.resolvedSources = sources.map((s) => resolve(s || '', from)); - } - else { - this.resolvedSources = sources.map((s) => s || ''); - } - const { mappings } = parsed; - if (typeof mappings === 'string') { - this._encoded = mappings; - this._decoded = undefined; - } - else { - this._encoded = undefined; - this._decoded = maybeSort(mappings, isString); - } - } - } - (() => { - exports.encodedMappings = (map) => { - var _a; - return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = sourcemapCodec.encode(map._decoded))); - }; - exports.decodedMappings = (map) => { - return (map._decoded || (map._decoded = sourcemapCodec.decode(map._encoded))); - }; - exports.traceSegment = (map, line, column) => { - const decoded = exports.decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return null; - return traceSegmentInternal(decoded[line], map._decodedMemo, line, column, GREATEST_LOWER_BOUND); - }; - exports.originalPositionFor = (map, { line, column, bias }) => { - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const decoded = exports.decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return INVALID_ORIGINAL_MAPPING; - const segment = traceSegmentInternal(decoded[line], map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); - if (segment == null) - return INVALID_ORIGINAL_MAPPING; - if (segment.length == 1) - return INVALID_ORIGINAL_MAPPING; - const { names, resolvedSources } = map; - return { - source: resolvedSources[segment[SOURCES_INDEX]], - line: segment[SOURCE_LINE] + 1, - column: segment[SOURCE_COLUMN], - name: segment.length === 5 ? names[segment[NAMES_INDEX]] : null, - }; - }; - exports.generatedPositionFor = (map, { source, line, column, bias }) => { - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const { sources, resolvedSources } = map; - let sourceIndex = sources.indexOf(source); - if (sourceIndex === -1) - sourceIndex = resolvedSources.indexOf(source); - if (sourceIndex === -1) - return INVALID_GENERATED_MAPPING; - const generated = (map._bySources || (map._bySources = buildBySources(exports.decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState))))); - const memos = map._bySourceMemos; - const segments = generated[sourceIndex][line]; - if (segments == null) - return INVALID_GENERATED_MAPPING; - const segment = traceSegmentInternal(segments, memos[sourceIndex], line, column, bias || GREATEST_LOWER_BOUND); - if (segment == null) - return INVALID_GENERATED_MAPPING; - return { - line: segment[REV_GENERATED_LINE] + 1, - column: segment[REV_GENERATED_COLUMN], - }; - }; - exports.eachMapping = (map, cb) => { - const decoded = exports.decodedMappings(map); - const { names, resolvedSources } = map; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generatedLine = i + 1; - const generatedColumn = seg[0]; - let source = null; - let originalLine = null; - let originalColumn = null; - let name = null; - if (seg.length !== 1) { - source = resolvedSources[seg[1]]; - originalLine = seg[2] + 1; - originalColumn = seg[3]; - } - if (seg.length === 5) - name = names[seg[4]]; - cb({ - generatedLine, - generatedColumn, - source, - originalLine, - originalColumn, - name, - }); - } - } - }; - exports.presortedDecodedMap = (map, mapUrl) => { - const clone = Object.assign({}, map); - clone.mappings = []; - const tracer = new TraceMap(clone, mapUrl); - tracer._decoded = map.mappings; - return tracer; - }; - exports.decodedMap = (map) => { - return { - version: 3, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings: exports.decodedMappings(map), - }; - }; - exports.encodedMap = (map) => { - return { - version: 3, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings: exports.encodedMappings(map), - }; - }; - })(); - function traceSegmentInternal(segments, memo, line, column, bias) { - let index = memoizedBinarySearch(segments, column, memo, line); - if (found) { - index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); - } - else if (bias === LEAST_UPPER_BOUND) - index++; - if (index === -1 || index === segments.length) - return null; - return segments[index]; - } - - exports.AnyMap = AnyMap; - exports.GREATEST_LOWER_BOUND = GREATEST_LOWER_BOUND; - exports.LEAST_UPPER_BOUND = LEAST_UPPER_BOUND; - exports.TraceMap = TraceMap; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); -//# sourceMappingURL=trace-mapping.umd.js.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map deleted file mode 100644 index 4ef72e7..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trace-mapping.umd.js","sources":["../../src/resolve.ts","../../src/strip-filename.ts","../../src/sourcemap-segment.ts","../../src/sort.ts","../../src/binary-search.ts","../../src/by-source.ts","../../src/any-map.ts","../../src/trace-mapping.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["resolveUri","presortedDecodedMap","decodedMappings","encodedMappings","traceSegment","originalPositionFor","generatedPositionFor","eachMapping","decodedMap","encodedMap","encode","decode","bsFound"],"mappings":";;;;;;;;;;aAEwB,OAAO,CAAC,KAAa,EAAE,IAAwB;;;;QAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,IAAI,IAAI,GAA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IAAI,CAAC,CAAC;QAC/D,IAAIS,KAAO,EAAE;YACX,KAAK,GAAG,CAAC,IAAI,KAAK,iBAAiB,GAAG,UAAU,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;SACzF;aAAM,IAAI,IAAI,KAAK,iBAAiB;YAAE,KAAK,EAAE,CAAC;QAE/C,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAC3D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzB;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts deleted file mode 100644 index 08bca6b..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { TraceMap } from './trace-mapping'; -import type { SectionedSourceMapInput } from './types'; -declare type AnyMap = { - new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; - (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; -}; -export declare const AnyMap: AnyMap; -export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts deleted file mode 100644 index 88820e5..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; -export declare type MemoState = { - lastKey: number; - lastNeedle: number; - lastIndex: number; -}; -export declare let found: boolean; -/** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ -export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; -export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; -export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; -export declare function memoizedState(): MemoState; -/** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ -export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts deleted file mode 100644 index 8d1e538..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment'; -import type { MemoState } from './binary-search'; -export declare type Source = { - __proto__: null; - [line: number]: Exclude[]; -}; -export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: MemoState[]): Source[]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts deleted file mode 100644 index cf7d4f8..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts deleted file mode 100644 index 2bfb5dc..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment'; -export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts deleted file mode 100644 index 6d70924..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -declare type GeneratedColumn = number; -declare type SourcesIndex = number; -declare type SourceLine = number; -declare type SourceColumn = number; -declare type NamesIndex = number; -declare type GeneratedLine = number; -export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; -export declare type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; -export declare const COLUMN = 0; -export declare const SOURCES_INDEX = 1; -export declare const SOURCE_LINE = 2; -export declare const SOURCE_COLUMN = 3; -export declare const NAMES_INDEX = 4; -export declare const REV_GENERATED_LINE = 1; -export declare const REV_GENERATED_COLUMN = 2; -export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts deleted file mode 100644 index bead5c1..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Removes everything after the last "/", but leaves the slash. - */ -export default function stripFilename(path: string | undefined | null): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts deleted file mode 100644 index 8cd4574..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment'; -import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping } from './types'; -export type { SourceMapSegment } from './sourcemap-segment'; -export type { SourceMapInput, SectionedSourceMapInput, DecodedSourceMap, EncodedSourceMap, SectionedSourceMap, InvalidOriginalMapping, OriginalMapping as Mapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, EachMapping, } from './types'; -export declare const LEAST_UPPER_BOUND = -1; -export declare const GREATEST_LOWER_BOUND = 1; -/** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ -export declare let encodedMappings: (map: TraceMap) => EncodedSourceMap['mappings']; -/** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ -export declare let decodedMappings: (map: TraceMap) => Readonly; -/** - * A low-level API to find the segment associated with a generated line/column (think, from a - * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. - */ -export declare let traceSegment: (map: TraceMap, line: number, column: number) => Readonly | null; -/** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ -export declare let originalPositionFor: (map: TraceMap, needle: Needle) => OriginalMapping | InvalidOriginalMapping; -/** - * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided - * the found mapping is from the same source and line as the originalPositionFor mapping. - * - * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` - * using the same needle that would return `id` when calling `originalPositionFor`. - */ -export declare let generatedPositionFor: (map: TraceMap, needle: SourceNeedle) => GeneratedMapping | InvalidGeneratedMapping; -/** - * Iterates each mapping in generated position order. - */ -export declare let eachMapping: (map: TraceMap, cb: (mapping: EachMapping) => void) => void; -/** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ -export declare let presortedDecodedMap: (map: DecodedSourceMap, mapUrl?: string) => TraceMap; -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare let decodedMap: (map: TraceMap) => Omit & { - mappings: readonly SourceMapSegment[][]; -}; -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare let encodedMap: (map: TraceMap) => EncodedSourceMap; -export { AnyMap } from './any-map'; -export declare class TraceMap implements SourceMap { - version: SourceMapV3['version']; - file: SourceMapV3['file']; - names: SourceMapV3['names']; - sourceRoot: SourceMapV3['sourceRoot']; - sources: SourceMapV3['sources']; - sourcesContent: SourceMapV3['sourcesContent']; - resolvedSources: string[]; - private _encoded; - private _decoded; - private _decodedMemo; - private _bySources; - private _bySourceMemos; - constructor(map: SourceMapInput, mapUrl?: string | null); -} diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts deleted file mode 100644 index 2cc90c0..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment'; -import type { TraceMap } from './trace-mapping'; -export interface SourceMapV3 { - file?: string | null; - names: string[]; - sourceRoot?: string; - sources: (string | null)[]; - sourcesContent?: (string | null)[]; - version: 3; -} -export interface EncodedSourceMap extends SourceMapV3 { - mappings: string; -} -export interface DecodedSourceMap extends SourceMapV3 { - mappings: SourceMapSegment[][]; -} -export interface Section { - offset: { - line: number; - column: number; - }; - map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; -} -export interface SectionedSourceMap { - file?: string | null; - sections: Section[]; - version: 3; -} -export declare type OriginalMapping = { - source: string | null; - line: number; - column: number; - name: string | null; -}; -export declare type InvalidOriginalMapping = { - source: null; - line: null; - column: null; - name: null; -}; -export declare type GeneratedMapping = { - line: number; - column: number; -}; -export declare type InvalidGeneratedMapping = { - line: null; - column: null; -}; -export declare type SourceMapInput = string | EncodedSourceMap | DecodedSourceMap | TraceMap; -export declare type SectionedSourceMapInput = SourceMapInput | SectionedSourceMap; -export declare type Needle = { - line: number; - column: number; - bias?: 1 | -1; -}; -export declare type SourceNeedle = { - source: string; - line: number; - column: number; - bias?: 1 | -1; -}; -export declare type EachMapping = { - generatedLine: number; - generatedColumn: number; - source: null; - originalLine: null; - originalColumn: null; - name: null; -} | { - generatedLine: number; - generatedColumn: number; - source: string | null; - originalLine: number; - originalColumn: number; - name: string | null; -}; -export declare abstract class SourceMap { - version: SourceMapV3['version']; - file: SourceMapV3['file']; - names: SourceMapV3['names']; - sourceRoot: SourceMapV3['sourceRoot']; - sources: SourceMapV3['sources']; - sourcesContent: SourceMapV3['sourcesContent']; - resolvedSources: SourceMapV3['sources']; -} diff --git a/node_modules/@jridgewell/trace-mapping/package.json b/node_modules/@jridgewell/trace-mapping/package.json deleted file mode 100644 index a957780..0000000 --- a/node_modules/@jridgewell/trace-mapping/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "@jridgewell/trace-mapping", - "version": "0.3.9", - "description": "Trace the original position through a source map", - "keywords": [ - "source", - "map" - ], - "main": "dist/trace-mapping.umd.js", - "module": "dist/trace-mapping.mjs", - "typings": "dist/types/trace-mapping.d.ts", - "files": [ - "dist" - ], - "exports": { - ".": { - "browser": "./dist/trace-mapping.umd.js", - "require": "./dist/trace-mapping.umd.js", - "import": "./dist/trace-mapping.mjs" - }, - "./package.json": "./package.json" - }, - "author": "Justin Ridgewell ", - "repository": { - "type": "git", - "url": "git+https://github.com/jridgewell/trace-mapping.git" - }, - "license": "MIT", - "scripts": { - "benchmark": "run-s build:rollup benchmark:*", - "benchmark:install": "cd benchmark && npm install", - "benchmark:only": "node benchmark/index.mjs", - "build": "run-s -n build:*", - "build:rollup": "rollup -c rollup.config.js", - "build:ts": "tsc --project tsconfig.build.json", - "lint": "run-s -n lint:*", - "lint:prettier": "npm run test:lint:prettier -- --write", - "lint:ts": "npm run test:lint:ts -- --fix", - "prebuild": "rm -rf dist", - "prepublishOnly": "npm run preversion", - "preversion": "run-s test build", - "test": "run-s -n test:lint test:only", - "test:debug": "ava debug", - "test:lint": "run-s -n test:lint:*", - "test:lint:prettier": "prettier --check '{src,test}/**/*.ts' '**/*.md'", - "test:lint:ts": "eslint '{src,test}/**/*.ts'", - "test:only": "c8 ava", - "test:watch": "ava --watch" - }, - "devDependencies": { - "@rollup/plugin-typescript": "8.3.0", - "@typescript-eslint/eslint-plugin": "5.10.0", - "@typescript-eslint/parser": "5.10.0", - "ava": "4.0.1", - "benchmark": "2.1.4", - "c8": "7.11.0", - "esbuild": "0.14.14", - "esbuild-node-loader": "0.6.4", - "eslint": "8.7.0", - "eslint-config-prettier": "8.3.0", - "npm-run-all": "4.1.5", - "prettier": "2.5.1", - "rollup": "2.64.0", - "typescript": "4.5.4" - }, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } -} diff --git a/node_modules/@tsconfig/node10/LICENSE b/node_modules/@tsconfig/node10/LICENSE deleted file mode 100644 index 48ea661..0000000 --- a/node_modules/@tsconfig/node10/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/@tsconfig/node10/README.md b/node_modules/@tsconfig/node10/README.md deleted file mode 100644 index 7a32f81..0000000 --- a/node_modules/@tsconfig/node10/README.md +++ /dev/null @@ -1,40 +0,0 @@ -### A base TSConfig for working with Node 10. - -Add the package to your `"devDependencies"`: - -```sh -npm install --save-dev @tsconfig/node10 -yarn add --dev @tsconfig/node10 -``` - -Add to your `tsconfig.json`: - -```json -"extends": "@tsconfig/node10/tsconfig.json" -``` - ---- - -The `tsconfig.json`: - -```jsonc -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 10", - - "compilerOptions": { - "lib": ["es2018"], - "module": "commonjs", - "target": "es2018", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} - -``` - -You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node10.json). diff --git a/node_modules/@tsconfig/node10/package.json b/node_modules/@tsconfig/node10/package.json deleted file mode 100644 index f2223fc..0000000 --- a/node_modules/@tsconfig/node10/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@tsconfig/node10","repository":{"type":"git","url":"https://github.com/tsconfig/bases.git","directory":"bases"},"license":"MIT","description":"A base TSConfig for working with Node 10.","keywords":["tsconfig","node10"],"version":"1.0.9"} \ No newline at end of file diff --git a/node_modules/@tsconfig/node10/tsconfig.json b/node_modules/@tsconfig/node10/tsconfig.json deleted file mode 100644 index 9cb33be..0000000 --- a/node_modules/@tsconfig/node10/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 10", - - "compilerOptions": { - "lib": ["es2018"], - "module": "commonjs", - "target": "es2018", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} diff --git a/node_modules/@tsconfig/node12/LICENSE b/node_modules/@tsconfig/node12/LICENSE deleted file mode 100644 index 48ea661..0000000 --- a/node_modules/@tsconfig/node12/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/@tsconfig/node12/README.md b/node_modules/@tsconfig/node12/README.md deleted file mode 100644 index 6352ccd..0000000 --- a/node_modules/@tsconfig/node12/README.md +++ /dev/null @@ -1,40 +0,0 @@ -### A base TSConfig for working with Node 12. - -Add the package to your `"devDependencies"`: - -```sh -npm install --save-dev @tsconfig/node12 -yarn add --dev @tsconfig/node12 -``` - -Add to your `tsconfig.json`: - -```json -"extends": "@tsconfig/node12/tsconfig.json" -``` - ---- - -The `tsconfig.json`: - -```jsonc -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 12", - - "compilerOptions": { - "lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"], - "module": "commonjs", - "target": "es2019", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} - -``` - -You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node12.json). diff --git a/node_modules/@tsconfig/node12/package.json b/node_modules/@tsconfig/node12/package.json deleted file mode 100644 index 56aad61..0000000 --- a/node_modules/@tsconfig/node12/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@tsconfig/node12","repository":{"type":"git","url":"https://github.com/tsconfig/bases.git","directory":"bases"},"license":"MIT","description":"A base TSConfig for working with Node 12.","keywords":["tsconfig","node12"],"version":"1.0.11"} \ No newline at end of file diff --git a/node_modules/@tsconfig/node12/tsconfig.json b/node_modules/@tsconfig/node12/tsconfig.json deleted file mode 100644 index eeaf944..0000000 --- a/node_modules/@tsconfig/node12/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 12", - - "compilerOptions": { - "lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"], - "module": "commonjs", - "target": "es2019", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} diff --git a/node_modules/@tsconfig/node14/LICENSE b/node_modules/@tsconfig/node14/LICENSE deleted file mode 100644 index 48ea661..0000000 --- a/node_modules/@tsconfig/node14/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/@tsconfig/node14/README.md b/node_modules/@tsconfig/node14/README.md deleted file mode 100644 index dad7f02..0000000 --- a/node_modules/@tsconfig/node14/README.md +++ /dev/null @@ -1,40 +0,0 @@ -### A base TSConfig for working with Node 14. - -Add the package to your `"devDependencies"`: - -```sh -npm install --save-dev @tsconfig/node14 -yarn add --dev @tsconfig/node14 -``` - -Add to your `tsconfig.json`: - -```json -"extends": "@tsconfig/node14/tsconfig.json" -``` - ---- - -The `tsconfig.json`: - -```jsonc -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 14", - - "compilerOptions": { - "lib": ["es2020"], - "module": "commonjs", - "target": "es2020", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} - -``` - -You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node14.json). diff --git a/node_modules/@tsconfig/node14/package.json b/node_modules/@tsconfig/node14/package.json deleted file mode 100644 index 742f97b..0000000 --- a/node_modules/@tsconfig/node14/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@tsconfig/node14","repository":{"type":"git","url":"https://github.com/tsconfig/bases.git","directory":"bases"},"license":"MIT","description":"A base TSConfig for working with Node 14.","keywords":["tsconfig","node14"],"version":"1.0.3"} \ No newline at end of file diff --git a/node_modules/@tsconfig/node14/tsconfig.json b/node_modules/@tsconfig/node14/tsconfig.json deleted file mode 100644 index d1d7551..0000000 --- a/node_modules/@tsconfig/node14/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 14", - - "compilerOptions": { - "lib": ["es2020"], - "module": "commonjs", - "target": "es2020", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} diff --git a/node_modules/@tsconfig/node16/LICENSE b/node_modules/@tsconfig/node16/LICENSE deleted file mode 100644 index 48ea661..0000000 --- a/node_modules/@tsconfig/node16/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/@tsconfig/node16/README.md b/node_modules/@tsconfig/node16/README.md deleted file mode 100644 index d4c52d4..0000000 --- a/node_modules/@tsconfig/node16/README.md +++ /dev/null @@ -1,40 +0,0 @@ -### A base TSConfig for working with Node 16. - -Add the package to your `"devDependencies"`: - -```sh -npm install --save-dev @tsconfig/node16 -yarn add --dev @tsconfig/node16 -``` - -Add to your `tsconfig.json`: - -```json -"extends": "@tsconfig/node16/tsconfig.json" -``` - ---- - -The `tsconfig.json`: - -```jsonc -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 16", - - "compilerOptions": { - "lib": ["es2021"], - "module": "commonjs", - "target": "es2021", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} - -``` - -You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node16.json). diff --git a/node_modules/@tsconfig/node16/package.json b/node_modules/@tsconfig/node16/package.json deleted file mode 100644 index c0e6dfa..0000000 --- a/node_modules/@tsconfig/node16/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@tsconfig/node16","repository":{"type":"git","url":"https://github.com/tsconfig/bases.git","directory":"bases"},"license":"MIT","description":"A base TSConfig for working with Node 16.","keywords":["tsconfig","node16"],"version":"1.0.3"} \ No newline at end of file diff --git a/node_modules/@tsconfig/node16/tsconfig.json b/node_modules/@tsconfig/node16/tsconfig.json deleted file mode 100644 index 262ff50..0000000 --- a/node_modules/@tsconfig/node16/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 16", - - "compilerOptions": { - "lib": ["es2021"], - "module": "commonjs", - "target": "es2021", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} diff --git a/node_modules/acorn-walk/CHANGELOG.md b/node_modules/acorn-walk/CHANGELOG.md deleted file mode 100644 index 30ec5a5..0000000 --- a/node_modules/acorn-walk/CHANGELOG.md +++ /dev/null @@ -1,167 +0,0 @@ -## 8.2.0 (2021-09-06) - -### New features - -Add support for walking ES2022 class static blocks. - -## 8.1.1 (2021-06-29) - -### Bug fixes - -Include `base` in the type declarations. - -## 8.1.0 (2021-04-24) - -### New features - -Support node types for class fields and private methods. - -## 8.0.2 (2021-01-25) - -### Bug fixes - -Adjust package.json to work with Node 12.16.0 and 13.0-13.6. - -## 8.0.0 (2021-01-05) - -### Bug fixes - -Fix a bug where `full` and `fullAncestor` would skip nodes with overridden types. - -## 8.0.0 (2020-08-12) - -### New features - -The package can now be loaded directly as an ECMAScript module in node 13+. - -## 7.2.0 (2020-06-17) - -### New features - -Support optional chaining and nullish coalescing. - -Support `import.meta`. - -Add support for `export * as ns from "source"`. - -## 7.1.1 (2020-02-13) - -### Bug fixes - -Clean up the type definitions to actually work well with the main parser. - -## 7.1.0 (2020-02-11) - -### New features - -Add a TypeScript definition file for the library. - -## 7.0.0 (2017-08-12) - -### New features - -Support walking `ImportExpression` nodes. - -## 6.2.0 (2017-07-04) - -### New features - -Add support for `Import` nodes. - -## 6.1.0 (2018-09-28) - -### New features - -The walker now walks `TemplateElement` nodes. - -## 6.0.1 (2018-09-14) - -### Bug fixes - -Fix bad "main" field in package.json. - -## 6.0.0 (2018-09-14) - -### Breaking changes - -This is now a separate package, `acorn-walk`, rather than part of the main `acorn` package. - -The `ScopeBody` and `ScopeExpression` meta-node-types are no longer supported. - -## 5.7.1 (2018-06-15) - -### Bug fixes - -Make sure the walker and bin files are rebuilt on release (the previous release didn't get the up-to-date versions). - -## 5.7.0 (2018-06-15) - -### Bug fixes - -Fix crash in walker when walking a binding-less catch node. - -## 5.6.2 (2018-06-05) - -### Bug fixes - -In the walker, go back to allowing the `baseVisitor` argument to be null to default to the default base everywhere. - -## 5.6.1 (2018-06-01) - -### Bug fixes - -Fix regression when passing `null` as fourth argument to `walk.recursive`. - -## 5.6.0 (2018-05-31) - -### Bug fixes - -Fix a bug in the walker that caused a crash when walking an object pattern spread. - -## 5.5.1 (2018-03-06) - -### Bug fixes - -Fix regression in walker causing property values in object patterns to be walked as expressions. - -## 5.5.0 (2018-02-27) - -### Bug fixes - -Support object spread in the AST walker. - -## 5.4.1 (2018-02-02) - -### Bug fixes - -5.4.0 somehow accidentally included an old version of walk.js. - -## 5.2.0 (2017-10-30) - -### Bug fixes - -The `full` and `fullAncestor` walkers no longer visit nodes multiple times. - -## 5.1.0 (2017-07-05) - -### New features - -New walker functions `full` and `fullAncestor`. - -## 3.2.0 (2016-06-07) - -### New features - -Make it possible to use `visit.ancestor` with a walk state. - -## 3.1.0 (2016-04-18) - -### New features - -The walker now allows defining handlers for `CatchClause` nodes. - -## 2.5.2 (2015-10-27) - -### Fixes - -Fix bug where the walker walked an exported `let` statement as an expression. diff --git a/node_modules/acorn-walk/LICENSE b/node_modules/acorn-walk/LICENSE deleted file mode 100644 index d6be6db..0000000 --- a/node_modules/acorn-walk/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (C) 2012-2020 by various contributors (see AUTHORS) - -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/acorn-walk/README.md b/node_modules/acorn-walk/README.md deleted file mode 100644 index e192bac..0000000 --- a/node_modules/acorn-walk/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# Acorn AST walker - -An abstract syntax tree walker for the -[ESTree](https://github.com/estree/estree) format. - -## Community - -Acorn is open source software released under an -[MIT license](https://github.com/acornjs/acorn/blob/master/acorn-walk/LICENSE). - -You are welcome to -[report bugs](https://github.com/acornjs/acorn/issues) or create pull -requests on [github](https://github.com/acornjs/acorn). For questions -and discussion, please use the -[Tern discussion forum](https://discuss.ternjs.net). - -## Installation - -The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): - -```sh -npm install acorn-walk -``` - -Alternately, you can download the source and build acorn yourself: - -```sh -git clone https://github.com/acornjs/acorn.git -cd acorn -npm install -``` - -## Interface - -An algorithm for recursing through a syntax tree is stored as an -object, with a property for each tree node type holding a function -that will recurse through such a node. There are several ways to run -such a walker. - -**simple**`(node, visitors, base, state)` does a 'simple' walk over a -tree. `node` should be the AST node to walk, and `visitors` an object -with properties whose names correspond to node types in the [ESTree -spec](https://github.com/estree/estree). The properties should contain -functions that will be called with the node object and, if applicable -the state at that point. The last two arguments are optional. `base` -is a walker algorithm, and `state` is a start state. The default -walker will simply visit all statements and expressions and not -produce a meaningful state. (An example of a use of state is to track -scope at each point in the tree.) - -```js -const acorn = require("acorn") -const walk = require("acorn-walk") - -walk.simple(acorn.parse("let x = 10"), { - Literal(node) { - console.log(`Found a literal: ${node.value}`) - } -}) -``` - -**ancestor**`(node, visitors, base, state)` does a 'simple' walk over -a tree, building up an array of ancestor nodes (including the current node) -and passing the array to the callbacks as a third parameter. - -```js -const acorn = require("acorn") -const walk = require("acorn-walk") - -walk.ancestor(acorn.parse("foo('hi')"), { - Literal(_, ancestors) { - console.log("This literal's ancestors are:", ancestors.map(n => n.type)) - } -}) -``` - -**recursive**`(node, state, functions, base)` does a 'recursive' -walk, where the walker functions are responsible for continuing the -walk on the child nodes of their target node. `state` is the start -state, and `functions` should contain an object that maps node types -to walker functions. Such functions are called with `(node, state, c)` -arguments, and can cause the walk to continue on a sub-node by calling -the `c` argument on it with `(node, state)` arguments. The optional -`base` argument provides the fallback walker functions for node types -that aren't handled in the `functions` object. If not given, the -default walkers will be used. - -**make**`(functions, base)` builds a new walker object by using the -walker functions in `functions` and filling in the missing ones by -taking defaults from `base`. - -**full**`(node, callback, base, state)` does a 'full' walk over a -tree, calling the callback with the arguments (node, state, type) for -each node - -**fullAncestor**`(node, callback, base, state)` does a 'full' walk -over a tree, building up an array of ancestor nodes (including the -current node) and passing the array to the callbacks as a third -parameter. - -```js -const acorn = require("acorn") -const walk = require("acorn-walk") - -walk.full(acorn.parse("1 + 1"), node => { - console.log(`There's a ${node.type} node at ${node.ch}`) -}) -``` - -**findNodeAt**`(node, start, end, test, base, state)` tries to locate -a node in a tree at the given start and/or end offsets, which -satisfies the predicate `test`. `start` and `end` can be either `null` -(as wildcard) or a number. `test` may be a string (indicating a node -type) or a function that takes `(nodeType, node)` arguments and -returns a boolean indicating whether this node is interesting. `base` -and `state` are optional, and can be used to specify a custom walker. -Nodes are tested from inner to outer, so if two nodes match the -boundaries, the inner one will be preferred. - -**findNodeAround**`(node, pos, test, base, state)` is a lot like -`findNodeAt`, but will match any node that exists 'around' (spanning) -the given position. - -**findNodeAfter**`(node, pos, test, base, state)` is similar to -`findNodeAround`, but will match all nodes *after* the given position -(testing outer nodes before inner nodes). diff --git a/node_modules/acorn-walk/dist/walk.d.ts b/node_modules/acorn-walk/dist/walk.d.ts deleted file mode 100644 index 2d81f01..0000000 --- a/node_modules/acorn-walk/dist/walk.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -import {Node} from 'acorn'; - -declare module "acorn-walk" { - type FullWalkerCallback = ( - node: Node, - state: TState, - type: string - ) => void; - - type FullAncestorWalkerCallback = ( - node: Node, - state: TState | Node[], - ancestors: Node[], - type: string - ) => void; - type WalkerCallback = (node: Node, state: TState) => void; - - type SimpleWalkerFn = ( - node: Node, - state: TState - ) => void; - - type AncestorWalkerFn = ( - node: Node, - state: TState| Node[], - ancestors: Node[] - ) => void; - - type RecursiveWalkerFn = ( - node: Node, - state: TState, - callback: WalkerCallback - ) => void; - - type SimpleVisitors = { - [type: string]: SimpleWalkerFn - }; - - type AncestorVisitors = { - [type: string]: AncestorWalkerFn - }; - - type RecursiveVisitors = { - [type: string]: RecursiveWalkerFn - }; - - type FindPredicate = (type: string, node: Node) => boolean; - - interface Found { - node: Node, - state: TState - } - - export function simple( - node: Node, - visitors: SimpleVisitors, - base?: RecursiveVisitors, - state?: TState - ): void; - - export function ancestor( - node: Node, - visitors: AncestorVisitors, - base?: RecursiveVisitors, - state?: TState - ): void; - - export function recursive( - node: Node, - state: TState, - functions: RecursiveVisitors, - base?: RecursiveVisitors - ): void; - - export function full( - node: Node, - callback: FullWalkerCallback, - base?: RecursiveVisitors, - state?: TState - ): void; - - export function fullAncestor( - node: Node, - callback: FullAncestorWalkerCallback, - base?: RecursiveVisitors, - state?: TState - ): void; - - export function make( - functions: RecursiveVisitors, - base?: RecursiveVisitors - ): RecursiveVisitors; - - export function findNodeAt( - node: Node, - start: number | undefined, - end?: number | undefined, - type?: FindPredicate | string, - base?: RecursiveVisitors, - state?: TState - ): Found | undefined; - - export function findNodeAround( - node: Node, - start: number | undefined, - type?: FindPredicate | string, - base?: RecursiveVisitors, - state?: TState - ): Found | undefined; - - export const findNodeAfter: typeof findNodeAround; - - export const base: RecursiveVisitors; -} diff --git a/node_modules/acorn-walk/dist/walk.js b/node_modules/acorn-walk/dist/walk.js deleted file mode 100644 index a7f81b0..0000000 --- a/node_modules/acorn-walk/dist/walk.js +++ /dev/null @@ -1,463 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory((global.acorn = global.acorn || {}, global.acorn.walk = {}))); -}(this, (function (exports) { 'use strict'; - - // AST walker module for Mozilla Parser API compatible trees - - // A simple walk is one where you simply specify callbacks to be - // called on specific nodes. The last two arguments are optional. A - // simple use would be - // - // walk.simple(myTree, { - // Expression: function(node) { ... } - // }); - // - // to do something with all expressions. All Parser API node types - // can be used to identify node types, as well as Expression and - // Statement, which denote categories of nodes. - // - // The base argument can be used to pass a custom (recursive) - // walker, and state can be used to give this walked an initial - // state. - - function simple(node, visitors, baseVisitor, state, override) { - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type, found = visitors[type]; - baseVisitor[type](node, st, c); - if (found) { found(node, st); } - })(node, state, override); - } - - // An ancestor walk keeps an array of ancestor nodes (including the - // current node) and passes them to the callback as third parameter - // (and also as state parameter when no other state is present). - function ancestor(node, visitors, baseVisitor, state, override) { - var ancestors = []; - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type, found = visitors[type]; - var isNew = node !== ancestors[ancestors.length - 1]; - if (isNew) { ancestors.push(node); } - baseVisitor[type](node, st, c); - if (found) { found(node, st || ancestors, ancestors); } - if (isNew) { ancestors.pop(); } - })(node, state, override); - } - - // A recursive walk is one where your functions override the default - // walkers. They can modify and replace the state parameter that's - // threaded through the walk, and can opt how and whether to walk - // their child nodes (by calling their third argument on these - // nodes). - function recursive(node, state, funcs, baseVisitor, override) { - var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor - ;(function c(node, st, override) { - visitor[override || node.type](node, st, c); - })(node, state, override); - } - - function makeTest(test) { - if (typeof test === "string") - { return function (type) { return type === test; } } - else if (!test) - { return function () { return true; } } - else - { return test } - } - - var Found = function Found(node, state) { this.node = node; this.state = state; }; - - // A full walk triggers the callback on each node - function full(node, callback, baseVisitor, state, override) { - if (!baseVisitor) { baseVisitor = base; } - var last - ;(function c(node, st, override) { - var type = override || node.type; - baseVisitor[type](node, st, c); - if (last !== node) { - callback(node, st, type); - last = node; - } - })(node, state, override); - } - - // An fullAncestor walk is like an ancestor walk, but triggers - // the callback on each node - function fullAncestor(node, callback, baseVisitor, state) { - if (!baseVisitor) { baseVisitor = base; } - var ancestors = [], last - ;(function c(node, st, override) { - var type = override || node.type; - var isNew = node !== ancestors[ancestors.length - 1]; - if (isNew) { ancestors.push(node); } - baseVisitor[type](node, st, c); - if (last !== node) { - callback(node, st || ancestors, ancestors, type); - last = node; - } - if (isNew) { ancestors.pop(); } - })(node, state); - } - - // Find a node with a given start, end, and type (all are optional, - // null can be used as wildcard). Returns a {node, state} object, or - // undefined when it doesn't find a matching node. - function findNodeAt(node, start, end, test, baseVisitor, state) { - if (!baseVisitor) { baseVisitor = base; } - test = makeTest(test); - try { - (function c(node, st, override) { - var type = override || node.type; - if ((start == null || node.start <= start) && - (end == null || node.end >= end)) - { baseVisitor[type](node, st, c); } - if ((start == null || node.start === start) && - (end == null || node.end === end) && - test(type, node)) - { throw new Found(node, st) } - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e - } - } - - // Find the innermost node of a given type that contains the given - // position. Interface similar to findNodeAt. - function findNodeAround(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - try { - (function c(node, st, override) { - var type = override || node.type; - if (node.start > pos || node.end < pos) { return } - baseVisitor[type](node, st, c); - if (test(type, node)) { throw new Found(node, st) } - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e - } - } - - // Find the outermost matching node after a given position. - function findNodeAfter(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - try { - (function c(node, st, override) { - if (node.end < pos) { return } - var type = override || node.type; - if (node.start >= pos && test(type, node)) { throw new Found(node, st) } - baseVisitor[type](node, st, c); - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e - } - } - - // Find the outermost matching node before a given position. - function findNodeBefore(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - var max - ;(function c(node, st, override) { - if (node.start > pos) { return } - var type = override || node.type; - if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) - { max = new Found(node, st); } - baseVisitor[type](node, st, c); - })(node, state); - return max - } - - // Used to create a custom walker. Will fill in all missing node - // type properties with the defaults. - function make(funcs, baseVisitor) { - var visitor = Object.create(baseVisitor || base); - for (var type in funcs) { visitor[type] = funcs[type]; } - return visitor - } - - function skipThrough(node, st, c) { c(node, st); } - function ignore(_node, _st, _c) {} - - // Node walkers. - - var base = {}; - - base.Program = base.BlockStatement = base.StaticBlock = function (node, st, c) { - for (var i = 0, list = node.body; i < list.length; i += 1) - { - var stmt = list[i]; - - c(stmt, st, "Statement"); - } - }; - base.Statement = skipThrough; - base.EmptyStatement = ignore; - base.ExpressionStatement = base.ParenthesizedExpression = base.ChainExpression = - function (node, st, c) { return c(node.expression, st, "Expression"); }; - base.IfStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Statement"); - if (node.alternate) { c(node.alternate, st, "Statement"); } - }; - base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; - base.BreakStatement = base.ContinueStatement = ignore; - base.WithStatement = function (node, st, c) { - c(node.object, st, "Expression"); - c(node.body, st, "Statement"); - }; - base.SwitchStatement = function (node, st, c) { - c(node.discriminant, st, "Expression"); - for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) { - var cs = list$1[i$1]; - - if (cs.test) { c(cs.test, st, "Expression"); } - for (var i = 0, list = cs.consequent; i < list.length; i += 1) - { - var cons = list[i]; - - c(cons, st, "Statement"); - } - } - }; - base.SwitchCase = function (node, st, c) { - if (node.test) { c(node.test, st, "Expression"); } - for (var i = 0, list = node.consequent; i < list.length; i += 1) - { - var cons = list[i]; - - c(cons, st, "Statement"); - } - }; - base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { - if (node.argument) { c(node.argument, st, "Expression"); } - }; - base.ThrowStatement = base.SpreadElement = - function (node, st, c) { return c(node.argument, st, "Expression"); }; - base.TryStatement = function (node, st, c) { - c(node.block, st, "Statement"); - if (node.handler) { c(node.handler, st); } - if (node.finalizer) { c(node.finalizer, st, "Statement"); } - }; - base.CatchClause = function (node, st, c) { - if (node.param) { c(node.param, st, "Pattern"); } - c(node.body, st, "Statement"); - }; - base.WhileStatement = base.DoWhileStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.body, st, "Statement"); - }; - base.ForStatement = function (node, st, c) { - if (node.init) { c(node.init, st, "ForInit"); } - if (node.test) { c(node.test, st, "Expression"); } - if (node.update) { c(node.update, st, "Expression"); } - c(node.body, st, "Statement"); - }; - base.ForInStatement = base.ForOfStatement = function (node, st, c) { - c(node.left, st, "ForInit"); - c(node.right, st, "Expression"); - c(node.body, st, "Statement"); - }; - base.ForInit = function (node, st, c) { - if (node.type === "VariableDeclaration") { c(node, st); } - else { c(node, st, "Expression"); } - }; - base.DebuggerStatement = ignore; - - base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; - base.VariableDeclaration = function (node, st, c) { - for (var i = 0, list = node.declarations; i < list.length; i += 1) - { - var decl = list[i]; - - c(decl, st); - } - }; - base.VariableDeclarator = function (node, st, c) { - c(node.id, st, "Pattern"); - if (node.init) { c(node.init, st, "Expression"); } - }; - - base.Function = function (node, st, c) { - if (node.id) { c(node.id, st, "Pattern"); } - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; - - c(param, st, "Pattern"); - } - c(node.body, st, node.expression ? "Expression" : "Statement"); - }; - - base.Pattern = function (node, st, c) { - if (node.type === "Identifier") - { c(node, st, "VariablePattern"); } - else if (node.type === "MemberExpression") - { c(node, st, "MemberPattern"); } - else - { c(node, st); } - }; - base.VariablePattern = ignore; - base.MemberPattern = skipThrough; - base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; - base.ArrayPattern = function (node, st, c) { - for (var i = 0, list = node.elements; i < list.length; i += 1) { - var elt = list[i]; - - if (elt) { c(elt, st, "Pattern"); } - } - }; - base.ObjectPattern = function (node, st, c) { - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - if (prop.type === "Property") { - if (prop.computed) { c(prop.key, st, "Expression"); } - c(prop.value, st, "Pattern"); - } else if (prop.type === "RestElement") { - c(prop.argument, st, "Pattern"); - } - } - }; - - base.Expression = skipThrough; - base.ThisExpression = base.Super = base.MetaProperty = ignore; - base.ArrayExpression = function (node, st, c) { - for (var i = 0, list = node.elements; i < list.length; i += 1) { - var elt = list[i]; - - if (elt) { c(elt, st, "Expression"); } - } - }; - base.ObjectExpression = function (node, st, c) { - for (var i = 0, list = node.properties; i < list.length; i += 1) - { - var prop = list[i]; - - c(prop, st); - } - }; - base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; - base.SequenceExpression = function (node, st, c) { - for (var i = 0, list = node.expressions; i < list.length; i += 1) - { - var expr = list[i]; - - c(expr, st, "Expression"); - } - }; - base.TemplateLiteral = function (node, st, c) { - for (var i = 0, list = node.quasis; i < list.length; i += 1) - { - var quasi = list[i]; - - c(quasi, st); - } - - for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) - { - var expr = list$1[i$1]; - - c(expr, st, "Expression"); - } - }; - base.TemplateElement = ignore; - base.UnaryExpression = base.UpdateExpression = function (node, st, c) { - c(node.argument, st, "Expression"); - }; - base.BinaryExpression = base.LogicalExpression = function (node, st, c) { - c(node.left, st, "Expression"); - c(node.right, st, "Expression"); - }; - base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { - c(node.left, st, "Pattern"); - c(node.right, st, "Expression"); - }; - base.ConditionalExpression = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Expression"); - c(node.alternate, st, "Expression"); - }; - base.NewExpression = base.CallExpression = function (node, st, c) { - c(node.callee, st, "Expression"); - if (node.arguments) - { for (var i = 0, list = node.arguments; i < list.length; i += 1) - { - var arg = list[i]; - - c(arg, st, "Expression"); - } } - }; - base.MemberExpression = function (node, st, c) { - c(node.object, st, "Expression"); - if (node.computed) { c(node.property, st, "Expression"); } - }; - base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { - if (node.declaration) - { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } - if (node.source) { c(node.source, st, "Expression"); } - }; - base.ExportAllDeclaration = function (node, st, c) { - if (node.exported) - { c(node.exported, st); } - c(node.source, st, "Expression"); - }; - base.ImportDeclaration = function (node, st, c) { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) - { - var spec = list[i]; - - c(spec, st); - } - c(node.source, st, "Expression"); - }; - base.ImportExpression = function (node, st, c) { - c(node.source, st, "Expression"); - }; - base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.PrivateIdentifier = base.Literal = ignore; - - base.TaggedTemplateExpression = function (node, st, c) { - c(node.tag, st, "Expression"); - c(node.quasi, st, "Expression"); - }; - base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; - base.Class = function (node, st, c) { - if (node.id) { c(node.id, st, "Pattern"); } - if (node.superClass) { c(node.superClass, st, "Expression"); } - c(node.body, st); - }; - base.ClassBody = function (node, st, c) { - for (var i = 0, list = node.body; i < list.length; i += 1) - { - var elt = list[i]; - - c(elt, st); - } - }; - base.MethodDefinition = base.PropertyDefinition = base.Property = function (node, st, c) { - if (node.computed) { c(node.key, st, "Expression"); } - if (node.value) { c(node.value, st, "Expression"); } - }; - - exports.ancestor = ancestor; - exports.base = base; - exports.findNodeAfter = findNodeAfter; - exports.findNodeAround = findNodeAround; - exports.findNodeAt = findNodeAt; - exports.findNodeBefore = findNodeBefore; - exports.full = full; - exports.fullAncestor = fullAncestor; - exports.make = make; - exports.recursive = recursive; - exports.simple = simple; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/acorn-walk/dist/walk.mjs b/node_modules/acorn-walk/dist/walk.mjs deleted file mode 100644 index 89dd1f1..0000000 --- a/node_modules/acorn-walk/dist/walk.mjs +++ /dev/null @@ -1,443 +0,0 @@ -// AST walker module for Mozilla Parser API compatible trees - -// A simple walk is one where you simply specify callbacks to be -// called on specific nodes. The last two arguments are optional. A -// simple use would be -// -// walk.simple(myTree, { -// Expression: function(node) { ... } -// }); -// -// to do something with all expressions. All Parser API node types -// can be used to identify node types, as well as Expression and -// Statement, which denote categories of nodes. -// -// The base argument can be used to pass a custom (recursive) -// walker, and state can be used to give this walked an initial -// state. - -function simple(node, visitors, baseVisitor, state, override) { - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type, found = visitors[type]; - baseVisitor[type](node, st, c); - if (found) { found(node, st); } - })(node, state, override); -} - -// An ancestor walk keeps an array of ancestor nodes (including the -// current node) and passes them to the callback as third parameter -// (and also as state parameter when no other state is present). -function ancestor(node, visitors, baseVisitor, state, override) { - var ancestors = []; - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type, found = visitors[type]; - var isNew = node !== ancestors[ancestors.length - 1]; - if (isNew) { ancestors.push(node); } - baseVisitor[type](node, st, c); - if (found) { found(node, st || ancestors, ancestors); } - if (isNew) { ancestors.pop(); } - })(node, state, override); -} - -// A recursive walk is one where your functions override the default -// walkers. They can modify and replace the state parameter that's -// threaded through the walk, and can opt how and whether to walk -// their child nodes (by calling their third argument on these -// nodes). -function recursive(node, state, funcs, baseVisitor, override) { - var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor - ;(function c(node, st, override) { - visitor[override || node.type](node, st, c); - })(node, state, override); -} - -function makeTest(test) { - if (typeof test === "string") - { return function (type) { return type === test; } } - else if (!test) - { return function () { return true; } } - else - { return test } -} - -var Found = function Found(node, state) { this.node = node; this.state = state; }; - -// A full walk triggers the callback on each node -function full(node, callback, baseVisitor, state, override) { - if (!baseVisitor) { baseVisitor = base; } - var last - ;(function c(node, st, override) { - var type = override || node.type; - baseVisitor[type](node, st, c); - if (last !== node) { - callback(node, st, type); - last = node; - } - })(node, state, override); -} - -// An fullAncestor walk is like an ancestor walk, but triggers -// the callback on each node -function fullAncestor(node, callback, baseVisitor, state) { - if (!baseVisitor) { baseVisitor = base; } - var ancestors = [], last - ;(function c(node, st, override) { - var type = override || node.type; - var isNew = node !== ancestors[ancestors.length - 1]; - if (isNew) { ancestors.push(node); } - baseVisitor[type](node, st, c); - if (last !== node) { - callback(node, st || ancestors, ancestors, type); - last = node; - } - if (isNew) { ancestors.pop(); } - })(node, state); -} - -// Find a node with a given start, end, and type (all are optional, -// null can be used as wildcard). Returns a {node, state} object, or -// undefined when it doesn't find a matching node. -function findNodeAt(node, start, end, test, baseVisitor, state) { - if (!baseVisitor) { baseVisitor = base; } - test = makeTest(test); - try { - (function c(node, st, override) { - var type = override || node.type; - if ((start == null || node.start <= start) && - (end == null || node.end >= end)) - { baseVisitor[type](node, st, c); } - if ((start == null || node.start === start) && - (end == null || node.end === end) && - test(type, node)) - { throw new Found(node, st) } - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e - } -} - -// Find the innermost node of a given type that contains the given -// position. Interface similar to findNodeAt. -function findNodeAround(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - try { - (function c(node, st, override) { - var type = override || node.type; - if (node.start > pos || node.end < pos) { return } - baseVisitor[type](node, st, c); - if (test(type, node)) { throw new Found(node, st) } - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e - } -} - -// Find the outermost matching node after a given position. -function findNodeAfter(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - try { - (function c(node, st, override) { - if (node.end < pos) { return } - var type = override || node.type; - if (node.start >= pos && test(type, node)) { throw new Found(node, st) } - baseVisitor[type](node, st, c); - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e - } -} - -// Find the outermost matching node before a given position. -function findNodeBefore(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - var max - ;(function c(node, st, override) { - if (node.start > pos) { return } - var type = override || node.type; - if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) - { max = new Found(node, st); } - baseVisitor[type](node, st, c); - })(node, state); - return max -} - -// Used to create a custom walker. Will fill in all missing node -// type properties with the defaults. -function make(funcs, baseVisitor) { - var visitor = Object.create(baseVisitor || base); - for (var type in funcs) { visitor[type] = funcs[type]; } - return visitor -} - -function skipThrough(node, st, c) { c(node, st); } -function ignore(_node, _st, _c) {} - -// Node walkers. - -var base = {}; - -base.Program = base.BlockStatement = base.StaticBlock = function (node, st, c) { - for (var i = 0, list = node.body; i < list.length; i += 1) - { - var stmt = list[i]; - - c(stmt, st, "Statement"); - } -}; -base.Statement = skipThrough; -base.EmptyStatement = ignore; -base.ExpressionStatement = base.ParenthesizedExpression = base.ChainExpression = - function (node, st, c) { return c(node.expression, st, "Expression"); }; -base.IfStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Statement"); - if (node.alternate) { c(node.alternate, st, "Statement"); } -}; -base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; -base.BreakStatement = base.ContinueStatement = ignore; -base.WithStatement = function (node, st, c) { - c(node.object, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.SwitchStatement = function (node, st, c) { - c(node.discriminant, st, "Expression"); - for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) { - var cs = list$1[i$1]; - - if (cs.test) { c(cs.test, st, "Expression"); } - for (var i = 0, list = cs.consequent; i < list.length; i += 1) - { - var cons = list[i]; - - c(cons, st, "Statement"); - } - } -}; -base.SwitchCase = function (node, st, c) { - if (node.test) { c(node.test, st, "Expression"); } - for (var i = 0, list = node.consequent; i < list.length; i += 1) - { - var cons = list[i]; - - c(cons, st, "Statement"); - } -}; -base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { - if (node.argument) { c(node.argument, st, "Expression"); } -}; -base.ThrowStatement = base.SpreadElement = - function (node, st, c) { return c(node.argument, st, "Expression"); }; -base.TryStatement = function (node, st, c) { - c(node.block, st, "Statement"); - if (node.handler) { c(node.handler, st); } - if (node.finalizer) { c(node.finalizer, st, "Statement"); } -}; -base.CatchClause = function (node, st, c) { - if (node.param) { c(node.param, st, "Pattern"); } - c(node.body, st, "Statement"); -}; -base.WhileStatement = base.DoWhileStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.ForStatement = function (node, st, c) { - if (node.init) { c(node.init, st, "ForInit"); } - if (node.test) { c(node.test, st, "Expression"); } - if (node.update) { c(node.update, st, "Expression"); } - c(node.body, st, "Statement"); -}; -base.ForInStatement = base.ForOfStatement = function (node, st, c) { - c(node.left, st, "ForInit"); - c(node.right, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.ForInit = function (node, st, c) { - if (node.type === "VariableDeclaration") { c(node, st); } - else { c(node, st, "Expression"); } -}; -base.DebuggerStatement = ignore; - -base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; -base.VariableDeclaration = function (node, st, c) { - for (var i = 0, list = node.declarations; i < list.length; i += 1) - { - var decl = list[i]; - - c(decl, st); - } -}; -base.VariableDeclarator = function (node, st, c) { - c(node.id, st, "Pattern"); - if (node.init) { c(node.init, st, "Expression"); } -}; - -base.Function = function (node, st, c) { - if (node.id) { c(node.id, st, "Pattern"); } - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; - - c(param, st, "Pattern"); - } - c(node.body, st, node.expression ? "Expression" : "Statement"); -}; - -base.Pattern = function (node, st, c) { - if (node.type === "Identifier") - { c(node, st, "VariablePattern"); } - else if (node.type === "MemberExpression") - { c(node, st, "MemberPattern"); } - else - { c(node, st); } -}; -base.VariablePattern = ignore; -base.MemberPattern = skipThrough; -base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; -base.ArrayPattern = function (node, st, c) { - for (var i = 0, list = node.elements; i < list.length; i += 1) { - var elt = list[i]; - - if (elt) { c(elt, st, "Pattern"); } - } -}; -base.ObjectPattern = function (node, st, c) { - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - if (prop.type === "Property") { - if (prop.computed) { c(prop.key, st, "Expression"); } - c(prop.value, st, "Pattern"); - } else if (prop.type === "RestElement") { - c(prop.argument, st, "Pattern"); - } - } -}; - -base.Expression = skipThrough; -base.ThisExpression = base.Super = base.MetaProperty = ignore; -base.ArrayExpression = function (node, st, c) { - for (var i = 0, list = node.elements; i < list.length; i += 1) { - var elt = list[i]; - - if (elt) { c(elt, st, "Expression"); } - } -}; -base.ObjectExpression = function (node, st, c) { - for (var i = 0, list = node.properties; i < list.length; i += 1) - { - var prop = list[i]; - - c(prop, st); - } -}; -base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; -base.SequenceExpression = function (node, st, c) { - for (var i = 0, list = node.expressions; i < list.length; i += 1) - { - var expr = list[i]; - - c(expr, st, "Expression"); - } -}; -base.TemplateLiteral = function (node, st, c) { - for (var i = 0, list = node.quasis; i < list.length; i += 1) - { - var quasi = list[i]; - - c(quasi, st); - } - - for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) - { - var expr = list$1[i$1]; - - c(expr, st, "Expression"); - } -}; -base.TemplateElement = ignore; -base.UnaryExpression = base.UpdateExpression = function (node, st, c) { - c(node.argument, st, "Expression"); -}; -base.BinaryExpression = base.LogicalExpression = function (node, st, c) { - c(node.left, st, "Expression"); - c(node.right, st, "Expression"); -}; -base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { - c(node.left, st, "Pattern"); - c(node.right, st, "Expression"); -}; -base.ConditionalExpression = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Expression"); - c(node.alternate, st, "Expression"); -}; -base.NewExpression = base.CallExpression = function (node, st, c) { - c(node.callee, st, "Expression"); - if (node.arguments) - { for (var i = 0, list = node.arguments; i < list.length; i += 1) - { - var arg = list[i]; - - c(arg, st, "Expression"); - } } -}; -base.MemberExpression = function (node, st, c) { - c(node.object, st, "Expression"); - if (node.computed) { c(node.property, st, "Expression"); } -}; -base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { - if (node.declaration) - { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } - if (node.source) { c(node.source, st, "Expression"); } -}; -base.ExportAllDeclaration = function (node, st, c) { - if (node.exported) - { c(node.exported, st); } - c(node.source, st, "Expression"); -}; -base.ImportDeclaration = function (node, st, c) { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) - { - var spec = list[i]; - - c(spec, st); - } - c(node.source, st, "Expression"); -}; -base.ImportExpression = function (node, st, c) { - c(node.source, st, "Expression"); -}; -base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.PrivateIdentifier = base.Literal = ignore; - -base.TaggedTemplateExpression = function (node, st, c) { - c(node.tag, st, "Expression"); - c(node.quasi, st, "Expression"); -}; -base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; -base.Class = function (node, st, c) { - if (node.id) { c(node.id, st, "Pattern"); } - if (node.superClass) { c(node.superClass, st, "Expression"); } - c(node.body, st); -}; -base.ClassBody = function (node, st, c) { - for (var i = 0, list = node.body; i < list.length; i += 1) - { - var elt = list[i]; - - c(elt, st); - } -}; -base.MethodDefinition = base.PropertyDefinition = base.Property = function (node, st, c) { - if (node.computed) { c(node.key, st, "Expression"); } - if (node.value) { c(node.value, st, "Expression"); } -}; - -export { ancestor, base, findNodeAfter, findNodeAround, findNodeAt, findNodeBefore, full, fullAncestor, make, recursive, simple }; diff --git a/node_modules/acorn-walk/package.json b/node_modules/acorn-walk/package.json deleted file mode 100644 index 8d75b97..0000000 --- a/node_modules/acorn-walk/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "acorn-walk", - "description": "ECMAScript (ESTree) AST walker", - "homepage": "https://github.com/acornjs/acorn", - "main": "dist/walk.js", - "types": "dist/walk.d.ts", - "module": "dist/walk.mjs", - "exports": { - ".": [ - { - "import": "./dist/walk.mjs", - "require": "./dist/walk.js", - "default": "./dist/walk.js" - }, - "./dist/walk.js" - ], - "./package.json": "./package.json" - }, - "version": "8.2.0", - "engines": {"node": ">=0.4.0"}, - "maintainers": [ - { - "name": "Marijn Haverbeke", - "email": "marijnh@gmail.com", - "web": "https://marijnhaverbeke.nl" - }, - { - "name": "Ingvar Stepanyan", - "email": "me@rreverser.com", - "web": "https://rreverser.com/" - }, - { - "name": "Adrian Heine", - "web": "http://adrianheine.de" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/acornjs/acorn.git" - }, - "scripts": { - "prepare": "cd ..; npm run build:walk" - }, - "license": "MIT" -} diff --git a/node_modules/acorn/CHANGELOG.md b/node_modules/acorn/CHANGELOG.md deleted file mode 100644 index ac78102..0000000 --- a/node_modules/acorn/CHANGELOG.md +++ /dev/null @@ -1,826 +0,0 @@ -## 8.8.2 (2023-01-23) - -### Bug fixes - -Fix a bug that caused `allowHashBang` to be set to false when not provided, even with `ecmaVersion >= 14`. - -Fix an exception when passing no option object to `parse` or `new Parser`. - -Fix incorrect parse error on `if (0) let\n[astral identifier char]`. - -## 8.8.1 (2022-10-24) - -### Bug fixes - -Make type for `Comment` compatible with estree types. - -## 8.8.0 (2022-07-21) - -### Bug fixes - -Allow parentheses around spread args in destructuring object assignment. - -Fix an issue where the tree contained `directive` properties in when parsing with a language version that doesn't support them. - -### New features - -Support hashbang comments by default in ECMAScript 2023 and later. - -## 8.7.1 (2021-04-26) - -### Bug fixes - -Stop handling `"use strict"` directives in ECMAScript versions before 5. - -Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked. - -Add missing type for `tokTypes`. - -## 8.7.0 (2021-12-27) - -### New features - -Support quoted export names. - -Upgrade to Unicode 14. - -Add support for Unicode 13 properties in regular expressions. - -### Bug fixes - -Use a loop to find line breaks, because the existing regexp search would overrun the end of the searched range and waste a lot of time in minified code. - -## 8.6.0 (2021-11-18) - -### Bug fixes - -Fix a bug where an object literal with multiple `__proto__` properties would incorrectly be accepted if a later property value held an assigment. - -### New features - -Support class private fields with the `in` operator. - -## 8.5.0 (2021-09-06) - -### Bug fixes - -Improve context-dependent tokenization in a number of corner cases. - -Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number). - -Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators. - -Fix wrong end locations stored on SequenceExpression nodes. - -Implement restriction that `for`/`of` loop LHS can't start with `let`. - -### New features - -Add support for ES2022 class static blocks. - -Allow multiple input files to be passed to the CLI tool. - -## 8.4.1 (2021-06-24) - -### Bug fixes - -Fix a bug where `allowAwaitOutsideFunction` would allow `await` in class field initializers, and setting `ecmaVersion` to 13 or higher would allow top-level await in non-module sources. - -## 8.4.0 (2021-06-11) - -### New features - -A new option, `allowSuperOutsideMethod`, can be used to suppress the error when `super` is used in the wrong context. - -## 8.3.0 (2021-05-31) - -### New features - -Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher. - -Add support for the `d` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag. - -## 8.2.4 (2021-05-04) - -### Bug fixes - -Fix spec conformity in corner case 'for await (async of ...)'. - -## 8.2.3 (2021-05-04) - -### Bug fixes - -Fix an issue where the library couldn't parse 'for (async of ...)'. - -Fix a bug in UTF-16 decoding that would read characters incorrectly in some circumstances. - -## 8.2.2 (2021-04-29) - -### Bug fixes - -Fix a bug where a class field initialized to an async arrow function wouldn't allow await inside it. Same issue existed for generator arrow functions with yield. - -## 8.2.1 (2021-04-24) - -### Bug fixes - -Fix a regression introduced in 8.2.0 where static or async class methods with keyword names fail to parse. - -## 8.2.0 (2021-04-24) - -### New features - -Add support for ES2022 class fields and private methods. - -## 8.1.1 (2021-04-12) - -### Various - -Stop shipping source maps in the NPM package. - -## 8.1.0 (2021-03-09) - -### Bug fixes - -Fix a spurious error in nested destructuring arrays. - -### New features - -Expose `allowAwaitOutsideFunction` in CLI interface. - -Make `allowImportExportAnywhere` also apply to `import.meta`. - -## 8.0.5 (2021-01-25) - -### Bug fixes - -Adjust package.json to work with Node 12.16.0 and 13.0-13.6. - -## 8.0.4 (2020-10-05) - -### Bug fixes - -Make `await x ** y` an error, following the spec. - -Fix potentially exponential regular expression. - -## 8.0.3 (2020-10-02) - -### Bug fixes - -Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`. - -## 8.0.2 (2020-09-30) - -### Bug fixes - -Make the TypeScript types reflect the current allowed values for `ecmaVersion`. - -Fix another regexp/division tokenizer issue. - -## 8.0.1 (2020-08-12) - -### Bug fixes - -Provide the correct value in the `version` export. - -## 8.0.0 (2020-08-12) - -### Bug fixes - -Disallow expressions like `(a = b) = c`. - -Make non-octal escape sequences a syntax error in strict mode. - -### New features - -The package can now be loaded directly as an ECMAScript module in node 13+. - -Update to the set of Unicode properties from ES2021. - -### Breaking changes - -The `ecmaVersion` option is now required. For the moment, omitting it will still work with a warning, but that will change in a future release. - -Some changes to method signatures that may be used by plugins. - -## 7.4.0 (2020-08-03) - -### New features - -Add support for logical assignment operators. - -Add support for numeric separators. - -## 7.3.1 (2020-06-11) - -### Bug fixes - -Make the string in the `version` export match the actual library version. - -## 7.3.0 (2020-06-11) - -### Bug fixes - -Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail. - -### New features - -Add support for optional chaining (`?.`). - -## 7.2.0 (2020-05-09) - -### Bug fixes - -Fix precedence issue in parsing of async arrow functions. - -### New features - -Add support for nullish coalescing. - -Add support for `import.meta`. - -Support `export * as ...` syntax. - -Upgrade to Unicode 13. - -## 6.4.1 (2020-03-09) - -### Bug fixes - -More carefully check for valid UTF16 surrogate pairs in regexp validator. - -## 7.1.1 (2020-03-01) - -### Bug fixes - -Treat `\8` and `\9` as invalid escapes in template strings. - -Allow unicode escapes in property names that are keywords. - -Don't error on an exponential operator expression as argument to `await`. - -More carefully check for valid UTF16 surrogate pairs in regexp validator. - -## 7.1.0 (2019-09-24) - -### Bug fixes - -Disallow trailing object literal commas when ecmaVersion is less than 5. - -### New features - -Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on. - -## 7.0.0 (2019-08-13) - -### Breaking changes - -Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression). - -Makes 10 (ES2019) the default value for the `ecmaVersion` option. - -## 6.3.0 (2019-08-12) - -### New features - -`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard. - -## 6.2.1 (2019-07-21) - -### Bug fixes - -Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such. - -Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances. - -## 6.2.0 (2019-07-04) - -### Bug fixes - -Improve valid assignment checking in `for`/`in` and `for`/`of` loops. - -Disallow binding `let` in patterns. - -### New features - -Support bigint syntax with `ecmaVersion` >= 11. - -Support dynamic `import` syntax with `ecmaVersion` >= 11. - -Upgrade to Unicode version 12. - -## 6.1.1 (2019-02-27) - -### Bug fixes - -Fix bug that caused parsing default exports of with names to fail. - -## 6.1.0 (2019-02-08) - -### Bug fixes - -Fix scope checking when redefining a `var` as a lexical binding. - -### New features - -Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins. - -## 6.0.7 (2019-02-04) - -### Bug fixes - -Check that exported bindings are defined. - -Don't treat `\u180e` as a whitespace character. - -Check for duplicate parameter names in methods. - -Don't allow shorthand properties when they are generators or async methods. - -Forbid binding `await` in async arrow function's parameter list. - -## 6.0.6 (2019-01-30) - -### Bug fixes - -The content of class declarations and expressions is now always parsed in strict mode. - -Don't allow `let` or `const` to bind the variable name `let`. - -Treat class declarations as lexical. - -Don't allow a generator function declaration as the sole body of an `if` or `else`. - -Ignore `"use strict"` when after an empty statement. - -Allow string line continuations with special line terminator characters. - -Treat `for` bodies as part of the `for` scope when checking for conflicting bindings. - -Fix bug with parsing `yield` in a `for` loop initializer. - -Implement special cases around scope checking for functions. - -## 6.0.5 (2019-01-02) - -### Bug fixes - -Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type. - -Don't treat `let` as a keyword when the next token is `{` on the next line. - -Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on. - -## 6.0.4 (2018-11-05) - -### Bug fixes - -Further improvements to tokenizing regular expressions in corner cases. - -## 6.0.3 (2018-11-04) - -### Bug fixes - -Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression. - -Remove stray symlink in the package tarball. - -## 6.0.2 (2018-09-26) - -### Bug fixes - -Fix bug where default expressions could fail to parse inside an object destructuring assignment expression. - -## 6.0.1 (2018-09-14) - -### Bug fixes - -Fix wrong value in `version` export. - -## 6.0.0 (2018-09-14) - -### Bug fixes - -Better handle variable-redefinition checks for catch bindings and functions directly under if statements. - -Forbid `new.target` in top-level arrow functions. - -Fix issue with parsing a regexp after `yield` in some contexts. - -### New features - -The package now comes with TypeScript definitions. - -### Breaking changes - -The default value of the `ecmaVersion` option is now 9 (2018). - -Plugins work differently, and will have to be rewritten to work with this version. - -The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`). - -## 5.7.3 (2018-09-10) - -### Bug fixes - -Fix failure to tokenize regexps after expressions like `x.of`. - -Better error message for unterminated template literals. - -## 5.7.2 (2018-08-24) - -### Bug fixes - -Properly handle `allowAwaitOutsideFunction` in for statements. - -Treat function declarations at the top level of modules like let bindings. - -Don't allow async function declarations as the only statement under a label. - -## 5.7.0 (2018-06-15) - -### New features - -Upgraded to Unicode 11. - -## 5.6.0 (2018-05-31) - -### New features - -Allow U+2028 and U+2029 in string when ECMAVersion >= 10. - -Allow binding-less catch statements when ECMAVersion >= 10. - -Add `allowAwaitOutsideFunction` option for parsing top-level `await`. - -## 5.5.3 (2018-03-08) - -### Bug fixes - -A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps. - -## 5.5.2 (2018-03-08) - -### Bug fixes - -A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0. - -## 5.5.1 (2018-03-06) - -### Bug fixes - -Fix misleading error message for octal escapes in template strings. - -## 5.5.0 (2018-02-27) - -### New features - -The identifier character categorization is now based on Unicode version 10. - -Acorn will now validate the content of regular expressions, including new ES9 features. - -## 5.4.0 (2018-02-01) - -### Bug fixes - -Disallow duplicate or escaped flags on regular expressions. - -Disallow octal escapes in strings in strict mode. - -### New features - -Add support for async iteration. - -Add support for object spread and rest. - -## 5.3.0 (2017-12-28) - -### Bug fixes - -Fix parsing of floating point literals with leading zeroes in loose mode. - -Allow duplicate property names in object patterns. - -Don't allow static class methods named `prototype`. - -Disallow async functions directly under `if` or `else`. - -Parse right-hand-side of `for`/`of` as an assignment expression. - -Stricter parsing of `for`/`in`. - -Don't allow unicode escapes in contextual keywords. - -### New features - -Parsing class members was factored into smaller methods to allow plugins to hook into it. - -## 5.2.1 (2017-10-30) - -### Bug fixes - -Fix a token context corruption bug. - -## 5.2.0 (2017-10-30) - -### Bug fixes - -Fix token context tracking for `class` and `function` in property-name position. - -Make sure `%*` isn't parsed as a valid operator. - -Allow shorthand properties `get` and `set` to be followed by default values. - -Disallow `super` when not in callee or object position. - -### New features - -Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements. - -## 5.1.2 (2017-09-04) - -### Bug fixes - -Disable parsing of legacy HTML-style comments in modules. - -Fix parsing of async methods whose names are keywords. - -## 5.1.1 (2017-07-06) - -### Bug fixes - -Fix problem with disambiguating regexp and division after a class. - -## 5.1.0 (2017-07-05) - -### Bug fixes - -Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`. - -Parse zero-prefixed numbers with non-octal digits as decimal. - -Allow object/array patterns in rest parameters. - -Don't error when `yield` is used as a property name. - -Allow `async` as a shorthand object property. - -### New features - -Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9. - -## 5.0.3 (2017-04-01) - -### Bug fixes - -Fix spurious duplicate variable definition errors for named functions. - -## 5.0.2 (2017-03-30) - -### Bug fixes - -A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error. - -## 5.0.0 (2017-03-28) - -### Bug fixes - -Raise an error for duplicated lexical bindings. - -Fix spurious error when an assignement expression occurred after a spread expression. - -Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions. - -Allow labels in front or `var` declarations, even in strict mode. - -### Breaking changes - -Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`. - -## 4.0.11 (2017-02-07) - -### Bug fixes - -Allow all forms of member expressions to be parenthesized as lvalue. - -## 4.0.10 (2017-02-07) - -### Bug fixes - -Don't expect semicolons after default-exported functions or classes, even when they are expressions. - -Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode. - -## 4.0.9 (2017-02-06) - -### Bug fixes - -Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again. - -## 4.0.8 (2017-02-03) - -### Bug fixes - -Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet. - -## 4.0.7 (2017-02-02) - -### Bug fixes - -Accept invalidly rejected code like `(x).y = 2` again. - -Don't raise an error when a function _inside_ strict code has a non-simple parameter list. - -## 4.0.6 (2017-02-02) - -### Bug fixes - -Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check. - -## 4.0.5 (2017-02-02) - -### Bug fixes - -Disallow parenthesized pattern expressions. - -Allow keywords as export names. - -Don't allow the `async` keyword to be parenthesized. - -Properly raise an error when a keyword contains a character escape. - -Allow `"use strict"` to appear after other string literal expressions. - -Disallow labeled declarations. - -## 4.0.4 (2016-12-19) - -### Bug fixes - -Fix crash when `export` was followed by a keyword that can't be -exported. - -## 4.0.3 (2016-08-16) - -### Bug fixes - -Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode. - -Properly parse properties named `async` in ES2017 mode. - -Fix bug where reserved words were broken in ES2017 mode. - -## 4.0.2 (2016-08-11) - -### Bug fixes - -Don't ignore period or 'e' characters after octal numbers. - -Fix broken parsing for call expressions in default parameter values of arrow functions. - -## 4.0.1 (2016-08-08) - -### Bug fixes - -Fix false positives in duplicated export name errors. - -## 4.0.0 (2016-08-07) - -### Breaking changes - -The default `ecmaVersion` option value is now 7. - -A number of internal method signatures changed, so plugins might need to be updated. - -### Bug fixes - -The parser now raises errors on duplicated export names. - -`arguments` and `eval` can now be used in shorthand properties. - -Duplicate parameter names in non-simple argument lists now always produce an error. - -### New features - -The `ecmaVersion` option now also accepts year-style version numbers -(2015, etc). - -Support for `async`/`await` syntax when `ecmaVersion` is >= 8. - -Support for trailing commas in call expressions when `ecmaVersion` is >= 8. - -## 3.3.0 (2016-07-25) - -### Bug fixes - -Fix bug in tokenizing of regexp operator after a function declaration. - -Fix parser crash when parsing an array pattern with a hole. - -### New features - -Implement check against complex argument lists in functions that enable strict mode in ES7. - -## 3.2.0 (2016-06-07) - -### Bug fixes - -Improve handling of lack of unicode regexp support in host -environment. - -Properly reject shorthand properties whose name is a keyword. - -### New features - -Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object. - -## 3.1.0 (2016-04-18) - -### Bug fixes - -Properly tokenize the division operator directly after a function expression. - -Allow trailing comma in destructuring arrays. - -## 3.0.4 (2016-02-25) - -### Fixes - -Allow update expressions as left-hand-side of the ES7 exponential operator. - -## 3.0.2 (2016-02-10) - -### Fixes - -Fix bug that accidentally made `undefined` a reserved word when parsing ES7. - -## 3.0.0 (2016-02-10) - -### Breaking changes - -The default value of the `ecmaVersion` option is now 6 (used to be 5). - -Support for comprehension syntax (which was dropped from the draft spec) has been removed. - -### Fixes - -`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code. - -A parenthesized class or function expression after `export default` is now parsed correctly. - -### New features - -When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`). - -The identifier character ranges are now based on Unicode 8.0.0. - -Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled. - -## 2.7.0 (2016-01-04) - -### Fixes - -Stop allowing rest parameters in setters. - -Disallow `y` rexexp flag in ES5. - -Disallow `\00` and `\000` escapes in strict mode. - -Raise an error when an import name is a reserved word. - -## 2.6.2 (2015-11-10) - -### Fixes - -Don't crash when no options object is passed. - -## 2.6.0 (2015-11-09) - -### Fixes - -Add `await` as a reserved word in module sources. - -Disallow `yield` in a parameter default value for a generator. - -Forbid using a comma after a rest pattern in an array destructuring. - -### New features - -Support parsing stdin in command-line tool. - -## 2.5.0 (2015-10-27) - -### Fixes - -Fix tokenizer support in the command-line tool. - -Stop allowing `new.target` outside of functions. - -Remove legacy `guard` and `guardedHandler` properties from try nodes. - -Stop allowing multiple `__proto__` properties on an object literal in strict mode. - -Don't allow rest parameters to be non-identifier patterns. - -Check for duplicate paramter names in arrow functions. diff --git a/node_modules/acorn/LICENSE b/node_modules/acorn/LICENSE deleted file mode 100644 index 9d71cc6..0000000 --- a/node_modules/acorn/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (C) 2012-2022 by various contributors (see AUTHORS) - -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/acorn/README.md b/node_modules/acorn/README.md deleted file mode 100644 index 61e7dd3..0000000 --- a/node_modules/acorn/README.md +++ /dev/null @@ -1,273 +0,0 @@ -# Acorn - -A tiny, fast JavaScript parser written in JavaScript. - -## Community - -Acorn is open source software released under an -[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE). - -You are welcome to -[report bugs](https://github.com/acornjs/acorn/issues) or create pull -requests on [github](https://github.com/acornjs/acorn). For questions -and discussion, please use the -[Tern discussion forum](https://discuss.ternjs.net). - -## Installation - -The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): - -```sh -npm install acorn -``` - -Alternately, you can download the source and build acorn yourself: - -```sh -git clone https://github.com/acornjs/acorn.git -cd acorn -npm install -``` - -## Interface - -**parse**`(input, options)` is the main interface to the library. The -`input` parameter is a string, `options` must be an object setting -some of the options listed below. The return value will be an abstract -syntax tree object as specified by the [ESTree -spec](https://github.com/estree/estree). - -```javascript -let acorn = require("acorn"); -console.log(acorn.parse("1 + 1", {ecmaVersion: 2020})); -``` - -When encountering a syntax error, the parser will raise a -`SyntaxError` object with a meaningful message. The error object will -have a `pos` property that indicates the string offset at which the -error occurred, and a `loc` object that contains a `{line, column}` -object referring to that same position. - -Options are provided by in a second argument, which should be an -object containing any of these fields (only `ecmaVersion` is -required): - -- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be - either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019), - 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the - latest the library supports). This influences support for strict - mode, the set of reserved words, and support for new syntax - features. - - **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being - implemented by Acorn. Other proposed new features must be - implemented through plugins. - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - either `"script"` or `"module"`. This influences global strict mode - and parsing of `import` and `export` declarations. - - **NOTE**: If set to `"module"`, then static `import` / `export` syntax - will be valid, even if `ecmaVersion` is less than 6. - -- **onInsertedSemicolon**: If given a callback, that callback will be - called whenever a missing semicolon is inserted by the parser. The - callback will be given the character offset of the point where the - semicolon is inserted as argument, and if `locations` is on, also a - `{line, column}` object representing this position. - -- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing - commas. - -- **allowReserved**: If `false`, using a reserved word will generate - an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher - versions. When given the value `"never"`, reserved words and - keywords can also not be used as property names (as in Internet - Explorer's old parser). - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed, - and also allows `import.meta` expressions to appear in scripts - (when `sourceType` is not `"module"`). - -- **allowAwaitOutsideFunction**: If `false`, `await` expressions can - only appear inside `async` functions. Defaults to `true` for - `ecmaVersion` 2022 and later, `false` for lower versions. Setting this option to - `true` allows to have top-level `await` expressions. They are - still not allowed in non-`async` functions, though. - -- **allowSuperOutsideMethod**: By default, `super` outside a method - raises an error. Set this to `true` to accept such code. - -- **allowHashBang**: When this is enabled, if the code starts with the - characters `#!` (as in a shellscript), the first line will be - treated as a comment. Defaults to true when `ecmaVersion` >= 2023. - -- **locations**: When `true`, each node has a `loc` object attached - with `start` and `end` subobjects, each of which contains the - one-based line and zero-based column numbers in `{line, column}` - form. Default is `false`. - -- **onToken**: If a function is passed for this option, each found - token will be passed in same format as tokens returned from - `tokenizer().getToken()`. - - If array is passed, each found token is pushed to it. - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **onComment**: If a function is passed for this option, whenever a - comment is encountered the function will be called with the - following parameters: - - - `block`: `true` if the comment is a block comment, false if it - is a line comment. - - `text`: The content of the comment. - - `start`: Character offset of the start of the comment. - - `end`: Character offset of the end of the comment. - - When the `locations` options is on, the `{line, column}` locations - of the comment’s start and end are passed as two additional - parameters. - - If array is passed for this option, each found comment is pushed - to it as object in Esprima format: - - ```javascript - { - "type": "Line" | "Block", - "value": "comment text", - "start": Number, - "end": Number, - // If `locations` option is on: - "loc": { - "start": {line: Number, column: Number} - "end": {line: Number, column: Number} - }, - // If `ranges` option is on: - "range": [Number, Number] - } - ``` - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **ranges**: Nodes have their start and end characters offsets - recorded in `start` and `end` properties (directly on the node, - rather than the `loc` object, which holds line/column data. To also - add a - [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678) - `range` property holding a `[start, end]` array with the same - numbers, set the `ranges` option to `true`. - -- **program**: It is possible to parse multiple files into a single - AST by passing the tree produced by parsing the first file as the - `program` option in subsequent parses. This will add the toplevel - forms of the parsed file to the "Program" (top) node of an existing - parse tree. - -- **sourceFile**: When the `locations` option is `true`, you can pass - this option to add a `source` attribute in every node’s `loc` - object. Note that the contents of this option are not examined or - processed in any way; you are free to use whatever format you - choose. - -- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property - will be added (regardless of the `location` option) directly to the - nodes, rather than the `loc` object. - -- **preserveParens**: If this option is `true`, parenthesized expressions - are represented by (non-standard) `ParenthesizedExpression` nodes - that have a single `expression` property containing the expression - inside parentheses. - -**parseExpressionAt**`(input, offset, options)` will parse a single -expression in a string, and return its AST. It will not complain if -there is more of the string left after the expression. - -**tokenizer**`(input, options)` returns an object with a `getToken` -method that can be called repeatedly to get the next token, a `{start, -end, type, value}` object (with added `loc` property when the -`locations` option is enabled and `range` property when the `ranges` -option is enabled). When the token's type is `tokTypes.eof`, you -should stop calling the method, since it will keep returning that same -token forever. - -In ES6 environment, returned result can be used as any other -protocol-compliant iterable: - -```javascript -for (let token of acorn.tokenizer(str)) { - // iterate over the tokens -} - -// transform code to array of tokens: -var tokens = [...acorn.tokenizer(str)]; -``` - -**tokTypes** holds an object mapping names to the token type objects -that end up in the `type` properties of tokens. - -**getLineInfo**`(input, offset)` can be used to get a `{line, -column}` object for a given program string and offset. - -### The `Parser` class - -Instances of the **`Parser`** class contain all the state and logic -that drives a parse. It has static methods `parse`, -`parseExpressionAt`, and `tokenizer` that match the top-level -functions by the same name. - -When extending the parser with plugins, you need to call these methods -on the extended version of the class. To extend a parser with plugins, -you can use its static `extend` method. - -```javascript -var acorn = require("acorn"); -var jsx = require("acorn-jsx"); -var JSXParser = acorn.Parser.extend(jsx()); -JSXParser.parse("foo()", {ecmaVersion: 2020}); -``` - -The `extend` method takes any number of plugin values, and returns a -new `Parser` class that includes the extra parser logic provided by -the plugins. - -## Command line interface - -The `bin/acorn` utility can be used to parse a file from the command -line. It accepts as arguments its input file and the following -options: - -- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version - to parse. Default is version 9. - -- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. - -- `--locations`: Attaches a "loc" object to each node with "start" and - "end" subobjects, each of which contains the one-based line and - zero-based column numbers in `{line, column}` form. - -- `--allow-hash-bang`: If the code starts with the characters #! (as - in a shellscript), the first line will be treated as a comment. - -- `--allow-await-outside-function`: Allows top-level `await` expressions. - See the `allowAwaitOutsideFunction` option for more information. - -- `--compact`: No whitespace is used in the AST output. - -- `--silent`: Do not output the AST, just return the exit status. - -- `--help`: Print the usage information and quit. - -The utility spits out the syntax tree as JSON data. - -## Existing plugins - - - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) diff --git a/node_modules/acorn/bin/acorn b/node_modules/acorn/bin/acorn deleted file mode 100755 index 3ef3c12..0000000 --- a/node_modules/acorn/bin/acorn +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -"use strict" - -require("../dist/bin.js") diff --git a/node_modules/acorn/dist/acorn.d.ts b/node_modules/acorn/dist/acorn.d.ts deleted file mode 100644 index 870d59d..0000000 --- a/node_modules/acorn/dist/acorn.d.ts +++ /dev/null @@ -1,252 +0,0 @@ -export as namespace acorn -export = acorn - -declare namespace acorn { - function parse(input: string, options: Options): Node - - function parseExpressionAt(input: string, pos: number, options: Options): Node - - function tokenizer(input: string, options: Options): { - getToken(): Token - [Symbol.iterator](): Iterator - } - - type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 'latest' - - interface Options { - ecmaVersion: ecmaVersion - sourceType?: 'script' | 'module' - onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void - onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void - allowReserved?: boolean | 'never' - allowReturnOutsideFunction?: boolean - allowImportExportEverywhere?: boolean - allowAwaitOutsideFunction?: boolean - allowSuperOutsideMethod?: boolean - allowHashBang?: boolean - locations?: boolean - onToken?: ((token: Token) => any) | Token[] - onComment?: (( - isBlock: boolean, text: string, start: number, end: number, startLoc?: Position, - endLoc?: Position - ) => void) | Comment[] - ranges?: boolean - program?: Node - sourceFile?: string - directSourceFile?: string - preserveParens?: boolean - } - - class Parser { - // state.js - lineStart: number; - options: Options; - curLine: number; - start: number; - end: number; - input: string; - type: TokenType; - - // state.js - constructor(options: Options, input: string, startPos?: number) - parse(this: Parser): Node - - // tokenize.js - next(): void; - nextToken(): void; - - // statement.js - parseTopLevel(node: Node): Node; - - // node.js - finishNode(node: Node, type: string): Node; - finishNodeAt(node: Node, type: string, pos: number, loc: Position): Node; - - // location.js - raise(pos: number, message: string) : void; - raiseRecoverable?(pos: number, message: string) : void; - - // parseutils.js - unexpected(pos: number) : void; - - // index.js - static acorn: typeof acorn; - - // state.js - static parse(this: typeof Parser, input: string, options: Options): Node - static parseExpressionAt(this: typeof Parser, input: string, pos: number, options: Options): Node - static tokenizer(this: typeof Parser, input: string, options: Options): { - getToken(): Token - [Symbol.iterator](): Iterator - } - static extend(this: typeof Parser, ...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser - } - - interface Position { line: number; column: number; offset: number } - - const defaultOptions: Options - - function getLineInfo(input: string, offset: number): Position - - class SourceLocation { - start: Position - end: Position - source?: string | null - constructor(p: Parser, start: Position, end: Position) - } - - class Node { - type: string - start: number - end: number - loc?: SourceLocation - sourceFile?: string - range?: [number, number] - constructor(parser: Parser, pos: number, loc?: SourceLocation) - } - - class TokenType { - label: string - keyword: string - beforeExpr: boolean - startsExpr: boolean - isLoop: boolean - isAssign: boolean - prefix: boolean - postfix: boolean - binop: number - updateContext?: (prevType: TokenType) => void - constructor(label: string, conf?: any) - } - - const tokTypes: { - num: TokenType - regexp: TokenType - string: TokenType - name: TokenType - privateId: TokenType - eof: TokenType - bracketL: TokenType - bracketR: TokenType - braceL: TokenType - braceR: TokenType - parenL: TokenType - parenR: TokenType - comma: TokenType - semi: TokenType - colon: TokenType - dot: TokenType - question: TokenType - questionDot: TokenType - arrow: TokenType - template: TokenType - invalidTemplate: TokenType - ellipsis: TokenType - backQuote: TokenType - dollarBraceL: TokenType - eq: TokenType - assign: TokenType - incDec: TokenType - prefix: TokenType - logicalOR: TokenType - logicalAND: TokenType - bitwiseOR: TokenType - bitwiseXOR: TokenType - bitwiseAND: TokenType - equality: TokenType - relational: TokenType - bitShift: TokenType - plusMin: TokenType - modulo: TokenType - star: TokenType - slash: TokenType - starstar: TokenType - coalesce: TokenType - _break: TokenType - _case: TokenType - _catch: TokenType - _continue: TokenType - _debugger: TokenType - _default: TokenType - _do: TokenType - _else: TokenType - _finally: TokenType - _for: TokenType - _function: TokenType - _if: TokenType - _return: TokenType - _switch: TokenType - _throw: TokenType - _try: TokenType - _var: TokenType - _const: TokenType - _while: TokenType - _with: TokenType - _new: TokenType - _this: TokenType - _super: TokenType - _class: TokenType - _extends: TokenType - _export: TokenType - _import: TokenType - _null: TokenType - _true: TokenType - _false: TokenType - _in: TokenType - _instanceof: TokenType - _typeof: TokenType - _void: TokenType - _delete: TokenType - } - - class TokContext { - constructor(token: string, isExpr: boolean, preserveSpace: boolean, override?: (p: Parser) => void) - } - - const tokContexts: { - b_stat: TokContext - b_expr: TokContext - b_tmpl: TokContext - p_stat: TokContext - p_expr: TokContext - q_tmpl: TokContext - f_expr: TokContext - f_stat: TokContext - f_expr_gen: TokContext - f_gen: TokContext - } - - function isIdentifierStart(code: number, astral?: boolean): boolean - - function isIdentifierChar(code: number, astral?: boolean): boolean - - interface AbstractToken { - } - - interface Comment extends AbstractToken { - type: 'Line' | 'Block' - value: string - start: number - end: number - loc?: SourceLocation - range?: [number, number] - } - - class Token { - type: TokenType - value: any - start: number - end: number - loc?: SourceLocation - range?: [number, number] - constructor(p: Parser) - } - - function isNewLine(code: number): boolean - - const lineBreak: RegExp - - const lineBreakG: RegExp - - const version: string -} diff --git a/node_modules/acorn/dist/acorn.js b/node_modules/acorn/dist/acorn.js deleted file mode 100644 index f623ebc..0000000 --- a/node_modules/acorn/dist/acorn.js +++ /dev/null @@ -1,5608 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.acorn = {})); -})(this, (function (exports) { 'use strict'; - - // This file was generated. Do not modify manually! - var 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, 81, 2, 71, 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, 3, 0, 158, 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, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 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, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; - - // This file was generated. Do not modify manually! - var 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, 20, 1, 64, 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, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 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, 16, 0, 30, 2, 3, 0, 15, 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, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 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, 4153, 7, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938, 6, 4191]; - - // This file was generated. Do not modify manually! - var 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\u0cf3\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-\u0ece\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"; - - // This file was generated. Do not modify manually! - var 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"; - - // These are a run-length and offset encoded representation of the - - // Reserved word lists for various dialects of the language - - var reservedWords = { - 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", - 5: "class enum extends super const export import", - 6: "enum", - strict: "implements interface let package private protected public static yield", - strictBind: "eval arguments" - }; - - // And the keywords - - var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - - var keywords$1 = { - 5: ecma5AndLessKeywords, - "5module": ecma5AndLessKeywords + " export import", - 6: ecma5AndLessKeywords + " const class extends export import super" - }; - - var keywordRelationalOperator = /^in(stanceof)?$/; - - // ## Character categories - - var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); - var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - - // This has a complexity linear to the value of the code. The - // assumption is that looking up astral identifier characters is - // rare. - function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) { return false } - pos += set[i + 1]; - if (pos >= code) { return true } - } - return false - } - - // Test whether a given character code starts an identifier. - - function isIdentifierStart(code, astral) { - if (code < 65) { return code === 36 } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) - } - - // Test whether a given character is part of an identifier. - - function isIdentifierChar(code, astral) { - if (code < 48) { return code === 36 } - if (code < 58) { return true } - if (code < 65) { return false } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) - } - - // ## Token types - - // The assignment of fine-grained, information-carrying type objects - // allows the tokenizer to store the information it has about a - // token in a way that is very cheap for the parser to look up. - - // All token type variables start with an underscore, to make them - // easy to recognize. - - // The `beforeExpr` property is used to disambiguate between regular - // expressions and divisions. It is set on all token types that can - // be followed by an expression (thus, a slash after them would be a - // regular expression). - // - // The `startsExpr` property is used to check if the token ends a - // `yield` expression. It is set on all token types that either can - // directly start an expression (like a quotation mark) or can - // continue an expression (like the body of a string). - // - // `isLoop` marks a keyword as starting a loop, which is important - // to know when parsing a label, in order to allow or disallow - // continue jumps to that label. - - var TokenType = function TokenType(label, conf) { - if ( conf === void 0 ) conf = {}; - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop || null; - this.updateContext = null; - }; - - function binop(name, prec) { - return new TokenType(name, {beforeExpr: true, binop: prec}) - } - var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}; - - // Map keyword names to token types. - - var keywords = {}; - - // Succinct definitions of keyword token types - function kw(name, options) { - if ( options === void 0 ) options = {}; - - options.keyword = name; - return keywords[name] = new TokenType(name, options) - } - - var types$1 = { - num: new TokenType("num", startsExpr), - regexp: new TokenType("regexp", startsExpr), - string: new TokenType("string", startsExpr), - name: new TokenType("name", startsExpr), - privateId: new TokenType("privateId", startsExpr), - eof: new TokenType("eof"), - - // Punctuation token types. - bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), - bracketR: new TokenType("]"), - braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), - braceR: new TokenType("}"), - parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), - parenR: new TokenType(")"), - comma: new TokenType(",", beforeExpr), - semi: new TokenType(";", beforeExpr), - colon: new TokenType(":", beforeExpr), - dot: new TokenType("."), - question: new TokenType("?", beforeExpr), - questionDot: new TokenType("?."), - arrow: new TokenType("=>", beforeExpr), - template: new TokenType("template"), - invalidTemplate: new TokenType("invalidTemplate"), - ellipsis: new TokenType("...", beforeExpr), - backQuote: new TokenType("`", startsExpr), - dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), - - // Operators. These carry several kinds of properties to help the - // parser use them properly (the presence of these properties is - // what categorizes them as operators). - // - // `binop`, when present, specifies that this operator is a binary - // operator, and will refer to its precedence. - // - // `prefix` and `postfix` mark the operator as a prefix or postfix - // unary operator. - // - // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as - // binary operators with a very low precedence, that should result - // in AssignmentExpression nodes. - - eq: new TokenType("=", {beforeExpr: true, isAssign: true}), - assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), - incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), - prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), - logicalOR: binop("||", 1), - logicalAND: binop("&&", 2), - bitwiseOR: binop("|", 3), - bitwiseXOR: binop("^", 4), - bitwiseAND: binop("&", 5), - equality: binop("==/!=/===/!==", 6), - relational: binop("/<=/>=", 7), - bitShift: binop("<>/>>>", 8), - plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), - modulo: binop("%", 10), - star: binop("*", 10), - slash: binop("/", 10), - starstar: new TokenType("**", {beforeExpr: true}), - coalesce: binop("??", 1), - - // Keyword token types. - _break: kw("break"), - _case: kw("case", beforeExpr), - _catch: kw("catch"), - _continue: kw("continue"), - _debugger: kw("debugger"), - _default: kw("default", beforeExpr), - _do: kw("do", {isLoop: true, beforeExpr: true}), - _else: kw("else", beforeExpr), - _finally: kw("finally"), - _for: kw("for", {isLoop: true}), - _function: kw("function", startsExpr), - _if: kw("if"), - _return: kw("return", beforeExpr), - _switch: kw("switch"), - _throw: kw("throw", beforeExpr), - _try: kw("try"), - _var: kw("var"), - _const: kw("const"), - _while: kw("while", {isLoop: true}), - _with: kw("with"), - _new: kw("new", {beforeExpr: true, startsExpr: true}), - _this: kw("this", startsExpr), - _super: kw("super", startsExpr), - _class: kw("class", startsExpr), - _extends: kw("extends", beforeExpr), - _export: kw("export"), - _import: kw("import", startsExpr), - _null: kw("null", startsExpr), - _true: kw("true", startsExpr), - _false: kw("false", startsExpr), - _in: kw("in", {beforeExpr: true, binop: 7}), - _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), - _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), - _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), - _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) - }; - - // Matches a whole line break (where CRLF is considered a single - // line break). Used to count lines. - - var lineBreak = /\r\n?|\n|\u2028|\u2029/; - var lineBreakG = new RegExp(lineBreak.source, "g"); - - function isNewLine(code) { - return code === 10 || code === 13 || code === 0x2028 || code === 0x2029 - } - - function nextLineBreak(code, from, end) { - if ( end === void 0 ) end = code.length; - - for (var i = from; i < end; i++) { - var next = code.charCodeAt(i); - if (isNewLine(next)) - { return i < end - 1 && next === 13 && code.charCodeAt(i + 1) === 10 ? i + 2 : i + 1 } - } - return -1 - } - - var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - - var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; - - var ref = Object.prototype; - var hasOwnProperty = ref.hasOwnProperty; - var toString = ref.toString; - - var hasOwn = Object.hasOwn || (function (obj, propName) { return ( - hasOwnProperty.call(obj, propName) - ); }); - - var isArray = Array.isArray || (function (obj) { return ( - toString.call(obj) === "[object Array]" - ); }); - - function wordsRegexp(words) { - return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") - } - - function codePointToString(code) { - // UTF-16 Decoding - if (code <= 0xFFFF) { return String.fromCharCode(code) } - code -= 0x10000; - return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00) - } - - var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/; - - // These are used when `options.locations` is on, for the - // `startLoc` and `endLoc` properties. - - var Position = function Position(line, col) { - this.line = line; - this.column = col; - }; - - Position.prototype.offset = function offset (n) { - return new Position(this.line, this.column + n) - }; - - var SourceLocation = function SourceLocation(p, start, end) { - this.start = start; - this.end = end; - if (p.sourceFile !== null) { this.source = p.sourceFile; } - }; - - // The `getLineInfo` function is mostly useful when the - // `locations` option is off (for performance reasons) and you - // want to find the line/column position for a given character - // offset. `input` should be the code string that the offset refers - // into. - - function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - var nextBreak = nextLineBreak(input, cur, offset); - if (nextBreak < 0) { return new Position(line, offset - cur) } - ++line; - cur = nextBreak; - } - } - - // A second argument must be given to configure the parser process. - // These options are recognized (only `ecmaVersion` is required): - - var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must be - // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 - // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` - // (the latest version the library supports). This influences - // support for strict mode, the set of reserved words, and support - // for new syntax features. - ecmaVersion: null, - // `sourceType` indicates the mode the code should be parsed in. - // Can be either `"script"` or `"module"`. This influences global - // strict mode and parsing of `import` and `export` declarations. - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // the position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are only enforced if ecmaVersion >= 5. - // Set `allowReserved` to a boolean value to explicitly turn this on - // an off. When this option has the value "never", reserved words - // and keywords can also not be used as property names. - allowReserved: null, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program, and an import.meta expression - // in a script isn't considered an error. - allowImportExportEverywhere: false, - // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022. - // When enabled, await identifiers are allowed to appear at the top-level scope, - // but they are still not allowed in non-async functions. - allowAwaitOutsideFunction: null, - // When enabled, super identifiers are not constrained to - // appearing in methods and do not raise an error when they appear elsewhere. - allowSuperOutsideMethod: null, - // When enabled, hashbang directive in the beginning of file is - // allowed and treated as a line comment. Enabled by default when - // `ecmaVersion` >= 2023. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokens returned from `tokenizer().getToken()`. Note - // that you are not allowed to call the parser from the - // callback—that will corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false - }; - - // Interpret and default an options object - - var warnedAboutEcmaVersion = false; - - function getOptions(opts) { - var options = {}; - - for (var opt in defaultOptions) - { options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt]; } - - if (options.ecmaVersion === "latest") { - options.ecmaVersion = 1e8; - } else if (options.ecmaVersion == null) { - if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) { - warnedAboutEcmaVersion = true; - console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future."); - } - options.ecmaVersion = 11; - } else if (options.ecmaVersion >= 2015) { - options.ecmaVersion -= 2009; - } - - if (options.allowReserved == null) - { options.allowReserved = options.ecmaVersion < 5; } - - if (!opts || opts.allowHashBang == null) - { options.allowHashBang = options.ecmaVersion >= 14; } - - if (isArray(options.onToken)) { - var tokens = options.onToken; - options.onToken = function (token) { return tokens.push(token); }; - } - if (isArray(options.onComment)) - { options.onComment = pushComment(options, options.onComment); } - - return options - } - - function pushComment(options, array) { - return function(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "Block" : "Line", - value: text, - start: start, - end: end - }; - if (options.locations) - { comment.loc = new SourceLocation(this, startLoc, endLoc); } - if (options.ranges) - { comment.range = [start, end]; } - array.push(comment); - } - } - - // Each scope gets a bitset that may contain these flags - var - SCOPE_TOP = 1, - SCOPE_FUNCTION = 2, - SCOPE_ASYNC = 4, - SCOPE_GENERATOR = 8, - SCOPE_ARROW = 16, - SCOPE_SIMPLE_CATCH = 32, - SCOPE_SUPER = 64, - SCOPE_DIRECT_SUPER = 128, - SCOPE_CLASS_STATIC_BLOCK = 256, - SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK; - - function functionFlags(async, generator) { - return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) - } - - // Used in checkLVal* and declareName to determine the type of a binding - var - BIND_NONE = 0, // Not a binding - BIND_VAR = 1, // Var-style binding - BIND_LEXICAL = 2, // Let- or const-style binding - BIND_FUNCTION = 3, // Function declaration - BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding - BIND_OUTSIDE = 5; // Special case for function names as bound inside the function - - var Parser = function Parser(options, input, startPos) { - this.options = options = getOptions(options); - this.sourceFile = options.sourceFile; - this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]); - var reserved = ""; - if (options.allowReserved !== true) { - reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3]; - if (options.sourceType === "module") { reserved += " await"; } - } - this.reservedWords = wordsRegexp(reserved); - var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; - this.reservedWordsStrict = wordsRegexp(reservedStrict); - this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); - this.input = String(input); - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - - // Properties of the current token: - // Its type - this.type = types$1.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.inModule = options.sourceType === "module"; - this.strict = this.inModule || this.strictDirective(this.pos); - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - this.potentialArrowInForAwait = false; - - // Positions to delayed-check that yield/await does not exist in default parameters. - this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; - // Labels in scope. - this.labels = []; - // Thus-far undefined exports. - this.undefinedExports = Object.create(null); - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") - { this.skipLineComment(2); } - - // Scope tracking for duplicate variable names (see scope.js) - this.scopeStack = []; - this.enterScope(SCOPE_TOP); - - // For RegExp validation - this.regexpState = null; - - // The stack of private names. - // Each element has two properties: 'declared' and 'used'. - // When it exited from the outermost class definition, all used private names must be declared. - this.privateNameStack = []; - }; - - var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },canAwait: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true },allowNewDotTarget: { configurable: true },inClassStaticBlock: { configurable: true } }; - - Parser.prototype.parse = function parse () { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node) - }; - - prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; - - prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit }; - - prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit }; - - prototypeAccessors.canAwait.get = function () { - for (var i = this.scopeStack.length - 1; i >= 0; i--) { - var scope = this.scopeStack[i]; - if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) { return false } - if (scope.flags & SCOPE_FUNCTION) { return (scope.flags & SCOPE_ASYNC) > 0 } - } - return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction - }; - - prototypeAccessors.allowSuper.get = function () { - var ref = this.currentThisScope(); - var flags = ref.flags; - var inClassFieldInit = ref.inClassFieldInit; - return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod - }; - - prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; - - prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; - - prototypeAccessors.allowNewDotTarget.get = function () { - var ref = this.currentThisScope(); - var flags = ref.flags; - var inClassFieldInit = ref.inClassFieldInit; - return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit - }; - - prototypeAccessors.inClassStaticBlock.get = function () { - return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0 - }; - - Parser.extend = function extend () { - var plugins = [], len = arguments.length; - while ( len-- ) plugins[ len ] = arguments[ len ]; - - var cls = this; - for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } - return cls - }; - - Parser.parse = function parse (input, options) { - return new this(options, input).parse() - }; - - Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { - var parser = new this(options, input, pos); - parser.nextToken(); - return parser.parseExpression() - }; - - Parser.tokenizer = function tokenizer (input, options) { - return new this(options, input) - }; - - Object.defineProperties( Parser.prototype, prototypeAccessors ); - - var pp$9 = Parser.prototype; - - // ## Parser utilities - - var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/; - pp$9.strictDirective = function(start) { - if (this.options.ecmaVersion < 5) { return false } - for (;;) { - // Try to find string literal. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this.input)[0].length; - var match = literal.exec(this.input.slice(start)); - if (!match) { return false } - if ((match[1] || match[2]) === "use strict") { - skipWhiteSpace.lastIndex = start + match[0].length; - var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length; - var next = this.input.charAt(end); - return next === ";" || next === "}" || - (lineBreak.test(spaceAfter[0]) && - !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=")) - } - start += match[0].length; - - // Skip semicolon, if any. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this.input)[0].length; - if (this.input[start] === ";") - { start++; } - } - }; - - // Predicate that tests whether the next token is of the given - // type, and if yes, consumes it as a side effect. - - pp$9.eat = function(type) { - if (this.type === type) { - this.next(); - return true - } else { - return false - } - }; - - // Tests whether parsed token is a contextual keyword. - - pp$9.isContextual = function(name) { - return this.type === types$1.name && this.value === name && !this.containsEsc - }; - - // Consumes contextual keyword if possible. - - pp$9.eatContextual = function(name) { - if (!this.isContextual(name)) { return false } - this.next(); - return true - }; - - // Asserts that following token is given contextual keyword. - - pp$9.expectContextual = function(name) { - if (!this.eatContextual(name)) { this.unexpected(); } - }; - - // Test whether a semicolon can be inserted at the current position. - - pp$9.canInsertSemicolon = function() { - return this.type === types$1.eof || - this.type === types$1.braceR || - lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) - }; - - pp$9.insertSemicolon = function() { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) - { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } - return true - } - }; - - // Consume a semicolon, or, failing that, see if we are allowed to - // pretend that there is a semicolon at this position. - - pp$9.semicolon = function() { - if (!this.eat(types$1.semi) && !this.insertSemicolon()) { this.unexpected(); } - }; - - pp$9.afterTrailingComma = function(tokType, notNext) { - if (this.type === tokType) { - if (this.options.onTrailingComma) - { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } - if (!notNext) - { this.next(); } - return true - } - }; - - // Expect a token of a given type. If found, consume it, otherwise, - // raise an unexpected token error. - - pp$9.expect = function(type) { - this.eat(type) || this.unexpected(); - }; - - // Raise an unexpected token error. - - pp$9.unexpected = function(pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); - }; - - var DestructuringErrors = function DestructuringErrors() { - this.shorthandAssign = - this.trailingComma = - this.parenthesizedAssign = - this.parenthesizedBind = - this.doubleProto = - -1; - }; - - pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) { - if (!refDestructuringErrors) { return } - if (refDestructuringErrors.trailingComma > -1) - { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } - var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; - if (parens > -1) { this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern"); } - }; - - pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) { - if (!refDestructuringErrors) { return false } - var shorthandAssign = refDestructuringErrors.shorthandAssign; - var doubleProto = refDestructuringErrors.doubleProto; - if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } - if (shorthandAssign >= 0) - { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } - if (doubleProto >= 0) - { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } - }; - - pp$9.checkYieldAwaitInDefaultParams = function() { - if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) - { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } - if (this.awaitPos) - { this.raise(this.awaitPos, "Await expression cannot be a default value"); } - }; - - pp$9.isSimpleAssignTarget = function(expr) { - if (expr.type === "ParenthesizedExpression") - { return this.isSimpleAssignTarget(expr.expression) } - return expr.type === "Identifier" || expr.type === "MemberExpression" - }; - - var pp$8 = Parser.prototype; - - // ### Statement parsing - - // Parse a program. Initializes the parser, reads any number of - // statements, and wraps them in a Program node. Optionally takes a - // `program` argument. If present, the statements will be appended - // to its body instead of creating a new node. - - pp$8.parseTopLevel = function(node) { - var exports = Object.create(null); - if (!node.body) { node.body = []; } - while (this.type !== types$1.eof) { - var stmt = this.parseStatement(null, true, exports); - node.body.push(stmt); - } - if (this.inModule) - { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) - { - var name = list[i]; - - this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); - } } - this.adaptDirectivePrologue(node.body); - this.next(); - node.sourceType = this.options.sourceType; - return this.finishNode(node, "Program") - }; - - var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; - - pp$8.isLet = function(context) { - if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - // For ambiguous cases, determine if a LexicalDeclaration (or only a - // Statement) is allowed here. If context is not empty then only a Statement - // is allowed. However, `let [` is an explicit negative lookahead for - // ExpressionStatement, so special-case it first. - if (nextCh === 91 || nextCh === 92) { return true } // '[', '/' - if (context) { return false } - - if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral - if (isIdentifierStart(nextCh, true)) { - var pos = next + 1; - while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; } - if (nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } - var ident = this.input.slice(next, pos); - if (!keywordRelationalOperator.test(ident)) { return true } - } - return false - }; - - // check 'async [no LineTerminator here] function' - // - 'async /*foo*/ function' is OK. - // - 'async /*\n*/ function' is invalid. - pp$8.isAsyncFunction = function() { - if (this.options.ecmaVersion < 8 || !this.isContextual("async")) - { return false } - - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, after; - return !lineBreak.test(this.input.slice(this.pos, next)) && - this.input.slice(next, next + 8) === "function" && - (next + 8 === this.input.length || - !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 0xd7ff && after < 0xdc00)) - }; - - // Parse a single statement. - // - // If expecting a statement and finding a slash operator, parse a - // regular expression literal. This is to handle cases like - // `if (foo) /blah/.exec(foo)`, where looking at the previous token - // does not help. - - pp$8.parseStatement = function(context, topLevel, exports) { - var starttype = this.type, node = this.startNode(), kind; - - if (this.isLet(context)) { - starttype = types$1._var; - kind = "let"; - } - - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case types$1._break: case types$1._continue: return this.parseBreakContinueStatement(node, starttype.keyword) - case types$1._debugger: return this.parseDebuggerStatement(node) - case types$1._do: return this.parseDoStatement(node) - case types$1._for: return this.parseForStatement(node) - case types$1._function: - // Function as sole body of either an if statement or a labeled statement - // works, but not when it is part of a labeled statement that is the sole - // body of an if statement. - if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } - return this.parseFunctionStatement(node, false, !context) - case types$1._class: - if (context) { this.unexpected(); } - return this.parseClass(node, true) - case types$1._if: return this.parseIfStatement(node) - case types$1._return: return this.parseReturnStatement(node) - case types$1._switch: return this.parseSwitchStatement(node) - case types$1._throw: return this.parseThrowStatement(node) - case types$1._try: return this.parseTryStatement(node) - case types$1._const: case types$1._var: - kind = kind || this.value; - if (context && kind !== "var") { this.unexpected(); } - return this.parseVarStatement(node, kind) - case types$1._while: return this.parseWhileStatement(node) - case types$1._with: return this.parseWithStatement(node) - case types$1.braceL: return this.parseBlock(true, node) - case types$1.semi: return this.parseEmptyStatement(node) - case types$1._export: - case types$1._import: - if (this.options.ecmaVersion > 10 && starttype === types$1._import) { - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - if (nextCh === 40 || nextCh === 46) // '(' or '.' - { return this.parseExpressionStatement(node, this.parseExpression()) } - } - - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) - { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } - if (!this.inModule) - { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } - } - return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports) - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - if (this.isAsyncFunction()) { - if (context) { this.unexpected(); } - this.next(); - return this.parseFunctionStatement(node, true, !context) - } - - var maybeName = this.value, expr = this.parseExpression(); - if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) - { return this.parseLabeledStatement(node, maybeName, expr, context) } - else { return this.parseExpressionStatement(node, expr) } - } - }; - - pp$8.parseBreakContinueStatement = function(node, keyword) { - var isBreak = keyword === "break"; - this.next(); - if (this.eat(types$1.semi) || this.insertSemicolon()) { node.label = null; } - else if (this.type !== types$1.name) { this.unexpected(); } - else { - node.label = this.parseIdent(); - this.semicolon(); - } - - // Verify that there is an actual destination to break or - // continue to. - var i = 0; - for (; i < this.labels.length; ++i) { - var lab = this.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } - if (node.label && isBreak) { break } - } - } - if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") - }; - - pp$8.parseDebuggerStatement = function(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement") - }; - - pp$8.parseDoStatement = function(node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement("do"); - this.labels.pop(); - this.expect(types$1._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) - { this.eat(types$1.semi); } - else - { this.semicolon(); } - return this.finishNode(node, "DoWhileStatement") - }; - - // Disambiguating between a `for` and a `for`/`in` or `for`/`of` - // loop is non-trivial. Basically, we have to parse the init `var` - // statement or expression, disallowing the `in` operator (see - // the second parameter to `parseExpression`), and then check - // whether the next token is `in` or `of`. When there is no init - // part (semicolon immediately after the opening parenthesis), it - // is a regular `for` loop. - - pp$8.parseForStatement = function(node) { - this.next(); - var awaitAt = (this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await")) ? this.lastTokStart : -1; - this.labels.push(loopLabel); - this.enterScope(0); - this.expect(types$1.parenL); - if (this.type === types$1.semi) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, null) - } - var isLet = this.isLet(); - if (this.type === types$1._var || this.type === types$1._const || isLet) { - var init$1 = this.startNode(), kind = isLet ? "let" : this.value; - this.next(); - this.parseVar(init$1, true, kind); - this.finishNode(init$1, "VariableDeclaration"); - if ((this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types$1._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - return this.parseForIn(node, init$1) - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init$1) - } - var startsWithLet = this.isContextual("let"), isForOf = false; - var refDestructuringErrors = new DestructuringErrors; - var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors); - if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types$1._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); } - this.toAssignable(init, false, refDestructuringErrors); - this.checkLValPattern(init); - return this.parseForIn(node, init) - } else { - this.checkExpressionErrors(refDestructuringErrors, true); - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init) - }; - - pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) { - this.next(); - return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) - }; - - pp$8.parseIfStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - // allow function declarations in branches, but only in non-strict mode - node.consequent = this.parseStatement("if"); - node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null; - return this.finishNode(node, "IfStatement") - }; - - pp$8.parseReturnStatement = function(node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) - { this.raise(this.start, "'return' outside of function"); } - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(types$1.semi) || this.insertSemicolon()) { node.argument = null; } - else { node.argument = this.parseExpression(); this.semicolon(); } - return this.finishNode(node, "ReturnStatement") - }; - - pp$8.parseSwitchStatement = function(node) { - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(types$1.braceL); - this.labels.push(switchLabel); - this.enterScope(0); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - var cur; - for (var sawDefault = false; this.type !== types$1.braceR;) { - if (this.type === types$1._case || this.type === types$1._default) { - var isCase = this.type === types$1._case; - if (cur) { this.finishNode(cur, "SwitchCase"); } - node.cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } - sawDefault = true; - cur.test = null; - } - this.expect(types$1.colon); - } else { - if (!cur) { this.unexpected(); } - cur.consequent.push(this.parseStatement(null)); - } - } - this.exitScope(); - if (cur) { this.finishNode(cur, "SwitchCase"); } - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement") - }; - - pp$8.parseThrowStatement = function(node) { - this.next(); - if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) - { this.raise(this.lastTokEnd, "Illegal newline after throw"); } - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement") - }; - - // Reused empty array added for node fields that are always empty. - - var empty$1 = []; - - pp$8.parseTryStatement = function(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === types$1._catch) { - var clause = this.startNode(); - this.next(); - if (this.eat(types$1.parenL)) { - clause.param = this.parseBindingAtom(); - var simple = clause.param.type === "Identifier"; - this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); - this.checkLValPattern(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); - this.expect(types$1.parenR); - } else { - if (this.options.ecmaVersion < 10) { this.unexpected(); } - clause.param = null; - this.enterScope(0); - } - clause.body = this.parseBlock(false); - this.exitScope(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) - { this.raise(node.start, "Missing catch or finally clause"); } - return this.finishNode(node, "TryStatement") - }; - - pp$8.parseVarStatement = function(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration") - }; - - pp$8.parseWhileStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement("while"); - this.labels.pop(); - return this.finishNode(node, "WhileStatement") - }; - - pp$8.parseWithStatement = function(node) { - if (this.strict) { this.raise(this.start, "'with' in strict mode"); } - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement("with"); - return this.finishNode(node, "WithStatement") - }; - - pp$8.parseEmptyStatement = function(node) { - this.next(); - return this.finishNode(node, "EmptyStatement") - }; - - pp$8.parseLabeledStatement = function(node, maybeName, expr, context) { - for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) - { - var label = list[i$1]; - - if (label.name === maybeName) - { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } } - var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label$1 = this.labels[i]; - if (label$1.statementStart === node.start) { - // Update information about previous labels on this node - label$1.statementStart = this.start; - label$1.kind = kind; - } else { break } - } - this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); - node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement") - }; - - pp$8.parseExpressionStatement = function(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement") - }; - - // Parse a semicolon-enclosed block of statements, handling `"use - // strict"` declarations when `allowStrict` is true (used for - // function bodies). - - pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) { - if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; - if ( node === void 0 ) node = this.startNode(); - - node.body = []; - this.expect(types$1.braceL); - if (createNewLexicalScope) { this.enterScope(0); } - while (this.type !== types$1.braceR) { - var stmt = this.parseStatement(null); - node.body.push(stmt); - } - if (exitStrict) { this.strict = false; } - this.next(); - if (createNewLexicalScope) { this.exitScope(); } - return this.finishNode(node, "BlockStatement") - }; - - // Parse a regular `for` loop. The disambiguation code in - // `parseStatement` will already have parsed the init statement or - // expression. - - pp$8.parseFor = function(node, init) { - node.init = init; - this.expect(types$1.semi); - node.test = this.type === types$1.semi ? null : this.parseExpression(); - this.expect(types$1.semi); - node.update = this.type === types$1.parenR ? null : this.parseExpression(); - this.expect(types$1.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, "ForStatement") - }; - - // Parse a `for`/`in` and `for`/`of` loop, which are almost - // same from parser's perspective. - - pp$8.parseForIn = function(node, init) { - var isForIn = this.type === types$1._in; - this.next(); - - if ( - init.type === "VariableDeclaration" && - init.declarations[0].init != null && - ( - !isForIn || - this.options.ecmaVersion < 8 || - this.strict || - init.kind !== "var" || - init.declarations[0].id.type !== "Identifier" - ) - ) { - this.raise( - init.start, - ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") - ); - } - node.left = init; - node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); - this.expect(types$1.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement") - }; - - // Parse a list of variable declarations. - - pp$8.parseVar = function(node, isFor, kind) { - node.declarations = []; - node.kind = kind; - for (;;) { - var decl = this.startNode(); - this.parseVarId(decl, kind); - if (this.eat(types$1.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else if (kind === "const" && !(this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { - this.unexpected(); - } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) { - this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(types$1.comma)) { break } - } - return node - }; - - pp$8.parseVarId = function(decl, kind) { - decl.id = this.parseBindingAtom(); - this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); - }; - - var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; - - // Parse a function declaration or literal (depending on the - // `statement & FUNC_STATEMENT`). - - // Remove `allowExpressionBody` for 7.0.0, as it is only called with false - pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) { - this.initFunction(node); - if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { - if (this.type === types$1.star && (statement & FUNC_HANGING_STATEMENT)) - { this.unexpected(); } - node.generator = this.eat(types$1.star); - } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - if (statement & FUNC_STATEMENT) { - node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types$1.name ? null : this.parseIdent(); - if (node.id && !(statement & FUNC_HANGING_STATEMENT)) - // If it is a regular function declaration in sloppy mode, then it is - // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding - // mode depends on properties of the current scope (see - // treatFunctionsAsVar). - { this.checkLValSimple(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } - } - - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(node.async, node.generator)); - - if (!(statement & FUNC_STATEMENT)) - { node.id = this.type === types$1.name ? this.parseIdent() : null; } - - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody, false, forInit); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") - }; - - pp$8.parseFunctionParams = function(node) { - this.expect(types$1.parenL); - node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); - }; - - // Parse a class declaration or literal (depending on the - // `isStatement` parameter). - - pp$8.parseClass = function(node, isStatement) { - this.next(); - - // ecma-262 14.6 Class Definitions - // A class definition is always strict mode code. - var oldStrict = this.strict; - this.strict = true; - - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var privateNameMap = this.enterClassBody(); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(types$1.braceL); - while (this.type !== types$1.braceR) { - var element = this.parseClassElement(node.superClass !== null); - if (element) { - classBody.body.push(element); - if (element.type === "MethodDefinition" && element.kind === "constructor") { - if (hadConstructor) { this.raise(element.start, "Duplicate constructor in the same class"); } - hadConstructor = true; - } else if (element.key && element.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element)) { - this.raiseRecoverable(element.key.start, ("Identifier '#" + (element.key.name) + "' has already been declared")); - } - } - } - this.strict = oldStrict; - this.next(); - node.body = this.finishNode(classBody, "ClassBody"); - this.exitClassBody(); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") - }; - - pp$8.parseClassElement = function(constructorAllowsSuper) { - if (this.eat(types$1.semi)) { return null } - - var ecmaVersion = this.options.ecmaVersion; - var node = this.startNode(); - var keyName = ""; - var isGenerator = false; - var isAsync = false; - var kind = "method"; - var isStatic = false; - - if (this.eatContextual("static")) { - // Parse static init block - if (ecmaVersion >= 13 && this.eat(types$1.braceL)) { - this.parseClassStaticBlock(node); - return node - } - if (this.isClassElementNameStart() || this.type === types$1.star) { - isStatic = true; - } else { - keyName = "static"; - } - } - node.static = isStatic; - if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) { - if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) { - isAsync = true; - } else { - keyName = "async"; - } - } - if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star)) { - isGenerator = true; - } - if (!keyName && !isAsync && !isGenerator) { - var lastValue = this.value; - if (this.eatContextual("get") || this.eatContextual("set")) { - if (this.isClassElementNameStart()) { - kind = lastValue; - } else { - keyName = lastValue; - } - } - } - - // Parse element name - if (keyName) { - // 'async', 'get', 'set', or 'static' were not a keyword contextually. - // The last token is any of those. Make it the element name. - node.computed = false; - node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc); - node.key.name = keyName; - this.finishNode(node.key, "Identifier"); - } else { - this.parseClassElementName(node); - } - - // Parse element value - if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) { - var isConstructor = !node.static && checkKeyName(node, "constructor"); - var allowsDirectSuper = isConstructor && constructorAllowsSuper; - // Couldn't move this check into the 'parseClassMethod' method for backward compatibility. - if (isConstructor && kind !== "method") { this.raise(node.key.start, "Constructor can't have get/set modifier"); } - node.kind = isConstructor ? "constructor" : kind; - this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper); - } else { - this.parseClassField(node); - } - - return node - }; - - pp$8.isClassElementNameStart = function() { - return ( - this.type === types$1.name || - this.type === types$1.privateId || - this.type === types$1.num || - this.type === types$1.string || - this.type === types$1.bracketL || - this.type.keyword - ) - }; - - pp$8.parseClassElementName = function(element) { - if (this.type === types$1.privateId) { - if (this.value === "constructor") { - this.raise(this.start, "Classes can't have an element named '#constructor'"); - } - element.computed = false; - element.key = this.parsePrivateIdent(); - } else { - this.parsePropertyName(element); - } - }; - - pp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { - // Check key and flags - var key = method.key; - if (method.kind === "constructor") { - if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } - if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } - } else if (method.static && checkKeyName(method, "prototype")) { - this.raise(key.start, "Classes may not have a static property named prototype"); - } - - // Parse value - var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); - - // Check value - if (method.kind === "get" && value.params.length !== 0) - { this.raiseRecoverable(value.start, "getter should have no params"); } - if (method.kind === "set" && value.params.length !== 1) - { this.raiseRecoverable(value.start, "setter should have exactly one param"); } - if (method.kind === "set" && value.params[0].type === "RestElement") - { this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"); } - - return this.finishNode(method, "MethodDefinition") - }; - - pp$8.parseClassField = function(field) { - if (checkKeyName(field, "constructor")) { - this.raise(field.key.start, "Classes can't have a field named 'constructor'"); - } else if (field.static && checkKeyName(field, "prototype")) { - this.raise(field.key.start, "Classes can't have a static field named 'prototype'"); - } - - if (this.eat(types$1.eq)) { - // To raise SyntaxError if 'arguments' exists in the initializer. - var scope = this.currentThisScope(); - var inClassFieldInit = scope.inClassFieldInit; - scope.inClassFieldInit = true; - field.value = this.parseMaybeAssign(); - scope.inClassFieldInit = inClassFieldInit; - } else { - field.value = null; - } - this.semicolon(); - - return this.finishNode(field, "PropertyDefinition") - }; - - pp$8.parseClassStaticBlock = function(node) { - node.body = []; - - var oldLabels = this.labels; - this.labels = []; - this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER); - while (this.type !== types$1.braceR) { - var stmt = this.parseStatement(null); - node.body.push(stmt); - } - this.next(); - this.exitScope(); - this.labels = oldLabels; - - return this.finishNode(node, "StaticBlock") - }; - - pp$8.parseClassId = function(node, isStatement) { - if (this.type === types$1.name) { - node.id = this.parseIdent(); - if (isStatement) - { this.checkLValSimple(node.id, BIND_LEXICAL, false); } - } else { - if (isStatement === true) - { this.unexpected(); } - node.id = null; - } - }; - - pp$8.parseClassSuper = function(node) { - node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null; - }; - - pp$8.enterClassBody = function() { - var element = {declared: Object.create(null), used: []}; - this.privateNameStack.push(element); - return element.declared - }; - - pp$8.exitClassBody = function() { - var ref = this.privateNameStack.pop(); - var declared = ref.declared; - var used = ref.used; - var len = this.privateNameStack.length; - var parent = len === 0 ? null : this.privateNameStack[len - 1]; - for (var i = 0; i < used.length; ++i) { - var id = used[i]; - if (!hasOwn(declared, id.name)) { - if (parent) { - parent.used.push(id); - } else { - this.raiseRecoverable(id.start, ("Private field '#" + (id.name) + "' must be declared in an enclosing class")); - } - } - } - }; - - function isPrivateNameConflicted(privateNameMap, element) { - var name = element.key.name; - var curr = privateNameMap[name]; - - var next = "true"; - if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) { - next = (element.static ? "s" : "i") + element.kind; - } - - // `class { get #a(){}; static set #a(_){} }` is also conflict. - if ( - curr === "iget" && next === "iset" || - curr === "iset" && next === "iget" || - curr === "sget" && next === "sset" || - curr === "sset" && next === "sget" - ) { - privateNameMap[name] = "true"; - return false - } else if (!curr) { - privateNameMap[name] = next; - return false - } else { - return true - } - } - - function checkKeyName(node, name) { - var computed = node.computed; - var key = node.key; - return !computed && ( - key.type === "Identifier" && key.name === name || - key.type === "Literal" && key.value === name - ) - } - - // Parses module export declaration. - - pp$8.parseExport = function(node, exports) { - this.next(); - // export * from '...' - if (this.eat(types$1.star)) { - if (this.options.ecmaVersion >= 11) { - if (this.eatContextual("as")) { - node.exported = this.parseModuleExportName(); - this.checkExport(exports, node.exported, this.lastTokStart); - } else { - node.exported = null; - } - } - this.expectContextual("from"); - if (this.type !== types$1.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration") - } - if (this.eat(types$1._default)) { // export default ... - this.checkExport(exports, "default", this.lastTokStart); - var isAsync; - if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) { - var fNode = this.startNode(); - this.next(); - if (isAsync) { this.next(); } - node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); - } else if (this.type === types$1._class) { - var cNode = this.startNode(); - node.declaration = this.parseClass(cNode, "nullableID"); - } else { - node.declaration = this.parseMaybeAssign(); - this.semicolon(); - } - return this.finishNode(node, "ExportDefaultDeclaration") - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(null); - if (node.declaration.type === "VariableDeclaration") - { this.checkVariableExport(exports, node.declaration.declarations); } - else - { this.checkExport(exports, node.declaration.id, node.declaration.id.start); } - node.specifiers = []; - node.source = null; - } else { // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(exports); - if (this.eatContextual("from")) { - if (this.type !== types$1.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - } else { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) { - // check for keywords used as local names - var spec = list[i]; - - this.checkUnreserved(spec.local); - // check if export is defined - this.checkLocalExport(spec.local); - - if (spec.local.type === "Literal") { - this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`."); - } - } - - node.source = null; - } - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration") - }; - - pp$8.checkExport = function(exports, name, pos) { - if (!exports) { return } - if (typeof name !== "string") - { name = name.type === "Identifier" ? name.name : name.value; } - if (hasOwn(exports, name)) - { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } - exports[name] = true; - }; - - pp$8.checkPatternExport = function(exports, pat) { - var type = pat.type; - if (type === "Identifier") - { this.checkExport(exports, pat, pat.start); } - else if (type === "ObjectPattern") - { for (var i = 0, list = pat.properties; i < list.length; i += 1) - { - var prop = list[i]; - - this.checkPatternExport(exports, prop); - } } - else if (type === "ArrayPattern") - { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { - var elt = list$1[i$1]; - - if (elt) { this.checkPatternExport(exports, elt); } - } } - else if (type === "Property") - { this.checkPatternExport(exports, pat.value); } - else if (type === "AssignmentPattern") - { this.checkPatternExport(exports, pat.left); } - else if (type === "RestElement") - { this.checkPatternExport(exports, pat.argument); } - else if (type === "ParenthesizedExpression") - { this.checkPatternExport(exports, pat.expression); } - }; - - pp$8.checkVariableExport = function(exports, decls) { - if (!exports) { return } - for (var i = 0, list = decls; i < list.length; i += 1) - { - var decl = list[i]; - - this.checkPatternExport(exports, decl.id); - } - }; - - pp$8.shouldParseExportStatement = function() { - return this.type.keyword === "var" || - this.type.keyword === "const" || - this.type.keyword === "class" || - this.type.keyword === "function" || - this.isLet() || - this.isAsyncFunction() - }; - - // Parses a comma-separated list of module exports. - - pp$8.parseExportSpecifiers = function(exports) { - var nodes = [], first = true; - // export { x, y as z } [from '...'] - this.expect(types$1.braceL); - while (!this.eat(types$1.braceR)) { - if (!first) { - this.expect(types$1.comma); - if (this.afterTrailingComma(types$1.braceR)) { break } - } else { first = false; } - - var node = this.startNode(); - node.local = this.parseModuleExportName(); - node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local; - this.checkExport( - exports, - node.exported, - node.exported.start - ); - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - return nodes - }; - - // Parses import declaration. - - pp$8.parseImport = function(node) { - this.next(); - // import '...' - if (this.type === types$1.string) { - node.specifiers = empty$1; - node.source = this.parseExprAtom(); - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration") - }; - - // Parses a comma-separated list of module imports. - - pp$8.parseImportSpecifiers = function() { - var nodes = [], first = true; - if (this.type === types$1.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLValSimple(node.local, BIND_LEXICAL); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(types$1.comma)) { return nodes } - } - if (this.type === types$1.star) { - var node$1 = this.startNode(); - this.next(); - this.expectContextual("as"); - node$1.local = this.parseIdent(); - this.checkLValSimple(node$1.local, BIND_LEXICAL); - nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); - return nodes - } - this.expect(types$1.braceL); - while (!this.eat(types$1.braceR)) { - if (!first) { - this.expect(types$1.comma); - if (this.afterTrailingComma(types$1.braceR)) { break } - } else { first = false; } - - var node$2 = this.startNode(); - node$2.imported = this.parseModuleExportName(); - if (this.eatContextual("as")) { - node$2.local = this.parseIdent(); - } else { - this.checkUnreserved(node$2.imported); - node$2.local = node$2.imported; - } - this.checkLValSimple(node$2.local, BIND_LEXICAL); - nodes.push(this.finishNode(node$2, "ImportSpecifier")); - } - return nodes - }; - - pp$8.parseModuleExportName = function() { - if (this.options.ecmaVersion >= 13 && this.type === types$1.string) { - var stringLiteral = this.parseLiteral(this.value); - if (loneSurrogate.test(stringLiteral.value)) { - this.raise(stringLiteral.start, "An export name cannot include a lone surrogate."); - } - return stringLiteral - } - return this.parseIdent(true) - }; - - // Set `ExpressionStatement#directive` property for directive prologues. - pp$8.adaptDirectivePrologue = function(statements) { - for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { - statements[i].directive = statements[i].expression.raw.slice(1, -1); - } - }; - pp$8.isDirectiveCandidate = function(statement) { - return ( - this.options.ecmaVersion >= 5 && - statement.type === "ExpressionStatement" && - statement.expression.type === "Literal" && - typeof statement.expression.value === "string" && - // Reject parenthesized strings. - (this.input[statement.start] === "\"" || this.input[statement.start] === "'") - ) - }; - - var pp$7 = Parser.prototype; - - // Convert existing expression atom to assignable pattern - // if possible. - - pp$7.toAssignable = function(node, isBinding, refDestructuringErrors) { - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - if (this.inAsync && node.name === "await") - { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } - break - - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - case "RestElement": - break - - case "ObjectExpression": - node.type = "ObjectPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - this.toAssignable(prop, isBinding); - // Early error: - // AssignmentRestProperty[Yield, Await] : - // `...` DestructuringAssignmentTarget[Yield, Await] - // - // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. - if ( - prop.type === "RestElement" && - (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") - ) { - this.raise(prop.argument.start, "Unexpected token"); - } - } - break - - case "Property": - // AssignmentProperty has type === "Property" - if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } - this.toAssignable(node.value, isBinding); - break - - case "ArrayExpression": - node.type = "ArrayPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - this.toAssignableList(node.elements, isBinding); - break - - case "SpreadElement": - node.type = "RestElement"; - this.toAssignable(node.argument, isBinding); - if (node.argument.type === "AssignmentPattern") - { this.raise(node.argument.start, "Rest elements cannot have a default value"); } - break - - case "AssignmentExpression": - if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } - node.type = "AssignmentPattern"; - delete node.operator; - this.toAssignable(node.left, isBinding); - break - - case "ParenthesizedExpression": - this.toAssignable(node.expression, isBinding, refDestructuringErrors); - break - - case "ChainExpression": - this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side"); - break - - case "MemberExpression": - if (!isBinding) { break } - - default: - this.raise(node.start, "Assigning to rvalue"); - } - } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - return node - }; - - // Convert list of expression atoms to binding list. - - pp$7.toAssignableList = function(exprList, isBinding) { - var end = exprList.length; - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) { this.toAssignable(elt, isBinding); } - } - if (end) { - var last = exprList[end - 1]; - if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") - { this.unexpected(last.argument.start); } - } - return exprList - }; - - // Parses spread element. - - pp$7.parseSpread = function(refDestructuringErrors) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refDestructuringErrors); - return this.finishNode(node, "SpreadElement") - }; - - pp$7.parseRestBinding = function() { - var node = this.startNode(); - this.next(); - - // RestElement inside of a function parameter must be an identifier - if (this.options.ecmaVersion === 6 && this.type !== types$1.name) - { this.unexpected(); } - - node.argument = this.parseBindingAtom(); - - return this.finishNode(node, "RestElement") - }; - - // Parses lvalue (assignable) atom. - - pp$7.parseBindingAtom = function() { - if (this.options.ecmaVersion >= 6) { - switch (this.type) { - case types$1.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types$1.bracketR, true, true); - return this.finishNode(node, "ArrayPattern") - - case types$1.braceL: - return this.parseObj(true) - } - } - return this.parseIdent() - }; - - pp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma) { - var elts = [], first = true; - while (!this.eat(close)) { - if (first) { first = false; } - else { this.expect(types$1.comma); } - if (allowEmpty && this.type === types$1.comma) { - elts.push(null); - } else if (allowTrailingComma && this.afterTrailingComma(close)) { - break - } else if (this.type === types$1.ellipsis) { - var rest = this.parseRestBinding(); - this.parseBindingListItem(rest); - elts.push(rest); - if (this.type === types$1.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } - this.expect(close); - break - } else { - var elem = this.parseMaybeDefault(this.start, this.startLoc); - this.parseBindingListItem(elem); - elts.push(elem); - } - } - return elts - }; - - pp$7.parseBindingListItem = function(param) { - return param - }; - - // Parses assignment pattern around given atom if possible. - - pp$7.parseMaybeDefault = function(startPos, startLoc, left) { - left = left || this.parseBindingAtom(); - if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) { return left } - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern") - }; - - // The following three functions all verify that a node is an lvalue — - // something that can be bound, or assigned to. In order to do so, they perform - // a variety of checks: - // - // - Check that none of the bound/assigned-to identifiers are reserved words. - // - Record name declarations for bindings in the appropriate scope. - // - Check duplicate argument names, if checkClashes is set. - // - // If a complex binding pattern is encountered (e.g., object and array - // destructuring), the entire pattern is recursively checked. - // - // There are three versions of checkLVal*() appropriate for different - // circumstances: - // - // - checkLValSimple() shall be used if the syntactic construct supports - // nothing other than identifiers and member expressions. Parenthesized - // expressions are also correctly handled. This is generally appropriate for - // constructs for which the spec says - // - // > It is a Syntax Error if AssignmentTargetType of [the production] is not - // > simple. - // - // It is also appropriate for checking if an identifier is valid and not - // defined elsewhere, like import declarations or function/class identifiers. - // - // Examples where this is used include: - // a += …; - // import a from '…'; - // where a is the node to be checked. - // - // - checkLValPattern() shall be used if the syntactic construct supports - // anything checkLValSimple() supports, as well as object and array - // destructuring patterns. This is generally appropriate for constructs for - // which the spec says - // - // > It is a Syntax Error if [the production] is neither an ObjectLiteral nor - // > an ArrayLiteral and AssignmentTargetType of [the production] is not - // > simple. - // - // Examples where this is used include: - // (a = …); - // const a = …; - // try { … } catch (a) { … } - // where a is the node to be checked. - // - // - checkLValInnerPattern() shall be used if the syntactic construct supports - // anything checkLValPattern() supports, as well as default assignment - // patterns, rest elements, and other constructs that may appear within an - // object or array destructuring pattern. - // - // As a special case, function parameters also use checkLValInnerPattern(), - // as they also support defaults and rest constructs. - // - // These functions deliberately support both assignment and binding constructs, - // as the logic for both is exceedingly similar. If the node is the target of - // an assignment, then bindingType should be set to BIND_NONE. Otherwise, it - // should be set to the appropriate BIND_* constant, like BIND_VAR or - // BIND_LEXICAL. - // - // If the function is called with a non-BIND_NONE bindingType, then - // additionally a checkClashes object may be specified to allow checking for - // duplicate argument names. checkClashes is ignored if the provided construct - // is an assignment (i.e., bindingType is BIND_NONE). - - pp$7.checkLValSimple = function(expr, bindingType, checkClashes) { - if ( bindingType === void 0 ) bindingType = BIND_NONE; - - var isBind = bindingType !== BIND_NONE; - - switch (expr.type) { - case "Identifier": - if (this.strict && this.reservedWordsStrictBind.test(expr.name)) - { this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } - if (isBind) { - if (bindingType === BIND_LEXICAL && expr.name === "let") - { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } - if (checkClashes) { - if (hasOwn(checkClashes, expr.name)) - { this.raiseRecoverable(expr.start, "Argument name clash"); } - checkClashes[expr.name] = true; - } - if (bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } - } - break - - case "ChainExpression": - this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side"); - break - - case "MemberExpression": - if (isBind) { this.raiseRecoverable(expr.start, "Binding member expression"); } - break - - case "ParenthesizedExpression": - if (isBind) { this.raiseRecoverable(expr.start, "Binding parenthesized expression"); } - return this.checkLValSimple(expr.expression, bindingType, checkClashes) - - default: - this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue"); - } - }; - - pp$7.checkLValPattern = function(expr, bindingType, checkClashes) { - if ( bindingType === void 0 ) bindingType = BIND_NONE; - - switch (expr.type) { - case "ObjectPattern": - for (var i = 0, list = expr.properties; i < list.length; i += 1) { - var prop = list[i]; - - this.checkLValInnerPattern(prop, bindingType, checkClashes); - } - break - - case "ArrayPattern": - for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { - var elem = list$1[i$1]; - - if (elem) { this.checkLValInnerPattern(elem, bindingType, checkClashes); } - } - break - - default: - this.checkLValSimple(expr, bindingType, checkClashes); - } - }; - - pp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) { - if ( bindingType === void 0 ) bindingType = BIND_NONE; - - switch (expr.type) { - case "Property": - // AssignmentProperty has type === "Property" - this.checkLValInnerPattern(expr.value, bindingType, checkClashes); - break - - case "AssignmentPattern": - this.checkLValPattern(expr.left, bindingType, checkClashes); - break - - case "RestElement": - this.checkLValPattern(expr.argument, bindingType, checkClashes); - break - - default: - this.checkLValPattern(expr, bindingType, checkClashes); - } - }; - - // The algorithm used to determine whether a regexp can appear at a - - var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; - this.generator = !!generator; - }; - - var types = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", false), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), - f_stat: new TokContext("function", false), - f_expr: new TokContext("function", true), - f_expr_gen: new TokContext("function", true, false, null, true), - f_gen: new TokContext("function", false, false, null, true) - }; - - var pp$6 = Parser.prototype; - - pp$6.initialContext = function() { - return [types.b_stat] - }; - - pp$6.curContext = function() { - return this.context[this.context.length - 1] - }; - - pp$6.braceIsBlock = function(prevType) { - var parent = this.curContext(); - if (parent === types.f_expr || parent === types.f_stat) - { return true } - if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr)) - { return !parent.isExpr } - - // The check for `tt.name && exprAllowed` detects whether we are - // after a `yield` or `of` construct. See the `updateContext` for - // `tt.name`. - if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed) - { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } - if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow) - { return true } - if (prevType === types$1.braceL) - { return parent === types.b_stat } - if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name) - { return false } - return !this.exprAllowed - }; - - pp$6.inGeneratorContext = function() { - for (var i = this.context.length - 1; i >= 1; i--) { - var context = this.context[i]; - if (context.token === "function") - { return context.generator } - } - return false - }; - - pp$6.updateContext = function(prevType) { - var update, type = this.type; - if (type.keyword && prevType === types$1.dot) - { this.exprAllowed = false; } - else if (update = type.updateContext) - { update.call(this, prevType); } - else - { this.exprAllowed = type.beforeExpr; } - }; - - // Used to handle egde cases when token context could not be inferred correctly during tokenization phase - - pp$6.overrideContext = function(tokenCtx) { - if (this.curContext() !== tokenCtx) { - this.context[this.context.length - 1] = tokenCtx; - } - }; - - // Token-specific context update code - - types$1.parenR.updateContext = types$1.braceR.updateContext = function() { - if (this.context.length === 1) { - this.exprAllowed = true; - return - } - var out = this.context.pop(); - if (out === types.b_stat && this.curContext().token === "function") { - out = this.context.pop(); - } - this.exprAllowed = !out.isExpr; - }; - - types$1.braceL.updateContext = function(prevType) { - this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); - this.exprAllowed = true; - }; - - types$1.dollarBraceL.updateContext = function() { - this.context.push(types.b_tmpl); - this.exprAllowed = true; - }; - - types$1.parenL.updateContext = function(prevType) { - var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while; - this.context.push(statementParens ? types.p_stat : types.p_expr); - this.exprAllowed = true; - }; - - types$1.incDec.updateContext = function() { - // tokExprAllowed stays unchanged - }; - - types$1._function.updateContext = types$1._class.updateContext = function(prevType) { - if (prevType.beforeExpr && prevType !== types$1._else && - !(prevType === types$1.semi && this.curContext() !== types.p_stat) && - !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && - !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat)) - { this.context.push(types.f_expr); } - else - { this.context.push(types.f_stat); } - this.exprAllowed = false; - }; - - types$1.backQuote.updateContext = function() { - if (this.curContext() === types.q_tmpl) - { this.context.pop(); } - else - { this.context.push(types.q_tmpl); } - this.exprAllowed = false; - }; - - types$1.star.updateContext = function(prevType) { - if (prevType === types$1._function) { - var index = this.context.length - 1; - if (this.context[index] === types.f_expr) - { this.context[index] = types.f_expr_gen; } - else - { this.context[index] = types.f_gen; } - } - this.exprAllowed = true; - }; - - types$1.name.updateContext = function(prevType) { - var allowed = false; - if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) { - if (this.value === "of" && !this.exprAllowed || - this.value === "yield" && this.inGeneratorContext()) - { allowed = true; } - } - this.exprAllowed = allowed; - }; - - // A recursive descent parser operates by defining functions for all - - var pp$5 = Parser.prototype; - - // Check if property name clashes with already added. - // Object/class getters and setters are not allowed to clash — - // either with each other or with an init property — and in - // strict mode, init properties are also not allowed to be repeated. - - pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) { - if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") - { return } - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) - { return } - var key = prop.key; - var name; - switch (key.type) { - case "Identifier": name = key.name; break - case "Literal": name = String(key.value); break - default: return - } - var kind = prop.kind; - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) { - if (refDestructuringErrors) { - if (refDestructuringErrors.doubleProto < 0) { - refDestructuringErrors.doubleProto = key.start; - } - } else { - this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); - } - } - propHash.proto = true; - } - return - } - name = "$" + name; - var other = propHash[name]; - if (other) { - var redefinition; - if (kind === "init") { - redefinition = this.strict && other.init || other.get || other.set; - } else { - redefinition = other.init || other[kind]; - } - if (redefinition) - { this.raiseRecoverable(key.start, "Redefinition of property"); } - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; - }; - - // ### Expression parsing - - // These nest, from the most general expression type at the top to - // 'atomic', nondivisible expression types at the bottom. Most of - // the functions will simply let the function(s) below them parse, - // and, *if* the syntactic construct they handle is present, wrap - // the AST node that the inner parser gave them in another node. - - // Parse a full expression. The optional arguments are used to - // forbid the `in` operator (in for loops initalization expressions) - // and provide reference for storing '=' operator inside shorthand - // property assignment in contexts where both object expression - // and object pattern might appear (so it's possible to raise - // delayed syntax error at correct position). - - pp$5.parseExpression = function(forInit, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeAssign(forInit, refDestructuringErrors); - if (this.type === types$1.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(types$1.comma)) { node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors)); } - return this.finishNode(node, "SequenceExpression") - } - return expr - }; - - // Parse an assignment expression. This includes applications of - // operators like `+=`. - - pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) { - if (this.isContextual("yield")) { - if (this.inGenerator) { return this.parseYield(forInit) } - // The tokenizer will assume an expression is allowed after - // `yield`, but this isn't that kind of yield - else { this.exprAllowed = false; } - } - - var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1; - if (refDestructuringErrors) { - oldParenAssign = refDestructuringErrors.parenthesizedAssign; - oldTrailingComma = refDestructuringErrors.trailingComma; - oldDoubleProto = refDestructuringErrors.doubleProto; - refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1; - } else { - refDestructuringErrors = new DestructuringErrors; - ownDestructuringErrors = true; - } - - var startPos = this.start, startLoc = this.startLoc; - if (this.type === types$1.parenL || this.type === types$1.name) { - this.potentialArrowAt = this.start; - this.potentialArrowInForAwait = forInit === "await"; - } - var left = this.parseMaybeConditional(forInit, refDestructuringErrors); - if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } - if (this.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - if (this.type === types$1.eq) - { left = this.toAssignable(left, false, refDestructuringErrors); } - if (!ownDestructuringErrors) { - refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1; - } - if (refDestructuringErrors.shorthandAssign >= left.start) - { refDestructuringErrors.shorthandAssign = -1; } // reset because shorthand default was used correctly - if (this.type === types$1.eq) - { this.checkLValPattern(left); } - else - { this.checkLValSimple(left); } - node.left = left; - this.next(); - node.right = this.parseMaybeAssign(forInit); - if (oldDoubleProto > -1) { refDestructuringErrors.doubleProto = oldDoubleProto; } - return this.finishNode(node, "AssignmentExpression") - } else { - if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } - } - if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } - if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } - return left - }; - - // Parse a ternary conditional (`?:`) operator. - - pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprOps(forInit, refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - if (this.eat(types$1.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(types$1.colon); - node.alternate = this.parseMaybeAssign(forInit); - return this.finishNode(node, "ConditionalExpression") - } - return expr - }; - - // Start the precedence parser. - - pp$5.parseExprOps = function(forInit, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit) - }; - - // Parse binary operators with the operator precedence parsing - // algorithm. `left` is the left-hand side of the operator. - // `minPrec` provides context that allows the function to stop and - // defer further parser to one of its callers when it encounters an - // operator that has a lower precedence than the set it is parsing. - - pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) { - var prec = this.type.binop; - if (prec != null && (!forInit || this.type !== types$1._in)) { - if (prec > minPrec) { - var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND; - var coalesce = this.type === types$1.coalesce; - if (coalesce) { - // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions. - // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error. - prec = types$1.logicalAND.binop; - } - var op = this.value; - this.next(); - var startPos = this.start, startLoc = this.startLoc; - var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit); - var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce); - if ((logical && this.type === types$1.coalesce) || (coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND))) { - this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"); - } - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit) - } - } - return left - }; - - pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) { - if (right.type === "PrivateIdentifier") { this.raise(right.start, "Private identifier can only be left side of binary expression"); } - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.operator = op; - node.right = right; - return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") - }; - - // Parse unary operators, both prefix and postfix. - - pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) { - var startPos = this.start, startLoc = this.startLoc, expr; - if (this.isContextual("await") && this.canAwait) { - expr = this.parseAwait(forInit); - sawUnary = true; - } else if (this.type.prefix) { - var node = this.startNode(), update = this.type === types$1.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(null, true, update, forInit); - this.checkExpressionErrors(refDestructuringErrors, true); - if (update) { this.checkLValSimple(node.argument); } - else if (this.strict && node.operator === "delete" && - node.argument.type === "Identifier") - { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } - else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) - { this.raiseRecoverable(node.start, "Private fields can not be deleted"); } - else { sawUnary = true; } - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } else if (!sawUnary && this.type === types$1.privateId) { - if (forInit || this.privateNameStack.length === 0) { this.unexpected(); } - expr = this.parsePrivateIdent(); - // only could be private fields in 'in', such as #x in obj - if (this.type !== types$1._in) { this.unexpected(); } - } else { - expr = this.parseExprSubscripts(refDestructuringErrors, forInit); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - while (this.type.postfix && !this.canInsertSemicolon()) { - var node$1 = this.startNodeAt(startPos, startLoc); - node$1.operator = this.value; - node$1.prefix = false; - node$1.argument = expr; - this.checkLValSimple(expr); - this.next(); - expr = this.finishNode(node$1, "UpdateExpression"); - } - } - - if (!incDec && this.eat(types$1.starstar)) { - if (sawUnary) - { this.unexpected(this.lastTokStart); } - else - { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false) } - } else { - return expr - } - }; - - function isPrivateFieldAccess(node) { - return ( - node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || - node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) - ) - } - - // Parse call, dot, and `[]`-subscript expressions. - - pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprAtom(refDestructuringErrors, forInit); - if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") - { return expr } - var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit); - if (refDestructuringErrors && result.type === "MemberExpression") { - if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } - if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } - if (refDestructuringErrors.trailingComma >= result.start) { refDestructuringErrors.trailingComma = -1; } - } - return result - }; - - pp$5.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) { - var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && - this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && - this.potentialArrowAt === base.start; - var optionalChained = false; - - while (true) { - var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit); - - if (element.optional) { optionalChained = true; } - if (element === base || element.type === "ArrowFunctionExpression") { - if (optionalChained) { - var chainNode = this.startNodeAt(startPos, startLoc); - chainNode.expression = element; - element = this.finishNode(chainNode, "ChainExpression"); - } - return element - } - - base = element; - } - }; - - pp$5.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) { - var optionalSupported = this.options.ecmaVersion >= 11; - var optional = optionalSupported && this.eat(types$1.questionDot); - if (noCalls && optional) { this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); } - - var computed = this.eat(types$1.bracketL); - if (computed || (optional && this.type !== types$1.parenL && this.type !== types$1.backQuote) || this.eat(types$1.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - if (computed) { - node.property = this.parseExpression(); - this.expect(types$1.bracketR); - } else if (this.type === types$1.privateId && base.type !== "Super") { - node.property = this.parsePrivateIdent(); - } else { - node.property = this.parseIdent(this.options.allowReserved !== "never"); - } - node.computed = !!computed; - if (optionalSupported) { - node.optional = optional; - } - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(types$1.parenL)) { - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); - if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(types$1.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - if (this.awaitIdentPos > 0) - { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit) - } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; - var node$1 = this.startNodeAt(startPos, startLoc); - node$1.callee = base; - node$1.arguments = exprList; - if (optionalSupported) { - node$1.optional = optional; - } - base = this.finishNode(node$1, "CallExpression"); - } else if (this.type === types$1.backQuote) { - if (optional || optionalChained) { - this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions"); - } - var node$2 = this.startNodeAt(startPos, startLoc); - node$2.tag = base; - node$2.quasi = this.parseTemplate({isTagged: true}); - base = this.finishNode(node$2, "TaggedTemplateExpression"); - } - return base - }; - - // Parse an atomic expression — either a single token that is an - // expression, an expression started by a keyword like `function` or - // `new`, or an expression wrapped in punctuation like `()`, `[]`, - // or `{}`. - - pp$5.parseExprAtom = function(refDestructuringErrors, forInit) { - // If a division operator appears in an expression position, the - // tokenizer got confused, and we force it to read a regexp instead. - if (this.type === types$1.slash) { this.readRegexp(); } - - var node, canBeArrow = this.potentialArrowAt === this.start; - switch (this.type) { - case types$1._super: - if (!this.allowSuper) - { this.raise(this.start, "'super' keyword outside a method"); } - node = this.startNode(); - this.next(); - if (this.type === types$1.parenL && !this.allowDirectSuper) - { this.raise(node.start, "super() call outside constructor of a subclass"); } - // The `super` keyword can appear at below: - // SuperProperty: - // super [ Expression ] - // super . IdentifierName - // SuperCall: - // super ( Arguments ) - if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL) - { this.unexpected(); } - return this.finishNode(node, "Super") - - case types$1._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression") - - case types$1.name: - var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; - var id = this.parseIdent(false); - if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) { - this.overrideContext(types.f_expr); - return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit) - } - if (canBeArrow && !this.canInsertSemicolon()) { - if (this.eat(types$1.arrow)) - { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit) } - if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc && - (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) { - id = this.parseIdent(false); - if (this.canInsertSemicolon() || !this.eat(types$1.arrow)) - { this.unexpected(); } - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit) - } - } - return id - - case types$1.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = {pattern: value.pattern, flags: value.flags}; - return node - - case types$1.num: case types$1.string: - return this.parseLiteral(this.value) - - case types$1._null: case types$1._true: case types$1._false: - node = this.startNode(); - node.value = this.type === types$1._null ? null : this.type === types$1._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal") - - case types$1.parenL: - var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit); - if (refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) - { refDestructuringErrors.parenthesizedAssign = start; } - if (refDestructuringErrors.parenthesizedBind < 0) - { refDestructuringErrors.parenthesizedBind = start; } - } - return expr - - case types$1.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors); - return this.finishNode(node, "ArrayExpression") - - case types$1.braceL: - this.overrideContext(types.b_expr); - return this.parseObj(false, refDestructuringErrors) - - case types$1._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, 0) - - case types$1._class: - return this.parseClass(this.startNode(), false) - - case types$1._new: - return this.parseNew() - - case types$1.backQuote: - return this.parseTemplate() - - case types$1._import: - if (this.options.ecmaVersion >= 11) { - return this.parseExprImport() - } else { - return this.unexpected() - } - - default: - this.unexpected(); - } - }; - - pp$5.parseExprImport = function() { - var node = this.startNode(); - - // Consume `import` as an identifier for `import.meta`. - // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`. - if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); } - var meta = this.parseIdent(true); - - switch (this.type) { - case types$1.parenL: - return this.parseDynamicImport(node) - case types$1.dot: - node.meta = meta; - return this.parseImportMeta(node) - default: - this.unexpected(); - } - }; - - pp$5.parseDynamicImport = function(node) { - this.next(); // skip `(` - - // Parse node.source. - node.source = this.parseMaybeAssign(); - - // Verify ending. - if (!this.eat(types$1.parenR)) { - var errorPos = this.start; - if (this.eat(types$1.comma) && this.eat(types$1.parenR)) { - this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()"); - } else { - this.unexpected(errorPos); - } - } - - return this.finishNode(node, "ImportExpression") - }; - - pp$5.parseImportMeta = function(node) { - this.next(); // skip `.` - - var containsEsc = this.containsEsc; - node.property = this.parseIdent(true); - - if (node.property.name !== "meta") - { this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'"); } - if (containsEsc) - { this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters"); } - if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) - { this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module"); } - - return this.finishNode(node, "MetaProperty") - }; - - pp$5.parseLiteral = function(value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, ""); } - this.next(); - return this.finishNode(node, "Literal") - }; - - pp$5.parseParenExpression = function() { - this.expect(types$1.parenL); - var val = this.parseExpression(); - this.expect(types$1.parenR); - return val - }; - - pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) { - var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; - if (this.options.ecmaVersion >= 6) { - this.next(); - - var innerStartPos = this.start, innerStartLoc = this.startLoc; - var exprList = [], first = true, lastIsComma = false; - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; - this.yieldPos = 0; - this.awaitPos = 0; - // Do not save awaitIdentPos to allow checking awaits nested in parameters - while (this.type !== types$1.parenR) { - first ? first = false : this.expect(types$1.comma); - if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) { - lastIsComma = true; - break - } else if (this.type === types$1.ellipsis) { - spreadStart = this.start; - exprList.push(this.parseParenItem(this.parseRestBinding())); - if (this.type === types$1.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } - break - } else { - exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); - } - } - var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc; - this.expect(types$1.parenR); - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(types$1.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - return this.parseParenArrowList(startPos, startLoc, exprList, forInit) - } - - if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } - if (spreadStart) { this.unexpected(spreadStart); } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - } else { - val = this.parseParenExpression(); - } - - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression") - } else { - return val - } - }; - - pp$5.parseParenItem = function(item) { - return item - }; - - pp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit) - }; - - // New's precedence is slightly tricky. It must allow its argument to - // be a `[]` or dot subscript expression, but not a call — at least, - // not without wrapping it in parentheses. Thus, it uses the noCalls - // argument to parseSubscripts to prevent it from consuming the - // argument list. - - var empty = []; - - pp$5.parseNew = function() { - if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword new"); } - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(types$1.dot)) { - node.meta = meta; - var containsEsc = this.containsEsc; - node.property = this.parseIdent(true); - if (node.property.name !== "target") - { this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'"); } - if (containsEsc) - { this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); } - if (!this.allowNewDotTarget) - { this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block"); } - return this.finishNode(node, "MetaProperty") - } - var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types$1._import; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true, false); - if (isImport && node.callee.type === "ImportExpression") { - this.raise(startPos, "Cannot use new with import()"); - } - if (this.eat(types$1.parenL)) { node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false); } - else { node.arguments = empty; } - return this.finishNode(node, "NewExpression") - }; - - // Parse template expression. - - pp$5.parseTemplateElement = function(ref) { - var isTagged = ref.isTagged; - - var elem = this.startNode(); - if (this.type === types$1.invalidTemplate) { - if (!isTagged) { - this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); - } - elem.value = { - raw: this.value, - cooked: null - }; - } else { - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), - cooked: this.value - }; - } - this.next(); - elem.tail = this.type === types$1.backQuote; - return this.finishNode(elem, "TemplateElement") - }; - - pp$5.parseTemplate = function(ref) { - if ( ref === void 0 ) ref = {}; - var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; - - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement({isTagged: isTagged}); - node.quasis = [curElt]; - while (!curElt.tail) { - if (this.type === types$1.eof) { this.raise(this.pos, "Unterminated template literal"); } - this.expect(types$1.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(types$1.braceR); - node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged})); - } - this.next(); - return this.finishNode(node, "TemplateLiteral") - }; - - pp$5.isAsyncProp = function(prop) { - return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && - (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types$1.star)) && - !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) - }; - - // Parse an object literal or binding pattern. - - pp$5.parseObj = function(isPattern, refDestructuringErrors) { - var node = this.startNode(), first = true, propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(types$1.braceR)) { - if (!first) { - this.expect(types$1.comma); - if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) { break } - } else { first = false; } - - var prop = this.parseProperty(isPattern, refDestructuringErrors); - if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } - node.properties.push(prop); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") - }; - - pp$5.parseProperty = function(isPattern, refDestructuringErrors) { - var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; - if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) { - if (isPattern) { - prop.argument = this.parseIdent(false); - if (this.type === types$1.comma) { - this.raise(this.start, "Comma is not permitted after the rest element"); - } - return this.finishNode(prop, "RestElement") - } - // Parse argument. - prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); - // To disallow trailing comma via `this.toAssignable()`. - if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { - refDestructuringErrors.trailingComma = this.start; - } - // Finish - return this.finishNode(prop, "SpreadElement") - } - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refDestructuringErrors) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) - { isGenerator = this.eat(types$1.star); } - } - var containsEsc = this.containsEsc; - this.parsePropertyName(prop); - if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star); - this.parsePropertyName(prop); - } else { - isAsync = false; - } - this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); - return this.finishNode(prop, "Property") - }; - - pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { - if ((isGenerator || isAsync) && this.type === types$1.colon) - { this.unexpected(); } - - if (this.eat(types$1.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) { - if (isPattern) { this.unexpected(); } - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator, isAsync); - } else if (!isPattern && !containsEsc && - this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && - (prop.key.name === "get" || prop.key.name === "set") && - (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) { - if (isGenerator || isAsync) { this.unexpected(); } - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") - { this.raiseRecoverable(start, "getter should have no params"); } - else - { this.raiseRecoverable(start, "setter should have exactly one param"); } - } else { - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") - { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } - } - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - if (isGenerator || isAsync) { this.unexpected(); } - this.checkUnreserved(prop.key); - if (prop.key.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = startPos; } - prop.kind = "init"; - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); - } else if (this.type === types$1.eq && refDestructuringErrors) { - if (refDestructuringErrors.shorthandAssign < 0) - { refDestructuringErrors.shorthandAssign = this.start; } - prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); - } else { - prop.value = this.copyNode(prop.key); - } - prop.shorthand = true; - } else { this.unexpected(); } - }; - - pp$5.parsePropertyName = function(prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(types$1.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types$1.bracketR); - return prop.key - } else { - prop.computed = false; - } - } - return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never") - }; - - // Initialize empty function node. - - pp$5.initFunction = function(node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } - if (this.options.ecmaVersion >= 8) { node.async = false; } - }; - - // Parse object or class method. - - pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { - var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.initFunction(node); - if (this.options.ecmaVersion >= 6) - { node.generator = isGenerator; } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); - - this.expect(types$1.parenL); - node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); - this.parseFunctionBody(node, false, true, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "FunctionExpression") - }; - - // Parse arrow function expression with given parameters. - - pp$5.parseArrowExpression = function(node, params, isAsync, forInit) { - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); - this.initFunction(node); - if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true, false, forInit); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "ArrowFunctionExpression") - }; - - // Parse function body and check parameters. - - pp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) { - var isExpression = isArrowFunction && this.type !== types$1.braceL; - var oldStrict = this.strict, useStrict = false; - - if (isExpression) { - node.body = this.parseMaybeAssign(forInit); - node.expression = true; - this.checkParams(node, false); - } else { - var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); - if (!oldStrict || nonSimple) { - useStrict = this.strictDirective(this.end); - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (useStrict && nonSimple) - { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } - } - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldLabels = this.labels; - this.labels = []; - if (useStrict) { this.strict = true; } - - // Add the params to varDeclaredNames to ensure that an error is thrown - // if a let/const declaration in the function clashes with one of the params. - this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); - // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' - if (this.strict && node.id) { this.checkLValSimple(node.id, BIND_OUTSIDE); } - node.body = this.parseBlock(false, undefined, useStrict && !oldStrict); - node.expression = false; - this.adaptDirectivePrologue(node.body.body); - this.labels = oldLabels; - } - this.exitScope(); - }; - - pp$5.isSimpleParamList = function(params) { - for (var i = 0, list = params; i < list.length; i += 1) - { - var param = list[i]; - - if (param.type !== "Identifier") { return false - } } - return true - }; - - // Checks function params for various disallowed patterns such as using "eval" - // or "arguments" and duplicate parameters. - - pp$5.checkParams = function(node, allowDuplicates) { - var nameHash = Object.create(null); - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; - - this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash); - } - }; - - // Parses a comma-separated list of expressions, and returns them as - // an array. `close` is the token type that ends the list, and - // `allowEmpty` can be turned on to allow subsequent commas with - // nothing in between them to be parsed as `null` (which is needed - // for array literals). - - pp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { - var elts = [], first = true; - while (!this.eat(close)) { - if (!first) { - this.expect(types$1.comma); - if (allowTrailingComma && this.afterTrailingComma(close)) { break } - } else { first = false; } - - var elt = (void 0); - if (allowEmpty && this.type === types$1.comma) - { elt = null; } - else if (this.type === types$1.ellipsis) { - elt = this.parseSpread(refDestructuringErrors); - if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0) - { refDestructuringErrors.trailingComma = this.start; } - } else { - elt = this.parseMaybeAssign(false, refDestructuringErrors); - } - elts.push(elt); - } - return elts - }; - - pp$5.checkUnreserved = function(ref) { - var start = ref.start; - var end = ref.end; - var name = ref.name; - - if (this.inGenerator && name === "yield") - { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } - if (this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } - if (this.currentThisScope().inClassFieldInit && name === "arguments") - { this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); } - if (this.inClassStaticBlock && (name === "arguments" || name === "await")) - { this.raise(start, ("Cannot use " + name + " in class static initialization block")); } - if (this.keywords.test(name)) - { this.raise(start, ("Unexpected keyword '" + name + "'")); } - if (this.options.ecmaVersion < 6 && - this.input.slice(start, end).indexOf("\\") !== -1) { return } - var re = this.strict ? this.reservedWordsStrict : this.reservedWords; - if (re.test(name)) { - if (!this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } - this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); - } - }; - - // Parse the next token as an identifier. If `liberal` is true (used - // when parsing properties), it will also convert keywords into - // identifiers. - - pp$5.parseIdent = function(liberal) { - var node = this.startNode(); - if (this.type === types$1.name) { - node.name = this.value; - } else if (this.type.keyword) { - node.name = this.type.keyword; - - // To fix https://github.com/acornjs/acorn/issues/575 - // `class` and `function` keywords push new context into this.context. - // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. - // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword - if ((node.name === "class" || node.name === "function") && - (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { - this.context.pop(); - } - } else { - this.unexpected(); - } - this.next(!!liberal); - this.finishNode(node, "Identifier"); - if (!liberal) { - this.checkUnreserved(node); - if (node.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = node.start; } - } - return node - }; - - pp$5.parsePrivateIdent = function() { - var node = this.startNode(); - if (this.type === types$1.privateId) { - node.name = this.value; - } else { - this.unexpected(); - } - this.next(); - this.finishNode(node, "PrivateIdentifier"); - - // For validating existence - if (this.privateNameStack.length === 0) { - this.raise(node.start, ("Private field '#" + (node.name) + "' must be declared in an enclosing class")); - } else { - this.privateNameStack[this.privateNameStack.length - 1].used.push(node); - } - - return node - }; - - // Parses yield expression inside generator. - - pp$5.parseYield = function(forInit) { - if (!this.yieldPos) { this.yieldPos = this.start; } - - var node = this.startNode(); - this.next(); - if (this.type === types$1.semi || this.canInsertSemicolon() || (this.type !== types$1.star && !this.type.startsExpr)) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types$1.star); - node.argument = this.parseMaybeAssign(forInit); - } - return this.finishNode(node, "YieldExpression") - }; - - pp$5.parseAwait = function(forInit) { - if (!this.awaitPos) { this.awaitPos = this.start; } - - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeUnary(null, true, false, forInit); - return this.finishNode(node, "AwaitExpression") - }; - - var pp$4 = Parser.prototype; - - // This function is used to raise exceptions on parse errors. It - // takes an offset integer (into the current `input`) to indicate - // the location of the error, attaches the position to the end - // of the error message, and then raises a `SyntaxError` with that - // message. - - pp$4.raise = function(pos, message) { - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; err.loc = loc; err.raisedAt = this.pos; - throw err - }; - - pp$4.raiseRecoverable = pp$4.raise; - - pp$4.curPosition = function() { - if (this.options.locations) { - return new Position(this.curLine, this.pos - this.lineStart) - } - }; - - var pp$3 = Parser.prototype; - - var Scope = function Scope(flags) { - this.flags = flags; - // A list of var-declared names in the current lexical scope - this.var = []; - // A list of lexically-declared names in the current lexical scope - this.lexical = []; - // A list of lexically-declared FunctionDeclaration names in the current lexical scope - this.functions = []; - // A switch to disallow the identifier reference 'arguments' - this.inClassFieldInit = false; - }; - - // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. - - pp$3.enterScope = function(flags) { - this.scopeStack.push(new Scope(flags)); - }; - - pp$3.exitScope = function() { - this.scopeStack.pop(); - }; - - // The spec says: - // > At the top level of a function, or script, function declarations are - // > treated like var declarations rather than like lexical declarations. - pp$3.treatFunctionsAsVarInScope = function(scope) { - return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) - }; - - pp$3.declareName = function(name, bindingType, pos) { - var redeclared = false; - if (bindingType === BIND_LEXICAL) { - var scope = this.currentScope(); - redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; - scope.lexical.push(name); - if (this.inModule && (scope.flags & SCOPE_TOP)) - { delete this.undefinedExports[name]; } - } else if (bindingType === BIND_SIMPLE_CATCH) { - var scope$1 = this.currentScope(); - scope$1.lexical.push(name); - } else if (bindingType === BIND_FUNCTION) { - var scope$2 = this.currentScope(); - if (this.treatFunctionsAsVar) - { redeclared = scope$2.lexical.indexOf(name) > -1; } - else - { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } - scope$2.functions.push(name); - } else { - for (var i = this.scopeStack.length - 1; i >= 0; --i) { - var scope$3 = this.scopeStack[i]; - if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || - !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { - redeclared = true; - break - } - scope$3.var.push(name); - if (this.inModule && (scope$3.flags & SCOPE_TOP)) - { delete this.undefinedExports[name]; } - if (scope$3.flags & SCOPE_VAR) { break } - } - } - if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } - }; - - pp$3.checkLocalExport = function(id) { - // scope.functions must be empty as Module code is always strict. - if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && - this.scopeStack[0].var.indexOf(id.name) === -1) { - this.undefinedExports[id.name] = id; - } - }; - - pp$3.currentScope = function() { - return this.scopeStack[this.scopeStack.length - 1] - }; - - pp$3.currentVarScope = function() { - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this.scopeStack[i]; - if (scope.flags & SCOPE_VAR) { return scope } - } - }; - - // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. - pp$3.currentThisScope = function() { - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this.scopeStack[i]; - if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } - } - }; - - var Node = function Node(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) - { this.loc = new SourceLocation(parser, loc); } - if (parser.options.directSourceFile) - { this.sourceFile = parser.options.directSourceFile; } - if (parser.options.ranges) - { this.range = [pos, 0]; } - }; - - // Start an AST node, attaching a start offset. - - var pp$2 = Parser.prototype; - - pp$2.startNode = function() { - return new Node(this, this.start, this.startLoc) - }; - - pp$2.startNodeAt = function(pos, loc) { - return new Node(this, pos, loc) - }; - - // Finish an AST node, adding `type` and `end` properties. - - function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) - { node.loc.end = loc; } - if (this.options.ranges) - { node.range[1] = pos; } - return node - } - - pp$2.finishNode = function(node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) - }; - - // Finish node at given position - - pp$2.finishNodeAt = function(node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc) - }; - - pp$2.copyNode = function(node) { - var newNode = new Node(this, node.start, this.startLoc); - for (var prop in node) { newNode[prop] = node[prop]; } - return newNode - }; - - // This file contains Unicode properties extracted from the ECMAScript specification. - // The lists are extracted like so: - // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) - - // #table-binary-unicode-properties - var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; - var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; - var ecma11BinaryProperties = ecma10BinaryProperties; - var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict"; - var ecma13BinaryProperties = ecma12BinaryProperties; - var ecma14BinaryProperties = ecma13BinaryProperties; - - var unicodeBinaryProperties = { - 9: ecma9BinaryProperties, - 10: ecma10BinaryProperties, - 11: ecma11BinaryProperties, - 12: ecma12BinaryProperties, - 13: ecma13BinaryProperties, - 14: ecma14BinaryProperties - }; - - // #table-unicode-general-category-values - var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; - - // #table-unicode-script-values - var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; - var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; - var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; - var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"; - var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"; - var ecma14ScriptValues = ecma13ScriptValues + " Kawi Nag_Mundari Nagm"; - - var unicodeScriptValues = { - 9: ecma9ScriptValues, - 10: ecma10ScriptValues, - 11: ecma11ScriptValues, - 12: ecma12ScriptValues, - 13: ecma13ScriptValues, - 14: ecma14ScriptValues - }; - - var data = {}; - function buildUnicodeData(ecmaVersion) { - var d = data[ecmaVersion] = { - binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), - nonBinary: { - General_Category: wordsRegexp(unicodeGeneralCategoryValues), - Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) - } - }; - d.nonBinary.Script_Extensions = d.nonBinary.Script; - - d.nonBinary.gc = d.nonBinary.General_Category; - d.nonBinary.sc = d.nonBinary.Script; - d.nonBinary.scx = d.nonBinary.Script_Extensions; - } - - for (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) { - var ecmaVersion = list[i]; - - buildUnicodeData(ecmaVersion); - } - - var pp$1 = Parser.prototype; - - var RegExpValidationState = function RegExpValidationState(parser) { - this.parser = parser; - this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : ""); - this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion]; - this.source = ""; - this.flags = ""; - this.start = 0; - this.switchU = false; - this.switchN = false; - this.pos = 0; - this.lastIntValue = 0; - this.lastStringValue = ""; - this.lastAssertionIsQuantifiable = false; - this.numCapturingParens = 0; - this.maxBackReference = 0; - this.groupNames = []; - this.backReferenceNames = []; - }; - - RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { - var unicode = flags.indexOf("u") !== -1; - this.start = start | 0; - this.source = pattern + ""; - this.flags = flags; - this.switchU = unicode && this.parser.options.ecmaVersion >= 6; - this.switchN = unicode && this.parser.options.ecmaVersion >= 9; - }; - - RegExpValidationState.prototype.raise = function raise (message) { - this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); - }; - - // If u flag is given, this returns the code point at the index (it combines a surrogate pair). - // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). - RegExpValidationState.prototype.at = function at (i, forceU) { - if ( forceU === void 0 ) forceU = false; - - var s = this.source; - var l = s.length; - if (i >= l) { - return -1 - } - var c = s.charCodeAt(i); - if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return c - } - var next = s.charCodeAt(i + 1); - return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c - }; - - RegExpValidationState.prototype.nextIndex = function nextIndex (i, forceU) { - if ( forceU === void 0 ) forceU = false; - - var s = this.source; - var l = s.length; - if (i >= l) { - return l - } - var c = s.charCodeAt(i), next; - if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l || - (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) { - return i + 1 - } - return i + 2 - }; - - RegExpValidationState.prototype.current = function current (forceU) { - if ( forceU === void 0 ) forceU = false; - - return this.at(this.pos, forceU) - }; - - RegExpValidationState.prototype.lookahead = function lookahead (forceU) { - if ( forceU === void 0 ) forceU = false; - - return this.at(this.nextIndex(this.pos, forceU), forceU) - }; - - RegExpValidationState.prototype.advance = function advance (forceU) { - if ( forceU === void 0 ) forceU = false; - - this.pos = this.nextIndex(this.pos, forceU); - }; - - RegExpValidationState.prototype.eat = function eat (ch, forceU) { - if ( forceU === void 0 ) forceU = false; - - if (this.current(forceU) === ch) { - this.advance(forceU); - return true - } - return false - }; - - /** - * Validate the flags part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ - pp$1.validateRegExpFlags = function(state) { - var validFlags = state.validFlags; - var flags = state.flags; - - for (var i = 0; i < flags.length; i++) { - var flag = flags.charAt(i); - if (validFlags.indexOf(flag) === -1) { - this.raise(state.start, "Invalid regular expression flag"); - } - if (flags.indexOf(flag, i + 1) > -1) { - this.raise(state.start, "Duplicate regular expression flag"); - } - } - }; - - /** - * Validate the pattern part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ - pp$1.validateRegExpPattern = function(state) { - this.regexp_pattern(state); - - // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of - // parsing contains a |GroupName|, reparse with the goal symbol - // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* - // exception if _P_ did not conform to the grammar, if any elements of _P_ - // were not matched by the parse, or if any Early Error conditions exist. - if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { - state.switchN = true; - this.regexp_pattern(state); - } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern - pp$1.regexp_pattern = function(state) { - state.pos = 0; - state.lastIntValue = 0; - state.lastStringValue = ""; - state.lastAssertionIsQuantifiable = false; - state.numCapturingParens = 0; - state.maxBackReference = 0; - state.groupNames.length = 0; - state.backReferenceNames.length = 0; - - this.regexp_disjunction(state); - - if (state.pos !== state.source.length) { - // Make the same messages as V8. - if (state.eat(0x29 /* ) */)) { - state.raise("Unmatched ')'"); - } - if (state.eat(0x5D /* ] */) || state.eat(0x7D /* } */)) { - state.raise("Lone quantifier brackets"); - } - } - if (state.maxBackReference > state.numCapturingParens) { - state.raise("Invalid escape"); - } - for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { - var name = list[i]; - - if (state.groupNames.indexOf(name) === -1) { - state.raise("Invalid named capture referenced"); - } - } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction - pp$1.regexp_disjunction = function(state) { - this.regexp_alternative(state); - while (state.eat(0x7C /* | */)) { - this.regexp_alternative(state); - } - - // Make the same message as V8. - if (this.regexp_eatQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - if (state.eat(0x7B /* { */)) { - state.raise("Lone quantifier brackets"); - } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative - pp$1.regexp_alternative = function(state) { - while (state.pos < state.source.length && this.regexp_eatTerm(state)) - { } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term - pp$1.regexp_eatTerm = function(state) { - if (this.regexp_eatAssertion(state)) { - // Handle `QuantifiableAssertion Quantifier` alternative. - // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion - // is a QuantifiableAssertion. - if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { - // Make the same message as V8. - if (state.switchU) { - state.raise("Invalid quantifier"); - } - } - return true - } - - if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { - this.regexp_eatQuantifier(state); - return true - } - - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion - pp$1.regexp_eatAssertion = function(state) { - var start = state.pos; - state.lastAssertionIsQuantifiable = false; - - // ^, $ - if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { - return true - } - - // \b \B - if (state.eat(0x5C /* \ */)) { - if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { - return true - } - state.pos = start; - } - - // Lookahead / Lookbehind - if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { - var lookbehind = false; - if (this.options.ecmaVersion >= 9) { - lookbehind = state.eat(0x3C /* < */); - } - if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { - this.regexp_disjunction(state); - if (!state.eat(0x29 /* ) */)) { - state.raise("Unterminated group"); - } - state.lastAssertionIsQuantifiable = !lookbehind; - return true - } - } - - state.pos = start; - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier - pp$1.regexp_eatQuantifier = function(state, noError) { - if ( noError === void 0 ) noError = false; - - if (this.regexp_eatQuantifierPrefix(state, noError)) { - state.eat(0x3F /* ? */); - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix - pp$1.regexp_eatQuantifierPrefix = function(state, noError) { - return ( - state.eat(0x2A /* * */) || - state.eat(0x2B /* + */) || - state.eat(0x3F /* ? */) || - this.regexp_eatBracedQuantifier(state, noError) - ) - }; - pp$1.regexp_eatBracedQuantifier = function(state, noError) { - var start = state.pos; - if (state.eat(0x7B /* { */)) { - var min = 0, max = -1; - if (this.regexp_eatDecimalDigits(state)) { - min = state.lastIntValue; - if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { - max = state.lastIntValue; - } - if (state.eat(0x7D /* } */)) { - // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term - if (max !== -1 && max < min && !noError) { - state.raise("numbers out of order in {} quantifier"); - } - return true - } - } - if (state.switchU && !noError) { - state.raise("Incomplete quantifier"); - } - state.pos = start; - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom - pp$1.regexp_eatAtom = function(state) { - return ( - this.regexp_eatPatternCharacters(state) || - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) - ) - }; - pp$1.regexp_eatReverseSolidusAtomEscape = function(state) { - var start = state.pos; - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatAtomEscape(state)) { - return true - } - state.pos = start; - } - return false - }; - pp$1.regexp_eatUncapturingGroup = function(state) { - var start = state.pos; - if (state.eat(0x28 /* ( */)) { - if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - return true - } - state.raise("Unterminated group"); - } - state.pos = start; - } - return false - }; - pp$1.regexp_eatCapturingGroup = function(state) { - if (state.eat(0x28 /* ( */)) { - if (this.options.ecmaVersion >= 9) { - this.regexp_groupSpecifier(state); - } else if (state.current() === 0x3F /* ? */) { - state.raise("Invalid group"); - } - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - state.numCapturingParens += 1; - return true - } - state.raise("Unterminated group"); - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom - pp$1.regexp_eatExtendedAtom = function(state) { - return ( - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) || - this.regexp_eatInvalidBracedQuantifier(state) || - this.regexp_eatExtendedPatternCharacter(state) - ) - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier - pp$1.regexp_eatInvalidBracedQuantifier = function(state) { - if (this.regexp_eatBracedQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter - pp$1.regexp_eatSyntaxCharacter = function(state) { - var ch = state.current(); - if (isSyntaxCharacter(ch)) { - state.lastIntValue = ch; - state.advance(); - return true - } - return false - }; - function isSyntaxCharacter(ch) { - return ( - ch === 0x24 /* $ */ || - ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || - ch === 0x2E /* . */ || - ch === 0x3F /* ? */ || - ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || - ch >= 0x7B /* { */ && ch <= 0x7D /* } */ - ) - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter - // But eat eager. - pp$1.regexp_eatPatternCharacters = function(state) { - var start = state.pos; - var ch = 0; - while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { - state.advance(); - } - return state.pos !== start - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter - pp$1.regexp_eatExtendedPatternCharacter = function(state) { - var ch = state.current(); - if ( - ch !== -1 && - ch !== 0x24 /* $ */ && - !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && - ch !== 0x2E /* . */ && - ch !== 0x3F /* ? */ && - ch !== 0x5B /* [ */ && - ch !== 0x5E /* ^ */ && - ch !== 0x7C /* | */ - ) { - state.advance(); - return true - } - return false - }; - - // GroupSpecifier :: - // [empty] - // `?` GroupName - pp$1.regexp_groupSpecifier = function(state) { - if (state.eat(0x3F /* ? */)) { - if (this.regexp_eatGroupName(state)) { - if (state.groupNames.indexOf(state.lastStringValue) !== -1) { - state.raise("Duplicate capture group name"); - } - state.groupNames.push(state.lastStringValue); - return - } - state.raise("Invalid group"); - } - }; - - // GroupName :: - // `<` RegExpIdentifierName `>` - // Note: this updates `state.lastStringValue` property with the eaten name. - pp$1.regexp_eatGroupName = function(state) { - state.lastStringValue = ""; - if (state.eat(0x3C /* < */)) { - if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { - return true - } - state.raise("Invalid capture group name"); - } - return false - }; - - // RegExpIdentifierName :: - // RegExpIdentifierStart - // RegExpIdentifierName RegExpIdentifierPart - // Note: this updates `state.lastStringValue` property with the eaten name. - pp$1.regexp_eatRegExpIdentifierName = function(state) { - state.lastStringValue = ""; - if (this.regexp_eatRegExpIdentifierStart(state)) { - state.lastStringValue += codePointToString(state.lastIntValue); - while (this.regexp_eatRegExpIdentifierPart(state)) { - state.lastStringValue += codePointToString(state.lastIntValue); - } - return true - } - return false - }; - - // RegExpIdentifierStart :: - // UnicodeIDStart - // `$` - // `_` - // `\` RegExpUnicodeEscapeSequence[+U] - pp$1.regexp_eatRegExpIdentifierStart = function(state) { - var start = state.pos; - var forceU = this.options.ecmaVersion >= 11; - var ch = state.current(forceU); - state.advance(forceU); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierStart(ch)) { - state.lastIntValue = ch; - return true - } - - state.pos = start; - return false - }; - function isRegExpIdentifierStart(ch) { - return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ - } - - // RegExpIdentifierPart :: - // UnicodeIDContinue - // `$` - // `_` - // `\` RegExpUnicodeEscapeSequence[+U] - // - // - pp$1.regexp_eatRegExpIdentifierPart = function(state) { - var start = state.pos; - var forceU = this.options.ecmaVersion >= 11; - var ch = state.current(forceU); - state.advance(forceU); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierPart(ch)) { - state.lastIntValue = ch; - return true - } - - state.pos = start; - return false - }; - function isRegExpIdentifierPart(ch) { - return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape - pp$1.regexp_eatAtomEscape = function(state) { - if ( - this.regexp_eatBackReference(state) || - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) || - (state.switchN && this.regexp_eatKGroupName(state)) - ) { - return true - } - if (state.switchU) { - // Make the same message as V8. - if (state.current() === 0x63 /* c */) { - state.raise("Invalid unicode escape"); - } - state.raise("Invalid escape"); - } - return false - }; - pp$1.regexp_eatBackReference = function(state) { - var start = state.pos; - if (this.regexp_eatDecimalEscape(state)) { - var n = state.lastIntValue; - if (state.switchU) { - // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape - if (n > state.maxBackReference) { - state.maxBackReference = n; - } - return true - } - if (n <= state.numCapturingParens) { - return true - } - state.pos = start; - } - return false - }; - pp$1.regexp_eatKGroupName = function(state) { - if (state.eat(0x6B /* k */)) { - if (this.regexp_eatGroupName(state)) { - state.backReferenceNames.push(state.lastStringValue); - return true - } - state.raise("Invalid named reference"); - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape - pp$1.regexp_eatCharacterEscape = function(state) { - return ( - this.regexp_eatControlEscape(state) || - this.regexp_eatCControlLetter(state) || - this.regexp_eatZero(state) || - this.regexp_eatHexEscapeSequence(state) || - this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || - (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || - this.regexp_eatIdentityEscape(state) - ) - }; - pp$1.regexp_eatCControlLetter = function(state) { - var start = state.pos; - if (state.eat(0x63 /* c */)) { - if (this.regexp_eatControlLetter(state)) { - return true - } - state.pos = start; - } - return false - }; - pp$1.regexp_eatZero = function(state) { - if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { - state.lastIntValue = 0; - state.advance(); - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape - pp$1.regexp_eatControlEscape = function(state) { - var ch = state.current(); - if (ch === 0x74 /* t */) { - state.lastIntValue = 0x09; /* \t */ - state.advance(); - return true - } - if (ch === 0x6E /* n */) { - state.lastIntValue = 0x0A; /* \n */ - state.advance(); - return true - } - if (ch === 0x76 /* v */) { - state.lastIntValue = 0x0B; /* \v */ - state.advance(); - return true - } - if (ch === 0x66 /* f */) { - state.lastIntValue = 0x0C; /* \f */ - state.advance(); - return true - } - if (ch === 0x72 /* r */) { - state.lastIntValue = 0x0D; /* \r */ - state.advance(); - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter - pp$1.regexp_eatControlLetter = function(state) { - var ch = state.current(); - if (isControlLetter(ch)) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false - }; - function isControlLetter(ch) { - return ( - (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || - (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) - ) - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence - pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) { - if ( forceU === void 0 ) forceU = false; - - var start = state.pos; - var switchU = forceU || state.switchU; - - if (state.eat(0x75 /* u */)) { - if (this.regexp_eatFixedHexDigits(state, 4)) { - var lead = state.lastIntValue; - if (switchU && lead >= 0xD800 && lead <= 0xDBFF) { - var leadSurrogateEnd = state.pos; - if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { - var trail = state.lastIntValue; - if (trail >= 0xDC00 && trail <= 0xDFFF) { - state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; - return true - } - } - state.pos = leadSurrogateEnd; - state.lastIntValue = lead; - } - return true - } - if ( - switchU && - state.eat(0x7B /* { */) && - this.regexp_eatHexDigits(state) && - state.eat(0x7D /* } */) && - isValidUnicode(state.lastIntValue) - ) { - return true - } - if (switchU) { - state.raise("Invalid unicode escape"); - } - state.pos = start; - } - - return false - }; - function isValidUnicode(ch) { - return ch >= 0 && ch <= 0x10FFFF - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape - pp$1.regexp_eatIdentityEscape = function(state) { - if (state.switchU) { - if (this.regexp_eatSyntaxCharacter(state)) { - return true - } - if (state.eat(0x2F /* / */)) { - state.lastIntValue = 0x2F; /* / */ - return true - } - return false - } - - var ch = state.current(); - if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { - state.lastIntValue = ch; - state.advance(); - return true - } - - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape - pp$1.regexp_eatDecimalEscape = function(state) { - state.lastIntValue = 0; - var ch = state.current(); - if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { - do { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); - state.advance(); - } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape - pp$1.regexp_eatCharacterClassEscape = function(state) { - var ch = state.current(); - - if (isCharacterClassEscape(ch)) { - state.lastIntValue = -1; - state.advance(); - return true - } - - if ( - state.switchU && - this.options.ecmaVersion >= 9 && - (ch === 0x50 /* P */ || ch === 0x70 /* p */) - ) { - state.lastIntValue = -1; - state.advance(); - if ( - state.eat(0x7B /* { */) && - this.regexp_eatUnicodePropertyValueExpression(state) && - state.eat(0x7D /* } */) - ) { - return true - } - state.raise("Invalid property name"); - } - - return false - }; - function isCharacterClassEscape(ch) { - return ( - ch === 0x64 /* d */ || - ch === 0x44 /* D */ || - ch === 0x73 /* s */ || - ch === 0x53 /* S */ || - ch === 0x77 /* w */ || - ch === 0x57 /* W */ - ) - } - - // UnicodePropertyValueExpression :: - // UnicodePropertyName `=` UnicodePropertyValue - // LoneUnicodePropertyNameOrValue - pp$1.regexp_eatUnicodePropertyValueExpression = function(state) { - var start = state.pos; - - // UnicodePropertyName `=` UnicodePropertyValue - if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { - var name = state.lastStringValue; - if (this.regexp_eatUnicodePropertyValue(state)) { - var value = state.lastStringValue; - this.regexp_validateUnicodePropertyNameAndValue(state, name, value); - return true - } - } - state.pos = start; - - // LoneUnicodePropertyNameOrValue - if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { - var nameOrValue = state.lastStringValue; - this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); - return true - } - return false - }; - pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { - if (!hasOwn(state.unicodeProperties.nonBinary, name)) - { state.raise("Invalid property name"); } - if (!state.unicodeProperties.nonBinary[name].test(value)) - { state.raise("Invalid property value"); } - }; - pp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { - if (!state.unicodeProperties.binary.test(nameOrValue)) - { state.raise("Invalid property name"); } - }; - - // UnicodePropertyName :: - // UnicodePropertyNameCharacters - pp$1.regexp_eatUnicodePropertyName = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyNameCharacter(ch = state.current())) { - state.lastStringValue += codePointToString(ch); - state.advance(); - } - return state.lastStringValue !== "" - }; - function isUnicodePropertyNameCharacter(ch) { - return isControlLetter(ch) || ch === 0x5F /* _ */ - } - - // UnicodePropertyValue :: - // UnicodePropertyValueCharacters - pp$1.regexp_eatUnicodePropertyValue = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyValueCharacter(ch = state.current())) { - state.lastStringValue += codePointToString(ch); - state.advance(); - } - return state.lastStringValue !== "" - }; - function isUnicodePropertyValueCharacter(ch) { - return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) - } - - // LoneUnicodePropertyNameOrValue :: - // UnicodePropertyValueCharacters - pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { - return this.regexp_eatUnicodePropertyValue(state) - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass - pp$1.regexp_eatCharacterClass = function(state) { - if (state.eat(0x5B /* [ */)) { - state.eat(0x5E /* ^ */); - this.regexp_classRanges(state); - if (state.eat(0x5D /* ] */)) { - return true - } - // Unreachable since it threw "unterminated regular expression" error before. - state.raise("Unterminated character class"); - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges - // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges - // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash - pp$1.regexp_classRanges = function(state) { - while (this.regexp_eatClassAtom(state)) { - var left = state.lastIntValue; - if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { - var right = state.lastIntValue; - if (state.switchU && (left === -1 || right === -1)) { - state.raise("Invalid character class"); - } - if (left !== -1 && right !== -1 && left > right) { - state.raise("Range out of order in character class"); - } - } - } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom - // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash - pp$1.regexp_eatClassAtom = function(state) { - var start = state.pos; - - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatClassEscape(state)) { - return true - } - if (state.switchU) { - // Make the same message as V8. - var ch$1 = state.current(); - if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { - state.raise("Invalid class escape"); - } - state.raise("Invalid escape"); - } - state.pos = start; - } - - var ch = state.current(); - if (ch !== 0x5D /* ] */) { - state.lastIntValue = ch; - state.advance(); - return true - } - - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape - pp$1.regexp_eatClassEscape = function(state) { - var start = state.pos; - - if (state.eat(0x62 /* b */)) { - state.lastIntValue = 0x08; /* */ - return true - } - - if (state.switchU && state.eat(0x2D /* - */)) { - state.lastIntValue = 0x2D; /* - */ - return true - } - - if (!state.switchU && state.eat(0x63 /* c */)) { - if (this.regexp_eatClassControlLetter(state)) { - return true - } - state.pos = start; - } - - return ( - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) - ) - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter - pp$1.regexp_eatClassControlLetter = function(state) { - var ch = state.current(); - if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence - pp$1.regexp_eatHexEscapeSequence = function(state) { - var start = state.pos; - if (state.eat(0x78 /* x */)) { - if (this.regexp_eatFixedHexDigits(state, 2)) { - return true - } - if (state.switchU) { - state.raise("Invalid escape"); - } - state.pos = start; - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits - pp$1.regexp_eatDecimalDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isDecimalDigit(ch = state.current())) { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); - state.advance(); - } - return state.pos !== start - }; - function isDecimalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits - pp$1.regexp_eatHexDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isHexDigit(ch = state.current())) { - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return state.pos !== start - }; - function isHexDigit(ch) { - return ( - (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || - (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || - (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) - ) - } - function hexToInt(ch) { - if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { - return 10 + (ch - 0x41 /* A */) - } - if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { - return 10 + (ch - 0x61 /* a */) - } - return ch - 0x30 /* 0 */ - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence - // Allows only 0-377(octal) i.e. 0-255(decimal). - pp$1.regexp_eatLegacyOctalEscapeSequence = function(state) { - if (this.regexp_eatOctalDigit(state)) { - var n1 = state.lastIntValue; - if (this.regexp_eatOctalDigit(state)) { - var n2 = state.lastIntValue; - if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { - state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; - } else { - state.lastIntValue = n1 * 8 + n2; - } - } else { - state.lastIntValue = n1; - } - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit - pp$1.regexp_eatOctalDigit = function(state) { - var ch = state.current(); - if (isOctalDigit(ch)) { - state.lastIntValue = ch - 0x30; /* 0 */ - state.advance(); - return true - } - state.lastIntValue = 0; - return false - }; - function isOctalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits - // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit - // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence - pp$1.regexp_eatFixedHexDigits = function(state, length) { - var start = state.pos; - state.lastIntValue = 0; - for (var i = 0; i < length; ++i) { - var ch = state.current(); - if (!isHexDigit(ch)) { - state.pos = start; - return false - } - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return true - }; - - // Object type used to represent tokens. Note that normally, tokens - // simply exist as properties on the parser object. This is only - // used for the onToken callback and the external tokenizer. - - var Token = function Token(p) { - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) - { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } - if (p.options.ranges) - { this.range = [p.start, p.end]; } - }; - - // ## Tokenizer - - var pp = Parser.prototype; - - // Move to the next token - - pp.next = function(ignoreEscapeSequenceInKeyword) { - if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) - { this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword); } - if (this.options.onToken) - { this.options.onToken(new Token(this)); } - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); - }; - - pp.getToken = function() { - this.next(); - return new Token(this) - }; - - // If we're in an ES6 environment, make parsers iterable - if (typeof Symbol !== "undefined") - { pp[Symbol.iterator] = function() { - var this$1$1 = this; - - return { - next: function () { - var token = this$1$1.getToken(); - return { - done: token.type === types$1.eof, - value: token - } - } - } - }; } - - // Toggle strict mode. Re-reads the next number or string to please - // pedantic tests (`"use strict"; 010;` should fail). - - // Read a single token, updating the parser object's token-related - // properties. - - pp.nextToken = function() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } - - this.start = this.pos; - if (this.options.locations) { this.startLoc = this.curPosition(); } - if (this.pos >= this.input.length) { return this.finishToken(types$1.eof) } - - if (curContext.override) { return curContext.override(this) } - else { this.readToken(this.fullCharCodeAtPos()); } - }; - - pp.readToken = function(code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) - { return this.readWord() } - - return this.getTokenFromCode(code) - }; - - pp.fullCharCodeAtPos = function() { - var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xdc00) { return code } - var next = this.input.charCodeAt(this.pos + 1); - return next <= 0xdbff || next >= 0xe000 ? code : (code << 10) + next - 0x35fdc00 - }; - - pp.skipBlockComment = function() { - var startLoc = this.options.onComment && this.curPosition(); - var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } - this.pos = end + 2; - if (this.options.locations) { - for (var nextBreak = (void 0), pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1;) { - ++this.curLine; - pos = this.lineStart = nextBreak; - } - } - if (this.options.onComment) - { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, - startLoc, this.curPosition()); } - }; - - pp.skipLineComment = function(startSkip) { - var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && !isNewLine(ch)) { - ch = this.input.charCodeAt(++this.pos); - } - if (this.options.onComment) - { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, - startLoc, this.curPosition()); } - }; - - // Called at the start of the parse and after every token. Skips - // whitespace and comments, and. - - pp.skipSpace = function() { - loop: while (this.pos < this.input.length) { - var ch = this.input.charCodeAt(this.pos); - switch (ch) { - case 32: case 160: // ' ' - ++this.pos; - break - case 13: - if (this.input.charCodeAt(this.pos + 1) === 10) { - ++this.pos; - } - case 10: case 8232: case 8233: - ++this.pos; - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - break - case 47: // '/' - switch (this.input.charCodeAt(this.pos + 1)) { - case 42: // '*' - this.skipBlockComment(); - break - case 47: - this.skipLineComment(2); - break - default: - break loop - } - break - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } else { - break loop - } - } - } - }; - - // Called at the end of every token. Sets `end`, `val`, and - // maintains `context` and `exprAllowed`, and skips the space after - // the token, so that the next one's `start` will point at the - // right position. - - pp.finishToken = function(type, val) { - this.end = this.pos; - if (this.options.locations) { this.endLoc = this.curPosition(); } - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); - }; - - // ### Token reading - - // This is the function that is called to fetch the next token. It - // is somewhat obscure, because it works in character codes rather - // than characters, and because operator parsing has been inlined - // into it. - // - // All in the name of speed. - // - pp.readToken_dot = function() { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) { return this.readNumber(true) } - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' - this.pos += 3; - return this.finishToken(types$1.ellipsis) - } else { - ++this.pos; - return this.finishToken(types$1.dot) - } - }; - - pp.readToken_slash = function() { // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { ++this.pos; return this.readRegexp() } - if (next === 61) { return this.finishOp(types$1.assign, 2) } - return this.finishOp(types$1.slash, 1) - }; - - pp.readToken_mult_modulo_exp = function(code) { // '%*' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - var tokentype = code === 42 ? types$1.star : types$1.modulo; - - // exponentiation operator ** and **= - if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { - ++size; - tokentype = types$1.starstar; - next = this.input.charCodeAt(this.pos + 2); - } - - if (next === 61) { return this.finishOp(types$1.assign, size + 1) } - return this.finishOp(tokentype, size) - }; - - pp.readToken_pipe_amp = function(code) { // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (this.options.ecmaVersion >= 12) { - var next2 = this.input.charCodeAt(this.pos + 2); - if (next2 === 61) { return this.finishOp(types$1.assign, 3) } - } - return this.finishOp(code === 124 ? types$1.logicalOR : types$1.logicalAND, 2) - } - if (next === 61) { return this.finishOp(types$1.assign, 2) } - return this.finishOp(code === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1) - }; - - pp.readToken_caret = function() { // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) { return this.finishOp(types$1.assign, 2) } - return this.finishOp(types$1.bitwiseXOR, 1) - }; - - pp.readToken_plus_min = function(code) { // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && - (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { - // A `-->` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken() - } - return this.finishOp(types$1.incDec, 2) - } - if (next === 61) { return this.finishOp(types$1.assign, 2) } - return this.finishOp(types$1.plusMin, 1) - }; - - pp.readToken_lt_gt = function(code) { // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1) } - return this.finishOp(types$1.bitShift, size) - } - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && - this.input.charCodeAt(this.pos + 3) === 45) { - // `` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken() - } - return this.finishOp(types$1.incDec, 2) - } - if (next === 61) { return this.finishOp(types$1.assign, 2) } - return this.finishOp(types$1.plusMin, 1) -}; - -pp.readToken_lt_gt = function(code) { // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1) } - return this.finishOp(types$1.bitShift, size) - } - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && - this.input.charCodeAt(this.pos + 3) === 45) { - // ` -[npm-version-src]: https://img.shields.io/npm/v/create-require?style=flat-square -[npm-version-href]: https://npmjs.com/package/create-require - -[npm-downloads-src]: https://img.shields.io/npm/dm/create-require?style=flat-square -[npm-downloads-href]: https://npmjs.com/package/create-require - -[github-actions-src]: https://img.shields.io/github/workflow/status/nuxt-contrib/create-require/test/master?style=flat-square -[github-actions-href]: https://github.com/nuxt-contrib/create-require/actions?query=workflow%3Atest - -[codecov-src]: https://img.shields.io/codecov/c/gh/nuxt-contrib/create-require/master?style=flat-square -[codecov-href]: https://codecov.io/gh/nuxt-contrib/create-require diff --git a/node_modules/create-require/create-require.d.ts b/node_modules/create-require/create-require.d.ts deleted file mode 100644 index 451504d..0000000 --- a/node_modules/create-require/create-require.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { URL } from 'url'; - -export default function createRequire (filename: string | URL): NodeRequire; diff --git a/node_modules/create-require/create-require.js b/node_modules/create-require/create-require.js deleted file mode 100644 index 487082a..0000000 --- a/node_modules/create-require/create-require.js +++ /dev/null @@ -1,49 +0,0 @@ -const nativeModule = require('module') -const path = require('path') -const fs = require('fs') - -function createRequire (filename) { - // Fallback to process.cwd() if no filename passed - if (!filename) { - filename = process.cwd() - } - - // If filename is dir, createRequire goes with parent directory, so we need fakepath - if (isDir(filename)) { - filename = path.join(filename, 'index.js') - } - - // Added in Node v12.2.0 - if (nativeModule.createRequire) { - return nativeModule.createRequire(filename) - } - - // Added in Node v10.12.0 and deprecated since Node v12.2.0 - if (nativeModule.createRequireFromPath) { - return nativeModule.createRequireFromPath(filename) - } - - // Polyfill - return _createRequire(filename) -} - -// Polyfill -function _createRequire (filename) { - const mod = new nativeModule.Module(filename, null) - mod.filename = filename - mod.paths = nativeModule.Module._nodeModulePaths(path.dirname(filename)) - mod._compile('module.exports = require;', filename) - return mod.exports -} - -function isDir (path) { - try { - const stat = fs.lstatSync(path) - return stat.isDirectory() - } catch (e) { - // lstatSync throws an error if path doesn't exist - return false - } -} - -module.exports = createRequire diff --git a/node_modules/create-require/package.json b/node_modules/create-require/package.json deleted file mode 100644 index 2e36a10..0000000 --- a/node_modules/create-require/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "create-require", - "version": "1.1.1", - "description": "Polyfill for Node.js module.createRequire (<= v12.2.0)", - "repository": "nuxt-contrib/create-require", - "license": "MIT", - "contributors": [ - { - "name": "Maël Nison", - "email": "nison.mael@gmail.com" - }, - { - "name": "Paul Soporan", - "email": "paul.soporan@gmail.com" - }, - { - "name": "Pooya Parsa", - "email": "pyapar@gmail.com" - } - ], - "main": "./create-require.js", - "types": "./create-require.d.ts", - "files": [ - "create-require.js", - "create-require.d.ts" - ], - "scripts": { - "lint": "eslint .", - "release": "yarn test && standard-version && git push --follow-tags && npm publish", - "test:matrix": "tap --no-esm --no-timeout ./test/matrix.js", - "test": "yarn lint && yarn test:matrix" - }, - "devDependencies": { - "@nuxtjs/eslint-config": "latest", - "eslint": "latest", - "tap": "latest", - "standard-version": "latest" - } -} diff --git a/node_modules/diff/CONTRIBUTING.md b/node_modules/diff/CONTRIBUTING.md deleted file mode 100644 index c8c4fe6..0000000 --- a/node_modules/diff/CONTRIBUTING.md +++ /dev/null @@ -1,39 +0,0 @@ -# How to Contribute - -## Pull Requests - -We also accept [pull requests][pull-request]! - -Generally we like to see pull requests that - -- Maintain the existing code style -- Are focused on a single change (i.e. avoid large refactoring or style adjustments in untouched code if not the primary goal of the pull request) -- Have [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) -- Have tests -- Don't decrease the current code coverage (see coverage/lcov-report/index.html) - -## Building - -``` -npm install -npm test -``` - -The `npm test -- dev` implements watching for tests within Node and `karma start` may be used for manual testing in browsers. - -If you notice any problems, please report them to the GitHub issue tracker at -[http://github.com/kpdecker/jsdiff/issues](http://github.com/kpdecker/jsdiff/issues). - -## Releasing - -JsDiff utilizes the [release yeoman generator][generator-release] to perform most release tasks. - -A full release may be completed with the following: - -``` -yo release -npm publish -``` - -[generator-release]: https://github.com/walmartlabs/generator-release -[pull-request]: https://github.com/kpdecker/jsdiff/pull/new/master diff --git a/node_modules/diff/LICENSE b/node_modules/diff/LICENSE deleted file mode 100644 index 4e7146e..0000000 --- a/node_modules/diff/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Software License Agreement (BSD License) - -Copyright (c) 2009-2015, Kevin Decker - -All rights reserved. - -Redistribution and use of this software in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -* Neither the name of Kevin Decker nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/node_modules/diff/README.md b/node_modules/diff/README.md deleted file mode 100644 index f1bbf25..0000000 --- a/node_modules/diff/README.md +++ /dev/null @@ -1,207 +0,0 @@ -# jsdiff - -[![Build Status](https://secure.travis-ci.org/kpdecker/jsdiff.svg)](http://travis-ci.org/kpdecker/jsdiff) -[![Sauce Test Status](https://saucelabs.com/buildstatus/jsdiff)](https://saucelabs.com/u/jsdiff) - -A javascript text differencing implementation. - -Based on the algorithm proposed in -["An O(ND) Difference Algorithm and its Variations" (Myers, 1986)](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927). - -## Installation -```bash -npm install diff --save -``` - -## API - -* `JsDiff.diffChars(oldStr, newStr[, options])` - diffs two blocks of text, comparing character by character. - - Returns a list of change objects (See below). - - Options - * `ignoreCase`: `true` to ignore casing difference. Defaults to `false`. - -* `JsDiff.diffWords(oldStr, newStr[, options])` - diffs two blocks of text, comparing word by word, ignoring whitespace. - - Returns a list of change objects (See below). - - Options - * `ignoreCase`: Same as in `diffChars`. - -* `JsDiff.diffWordsWithSpace(oldStr, newStr[, options])` - diffs two blocks of text, comparing word by word, treating whitespace as significant. - - Returns a list of change objects (See below). - -* `JsDiff.diffLines(oldStr, newStr[, options])` - diffs two blocks of text, comparing line by line. - - Options - * `ignoreWhitespace`: `true` to ignore leading and trailing whitespace. This is the same as `diffTrimmedLines` - * `newlineIsToken`: `true` to treat newline characters as separate tokens. This allows for changes to the newline structure to occur independently of the line content and to be treated as such. In general this is the more human friendly form of `diffLines` and `diffLines` is better suited for patches and other computer friendly output. - - Returns a list of change objects (See below). - -* `JsDiff.diffTrimmedLines(oldStr, newStr[, options])` - diffs two blocks of text, comparing line by line, ignoring leading and trailing whitespace. - - Returns a list of change objects (See below). - -* `JsDiff.diffSentences(oldStr, newStr[, options])` - diffs two blocks of text, comparing sentence by sentence. - - Returns a list of change objects (See below). - -* `JsDiff.diffCss(oldStr, newStr[, options])` - diffs two blocks of text, comparing CSS tokens. - - Returns a list of change objects (See below). - -* `JsDiff.diffJson(oldObj, newObj[, options])` - diffs two JSON objects, comparing the fields defined on each. The order of fields, etc does not matter in this comparison. - - Returns a list of change objects (See below). - -* `JsDiff.diffArrays(oldArr, newArr[, options])` - diffs two arrays, comparing each item for strict equality (===). - - Options - * `comparator`: `function(left, right)` for custom equality checks - - Returns a list of change objects (See below). - -* `JsDiff.createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader)` - creates a unified diff patch. - - Parameters: - * `oldFileName` : String to be output in the filename section of the patch for the removals - * `newFileName` : String to be output in the filename section of the patch for the additions - * `oldStr` : Original string value - * `newStr` : New string value - * `oldHeader` : Additional information to include in the old file header - * `newHeader` : Additional information to include in the new file header - * `options` : An object with options. Currently, only `context` is supported and describes how many lines of context should be included. - -* `JsDiff.createPatch(fileName, oldStr, newStr, oldHeader, newHeader)` - creates a unified diff patch. - - Just like JsDiff.createTwoFilesPatch, but with oldFileName being equal to newFileName. - - -* `JsDiff.structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options)` - returns an object with an array of hunk objects. - - This method is similar to createTwoFilesPatch, but returns a data structure - suitable for further processing. Parameters are the same as createTwoFilesPatch. The data structure returned may look like this: - - ```js - { - oldFileName: 'oldfile', newFileName: 'newfile', - oldHeader: 'header1', newHeader: 'header2', - hunks: [{ - oldStart: 1, oldLines: 3, newStart: 1, newLines: 3, - lines: [' line2', ' line3', '-line4', '+line5', '\\ No newline at end of file'], - }] - } - ``` - -* `JsDiff.applyPatch(source, patch[, options])` - applies a unified diff patch. - - Return a string containing new version of provided data. `patch` may be a string diff or the output from the `parsePatch` or `structuredPatch` methods. - - The optional `options` object may have the following keys: - - - `fuzzFactor`: Number of lines that are allowed to differ before rejecting a patch. Defaults to 0. - - `compareLine(lineNumber, line, operation, patchContent)`: Callback used to compare to given lines to determine if they should be considered equal when patching. Defaults to strict equality but may be overridden to provide fuzzier comparison. Should return false if the lines should be rejected. - -* `JsDiff.applyPatches(patch, options)` - applies one or more patches. - - This method will iterate over the contents of the patch and apply to data provided through callbacks. The general flow for each patch index is: - - - `options.loadFile(index, callback)` is called. The caller should then load the contents of the file and then pass that to the `callback(err, data)` callback. Passing an `err` will terminate further patch execution. - - `options.patched(index, content, callback)` is called once the patch has been applied. `content` will be the return value from `applyPatch`. When it's ready, the caller should call `callback(err)` callback. Passing an `err` will terminate further patch execution. - - Once all patches have been applied or an error occurs, the `options.complete(err)` callback is made. - -* `JsDiff.parsePatch(diffStr)` - Parses a patch into structured data - - Return a JSON object representation of the a patch, suitable for use with the `applyPatch` method. This parses to the same structure returned by `JsDiff.structuredPatch`. - -* `convertChangesToXML(changes)` - converts a list of changes to a serialized XML format - - -All methods above which accept the optional `callback` method will run in sync mode when that parameter is omitted and in async mode when supplied. This allows for larger diffs without blocking the event loop. This may be passed either directly as the final parameter or as the `callback` field in the `options` object. - -### Change Objects -Many of the methods above return change objects. These objects consist of the following fields: - -* `value`: Text content -* `added`: True if the value was inserted into the new string -* `removed`: True if the value was removed from the old string - -Note that some cases may omit a particular flag field. Comparison on the flag fields should always be done in a truthy or falsy manner. - -## Examples - -Basic example in Node - -```js -require('colors'); -var jsdiff = require('diff'); - -var one = 'beep boop'; -var other = 'beep boob blah'; - -var diff = jsdiff.diffChars(one, other); - -diff.forEach(function(part){ - // green for additions, red for deletions - // grey for common parts - var color = part.added ? 'green' : - part.removed ? 'red' : 'grey'; - process.stderr.write(part.value[color]); -}); - -console.log(); -``` -Running the above program should yield - -Node Example - -Basic example in a web page - -```html -

-
-
-```
-
-Open the above .html file in a browser and you should see
-
-Node Example
-
-**[Full online demo](http://kpdecker.github.com/jsdiff)**
-
-## Compatibility
-
-[![Sauce Test Status](https://saucelabs.com/browser-matrix/jsdiff.svg)](https://saucelabs.com/u/jsdiff)
-
-jsdiff supports all ES3 environments with some known issues on IE8 and below. Under these browsers some diff algorithms such as word diff and others may fail due to lack of support for capturing groups in the `split` operation.
-
-## License
-
-See [LICENSE](https://github.com/kpdecker/jsdiff/blob/master/LICENSE).
diff --git a/node_modules/diff/dist/diff.js b/node_modules/diff/dist/diff.js
deleted file mode 100644
index 03571ca..0000000
--- a/node_modules/diff/dist/diff.js
+++ /dev/null
@@ -1,1585 +0,0 @@
-/*!
-
- diff v4.0.1
-
-Software License Agreement (BSD License)
-
-Copyright (c) 2009-2015, Kevin Decker 
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above
-  copyright notice, this list of conditions and the
-  following disclaimer.
-
-* Redistributions in binary form must reproduce the above
-  copyright notice, this list of conditions and the
-  following disclaimer in the documentation and/or other
-  materials provided with the distribution.
-
-* Neither the name of Kevin Decker nor the names of its
-  contributors may be used to endorse or promote products
-  derived from this software without specific prior
-  written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@license
-*/
-(function (global, factory) {
-  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
-  typeof define === 'function' && define.amd ? define(['exports'], factory) :
-  (global = global || self, factory(global.Diff = {}));
-}(this, function (exports) { 'use strict';
-
-  function Diff() {}
-  Diff.prototype = {
-    diff: function diff(oldString, newString) {
-      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-      var callback = options.callback;
-
-      if (typeof options === 'function') {
-        callback = options;
-        options = {};
-      }
-
-      this.options = options;
-      var self = this;
-
-      function done(value) {
-        if (callback) {
-          setTimeout(function () {
-            callback(undefined, value);
-          }, 0);
-          return true;
-        } else {
-          return value;
-        }
-      } // Allow subclasses to massage the input prior to running
-
-
-      oldString = this.castInput(oldString);
-      newString = this.castInput(newString);
-      oldString = this.removeEmpty(this.tokenize(oldString));
-      newString = this.removeEmpty(this.tokenize(newString));
-      var newLen = newString.length,
-          oldLen = oldString.length;
-      var editLength = 1;
-      var maxEditLength = newLen + oldLen;
-      var bestPath = [{
-        newPos: -1,
-        components: []
-      }]; // Seed editLength = 0, i.e. the content starts with the same values
-
-      var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
-
-      if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
-        // Identity per the equality and tokenizer
-        return done([{
-          value: this.join(newString),
-          count: newString.length
-        }]);
-      } // Main worker method. checks all permutations of a given edit length for acceptance.
-
-
-      function execEditLength() {
-        for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
-          var basePath = void 0;
-
-          var addPath = bestPath[diagonalPath - 1],
-              removePath = bestPath[diagonalPath + 1],
-              _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
-
-          if (addPath) {
-            // No one else is going to attempt to use this value, clear it
-            bestPath[diagonalPath - 1] = undefined;
-          }
-
-          var canAdd = addPath && addPath.newPos + 1 < newLen,
-              canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
-
-          if (!canAdd && !canRemove) {
-            // If this path is a terminal then prune
-            bestPath[diagonalPath] = undefined;
-            continue;
-          } // Select the diagonal that we want to branch from. We select the prior
-          // path whose position in the new string is the farthest from the origin
-          // and does not pass the bounds of the diff graph
-
-
-          if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
-            basePath = clonePath(removePath);
-            self.pushComponent(basePath.components, undefined, true);
-          } else {
-            basePath = addPath; // No need to clone, we've pulled it from the list
-
-            basePath.newPos++;
-            self.pushComponent(basePath.components, true, undefined);
-          }
-
-          _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done
-
-          if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
-            return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
-          } else {
-            // Otherwise track this path as a potential candidate and continue.
-            bestPath[diagonalPath] = basePath;
-          }
-        }
-
-        editLength++;
-      } // Performs the length of edit iteration. Is a bit fugly as this has to support the
-      // sync and async mode which is never fun. Loops over execEditLength until a value
-      // is produced.
-
-
-      if (callback) {
-        (function exec() {
-          setTimeout(function () {
-            // This should not happen, but we want to be safe.
-
-            /* istanbul ignore next */
-            if (editLength > maxEditLength) {
-              return callback();
-            }
-
-            if (!execEditLength()) {
-              exec();
-            }
-          }, 0);
-        })();
-      } else {
-        while (editLength <= maxEditLength) {
-          var ret = execEditLength();
-
-          if (ret) {
-            return ret;
-          }
-        }
-      }
-    },
-    pushComponent: function pushComponent(components, added, removed) {
-      var last = components[components.length - 1];
-
-      if (last && last.added === added && last.removed === removed) {
-        // We need to clone here as the component clone operation is just
-        // as shallow array clone
-        components[components.length - 1] = {
-          count: last.count + 1,
-          added: added,
-          removed: removed
-        };
-      } else {
-        components.push({
-          count: 1,
-          added: added,
-          removed: removed
-        });
-      }
-    },
-    extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
-      var newLen = newString.length,
-          oldLen = oldString.length,
-          newPos = basePath.newPos,
-          oldPos = newPos - diagonalPath,
-          commonCount = 0;
-
-      while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
-        newPos++;
-        oldPos++;
-        commonCount++;
-      }
-
-      if (commonCount) {
-        basePath.components.push({
-          count: commonCount
-        });
-      }
-
-      basePath.newPos = newPos;
-      return oldPos;
-    },
-    equals: function equals(left, right) {
-      if (this.options.comparator) {
-        return this.options.comparator(left, right);
-      } else {
-        return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
-      }
-    },
-    removeEmpty: function removeEmpty(array) {
-      var ret = [];
-
-      for (var i = 0; i < array.length; i++) {
-        if (array[i]) {
-          ret.push(array[i]);
-        }
-      }
-
-      return ret;
-    },
-    castInput: function castInput(value) {
-      return value;
-    },
-    tokenize: function tokenize(value) {
-      return value.split('');
-    },
-    join: function join(chars) {
-      return chars.join('');
-    }
-  };
-
-  function buildValues(diff, components, newString, oldString, useLongestToken) {
-    var componentPos = 0,
-        componentLen = components.length,
-        newPos = 0,
-        oldPos = 0;
-
-    for (; componentPos < componentLen; componentPos++) {
-      var component = components[componentPos];
-
-      if (!component.removed) {
-        if (!component.added && useLongestToken) {
-          var value = newString.slice(newPos, newPos + component.count);
-          value = value.map(function (value, i) {
-            var oldValue = oldString[oldPos + i];
-            return oldValue.length > value.length ? oldValue : value;
-          });
-          component.value = diff.join(value);
-        } else {
-          component.value = diff.join(newString.slice(newPos, newPos + component.count));
-        }
-
-        newPos += component.count; // Common case
-
-        if (!component.added) {
-          oldPos += component.count;
-        }
-      } else {
-        component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
-        oldPos += component.count; // Reverse add and remove so removes are output first to match common convention
-        // The diffing algorithm is tied to add then remove output and this is the simplest
-        // route to get the desired output with minimal overhead.
-
-        if (componentPos && components[componentPos - 1].added) {
-          var tmp = components[componentPos - 1];
-          components[componentPos - 1] = components[componentPos];
-          components[componentPos] = tmp;
-        }
-      }
-    } // Special case handle for when one terminal is ignored (i.e. whitespace).
-    // For this case we merge the terminal into the prior string and drop the change.
-    // This is only available for string mode.
-
-
-    var lastComponent = components[componentLen - 1];
-
-    if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
-      components[componentLen - 2].value += lastComponent.value;
-      components.pop();
-    }
-
-    return components;
-  }
-
-  function clonePath(path) {
-    return {
-      newPos: path.newPos,
-      components: path.components.slice(0)
-    };
-  }
-
-  var characterDiff = new Diff();
-  function diffChars(oldStr, newStr, options) {
-    return characterDiff.diff(oldStr, newStr, options);
-  }
-
-  function generateOptions(options, defaults) {
-    if (typeof options === 'function') {
-      defaults.callback = options;
-    } else if (options) {
-      for (var name in options) {
-        /* istanbul ignore else */
-        if (options.hasOwnProperty(name)) {
-          defaults[name] = options[name];
-        }
-      }
-    }
-
-    return defaults;
-  }
-
-  //
-  // Ranges and exceptions:
-  // Latin-1 Supplement, 0080–00FF
-  //  - U+00D7  × Multiplication sign
-  //  - U+00F7  ÷ Division sign
-  // Latin Extended-A, 0100–017F
-  // Latin Extended-B, 0180–024F
-  // IPA Extensions, 0250–02AF
-  // Spacing Modifier Letters, 02B0–02FF
-  //  - U+02C7  ˇ ˇ  Caron
-  //  - U+02D8  ˘ ˘  Breve
-  //  - U+02D9  ˙ ˙  Dot Above
-  //  - U+02DA  ˚ ˚  Ring Above
-  //  - U+02DB  ˛ ˛  Ogonek
-  //  - U+02DC  ˜ ˜  Small Tilde
-  //  - U+02DD  ˝ ˝  Double Acute Accent
-  // Latin Extended Additional, 1E00–1EFF
-
-  var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
-  var reWhitespace = /\S/;
-  var wordDiff = new Diff();
-
-  wordDiff.equals = function (left, right) {
-    if (this.options.ignoreCase) {
-      left = left.toLowerCase();
-      right = right.toLowerCase();
-    }
-
-    return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
-  };
-
-  wordDiff.tokenize = function (value) {
-    var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
-
-    for (var i = 0; i < tokens.length - 1; i++) {
-      // If we have an empty string in the next field and we have only word chars before and after, merge
-      if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {
-        tokens[i] += tokens[i + 2];
-        tokens.splice(i + 1, 2);
-        i--;
-      }
-    }
-
-    return tokens;
-  };
-
-  function diffWords(oldStr, newStr, options) {
-    options = generateOptions(options, {
-      ignoreWhitespace: true
-    });
-    return wordDiff.diff(oldStr, newStr, options);
-  }
-  function diffWordsWithSpace(oldStr, newStr, options) {
-    return wordDiff.diff(oldStr, newStr, options);
-  }
-
-  var lineDiff = new Diff();
-
-  lineDiff.tokenize = function (value) {
-    var retLines = [],
-        linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line
-
-    if (!linesAndNewlines[linesAndNewlines.length - 1]) {
-      linesAndNewlines.pop();
-    } // Merge the content and line separators into single tokens
-
-
-    for (var i = 0; i < linesAndNewlines.length; i++) {
-      var line = linesAndNewlines[i];
-
-      if (i % 2 && !this.options.newlineIsToken) {
-        retLines[retLines.length - 1] += line;
-      } else {
-        if (this.options.ignoreWhitespace) {
-          line = line.trim();
-        }
-
-        retLines.push(line);
-      }
-    }
-
-    return retLines;
-  };
-
-  function diffLines(oldStr, newStr, callback) {
-    return lineDiff.diff(oldStr, newStr, callback);
-  }
-  function diffTrimmedLines(oldStr, newStr, callback) {
-    var options = generateOptions(callback, {
-      ignoreWhitespace: true
-    });
-    return lineDiff.diff(oldStr, newStr, options);
-  }
-
-  var sentenceDiff = new Diff();
-
-  sentenceDiff.tokenize = function (value) {
-    return value.split(/(\S.+?[.!?])(?=\s+|$)/);
-  };
-
-  function diffSentences(oldStr, newStr, callback) {
-    return sentenceDiff.diff(oldStr, newStr, callback);
-  }
-
-  var cssDiff = new Diff();
-
-  cssDiff.tokenize = function (value) {
-    return value.split(/([{}:;,]|\s+)/);
-  };
-
-  function diffCss(oldStr, newStr, callback) {
-    return cssDiff.diff(oldStr, newStr, callback);
-  }
-
-  function _typeof(obj) {
-    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
-      _typeof = function (obj) {
-        return typeof obj;
-      };
-    } else {
-      _typeof = function (obj) {
-        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
-      };
-    }
-
-    return _typeof(obj);
-  }
-
-  function _toConsumableArray(arr) {
-    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
-  }
-
-  function _arrayWithoutHoles(arr) {
-    if (Array.isArray(arr)) {
-      for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
-
-      return arr2;
-    }
-  }
-
-  function _iterableToArray(iter) {
-    if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
-  }
-
-  function _nonIterableSpread() {
-    throw new TypeError("Invalid attempt to spread non-iterable instance");
-  }
-
-  var objectPrototypeToString = Object.prototype.toString;
-  var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
-  // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
-
-  jsonDiff.useLongestToken = true;
-  jsonDiff.tokenize = lineDiff.tokenize;
-
-  jsonDiff.castInput = function (value) {
-    var _this$options = this.options,
-        undefinedReplacement = _this$options.undefinedReplacement,
-        _this$options$stringi = _this$options.stringifyReplacer,
-        stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) {
-      return typeof v === 'undefined' ? undefinedReplacement : v;
-    } : _this$options$stringi;
-    return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, '  ');
-  };
-
-  jsonDiff.equals = function (left, right) {
-    return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'));
-  };
-
-  function diffJson(oldObj, newObj, options) {
-    return jsonDiff.diff(oldObj, newObj, options);
-  } // This function handles the presence of circular references by bailing out when encountering an
-  // object that is already on the "stack" of items being processed. Accepts an optional replacer
-
-  function canonicalize(obj, stack, replacementStack, replacer, key) {
-    stack = stack || [];
-    replacementStack = replacementStack || [];
-
-    if (replacer) {
-      obj = replacer(key, obj);
-    }
-
-    var i;
-
-    for (i = 0; i < stack.length; i += 1) {
-      if (stack[i] === obj) {
-        return replacementStack[i];
-      }
-    }
-
-    var canonicalizedObj;
-
-    if ('[object Array]' === objectPrototypeToString.call(obj)) {
-      stack.push(obj);
-      canonicalizedObj = new Array(obj.length);
-      replacementStack.push(canonicalizedObj);
-
-      for (i = 0; i < obj.length; i += 1) {
-        canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
-      }
-
-      stack.pop();
-      replacementStack.pop();
-      return canonicalizedObj;
-    }
-
-    if (obj && obj.toJSON) {
-      obj = obj.toJSON();
-    }
-
-    if (_typeof(obj) === 'object' && obj !== null) {
-      stack.push(obj);
-      canonicalizedObj = {};
-      replacementStack.push(canonicalizedObj);
-
-      var sortedKeys = [],
-          _key;
-
-      for (_key in obj) {
-        /* istanbul ignore else */
-        if (obj.hasOwnProperty(_key)) {
-          sortedKeys.push(_key);
-        }
-      }
-
-      sortedKeys.sort();
-
-      for (i = 0; i < sortedKeys.length; i += 1) {
-        _key = sortedKeys[i];
-        canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
-      }
-
-      stack.pop();
-      replacementStack.pop();
-    } else {
-      canonicalizedObj = obj;
-    }
-
-    return canonicalizedObj;
-  }
-
-  var arrayDiff = new Diff();
-
-  arrayDiff.tokenize = function (value) {
-    return value.slice();
-  };
-
-  arrayDiff.join = arrayDiff.removeEmpty = function (value) {
-    return value;
-  };
-
-  function diffArrays(oldArr, newArr, callback) {
-    return arrayDiff.diff(oldArr, newArr, callback);
-  }
-
-  function parsePatch(uniDiff) {
-    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-    var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/),
-        delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [],
-        list = [],
-        i = 0;
-
-    function parseIndex() {
-      var index = {};
-      list.push(index); // Parse diff metadata
-
-      while (i < diffstr.length) {
-        var line = diffstr[i]; // File header found, end parsing diff metadata
-
-        if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) {
-          break;
-        } // Diff index
-
-
-        var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
-
-        if (header) {
-          index.index = header[1];
-        }
-
-        i++;
-      } // Parse file headers if they are defined. Unified diff requires them, but
-      // there's no technical issues to have an isolated hunk without file header
-
-
-      parseFileHeader(index);
-      parseFileHeader(index); // Parse hunks
-
-      index.hunks = [];
-
-      while (i < diffstr.length) {
-        var _line = diffstr[i];
-
-        if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) {
-          break;
-        } else if (/^@@/.test(_line)) {
-          index.hunks.push(parseHunk());
-        } else if (_line && options.strict) {
-          // Ignore unexpected content unless in strict mode
-          throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));
-        } else {
-          i++;
-        }
-      }
-    } // Parses the --- and +++ headers, if none are found, no lines
-    // are consumed.
-
-
-    function parseFileHeader(index) {
-      var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]);
-
-      if (fileHeader) {
-        var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';
-        var data = fileHeader[2].split('\t', 2);
-        var fileName = data[0].replace(/\\\\/g, '\\');
-
-        if (/^".*"$/.test(fileName)) {
-          fileName = fileName.substr(1, fileName.length - 2);
-        }
-
-        index[keyPrefix + 'FileName'] = fileName;
-        index[keyPrefix + 'Header'] = (data[1] || '').trim();
-        i++;
-      }
-    } // Parses a hunk
-    // This assumes that we are at the start of a hunk.
-
-
-    function parseHunk() {
-      var chunkHeaderIndex = i,
-          chunkHeaderLine = diffstr[i++],
-          chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
-      var hunk = {
-        oldStart: +chunkHeader[1],
-        oldLines: +chunkHeader[2] || 1,
-        newStart: +chunkHeader[3],
-        newLines: +chunkHeader[4] || 1,
-        lines: [],
-        linedelimiters: []
-      };
-      var addCount = 0,
-          removeCount = 0;
-
-      for (; i < diffstr.length; i++) {
-        // Lines starting with '---' could be mistaken for the "remove line" operation
-        // But they could be the header for the next file. Therefore prune such cases out.
-        if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) {
-          break;
-        }
-
-        var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];
-
-        if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
-          hunk.lines.push(diffstr[i]);
-          hunk.linedelimiters.push(delimiters[i] || '\n');
-
-          if (operation === '+') {
-            addCount++;
-          } else if (operation === '-') {
-            removeCount++;
-          } else if (operation === ' ') {
-            addCount++;
-            removeCount++;
-          }
-        } else {
-          break;
-        }
-      } // Handle the empty block count case
-
-
-      if (!addCount && hunk.newLines === 1) {
-        hunk.newLines = 0;
-      }
-
-      if (!removeCount && hunk.oldLines === 1) {
-        hunk.oldLines = 0;
-      } // Perform optional sanity checking
-
-
-      if (options.strict) {
-        if (addCount !== hunk.newLines) {
-          throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
-        }
-
-        if (removeCount !== hunk.oldLines) {
-          throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
-        }
-      }
-
-      return hunk;
-    }
-
-    while (i < diffstr.length) {
-      parseIndex();
-    }
-
-    return list;
-  }
-
-  // Iterator that traverses in the range of [min, max], stepping
-  // by distance from a given start position. I.e. for [0, 4], with
-  // start of 2, this will iterate 2, 3, 1, 4, 0.
-  function distanceIterator (start, minLine, maxLine) {
-    var wantForward = true,
-        backwardExhausted = false,
-        forwardExhausted = false,
-        localOffset = 1;
-    return function iterator() {
-      if (wantForward && !forwardExhausted) {
-        if (backwardExhausted) {
-          localOffset++;
-        } else {
-          wantForward = false;
-        } // Check if trying to fit beyond text length, and if not, check it fits
-        // after offset location (or desired location on first iteration)
-
-
-        if (start + localOffset <= maxLine) {
-          return localOffset;
-        }
-
-        forwardExhausted = true;
-      }
-
-      if (!backwardExhausted) {
-        if (!forwardExhausted) {
-          wantForward = true;
-        } // Check if trying to fit before text beginning, and if not, check it fits
-        // before offset location
-
-
-        if (minLine <= start - localOffset) {
-          return -localOffset++;
-        }
-
-        backwardExhausted = true;
-        return iterator();
-      } // We tried to fit hunk before text beginning and beyond text length, then
-      // hunk can't fit on the text. Return undefined
-
-    };
-  }
-
-  function applyPatch(source, uniDiff) {
-    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-
-    if (typeof uniDiff === 'string') {
-      uniDiff = parsePatch(uniDiff);
-    }
-
-    if (Array.isArray(uniDiff)) {
-      if (uniDiff.length > 1) {
-        throw new Error('applyPatch only works with a single input.');
-      }
-
-      uniDiff = uniDiff[0];
-    } // Apply the diff to the input
-
-
-    var lines = source.split(/\r\n|[\n\v\f\r\x85]/),
-        delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [],
-        hunks = uniDiff.hunks,
-        compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) {
-      return line === patchContent;
-    },
-        errorCount = 0,
-        fuzzFactor = options.fuzzFactor || 0,
-        minLine = 0,
-        offset = 0,
-        removeEOFNL,
-        addEOFNL;
-    /**
-     * Checks if the hunk exactly fits on the provided location
-     */
-
-
-    function hunkFits(hunk, toPos) {
-      for (var j = 0; j < hunk.lines.length; j++) {
-        var line = hunk.lines[j],
-            operation = line.length > 0 ? line[0] : ' ',
-            content = line.length > 0 ? line.substr(1) : line;
-
-        if (operation === ' ' || operation === '-') {
-          // Context sanity check
-          if (!compareLine(toPos + 1, lines[toPos], operation, content)) {
-            errorCount++;
-
-            if (errorCount > fuzzFactor) {
-              return false;
-            }
-          }
-
-          toPos++;
-        }
-      }
-
-      return true;
-    } // Search best fit offsets for each hunk based on the previous ones
-
-
-    for (var i = 0; i < hunks.length; i++) {
-      var hunk = hunks[i],
-          maxLine = lines.length - hunk.oldLines,
-          localOffset = 0,
-          toPos = offset + hunk.oldStart - 1;
-      var iterator = distanceIterator(toPos, minLine, maxLine);
-
-      for (; localOffset !== undefined; localOffset = iterator()) {
-        if (hunkFits(hunk, toPos + localOffset)) {
-          hunk.offset = offset += localOffset;
-          break;
-        }
-      }
-
-      if (localOffset === undefined) {
-        return false;
-      } // Set lower text limit to end of the current hunk, so next ones don't try
-      // to fit over already patched text
-
-
-      minLine = hunk.offset + hunk.oldStart + hunk.oldLines;
-    } // Apply patch hunks
-
-
-    var diffOffset = 0;
-
-    for (var _i = 0; _i < hunks.length; _i++) {
-      var _hunk = hunks[_i],
-          _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;
-
-      diffOffset += _hunk.newLines - _hunk.oldLines;
-
-      if (_toPos < 0) {
-        // Creating a new file
-        _toPos = 0;
-      }
-
-      for (var j = 0; j < _hunk.lines.length; j++) {
-        var line = _hunk.lines[j],
-            operation = line.length > 0 ? line[0] : ' ',
-            content = line.length > 0 ? line.substr(1) : line,
-            delimiter = _hunk.linedelimiters[j];
-
-        if (operation === ' ') {
-          _toPos++;
-        } else if (operation === '-') {
-          lines.splice(_toPos, 1);
-          delimiters.splice(_toPos, 1);
-          /* istanbul ignore else */
-        } else if (operation === '+') {
-          lines.splice(_toPos, 0, content);
-          delimiters.splice(_toPos, 0, delimiter);
-          _toPos++;
-        } else if (operation === '\\') {
-          var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null;
-
-          if (previousOperation === '+') {
-            removeEOFNL = true;
-          } else if (previousOperation === '-') {
-            addEOFNL = true;
-          }
-        }
-      }
-    } // Handle EOFNL insertion/removal
-
-
-    if (removeEOFNL) {
-      while (!lines[lines.length - 1]) {
-        lines.pop();
-        delimiters.pop();
-      }
-    } else if (addEOFNL) {
-      lines.push('');
-      delimiters.push('\n');
-    }
-
-    for (var _k = 0; _k < lines.length - 1; _k++) {
-      lines[_k] = lines[_k] + delimiters[_k];
-    }
-
-    return lines.join('');
-  } // Wrapper that supports multiple file patches via callbacks.
-
-  function applyPatches(uniDiff, options) {
-    if (typeof uniDiff === 'string') {
-      uniDiff = parsePatch(uniDiff);
-    }
-
-    var currentIndex = 0;
-
-    function processIndex() {
-      var index = uniDiff[currentIndex++];
-
-      if (!index) {
-        return options.complete();
-      }
-
-      options.loadFile(index, function (err, data) {
-        if (err) {
-          return options.complete(err);
-        }
-
-        var updatedContent = applyPatch(data, index, options);
-        options.patched(index, updatedContent, function (err) {
-          if (err) {
-            return options.complete(err);
-          }
-
-          processIndex();
-        });
-      });
-    }
-
-    processIndex();
-  }
-
-  function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
-    if (!options) {
-      options = {};
-    }
-
-    if (typeof options.context === 'undefined') {
-      options.context = 4;
-    }
-
-    var diff = diffLines(oldStr, newStr, options);
-    diff.push({
-      value: '',
-      lines: []
-    }); // Append an empty value to make cleanup easier
-
-    function contextLines(lines) {
-      return lines.map(function (entry) {
-        return ' ' + entry;
-      });
-    }
-
-    var hunks = [];
-    var oldRangeStart = 0,
-        newRangeStart = 0,
-        curRange = [],
-        oldLine = 1,
-        newLine = 1;
-
-    var _loop = function _loop(i) {
-      var current = diff[i],
-          lines = current.lines || current.value.replace(/\n$/, '').split('\n');
-      current.lines = lines;
-
-      if (current.added || current.removed) {
-        var _curRange;
-
-        // If we have previous context, start with that
-        if (!oldRangeStart) {
-          var prev = diff[i - 1];
-          oldRangeStart = oldLine;
-          newRangeStart = newLine;
-
-          if (prev) {
-            curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
-            oldRangeStart -= curRange.length;
-            newRangeStart -= curRange.length;
-          }
-        } // Output our changes
-
-
-        (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) {
-          return (current.added ? '+' : '-') + entry;
-        }))); // Track the updated file position
-
-
-        if (current.added) {
-          newLine += lines.length;
-        } else {
-          oldLine += lines.length;
-        }
-      } else {
-        // Identical context lines. Track line changes
-        if (oldRangeStart) {
-          // Close out any changes that have been output (or join overlapping)
-          if (lines.length <= options.context * 2 && i < diff.length - 2) {
-            var _curRange2;
-
-            // Overlapping
-            (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));
-          } else {
-            var _curRange3;
-
-            // end the range and output
-            var contextSize = Math.min(lines.length, options.context);
-
-            (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));
-
-            var hunk = {
-              oldStart: oldRangeStart,
-              oldLines: oldLine - oldRangeStart + contextSize,
-              newStart: newRangeStart,
-              newLines: newLine - newRangeStart + contextSize,
-              lines: curRange
-            };
-
-            if (i >= diff.length - 2 && lines.length <= options.context) {
-              // EOF is inside this hunk
-              var oldEOFNewline = /\n$/.test(oldStr);
-              var newEOFNewline = /\n$/.test(newStr);
-              var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
-
-              if (!oldEOFNewline && noNlBeforeAdds) {
-                // special case: old has no eol and no trailing context; no-nl can end up before adds
-                curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file');
-              }
-
-              if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
-                curRange.push('\\ No newline at end of file');
-              }
-            }
-
-            hunks.push(hunk);
-            oldRangeStart = 0;
-            newRangeStart = 0;
-            curRange = [];
-          }
-        }
-
-        oldLine += lines.length;
-        newLine += lines.length;
-      }
-    };
-
-    for (var i = 0; i < diff.length; i++) {
-      _loop(i);
-    }
-
-    return {
-      oldFileName: oldFileName,
-      newFileName: newFileName,
-      oldHeader: oldHeader,
-      newHeader: newHeader,
-      hunks: hunks
-    };
-  }
-  function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
-    var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
-    var ret = [];
-
-    if (oldFileName == newFileName) {
-      ret.push('Index: ' + oldFileName);
-    }
-
-    ret.push('===================================================================');
-    ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader));
-    ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
-
-    for (var i = 0; i < diff.hunks.length; i++) {
-      var hunk = diff.hunks[i];
-      ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
-      ret.push.apply(ret, hunk.lines);
-    }
-
-    return ret.join('\n') + '\n';
-  }
-  function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
-    return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
-  }
-
-  function arrayEqual(a, b) {
-    if (a.length !== b.length) {
-      return false;
-    }
-
-    return arrayStartsWith(a, b);
-  }
-  function arrayStartsWith(array, start) {
-    if (start.length > array.length) {
-      return false;
-    }
-
-    for (var i = 0; i < start.length; i++) {
-      if (start[i] !== array[i]) {
-        return false;
-      }
-    }
-
-    return true;
-  }
-
-  function calcLineCount(hunk) {
-    var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines),
-        oldLines = _calcOldNewLineCount.oldLines,
-        newLines = _calcOldNewLineCount.newLines;
-
-    if (oldLines !== undefined) {
-      hunk.oldLines = oldLines;
-    } else {
-      delete hunk.oldLines;
-    }
-
-    if (newLines !== undefined) {
-      hunk.newLines = newLines;
-    } else {
-      delete hunk.newLines;
-    }
-  }
-  function merge(mine, theirs, base) {
-    mine = loadPatch(mine, base);
-    theirs = loadPatch(theirs, base);
-    var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning.
-    // Leaving sanity checks on this to the API consumer that may know more about the
-    // meaning in their own context.
-
-    if (mine.index || theirs.index) {
-      ret.index = mine.index || theirs.index;
-    }
-
-    if (mine.newFileName || theirs.newFileName) {
-      if (!fileNameChanged(mine)) {
-        // No header or no change in ours, use theirs (and ours if theirs does not exist)
-        ret.oldFileName = theirs.oldFileName || mine.oldFileName;
-        ret.newFileName = theirs.newFileName || mine.newFileName;
-        ret.oldHeader = theirs.oldHeader || mine.oldHeader;
-        ret.newHeader = theirs.newHeader || mine.newHeader;
-      } else if (!fileNameChanged(theirs)) {
-        // No header or no change in theirs, use ours
-        ret.oldFileName = mine.oldFileName;
-        ret.newFileName = mine.newFileName;
-        ret.oldHeader = mine.oldHeader;
-        ret.newHeader = mine.newHeader;
-      } else {
-        // Both changed... figure it out
-        ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);
-        ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);
-        ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);
-        ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);
-      }
-    }
-
-    ret.hunks = [];
-    var mineIndex = 0,
-        theirsIndex = 0,
-        mineOffset = 0,
-        theirsOffset = 0;
-
-    while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {
-      var mineCurrent = mine.hunks[mineIndex] || {
-        oldStart: Infinity
-      },
-          theirsCurrent = theirs.hunks[theirsIndex] || {
-        oldStart: Infinity
-      };
-
-      if (hunkBefore(mineCurrent, theirsCurrent)) {
-        // This patch does not overlap with any of the others, yay.
-        ret.hunks.push(cloneHunk(mineCurrent, mineOffset));
-        mineIndex++;
-        theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;
-      } else if (hunkBefore(theirsCurrent, mineCurrent)) {
-        // This patch does not overlap with any of the others, yay.
-        ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));
-        theirsIndex++;
-        mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;
-      } else {
-        // Overlap, merge as best we can
-        var mergedHunk = {
-          oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),
-          oldLines: 0,
-          newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),
-          newLines: 0,
-          lines: []
-        };
-        mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);
-        theirsIndex++;
-        mineIndex++;
-        ret.hunks.push(mergedHunk);
-      }
-    }
-
-    return ret;
-  }
-
-  function loadPatch(param, base) {
-    if (typeof param === 'string') {
-      if (/^@@/m.test(param) || /^Index:/m.test(param)) {
-        return parsePatch(param)[0];
-      }
-
-      if (!base) {
-        throw new Error('Must provide a base reference or pass in a patch');
-      }
-
-      return structuredPatch(undefined, undefined, base, param);
-    }
-
-    return param;
-  }
-
-  function fileNameChanged(patch) {
-    return patch.newFileName && patch.newFileName !== patch.oldFileName;
-  }
-
-  function selectField(index, mine, theirs) {
-    if (mine === theirs) {
-      return mine;
-    } else {
-      index.conflict = true;
-      return {
-        mine: mine,
-        theirs: theirs
-      };
-    }
-  }
-
-  function hunkBefore(test, check) {
-    return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;
-  }
-
-  function cloneHunk(hunk, offset) {
-    return {
-      oldStart: hunk.oldStart,
-      oldLines: hunk.oldLines,
-      newStart: hunk.newStart + offset,
-      newLines: hunk.newLines,
-      lines: hunk.lines
-    };
-  }
-
-  function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {
-    // This will generally result in a conflicted hunk, but there are cases where the context
-    // is the only overlap where we can successfully merge the content here.
-    var mine = {
-      offset: mineOffset,
-      lines: mineLines,
-      index: 0
-    },
-        their = {
-      offset: theirOffset,
-      lines: theirLines,
-      index: 0
-    }; // Handle any leading content
-
-    insertLeading(hunk, mine, their);
-    insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each.
-
-    while (mine.index < mine.lines.length && their.index < their.lines.length) {
-      var mineCurrent = mine.lines[mine.index],
-          theirCurrent = their.lines[their.index];
-
-      if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {
-        // Both modified ...
-        mutualChange(hunk, mine, their);
-      } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {
-        var _hunk$lines;
-
-        // Mine inserted
-        (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine)));
-      } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {
-        var _hunk$lines2;
-
-        // Theirs inserted
-        (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their)));
-      } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {
-        // Mine removed or edited
-        removal(hunk, mine, their);
-      } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {
-        // Their removed or edited
-        removal(hunk, their, mine, true);
-      } else if (mineCurrent === theirCurrent) {
-        // Context identity
-        hunk.lines.push(mineCurrent);
-        mine.index++;
-        their.index++;
-      } else {
-        // Context mismatch
-        conflict(hunk, collectChange(mine), collectChange(their));
-      }
-    } // Now push anything that may be remaining
-
-
-    insertTrailing(hunk, mine);
-    insertTrailing(hunk, their);
-    calcLineCount(hunk);
-  }
-
-  function mutualChange(hunk, mine, their) {
-    var myChanges = collectChange(mine),
-        theirChanges = collectChange(their);
-
-    if (allRemoves(myChanges) && allRemoves(theirChanges)) {
-      // Special case for remove changes that are supersets of one another
-      if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {
-        var _hunk$lines3;
-
-        (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges));
-
-        return;
-      } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {
-        var _hunk$lines4;
-
-        (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges));
-
-        return;
-      }
-    } else if (arrayEqual(myChanges, theirChanges)) {
-      var _hunk$lines5;
-
-      (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges));
-
-      return;
-    }
-
-    conflict(hunk, myChanges, theirChanges);
-  }
-
-  function removal(hunk, mine, their, swap) {
-    var myChanges = collectChange(mine),
-        theirChanges = collectContext(their, myChanges);
-
-    if (theirChanges.merged) {
-      var _hunk$lines6;
-
-      (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged));
-    } else {
-      conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);
-    }
-  }
-
-  function conflict(hunk, mine, their) {
-    hunk.conflict = true;
-    hunk.lines.push({
-      conflict: true,
-      mine: mine,
-      theirs: their
-    });
-  }
-
-  function insertLeading(hunk, insert, their) {
-    while (insert.offset < their.offset && insert.index < insert.lines.length) {
-      var line = insert.lines[insert.index++];
-      hunk.lines.push(line);
-      insert.offset++;
-    }
-  }
-
-  function insertTrailing(hunk, insert) {
-    while (insert.index < insert.lines.length) {
-      var line = insert.lines[insert.index++];
-      hunk.lines.push(line);
-    }
-  }
-
-  function collectChange(state) {
-    var ret = [],
-        operation = state.lines[state.index][0];
-
-    while (state.index < state.lines.length) {
-      var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change.
-
-      if (operation === '-' && line[0] === '+') {
-        operation = '+';
-      }
-
-      if (operation === line[0]) {
-        ret.push(line);
-        state.index++;
-      } else {
-        break;
-      }
-    }
-
-    return ret;
-  }
-
-  function collectContext(state, matchChanges) {
-    var changes = [],
-        merged = [],
-        matchIndex = 0,
-        contextChanges = false,
-        conflicted = false;
-
-    while (matchIndex < matchChanges.length && state.index < state.lines.length) {
-      var change = state.lines[state.index],
-          match = matchChanges[matchIndex]; // Once we've hit our add, then we are done
-
-      if (match[0] === '+') {
-        break;
-      }
-
-      contextChanges = contextChanges || change[0] !== ' ';
-      merged.push(match);
-      matchIndex++; // Consume any additions in the other block as a conflict to attempt
-      // to pull in the remaining context after this
-
-      if (change[0] === '+') {
-        conflicted = true;
-
-        while (change[0] === '+') {
-          changes.push(change);
-          change = state.lines[++state.index];
-        }
-      }
-
-      if (match.substr(1) === change.substr(1)) {
-        changes.push(change);
-        state.index++;
-      } else {
-        conflicted = true;
-      }
-    }
-
-    if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {
-      conflicted = true;
-    }
-
-    if (conflicted) {
-      return changes;
-    }
-
-    while (matchIndex < matchChanges.length) {
-      merged.push(matchChanges[matchIndex++]);
-    }
-
-    return {
-      merged: merged,
-      changes: changes
-    };
-  }
-
-  function allRemoves(changes) {
-    return changes.reduce(function (prev, change) {
-      return prev && change[0] === '-';
-    }, true);
-  }
-
-  function skipRemoveSuperset(state, removeChanges, delta) {
-    for (var i = 0; i < delta; i++) {
-      var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);
-
-      if (state.lines[state.index + i] !== ' ' + changeContent) {
-        return false;
-      }
-    }
-
-    state.index += delta;
-    return true;
-  }
-
-  function calcOldNewLineCount(lines) {
-    var oldLines = 0;
-    var newLines = 0;
-    lines.forEach(function (line) {
-      if (typeof line !== 'string') {
-        var myCount = calcOldNewLineCount(line.mine);
-        var theirCount = calcOldNewLineCount(line.theirs);
-
-        if (oldLines !== undefined) {
-          if (myCount.oldLines === theirCount.oldLines) {
-            oldLines += myCount.oldLines;
-          } else {
-            oldLines = undefined;
-          }
-        }
-
-        if (newLines !== undefined) {
-          if (myCount.newLines === theirCount.newLines) {
-            newLines += myCount.newLines;
-          } else {
-            newLines = undefined;
-          }
-        }
-      } else {
-        if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {
-          newLines++;
-        }
-
-        if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {
-          oldLines++;
-        }
-      }
-    });
-    return {
-      oldLines: oldLines,
-      newLines: newLines
-    };
-  }
-
-  // See: http://code.google.com/p/google-diff-match-patch/wiki/API
-  function convertChangesToDMP(changes) {
-    var ret = [],
-        change,
-        operation;
-
-    for (var i = 0; i < changes.length; i++) {
-      change = changes[i];
-
-      if (change.added) {
-        operation = 1;
-      } else if (change.removed) {
-        operation = -1;
-      } else {
-        operation = 0;
-      }
-
-      ret.push([operation, change.value]);
-    }
-
-    return ret;
-  }
-
-  function convertChangesToXML(changes) {
-    var ret = [];
-
-    for (var i = 0; i < changes.length; i++) {
-      var change = changes[i];
-
-      if (change.added) {
-        ret.push('');
-      } else if (change.removed) {
-        ret.push('');
-      }
-
-      ret.push(escapeHTML(change.value));
-
-      if (change.added) {
-        ret.push('');
-      } else if (change.removed) {
-        ret.push('');
-      }
-    }
-
-    return ret.join('');
-  }
-
-  function escapeHTML(s) {
-    var n = s;
-    n = n.replace(/&/g, '&');
-    n = n.replace(//g, '>');
-    n = n.replace(/"/g, '"');
-    return n;
-  }
-
-  /* See LICENSE file for terms of use */
-
-  exports.Diff = Diff;
-  exports.diffChars = diffChars;
-  exports.diffWords = diffWords;
-  exports.diffWordsWithSpace = diffWordsWithSpace;
-  exports.diffLines = diffLines;
-  exports.diffTrimmedLines = diffTrimmedLines;
-  exports.diffSentences = diffSentences;
-  exports.diffCss = diffCss;
-  exports.diffJson = diffJson;
-  exports.diffArrays = diffArrays;
-  exports.structuredPatch = structuredPatch;
-  exports.createTwoFilesPatch = createTwoFilesPatch;
-  exports.createPatch = createPatch;
-  exports.applyPatch = applyPatch;
-  exports.applyPatches = applyPatches;
-  exports.parsePatch = parsePatch;
-  exports.merge = merge;
-  exports.convertChangesToDMP = convertChangesToDMP;
-  exports.convertChangesToXML = convertChangesToXML;
-  exports.canonicalize = canonicalize;
-
-  Object.defineProperty(exports, '__esModule', { value: true });
-
-}));
diff --git a/node_modules/diff/dist/diff.min.js b/node_modules/diff/dist/diff.min.js
deleted file mode 100644
index 976ad93..0000000
--- a/node_modules/diff/dist/diff.min.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/*!
-
- diff v4.0.1
-
-Software License Agreement (BSD License)
-
-Copyright (c) 2009-2015, Kevin Decker 
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above
-  copyright notice, this list of conditions and the
-  following disclaimer.
-
-* Redistributions in binary form must reproduce the above
-  copyright notice, this list of conditions and the
-  following disclaimer in the documentation and/or other
-  materials provided with the distribution.
-
-* Neither the name of Kevin Decker nor the names of its
-  contributors may be used to endorse or promote products
-  derived from this software without specific prior
-  written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@license
-*/
-!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).Diff={})}(this,function(e){"use strict";function t(){}function g(e,n,t,r,i){for(var o=0,s=n.length,l=0,a=0;oe.length?t:e}),u.value=e.join(d)}else u.value=e.join(t.slice(l,l+u.count));l+=u.count,u.added||(a+=u.count)}}var c=n[s-1];return 1=c&&h<=r+1)return d([{value:this.join(u),count:u.length}]);function i(){for(var e=-1*p;e<=p;e+=2){var n=void 0,t=v[e-1],r=v[e+1],i=(r?r.newPos:0)-e;t&&(v[e-1]=void 0);var o=t&&t.newPos+1=c&&h<=i+1)return d(g(f,n.components,u,a,f.useLongestToken));v[e]=n}else v[e]=void 0}var l;p++}if(n)!function e(){setTimeout(function(){if(t=v.length-2&&t.length<=p.context){var u=/\n$/.test(c),f=/\n$/.test(h),d=0==t.length&&x.length>a.oldLines;!u&&d&&x.splice(a.oldLines,0,"\\ No newline at end of file"),(u||d)&&f||x.push("\\ No newline at end of file")}m.push(a),y=w=0,x=[]}L+=t.length,S+=t.length}},o=0;oe.length)return!1;for(var t=0;t"):r.removed&&n.push(""),n.push((i=r.value,void 0,i.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))),r.added?n.push(""):r.removed&&n.push("")}var i;return n.join("")},e.canonicalize=v,Object.defineProperty(e,"__esModule",{value:!0})});
\ No newline at end of file
diff --git a/node_modules/diff/lib/convert/dmp.js b/node_modules/diff/lib/convert/dmp.js
deleted file mode 100644
index 91ff40a..0000000
--- a/node_modules/diff/lib/convert/dmp.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.convertChangesToDMP = convertChangesToDMP;
-
-/*istanbul ignore end*/
-// See: http://code.google.com/p/google-diff-match-patch/wiki/API
-function convertChangesToDMP(changes) {
-  var ret = [],
-      change,
-      operation;
-
-  for (var i = 0; i < changes.length; i++) {
-    change = changes[i];
-
-    if (change.added) {
-      operation = 1;
-    } else if (change.removed) {
-      operation = -1;
-    } else {
-      operation = 0;
-    }
-
-    ret.push([operation, change.value]);
-  }
-
-  return ret;
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0L2RtcC5qcyJdLCJuYW1lcyI6WyJjb252ZXJ0Q2hhbmdlc1RvRE1QIiwiY2hhbmdlcyIsInJldCIsImNoYW5nZSIsIm9wZXJhdGlvbiIsImkiLCJsZW5ndGgiLCJhZGRlZCIsInJlbW92ZWQiLCJwdXNoIiwidmFsdWUiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBO0FBQ08sU0FBU0EsbUJBQVQsQ0FBNkJDLE9BQTdCLEVBQXNDO0FBQzNDLE1BQUlDLEdBQUcsR0FBRyxFQUFWO0FBQUEsTUFDSUMsTUFESjtBQUFBLE1BRUlDLFNBRko7O0FBR0EsT0FBSyxJQUFJQyxDQUFDLEdBQUcsQ0FBYixFQUFnQkEsQ0FBQyxHQUFHSixPQUFPLENBQUNLLE1BQTVCLEVBQW9DRCxDQUFDLEVBQXJDLEVBQXlDO0FBQ3ZDRixJQUFBQSxNQUFNLEdBQUdGLE9BQU8sQ0FBQ0ksQ0FBRCxDQUFoQjs7QUFDQSxRQUFJRixNQUFNLENBQUNJLEtBQVgsRUFBa0I7QUFDaEJILE1BQUFBLFNBQVMsR0FBRyxDQUFaO0FBQ0QsS0FGRCxNQUVPLElBQUlELE1BQU0sQ0FBQ0ssT0FBWCxFQUFvQjtBQUN6QkosTUFBQUEsU0FBUyxHQUFHLENBQUMsQ0FBYjtBQUNELEtBRk0sTUFFQTtBQUNMQSxNQUFBQSxTQUFTLEdBQUcsQ0FBWjtBQUNEOztBQUVERixJQUFBQSxHQUFHLENBQUNPLElBQUosQ0FBUyxDQUFDTCxTQUFELEVBQVlELE1BQU0sQ0FBQ08sS0FBbkIsQ0FBVDtBQUNEOztBQUNELFNBQU9SLEdBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbIi8vIFNlZTogaHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL2dvb2dsZS1kaWZmLW1hdGNoLXBhdGNoL3dpa2kvQVBJXG5leHBvcnQgZnVuY3Rpb24gY29udmVydENoYW5nZXNUb0RNUChjaGFuZ2VzKSB7XG4gIGxldCByZXQgPSBbXSxcbiAgICAgIGNoYW5nZSxcbiAgICAgIG9wZXJhdGlvbjtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBjaGFuZ2VzLmxlbmd0aDsgaSsrKSB7XG4gICAgY2hhbmdlID0gY2hhbmdlc1tpXTtcbiAgICBpZiAoY2hhbmdlLmFkZGVkKSB7XG4gICAgICBvcGVyYXRpb24gPSAxO1xuICAgIH0gZWxzZSBpZiAoY2hhbmdlLnJlbW92ZWQpIHtcbiAgICAgIG9wZXJhdGlvbiA9IC0xO1xuICAgIH0gZWxzZSB7XG4gICAgICBvcGVyYXRpb24gPSAwO1xuICAgIH1cblxuICAgIHJldC5wdXNoKFtvcGVyYXRpb24sIGNoYW5nZS52YWx1ZV0pO1xuICB9XG4gIHJldHVybiByZXQ7XG59XG4iXX0=
diff --git a/node_modules/diff/lib/convert/xml.js b/node_modules/diff/lib/convert/xml.js
deleted file mode 100644
index 69ec60c..0000000
--- a/node_modules/diff/lib/convert/xml.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.convertChangesToXML = convertChangesToXML;
-
-/*istanbul ignore end*/
-function convertChangesToXML(changes) {
-  var ret = [];
-
-  for (var i = 0; i < changes.length; i++) {
-    var change = changes[i];
-
-    if (change.added) {
-      ret.push('');
-    } else if (change.removed) {
-      ret.push('');
-    }
-
-    ret.push(escapeHTML(change.value));
-
-    if (change.added) {
-      ret.push('');
-    } else if (change.removed) {
-      ret.push('');
-    }
-  }
-
-  return ret.join('');
-}
-
-function escapeHTML(s) {
-  var n = s;
-  n = n.replace(/&/g, '&');
-  n = n.replace(//g, '>');
-  n = n.replace(/"/g, '"');
-  return n;
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0L3htbC5qcyJdLCJuYW1lcyI6WyJjb252ZXJ0Q2hhbmdlc1RvWE1MIiwiY2hhbmdlcyIsInJldCIsImkiLCJsZW5ndGgiLCJjaGFuZ2UiLCJhZGRlZCIsInB1c2giLCJyZW1vdmVkIiwiZXNjYXBlSFRNTCIsInZhbHVlIiwiam9pbiIsInMiLCJuIiwicmVwbGFjZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQU8sU0FBU0EsbUJBQVQsQ0FBNkJDLE9BQTdCLEVBQXNDO0FBQzNDLE1BQUlDLEdBQUcsR0FBRyxFQUFWOztBQUNBLE9BQUssSUFBSUMsQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR0YsT0FBTyxDQUFDRyxNQUE1QixFQUFvQ0QsQ0FBQyxFQUFyQyxFQUF5QztBQUN2QyxRQUFJRSxNQUFNLEdBQUdKLE9BQU8sQ0FBQ0UsQ0FBRCxDQUFwQjs7QUFDQSxRQUFJRSxNQUFNLENBQUNDLEtBQVgsRUFBa0I7QUFDaEJKLE1BQUFBLEdBQUcsQ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oYW5nZXNUb1hNTChjaGFuZ2VzKSB7XG4gIGxldCByZXQgPSBbXTtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBjaGFuZ2VzLmxlbmd0aDsgaSsrKSB7XG4gICAgbGV0IGNoYW5nZSA9IGNoYW5nZXNbaV07XG4gICAgaWYgKGNoYW5nZS5hZGRlZCkge1xuICAgICAgcmV0LnB1c2goJzxpbnM+Jyk7XG4gICAgfSBlbHNlIGlmIChjaGFuZ2UucmVtb3ZlZCkge1xuICAgICAgcmV0LnB1c2goJzxkZWw+Jyk7XG4gICAgfVxuXG4gICAgcmV0LnB1c2goZXNjYXBlSFRNTChjaGFuZ2UudmFsdWUpKTtcblxuICAgIGlmIChjaGFuZ2UuYWRkZWQpIHtcbiAgICAgIHJldC5wdXNoKCc8L2lucz4nKTtcbiAgICB9IGVsc2UgaWYgKGNoYW5nZS5yZW1vdmVkKSB7XG4gICAgICByZXQucHVzaCgnPC9kZWw+Jyk7XG4gICAgfVxuICB9XG4gIHJldHVybiByZXQuam9pbignJyk7XG59XG5cbmZ1bmN0aW9uIGVzY2FwZUhUTUwocykge1xuICBsZXQgbiA9IHM7XG4gIG4gPSBuLnJlcGxhY2UoLyYvZywgJyZhbXA7Jyk7XG4gIG4gPSBuLnJlcGxhY2UoLzwvZywgJyZsdDsnKTtcbiAgbiA9IG4ucmVwbGFjZSgvPi9nLCAnJmd0OycpO1xuICBuID0gbi5yZXBsYWNlKC9cIi9nLCAnJnF1b3Q7Jyk7XG5cbiAgcmV0dXJuIG47XG59XG4iXX0=
diff --git a/node_modules/diff/lib/diff/array.js b/node_modules/diff/lib/diff/array.js
deleted file mode 100644
index 81f42ea..0000000
--- a/node_modules/diff/lib/diff/array.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.diffArrays = diffArrays;
-exports.arrayDiff = void 0;
-
-/*istanbul ignore end*/
-var
-/*istanbul ignore start*/
-_base = _interopRequireDefault(require("./base"))
-/*istanbul ignore end*/
-;
-
-/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/*istanbul ignore end*/
-var arrayDiff = new
-/*istanbul ignore start*/
-_base
-/*istanbul ignore end*/
-.
-/*istanbul ignore start*/
-default
-/*istanbul ignore end*/
-();
-
-/*istanbul ignore start*/
-exports.arrayDiff = arrayDiff;
-
-/*istanbul ignore end*/
-arrayDiff.tokenize = function (value) {
-  return value.slice();
-};
-
-arrayDiff.join = arrayDiff.removeEmpty = function (value) {
-  return value;
-};
-
-function diffArrays(oldArr, newArr, callback) {
-  return arrayDiff.diff(oldArr, newArr, callback);
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2FycmF5LmpzIl0sIm5hbWVzIjpbImFycmF5RGlmZiIsIkRpZmYiLCJ0b2tlbml6ZSIsInZhbHVlIiwic2xpY2UiLCJqb2luIiwicmVtb3ZlRW1wdHkiLCJkaWZmQXJyYXlzIiwib2xkQXJyIiwibmV3QXJyIiwiY2FsbGJhY2siLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxTQUFTLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQWxCOzs7Ozs7QUFDUEQsU0FBUyxDQUFDRSxRQUFWLEdBQXFCLFVBQVNDLEtBQVQsRUFBZ0I7QUFDbkMsU0FBT0EsS0FBSyxDQUFDQyxLQUFOLEVBQVA7QUFDRCxDQUZEOztBQUdBSixTQUFTLENBQUNLLElBQVYsR0FBaUJMLFNBQVMsQ0FBQ00sV0FBVixHQUF3QixVQUFTSCxLQUFULEVBQWdCO0FBQ3ZELFNBQU9BLEtBQVA7QUFDRCxDQUZEOztBQUlPLFNBQVNJLFVBQVQsQ0FBb0JDLE1BQXBCLEVBQTRCQyxNQUE1QixFQUFvQ0MsUUFBcEMsRUFBOEM7QUFBRSxTQUFPVixTQUFTLENBQUNXLElBQVYsQ0FBZUgsTUFBZixFQUF1QkMsTUFBdkIsRUFBK0JDLFFBQS9CLENBQVA7QUFBa0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRGlmZiBmcm9tICcuL2Jhc2UnO1xuXG5leHBvcnQgY29uc3QgYXJyYXlEaWZmID0gbmV3IERpZmYoKTtcbmFycmF5RGlmZi50b2tlbml6ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIHJldHVybiB2YWx1ZS5zbGljZSgpO1xufTtcbmFycmF5RGlmZi5qb2luID0gYXJyYXlEaWZmLnJlbW92ZUVtcHR5ID0gZnVuY3Rpb24odmFsdWUpIHtcbiAgcmV0dXJuIHZhbHVlO1xufTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZBcnJheXMob2xkQXJyLCBuZXdBcnIsIGNhbGxiYWNrKSB7IHJldHVybiBhcnJheURpZmYuZGlmZihvbGRBcnIsIG5ld0FyciwgY2FsbGJhY2spOyB9XG4iXX0=
diff --git a/node_modules/diff/lib/diff/base.js b/node_modules/diff/lib/diff/base.js
deleted file mode 100644
index ea661fe..0000000
--- a/node_modules/diff/lib/diff/base.js
+++ /dev/null
@@ -1,304 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.default = Diff;
-
-/*istanbul ignore end*/
-function Diff() {}
-
-Diff.prototype = {
-  /*istanbul ignore start*/
-
-  /*istanbul ignore end*/
-  diff: function diff(oldString, newString) {
-    /*istanbul ignore start*/
-    var
-    /*istanbul ignore end*/
-    options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-    var callback = options.callback;
-
-    if (typeof options === 'function') {
-      callback = options;
-      options = {};
-    }
-
-    this.options = options;
-    var self = this;
-
-    function done(value) {
-      if (callback) {
-        setTimeout(function () {
-          callback(undefined, value);
-        }, 0);
-        return true;
-      } else {
-        return value;
-      }
-    } // Allow subclasses to massage the input prior to running
-
-
-    oldString = this.castInput(oldString);
-    newString = this.castInput(newString);
-    oldString = this.removeEmpty(this.tokenize(oldString));
-    newString = this.removeEmpty(this.tokenize(newString));
-    var newLen = newString.length,
-        oldLen = oldString.length;
-    var editLength = 1;
-    var maxEditLength = newLen + oldLen;
-    var bestPath = [{
-      newPos: -1,
-      components: []
-    }]; // Seed editLength = 0, i.e. the content starts with the same values
-
-    var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
-
-    if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
-      // Identity per the equality and tokenizer
-      return done([{
-        value: this.join(newString),
-        count: newString.length
-      }]);
-    } // Main worker method. checks all permutations of a given edit length for acceptance.
-
-
-    function execEditLength() {
-      for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
-        var basePath =
-        /*istanbul ignore start*/
-        void 0
-        /*istanbul ignore end*/
-        ;
-
-        var addPath = bestPath[diagonalPath - 1],
-            removePath = bestPath[diagonalPath + 1],
-            _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
-
-        if (addPath) {
-          // No one else is going to attempt to use this value, clear it
-          bestPath[diagonalPath - 1] = undefined;
-        }
-
-        var canAdd = addPath && addPath.newPos + 1 < newLen,
-            canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
-
-        if (!canAdd && !canRemove) {
-          // If this path is a terminal then prune
-          bestPath[diagonalPath] = undefined;
-          continue;
-        } // Select the diagonal that we want to branch from. We select the prior
-        // path whose position in the new string is the farthest from the origin
-        // and does not pass the bounds of the diff graph
-
-
-        if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
-          basePath = clonePath(removePath);
-          self.pushComponent(basePath.components, undefined, true);
-        } else {
-          basePath = addPath; // No need to clone, we've pulled it from the list
-
-          basePath.newPos++;
-          self.pushComponent(basePath.components, true, undefined);
-        }
-
-        _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done
-
-        if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
-          return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
-        } else {
-          // Otherwise track this path as a potential candidate and continue.
-          bestPath[diagonalPath] = basePath;
-        }
-      }
-
-      editLength++;
-    } // Performs the length of edit iteration. Is a bit fugly as this has to support the
-    // sync and async mode which is never fun. Loops over execEditLength until a value
-    // is produced.
-
-
-    if (callback) {
-      (function exec() {
-        setTimeout(function () {
-          // This should not happen, but we want to be safe.
-
-          /* istanbul ignore next */
-          if (editLength > maxEditLength) {
-            return callback();
-          }
-
-          if (!execEditLength()) {
-            exec();
-          }
-        }, 0);
-      })();
-    } else {
-      while (editLength <= maxEditLength) {
-        var ret = execEditLength();
-
-        if (ret) {
-          return ret;
-        }
-      }
-    }
-  },
-
-  /*istanbul ignore start*/
-
-  /*istanbul ignore end*/
-  pushComponent: function pushComponent(components, added, removed) {
-    var last = components[components.length - 1];
-
-    if (last && last.added === added && last.removed === removed) {
-      // We need to clone here as the component clone operation is just
-      // as shallow array clone
-      components[components.length - 1] = {
-        count: last.count + 1,
-        added: added,
-        removed: removed
-      };
-    } else {
-      components.push({
-        count: 1,
-        added: added,
-        removed: removed
-      });
-    }
-  },
-
-  /*istanbul ignore start*/
-
-  /*istanbul ignore end*/
-  extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
-    var newLen = newString.length,
-        oldLen = oldString.length,
-        newPos = basePath.newPos,
-        oldPos = newPos - diagonalPath,
-        commonCount = 0;
-
-    while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
-      newPos++;
-      oldPos++;
-      commonCount++;
-    }
-
-    if (commonCount) {
-      basePath.components.push({
-        count: commonCount
-      });
-    }
-
-    basePath.newPos = newPos;
-    return oldPos;
-  },
-
-  /*istanbul ignore start*/
-
-  /*istanbul ignore end*/
-  equals: function equals(left, right) {
-    if (this.options.comparator) {
-      return this.options.comparator(left, right);
-    } else {
-      return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
-    }
-  },
-
-  /*istanbul ignore start*/
-
-  /*istanbul ignore end*/
-  removeEmpty: function removeEmpty(array) {
-    var ret = [];
-
-    for (var i = 0; i < array.length; i++) {
-      if (array[i]) {
-        ret.push(array[i]);
-      }
-    }
-
-    return ret;
-  },
-
-  /*istanbul ignore start*/
-
-  /*istanbul ignore end*/
-  castInput: function castInput(value) {
-    return value;
-  },
-
-  /*istanbul ignore start*/
-
-  /*istanbul ignore end*/
-  tokenize: function tokenize(value) {
-    return value.split('');
-  },
-
-  /*istanbul ignore start*/
-
-  /*istanbul ignore end*/
-  join: function join(chars) {
-    return chars.join('');
-  }
-};
-
-function buildValues(diff, components, newString, oldString, useLongestToken) {
-  var componentPos = 0,
-      componentLen = components.length,
-      newPos = 0,
-      oldPos = 0;
-
-  for (; componentPos < componentLen; componentPos++) {
-    var component = components[componentPos];
-
-    if (!component.removed) {
-      if (!component.added && useLongestToken) {
-        var value = newString.slice(newPos, newPos + component.count);
-        value = value.map(function (value, i) {
-          var oldValue = oldString[oldPos + i];
-          return oldValue.length > value.length ? oldValue : value;
-        });
-        component.value = diff.join(value);
-      } else {
-        component.value = diff.join(newString.slice(newPos, newPos + component.count));
-      }
-
-      newPos += component.count; // Common case
-
-      if (!component.added) {
-        oldPos += component.count;
-      }
-    } else {
-      component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
-      oldPos += component.count; // Reverse add and remove so removes are output first to match common convention
-      // The diffing algorithm is tied to add then remove output and this is the simplest
-      // route to get the desired output with minimal overhead.
-
-      if (componentPos && components[componentPos - 1].added) {
-        var tmp = components[componentPos - 1];
-        components[componentPos - 1] = components[componentPos];
-        components[componentPos] = tmp;
-      }
-    }
-  } // Special case handle for when one terminal is ignored (i.e. whitespace).
-  // For this case we merge the terminal into the prior string and drop the change.
-  // This is only available for string mode.
-
-
-  var lastComponent = components[componentLen - 1];
-
-  if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
-    components[componentLen - 2].value += lastComponent.value;
-    components.pop();
-  }
-
-  return components;
-}
-
-function clonePath(path) {
-  return {
-    newPos: path.newPos,
-    components: path.components.slice(0)
-  };
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2Jhc2UuanMiXSwibmFtZXMiOlsiRGlmZiIsInByb3RvdHlwZSIsImRpZmYiLCJvbGRTdHJpbmciLCJuZXdTdHJpbmciLCJvcHRpb25zIiwiY2FsbGJhY2siLCJzZWxmIiwiZG9uZSIsInZhbHVlIiwic2V0VGltZW91dCIsInVuZGVmaW5lZCIsImNhc3RJbnB1dCIsInJlbW92ZUVtcHR5IiwidG9rZW5pemUiLCJuZXdMZW4iLCJsZW5ndGgiLCJvbGRMZW4iLCJlZGl0TGVuZ3RoIiwibWF4RWRpdExlbmd0aCIsImJlc3RQYXRoIiwibmV3UG9zIiwiY29tcG9uZW50cyIsIm9sZFBvcyIsImV4dHJhY3RDb21tb24iLCJqb2luIiwiY291bnQiLCJleGVjRWRpdExlbmd0aCIsImRpYWdvbmFsUGF0aCIsImJhc2VQYXRoIiwiYWRkUGF0aCIsInJlbW92ZVBhdGgiLCJjYW5BZGQiLCJjYW5SZW1vdmUiLCJjbG9uZVBhdGgiLCJwdXNoQ29tcG9uZW50IiwiYnVpbGRWYWx1ZXMiLCJ1c2VMb25nZXN0VG9rZW4iLCJleGVjIiwicmV0IiwiYWRkZWQiLCJyZW1vdmVkIiwibGFzdCIsInB1c2giLCJjb21tb25Db3VudCIsImVxdWFscyIsImxlZnQiLCJyaWdodCIsImNvbXBhcmF0b3IiLCJpZ25vcmVDYXNlIiwidG9Mb3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9uZW50c1tjb21wb25lbnRQb3MgLSAxXSA9IGNvbXBvbmVudHNbY29tcG9uZW50UG9zXTtcbiAgICAgICAgY29tcG9uZW50c1tjb21wb25lbnRQb3NdID0gdG1wO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIC8vIFNwZWNpYWwgY2FzZSBoYW5kbGUgZm9yIHdoZW4gb25lIHRlcm1pbmFsIGlzIGlnbm9yZWQgKGkuZS4gd2hpdGVzcGFjZSkuXG4gIC8vIEZvciB0aGlzIGNhc2Ugd2UgbWVyZ2UgdGhlIHRlcm1pbmFsIGludG8gdGhlIHByaW9yIHN0cmluZyBhbmQgZHJvcCB0aGUgY2hhbmdlLlxuICAvLyBUaGlzIGlzIG9ubHkgYXZhaWxhYmxlIGZvciBzdHJpbmcgbW9kZS5cbiAgbGV0IGxhc3RDb21wb25lbnQgPSBjb21wb25lbnRzW2NvbXBvbmVudExlbiAtIDFdO1xuICBpZiAoY29tcG9uZW50TGVuID4gMVxuICAgICAgJiYgdHlwZW9mIGxhc3RDb21wb25lbnQudmFsdWUgPT09ICdzdHJpbmcnXG4gICAgICAmJiAobGFzdENvbXBvbmVudC5hZGRlZCB8fCBsYXN0Q29tcG9uZW50LnJlbW92ZWQpXG4gICAgICAmJiBkaWZmLmVxdWFscygnJywgbGFzdENvbXBvbmVudC52YWx1ZSkpIHtcbiAgICBjb21wb25lbnRzW2NvbXBvbmVudExlbiAtIDJdLnZhbHVlICs9IGxhc3RDb21wb25lbnQudmFsdWU7XG4gICAgY29tcG9uZW50cy5wb3AoKTtcbiAgfVxuXG4gIHJldHVybiBjb21wb25lbnRzO1xufVxuXG5mdW5jdGlvbiBjbG9uZVBhdGgocGF0aCkge1xuICByZXR1cm4geyBuZXdQb3M6IHBhdGgubmV3UG9zLCBjb21wb25lbnRzOiBwYXRoLmNvbXBvbmVudHMuc2xpY2UoMCkgfTtcbn1cbiJdfQ==
diff --git a/node_modules/diff/lib/diff/character.js b/node_modules/diff/lib/diff/character.js
deleted file mode 100644
index 4722b16..0000000
--- a/node_modules/diff/lib/diff/character.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.diffChars = diffChars;
-exports.characterDiff = void 0;
-
-/*istanbul ignore end*/
-var
-/*istanbul ignore start*/
-_base = _interopRequireDefault(require("./base"))
-/*istanbul ignore end*/
-;
-
-/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/*istanbul ignore end*/
-var characterDiff = new
-/*istanbul ignore start*/
-_base
-/*istanbul ignore end*/
-.
-/*istanbul ignore start*/
-default
-/*istanbul ignore end*/
-();
-
-/*istanbul ignore start*/
-exports.characterDiff = characterDiff;
-
-/*istanbul ignore end*/
-function diffChars(oldStr, newStr, options) {
-  return characterDiff.diff(oldStr, newStr, options);
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2NoYXJhY3Rlci5qcyJdLCJuYW1lcyI6WyJjaGFyYWN0ZXJEaWZmIiwiRGlmZiIsImRpZmZDaGFycyIsIm9sZFN0ciIsIm5ld1N0ciIsIm9wdGlvbnMiLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxhQUFhLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQXRCOzs7Ozs7QUFDQSxTQUFTQyxTQUFULENBQW1CQyxNQUFuQixFQUEyQkMsTUFBM0IsRUFBbUNDLE9BQW5DLEVBQTRDO0FBQUUsU0FBT0wsYUFBYSxDQUFDTSxJQUFkLENBQW1CSCxNQUFuQixFQUEyQkMsTUFBM0IsRUFBbUNDLE9BQW5DLENBQVA7QUFBcUQiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRGlmZiBmcm9tICcuL2Jhc2UnO1xuXG5leHBvcnQgY29uc3QgY2hhcmFjdGVyRGlmZiA9IG5ldyBEaWZmKCk7XG5leHBvcnQgZnVuY3Rpb24gZGlmZkNoYXJzKG9sZFN0ciwgbmV3U3RyLCBvcHRpb25zKSB7IHJldHVybiBjaGFyYWN0ZXJEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIG9wdGlvbnMpOyB9XG4iXX0=
diff --git a/node_modules/diff/lib/diff/css.js b/node_modules/diff/lib/diff/css.js
deleted file mode 100644
index 69ba47e..0000000
--- a/node_modules/diff/lib/diff/css.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.diffCss = diffCss;
-exports.cssDiff = void 0;
-
-/*istanbul ignore end*/
-var
-/*istanbul ignore start*/
-_base = _interopRequireDefault(require("./base"))
-/*istanbul ignore end*/
-;
-
-/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/*istanbul ignore end*/
-var cssDiff = new
-/*istanbul ignore start*/
-_base
-/*istanbul ignore end*/
-.
-/*istanbul ignore start*/
-default
-/*istanbul ignore end*/
-();
-
-/*istanbul ignore start*/
-exports.cssDiff = cssDiff;
-
-/*istanbul ignore end*/
-cssDiff.tokenize = function (value) {
-  return value.split(/([{}:;,]|\s+)/);
-};
-
-function diffCss(oldStr, newStr, callback) {
-  return cssDiff.diff(oldStr, newStr, callback);
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2Nzcy5qcyJdLCJuYW1lcyI6WyJjc3NEaWZmIiwiRGlmZiIsInRva2VuaXplIiwidmFsdWUiLCJzcGxpdCIsImRpZmZDc3MiLCJvbGRTdHIiLCJuZXdTdHIiLCJjYWxsYmFjayIsImRpZmYiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOzs7OztBQUVPLElBQU1BLE9BQU8sR0FBRztBQUFJQztBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFKO0FBQUEsRUFBaEI7Ozs7OztBQUNQRCxPQUFPLENBQUNFLFFBQVIsR0FBbUIsVUFBU0MsS0FBVCxFQUFnQjtBQUNqQyxTQUFPQSxLQUFLLENBQUNDLEtBQU4sQ0FBWSxlQUFaLENBQVA7QUFDRCxDQUZEOztBQUlPLFNBQVNDLE9BQVQsQ0FBaUJDLE1BQWpCLEVBQXlCQyxNQUF6QixFQUFpQ0MsUUFBakMsRUFBMkM7QUFBRSxTQUFPUixPQUFPLENBQUNTLElBQVIsQ0FBYUgsTUFBYixFQUFxQkMsTUFBckIsRUFBNkJDLFFBQTdCLENBQVA7QUFBZ0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRGlmZiBmcm9tICcuL2Jhc2UnO1xuXG5leHBvcnQgY29uc3QgY3NzRGlmZiA9IG5ldyBEaWZmKCk7XG5jc3NEaWZmLnRva2VuaXplID0gZnVuY3Rpb24odmFsdWUpIHtcbiAgcmV0dXJuIHZhbHVlLnNwbGl0KC8oW3t9OjssXXxcXHMrKS8pO1xufTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZDc3Mob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKSB7IHJldHVybiBjc3NEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKTsgfVxuIl19
diff --git a/node_modules/diff/lib/diff/json.js b/node_modules/diff/lib/diff/json.js
deleted file mode 100644
index 715ef08..0000000
--- a/node_modules/diff/lib/diff/json.js
+++ /dev/null
@@ -1,163 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.diffJson = diffJson;
-exports.canonicalize = canonicalize;
-exports.jsonDiff = void 0;
-
-/*istanbul ignore end*/
-var
-/*istanbul ignore start*/
-_base = _interopRequireDefault(require("./base"))
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_line = require("./line")
-/*istanbul ignore end*/
-;
-
-/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
-
-/*istanbul ignore end*/
-var objectPrototypeToString = Object.prototype.toString;
-var jsonDiff = new
-/*istanbul ignore start*/
-_base
-/*istanbul ignore end*/
-.
-/*istanbul ignore start*/
-default
-/*istanbul ignore end*/
-(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
-// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
-
-/*istanbul ignore start*/
-exports.jsonDiff = jsonDiff;
-
-/*istanbul ignore end*/
-jsonDiff.useLongestToken = true;
-jsonDiff.tokenize =
-/*istanbul ignore start*/
-_line
-/*istanbul ignore end*/
-.
-/*istanbul ignore start*/
-lineDiff
-/*istanbul ignore end*/
-.tokenize;
-
-jsonDiff.castInput = function (value) {
-  /*istanbul ignore start*/
-  var _this$options =
-  /*istanbul ignore end*/
-  this.options,
-      undefinedReplacement = _this$options.undefinedReplacement,
-      _this$options$stringi = _this$options.stringifyReplacer,
-      stringifyReplacer = _this$options$stringi === void 0 ? function (k, v)
-  /*istanbul ignore start*/
-  {
-    return (
-      /*istanbul ignore end*/
-      typeof v === 'undefined' ? undefinedReplacement : v
-    );
-  } : _this$options$stringi;
-  return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, '  ');
-};
-
-jsonDiff.equals = function (left, right) {
-  return (
-    /*istanbul ignore start*/
-    _base
-    /*istanbul ignore end*/
-    .
-    /*istanbul ignore start*/
-    default
-    /*istanbul ignore end*/
-    .prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'))
-  );
-};
-
-function diffJson(oldObj, newObj, options) {
-  return jsonDiff.diff(oldObj, newObj, options);
-} // This function handles the presence of circular references by bailing out when encountering an
-// object that is already on the "stack" of items being processed. Accepts an optional replacer
-
-
-function canonicalize(obj, stack, replacementStack, replacer, key) {
-  stack = stack || [];
-  replacementStack = replacementStack || [];
-
-  if (replacer) {
-    obj = replacer(key, obj);
-  }
-
-  var i;
-
-  for (i = 0; i < stack.length; i += 1) {
-    if (stack[i] === obj) {
-      return replacementStack[i];
-    }
-  }
-
-  var canonicalizedObj;
-
-  if ('[object Array]' === objectPrototypeToString.call(obj)) {
-    stack.push(obj);
-    canonicalizedObj = new Array(obj.length);
-    replacementStack.push(canonicalizedObj);
-
-    for (i = 0; i < obj.length; i += 1) {
-      canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
-    }
-
-    stack.pop();
-    replacementStack.pop();
-    return canonicalizedObj;
-  }
-
-  if (obj && obj.toJSON) {
-    obj = obj.toJSON();
-  }
-
-  if (
-  /*istanbul ignore start*/
-  _typeof(
-  /*istanbul ignore end*/
-  obj) === 'object' && obj !== null) {
-    stack.push(obj);
-    canonicalizedObj = {};
-    replacementStack.push(canonicalizedObj);
-
-    var sortedKeys = [],
-        _key;
-
-    for (_key in obj) {
-      /* istanbul ignore else */
-      if (obj.hasOwnProperty(_key)) {
-        sortedKeys.push(_key);
-      }
-    }
-
-    sortedKeys.sort();
-
-    for (i = 0; i < sortedKeys.length; i += 1) {
-      _key = sortedKeys[i];
-      canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
-    }
-
-    stack.pop();
-    replacementStack.pop();
-  } else {
-    canonicalizedObj = obj;
-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git a/node_modules/diff/lib/diff/line.js b/node_modules/diff/lib/diff/line.js
deleted file mode 100644
index f323f84..0000000
--- a/node_modules/diff/lib/diff/line.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.diffLines = diffLines;
-exports.diffTrimmedLines = diffTrimmedLines;
-exports.lineDiff = void 0;
-
-/*istanbul ignore end*/
-var
-/*istanbul ignore start*/
-_base = _interopRequireDefault(require("./base"))
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_params = require("../util/params")
-/*istanbul ignore end*/
-;
-
-/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/*istanbul ignore end*/
-var lineDiff = new
-/*istanbul ignore start*/
-_base
-/*istanbul ignore end*/
-.
-/*istanbul ignore start*/
-default
-/*istanbul ignore end*/
-();
-
-/*istanbul ignore start*/
-exports.lineDiff = lineDiff;
-
-/*istanbul ignore end*/
-lineDiff.tokenize = function (value) {
-  var retLines = [],
-      linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line
-
-  if (!linesAndNewlines[linesAndNewlines.length - 1]) {
-    linesAndNewlines.pop();
-  } // Merge the content and line separators into single tokens
-
-
-  for (var i = 0; i < linesAndNewlines.length; i++) {
-    var line = linesAndNewlines[i];
-
-    if (i % 2 && !this.options.newlineIsToken) {
-      retLines[retLines.length - 1] += line;
-    } else {
-      if (this.options.ignoreWhitespace) {
-        line = line.trim();
-      }
-
-      retLines.push(line);
-    }
-  }
-
-  return retLines;
-};
-
-function diffLines(oldStr, newStr, callback) {
-  return lineDiff.diff(oldStr, newStr, callback);
-}
-
-function diffTrimmedLines(oldStr, newStr, callback) {
-  var options =
-  /*istanbul ignore start*/
-  (0,
-  /*istanbul ignore end*/
-
-  /*istanbul ignore start*/
-  _params
-  /*istanbul ignore end*/
-  .
-  /*istanbul ignore start*/
-  generateOptions)
-  /*istanbul ignore end*/
-  (callback, {
-    ignoreWhitespace: true
-  });
-  return lineDiff.diff(oldStr, newStr, options);
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2xpbmUuanMiXSwibmFtZXMiOlsibGluZURpZmYiLCJEaWZmIiwidG9rZW5pemUiLCJ2YWx1ZSIsInJldExpbmVzIiwibGluZXNBbmROZXdsaW5lcyIsInNwbGl0IiwibGVuZ3RoIiwicG9wIiwiaSIsImxpbmUiLCJvcHRpb25zIiwibmV3bGluZUlzVG9rZW4iLCJpZ25vcmVXaGl0ZXNwYWNlIiwidHJpbSIsInB1c2giLCJkaWZmTGluZXMiLCJvbGRTdHIiLCJuZXdTdHIiLCJjYWxsYmFjayIsImRpZmYiLCJkaWZmVHJpbW1lZExpbmVzIiwiZ2VuZXJhdGVPcHRpb25zIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxRQUFRLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQWpCOzs7Ozs7QUFDUEQsUUFBUSxDQUFDRSxRQUFULEdBQW9CLFVBQVNDLEtBQVQsRUFBZ0I7QUFDbEMsTUFBSUMsUUFBUSxHQUFHLEVBQWY7QUFBQSxNQUNJQyxnQkFBZ0IsR0FBR0YsS0FBSyxDQUFDRyxLQUFOLENBQVksV0FBWixDQUR2QixDQURrQyxDQUlsQzs7QUFDQSxNQUFJLENBQUNELGdCQUFnQixDQUFDQSxnQkFBZ0IsQ0FBQ0UsTUFBakIsR0FBMEIsQ0FBM0IsQ0FBckIsRUFBb0Q7QUFDbERGLElBQUFBLGdCQUFnQixDQUFDRyxHQUFq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vcmVXaGl0ZXNwYWNlKSB7XG4gICAgICAgIGxpbmUgPSBsaW5lLnRyaW0oKTtcbiAgICAgIH1cbiAgICAgIHJldExpbmVzLnB1c2gobGluZSk7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHJldExpbmVzO1xufTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZMaW5lcyhvbGRTdHIsIG5ld1N0ciwgY2FsbGJhY2spIHsgcmV0dXJuIGxpbmVEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKTsgfVxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZUcmltbWVkTGluZXMob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKSB7XG4gIGxldCBvcHRpb25zID0gZ2VuZXJhdGVPcHRpb25zKGNhbGxiYWNrLCB7aWdub3JlV2hpdGVzcGFjZTogdHJ1ZX0pO1xuICByZXR1cm4gbGluZURpZmYuZGlmZihvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucyk7XG59XG4iXX0=
diff --git a/node_modules/diff/lib/diff/sentence.js b/node_modules/diff/lib/diff/sentence.js
deleted file mode 100644
index 9ee96e9..0000000
--- a/node_modules/diff/lib/diff/sentence.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.diffSentences = diffSentences;
-exports.sentenceDiff = void 0;
-
-/*istanbul ignore end*/
-var
-/*istanbul ignore start*/
-_base = _interopRequireDefault(require("./base"))
-/*istanbul ignore end*/
-;
-
-/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/*istanbul ignore end*/
-var sentenceDiff = new
-/*istanbul ignore start*/
-_base
-/*istanbul ignore end*/
-.
-/*istanbul ignore start*/
-default
-/*istanbul ignore end*/
-();
-
-/*istanbul ignore start*/
-exports.sentenceDiff = sentenceDiff;
-
-/*istanbul ignore end*/
-sentenceDiff.tokenize = function (value) {
-  return value.split(/(\S.+?[.!?])(?=\s+|$)/);
-};
-
-function diffSentences(oldStr, newStr, callback) {
-  return sentenceDiff.diff(oldStr, newStr, callback);
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL3NlbnRlbmNlLmpzIl0sIm5hbWVzIjpbInNlbnRlbmNlRGlmZiIsIkRpZmYiLCJ0b2tlbml6ZSIsInZhbHVlIiwic3BsaXQiLCJkaWZmU2VudGVuY2VzIiwib2xkU3RyIiwibmV3U3RyIiwiY2FsbGJhY2siLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFHTyxJQUFNQSxZQUFZLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQXJCOzs7Ozs7QUFDUEQsWUFBWSxDQUFDRSxRQUFiLEdBQXdCLFVBQVNDLEtBQVQsRUFBZ0I7QUFDdEMsU0FBT0EsS0FBSyxDQUFDQyxLQUFOLENBQVksdUJBQVosQ0FBUDtBQUNELENBRkQ7O0FBSU8sU0FBU0MsYUFBVCxDQUF1QkMsTUFBdkIsRUFBK0JDLE1BQS9CLEVBQXVDQyxRQUF2QyxFQUFpRDtBQUFFLFNBQU9SLFlBQVksQ0FBQ1MsSUFBYixDQUFrQkgsTUFBbEIsRUFBMEJDLE1BQTFCLEVBQWtDQyxRQUFsQyxDQUFQO0FBQXFEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcblxuXG5leHBvcnQgY29uc3Qgc2VudGVuY2VEaWZmID0gbmV3IERpZmYoKTtcbnNlbnRlbmNlRGlmZi50b2tlbml6ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIHJldHVybiB2YWx1ZS5zcGxpdCgvKFxcUy4rP1suIT9dKSg/PVxccyt8JCkvKTtcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBkaWZmU2VudGVuY2VzKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjaykgeyByZXR1cm4gc2VudGVuY2VEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKTsgfVxuIl19
diff --git a/node_modules/diff/lib/diff/word.js b/node_modules/diff/lib/diff/word.js
deleted file mode 100644
index 0b952e0..0000000
--- a/node_modules/diff/lib/diff/word.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.diffWords = diffWords;
-exports.diffWordsWithSpace = diffWordsWithSpace;
-exports.wordDiff = void 0;
-
-/*istanbul ignore end*/
-var
-/*istanbul ignore start*/
-_base = _interopRequireDefault(require("./base"))
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_params = require("../util/params")
-/*istanbul ignore end*/
-;
-
-/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/*istanbul ignore end*/
-// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode
-//
-// Ranges and exceptions:
-// Latin-1 Supplement, 0080–00FF
-//  - U+00D7  × Multiplication sign
-//  - U+00F7  ÷ Division sign
-// Latin Extended-A, 0100–017F
-// Latin Extended-B, 0180–024F
-// IPA Extensions, 0250–02AF
-// Spacing Modifier Letters, 02B0–02FF
-//  - U+02C7  ˇ ˇ  Caron
-//  - U+02D8  ˘ ˘  Breve
-//  - U+02D9  ˙ ˙  Dot Above
-//  - U+02DA  ˚ ˚  Ring Above
-//  - U+02DB  ˛ ˛  Ogonek
-//  - U+02DC  ˜ ˜  Small Tilde
-//  - U+02DD  ˝ ˝  Double Acute Accent
-// Latin Extended Additional, 1E00–1EFF
-var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
-var reWhitespace = /\S/;
-var wordDiff = new
-/*istanbul ignore start*/
-_base
-/*istanbul ignore end*/
-.
-/*istanbul ignore start*/
-default
-/*istanbul ignore end*/
-();
-
-/*istanbul ignore start*/
-exports.wordDiff = wordDiff;
-
-/*istanbul ignore end*/
-wordDiff.equals = function (left, right) {
-  if (this.options.ignoreCase) {
-    left = left.toLowerCase();
-    right = right.toLowerCase();
-  }
-
-  return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
-};
-
-wordDiff.tokenize = function (value) {
-  var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
-
-  for (var i = 0; i < tokens.length - 1; i++) {
-    // If we have an empty string in the next field and we have only word chars before and after, merge
-    if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {
-      tokens[i] += tokens[i + 2];
-      tokens.splice(i + 1, 2);
-      i--;
-    }
-  }
-
-  return tokens;
-};
-
-function diffWords(oldStr, newStr, options) {
-  options =
-  /*istanbul ignore start*/
-  (0,
-  /*istanbul ignore end*/
-
-  /*istanbul ignore start*/
-  _params
-  /*istanbul ignore end*/
-  .
-  /*istanbul ignore start*/
-  generateOptions)
-  /*istanbul ignore end*/
-  (options, {
-    ignoreWhitespace: true
-  });
-  return wordDiff.diff(oldStr, newStr, options);
-}
-
-function diffWordsWithSpace(oldStr, newStr, options) {
-  return wordDiff.diff(oldStr, newStr, options);
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL3dvcmQuanMiXSwibmFtZXMiOlsiZXh0ZW5kZWRXb3JkQ2hhcnMiLCJyZVdoaXRlc3BhY2UiLCJ3b3JkRGlmZiIsIkRpZmYiLCJlcXVhbHMiLCJsZWZ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n1cblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZXb3Jkc1dpdGhTcGFjZShvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucykge1xuICByZXR1cm4gd29yZERpZmYuZGlmZihvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucyk7XG59XG4iXX0=
diff --git a/node_modules/diff/lib/index.es6.js b/node_modules/diff/lib/index.es6.js
deleted file mode 100644
index b645843..0000000
--- a/node_modules/diff/lib/index.es6.js
+++ /dev/null
@@ -1,1519 +0,0 @@
-function Diff() {}
-Diff.prototype = {
-  diff: function diff(oldString, newString) {
-    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-    var callback = options.callback;
-
-    if (typeof options === 'function') {
-      callback = options;
-      options = {};
-    }
-
-    this.options = options;
-    var self = this;
-
-    function done(value) {
-      if (callback) {
-        setTimeout(function () {
-          callback(undefined, value);
-        }, 0);
-        return true;
-      } else {
-        return value;
-      }
-    } // Allow subclasses to massage the input prior to running
-
-
-    oldString = this.castInput(oldString);
-    newString = this.castInput(newString);
-    oldString = this.removeEmpty(this.tokenize(oldString));
-    newString = this.removeEmpty(this.tokenize(newString));
-    var newLen = newString.length,
-        oldLen = oldString.length;
-    var editLength = 1;
-    var maxEditLength = newLen + oldLen;
-    var bestPath = [{
-      newPos: -1,
-      components: []
-    }]; // Seed editLength = 0, i.e. the content starts with the same values
-
-    var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
-
-    if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
-      // Identity per the equality and tokenizer
-      return done([{
-        value: this.join(newString),
-        count: newString.length
-      }]);
-    } // Main worker method. checks all permutations of a given edit length for acceptance.
-
-
-    function execEditLength() {
-      for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
-        var basePath = void 0;
-
-        var addPath = bestPath[diagonalPath - 1],
-            removePath = bestPath[diagonalPath + 1],
-            _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
-
-        if (addPath) {
-          // No one else is going to attempt to use this value, clear it
-          bestPath[diagonalPath - 1] = undefined;
-        }
-
-        var canAdd = addPath && addPath.newPos + 1 < newLen,
-            canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
-
-        if (!canAdd && !canRemove) {
-          // If this path is a terminal then prune
-          bestPath[diagonalPath] = undefined;
-          continue;
-        } // Select the diagonal that we want to branch from. We select the prior
-        // path whose position in the new string is the farthest from the origin
-        // and does not pass the bounds of the diff graph
-
-
-        if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
-          basePath = clonePath(removePath);
-          self.pushComponent(basePath.components, undefined, true);
-        } else {
-          basePath = addPath; // No need to clone, we've pulled it from the list
-
-          basePath.newPos++;
-          self.pushComponent(basePath.components, true, undefined);
-        }
-
-        _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done
-
-        if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
-          return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
-        } else {
-          // Otherwise track this path as a potential candidate and continue.
-          bestPath[diagonalPath] = basePath;
-        }
-      }
-
-      editLength++;
-    } // Performs the length of edit iteration. Is a bit fugly as this has to support the
-    // sync and async mode which is never fun. Loops over execEditLength until a value
-    // is produced.
-
-
-    if (callback) {
-      (function exec() {
-        setTimeout(function () {
-          // This should not happen, but we want to be safe.
-
-          /* istanbul ignore next */
-          if (editLength > maxEditLength) {
-            return callback();
-          }
-
-          if (!execEditLength()) {
-            exec();
-          }
-        }, 0);
-      })();
-    } else {
-      while (editLength <= maxEditLength) {
-        var ret = execEditLength();
-
-        if (ret) {
-          return ret;
-        }
-      }
-    }
-  },
-  pushComponent: function pushComponent(components, added, removed) {
-    var last = components[components.length - 1];
-
-    if (last && last.added === added && last.removed === removed) {
-      // We need to clone here as the component clone operation is just
-      // as shallow array clone
-      components[components.length - 1] = {
-        count: last.count + 1,
-        added: added,
-        removed: removed
-      };
-    } else {
-      components.push({
-        count: 1,
-        added: added,
-        removed: removed
-      });
-    }
-  },
-  extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
-    var newLen = newString.length,
-        oldLen = oldString.length,
-        newPos = basePath.newPos,
-        oldPos = newPos - diagonalPath,
-        commonCount = 0;
-
-    while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
-      newPos++;
-      oldPos++;
-      commonCount++;
-    }
-
-    if (commonCount) {
-      basePath.components.push({
-        count: commonCount
-      });
-    }
-
-    basePath.newPos = newPos;
-    return oldPos;
-  },
-  equals: function equals(left, right) {
-    if (this.options.comparator) {
-      return this.options.comparator(left, right);
-    } else {
-      return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
-    }
-  },
-  removeEmpty: function removeEmpty(array) {
-    var ret = [];
-
-    for (var i = 0; i < array.length; i++) {
-      if (array[i]) {
-        ret.push(array[i]);
-      }
-    }
-
-    return ret;
-  },
-  castInput: function castInput(value) {
-    return value;
-  },
-  tokenize: function tokenize(value) {
-    return value.split('');
-  },
-  join: function join(chars) {
-    return chars.join('');
-  }
-};
-
-function buildValues(diff, components, newString, oldString, useLongestToken) {
-  var componentPos = 0,
-      componentLen = components.length,
-      newPos = 0,
-      oldPos = 0;
-
-  for (; componentPos < componentLen; componentPos++) {
-    var component = components[componentPos];
-
-    if (!component.removed) {
-      if (!component.added && useLongestToken) {
-        var value = newString.slice(newPos, newPos + component.count);
-        value = value.map(function (value, i) {
-          var oldValue = oldString[oldPos + i];
-          return oldValue.length > value.length ? oldValue : value;
-        });
-        component.value = diff.join(value);
-      } else {
-        component.value = diff.join(newString.slice(newPos, newPos + component.count));
-      }
-
-      newPos += component.count; // Common case
-
-      if (!component.added) {
-        oldPos += component.count;
-      }
-    } else {
-      component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
-      oldPos += component.count; // Reverse add and remove so removes are output first to match common convention
-      // The diffing algorithm is tied to add then remove output and this is the simplest
-      // route to get the desired output with minimal overhead.
-
-      if (componentPos && components[componentPos - 1].added) {
-        var tmp = components[componentPos - 1];
-        components[componentPos - 1] = components[componentPos];
-        components[componentPos] = tmp;
-      }
-    }
-  } // Special case handle for when one terminal is ignored (i.e. whitespace).
-  // For this case we merge the terminal into the prior string and drop the change.
-  // This is only available for string mode.
-
-
-  var lastComponent = components[componentLen - 1];
-
-  if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
-    components[componentLen - 2].value += lastComponent.value;
-    components.pop();
-  }
-
-  return components;
-}
-
-function clonePath(path) {
-  return {
-    newPos: path.newPos,
-    components: path.components.slice(0)
-  };
-}
-
-var characterDiff = new Diff();
-function diffChars(oldStr, newStr, options) {
-  return characterDiff.diff(oldStr, newStr, options);
-}
-
-function generateOptions(options, defaults) {
-  if (typeof options === 'function') {
-    defaults.callback = options;
-  } else if (options) {
-    for (var name in options) {
-      /* istanbul ignore else */
-      if (options.hasOwnProperty(name)) {
-        defaults[name] = options[name];
-      }
-    }
-  }
-
-  return defaults;
-}
-
-//
-// Ranges and exceptions:
-// Latin-1 Supplement, 0080–00FF
-//  - U+00D7  × Multiplication sign
-//  - U+00F7  ÷ Division sign
-// Latin Extended-A, 0100–017F
-// Latin Extended-B, 0180–024F
-// IPA Extensions, 0250–02AF
-// Spacing Modifier Letters, 02B0–02FF
-//  - U+02C7  ˇ ˇ  Caron
-//  - U+02D8  ˘ ˘  Breve
-//  - U+02D9  ˙ ˙  Dot Above
-//  - U+02DA  ˚ ˚  Ring Above
-//  - U+02DB  ˛ ˛  Ogonek
-//  - U+02DC  ˜ ˜  Small Tilde
-//  - U+02DD  ˝ ˝  Double Acute Accent
-// Latin Extended Additional, 1E00–1EFF
-
-var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
-var reWhitespace = /\S/;
-var wordDiff = new Diff();
-
-wordDiff.equals = function (left, right) {
-  if (this.options.ignoreCase) {
-    left = left.toLowerCase();
-    right = right.toLowerCase();
-  }
-
-  return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
-};
-
-wordDiff.tokenize = function (value) {
-  var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
-
-  for (var i = 0; i < tokens.length - 1; i++) {
-    // If we have an empty string in the next field and we have only word chars before and after, merge
-    if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {
-      tokens[i] += tokens[i + 2];
-      tokens.splice(i + 1, 2);
-      i--;
-    }
-  }
-
-  return tokens;
-};
-
-function diffWords(oldStr, newStr, options) {
-  options = generateOptions(options, {
-    ignoreWhitespace: true
-  });
-  return wordDiff.diff(oldStr, newStr, options);
-}
-function diffWordsWithSpace(oldStr, newStr, options) {
-  return wordDiff.diff(oldStr, newStr, options);
-}
-
-var lineDiff = new Diff();
-
-lineDiff.tokenize = function (value) {
-  var retLines = [],
-      linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line
-
-  if (!linesAndNewlines[linesAndNewlines.length - 1]) {
-    linesAndNewlines.pop();
-  } // Merge the content and line separators into single tokens
-
-
-  for (var i = 0; i < linesAndNewlines.length; i++) {
-    var line = linesAndNewlines[i];
-
-    if (i % 2 && !this.options.newlineIsToken) {
-      retLines[retLines.length - 1] += line;
-    } else {
-      if (this.options.ignoreWhitespace) {
-        line = line.trim();
-      }
-
-      retLines.push(line);
-    }
-  }
-
-  return retLines;
-};
-
-function diffLines(oldStr, newStr, callback) {
-  return lineDiff.diff(oldStr, newStr, callback);
-}
-function diffTrimmedLines(oldStr, newStr, callback) {
-  var options = generateOptions(callback, {
-    ignoreWhitespace: true
-  });
-  return lineDiff.diff(oldStr, newStr, options);
-}
-
-var sentenceDiff = new Diff();
-
-sentenceDiff.tokenize = function (value) {
-  return value.split(/(\S.+?[.!?])(?=\s+|$)/);
-};
-
-function diffSentences(oldStr, newStr, callback) {
-  return sentenceDiff.diff(oldStr, newStr, callback);
-}
-
-var cssDiff = new Diff();
-
-cssDiff.tokenize = function (value) {
-  return value.split(/([{}:;,]|\s+)/);
-};
-
-function diffCss(oldStr, newStr, callback) {
-  return cssDiff.diff(oldStr, newStr, callback);
-}
-
-function _typeof(obj) {
-  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
-    _typeof = function (obj) {
-      return typeof obj;
-    };
-  } else {
-    _typeof = function (obj) {
-      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
-    };
-  }
-
-  return _typeof(obj);
-}
-
-function _toConsumableArray(arr) {
-  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
-}
-
-function _arrayWithoutHoles(arr) {
-  if (Array.isArray(arr)) {
-    for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
-
-    return arr2;
-  }
-}
-
-function _iterableToArray(iter) {
-  if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
-}
-
-function _nonIterableSpread() {
-  throw new TypeError("Invalid attempt to spread non-iterable instance");
-}
-
-var objectPrototypeToString = Object.prototype.toString;
-var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
-// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
-
-jsonDiff.useLongestToken = true;
-jsonDiff.tokenize = lineDiff.tokenize;
-
-jsonDiff.castInput = function (value) {
-  var _this$options = this.options,
-      undefinedReplacement = _this$options.undefinedReplacement,
-      _this$options$stringi = _this$options.stringifyReplacer,
-      stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) {
-    return typeof v === 'undefined' ? undefinedReplacement : v;
-  } : _this$options$stringi;
-  return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, '  ');
-};
-
-jsonDiff.equals = function (left, right) {
-  return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'));
-};
-
-function diffJson(oldObj, newObj, options) {
-  return jsonDiff.diff(oldObj, newObj, options);
-} // This function handles the presence of circular references by bailing out when encountering an
-// object that is already on the "stack" of items being processed. Accepts an optional replacer
-
-function canonicalize(obj, stack, replacementStack, replacer, key) {
-  stack = stack || [];
-  replacementStack = replacementStack || [];
-
-  if (replacer) {
-    obj = replacer(key, obj);
-  }
-
-  var i;
-
-  for (i = 0; i < stack.length; i += 1) {
-    if (stack[i] === obj) {
-      return replacementStack[i];
-    }
-  }
-
-  var canonicalizedObj;
-
-  if ('[object Array]' === objectPrototypeToString.call(obj)) {
-    stack.push(obj);
-    canonicalizedObj = new Array(obj.length);
-    replacementStack.push(canonicalizedObj);
-
-    for (i = 0; i < obj.length; i += 1) {
-      canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
-    }
-
-    stack.pop();
-    replacementStack.pop();
-    return canonicalizedObj;
-  }
-
-  if (obj && obj.toJSON) {
-    obj = obj.toJSON();
-  }
-
-  if (_typeof(obj) === 'object' && obj !== null) {
-    stack.push(obj);
-    canonicalizedObj = {};
-    replacementStack.push(canonicalizedObj);
-
-    var sortedKeys = [],
-        _key;
-
-    for (_key in obj) {
-      /* istanbul ignore else */
-      if (obj.hasOwnProperty(_key)) {
-        sortedKeys.push(_key);
-      }
-    }
-
-    sortedKeys.sort();
-
-    for (i = 0; i < sortedKeys.length; i += 1) {
-      _key = sortedKeys[i];
-      canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
-    }
-
-    stack.pop();
-    replacementStack.pop();
-  } else {
-    canonicalizedObj = obj;
-  }
-
-  return canonicalizedObj;
-}
-
-var arrayDiff = new Diff();
-
-arrayDiff.tokenize = function (value) {
-  return value.slice();
-};
-
-arrayDiff.join = arrayDiff.removeEmpty = function (value) {
-  return value;
-};
-
-function diffArrays(oldArr, newArr, callback) {
-  return arrayDiff.diff(oldArr, newArr, callback);
-}
-
-function parsePatch(uniDiff) {
-  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-  var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/),
-      delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [],
-      list = [],
-      i = 0;
-
-  function parseIndex() {
-    var index = {};
-    list.push(index); // Parse diff metadata
-
-    while (i < diffstr.length) {
-      var line = diffstr[i]; // File header found, end parsing diff metadata
-
-      if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) {
-        break;
-      } // Diff index
-
-
-      var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
-
-      if (header) {
-        index.index = header[1];
-      }
-
-      i++;
-    } // Parse file headers if they are defined. Unified diff requires them, but
-    // there's no technical issues to have an isolated hunk without file header
-
-
-    parseFileHeader(index);
-    parseFileHeader(index); // Parse hunks
-
-    index.hunks = [];
-
-    while (i < diffstr.length) {
-      var _line = diffstr[i];
-
-      if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) {
-        break;
-      } else if (/^@@/.test(_line)) {
-        index.hunks.push(parseHunk());
-      } else if (_line && options.strict) {
-        // Ignore unexpected content unless in strict mode
-        throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));
-      } else {
-        i++;
-      }
-    }
-  } // Parses the --- and +++ headers, if none are found, no lines
-  // are consumed.
-
-
-  function parseFileHeader(index) {
-    var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]);
-
-    if (fileHeader) {
-      var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';
-      var data = fileHeader[2].split('\t', 2);
-      var fileName = data[0].replace(/\\\\/g, '\\');
-
-      if (/^".*"$/.test(fileName)) {
-        fileName = fileName.substr(1, fileName.length - 2);
-      }
-
-      index[keyPrefix + 'FileName'] = fileName;
-      index[keyPrefix + 'Header'] = (data[1] || '').trim();
-      i++;
-    }
-  } // Parses a hunk
-  // This assumes that we are at the start of a hunk.
-
-
-  function parseHunk() {
-    var chunkHeaderIndex = i,
-        chunkHeaderLine = diffstr[i++],
-        chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
-    var hunk = {
-      oldStart: +chunkHeader[1],
-      oldLines: +chunkHeader[2] || 1,
-      newStart: +chunkHeader[3],
-      newLines: +chunkHeader[4] || 1,
-      lines: [],
-      linedelimiters: []
-    };
-    var addCount = 0,
-        removeCount = 0;
-
-    for (; i < diffstr.length; i++) {
-      // Lines starting with '---' could be mistaken for the "remove line" operation
-      // But they could be the header for the next file. Therefore prune such cases out.
-      if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) {
-        break;
-      }
-
-      var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];
-
-      if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
-        hunk.lines.push(diffstr[i]);
-        hunk.linedelimiters.push(delimiters[i] || '\n');
-
-        if (operation === '+') {
-          addCount++;
-        } else if (operation === '-') {
-          removeCount++;
-        } else if (operation === ' ') {
-          addCount++;
-          removeCount++;
-        }
-      } else {
-        break;
-      }
-    } // Handle the empty block count case
-
-
-    if (!addCount && hunk.newLines === 1) {
-      hunk.newLines = 0;
-    }
-
-    if (!removeCount && hunk.oldLines === 1) {
-      hunk.oldLines = 0;
-    } // Perform optional sanity checking
-
-
-    if (options.strict) {
-      if (addCount !== hunk.newLines) {
-        throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
-      }
-
-      if (removeCount !== hunk.oldLines) {
-        throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
-      }
-    }
-
-    return hunk;
-  }
-
-  while (i < diffstr.length) {
-    parseIndex();
-  }
-
-  return list;
-}
-
-// Iterator that traverses in the range of [min, max], stepping
-// by distance from a given start position. I.e. for [0, 4], with
-// start of 2, this will iterate 2, 3, 1, 4, 0.
-function distanceIterator (start, minLine, maxLine) {
-  var wantForward = true,
-      backwardExhausted = false,
-      forwardExhausted = false,
-      localOffset = 1;
-  return function iterator() {
-    if (wantForward && !forwardExhausted) {
-      if (backwardExhausted) {
-        localOffset++;
-      } else {
-        wantForward = false;
-      } // Check if trying to fit beyond text length, and if not, check it fits
-      // after offset location (or desired location on first iteration)
-
-
-      if (start + localOffset <= maxLine) {
-        return localOffset;
-      }
-
-      forwardExhausted = true;
-    }
-
-    if (!backwardExhausted) {
-      if (!forwardExhausted) {
-        wantForward = true;
-      } // Check if trying to fit before text beginning, and if not, check it fits
-      // before offset location
-
-
-      if (minLine <= start - localOffset) {
-        return -localOffset++;
-      }
-
-      backwardExhausted = true;
-      return iterator();
-    } // We tried to fit hunk before text beginning and beyond text length, then
-    // hunk can't fit on the text. Return undefined
-
-  };
-}
-
-function applyPatch(source, uniDiff) {
-  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-
-  if (typeof uniDiff === 'string') {
-    uniDiff = parsePatch(uniDiff);
-  }
-
-  if (Array.isArray(uniDiff)) {
-    if (uniDiff.length > 1) {
-      throw new Error('applyPatch only works with a single input.');
-    }
-
-    uniDiff = uniDiff[0];
-  } // Apply the diff to the input
-
-
-  var lines = source.split(/\r\n|[\n\v\f\r\x85]/),
-      delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [],
-      hunks = uniDiff.hunks,
-      compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) {
-    return line === patchContent;
-  },
-      errorCount = 0,
-      fuzzFactor = options.fuzzFactor || 0,
-      minLine = 0,
-      offset = 0,
-      removeEOFNL,
-      addEOFNL;
-  /**
-   * Checks if the hunk exactly fits on the provided location
-   */
-
-
-  function hunkFits(hunk, toPos) {
-    for (var j = 0; j < hunk.lines.length; j++) {
-      var line = hunk.lines[j],
-          operation = line.length > 0 ? line[0] : ' ',
-          content = line.length > 0 ? line.substr(1) : line;
-
-      if (operation === ' ' || operation === '-') {
-        // Context sanity check
-        if (!compareLine(toPos + 1, lines[toPos], operation, content)) {
-          errorCount++;
-
-          if (errorCount > fuzzFactor) {
-            return false;
-          }
-        }
-
-        toPos++;
-      }
-    }
-
-    return true;
-  } // Search best fit offsets for each hunk based on the previous ones
-
-
-  for (var i = 0; i < hunks.length; i++) {
-    var hunk = hunks[i],
-        maxLine = lines.length - hunk.oldLines,
-        localOffset = 0,
-        toPos = offset + hunk.oldStart - 1;
-    var iterator = distanceIterator(toPos, minLine, maxLine);
-
-    for (; localOffset !== undefined; localOffset = iterator()) {
-      if (hunkFits(hunk, toPos + localOffset)) {
-        hunk.offset = offset += localOffset;
-        break;
-      }
-    }
-
-    if (localOffset === undefined) {
-      return false;
-    } // Set lower text limit to end of the current hunk, so next ones don't try
-    // to fit over already patched text
-
-
-    minLine = hunk.offset + hunk.oldStart + hunk.oldLines;
-  } // Apply patch hunks
-
-
-  var diffOffset = 0;
-
-  for (var _i = 0; _i < hunks.length; _i++) {
-    var _hunk = hunks[_i],
-        _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;
-
-    diffOffset += _hunk.newLines - _hunk.oldLines;
-
-    if (_toPos < 0) {
-      // Creating a new file
-      _toPos = 0;
-    }
-
-    for (var j = 0; j < _hunk.lines.length; j++) {
-      var line = _hunk.lines[j],
-          operation = line.length > 0 ? line[0] : ' ',
-          content = line.length > 0 ? line.substr(1) : line,
-          delimiter = _hunk.linedelimiters[j];
-
-      if (operation === ' ') {
-        _toPos++;
-      } else if (operation === '-') {
-        lines.splice(_toPos, 1);
-        delimiters.splice(_toPos, 1);
-        /* istanbul ignore else */
-      } else if (operation === '+') {
-        lines.splice(_toPos, 0, content);
-        delimiters.splice(_toPos, 0, delimiter);
-        _toPos++;
-      } else if (operation === '\\') {
-        var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null;
-
-        if (previousOperation === '+') {
-          removeEOFNL = true;
-        } else if (previousOperation === '-') {
-          addEOFNL = true;
-        }
-      }
-    }
-  } // Handle EOFNL insertion/removal
-
-
-  if (removeEOFNL) {
-    while (!lines[lines.length - 1]) {
-      lines.pop();
-      delimiters.pop();
-    }
-  } else if (addEOFNL) {
-    lines.push('');
-    delimiters.push('\n');
-  }
-
-  for (var _k = 0; _k < lines.length - 1; _k++) {
-    lines[_k] = lines[_k] + delimiters[_k];
-  }
-
-  return lines.join('');
-} // Wrapper that supports multiple file patches via callbacks.
-
-function applyPatches(uniDiff, options) {
-  if (typeof uniDiff === 'string') {
-    uniDiff = parsePatch(uniDiff);
-  }
-
-  var currentIndex = 0;
-
-  function processIndex() {
-    var index = uniDiff[currentIndex++];
-
-    if (!index) {
-      return options.complete();
-    }
-
-    options.loadFile(index, function (err, data) {
-      if (err) {
-        return options.complete(err);
-      }
-
-      var updatedContent = applyPatch(data, index, options);
-      options.patched(index, updatedContent, function (err) {
-        if (err) {
-          return options.complete(err);
-        }
-
-        processIndex();
-      });
-    });
-  }
-
-  processIndex();
-}
-
-function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
-  if (!options) {
-    options = {};
-  }
-
-  if (typeof options.context === 'undefined') {
-    options.context = 4;
-  }
-
-  var diff = diffLines(oldStr, newStr, options);
-  diff.push({
-    value: '',
-    lines: []
-  }); // Append an empty value to make cleanup easier
-
-  function contextLines(lines) {
-    return lines.map(function (entry) {
-      return ' ' + entry;
-    });
-  }
-
-  var hunks = [];
-  var oldRangeStart = 0,
-      newRangeStart = 0,
-      curRange = [],
-      oldLine = 1,
-      newLine = 1;
-
-  var _loop = function _loop(i) {
-    var current = diff[i],
-        lines = current.lines || current.value.replace(/\n$/, '').split('\n');
-    current.lines = lines;
-
-    if (current.added || current.removed) {
-      var _curRange;
-
-      // If we have previous context, start with that
-      if (!oldRangeStart) {
-        var prev = diff[i - 1];
-        oldRangeStart = oldLine;
-        newRangeStart = newLine;
-
-        if (prev) {
-          curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
-          oldRangeStart -= curRange.length;
-          newRangeStart -= curRange.length;
-        }
-      } // Output our changes
-
-
-      (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) {
-        return (current.added ? '+' : '-') + entry;
-      }))); // Track the updated file position
-
-
-      if (current.added) {
-        newLine += lines.length;
-      } else {
-        oldLine += lines.length;
-      }
-    } else {
-      // Identical context lines. Track line changes
-      if (oldRangeStart) {
-        // Close out any changes that have been output (or join overlapping)
-        if (lines.length <= options.context * 2 && i < diff.length - 2) {
-          var _curRange2;
-
-          // Overlapping
-          (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));
-        } else {
-          var _curRange3;
-
-          // end the range and output
-          var contextSize = Math.min(lines.length, options.context);
-
-          (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));
-
-          var hunk = {
-            oldStart: oldRangeStart,
-            oldLines: oldLine - oldRangeStart + contextSize,
-            newStart: newRangeStart,
-            newLines: newLine - newRangeStart + contextSize,
-            lines: curRange
-          };
-
-          if (i >= diff.length - 2 && lines.length <= options.context) {
-            // EOF is inside this hunk
-            var oldEOFNewline = /\n$/.test(oldStr);
-            var newEOFNewline = /\n$/.test(newStr);
-            var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
-
-            if (!oldEOFNewline && noNlBeforeAdds) {
-              // special case: old has no eol and no trailing context; no-nl can end up before adds
-              curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file');
-            }
-
-            if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
-              curRange.push('\\ No newline at end of file');
-            }
-          }
-
-          hunks.push(hunk);
-          oldRangeStart = 0;
-          newRangeStart = 0;
-          curRange = [];
-        }
-      }
-
-      oldLine += lines.length;
-      newLine += lines.length;
-    }
-  };
-
-  for (var i = 0; i < diff.length; i++) {
-    _loop(i);
-  }
-
-  return {
-    oldFileName: oldFileName,
-    newFileName: newFileName,
-    oldHeader: oldHeader,
-    newHeader: newHeader,
-    hunks: hunks
-  };
-}
-function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
-  var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
-  var ret = [];
-
-  if (oldFileName == newFileName) {
-    ret.push('Index: ' + oldFileName);
-  }
-
-  ret.push('===================================================================');
-  ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader));
-  ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
-
-  for (var i = 0; i < diff.hunks.length; i++) {
-    var hunk = diff.hunks[i];
-    ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
-    ret.push.apply(ret, hunk.lines);
-  }
-
-  return ret.join('\n') + '\n';
-}
-function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
-  return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
-}
-
-function arrayEqual(a, b) {
-  if (a.length !== b.length) {
-    return false;
-  }
-
-  return arrayStartsWith(a, b);
-}
-function arrayStartsWith(array, start) {
-  if (start.length > array.length) {
-    return false;
-  }
-
-  for (var i = 0; i < start.length; i++) {
-    if (start[i] !== array[i]) {
-      return false;
-    }
-  }
-
-  return true;
-}
-
-function calcLineCount(hunk) {
-  var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines),
-      oldLines = _calcOldNewLineCount.oldLines,
-      newLines = _calcOldNewLineCount.newLines;
-
-  if (oldLines !== undefined) {
-    hunk.oldLines = oldLines;
-  } else {
-    delete hunk.oldLines;
-  }
-
-  if (newLines !== undefined) {
-    hunk.newLines = newLines;
-  } else {
-    delete hunk.newLines;
-  }
-}
-function merge(mine, theirs, base) {
-  mine = loadPatch(mine, base);
-  theirs = loadPatch(theirs, base);
-  var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning.
-  // Leaving sanity checks on this to the API consumer that may know more about the
-  // meaning in their own context.
-
-  if (mine.index || theirs.index) {
-    ret.index = mine.index || theirs.index;
-  }
-
-  if (mine.newFileName || theirs.newFileName) {
-    if (!fileNameChanged(mine)) {
-      // No header or no change in ours, use theirs (and ours if theirs does not exist)
-      ret.oldFileName = theirs.oldFileName || mine.oldFileName;
-      ret.newFileName = theirs.newFileName || mine.newFileName;
-      ret.oldHeader = theirs.oldHeader || mine.oldHeader;
-      ret.newHeader = theirs.newHeader || mine.newHeader;
-    } else if (!fileNameChanged(theirs)) {
-      // No header or no change in theirs, use ours
-      ret.oldFileName = mine.oldFileName;
-      ret.newFileName = mine.newFileName;
-      ret.oldHeader = mine.oldHeader;
-      ret.newHeader = mine.newHeader;
-    } else {
-      // Both changed... figure it out
-      ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);
-      ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);
-      ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);
-      ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);
-    }
-  }
-
-  ret.hunks = [];
-  var mineIndex = 0,
-      theirsIndex = 0,
-      mineOffset = 0,
-      theirsOffset = 0;
-
-  while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {
-    var mineCurrent = mine.hunks[mineIndex] || {
-      oldStart: Infinity
-    },
-        theirsCurrent = theirs.hunks[theirsIndex] || {
-      oldStart: Infinity
-    };
-
-    if (hunkBefore(mineCurrent, theirsCurrent)) {
-      // This patch does not overlap with any of the others, yay.
-      ret.hunks.push(cloneHunk(mineCurrent, mineOffset));
-      mineIndex++;
-      theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;
-    } else if (hunkBefore(theirsCurrent, mineCurrent)) {
-      // This patch does not overlap with any of the others, yay.
-      ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));
-      theirsIndex++;
-      mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;
-    } else {
-      // Overlap, merge as best we can
-      var mergedHunk = {
-        oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),
-        oldLines: 0,
-        newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),
-        newLines: 0,
-        lines: []
-      };
-      mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);
-      theirsIndex++;
-      mineIndex++;
-      ret.hunks.push(mergedHunk);
-    }
-  }
-
-  return ret;
-}
-
-function loadPatch(param, base) {
-  if (typeof param === 'string') {
-    if (/^@@/m.test(param) || /^Index:/m.test(param)) {
-      return parsePatch(param)[0];
-    }
-
-    if (!base) {
-      throw new Error('Must provide a base reference or pass in a patch');
-    }
-
-    return structuredPatch(undefined, undefined, base, param);
-  }
-
-  return param;
-}
-
-function fileNameChanged(patch) {
-  return patch.newFileName && patch.newFileName !== patch.oldFileName;
-}
-
-function selectField(index, mine, theirs) {
-  if (mine === theirs) {
-    return mine;
-  } else {
-    index.conflict = true;
-    return {
-      mine: mine,
-      theirs: theirs
-    };
-  }
-}
-
-function hunkBefore(test, check) {
-  return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;
-}
-
-function cloneHunk(hunk, offset) {
-  return {
-    oldStart: hunk.oldStart,
-    oldLines: hunk.oldLines,
-    newStart: hunk.newStart + offset,
-    newLines: hunk.newLines,
-    lines: hunk.lines
-  };
-}
-
-function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {
-  // This will generally result in a conflicted hunk, but there are cases where the context
-  // is the only overlap where we can successfully merge the content here.
-  var mine = {
-    offset: mineOffset,
-    lines: mineLines,
-    index: 0
-  },
-      their = {
-    offset: theirOffset,
-    lines: theirLines,
-    index: 0
-  }; // Handle any leading content
-
-  insertLeading(hunk, mine, their);
-  insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each.
-
-  while (mine.index < mine.lines.length && their.index < their.lines.length) {
-    var mineCurrent = mine.lines[mine.index],
-        theirCurrent = their.lines[their.index];
-
-    if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {
-      // Both modified ...
-      mutualChange(hunk, mine, their);
-    } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {
-      var _hunk$lines;
-
-      // Mine inserted
-      (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine)));
-    } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {
-      var _hunk$lines2;
-
-      // Theirs inserted
-      (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their)));
-    } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {
-      // Mine removed or edited
-      removal(hunk, mine, their);
-    } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {
-      // Their removed or edited
-      removal(hunk, their, mine, true);
-    } else if (mineCurrent === theirCurrent) {
-      // Context identity
-      hunk.lines.push(mineCurrent);
-      mine.index++;
-      their.index++;
-    } else {
-      // Context mismatch
-      conflict(hunk, collectChange(mine), collectChange(their));
-    }
-  } // Now push anything that may be remaining
-
-
-  insertTrailing(hunk, mine);
-  insertTrailing(hunk, their);
-  calcLineCount(hunk);
-}
-
-function mutualChange(hunk, mine, their) {
-  var myChanges = collectChange(mine),
-      theirChanges = collectChange(their);
-
-  if (allRemoves(myChanges) && allRemoves(theirChanges)) {
-    // Special case for remove changes that are supersets of one another
-    if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {
-      var _hunk$lines3;
-
-      (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges));
-
-      return;
-    } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {
-      var _hunk$lines4;
-
-      (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges));
-
-      return;
-    }
-  } else if (arrayEqual(myChanges, theirChanges)) {
-    var _hunk$lines5;
-
-    (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges));
-
-    return;
-  }
-
-  conflict(hunk, myChanges, theirChanges);
-}
-
-function removal(hunk, mine, their, swap) {
-  var myChanges = collectChange(mine),
-      theirChanges = collectContext(their, myChanges);
-
-  if (theirChanges.merged) {
-    var _hunk$lines6;
-
-    (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged));
-  } else {
-    conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);
-  }
-}
-
-function conflict(hunk, mine, their) {
-  hunk.conflict = true;
-  hunk.lines.push({
-    conflict: true,
-    mine: mine,
-    theirs: their
-  });
-}
-
-function insertLeading(hunk, insert, their) {
-  while (insert.offset < their.offset && insert.index < insert.lines.length) {
-    var line = insert.lines[insert.index++];
-    hunk.lines.push(line);
-    insert.offset++;
-  }
-}
-
-function insertTrailing(hunk, insert) {
-  while (insert.index < insert.lines.length) {
-    var line = insert.lines[insert.index++];
-    hunk.lines.push(line);
-  }
-}
-
-function collectChange(state) {
-  var ret = [],
-      operation = state.lines[state.index][0];
-
-  while (state.index < state.lines.length) {
-    var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change.
-
-    if (operation === '-' && line[0] === '+') {
-      operation = '+';
-    }
-
-    if (operation === line[0]) {
-      ret.push(line);
-      state.index++;
-    } else {
-      break;
-    }
-  }
-
-  return ret;
-}
-
-function collectContext(state, matchChanges) {
-  var changes = [],
-      merged = [],
-      matchIndex = 0,
-      contextChanges = false,
-      conflicted = false;
-
-  while (matchIndex < matchChanges.length && state.index < state.lines.length) {
-    var change = state.lines[state.index],
-        match = matchChanges[matchIndex]; // Once we've hit our add, then we are done
-
-    if (match[0] === '+') {
-      break;
-    }
-
-    contextChanges = contextChanges || change[0] !== ' ';
-    merged.push(match);
-    matchIndex++; // Consume any additions in the other block as a conflict to attempt
-    // to pull in the remaining context after this
-
-    if (change[0] === '+') {
-      conflicted = true;
-
-      while (change[0] === '+') {
-        changes.push(change);
-        change = state.lines[++state.index];
-      }
-    }
-
-    if (match.substr(1) === change.substr(1)) {
-      changes.push(change);
-      state.index++;
-    } else {
-      conflicted = true;
-    }
-  }
-
-  if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {
-    conflicted = true;
-  }
-
-  if (conflicted) {
-    return changes;
-  }
-
-  while (matchIndex < matchChanges.length) {
-    merged.push(matchChanges[matchIndex++]);
-  }
-
-  return {
-    merged: merged,
-    changes: changes
-  };
-}
-
-function allRemoves(changes) {
-  return changes.reduce(function (prev, change) {
-    return prev && change[0] === '-';
-  }, true);
-}
-
-function skipRemoveSuperset(state, removeChanges, delta) {
-  for (var i = 0; i < delta; i++) {
-    var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);
-
-    if (state.lines[state.index + i] !== ' ' + changeContent) {
-      return false;
-    }
-  }
-
-  state.index += delta;
-  return true;
-}
-
-function calcOldNewLineCount(lines) {
-  var oldLines = 0;
-  var newLines = 0;
-  lines.forEach(function (line) {
-    if (typeof line !== 'string') {
-      var myCount = calcOldNewLineCount(line.mine);
-      var theirCount = calcOldNewLineCount(line.theirs);
-
-      if (oldLines !== undefined) {
-        if (myCount.oldLines === theirCount.oldLines) {
-          oldLines += myCount.oldLines;
-        } else {
-          oldLines = undefined;
-        }
-      }
-
-      if (newLines !== undefined) {
-        if (myCount.newLines === theirCount.newLines) {
-          newLines += myCount.newLines;
-        } else {
-          newLines = undefined;
-        }
-      }
-    } else {
-      if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {
-        newLines++;
-      }
-
-      if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {
-        oldLines++;
-      }
-    }
-  });
-  return {
-    oldLines: oldLines,
-    newLines: newLines
-  };
-}
-
-// See: http://code.google.com/p/google-diff-match-patch/wiki/API
-function convertChangesToDMP(changes) {
-  var ret = [],
-      change,
-      operation;
-
-  for (var i = 0; i < changes.length; i++) {
-    change = changes[i];
-
-    if (change.added) {
-      operation = 1;
-    } else if (change.removed) {
-      operation = -1;
-    } else {
-      operation = 0;
-    }
-
-    ret.push([operation, change.value]);
-  }
-
-  return ret;
-}
-
-function convertChangesToXML(changes) {
-  var ret = [];
-
-  for (var i = 0; i < changes.length; i++) {
-    var change = changes[i];
-
-    if (change.added) {
-      ret.push('');
-    } else if (change.removed) {
-      ret.push('');
-    }
-
-    ret.push(escapeHTML(change.value));
-
-    if (change.added) {
-      ret.push('');
-    } else if (change.removed) {
-      ret.push('');
-    }
-  }
-
-  return ret.join('');
-}
-
-function escapeHTML(s) {
-  var n = s;
-  n = n.replace(/&/g, '&');
-  n = n.replace(//g, '>');
-  n = n.replace(/"/g, '"');
-  return n;
-}
-
-/* See LICENSE file for terms of use */
-
-export { Diff, diffChars, diffWords, diffWordsWithSpace, diffLines, diffTrimmedLines, diffSentences, diffCss, diffJson, diffArrays, structuredPatch, createTwoFilesPatch, createPatch, applyPatch, applyPatches, parsePatch, merge, convertChangesToDMP, convertChangesToXML, canonicalize };
diff --git a/node_modules/diff/lib/index.js b/node_modules/diff/lib/index.js
deleted file mode 100644
index ff8ae91..0000000
--- a/node_modules/diff/lib/index.js
+++ /dev/null
@@ -1,216 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-Object.defineProperty(exports, "Diff", {
-  enumerable: true,
-  get: function get() {
-    return _base.default;
-  }
-});
-Object.defineProperty(exports, "diffChars", {
-  enumerable: true,
-  get: function get() {
-    return _character.diffChars;
-  }
-});
-Object.defineProperty(exports, "diffWords", {
-  enumerable: true,
-  get: function get() {
-    return _word.diffWords;
-  }
-});
-Object.defineProperty(exports, "diffWordsWithSpace", {
-  enumerable: true,
-  get: function get() {
-    return _word.diffWordsWithSpace;
-  }
-});
-Object.defineProperty(exports, "diffLines", {
-  enumerable: true,
-  get: function get() {
-    return _line.diffLines;
-  }
-});
-Object.defineProperty(exports, "diffTrimmedLines", {
-  enumerable: true,
-  get: function get() {
-    return _line.diffTrimmedLines;
-  }
-});
-Object.defineProperty(exports, "diffSentences", {
-  enumerable: true,
-  get: function get() {
-    return _sentence.diffSentences;
-  }
-});
-Object.defineProperty(exports, "diffCss", {
-  enumerable: true,
-  get: function get() {
-    return _css.diffCss;
-  }
-});
-Object.defineProperty(exports, "diffJson", {
-  enumerable: true,
-  get: function get() {
-    return _json.diffJson;
-  }
-});
-Object.defineProperty(exports, "canonicalize", {
-  enumerable: true,
-  get: function get() {
-    return _json.canonicalize;
-  }
-});
-Object.defineProperty(exports, "diffArrays", {
-  enumerable: true,
-  get: function get() {
-    return _array.diffArrays;
-  }
-});
-Object.defineProperty(exports, "applyPatch", {
-  enumerable: true,
-  get: function get() {
-    return _apply.applyPatch;
-  }
-});
-Object.defineProperty(exports, "applyPatches", {
-  enumerable: true,
-  get: function get() {
-    return _apply.applyPatches;
-  }
-});
-Object.defineProperty(exports, "parsePatch", {
-  enumerable: true,
-  get: function get() {
-    return _parse.parsePatch;
-  }
-});
-Object.defineProperty(exports, "merge", {
-  enumerable: true,
-  get: function get() {
-    return _merge.merge;
-  }
-});
-Object.defineProperty(exports, "structuredPatch", {
-  enumerable: true,
-  get: function get() {
-    return _create.structuredPatch;
-  }
-});
-Object.defineProperty(exports, "createTwoFilesPatch", {
-  enumerable: true,
-  get: function get() {
-    return _create.createTwoFilesPatch;
-  }
-});
-Object.defineProperty(exports, "createPatch", {
-  enumerable: true,
-  get: function get() {
-    return _create.createPatch;
-  }
-});
-Object.defineProperty(exports, "convertChangesToDMP", {
-  enumerable: true,
-  get: function get() {
-    return _dmp.convertChangesToDMP;
-  }
-});
-Object.defineProperty(exports, "convertChangesToXML", {
-  enumerable: true,
-  get: function get() {
-    return _xml.convertChangesToXML;
-  }
-});
-
-/*istanbul ignore end*/
-var
-/*istanbul ignore start*/
-_base = _interopRequireDefault(require("./diff/base"))
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_character = require("./diff/character")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_word = require("./diff/word")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_line = require("./diff/line")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_sentence = require("./diff/sentence")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_css = require("./diff/css")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_json = require("./diff/json")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_array = require("./diff/array")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_apply = require("./patch/apply")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_parse = require("./patch/parse")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_merge = require("./patch/merge")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_create = require("./patch/create")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_dmp = require("./convert/dmp")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_xml = require("./convert/xml")
-/*istanbul ignore end*/
-;
-
-/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/*istanbul ignore end*/
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Oz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F0ZVBhdGNofSBmcm9tICcuL3BhdGNoL2NyZWF0ZSc7XG5cbmltcG9ydCB7Y29udmVydENoYW5nZXNUb0RNUH0gZnJvbSAnLi9jb252ZXJ0L2RtcCc7XG5pbXBvcnQge2NvbnZlcnRDaGFuZ2VzVG9YTUx9IGZyb20gJy4vY29udmVydC94bWwnO1xuXG5leHBvcnQge1xuICBEaWZmLFxuXG4gIGRpZmZDaGFycyxcbiAgZGlmZldvcmRzLFxuICBkaWZmV29yZHNXaXRoU3BhY2UsXG4gIGRpZmZMaW5lcyxcbiAgZGlmZlRyaW1tZWRMaW5lcyxcbiAgZGlmZlNlbnRlbmNlcyxcblxuICBkaWZmQ3NzLFxuICBkaWZmSnNvbixcblxuICBkaWZmQXJyYXlzLFxuXG4gIHN0cnVjdHVyZWRQYXRjaCxcbiAgY3JlYXRlVHdvRmlsZXNQYXRjaCxcbiAgY3JlYXRlUGF0Y2gsXG4gIGFwcGx5UGF0Y2gsXG4gIGFwcGx5UGF0Y2hlcyxcbiAgcGFyc2VQYXRjaCxcbiAgbWVyZ2UsXG4gIGNvbnZlcnRDaGFuZ2VzVG9ETVAsXG4gIGNvbnZlcnRDaGFuZ2VzVG9YTUwsXG4gIGNhbm9uaWNhbGl6ZVxufTtcbiJdfQ==
diff --git a/node_modules/diff/lib/patch/apply.js b/node_modules/diff/lib/patch/apply.js
deleted file mode 100644
index 19bddd8..0000000
--- a/node_modules/diff/lib/patch/apply.js
+++ /dev/null
@@ -1,243 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.applyPatch = applyPatch;
-exports.applyPatches = applyPatches;
-
-/*istanbul ignore end*/
-var
-/*istanbul ignore start*/
-_parse = require("./parse")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_distanceIterator = _interopRequireDefault(require("../util/distance-iterator"))
-/*istanbul ignore end*/
-;
-
-/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/*istanbul ignore end*/
-function applyPatch(source, uniDiff) {
-  /*istanbul ignore start*/
-  var
-  /*istanbul ignore end*/
-  options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-
-  if (typeof uniDiff === 'string') {
-    uniDiff =
-    /*istanbul ignore start*/
-    (0,
-    /*istanbul ignore end*/
-
-    /*istanbul ignore start*/
-    _parse
-    /*istanbul ignore end*/
-    .
-    /*istanbul ignore start*/
-    parsePatch)
-    /*istanbul ignore end*/
-    (uniDiff);
-  }
-
-  if (Array.isArray(uniDiff)) {
-    if (uniDiff.length > 1) {
-      throw new Error('applyPatch only works with a single input.');
-    }
-
-    uniDiff = uniDiff[0];
-  } // Apply the diff to the input
-
-
-  var lines = source.split(/\r\n|[\n\v\f\r\x85]/),
-      delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [],
-      hunks = uniDiff.hunks,
-      compareLine = options.compareLine || function (lineNumber, line, operation, patchContent)
-  /*istanbul ignore start*/
-  {
-    return (
-      /*istanbul ignore end*/
-      line === patchContent
-    );
-  },
-      errorCount = 0,
-      fuzzFactor = options.fuzzFactor || 0,
-      minLine = 0,
-      offset = 0,
-      removeEOFNL,
-      addEOFNL;
-  /**
-   * Checks if the hunk exactly fits on the provided location
-   */
-
-
-  function hunkFits(hunk, toPos) {
-    for (var j = 0; j < hunk.lines.length; j++) {
-      var line = hunk.lines[j],
-          operation = line.length > 0 ? line[0] : ' ',
-          content = line.length > 0 ? line.substr(1) : line;
-
-      if (operation === ' ' || operation === '-') {
-        // Context sanity check
-        if (!compareLine(toPos + 1, lines[toPos], operation, content)) {
-          errorCount++;
-
-          if (errorCount > fuzzFactor) {
-            return false;
-          }
-        }
-
-        toPos++;
-      }
-    }
-
-    return true;
-  } // Search best fit offsets for each hunk based on the previous ones
-
-
-  for (var i = 0; i < hunks.length; i++) {
-    var hunk = hunks[i],
-        maxLine = lines.length - hunk.oldLines,
-        localOffset = 0,
-        toPos = offset + hunk.oldStart - 1;
-    var iterator =
-    /*istanbul ignore start*/
-    (0,
-    /*istanbul ignore end*/
-
-    /*istanbul ignore start*/
-    _distanceIterator
-    /*istanbul ignore end*/
-    .
-    /*istanbul ignore start*/
-    default)
-    /*istanbul ignore end*/
-    (toPos, minLine, maxLine);
-
-    for (; localOffset !== undefined; localOffset = iterator()) {
-      if (hunkFits(hunk, toPos + localOffset)) {
-        hunk.offset = offset += localOffset;
-        break;
-      }
-    }
-
-    if (localOffset === undefined) {
-      return false;
-    } // Set lower text limit to end of the current hunk, so next ones don't try
-    // to fit over already patched text
-
-
-    minLine = hunk.offset + hunk.oldStart + hunk.oldLines;
-  } // Apply patch hunks
-
-
-  var diffOffset = 0;
-
-  for (var _i = 0; _i < hunks.length; _i++) {
-    var _hunk = hunks[_i],
-        _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;
-
-    diffOffset += _hunk.newLines - _hunk.oldLines;
-
-    if (_toPos < 0) {
-      // Creating a new file
-      _toPos = 0;
-    }
-
-    for (var j = 0; j < _hunk.lines.length; j++) {
-      var line = _hunk.lines[j],
-          operation = line.length > 0 ? line[0] : ' ',
-          content = line.length > 0 ? line.substr(1) : line,
-          delimiter = _hunk.linedelimiters[j];
-
-      if (operation === ' ') {
-        _toPos++;
-      } else if (operation === '-') {
-        lines.splice(_toPos, 1);
-        delimiters.splice(_toPos, 1);
-        /* istanbul ignore else */
-      } else if (operation === '+') {
-        lines.splice(_toPos, 0, content);
-        delimiters.splice(_toPos, 0, delimiter);
-        _toPos++;
-      } else if (operation === '\\') {
-        var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null;
-
-        if (previousOperation === '+') {
-          removeEOFNL = true;
-        } else if (previousOperation === '-') {
-          addEOFNL = true;
-        }
-      }
-    }
-  } // Handle EOFNL insertion/removal
-
-
-  if (removeEOFNL) {
-    while (!lines[lines.length - 1]) {
-      lines.pop();
-      delimiters.pop();
-    }
-  } else if (addEOFNL) {
-    lines.push('');
-    delimiters.push('\n');
-  }
-
-  for (var _k = 0; _k < lines.length - 1; _k++) {
-    lines[_k] = lines[_k] + delimiters[_k];
-  }
-
-  return lines.join('');
-} // Wrapper that supports multiple file patches via callbacks.
-
-
-function applyPatches(uniDiff, options) {
-  if (typeof uniDiff === 'string') {
-    uniDiff =
-    /*istanbul ignore start*/
-    (0,
-    /*istanbul ignore end*/
-
-    /*istanbul ignore start*/
-    _parse
-    /*istanbul ignore end*/
-    .
-    /*istanbul ignore start*/
-    parsePatch)
-    /*istanbul ignore end*/
-    (uniDiff);
-  }
-
-  var currentIndex = 0;
-
-  function processIndex() {
-    var index = uniDiff[currentIndex++];
-
-    if (!index) {
-      return options.complete();
-    }
-
-    options.loadFile(index, function (err, data) {
-      if (err) {
-        return options.complete(err);
-      }
-
-      var updatedContent = applyPatch(data, index, options);
-      options.patched(index, updatedContent, function (err) {
-        if (err) {
-          return options.complete(err);
-        }
-
-        processIndex();
-      });
-    });
-  }
-
-  processIndex();
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9hcHBseS5qcyJdLCJuYW1lcyI6WyJhcHBseVBhdGNoIiwic291cmNlIiwidW5pRGlmZiIsIm9wdGlvbnMiLCJwYXJzZVBhdGNoIiwiQXJyYXkiLCJpc0FycmF5IiwibGVuZ3RoIiwiRXJyb3IiLCJsaW5lcyIsInNwbGl0IiwiZGVsaW1pdGVycyIsIm1hdGNoIiwiaHVua3MiLCJjb21wYXJlTGluZSIsImxpbmVOdW1iZXIiLCJsaW5lIiwib3BlcmF0aW9uIiwicGF0Y2hDb250ZW50IiwiZXJyb3JDb3VudCIsImZ1enpGYWN0b3IiLCJtaW5MaW5lIiwib2Zmc2V0IiwicmVtb3ZlRU9GTkwiLCJhZGRFT0ZOTCIsImh1bmtGaXRzIiwiaHVuayIsInRvUG9zIiwiaiIsImNvbnRlbnQiLCJzdWJzdHIiLCJpIiw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IFdyYXBwZXIgdGhhdCBzdXBwb3J0cyBtdWx0aXBsZSBmaWxlIHBhdGNoZXMgdmlhIGNhbGxiYWNrcy5cbmV4cG9ydCBmdW5jdGlvbiBhcHBseVBhdGNoZXModW5pRGlmZiwgb3B0aW9ucykge1xuICBpZiAodHlwZW9mIHVuaURpZmYgPT09ICdzdHJpbmcnKSB7XG4gICAgdW5pRGlmZiA9IHBhcnNlUGF0Y2godW5pRGlmZik7XG4gIH1cblxuICBsZXQgY3VycmVudEluZGV4ID0gMDtcbiAgZnVuY3Rpb24gcHJvY2Vzc0luZGV4KCkge1xuICAgIGxldCBpbmRleCA9IHVuaURpZmZbY3VycmVudEluZGV4KytdO1xuICAgIGlmICghaW5kZXgpIHtcbiAgICAgIHJldHVybiBvcHRpb25zLmNvbXBsZXRlKCk7XG4gICAgfVxuXG4gICAgb3B0aW9ucy5sb2FkRmlsZShpbmRleCwgZnVuY3Rpb24oZXJyLCBkYXRhKSB7XG4gICAgICBpZiAoZXJyKSB7XG4gICAgICAgIHJldHVybiBvcHRpb25zLmNvbXBsZXRlKGVycik7XG4gICAgICB9XG5cbiAgICAgIGxldCB1cGRhdGVkQ29udGVudCA9IGFwcGx5UGF0Y2goZGF0YSwgaW5kZXgsIG9wdGlvbnMpO1xuICAgICAgb3B0aW9ucy5wYXRjaGVkKGluZGV4LCB1cGRhdGVkQ29udGVudCwgZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICByZXR1cm4gb3B0aW9ucy5jb21wbGV0ZShlcnIpO1xuICAgICAgICB9XG5cbiAgICAgICAgcHJvY2Vzc0luZGV4KCk7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxuICBwcm9jZXNzSW5kZXgoKTtcbn1cbiJdfQ==
diff --git a/node_modules/diff/lib/patch/create.js b/node_modules/diff/lib/patch/create.js
deleted file mode 100644
index d1717fe..0000000
--- a/node_modules/diff/lib/patch/create.js
+++ /dev/null
@@ -1,247 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.structuredPatch = structuredPatch;
-exports.createTwoFilesPatch = createTwoFilesPatch;
-exports.createPatch = createPatch;
-
-/*istanbul ignore end*/
-var
-/*istanbul ignore start*/
-_line = require("../diff/line")
-/*istanbul ignore end*/
-;
-
-/*istanbul ignore start*/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
-
-function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
-
-function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
-
-function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
-
-/*istanbul ignore end*/
-function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
-  if (!options) {
-    options = {};
-  }
-
-  if (typeof options.context === 'undefined') {
-    options.context = 4;
-  }
-
-  var diff =
-  /*istanbul ignore start*/
-  (0,
-  /*istanbul ignore end*/
-
-  /*istanbul ignore start*/
-  _line
-  /*istanbul ignore end*/
-  .
-  /*istanbul ignore start*/
-  diffLines)
-  /*istanbul ignore end*/
-  (oldStr, newStr, options);
-  diff.push({
-    value: '',
-    lines: []
-  }); // Append an empty value to make cleanup easier
-
-  function contextLines(lines) {
-    return lines.map(function (entry) {
-      return ' ' + entry;
-    });
-  }
-
-  var hunks = [];
-  var oldRangeStart = 0,
-      newRangeStart = 0,
-      curRange = [],
-      oldLine = 1,
-      newLine = 1;
-
-  /*istanbul ignore start*/
-  var _loop = function _loop(
-  /*istanbul ignore end*/
-  i) {
-    var current = diff[i],
-        lines = current.lines || current.value.replace(/\n$/, '').split('\n');
-    current.lines = lines;
-
-    if (current.added || current.removed) {
-      /*istanbul ignore start*/
-      var _curRange;
-
-      /*istanbul ignore end*/
-      // If we have previous context, start with that
-      if (!oldRangeStart) {
-        var prev = diff[i - 1];
-        oldRangeStart = oldLine;
-        newRangeStart = newLine;
-
-        if (prev) {
-          curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
-          oldRangeStart -= curRange.length;
-          newRangeStart -= curRange.length;
-        }
-      } // Output our changes
-
-
-      /*istanbul ignore start*/
-      (_curRange =
-      /*istanbul ignore end*/
-      curRange).push.
-      /*istanbul ignore start*/
-      apply
-      /*istanbul ignore end*/
-      (
-      /*istanbul ignore start*/
-      _curRange
-      /*istanbul ignore end*/
-      ,
-      /*istanbul ignore start*/
-      _toConsumableArray(
-      /*istanbul ignore end*/
-      lines.map(function (entry) {
-        return (current.added ? '+' : '-') + entry;
-      }))); // Track the updated file position
-
-
-      if (current.added) {
-        newLine += lines.length;
-      } else {
-        oldLine += lines.length;
-      }
-    } else {
-      // Identical context lines. Track line changes
-      if (oldRangeStart) {
-        // Close out any changes that have been output (or join overlapping)
-        if (lines.length <= options.context * 2 && i < diff.length - 2) {
-          /*istanbul ignore start*/
-          var _curRange2;
-
-          /*istanbul ignore end*/
-          // Overlapping
-
-          /*istanbul ignore start*/
-          (_curRange2 =
-          /*istanbul ignore end*/
-          curRange).push.
-          /*istanbul ignore start*/
-          apply
-          /*istanbul ignore end*/
-          (
-          /*istanbul ignore start*/
-          _curRange2
-          /*istanbul ignore end*/
-          ,
-          /*istanbul ignore start*/
-          _toConsumableArray(
-          /*istanbul ignore end*/
-          contextLines(lines)));
-        } else {
-          /*istanbul ignore start*/
-          var _curRange3;
-
-          /*istanbul ignore end*/
-          // end the range and output
-          var contextSize = Math.min(lines.length, options.context);
-
-          /*istanbul ignore start*/
-          (_curRange3 =
-          /*istanbul ignore end*/
-          curRange).push.
-          /*istanbul ignore start*/
-          apply
-          /*istanbul ignore end*/
-          (
-          /*istanbul ignore start*/
-          _curRange3
-          /*istanbul ignore end*/
-          ,
-          /*istanbul ignore start*/
-          _toConsumableArray(
-          /*istanbul ignore end*/
-          contextLines(lines.slice(0, contextSize))));
-
-          var hunk = {
-            oldStart: oldRangeStart,
-            oldLines: oldLine - oldRangeStart + contextSize,
-            newStart: newRangeStart,
-            newLines: newLine - newRangeStart + contextSize,
-            lines: curRange
-          };
-
-          if (i >= diff.length - 2 && lines.length <= options.context) {
-            // EOF is inside this hunk
-            var oldEOFNewline = /\n$/.test(oldStr);
-            var newEOFNewline = /\n$/.test(newStr);
-            var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
-
-            if (!oldEOFNewline && noNlBeforeAdds) {
-              // special case: old has no eol and no trailing context; no-nl can end up before adds
-              curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file');
-            }
-
-            if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
-              curRange.push('\\ No newline at end of file');
-            }
-          }
-
-          hunks.push(hunk);
-          oldRangeStart = 0;
-          newRangeStart = 0;
-          curRange = [];
-        }
-      }
-
-      oldLine += lines.length;
-      newLine += lines.length;
-    }
-  };
-
-  for (var i = 0; i < diff.length; i++) {
-    /*istanbul ignore start*/
-    _loop(
-    /*istanbul ignore end*/
-    i);
-  }
-
-  return {
-    oldFileName: oldFileName,
-    newFileName: newFileName,
-    oldHeader: oldHeader,
-    newHeader: newHeader,
-    hunks: hunks
-  };
-}
-
-function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
-  var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
-  var ret = [];
-
-  if (oldFileName == newFileName) {
-    ret.push('Index: ' + oldFileName);
-  }
-
-  ret.push('===================================================================');
-  ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader));
-  ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
-
-  for (var i = 0; i < diff.hunks.length; i++) {
-    var hunk = diff.hunks[i];
-    ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
-    ret.push.apply(ret, hunk.lines);
-  }
-
-  return ret.join('\n') + '\n';
-}
-
-function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
-  return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9jcmVhdGUuanMiXSwibmFtZXMiOlsic3RydWN0dXJlZFBhdGNoIiwib2xkRmlsZU5hbWUiLCJuZXdGaWxlTmFtZSIsIm9sZFN0ciIsIm5ld1N0ciIsIm9sZEhlYWRlciIsIm5ld0hlYWRlciIsIm9wdGlvbnMiLCJjb250ZXh0IiwiZGlmZiIsImRpZmZMaW5lcyIsInB1c2giLCJ2YWx1ZSIsImxpbmVzIiwiY29udGV4dExpbmVzIiwibWFwIiwiZW50cnkiLCJodW5rcyIsIm9sZFJhbmdlU3RhcnQiLCJuZXdSYW5nZVN0YXJ0IiwiY3VyUmFuZ2UiLCJvbGRMaW5lIiwibmV3TGluZSIsImkiLCJjdXJyZW50IiwicmVwbGFjZSIsInNwbGl0IiwiYWRkZWQiLCJyZW1vdmVkIiwicHJldiIsInNsaWNlIiwibGVuZ3RoIiwiY29udGV4dFNpemUiLCJNYXRoIiwibWluIiwiaHVuayIsIm9sZFN0YXJ0Iiwib2xkTGluZXMiLCJuZXdTdGFydCIsIm5ld0xpbmVzIiwib2xkRU9GTmV3bGluZSIsInRlc3QiLCJuZXdFT0ZOZXdsaW5lIiwibm9ObEJlZm9yZUFkZHMiLCJzcGxpY2UiLCJjcmVhdGVUd29GaWxlc1BhdGNoIiwicmV0IiwiYXBwbHkiLCJqb2luIiwiY3JlYXRlUGF0Y2giLCJmaWxlTmFtZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0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0xpbmVzXG4gICAgICArICcgQEAnXG4gICAgKTtcbiAgICByZXQucHVzaC5hcHBseShyZXQsIGh1bmsubGluZXMpO1xuICB9XG5cbiAgcmV0dXJuIHJldC5qb2luKCdcXG4nKSArICdcXG4nO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlUGF0Y2goZmlsZU5hbWUsIG9sZFN0ciwgbmV3U3RyLCBvbGRIZWFkZXIsIG5ld0hlYWRlciwgb3B0aW9ucykge1xuICByZXR1cm4gY3JlYXRlVHdvRmlsZXNQYXRjaChmaWxlTmFtZSwgZmlsZU5hbWUsIG9sZFN0ciwgbmV3U3RyLCBvbGRIZWFkZXIsIG5ld0hlYWRlciwgb3B0aW9ucyk7XG59XG4iXX0=
diff --git a/node_modules/diff/lib/patch/merge.js b/node_modules/diff/lib/patch/merge.js
deleted file mode 100644
index bbd429a..0000000
--- a/node_modules/diff/lib/patch/merge.js
+++ /dev/null
@@ -1,609 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.calcLineCount = calcLineCount;
-exports.merge = merge;
-
-/*istanbul ignore end*/
-var
-/*istanbul ignore start*/
-_create = require("./create")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_parse = require("./parse")
-/*istanbul ignore end*/
-;
-
-var
-/*istanbul ignore start*/
-_array = require("../util/array")
-/*istanbul ignore end*/
-;
-
-/*istanbul ignore start*/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
-
-function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
-
-function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
-
-function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
-
-/*istanbul ignore end*/
-function calcLineCount(hunk) {
-  /*istanbul ignore start*/
-  var _calcOldNewLineCount =
-  /*istanbul ignore end*/
-  calcOldNewLineCount(hunk.lines),
-      oldLines = _calcOldNewLineCount.oldLines,
-      newLines = _calcOldNewLineCount.newLines;
-
-  if (oldLines !== undefined) {
-    hunk.oldLines = oldLines;
-  } else {
-    delete hunk.oldLines;
-  }
-
-  if (newLines !== undefined) {
-    hunk.newLines = newLines;
-  } else {
-    delete hunk.newLines;
-  }
-}
-
-function merge(mine, theirs, base) {
-  mine = loadPatch(mine, base);
-  theirs = loadPatch(theirs, base);
-  var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning.
-  // Leaving sanity checks on this to the API consumer that may know more about the
-  // meaning in their own context.
-
-  if (mine.index || theirs.index) {
-    ret.index = mine.index || theirs.index;
-  }
-
-  if (mine.newFileName || theirs.newFileName) {
-    if (!fileNameChanged(mine)) {
-      // No header or no change in ours, use theirs (and ours if theirs does not exist)
-      ret.oldFileName = theirs.oldFileName || mine.oldFileName;
-      ret.newFileName = theirs.newFileName || mine.newFileName;
-      ret.oldHeader = theirs.oldHeader || mine.oldHeader;
-      ret.newHeader = theirs.newHeader || mine.newHeader;
-    } else if (!fileNameChanged(theirs)) {
-      // No header or no change in theirs, use ours
-      ret.oldFileName = mine.oldFileName;
-      ret.newFileName = mine.newFileName;
-      ret.oldHeader = mine.oldHeader;
-      ret.newHeader = mine.newHeader;
-    } else {
-      // Both changed... figure it out
-      ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);
-      ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);
-      ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);
-      ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);
-    }
-  }
-
-  ret.hunks = [];
-  var mineIndex = 0,
-      theirsIndex = 0,
-      mineOffset = 0,
-      theirsOffset = 0;
-
-  while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {
-    var mineCurrent = mine.hunks[mineIndex] || {
-      oldStart: Infinity
-    },
-        theirsCurrent = theirs.hunks[theirsIndex] || {
-      oldStart: Infinity
-    };
-
-    if (hunkBefore(mineCurrent, theirsCurrent)) {
-      // This patch does not overlap with any of the others, yay.
-      ret.hunks.push(cloneHunk(mineCurrent, mineOffset));
-      mineIndex++;
-      theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;
-    } else if (hunkBefore(theirsCurrent, mineCurrent)) {
-      // This patch does not overlap with any of the others, yay.
-      ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));
-      theirsIndex++;
-      mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;
-    } else {
-      // Overlap, merge as best we can
-      var mergedHunk = {
-        oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),
-        oldLines: 0,
-        newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),
-        newLines: 0,
-        lines: []
-      };
-      mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);
-      theirsIndex++;
-      mineIndex++;
-      ret.hunks.push(mergedHunk);
-    }
-  }
-
-  return ret;
-}
-
-function loadPatch(param, base) {
-  if (typeof param === 'string') {
-    if (/^@@/m.test(param) || /^Index:/m.test(param)) {
-      return (
-        /*istanbul ignore start*/
-        (0,
-        /*istanbul ignore end*/
-
-        /*istanbul ignore start*/
-        _parse
-        /*istanbul ignore end*/
-        .
-        /*istanbul ignore start*/
-        parsePatch)
-        /*istanbul ignore end*/
-        (param)[0]
-      );
-    }
-
-    if (!base) {
-      throw new Error('Must provide a base reference or pass in a patch');
-    }
-
-    return (
-      /*istanbul ignore start*/
-      (0,
-      /*istanbul ignore end*/
-
-      /*istanbul ignore start*/
-      _create
-      /*istanbul ignore end*/
-      .
-      /*istanbul ignore start*/
-      structuredPatch)
-      /*istanbul ignore end*/
-      (undefined, undefined, base, param)
-    );
-  }
-
-  return param;
-}
-
-function fileNameChanged(patch) {
-  return patch.newFileName && patch.newFileName !== patch.oldFileName;
-}
-
-function selectField(index, mine, theirs) {
-  if (mine === theirs) {
-    return mine;
-  } else {
-    index.conflict = true;
-    return {
-      mine: mine,
-      theirs: theirs
-    };
-  }
-}
-
-function hunkBefore(test, check) {
-  return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;
-}
-
-function cloneHunk(hunk, offset) {
-  return {
-    oldStart: hunk.oldStart,
-    oldLines: hunk.oldLines,
-    newStart: hunk.newStart + offset,
-    newLines: hunk.newLines,
-    lines: hunk.lines
-  };
-}
-
-function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {
-  // This will generally result in a conflicted hunk, but there are cases where the context
-  // is the only overlap where we can successfully merge the content here.
-  var mine = {
-    offset: mineOffset,
-    lines: mineLines,
-    index: 0
-  },
-      their = {
-    offset: theirOffset,
-    lines: theirLines,
-    index: 0
-  }; // Handle any leading content
-
-  insertLeading(hunk, mine, their);
-  insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each.
-
-  while (mine.index < mine.lines.length && their.index < their.lines.length) {
-    var mineCurrent = mine.lines[mine.index],
-        theirCurrent = their.lines[their.index];
-
-    if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {
-      // Both modified ...
-      mutualChange(hunk, mine, their);
-    } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {
-      /*istanbul ignore start*/
-      var _hunk$lines;
-
-      /*istanbul ignore end*/
-      // Mine inserted
-
-      /*istanbul ignore start*/
-      (_hunk$lines =
-      /*istanbul ignore end*/
-      hunk.lines).push.
-      /*istanbul ignore start*/
-      apply
-      /*istanbul ignore end*/
-      (
-      /*istanbul ignore start*/
-      _hunk$lines
-      /*istanbul ignore end*/
-      ,
-      /*istanbul ignore start*/
-      _toConsumableArray(
-      /*istanbul ignore end*/
-      collectChange(mine)));
-    } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {
-      /*istanbul ignore start*/
-      var _hunk$lines2;
-
-      /*istanbul ignore end*/
-      // Theirs inserted
-
-      /*istanbul ignore start*/
-      (_hunk$lines2 =
-      /*istanbul ignore end*/
-      hunk.lines).push.
-      /*istanbul ignore start*/
-      apply
-      /*istanbul ignore end*/
-      (
-      /*istanbul ignore start*/
-      _hunk$lines2
-      /*istanbul ignore end*/
-      ,
-      /*istanbul ignore start*/
-      _toConsumableArray(
-      /*istanbul ignore end*/
-      collectChange(their)));
-    } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {
-      // Mine removed or edited
-      removal(hunk, mine, their);
-    } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {
-      // Their removed or edited
-      removal(hunk, their, mine, true);
-    } else if (mineCurrent === theirCurrent) {
-      // Context identity
-      hunk.lines.push(mineCurrent);
-      mine.index++;
-      their.index++;
-    } else {
-      // Context mismatch
-      conflict(hunk, collectChange(mine), collectChange(their));
-    }
-  } // Now push anything that may be remaining
-
-
-  insertTrailing(hunk, mine);
-  insertTrailing(hunk, their);
-  calcLineCount(hunk);
-}
-
-function mutualChange(hunk, mine, their) {
-  var myChanges = collectChange(mine),
-      theirChanges = collectChange(their);
-
-  if (allRemoves(myChanges) && allRemoves(theirChanges)) {
-    // Special case for remove changes that are supersets of one another
-    if (
-    /*istanbul ignore start*/
-    (0,
-    /*istanbul ignore end*/
-
-    /*istanbul ignore start*/
-    _array
-    /*istanbul ignore end*/
-    .
-    /*istanbul ignore start*/
-    arrayStartsWith)
-    /*istanbul ignore end*/
-    (myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {
-      /*istanbul ignore start*/
-      var _hunk$lines3;
-
-      /*istanbul ignore end*/
-
-      /*istanbul ignore start*/
-      (_hunk$lines3 =
-      /*istanbul ignore end*/
-      hunk.lines).push.
-      /*istanbul ignore start*/
-      apply
-      /*istanbul ignore end*/
-      (
-      /*istanbul ignore start*/
-      _hunk$lines3
-      /*istanbul ignore end*/
-      ,
-      /*istanbul ignore start*/
-      _toConsumableArray(
-      /*istanbul ignore end*/
-      myChanges));
-
-      return;
-    } else if (
-    /*istanbul ignore start*/
-    (0,
-    /*istanbul ignore end*/
-
-    /*istanbul ignore start*/
-    _array
-    /*istanbul ignore end*/
-    .
-    /*istanbul ignore start*/
-    arrayStartsWith)
-    /*istanbul ignore end*/
-    (theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {
-      /*istanbul ignore start*/
-      var _hunk$lines4;
-
-      /*istanbul ignore end*/
-
-      /*istanbul ignore start*/
-      (_hunk$lines4 =
-      /*istanbul ignore end*/
-      hunk.lines).push.
-      /*istanbul ignore start*/
-      apply
-      /*istanbul ignore end*/
-      (
-      /*istanbul ignore start*/
-      _hunk$lines4
-      /*istanbul ignore end*/
-      ,
-      /*istanbul ignore start*/
-      _toConsumableArray(
-      /*istanbul ignore end*/
-      theirChanges));
-
-      return;
-    }
-  } else if (
-  /*istanbul ignore start*/
-  (0,
-  /*istanbul ignore end*/
-
-  /*istanbul ignore start*/
-  _array
-  /*istanbul ignore end*/
-  .
-  /*istanbul ignore start*/
-  arrayEqual)
-  /*istanbul ignore end*/
-  (myChanges, theirChanges)) {
-    /*istanbul ignore start*/
-    var _hunk$lines5;
-
-    /*istanbul ignore end*/
-
-    /*istanbul ignore start*/
-    (_hunk$lines5 =
-    /*istanbul ignore end*/
-    hunk.lines).push.
-    /*istanbul ignore start*/
-    apply
-    /*istanbul ignore end*/
-    (
-    /*istanbul ignore start*/
-    _hunk$lines5
-    /*istanbul ignore end*/
-    ,
-    /*istanbul ignore start*/
-    _toConsumableArray(
-    /*istanbul ignore end*/
-    myChanges));
-
-    return;
-  }
-
-  conflict(hunk, myChanges, theirChanges);
-}
-
-function removal(hunk, mine, their, swap) {
-  var myChanges = collectChange(mine),
-      theirChanges = collectContext(their, myChanges);
-
-  if (theirChanges.merged) {
-    /*istanbul ignore start*/
-    var _hunk$lines6;
-
-    /*istanbul ignore end*/
-
-    /*istanbul ignore start*/
-    (_hunk$lines6 =
-    /*istanbul ignore end*/
-    hunk.lines).push.
-    /*istanbul ignore start*/
-    apply
-    /*istanbul ignore end*/
-    (
-    /*istanbul ignore start*/
-    _hunk$lines6
-    /*istanbul ignore end*/
-    ,
-    /*istanbul ignore start*/
-    _toConsumableArray(
-    /*istanbul ignore end*/
-    theirChanges.merged));
-  } else {
-    conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);
-  }
-}
-
-function conflict(hunk, mine, their) {
-  hunk.conflict = true;
-  hunk.lines.push({
-    conflict: true,
-    mine: mine,
-    theirs: their
-  });
-}
-
-function insertLeading(hunk, insert, their) {
-  while (insert.offset < their.offset && insert.index < insert.lines.length) {
-    var line = insert.lines[insert.index++];
-    hunk.lines.push(line);
-    insert.offset++;
-  }
-}
-
-function insertTrailing(hunk, insert) {
-  while (insert.index < insert.lines.length) {
-    var line = insert.lines[insert.index++];
-    hunk.lines.push(line);
-  }
-}
-
-function collectChange(state) {
-  var ret = [],
-      operation = state.lines[state.index][0];
-
-  while (state.index < state.lines.length) {
-    var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change.
-
-    if (operation === '-' && line[0] === '+') {
-      operation = '+';
-    }
-
-    if (operation === line[0]) {
-      ret.push(line);
-      state.index++;
-    } else {
-      break;
-    }
-  }
-
-  return ret;
-}
-
-function collectContext(state, matchChanges) {
-  var changes = [],
-      merged = [],
-      matchIndex = 0,
-      contextChanges = false,
-      conflicted = false;
-
-  while (matchIndex < matchChanges.length && state.index < state.lines.length) {
-    var change = state.lines[state.index],
-        match = matchChanges[matchIndex]; // Once we've hit our add, then we are done
-
-    if (match[0] === '+') {
-      break;
-    }
-
-    contextChanges = contextChanges || change[0] !== ' ';
-    merged.push(match);
-    matchIndex++; // Consume any additions in the other block as a conflict to attempt
-    // to pull in the remaining context after this
-
-    if (change[0] === '+') {
-      conflicted = true;
-
-      while (change[0] === '+') {
-        changes.push(change);
-        change = state.lines[++state.index];
-      }
-    }
-
-    if (match.substr(1) === change.substr(1)) {
-      changes.push(change);
-      state.index++;
-    } else {
-      conflicted = true;
-    }
-  }
-
-  if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {
-    conflicted = true;
-  }
-
-  if (conflicted) {
-    return changes;
-  }
-
-  while (matchIndex < matchChanges.length) {
-    merged.push(matchChanges[matchIndex++]);
-  }
-
-  return {
-    merged: merged,
-    changes: changes
-  };
-}
-
-function allRemoves(changes) {
-  return changes.reduce(function (prev, change) {
-    return prev && change[0] === '-';
-  }, true);
-}
-
-function skipRemoveSuperset(state, removeChanges, delta) {
-  for (var i = 0; i < delta; i++) {
-    var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);
-
-    if (state.lines[state.index + i] !== ' ' + changeContent) {
-      return false;
-    }
-  }
-
-  state.index += delta;
-  return true;
-}
-
-function calcOldNewLineCount(lines) {
-  var oldLines = 0;
-  var newLines = 0;
-  lines.forEach(function (line) {
-    if (typeof line !== 'string') {
-      var myCount = calcOldNewLineCount(line.mine);
-      var theirCount = calcOldNewLineCount(line.theirs);
-
-      if (oldLines !== undefined) {
-        if (myCount.oldLines === theirCount.oldLines) {
-          oldLines += myCount.oldLines;
-        } else {
-          oldLines = undefined;
-        }
-      }
-
-      if (newLines !== undefined) {
-        if (myCount.newLines === theirCount.newLines) {
-          newLines += myCount.newLines;
-        } else {
-          newLines = undefined;
-        }
-      }
-    } else {
-      if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {
-        newLines++;
-      }
-
-      if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {
-        oldLines++;
-      }
-    }
-  });
-  return {
-    oldLines: oldLines,
-    newLines: newLines
-  };
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9tZXJnZS5qcyJdLCJuYW1lcyI6WyJjYWxjTGluZUNvdW50IiwiaHVuayIsImN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G4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbmV3TGluZXMgPSB1bmRlZmluZWQ7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKG5ld0xpbmVzICE9PSB1bmRlZmluZWQgJiYgKGxpbmVbMF0gPT09ICcrJyB8fCBsaW5lWzBdID09PSAnICcpKSB7XG4gICAgICAgIG5ld0xpbmVzKys7XG4gICAgICB9XG4gICAgICBpZiAob2xkTGluZXMgIT09IHVuZGVmaW5lZCAmJiAobGluZVswXSA9PT0gJy0nIHx8IGxpbmVbMF0gPT09ICcgJykpIHtcbiAgICAgICAgb2xkTGluZXMrKztcbiAgICAgIH1cbiAgICB9XG4gIH0pO1xuXG4gIHJldHVybiB7b2xkTGluZXMsIG5ld0xpbmVzfTtcbn1cbiJdfQ==
diff --git a/node_modules/diff/lib/patch/parse.js b/node_modules/diff/lib/patch/parse.js
deleted file mode 100644
index b65d5c6..0000000
--- a/node_modules/diff/lib/patch/parse.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.parsePatch = parsePatch;
-
-/*istanbul ignore end*/
-function parsePatch(uniDiff) {
-  /*istanbul ignore start*/
-  var
-  /*istanbul ignore end*/
-  options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-  var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/),
-      delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [],
-      list = [],
-      i = 0;
-
-  function parseIndex() {
-    var index = {};
-    list.push(index); // Parse diff metadata
-
-    while (i < diffstr.length) {
-      var line = diffstr[i]; // File header found, end parsing diff metadata
-
-      if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) {
-        break;
-      } // Diff index
-
-
-      var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
-
-      if (header) {
-        index.index = header[1];
-      }
-
-      i++;
-    } // Parse file headers if they are defined. Unified diff requires them, but
-    // there's no technical issues to have an isolated hunk without file header
-
-
-    parseFileHeader(index);
-    parseFileHeader(index); // Parse hunks
-
-    index.hunks = [];
-
-    while (i < diffstr.length) {
-      var _line = diffstr[i];
-
-      if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) {
-        break;
-      } else if (/^@@/.test(_line)) {
-        index.hunks.push(parseHunk());
-      } else if (_line && options.strict) {
-        // Ignore unexpected content unless in strict mode
-        throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));
-      } else {
-        i++;
-      }
-    }
-  } // Parses the --- and +++ headers, if none are found, no lines
-  // are consumed.
-
-
-  function parseFileHeader(index) {
-    var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]);
-
-    if (fileHeader) {
-      var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';
-      var data = fileHeader[2].split('\t', 2);
-      var fileName = data[0].replace(/\\\\/g, '\\');
-
-      if (/^".*"$/.test(fileName)) {
-        fileName = fileName.substr(1, fileName.length - 2);
-      }
-
-      index[keyPrefix + 'FileName'] = fileName;
-      index[keyPrefix + 'Header'] = (data[1] || '').trim();
-      i++;
-    }
-  } // Parses a hunk
-  // This assumes that we are at the start of a hunk.
-
-
-  function parseHunk() {
-    var chunkHeaderIndex = i,
-        chunkHeaderLine = diffstr[i++],
-        chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
-    var hunk = {
-      oldStart: +chunkHeader[1],
-      oldLines: +chunkHeader[2] || 1,
-      newStart: +chunkHeader[3],
-      newLines: +chunkHeader[4] || 1,
-      lines: [],
-      linedelimiters: []
-    };
-    var addCount = 0,
-        removeCount = 0;
-
-    for (; i < diffstr.length; i++) {
-      // Lines starting with '---' could be mistaken for the "remove line" operation
-      // But they could be the header for the next file. Therefore prune such cases out.
-      if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) {
-        break;
-      }
-
-      var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];
-
-      if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
-        hunk.lines.push(diffstr[i]);
-        hunk.linedelimiters.push(delimiters[i] || '\n');
-
-        if (operation === '+') {
-          addCount++;
-        } else if (operation === '-') {
-          removeCount++;
-        } else if (operation === ' ') {
-          addCount++;
-          removeCount++;
-        }
-      } else {
-        break;
-      }
-    } // Handle the empty block count case
-
-
-    if (!addCount && hunk.newLines === 1) {
-      hunk.newLines = 0;
-    }
-
-    if (!removeCount && hunk.oldLines === 1) {
-      hunk.oldLines = 0;
-    } // Perform optional sanity checking
-
-
-    if (options.strict) {
-      if (addCount !== hunk.newLines) {
-        throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
-      }
-
-      if (removeCount !== hunk.oldLines) {
-        throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
-      }
-    }
-
-    return hunk;
-  }
-
-  while (i < diffstr.length) {
-    parseIndex();
-  }
-
-  return list;
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9wYXJzZS5qcyJdLCJuYW1lcyI6WyJwYXJzZVBhdGNoIiwidW5pRGlmZiIsIm9wdGlvbnMiLCJkaWZmc3RyIiwic3BsaXQiLCJkZWxpbWl0ZXJzIiwibWF0Y2giLCJsaXN0IiwiaSIsInBhcnNlSW5kZXgiLCJpbmRleCIsInB1c2giLCJsZW5ndGgiLCJsaW5lIiwidGVzdCIsImhlYWRlciIsImV4ZWMiLCJwYXJzZUZpbGVIZWFkZXIiLCJodW5rcyIsInBhcnNlSHVuayIsInN0cmljdCIsIkVycm9yIiwiSlNPTiIsInN0cmluZ2lmeSIsImZpbGVIZWFkZXIiLCJr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pIHtcbiAgICAgICAgICBhZGRDb3VudCsrO1xuICAgICAgICAgIHJlbW92ZUNvdW50Kys7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIEhhbmRsZSB0aGUgZW1wdHkgYmxvY2sgY291bnQgY2FzZVxuICAgIGlmICghYWRkQ291bnQgJiYgaHVuay5uZXdMaW5lcyA9PT0gMSkge1xuICAgICAgaHVuay5uZXdMaW5lcyA9IDA7XG4gICAgfVxuICAgIGlmICghcmVtb3ZlQ291bnQgJiYgaHVuay5vbGRMaW5lcyA9PT0gMSkge1xuICAgICAgaHVuay5vbGRMaW5lcyA9IDA7XG4gICAgfVxuXG4gICAgLy8gUGVyZm9ybSBvcHRpb25hbCBzYW5pdHkgY2hlY2tpbmdcbiAgICBpZiAob3B0aW9ucy5zdHJpY3QpIHtcbiAgICAgIGlmIChhZGRDb3VudCAhPT0gaHVuay5uZXdMaW5lcykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0FkZGVkIGxpbmUgY291bnQgZGlkIG5vdCBtYXRjaCBmb3IgaHVuayBhdCBsaW5lICcgKyAoY2h1bmtIZWFkZXJJbmRleCArIDEpKTtcbiAgICAgIH1cbiAgICAgIGlmIChyZW1vdmVDb3VudCAhPT0gaHVuay5vbGRMaW5lcykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1JlbW92ZWQgbGluZSBjb3VudCBkaWQgbm90IG1hdGNoIGZvciBodW5rIGF0IGxpbmUgJyArIChjaHVua0hlYWRlckluZGV4ICsgMSkpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBodW5rO1xuICB9XG5cbiAgd2hpbGUgKGkgPCBkaWZmc3RyLmxlbmd0aCkge1xuICAgIHBhcnNlSW5kZXgoKTtcbiAgfVxuXG4gIHJldHVybiBsaXN0O1xufVxuIl19
diff --git a/node_modules/diff/lib/util/array.js b/node_modules/diff/lib/util/array.js
deleted file mode 100644
index aecf67a..0000000
--- a/node_modules/diff/lib/util/array.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.arrayEqual = arrayEqual;
-exports.arrayStartsWith = arrayStartsWith;
-
-/*istanbul ignore end*/
-function arrayEqual(a, b) {
-  if (a.length !== b.length) {
-    return false;
-  }
-
-  return arrayStartsWith(a, b);
-}
-
-function arrayStartsWith(array, start) {
-  if (start.length > array.length) {
-    return false;
-  }
-
-  for (var i = 0; i < start.length; i++) {
-    if (start[i] !== array[i]) {
-      return false;
-    }
-  }
-
-  return true;
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2FycmF5LmpzIl0sIm5hbWVzIjpbImFycmF5RXF1YWwiLCJhIiwiYiIsImxlbmd0aCIsImFycmF5U3RhcnRzV2l0aCIsImFycmF5Iiwic3RhcnQiLCJpIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQU8sU0FBU0EsVUFBVCxDQUFvQkMsQ0FBcEIsRUFBdUJDLENBQXZCLEVBQTBCO0FBQy9CLE1BQUlELENBQUMsQ0FBQ0UsTUFBRixLQUFhRCxDQUFDLENBQUNDLE1BQW5CLEVBQTJCO0FBQ3pCLFdBQU8sS0FBUDtBQUNEOztBQUVELFNBQU9DLGVBQWUsQ0FBQ0gsQ0FBRCxFQUFJQyxDQUFKLENBQXRCO0FBQ0Q7O0FBRU0sU0FBU0UsZUFBVCxDQUF5QkMsS0FBekIsRUFBZ0NDLEtBQWhDLEVBQXVDO0FBQzVDLE1BQUlBLEtBQUssQ0FBQ0gsTUFBTixHQUFlRSxLQUFLLENBQUNGLE1BQXpCLEVBQWlDO0FBQy9CLFdBQU8sS0FBUDtBQUNEOztBQUVELE9BQUssSUFBSUksQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR0QsS0FBSyxDQUFDSCxNQUExQixFQUFrQ0ksQ0FBQyxFQUFuQyxFQUF1QztBQUNyQyxRQUFJRCxLQUFLLENBQUNDLENBQUQsQ0FBTCxLQUFhRixLQUFLLENBQUNFLENBQUQsQ0FBdEIsRUFBMkI7QUFDekIsYUFBTyxLQUFQO0FBQ0Q7QUFDRjs7QUFFRCxTQUFPLElBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBhcnJheUVxdWFsKGEsIGIpIHtcbiAgaWYgKGEubGVuZ3RoICE9PSBiLmxlbmd0aCkge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHJldHVybiBhcnJheVN0YXJ0c1dpdGgoYSwgYik7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBhcnJheVN0YXJ0c1dpdGgoYXJyYXksIHN0YXJ0KSB7XG4gIGlmIChzdGFydC5sZW5ndGggPiBhcnJheS5sZW5ndGgpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBmb3IgKGxldCBpID0gMDsgaSA8IHN0YXJ0Lmxlbmd0aDsgaSsrKSB7XG4gICAgaWYgKHN0YXJ0W2ldICE9PSBhcnJheVtpXSkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuIl19
diff --git a/node_modules/diff/lib/util/distance-iterator.js b/node_modules/diff/lib/util/distance-iterator.js
deleted file mode 100644
index 5edbaf8..0000000
--- a/node_modules/diff/lib/util/distance-iterator.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.default = _default;
-
-/*istanbul ignore end*/
-// Iterator that traverses in the range of [min, max], stepping
-// by distance from a given start position. I.e. for [0, 4], with
-// start of 2, this will iterate 2, 3, 1, 4, 0.
-function
-/*istanbul ignore start*/
-_default
-/*istanbul ignore end*/
-(start, minLine, maxLine) {
-  var wantForward = true,
-      backwardExhausted = false,
-      forwardExhausted = false,
-      localOffset = 1;
-  return function iterator() {
-    if (wantForward && !forwardExhausted) {
-      if (backwardExhausted) {
-        localOffset++;
-      } else {
-        wantForward = false;
-      } // Check if trying to fit beyond text length, and if not, check it fits
-      // after offset location (or desired location on first iteration)
-
-
-      if (start + localOffset <= maxLine) {
-        return localOffset;
-      }
-
-      forwardExhausted = true;
-    }
-
-    if (!backwardExhausted) {
-      if (!forwardExhausted) {
-        wantForward = true;
-      } // Check if trying to fit before text beginning, and if not, check it fits
-      // before offset location
-
-
-      if (minLine <= start - localOffset) {
-        return -localOffset++;
-      }
-
-      backwardExhausted = true;
-      return iterator();
-    } // We tried to fit hunk before text beginning and beyond text length, then
-    // hunk can't fit on the text. Return undefined
-
-  };
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2Rpc3RhbmNlLWl0ZXJhdG9yLmpzIl0sIm5hbWVzIjpbInN0YXJ0IiwibWluTGluZSIsIm1heExpbmUiLCJ3YW50Rm9yd2FyZCIsImJhY2t3YXJkRXhoYXVzdGVkIiwiZm9yd2FyZEV4aGF1c3RlZCIsImxvY2FsT2Zmc2V0IiwiaXRlcmF0b3IiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBO0FBQ0E7QUFDQTtBQUNlO0FBQUE7QUFBQTtBQUFBO0FBQUEsQ0FBU0EsS0FBVCxFQUFnQkMsT0FBaEIsRUFBeUJDLE9BQXpCLEVBQWtDO0FBQy9DLE1BQUlDLFdBQVcsR0FBRyxJQUFsQjtBQUFBLE1BQ0lDLGlCQUFpQixHQUFHLEtBRHhCO0FBQUEsTUFFSUMsZ0JBQWdCLEdBQUcsS0FGdkI7QUFBQSxNQUdJQyxXQUFXLEdBQUcsQ0FIbEI7QUFLQSxTQUFPLFNBQVNDLF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25cbiAgICAgIGlmIChtaW5MaW5lIDw9IHN0YXJ0IC0gbG9jYWxPZmZzZXQpIHtcbiAgICAgICAgcmV0dXJuIC1sb2NhbE9mZnNldCsrO1xuICAgICAgfVxuXG4gICAgICBiYWNrd2FyZEV4aGF1c3RlZCA9IHRydWU7XG4gICAgICByZXR1cm4gaXRlcmF0b3IoKTtcbiAgICB9XG5cbiAgICAvLyBXZSB0cmllZCB0byBmaXQgaHVuayBiZWZvcmUgdGV4dCBiZWdpbm5pbmcgYW5kIGJleW9uZCB0ZXh0IGxlbmd0aCwgdGhlblxuICAgIC8vIGh1bmsgY2FuJ3QgZml0IG9uIHRoZSB0ZXh0LiBSZXR1cm4gdW5kZWZpbmVkXG4gIH07XG59XG4iXX0=
diff --git a/node_modules/diff/lib/util/params.js b/node_modules/diff/lib/util/params.js
deleted file mode 100644
index e838eb2..0000000
--- a/node_modules/diff/lib/util/params.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*istanbul ignore start*/
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.generateOptions = generateOptions;
-
-/*istanbul ignore end*/
-function generateOptions(options, defaults) {
-  if (typeof options === 'function') {
-    defaults.callback = options;
-  } else if (options) {
-    for (var name in options) {
-      /* istanbul ignore else */
-      if (options.hasOwnProperty(name)) {
-        defaults[name] = options[name];
-      }
-    }
-  }
-
-  return defaults;
-}
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL3BhcmFtcy5qcyJdLCJuYW1lcyI6WyJnZW5lcmF0ZU9wdGlvbnMiLCJvcHRpb25zIiwiZGVmYXVsdHMiLCJjYWxsYmFjayIsIm5hbWUiLCJoYXNPd25Qcm9wZXJ0eSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQU8sU0FBU0EsZUFBVCxDQUF5QkMsT0FBekIsRUFBa0NDLFFBQWxDLEVBQTRDO0FBQ2pELE1BQUksT0FBT0QsT0FBUCxLQUFtQixVQUF2QixFQUFtQztBQUNqQ0MsSUFBQUEsUUFBUSxDQUFDQyxRQUFULEdBQW9CRixPQUFwQjtBQUNELEdBRkQsTUFFTyxJQUFJQSxPQUFKLEVBQWE7QUFDbEIsU0FBSyxJQUFJRyxJQUFULElBQWlCSCxPQUFqQixFQUEwQjtBQUN4QjtBQUNBLFVBQUlBLE9BQU8sQ0FBQ0ksY0FBUixDQUF1QkQsSUFBdkIsQ0FBSixFQUFrQztBQUNoQ0YsUUFBQUEsUUFBUSxDQUFDRSxJQUFELENBQVIsR0FBaUJILE9BQU8sQ0FBQ0csSUFBRCxDQUF4QjtBQUNEO0FBQ0Y7QUFDRjs7QUFDRCxTQUFPRixRQUFQO0FBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gZ2VuZXJhdGVPcHRpb25zKG9wdGlvbnMsIGRlZmF1bHRzKSB7XG4gIGlmICh0eXBlb2Ygb3B0aW9ucyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgIGRlZmF1bHRzLmNhbGxiYWNrID0gb3B0aW9ucztcbiAgfSBlbHNlIGlmIChvcHRpb25zKSB7XG4gICAgZm9yIChsZXQgbmFtZSBpbiBvcHRpb25zKSB7XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgaWYgKG9wdGlvbnMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcbiAgICAgICAgZGVmYXVsdHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgfVxuICAgIH1cbiAgfVxuICByZXR1cm4gZGVmYXVsdHM7XG59XG4iXX0=
diff --git a/node_modules/diff/package.json b/node_modules/diff/package.json
deleted file mode 100644
index 3308b32..0000000
--- a/node_modules/diff/package.json
+++ /dev/null
@@ -1,73 +0,0 @@
-{
-  "name": "diff",
-  "version": "4.0.2",
-  "description": "A javascript text diff implementation.",
-  "keywords": [
-    "diff",
-    "javascript"
-  ],
-  "maintainers": [
-    "Kevin Decker  (http://incaseofstairs.com)"
-  ],
-  "bugs": {
-    "email": "kpdecker@gmail.com",
-    "url": "http://github.com/kpdecker/jsdiff/issues"
-  },
-  "license": "BSD-3-Clause",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/kpdecker/jsdiff.git"
-  },
-  "engines": {
-    "node": ">=0.3.1"
-  },
-  "main": "./lib/index.js",
-  "module": "./lib/index.es6.js",
-  "browser": "./dist/diff.js",
-  "scripts": {
-    "clean": "rm -rf lib/ dist/",
-    "build:node": "yarn babel --out-dir lib  --source-maps=inline src",
-    "test": "grunt"
-  },
-  "devDependencies": {
-    "@babel/cli": "^7.2.3",
-    "@babel/core": "^7.2.2",
-    "@babel/plugin-transform-modules-commonjs": "^7.2.0",
-    "@babel/preset-env": "^7.2.3",
-    "@babel/register": "^7.0.0",
-    "babel-eslint": "^10.0.1",
-    "babel-loader": "^8.0.5",
-    "chai": "^4.2.0",
-    "colors": "^1.3.3",
-    "eslint": "^5.12.0",
-    "grunt": "^1.0.3",
-    "grunt-babel": "^8.0.0",
-    "grunt-clean": "^0.4.0",
-    "grunt-cli": "^1.3.2",
-    "grunt-contrib-clean": "^2.0.0",
-    "grunt-contrib-copy": "^1.0.0",
-    "grunt-contrib-uglify": "^4.0.0",
-    "grunt-contrib-watch": "^1.1.0",
-    "grunt-eslint": "^21.0.0",
-    "grunt-exec": "^3.0.0",
-    "grunt-karma": "^3.0.1",
-    "grunt-mocha-istanbul": "^5.0.2",
-    "grunt-mocha-test": "^0.13.3",
-    "grunt-webpack": "^3.1.3",
-    "istanbul": "github:kpdecker/istanbul",
-    "karma": "^3.1.4",
-    "karma-chrome-launcher": "^2.2.0",
-    "karma-mocha": "^1.3.0",
-    "karma-mocha-reporter": "^2.0.0",
-    "karma-sauce-launcher": "^2.0.2",
-    "karma-sourcemap-loader": "^0.3.6",
-    "karma-webpack": "^3.0.5",
-    "mocha": "^5.2.0",
-    "rollup": "^1.0.2",
-    "rollup-plugin-babel": "^4.2.0",
-    "semver": "^5.6.0",
-    "webpack": "^4.28.3",
-    "webpack-dev-server": "^3.1.14"
-  },
-  "optionalDependencies": {}
-}
diff --git a/node_modules/diff/release-notes.md b/node_modules/diff/release-notes.md
deleted file mode 100644
index edc4cd3..0000000
--- a/node_modules/diff/release-notes.md
+++ /dev/null
@@ -1,261 +0,0 @@
-# Release Notes
-
-## Development
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v4.0.1...master)
-
-## v4.0.1 - January 6th, 2019
-- Fix main reference path - b826104
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v4.0.0...v4.0.1)
-
-## v4.0.0 - January 5th, 2019
-- [#94](https://github.com/kpdecker/jsdiff/issues/94) - Missing "No newline at end of file" when comparing two texts that do not end in newlines ([@federicotdn](https://api.github.com/users/federicotdn))
-- [#227](https://github.com/kpdecker/jsdiff/issues/227) - Licence
-- [#199](https://github.com/kpdecker/jsdiff/issues/199) - Import statement for jsdiff
-- [#159](https://github.com/kpdecker/jsdiff/issues/159) - applyPatch affecting wrong line number with with new lines
-- [#8](https://github.com/kpdecker/jsdiff/issues/8) - A new state "replace"
-- Drop ie9 from karma targets - 79c31bd
-- Upgrade deps. Convert from webpack to rollup - 2c1a29c
-- Make ()[]"' as word boundaries between each other - f27b899
-- jsdiff: Replaced phantomJS by chrome - ec3114e
-- Add yarn.lock to .npmignore - 29466d8
-
-Compatibility notes:
-- Bower and Component packages no longer supported
-
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v3.5.0...v4.0.0)
-
-## v3.5.0 - March 4th, 2018
-- Omit redundant slice in join method of diffArrays - 1023590
-- Support patches with empty lines - fb0f208
-- Accept a custom JSON replacer function for JSON diffing - 69c7f0a
-- Optimize parch header parser - 2aec429
-- Fix typos - e89c832
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v3.4.0...v3.5.0)
-
-## v3.4.0 - October 7th, 2017
-- [#183](https://github.com/kpdecker/jsdiff/issues/183) - Feature request: ability to specify a custom equality checker for `diffArrays`
-- [#173](https://github.com/kpdecker/jsdiff/issues/173) - Bug: diffArrays gives wrong result on array of booleans
-- [#158](https://github.com/kpdecker/jsdiff/issues/158) - diffArrays will not compare the empty string in array?
-- comparator for custom equality checks - 30e141e
-- count oldLines and newLines when there are conflicts - 53bf384
-- Fix: diffArrays can compare falsey items - 9e24284
-- Docs: Replace grunt with npm test - 00e2f94
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v3.3.1...v3.4.0)
-
-## v3.3.1 - September 3rd, 2017
-- [#141](https://github.com/kpdecker/jsdiff/issues/141) - Cannot apply patch because my file delimiter is "/r/n" instead of "/n"
-- [#192](https://github.com/kpdecker/jsdiff/pull/192) - Fix: Bad merge when adding new files (#189)
-- correct spelling mistake - 21fa478
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v3.3.0...v3.3.1)
-
-## v3.3.0 - July 5th, 2017
-- [#114](https://github.com/kpdecker/jsdiff/issues/114) - /patch/merge not exported
-- Gracefully accept invalid newStart in hunks, same as patch(1) does. - d8a3635
-- Use regex rather than starts/ends with for parsePatch - 6cab62c
-- Add browser flag - e64f674
-- refactor: simplified code a bit more - 8f8e0f2
-- refactor: simplified code a bit - b094a6f
-- fix: some corrections re ignoreCase option - 3c78fd0
-- ignoreCase option - 3cbfbb5
-- Sanitize filename while parsing patches - 2fe8129
-- Added better installation methods - aced50b
-- Simple export of functionality - 8690f31
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v3.2.0...v3.3.0)
-
-## v3.2.0 - December 26th, 2016
-- [#156](https://github.com/kpdecker/jsdiff/pull/156) - Add `undefinedReplacement` option to `diffJson` ([@ewnd9](https://api.github.com/users/ewnd9))
-- [#154](https://github.com/kpdecker/jsdiff/pull/154) - Add `examples` and `images` to `.npmignore`. ([@wtgtybhertgeghgtwtg](https://api.github.com/users/wtgtybhertgeghgtwtg))
-- [#153](https://github.com/kpdecker/jsdiff/pull/153) - feat(structuredPatch): Pass options to diffLines ([@Kiougar](https://api.github.com/users/Kiougar))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v3.1.0...v3.2.0)
-
-## v3.1.0 - November 27th, 2016
-- [#146](https://github.com/kpdecker/jsdiff/pull/146) - JsDiff.diffArrays to compare arrays ([@wvanderdeijl](https://api.github.com/users/wvanderdeijl))
-- [#144](https://github.com/kpdecker/jsdiff/pull/144) - Split file using all possible line delimiter instead of hard-coded "/n" and join lines back using the original delimiters ([@soulbeing](https://api.github.com/users/soulbeing))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v3.0.1...v3.1.0)
-
-## v3.0.1 - October 9th, 2016
-- [#139](https://github.com/kpdecker/jsdiff/pull/139) - Make README.md look nicer in npmjs.com ([@takenspc](https://api.github.com/users/takenspc))
-- [#135](https://github.com/kpdecker/jsdiff/issues/135) - parsePatch combines patches from multiple files into a single IUniDiff when there is no "Index" line ([@ramya-rao-a](https://api.github.com/users/ramya-rao-a))
-- [#124](https://github.com/kpdecker/jsdiff/issues/124) - IE7/IE8 failure since 2.0.0 ([@boneskull](https://api.github.com/users/boneskull))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v3.0.0...v3.0.1)
-
-## v3.0.0 - August 23rd, 2016
-- [#130](https://github.com/kpdecker/jsdiff/pull/130) - Add callback argument to applyPatches `patched` option ([@piranna](https://api.github.com/users/piranna))
-- [#120](https://github.com/kpdecker/jsdiff/pull/120) - Correctly handle file names containing spaces ([@adius](https://api.github.com/users/adius))
-- [#119](https://github.com/kpdecker/jsdiff/pull/119) - Do single reflow ([@wifiextender](https://api.github.com/users/wifiextender))
-- [#117](https://github.com/kpdecker/jsdiff/pull/117) - Make more usable with long strings. ([@abnbgist](https://api.github.com/users/abnbgist))
-
-Compatibility notes:
-- applyPatches patch callback now is async and requires the callback be called to continue operation
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.3...v3.0.0)
-
-## v2.2.3 - May 31st, 2016
-- [#118](https://github.com/kpdecker/jsdiff/pull/118) - Add a fix for applying 0-length destination patches ([@chaaz](https://api.github.com/users/chaaz))
-- [#115](https://github.com/kpdecker/jsdiff/pull/115) - Fixed grammar in README ([@krizalys](https://api.github.com/users/krizalys))
-- [#113](https://github.com/kpdecker/jsdiff/pull/113) - fix typo ([@vmazare](https://api.github.com/users/vmazare))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.2...v2.2.3)
-
-## v2.2.2 - March 13th, 2016
-- [#102](https://github.com/kpdecker/jsdiff/issues/102) - diffJson with dates, returns empty curly braces  ([@dr-dimitru](https://api.github.com/users/dr-dimitru))
-- [#97](https://github.com/kpdecker/jsdiff/issues/97) - Whitespaces & diffWords ([@faiwer](https://api.github.com/users/faiwer))
-- [#92](https://github.com/kpdecker/jsdiff/pull/92) - Fixes typo in the readme ([@bg451](https://api.github.com/users/bg451))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.1...v2.2.2)
-
-## v2.2.1 - November 12th, 2015
-- [#89](https://github.com/kpdecker/jsdiff/pull/89) - add in display selector to readme ([@FranDias](https://api.github.com/users/FranDias))
-- [#88](https://github.com/kpdecker/jsdiff/pull/88) - Split diffs based on file headers instead of 'Index:' metadata ([@piranna](https://api.github.com/users/piranna))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.0...v2.2.1)
-
-## v2.2.0 - October 29th, 2015
-- [#80](https://github.com/kpdecker/jsdiff/pull/80) - Fix a typo: applyPath ->  applyPatch ([@fluxxu](https://api.github.com/users/fluxxu))
-- [#83](https://github.com/kpdecker/jsdiff/pull/83) - Add basic fuzzy matching to applyPatch ([@piranna](https://github.com/piranna))
-[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.0...v2.2.0)
-
-## v2.2.0 - October 29th, 2015
-- [#80](https://github.com/kpdecker/jsdiff/pull/80) - Fix a typo: applyPath ->  applyPatch ([@fluxxu](https://api.github.com/users/fluxxu))
-- [#83](https://github.com/kpdecker/jsdiff/pull/83) - Add basic fuzzy matching to applyPatch ([@piranna](https://github.com/piranna))
-[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.3...v2.2.0)
-
-## v2.1.3 - September 30th, 2015
-- [#78](https://github.com/kpdecker/jsdiff/pull/78) - fix: error throwing when apply patch to empty string ([@21paradox](https://api.github.com/users/21paradox))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.2...v2.1.3)
-
-## v2.1.2 - September 23rd, 2015
-- [#76](https://github.com/kpdecker/jsdiff/issues/76) - diff headers give error ([@piranna](https://api.github.com/users/piranna))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.1...v2.1.2)
-
-## v2.1.1 - September 9th, 2015
-- [#73](https://github.com/kpdecker/jsdiff/issues/73) - Is applyPatches() exposed in the API? ([@davidparsson](https://api.github.com/users/davidparsson))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.0...v2.1.1)
-
-## v2.1.0 - August 27th, 2015
-- [#72](https://github.com/kpdecker/jsdiff/issues/72) - Consider using options object API for flag permutations ([@kpdecker](https://api.github.com/users/kpdecker))
-- [#70](https://github.com/kpdecker/jsdiff/issues/70) - diffWords treats \n at the end as significant whitespace ([@nesQuick](https://api.github.com/users/nesQuick))
-- [#69](https://github.com/kpdecker/jsdiff/issues/69) - Missing count ([@wfalkwallace](https://api.github.com/users/wfalkwallace))
-- [#68](https://github.com/kpdecker/jsdiff/issues/68) - diffLines seems broken ([@wfalkwallace](https://api.github.com/users/wfalkwallace))
-- [#60](https://github.com/kpdecker/jsdiff/issues/60) - Support multiple diff hunks ([@piranna](https://api.github.com/users/piranna))
-- [#54](https://github.com/kpdecker/jsdiff/issues/54) - Feature Request: 3-way merge ([@mog422](https://api.github.com/users/mog422))
-- [#42](https://github.com/kpdecker/jsdiff/issues/42) - Fuzz factor for applyPatch ([@stuartpb](https://api.github.com/users/stuartpb))
-- Move whitespace ignore out of equals method - 542063c
-- Include source maps in babel output - 7f7ab21
-- Merge diff/line and diff/patch implementations - 1597705
-- Drop map utility method - 1ddc939
-- Documentation for parsePatch and applyPatches - 27c4b77
-
-Compatibility notes:
-- The undocumented ignoreWhitespace flag has been removed from the Diff equality check directly. This implementation may be copied to diff utilities if dependencies existed on this functionality.
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v2.0.2...v2.1.0)
-
-## v2.0.2 - August 8th, 2015
-- [#67](https://github.com/kpdecker/jsdiff/issues/67) - cannot require from npm module in node ([@commenthol](https://api.github.com/users/commenthol))
-- Convert to chai since we don’t support IE8 - a96bbad
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v2.0.1...v2.0.2)
-
-## v2.0.1 - August 7th, 2015
-- Add release build at proper step - 57542fd
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v2.0.0...v2.0.1)
-
-## v2.0.0 - August 7th, 2015
-- [#66](https://github.com/kpdecker/jsdiff/issues/66) - Add karma and sauce tests ([@kpdecker](https://api.github.com/users/kpdecker))
-- [#65](https://github.com/kpdecker/jsdiff/issues/65) - Create component repository for bower ([@kpdecker](https://api.github.com/users/kpdecker))
-- [#64](https://github.com/kpdecker/jsdiff/issues/64) - Automatically call removeEmpty for all tokenizer calls ([@kpdecker](https://api.github.com/users/kpdecker))
-- [#62](https://github.com/kpdecker/jsdiff/pull/62) - Allow access to structured object representation of patch data ([@bittrance](https://api.github.com/users/bittrance))
-- [#61](https://github.com/kpdecker/jsdiff/pull/61) - Use svg instead of png to get better image quality ([@PeterDaveHello](https://api.github.com/users/PeterDaveHello))
-- [#29](https://github.com/kpdecker/jsdiff/issues/29) - word tokenizer works only for 7 bit ascii ([@plasmagunman](https://api.github.com/users/plasmagunman))
-
-Compatibility notes:
-- `this.removeEmpty` is now called automatically for all instances. If this is not desired, this may be overridden on a per instance basis.
-- The library has been refactored to use some ES6 features. The external APIs should remain the same, but bower projects that directly referenced the repository will now have to point to the [components/jsdiff](https://github.com/components/jsdiff) repository.
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v1.4.0...v2.0.0)
-
-## v1.4.0 - May 6th, 2015
-- [#57](https://github.com/kpdecker/jsdiff/issues/57) - createPatch -> applyPatch failed. ([@mog422](https://api.github.com/users/mog422))
-- [#56](https://github.com/kpdecker/jsdiff/pull/56) - Two files patch ([@rgeissert](https://api.github.com/users/rgeissert))
-- [#14](https://github.com/kpdecker/jsdiff/issues/14) - Flip added and removed order? ([@jakesandlund](https://api.github.com/users/jakesandlund))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v1.3.2...v1.4.0)
-
-## v1.3.2 - March 30th, 2015
-- [#53](https://github.com/kpdecker/jsdiff/pull/53) - Updated README.MD with Bower installation instructions ([@ofbriggs](https://api.github.com/users/ofbriggs))
-- [#49](https://github.com/kpdecker/jsdiff/issues/49) - Cannot read property 'oldlines' of undefined ([@nwtn](https://api.github.com/users/nwtn))
-- [#44](https://github.com/kpdecker/jsdiff/issues/44) - invalid-meta jsdiff is missing "main" entry in bower.json
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v1.3.1...v1.3.2)
-
-## v1.3.1 - March 13th, 2015
-- [#52](https://github.com/kpdecker/jsdiff/pull/52) - Fix for #51 Wrong result of JsDiff.diffLines ([@felicienfrancois](https://api.github.com/users/felicienfrancois))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v1.3.0...v1.3.1)
-
-## v1.3.0 - March 2nd, 2015
-- [#47](https://github.com/kpdecker/jsdiff/pull/47) - Adding Diff Trimmed Lines ([@JamesGould123](https://api.github.com/users/JamesGould123))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v1.2.2...v1.3.0)
-
-## v1.2.2 - January 26th, 2015
-- [#45](https://github.com/kpdecker/jsdiff/pull/45) - Fix AMD module loading ([@pedrocarrico](https://api.github.com/users/pedrocarrico))
-- [#43](https://github.com/kpdecker/jsdiff/pull/43) - added a bower file ([@nbrustein](https://api.github.com/users/nbrustein))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v1.2.1...v1.2.2)
-
-## v1.2.1 - December 26th, 2014
-- [#41](https://github.com/kpdecker/jsdiff/pull/41) - change condition of using node export system. ([@ironhee](https://api.github.com/users/ironhee))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v1.2.0...v1.2.1)
-
-## v1.2.0 - November 29th, 2014
-- [#37](https://github.com/kpdecker/jsdiff/pull/37) - Add support for sentences. ([@vmariano](https://api.github.com/users/vmariano))
-- [#28](https://github.com/kpdecker/jsdiff/pull/28) - Implemented diffJson ([@papandreou](https://api.github.com/users/papandreou))
-- [#27](https://github.com/kpdecker/jsdiff/issues/27) - Slow to execute over diffs with a large number of changes ([@termi](https://api.github.com/users/termi))
-- Allow for optional async diffing - 19385b9
-- Fix diffChars implementation - eaa44ed
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v1.1.0...v1.2.0)
-
-## v1.1.0 - November 25th, 2014
-- [#33](https://github.com/kpdecker/jsdiff/pull/33) - AMD and global exports ([@ovcharik](https://api.github.com/users/ovcharik))
-- [#32](https://github.com/kpdecker/jsdiff/pull/32) - Add support for component ([@vmariano](https://api.github.com/users/vmariano))
-- [#31](https://github.com/kpdecker/jsdiff/pull/31) - Don't rely on Array.prototype.map ([@papandreou](https://api.github.com/users/papandreou))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.8...v1.1.0)
-
-## v1.0.8 - December 22nd, 2013
-- [#24](https://github.com/kpdecker/jsdiff/pull/24) - Handle windows newlines on non windows machines. ([@benogle](https://api.github.com/users/benogle))
-- [#23](https://github.com/kpdecker/jsdiff/pull/23) - Prettied up the API formatting a little, and added basic node and web examples ([@airportyh](https://api.github.com/users/airportyh))
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.7...v1.0.8)
-
-## v1.0.7 - September 11th, 2013
-
-- [#22](https://github.com/kpdecker/jsdiff/pull/22) - Added variant of WordDiff that doesn't ignore whitespace differences ([@papandreou](https://api.github.com/users/papandreou)
-
-- Add 0.10 to travis tests - 243a526
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.6...v1.0.7)
-
-## v1.0.6 - August 30th, 2013
-
-- [#19](https://github.com/kpdecker/jsdiff/pull/19) - Explicitly define contents of npm package ([@sindresorhus](https://api.github.com/users/sindresorhus)
-
-[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.5...v1.0.6)
diff --git a/node_modules/diff/runtime.js b/node_modules/diff/runtime.js
deleted file mode 100644
index 82ea7e6..0000000
--- a/node_modules/diff/runtime.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('@babel/register')({
-  ignore: ['lib', 'node_modules']
-});
diff --git a/node_modules/esbuild/bin/esbuild b/node_modules/esbuild/bin/esbuild
index cfc84e7..60132d6 100755
--- a/node_modules/esbuild/bin/esbuild
+++ b/node_modules/esbuild/bin/esbuild
@@ -199,7 +199,7 @@ for your current platform.`);
         "node_modules",
         ".cache",
         "esbuild",
-        `pnpapi-${pkg.replace("/", "-")}-${"0.17.10"}-${path.basename(subpath)}`
+        `pnpapi-${pkg.replace("/", "-")}-${"0.19.2"}-${path.basename(subpath)}`
       );
       if (!fs.existsSync(binTargetPath)) {
         fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
diff --git a/node_modules/esbuild/install.js b/node_modules/esbuild/install.js
index b2fab4b..be1e34f 100644
--- a/node_modules/esbuild/install.js
+++ b/node_modules/esbuild/install.js
@@ -88,6 +88,7 @@ var path2 = require("path");
 var zlib = require("zlib");
 var https = require("https");
 var child_process = require("child_process");
+var versionFromPackageJSON = require(path2.join(__dirname, "package.json")).version;
 var toPath = path2.join(__dirname, "bin", "esbuild");
 var isToPathJS = true;
 function validateBinaryVersion(...command) {
@@ -127,8 +128,8 @@ which means the "esbuild" binary executable can't be run. You can either:
     }
     throw err;
   }
-  if (stdout !== "0.17.10") {
-    throw new Error(`Expected ${JSON.stringify("0.17.10")} but got ${JSON.stringify(stdout)}`);
+  if (stdout !== versionFromPackageJSON) {
+    throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`);
   }
 }
 function isYarn() {
@@ -180,7 +181,7 @@ function installUsingNPM(pkg, subpath, binPath) {
   try {
     fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
     child_process.execSync(
-      `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.17.10"}`,
+      `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`,
       { cwd: installDir, stdio: "pipe", env }
     );
     const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
@@ -231,7 +232,7 @@ function maybeOptimizePackage(binPath) {
   }
 }
 async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
-  const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${"0.17.10"}.tgz`;
+  const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${versionFromPackageJSON}.tgz`;
   console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
   try {
     fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
diff --git a/node_modules/esbuild/lib/main.d.ts b/node_modules/esbuild/lib/main.d.ts
index 215e98d..d938a6d 100644
--- a/node_modules/esbuild/lib/main.d.ts
+++ b/node_modules/esbuild/lib/main.d.ts
@@ -1,6 +1,6 @@
 export type Platform = 'browser' | 'node' | 'neutral'
 export type Format = 'iife' | 'cjs' | 'esm'
-export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'text' | 'ts' | 'tsx'
+export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx'
 export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent'
 export type Charset = 'ascii' | 'utf8'
 export type Drop = 'console' | 'debugger'
@@ -36,6 +36,8 @@ interface CommonOptions {
   mangleCache?: Record
   /** Documentation: https://esbuild.github.io/api/#drop */
   drop?: Drop[]
+  /** Documentation: https://esbuild.github.io/api/#drop-labels */
+  dropLabels?: string[]
   /** Documentation: https://esbuild.github.io/api/#minify */
   minify?: boolean
   /** Documentation: https://esbuild.github.io/api/#minify */
@@ -44,6 +46,8 @@ interface CommonOptions {
   minifyIdentifiers?: boolean
   /** Documentation: https://esbuild.github.io/api/#minify */
   minifySyntax?: boolean
+  /** Documentation: https://esbuild.github.io/api/#line-limit */
+  lineLimit?: number
   /** Documentation: https://esbuild.github.io/api/#charset */
   charset?: Charset
   /** Documentation: https://esbuild.github.io/api/#tree-shaking */
@@ -79,6 +83,28 @@ interface CommonOptions {
   logLimit?: number
   /** Documentation: https://esbuild.github.io/api/#log-override */
   logOverride?: Record
+
+  /** Documentation: https://esbuild.github.io/api/#tsconfig-raw */
+  tsconfigRaw?: string | TsconfigRaw
+}
+
+export interface TsconfigRaw {
+  compilerOptions?: {
+    alwaysStrict?: boolean
+    baseUrl?: string
+    experimentalDecorators?: boolean
+    importsNotUsedAsValues?: 'remove' | 'preserve' | 'error'
+    jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev'
+    jsxFactory?: string
+    jsxFragmentFactory?: string
+    jsxImportSource?: string
+    paths?: Record
+    preserveValueImports?: boolean
+    strict?: boolean
+    target?: string
+    useDefineForClassFields?: boolean
+    verbatimModuleSyntax?: boolean
+  }
 }
 
 export interface BuildOptions extends CommonOptions {
@@ -185,21 +211,21 @@ export interface Location {
 
 export interface OutputFile {
   path: string
-  /** "text" as bytes */
   contents: Uint8Array
+  hash: string
   /** "contents" as text (changes automatically with "contents") */
   readonly text: string
 }
 
-export interface BuildResult {
+export interface BuildResult {
   errors: Message[]
   warnings: Message[]
   /** Only when "write: false" */
-  outputFiles: OutputFile[] | (SpecificOptions['write'] extends false ? never : undefined)
+  outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined)
   /** Only when "metafile: true" */
-  metafile: Metafile | (SpecificOptions['metafile'] extends true ? never : undefined)
+  metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined)
   /** Only when "mangleCache" is present */
-  mangleCache: Record | (SpecificOptions['mangleCache'] extends Object ? never : undefined)
+  mangleCache: Record | (ProvidedOptions['mangleCache'] extends Object ? never : undefined)
 }
 
 export interface BuildFailure extends Error {
@@ -214,6 +240,7 @@ export interface ServeOptions {
   servedir?: string
   keyfile?: string
   certfile?: string
+  fallback?: string
   onRequest?: (args: ServeOnRequestArgs) => void
 }
 
@@ -233,34 +260,24 @@ export interface ServeResult {
 }
 
 export interface TransformOptions extends CommonOptions {
-  tsconfigRaw?: string | {
-    compilerOptions?: {
-      alwaysStrict?: boolean,
-      importsNotUsedAsValues?: 'remove' | 'preserve' | 'error',
-      jsx?: 'react' | 'react-jsx' | 'react-jsxdev' | 'preserve',
-      jsxFactory?: string,
-      jsxFragmentFactory?: string,
-      jsxImportSource?: string,
-      preserveValueImports?: boolean,
-      target?: string,
-      useDefineForClassFields?: boolean,
-    },
-  }
-
+  /** Documentation: https://esbuild.github.io/api/#sourcefile */
   sourcefile?: string
+  /** Documentation: https://esbuild.github.io/api/#loader */
   loader?: Loader
+  /** Documentation: https://esbuild.github.io/api/#banner */
   banner?: string
+  /** Documentation: https://esbuild.github.io/api/#footer */
   footer?: string
 }
 
-export interface TransformResult {
+export interface TransformResult {
   code: string
   map: string
   warnings: Message[]
   /** Only when "mangleCache" is present */
-  mangleCache: Record | (SpecificOptions['mangleCache'] extends Object ? never : undefined)
+  mangleCache: Record | (ProvidedOptions['mangleCache'] extends Object ? never : undefined)
   /** Only when "legalComments" is "external" */
-  legalComments: string | (SpecificOptions['legalComments'] extends 'external' ? never : undefined)
+  legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined)
 }
 
 export interface TransformFailure extends Error {
@@ -375,6 +392,7 @@ export type ImportKind =
 
   // CSS
   | 'import-rule'
+  | 'composes-from'
   | 'url-token'
 
 /** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */
@@ -487,9 +505,9 @@ export interface AnalyzeMetafileOptions {
 export interface WatchOptions {
 }
 
-export interface BuildContext {
+export interface BuildContext {
   /** Documentation: https://esbuild.github.io/api/#rebuild */
-  rebuild(): Promise>
+  rebuild(): Promise>
 
   /** Documentation: https://esbuild.github.io/api/#watch */
   watch(options?: WatchOptions): Promise
@@ -501,6 +519,11 @@ export interface BuildContext
 }
 
+// This is a TypeScript type-level function which replaces any keys in "In"
+// that aren't in "Out" with "never". We use this to reject properties with
+// typos in object literals. See: https://stackoverflow.com/questions/49580725
+type SameShape = In & { [Key in Exclude]: never }
+
 /**
  * This function invokes the "esbuild" command-line tool for you. It returns a
  * promise that either resolves with a "BuildResult" object or rejects with a
@@ -511,8 +534,7 @@ export interface BuildContext(options: SpecificOptions): Promise>
-export declare function build(options: BuildOptions): Promise
+export declare function build(options: SameShape): Promise>
 
 /**
  * This is the advanced long-running form of "build" that supports additional
@@ -523,8 +545,7 @@ export declare function build(options: BuildOptions): Promise
  *
  * Documentation: https://esbuild.github.io/api/#build
  */
-export declare function context(options: T): Promise>
-export declare function context(options: BuildOptions): Promise
+export declare function context(options: SameShape): Promise>
 
 /**
  * This function transforms a single JavaScript file. It can be used to minify
@@ -537,8 +558,7 @@ export declare function context(options: BuildOptions): Promise
  *
  * Documentation: https://esbuild.github.io/api/#transform
  */
-export declare function transform(input: string | Uint8Array, options?: SpecificOptions): Promise>
-export declare function transform(input: string | Uint8Array, options?: TransformOptions): Promise
+export declare function transform(input: string | Uint8Array, options?: SameShape): Promise>
 
 /**
  * Converts log messages to formatted message strings suitable for printing in
@@ -570,8 +590,7 @@ export declare function analyzeMetafile(metafile: Metafile | string, options?: A
  *
  * Documentation: https://esbuild.github.io/api/#build
  */
-export declare function buildSync(options: SpecificOptions): BuildResult
-export declare function buildSync(options: BuildOptions): BuildResult
+export declare function buildSync(options: SameShape): BuildResult
 
 /**
  * A synchronous version of "transform".
@@ -581,8 +600,7 @@ export declare function buildSync(options: BuildOptions): BuildResult
  *
  * Documentation: https://esbuild.github.io/api/#transform
  */
-export declare function transformSync(input: string, options?: SpecificOptions): TransformResult
-export declare function transformSync(input: string | Uint8Array, options?: TransformOptions): TransformResult
+export declare function transformSync(input: string | Uint8Array, options?: SameShape): TransformResult
 
 /**
  * A synchronous version of "formatMessages".
diff --git a/node_modules/esbuild/lib/main.js b/node_modules/esbuild/lib/main.js
index e942586..2a87fd9 100644
--- a/node_modules/esbuild/lib/main.js
+++ b/node_modules/esbuild/lib/main.js
@@ -314,7 +314,9 @@ function pushCommonFlags(flags, options, keys) {
   let minifySyntax = getFlag(options, keys, "minifySyntax", mustBeBoolean);
   let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean);
   let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean);
+  let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger);
   let drop = getFlag(options, keys, "drop", mustBeArray);
+  let dropLabels = getFlag(options, keys, "dropLabels", mustBeArray);
   let charset = getFlag(options, keys, "charset", mustBeString);
   let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean);
   let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean);
@@ -330,6 +332,7 @@ function pushCommonFlags(flags, options, keys) {
   let pure = getFlag(options, keys, "pure", mustBeArray);
   let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean);
   let platform = getFlag(options, keys, "platform", mustBeString);
+  let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject);
   if (legalComments)
     flags.push(`--legal-comments=${legalComments}`);
   if (sourceRoot !== void 0)
@@ -348,6 +351,8 @@ function pushCommonFlags(flags, options, keys) {
     flags.push(`--global-name=${globalName}`);
   if (platform)
     flags.push(`--platform=${platform}`);
+  if (tsconfigRaw)
+    flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`);
   if (minify)
     flags.push("--minify");
   if (minifySyntax)
@@ -356,6 +361,8 @@ function pushCommonFlags(flags, options, keys) {
     flags.push("--minify-whitespace");
   if (minifyIdentifiers)
     flags.push("--minify-identifiers");
+  if (lineLimit)
+    flags.push(`--line-limit=${lineLimit}`);
   if (charset)
     flags.push(`--charset=${charset}`);
   if (treeShaking !== void 0)
@@ -365,6 +372,8 @@ function pushCommonFlags(flags, options, keys) {
   if (drop)
     for (let what of drop)
       flags.push(`--drop:${validateStringValue(what, "drop")}`);
+  if (dropLabels)
+    flags.push(`--drop-labels=${Array.from(dropLabels).map((what) => validateStringValue(what, "dropLabels")).join(",")}`);
   if (mangleProps)
     flags.push(`--mangle-props=${mangleProps.source}`);
   if (reserveProps)
@@ -622,7 +631,6 @@ function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) {
   pushLogFlags(flags, options, keys, isTTY2, logLevelDefault);
   pushCommonFlags(flags, options, keys);
   let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean);
-  let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject);
   let sourcefile = getFlag(options, keys, "sourcefile", mustBeString);
   let loader = getFlag(options, keys, "loader", mustBeString);
   let banner = getFlag(options, keys, "banner", mustBeString);
@@ -631,8 +639,6 @@ function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) {
   checkForInvalidFlags(options, keys, `in ${callName}() call`);
   if (sourcemap)
     flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`);
-  if (tsconfigRaw)
-    flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`);
   if (sourcefile)
     flags.push(`--sourcefile=${sourcefile}`);
   if (loader)
@@ -727,7 +733,11 @@ function createChannel(streamIn) {
       }
       throw new Error(`Invalid command: ` + request.command);
     } catch (e) {
-      sendResponse(id, { errors: [extractErrorMessageV8(e, streamIn, null, void 0, "")] });
+      const errors = [extractErrorMessageV8(e, streamIn, null, void 0, "")];
+      try {
+        sendResponse(id, { errors });
+      } catch {
+      }
     }
   };
   let isFirstPacket = true;
@@ -735,8 +745,8 @@ function createChannel(streamIn) {
     if (isFirstPacket) {
       isFirstPacket = false;
       let binaryVersion = String.fromCharCode(...bytes);
-      if (binaryVersion !== "0.17.10") {
-        throw new Error(`Cannot start service: Host version "${"0.17.10"}" does not match binary version ${quote(binaryVersion)}`);
+      if (binaryVersion !== "0.19.2") {
+        throw new Error(`Cannot start service: Host version "${"0.19.2"}" does not match binary version ${quote(binaryVersion)}`);
       }
       return;
     }
@@ -1134,6 +1144,7 @@ function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs,
           const servedir = getFlag(options2, keys, "servedir", mustBeString);
           const keyfile = getFlag(options2, keys, "keyfile", mustBeString);
           const certfile = getFlag(options2, keys, "certfile", mustBeString);
+          const fallback = getFlag(options2, keys, "fallback", mustBeString);
           const onRequest = getFlag(options2, keys, "onRequest", mustBeFunction);
           checkForInvalidFlags(options2, keys, `in serve() call`);
           const request2 = {
@@ -1151,6 +1162,8 @@ function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs,
             request2.keyfile = keyfile;
           if (certfile !== void 0)
             request2.certfile = certfile;
+          if (fallback !== void 0)
+            request2.fallback = fallback;
           sendRequest(refs, request2, (error2, response2) => {
             if (error2)
               return reject(new Error(error2));
@@ -1622,7 +1635,7 @@ function parseStackLinesV8(streamIn, lines, ident) {
 }
 function failureErrorWithLog(text, errors, warnings) {
   let limit = 5;
-  let summary = errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => {
+  text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => {
     if (i === limit)
       return "\n...";
     if (!e.location)
@@ -1633,9 +1646,19 @@ error: ${e.text}`;
     return `
 ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
   }).join("");
-  let error = new Error(`${text}${summary}`);
-  error.errors = errors;
-  error.warnings = warnings;
+  let error = new Error(text);
+  for (const [key, value] of [["errors", errors], ["warnings", warnings]]) {
+    Object.defineProperty(error, key, {
+      configurable: true,
+      enumerable: true,
+      get: () => value,
+      set: (value2) => Object.defineProperty(error, key, {
+        configurable: true,
+        enumerable: true,
+        value: value2
+      })
+    });
+  }
   return error;
 }
 function replaceDetailsInMessages(messages, stash) {
@@ -1713,11 +1736,12 @@ function sanitizeStringArray(values, property) {
   }
   return result;
 }
-function convertOutputFiles({ path: path3, contents }) {
+function convertOutputFiles({ path: path3, contents, hash }) {
   let text = null;
   return {
     path: path3,
     contents,
+    hash,
     get text() {
       const binary = this.contents;
       if (text === null || binary !== contents) {
@@ -1905,7 +1929,7 @@ for your current platform.`);
         "node_modules",
         ".cache",
         "esbuild",
-        `pnpapi-${pkg.replace("/", "-")}-${"0.17.10"}-${path.basename(subpath)}`
+        `pnpapi-${pkg.replace("/", "-")}-${"0.19.2"}-${path.basename(subpath)}`
       );
       if (!fs.existsSync(binTargetPath)) {
         fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
@@ -1940,7 +1964,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
   }
 }
 var _a;
-var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.17.10";
+var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.19.2";
 var esbuildCommandAndArgs = () => {
   if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
     throw new Error(
@@ -2007,7 +2031,7 @@ var fsAsync = {
     }
   }
 };
-var version = "0.17.10";
+var version = "0.19.2";
 var build = (options) => ensureServiceIsRunning().build(options);
 var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
 var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
@@ -2117,7 +2141,7 @@ var ensureServiceIsRunning = () => {
   if (longLivedService)
     return longLivedService;
   let [command, args] = esbuildCommandAndArgs();
-  let child = child_process.spawn(command, args.concat(`--service=${"0.17.10"}`, "--ping"), {
+  let child = child_process.spawn(command, args.concat(`--service=${"0.19.2"}`, "--ping"), {
     windowsHide: true,
     stdio: ["pipe", "pipe", "inherit"],
     cwd: defaultWD
@@ -2217,7 +2241,7 @@ var runServiceSync = (callback) => {
     esbuild: node_exports
   });
   callback(service);
-  let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.17.10"}`), {
+  let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.19.2"}`), {
     cwd: defaultWD,
     windowsHide: true,
     input: stdin,
@@ -2237,7 +2261,7 @@ var workerThreadService = null;
 var startWorkerThreadService = (worker_threads2) => {
   let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
   let worker = new worker_threads2.Worker(__filename, {
-    workerData: { workerPort, defaultWD, esbuildVersion: "0.17.10" },
+    workerData: { workerPort, defaultWD, esbuildVersion: "0.19.2" },
     transferList: [workerPort],
     // From node's documentation: https://nodejs.org/api/worker_threads.html
     //
diff --git a/node_modules/esbuild/package.json b/node_modules/esbuild/package.json
index ed8f429..7b61748 100644
--- a/node_modules/esbuild/package.json
+++ b/node_modules/esbuild/package.json
@@ -1,6 +1,6 @@
 {
   "name": "esbuild",
-  "version": "0.17.10",
+  "version": "0.19.2",
   "description": "An extremely fast JavaScript and CSS bundler and minifier.",
   "repository": "https://github.com/evanw/esbuild",
   "scripts": {
@@ -15,28 +15,28 @@
     "esbuild": "bin/esbuild"
   },
   "optionalDependencies": {
-    "@esbuild/android-arm": "0.17.10",
-    "@esbuild/android-arm64": "0.17.10",
-    "@esbuild/android-x64": "0.17.10",
-    "@esbuild/darwin-arm64": "0.17.10",
-    "@esbuild/darwin-x64": "0.17.10",
-    "@esbuild/freebsd-arm64": "0.17.10",
-    "@esbuild/freebsd-x64": "0.17.10",
-    "@esbuild/linux-arm": "0.17.10",
-    "@esbuild/linux-arm64": "0.17.10",
-    "@esbuild/linux-ia32": "0.17.10",
-    "@esbuild/linux-loong64": "0.17.10",
-    "@esbuild/linux-mips64el": "0.17.10",
-    "@esbuild/linux-ppc64": "0.17.10",
-    "@esbuild/linux-riscv64": "0.17.10",
-    "@esbuild/linux-s390x": "0.17.10",
-    "@esbuild/linux-x64": "0.17.10",
-    "@esbuild/netbsd-x64": "0.17.10",
-    "@esbuild/openbsd-x64": "0.17.10",
-    "@esbuild/sunos-x64": "0.17.10",
-    "@esbuild/win32-arm64": "0.17.10",
-    "@esbuild/win32-ia32": "0.17.10",
-    "@esbuild/win32-x64": "0.17.10"
+    "@esbuild/android-arm": "0.19.2",
+    "@esbuild/android-arm64": "0.19.2",
+    "@esbuild/android-x64": "0.19.2",
+    "@esbuild/darwin-arm64": "0.19.2",
+    "@esbuild/darwin-x64": "0.19.2",
+    "@esbuild/freebsd-arm64": "0.19.2",
+    "@esbuild/freebsd-x64": "0.19.2",
+    "@esbuild/linux-arm": "0.19.2",
+    "@esbuild/linux-arm64": "0.19.2",
+    "@esbuild/linux-ia32": "0.19.2",
+    "@esbuild/linux-loong64": "0.19.2",
+    "@esbuild/linux-mips64el": "0.19.2",
+    "@esbuild/linux-ppc64": "0.19.2",
+    "@esbuild/linux-riscv64": "0.19.2",
+    "@esbuild/linux-s390x": "0.19.2",
+    "@esbuild/linux-x64": "0.19.2",
+    "@esbuild/netbsd-x64": "0.19.2",
+    "@esbuild/openbsd-x64": "0.19.2",
+    "@esbuild/sunos-x64": "0.19.2",
+    "@esbuild/win32-arm64": "0.19.2",
+    "@esbuild/win32-ia32": "0.19.2",
+    "@esbuild/win32-x64": "0.19.2"
   },
   "license": "MIT"
 }
diff --git a/node_modules/make-error/LICENSE b/node_modules/make-error/LICENSE
deleted file mode 100644
index 9dcf797..0000000
--- a/node_modules/make-error/LICENSE
+++ /dev/null
@@ -1,5 +0,0 @@
-Copyright 2014 Julien Fontanet
-
-Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/make-error/README.md b/node_modules/make-error/README.md
deleted file mode 100644
index 5c089a2..0000000
--- a/node_modules/make-error/README.md
+++ /dev/null
@@ -1,112 +0,0 @@
-# make-error
-
-[![Package Version](https://badgen.net/npm/v/make-error)](https://npmjs.org/package/make-error) [![Build Status](https://travis-ci.org/JsCommunity/make-error.png?branch=master)](https://travis-ci.org/JsCommunity/make-error) [![PackagePhobia](https://badgen.net/packagephobia/install/make-error)](https://packagephobia.now.sh/result?p=make-error) [![Latest Commit](https://badgen.net/github/last-commit/JsCommunity/make-error)](https://github.com/JsCommunity/make-error/commits/master)
-
-> Make your own error types!
-
-## Features
-
-- Compatible Node & browsers
-- `instanceof` support
-- `error.name` & `error.stack` support
-- compatible with [CSP](https://en.wikipedia.org/wiki/Content_Security_Policy) (i.e. no `eval()`)
-
-## Installation
-
-### Node & [Browserify](http://browserify.org/)/[Webpack](https://webpack.js.org/)
-
-Installation of the [npm package](https://npmjs.org/package/make-error):
-
-```
-> npm install --save make-error
-```
-
-Then require the package:
-
-```javascript
-var makeError = require("make-error");
-```
-
-### Browser
-
-You can directly use the build provided at [unpkg.com](https://unpkg.com):
-
-```html
-
-```
-
-## Usage
-
-### Basic named error
-
-```javascript
-var CustomError = makeError("CustomError");
-
-// Parameters are forwarded to the super class (here Error).
-throw new CustomError("a message");
-```
-
-### Advanced error class
-
-```javascript
-function CustomError(customValue) {
-  CustomError.super.call(this, "custom error message");
-
-  this.customValue = customValue;
-}
-makeError(CustomError);
-
-// Feel free to extend the prototype.
-CustomError.prototype.myMethod = function CustomError$myMethod() {
-  console.log("CustomError.myMethod (%s, %s)", this.code, this.message);
-};
-
-//-----
-
-try {
-  throw new CustomError(42);
-} catch (error) {
-  error.myMethod();
-}
-```
-
-### Specialized error
-
-```javascript
-var SpecializedError = makeError("SpecializedError", CustomError);
-
-throw new SpecializedError(42);
-```
-
-### Inheritance
-
-> Best for ES2015+.
-
-```javascript
-import { BaseError } from "make-error";
-
-class CustomError extends BaseError {
-  constructor() {
-    super("custom error message");
-  }
-}
-```
-
-## Related
-
-- [make-error-cause](https://www.npmjs.com/package/make-error-cause): Make your own error types, with a cause!
-
-## Contributions
-
-Contributions are _very_ welcomed, either on the documentation or on
-the code.
-
-You may:
-
-- report any [issue](https://github.com/JsCommunity/make-error/issues)
-  you've encountered;
-- fork and create a pull request.
-
-## License
-
-ISC © [Julien Fontanet](http://julien.isonoe.net)
diff --git a/node_modules/make-error/dist/make-error.js b/node_modules/make-error/dist/make-error.js
deleted file mode 100644
index 32444c6..0000000
--- a/node_modules/make-error/dist/make-error.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).makeError=f()}}(function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i;
-
-/**
- * Set the constructor prototype to `BaseError`.
- */
-declare function makeError(super_: {
-  new (...args: any[]): T;
-}): makeError.Constructor;
-
-/**
- * Create a specialized error instance.
- */
-declare function makeError(
-  name: string | Function,
-  super_: K
-): K & makeError.SpecializedConstructor;
-
-declare namespace makeError {
-  /**
-   * Use with ES2015+ inheritance.
-   */
-  export class BaseError extends Error {
-    message: string;
-    name: string;
-    stack: string;
-
-    constructor(message?: string);
-  }
-
-  export interface Constructor {
-    new (message?: string): T;
-    super_: any;
-    prototype: T;
-  }
-
-  export interface SpecializedConstructor {
-    super_: any;
-    prototype: T;
-  }
-}
-
-export = makeError;
diff --git a/node_modules/make-error/index.js b/node_modules/make-error/index.js
deleted file mode 100644
index fab6040..0000000
--- a/node_modules/make-error/index.js
+++ /dev/null
@@ -1,151 +0,0 @@
-// ISC @ Julien Fontanet
-
-"use strict";
-
-// ===================================================================
-
-var construct = typeof Reflect !== "undefined" ? Reflect.construct : undefined;
-var defineProperty = Object.defineProperty;
-
-// -------------------------------------------------------------------
-
-var captureStackTrace = Error.captureStackTrace;
-if (captureStackTrace === undefined) {
-  captureStackTrace = function captureStackTrace(error) {
-    var container = new Error();
-
-    defineProperty(error, "stack", {
-      configurable: true,
-      get: function getStack() {
-        var stack = container.stack;
-
-        // Replace property with value for faster future accesses.
-        defineProperty(this, "stack", {
-          configurable: true,
-          value: stack,
-          writable: true,
-        });
-
-        return stack;
-      },
-      set: function setStack(stack) {
-        defineProperty(error, "stack", {
-          configurable: true,
-          value: stack,
-          writable: true,
-        });
-      },
-    });
-  };
-}
-
-// -------------------------------------------------------------------
-
-function BaseError(message) {
-  if (message !== undefined) {
-    defineProperty(this, "message", {
-      configurable: true,
-      value: message,
-      writable: true,
-    });
-  }
-
-  var cname = this.constructor.name;
-  if (cname !== undefined && cname !== this.name) {
-    defineProperty(this, "name", {
-      configurable: true,
-      value: cname,
-      writable: true,
-    });
-  }
-
-  captureStackTrace(this, this.constructor);
-}
-
-BaseError.prototype = Object.create(Error.prototype, {
-  // See: https://github.com/JsCommunity/make-error/issues/4
-  constructor: {
-    configurable: true,
-    value: BaseError,
-    writable: true,
-  },
-});
-
-// -------------------------------------------------------------------
-
-// Sets the name of a function if possible (depends of the JS engine).
-var setFunctionName = (function() {
-  function setFunctionName(fn, name) {
-    return defineProperty(fn, "name", {
-      configurable: true,
-      value: name,
-    });
-  }
-  try {
-    var f = function() {};
-    setFunctionName(f, "foo");
-    if (f.name === "foo") {
-      return setFunctionName;
-    }
-  } catch (_) {}
-})();
-
-// -------------------------------------------------------------------
-
-function makeError(constructor, super_) {
-  if (super_ == null || super_ === Error) {
-    super_ = BaseError;
-  } else if (typeof super_ !== "function") {
-    throw new TypeError("super_ should be a function");
-  }
-
-  var name;
-  if (typeof constructor === "string") {
-    name = constructor;
-    constructor =
-      construct !== undefined
-        ? function() {
-            return construct(super_, arguments, this.constructor);
-          }
-        : function() {
-            super_.apply(this, arguments);
-          };
-
-    // If the name can be set, do it once and for all.
-    if (setFunctionName !== undefined) {
-      setFunctionName(constructor, name);
-      name = undefined;
-    }
-  } else if (typeof constructor !== "function") {
-    throw new TypeError("constructor should be either a string or a function");
-  }
-
-  // Also register the super constructor also as `constructor.super_` just
-  // like Node's `util.inherits()`.
-  //
-  // eslint-disable-next-line dot-notation
-  constructor.super_ = constructor["super"] = super_;
-
-  var properties = {
-    constructor: {
-      configurable: true,
-      value: constructor,
-      writable: true,
-    },
-  };
-
-  // If the name could not be set on the constructor, set it on the
-  // prototype.
-  if (name !== undefined) {
-    properties.name = {
-      configurable: true,
-      value: name,
-      writable: true,
-    };
-  }
-  constructor.prototype = Object.create(super_.prototype, properties);
-
-  return constructor;
-}
-exports = module.exports = makeError;
-exports.BaseError = BaseError;
diff --git a/node_modules/make-error/package.json b/node_modules/make-error/package.json
deleted file mode 100644
index 2af27e1..0000000
--- a/node_modules/make-error/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
-  "name": "make-error",
-  "version": "1.3.6",
-  "main": "index.js",
-  "license": "ISC",
-  "description": "Make your own error types!",
-  "keywords": [
-    "create",
-    "custom",
-    "derive",
-    "error",
-    "errors",
-    "extend",
-    "extending",
-    "extension",
-    "factory",
-    "inherit",
-    "make",
-    "subclass"
-  ],
-  "homepage": "https://github.com/JsCommunity/make-error",
-  "bugs": "https://github.com/JsCommunity/make-error/issues",
-  "author": "Julien Fontanet ",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/JsCommunity/make-error.git"
-  },
-  "devDependencies": {
-    "browserify": "^16.2.3",
-    "eslint": "^6.5.1",
-    "eslint-config-prettier": "^6.4.0",
-    "eslint-config-standard": "^14.1.0",
-    "eslint-plugin-import": "^2.14.0",
-    "eslint-plugin-node": "^10.0.0",
-    "eslint-plugin-promise": "^4.0.1",
-    "eslint-plugin-standard": "^4.0.0",
-    "husky": "^3.0.9",
-    "jest": "^24",
-    "prettier": "^1.14.3",
-    "uglify-js": "^3.3.2"
-  },
-  "jest": {
-    "testEnvironment": "node"
-  },
-  "scripts": {
-    "dev-test": "jest --watch",
-    "format": "prettier --write '**'",
-    "prepublishOnly": "mkdir -p dist && browserify -s makeError index.js | uglifyjs -c > dist/make-error.js",
-    "pretest": "eslint --ignore-path .gitignore .",
-    "test": "jest"
-  },
-  "files": [
-    "dist/",
-    "index.js",
-    "index.d.ts"
-  ],
-  "husky": {
-    "hooks": {
-      "commit-msg": "npm run test"
-    }
-  }
-}
diff --git a/node_modules/ts-node/LICENSE b/node_modules/ts-node/LICENSE
deleted file mode 100644
index 983fbe8..0000000
--- a/node_modules/ts-node/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/ts-node/README.md b/node_modules/ts-node/README.md
deleted file mode 100644
index 63625d5..0000000
--- a/node_modules/ts-node/README.md
+++ /dev/null
@@ -1,1442 +0,0 @@
-
-
-# [![TypeScript Node](logo.svg?sanitize=true)](https://typestrong.org/ts-node)
-
-[![NPM version](https://img.shields.io/npm/v/ts-node.svg?style=flat)](https://npmjs.org/package/ts-node)
-[![NPM downloads](https://img.shields.io/npm/dm/ts-node.svg?style=flat)](https://npmjs.org/package/ts-node)
-[![Build status](https://img.shields.io/github/workflow/status/TypeStrong/ts-node/Continuous%20Integration)](https://github.com/TypeStrong/ts-node/actions?query=workflow%3A%22Continuous+Integration%22)
-[![Test coverage](https://codecov.io/gh/TypeStrong/ts-node/branch/main/graph/badge.svg)](https://codecov.io/gh/TypeStrong/ts-node)
-
-> TypeScript execution and REPL for node.js, with source map and native ESM support.
-
-The latest documentation can also be found on our website: 
-
-# Table of Contents
-
-*   [Overview](#overview)
-    *   [Features](#features)
-*   [Installation](#installation)
-*   [Usage](#usage)
-    *   [Command Line](#command-line)
-    *   [Shebang](#shebang)
-    *   [node flags and other tools](#node-flags-and-other-tools)
-    *   [Programmatic](#programmatic)
-*   [Configuration](#configuration)
-    *   [CLI flags](#cli-flags)
-    *   [Via tsconfig.json (recommended)](#via-tsconfigjson-recommended)
-        *   [@tsconfig/bases](#tsconfigbases)
-        *   [Default config](#default-config)
-    *   [`node` flags](#node-flags)
-*   [Options](#options)
-    *   [CLI Options](#cli-options)
-        *   [help](#help)
-        *   [version](#version)
-        *   [eval](#eval)
-        *   [print](#print)
-        *   [interactive](#interactive)
-        *   [esm](#esm)
-    *   [TSConfig Options](#tsconfig-options)
-        *   [project](#project)
-        *   [skipProject](#skipproject)
-        *   [cwdMode](#cwdmode)
-        *   [compilerOptions](#compileroptions)
-        *   [showConfig](#showconfig)
-    *   [Typechecking](#typechecking)
-        *   [transpileOnly](#transpileonly)
-        *   [typeCheck](#typecheck)
-        *   [compilerHost](#compilerhost)
-        *   [files](#files)
-        *   [ignoreDiagnostics](#ignorediagnostics)
-    *   [Transpilation Options](#transpilation-options)
-        *   [ignore](#ignore)
-        *   [skipIgnore](#skipignore)
-        *   [compiler](#compiler)
-        *   [swc](#swc)
-        *   [transpiler](#transpiler)
-        *   [preferTsExts](#prefertsexts)
-    *   [Diagnostic Options](#diagnostic-options)
-        *   [logError](#logerror)
-        *   [pretty](#pretty)
-        *   [TS_NODE_DEBUG](#ts_node_debug)
-    *   [Advanced Options](#advanced-options)
-        *   [require](#require)
-        *   [cwd](#cwd)
-        *   [emit](#emit)
-        *   [scope](#scope)
-        *   [scopeDir](#scopedir)
-        *   [moduleTypes](#moduletypes)
-        *   [TS_NODE_HISTORY](#ts_node_history)
-        *   [noExperimentalReplAwait](#noexperimentalreplawait)
-        *   [experimentalResolver](#experimentalresolver)
-        *   [experimentalSpecifierResolution](#experimentalspecifierresolution)
-    *   [API Options](#api-options)
-*   [SWC](#swc-1)
-*   [CommonJS vs native ECMAScript modules](#commonjs-vs-native-ecmascript-modules)
-    *   [CommonJS](#commonjs)
-    *   [Native ECMAScript modules](#native-ecmascript-modules)
-*   [Troubleshooting](#troubleshooting)
-    *   [Configuration](#configuration-1)
-    *   [Common errors](#common-errors)
-        *   [`TSError`](#tserror)
-        *   [`SyntaxError`](#syntaxerror)
-            *   [Unsupported JavaScript syntax](#unsupported-javascript-syntax)
-        *   [`ERR_REQUIRE_ESM`](#err_require_esm)
-        *   [`ERR_UNKNOWN_FILE_EXTENSION`](#err_unknown_file_extension)
-    *   [Missing Types](#missing-types)
-    *   [npx, yarn dlx, and node_modules](#npx-yarn-dlx-and-node_modules)
-*   [Performance](#performance)
-    *   [Skip typechecking](#skip-typechecking)
-    *   [With typechecking](#with-typechecking)
-*   [Advanced](#advanced)
-    *   [How it works](#how-it-works)
-    *   [Ignored files](#ignored-files)
-        *   [File extensions](#file-extensions)
-        *   [Skipping `node_modules`](#skipping-node_modules)
-        *   [Skipping pre-compiled TypeScript](#skipping-pre-compiled-typescript)
-        *   [Scope by directory](#scope-by-directory)
-        *   [Ignore by regexp](#ignore-by-regexp)
-    *   [paths and baseUrl
-        ](#paths-and-baseurl)
-        *   [Why is this not built-in to ts-node?](#why-is-this-not-built-in-to-ts-node)
-    *   [Third-party compilers](#third-party-compilers)
-    *   [Transpilers](#transpilers)
-        *   [Third-party plugins](#third-party-plugins)
-        *   [Write your own plugin](#write-your-own-plugin)
-    *   [Module type overrides](#module-type-overrides)
-        *   [Caveats](#caveats)
-    *   [API](#api)
-*   [Recipes](#recipes)
-    *   [Watching and restarting](#watching-and-restarting)
-    *   [AVA](#ava)
-        *   [CommonJS](#commonjs-1)
-        *   [Native ECMAScript modules](#native-ecmascript-modules-1)
-    *   [Gulp](#gulp)
-    *   [IntelliJ and Webstorm](#intellij-and-webstorm)
-    *   [Mocha](#mocha)
-        *   [Mocha 7 and newer](#mocha-7-and-newer)
-        *   [Mocha <=6](#mocha-6)
-    *   [Tape](#tape)
-    *   [Visual Studio Code](#visual-studio-code)
-    *   [Other](#other)
-*   [License](#license)
-
-# Overview
-
-ts-node is a TypeScript execution engine and REPL for Node.js.
-
-It JIT transforms TypeScript into JavaScript, enabling you to directly execute TypeScript on Node.js without precompiling.
-This is accomplished by hooking node's module loading APIs, enabling it to be used seamlessly alongside other Node.js
-tools and libraries.
-
-## Features
-
-*   Automatic sourcemaps in stack traces
-*   Automatic `tsconfig.json` parsing
-*   Automatic defaults to match your node version
-*   Typechecking (optional)
-*   REPL
-*   Write standalone scripts
-*   Native ESM loader
-*   Use third-party transpilers
-*   Use custom transformers
-*   Integrate with test runners, debuggers, and CLI tools
-*   Compatible with pre-compilation for production
-
-![TypeScript REPL](website/static/img/screenshot.png)
-
-# Installation
-
-```shell
-# Locally in your project.
-npm install -D typescript
-npm install -D ts-node
-
-# Or globally with TypeScript.
-npm install -g typescript
-npm install -g ts-node
-
-# Depending on configuration, you may also need these
-npm install -D tslib @types/node
-```
-
-**Tip:** Installing modules locally allows you to control and share the versions through `package.json`. ts-node will always resolve the compiler from `cwd` before checking relative to its own installation.
-
-# Usage
-
-## Command Line
-
-```shell
-# Execute a script as `node` + `tsc`.
-ts-node script.ts
-
-# Starts a TypeScript REPL.
-ts-node
-
-# Execute code with TypeScript.
-ts-node -e 'console.log("Hello, world!")'
-
-# Execute, and print, code with TypeScript.
-ts-node -p -e '"Hello, world!"'
-
-# Pipe scripts to execute with TypeScript.
-echo 'console.log("Hello, world!")' | ts-node
-
-# Equivalent to ts-node --transpileOnly
-ts-node-transpile-only script.ts
-
-# Equivalent to ts-node --cwdMode
-ts-node-cwd script.ts
-
-# Equivalent to ts-node --esm
-ts-node-esm script.ts
-```
-
-## Shebang
-
-To write scripts with maximum portability, [specify options in your `tsconfig.json`](#via-tsconfigjson-recommended) and omit them from the shebang.
-
-```typescript twoslash
-#!/usr/bin/env ts-node
-
-// ts-node options are read from tsconfig.json
-
-console.log("Hello, world!")
-```
-
-Including options within the shebang requires the [`env -S` flag](https://manpages.debian.org/bullseye/coreutils/env.1.en.html#S), which is available on recent versions of `env`. ([compatibility](https://github.com/TypeStrong/ts-node/pull/1448#issuecomment-913895766))
-
-```typescript twoslash
-#!/usr/bin/env -S ts-node --files
-// This shebang works on Mac and Linux with newer versions of env
-// Technically, Mac allows omitting `-S`, but Linux requires it
-```
-
-To test your version of `env` for compatibility with `-S`:
-
-```shell
-# Note that these unusual quotes are necessary
-/usr/bin/env --debug '-S echo foo bar'
-```
-
-## node flags and other tools
-
-You can register ts-node without using our CLI: `node -r ts-node/register` and `node --loader ts-node/esm`
-
-In many cases, setting [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#cli_node_options_options) will enable `ts-node` within other node tools, child processes, and worker threads.  This can be combined with other node flags.
-
-```shell
-NODE_OPTIONS="-r ts-node/register --no-warnings" node ./index.ts
-```
-
-Or, if you require native ESM support:
-
-```shell
-NODE_OPTIONS="--loader ts-node/esm"
-```
-
-This tells any node processes which receive this environment variable to install `ts-node`'s hooks before executing other code.
-
-If you are invoking node directly, you can avoid the environment variable and pass those flags to node.
-
-```shell
-node --loader ts-node/esm --inspect ./index.ts
-```
-
-## Programmatic
-
-You can require ts-node and register the loader for future requires by using `require('ts-node').register({ /* options */ })`.
-
-Check out our [API](#api) for more features.
-
-# Configuration
-
-ts-node supports a variety of options which can be specified via `tsconfig.json`, as CLI flags, as environment variables, or programmatically.
-
-For a complete list, see [Options](#options).
-
-## CLI flags
-
-ts-node CLI flags must come *before* the entrypoint script. For example:
-
-```shell
-$ ts-node --project tsconfig-dev.json say-hello.ts Ronald
-Hello, Ronald!
-```
-
-## Via tsconfig.json (recommended)
-
-ts-node automatically finds and loads `tsconfig.json`.  Most ts-node options can be specified in a `"ts-node"` object using their programmatic, camelCase names. We recommend this because it works even when you cannot pass CLI flags, such as `node --require ts-node/register` and when using shebangs.
-
-Use `--skipProject` to skip loading the `tsconfig.json`.  Use `--project` to explicitly specify the path to a `tsconfig.json`.
-
-When searching, it is resolved using [the same search behavior as `tsc`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html). By default, this search is performed relative to the entrypoint script. In `--cwdMode` or if no entrypoint is specified -- for example when using the REPL -- the search is performed relative to `--cwd` / `process.cwd()`.
-
-You can use this sample configuration as a starting point:
-
-```jsonc title="tsconfig.json"
-{
-  // This is an alias to @tsconfig/node16: https://github.com/tsconfig/bases
-  "extends": "ts-node/node16/tsconfig.json",
-
-  // Most ts-node options can be specified here using their programmatic names.
-  "ts-node": {
-    // It is faster to skip typechecking.
-    // Remove if you want ts-node to do typechecking.
-    "transpileOnly": true,
-
-    "files": true,
-
-    "compilerOptions": {
-      // compilerOptions specified here will override those declared below,
-      // but *only* in ts-node.  Useful if you want ts-node and tsc to use
-      // different options with a single tsconfig.json.
-    }
-  },
-  "compilerOptions": {
-    // typescript options here
-  }
-}
-```
-
-Our bundled [JSON schema](https://unpkg.com/browse/ts-node@latest/tsconfig.schema.json) lists all compatible options.
-
-### @tsconfig/bases
-
-[@tsconfig/bases](https://github.com/tsconfig/bases) maintains recommended configurations for several node versions.
-As a convenience, these are bundled with ts-node.
-
-```jsonc title="tsconfig.json"
-{
-  "extends": "ts-node/node16/tsconfig.json",
-
-  // Or install directly with `npm i -D @tsconfig/node16`
-  "extends": "@tsconfig/node16/tsconfig.json",
-}
-```
-
-### Default config
-
-If no `tsconfig.json` is loaded from disk, ts-node will use the newest recommended defaults from
-[@tsconfig/bases](https://github.com/tsconfig/bases/) compatible with your `node` and `typescript` versions.
-With the latest `node` and `typescript`, this is [`@tsconfig/node16`](https://github.com/tsconfig/bases/blob/master/bases/node16.json).
-
-Older versions of `typescript` are incompatible with `@tsconfig/node16`.  In those cases we will use an older default configuration.
-
-When in doubt, `ts-node --showConfig` will log the configuration being used, and `ts-node -vv` will log `node` and `typescript` versions.
-
-## `node` flags
-
-[`node` flags](https://nodejs.org/api/cli.html) must be passed directly to `node`; they cannot be passed to the ts-node binary nor can they be specified in `tsconfig.json`
-
-We recommend using the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#cli_node_options_options) environment variable to pass options to `node`.
-
-```shell
-NODE_OPTIONS='--trace-deprecation --abort-on-uncaught-exception' ts-node ./index.ts
-```
-
-Alternatively, you can invoke `node` directly and install ts-node via `--require`/`-r`
-
-```shell
-node --trace-deprecation --abort-on-uncaught-exception -r ts-node/register ./index.ts
-```
-
-# Options
-
-All command-line flags support both `--camelCase` and `--hyphen-case`.
-
-Most options can be declared in your tsconfig.json: [Configuration via tsconfig.json](#via-tsconfigjson-recommended)
-
-`ts-node` supports `--print` (`-p`), `--eval` (`-e`), `--require` (`-r`) and `--interactive` (`-i`) similar to the [node.js CLI](https://nodejs.org/api/cli.html).
-
-`ts-node` supports `--project` and `--showConfig` similar to the [tsc CLI](https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options).
-
-*Environment variables, where available, are in `ALL_CAPS`*
-
-## CLI Options
-
-### help
-
-```shell
-ts-node --help
-```
-
-Prints the help text
-
-### version
-
-```shell
-ts-node -v
-ts-node -vvv
-```
-
-Prints the version. `-vv` includes node and typescript compiler versions.  `-vvv` includes absolute paths to ts-node and
-typescript installations.
-
-### eval
-
-```shell
-ts-node -e 
-# Example
-ts-node -e 'console.log("Hello world!")'
-```
-
-Evaluate code
-
-### print
-
-```shell
-ts-node -p -e 
-# Example
-ts-node -p -e '"Hello world!"'
-```
-
-Print result of `--eval`
-
-### interactive
-
-```shell
-ts-node -i
-```
-
-Opens the REPL even if stdin does not appear to be a terminal
-
-### esm
-
-```shell
-ts-node --esm
-ts-node-esm
-```
-
-Bootstrap with the ESM loader, enabling full ESM support
-
-## TSConfig Options
-
-### project
-
-```shell
-ts-node -P 
-ts-node --project 
-```
-
-Path to tsconfig file.
-
-*Note the uppercase `-P`. This is different from `tsc`'s `-p/--project` option.*
-
-*Environment:* `TS_NODE_PROJECT`
-
-### skipProject
-
-```shell
-ts-node --skipProject
-```
-
-Skip project config resolution and loading
-
-*Default:* `false` 
-*Environment:* `TS_NODE_SKIP_PROJECT` - -### cwdMode - -```shell -ts-node -c -ts-node --cwdMode -ts-node-cwd -``` - -Resolve config relative to the current directory instead of the directory of the entrypoint script - -### compilerOptions - -```shell -ts-node -O -ts-node --compilerOptions -``` - -JSON object to merge with compiler options - -*Environment:* `TS_NODE_COMPILER_OPTIONS` - -### showConfig - -```shell -ts-node --showConfig -``` - -Print resolved `tsconfig.json`, including `ts-node` options, and exit - -## Typechecking - -### transpileOnly - -```shell -ts-node -T -ts-node --transpileOnly -``` - -Use TypeScript's faster `transpileModule` - -*Default:* `false`
-*Environment:* `TS_NODE_TRANSPILE_ONLY` - -### typeCheck - -```shell -ts-node --typeCheck -``` - -Opposite of `--transpileOnly` - -*Default:* `true`
-*Environment:* `TS_NODE_TYPE_CHECK` - -### compilerHost - -```shell -ts-node -H -ts-node --compilerHost -``` - -Use TypeScript's compiler host API - -*Default:* `false`
-*Environment:* `TS_NODE_COMPILER_HOST` - -### files - -```shell -ts-node --files -``` - -Load `files`, `include` and `exclude` from `tsconfig.json` on startup. This may -avoid certain typechecking failures. See [Missing types](#missing-types) for details. - -*Default:* `false`
-*Environment:* `TS_NODE_FILES` - -### ignoreDiagnostics - -```shell -ts-node -D -ts-node --ignoreDiagnostics -``` - -Ignore TypeScript warnings by diagnostic code - -*Environment:* `TS_NODE_IGNORE_DIAGNOSTICS` - -## Transpilation Options - -### ignore - -```shell -ts-node -I -ts-node --ignore -``` - -Override the path patterns to skip compilation - -*Default:* `/node_modules/`
-*Environment:* `TS_NODE_IGNORE` - -### skipIgnore - -```shell -ts-node --skipIgnore -``` - -Skip ignore checks - -*Default:* `false`
-*Environment:* `TS_NODE_SKIP_IGNORE` - -### compiler - -```shell -ts-node -C -ts-node --compiler -``` - -Specify a custom TypeScript compiler - -*Default:* `typescript`
-*Environment:* `TS_NODE_COMPILER` - -### swc - -```shell -ts-node --swc -``` - -Transpile with [swc](#swc). Implies `--transpileOnly` - -*Default:* `false` - -### transpiler - -```shell -ts-node --transpiler -# Example -ts-node --transpiler ts-node/transpilers/swc -``` - -Use a third-party, non-typechecking transpiler - -### preferTsExts - -```shell -ts-node --preferTsExts -``` - -Re-order file extensions so that TypeScript imports are preferred - -*Default:* `false`
-*Environment:* `TS_NODE_PREFER_TS_EXTS` - -## Diagnostic Options - -### logError - -```shell -ts-node --logError -``` - -Logs TypeScript errors to stderr instead of throwing exceptions - -*Default:* `false`
-*Environment:* `TS_NODE_LOG_ERROR` - -### pretty - -```shell -ts-node --pretty -``` - -Use pretty diagnostic formatter - -*Default:* `false`
-*Environment:* `TS_NODE_PRETTY` - -### TS_NODE_DEBUG - -```shell -TS_NODE_DEBUG=true ts-node -``` - -Enable debug logging - -## Advanced Options - -### require - -```shell -ts-node -r -ts-node --require -``` - -Require a node module before execution - -### cwd - -```shell -ts-node --cwd -``` - -Behave as if invoked in this working directory - -*Default:* `process.cwd()`
-*Environment:* `TS_NODE_CWD` - -### emit - -```shell -ts-node --emit -``` - -Emit output files into `.ts-node` directory. Requires `--compilerHost` - -*Default:* `false`
-*Environment:* `TS_NODE_EMIT` - -### scope - -```shell -ts-node --scope -``` - -Scope compiler to files within `scopeDir`. Anything outside this directory is ignored. - -*Default:* `false`
-*Environment:* `TS_NODE_SCOPE` - -### scopeDir - -```shell -ts-node --scopeDir -``` - -Directory within which compiler is limited when `scope` is enabled. - -*Default:* First of: `tsconfig.json` "rootDir" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded.
-*Environment:* `TS_NODE_SCOPE_DIR` - -### moduleTypes - -Override the module type of certain files, ignoring the `package.json` `"type"` field. See [Module type overrides](#module-type-overrides) for details. - -*Default:* obeys `package.json` `"type"` and `tsconfig.json` `"module"`
-*Can only be specified via `tsconfig.json` or API.* - -### TS_NODE_HISTORY - -```shell -TS_NODE_HISTORY= ts-node -``` - -Path to history file for REPL - -*Default:* `~/.ts_node_repl_history` - -### noExperimentalReplAwait - -```shell -ts-node --noExperimentalReplAwait -``` - -Disable top-level await in REPL. Equivalent to node's [`--no-experimental-repl-await`](https://nodejs.org/api/cli.html#cli_no_experimental_repl_await) - -*Default:* Enabled if TypeScript version is 3.8 or higher and target is ES2018 or higher.
-*Environment:* `TS_NODE_EXPERIMENTAL_REPL_AWAIT` set `false` to disable - -### experimentalResolver - -Enable experimental hooks that re-map imports and require calls to support: - -* remapping extensions, e.g. so that `import "./foo.js"` will execute `foo.ts`. Currently the following extensions will be mapped: - * `.js` to `.ts`, `.tsx`, or `.jsx` - * `.cjs` to `.cts` - * `.mjs` to `.mts` - * `.jsx` to `.tsx` -* including file extensions in CommonJS, for consistency with ESM where this is often mandatory - -In the future, this hook will also support: - -* `baseUrl`, `paths` -* `rootDirs` -* `outDir` to `rootDir` mappings for composite projects and monorepos - -For details, see [#1514](https://github.com/TypeStrong/ts-node/issues/1514). - -*Default:* `false`, but will likely be enabled by default in a future version
-*Can only be specified via `tsconfig.json` or API.* - -### experimentalSpecifierResolution - -```shell -ts-node --experimentalSpecifierResolution node -``` - -Like node's [`--experimental-specifier-resolution`](https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm), but can also be set in your `tsconfig.json` for convenience. -Requires [`esm`](#esm) to be enabled. - -*Default:* `explicit`
- -## API Options - -The API includes [additional options](https://typestrong.org/ts-node/api/interfaces/RegisterOptions.html) not shown here. - -# SWC - -SWC support is built-in via the `--swc` flag or `"swc": true` tsconfig option. - -[SWC](https://swc.rs) is a TypeScript-compatible transpiler implemented in Rust. This makes it an order of magnitude faster than vanilla `transpileOnly`. - -To use it, first install `@swc/core` or `@swc/wasm`. If using `importHelpers`, also install `@swc/helpers`. If `target` is less than "es2015" and using `async`/`await` or generator functions, also install `regenerator-runtime`. - -```shell -npm i -D @swc/core @swc/helpers regenerator-runtime -``` - -Then add the following to your `tsconfig.json`. - -```jsonc title="tsconfig.json" -{ - "ts-node": { - "swc": true - } -} -``` - -> SWC uses `@swc/helpers` instead of `tslib`. If you have enabled `importHelpers`, you must also install `@swc/helpers`. - -# CommonJS vs native ECMAScript modules - -TypeScript is almost always written using modern `import` syntax, but it is also transformed before being executed by the underlying runtime. You can choose to either transform to CommonJS or to preserve the native `import` syntax, using node's native ESM support. Configuration is different for each. - -Here is a brief comparison of the two. - -| CommonJS | Native ECMAScript modules | -|---|---| -| Write native `import` syntax | Write native `import` syntax | -| Transforms `import` into `require()` | Does not transform `import` | -| Node executes scripts using the classic [CommonJS loader](https://nodejs.org/dist/latest-v16.x/docs/api/modules.html) | Node executes scripts using the new [ESM loader](https://nodejs.org/dist/latest-v16.x/docs/api/esm.html) | -| Use any of:
`ts-node`
`node -r ts-node/register`
`NODE_OPTIONS="ts-node/register" node`
`require('ts-node').register({/* options */})` | Use any of:
`ts-node --esm`
`ts-node-esm`
Set `"esm": true` in `tsconfig.json`
`node --loader ts-node/esm`
`NODE_OPTIONS="--loader ts-node/esm" node` | - -## CommonJS - -Transforming to CommonJS is typically simpler and more widely supported because it is older. You must remove [`"type": "module"`](https://nodejs.org/api/packages.html#packages_type) from `package.json` and set [`"module": "CommonJS"`](https://www.typescriptlang.org/tsconfig/#module) in `tsconfig.json`. - -```jsonc title="package.json" -{ - // This can be omitted; commonjs is the default - "type": "commonjs" -} -``` - -```jsonc title="tsconfig.json" -{ - "compilerOptions": { - "module": "CommonJS" - } -} -``` - -If you must keep `"module": "ESNext"` for `tsc`, webpack, or another build tool, you can set an override for ts-node. - -```jsonc title="tsconfig.json" -{ - "compilerOptions": { - "module": "ESNext" - }, - "ts-node": { - "compilerOptions": { - "module": "CommonJS" - } - } -} -``` - -## Native ECMAScript modules - -[Node's ESM loader hooks](https://nodejs.org/api/esm.html#esm_experimental_loaders) are [**experimental**](https://nodejs.org/api/documentation.html#documentation_stability_index) and subject to change. ts-node's ESM support is as stable as possible, but it relies on APIs which node can *and will* break in new versions of node. Thus it is not recommended for production. - -For complete usage, limitations, and to provide feedback, see [#1007](https://github.com/TypeStrong/ts-node/issues/1007). - -You must set [`"type": "module"`](https://nodejs.org/api/packages.html#packages_type) in `package.json` and [`"module": "ESNext"`](https://www.typescriptlang.org/tsconfig/#module) in `tsconfig.json`. - -```jsonc title="package.json" -{ - "type": "module" -} -``` - -```jsonc title="tsconfig.json" -{ - "compilerOptions": { - "module": "ESNext" // or ES2015, ES2020 - }, - "ts-node": { - // Tell ts-node CLI to install the --loader automatically, explained below - "esm": true - } -} -``` - -You must also ensure node is passed `--loader`. The ts-node CLI will do this automatically with our `esm` option. - -> Note: `--esm` must spawn a child process to pass it `--loader`. This may change if node adds the ability to install loader hooks -> into the current process. - -```shell -# pass the flag -ts-node --esm -# Use the convenience binary -ts-node-esm -# or add `"esm": true` to your tsconfig.json to make it automatic -ts-node -``` - -If you are not using our CLI, pass the loader flag to node. - -```shell -node --loader ts-node/esm ./index.ts -# Or via environment variable -NODE_OPTIONS="--loader ts-node/esm" node ./index.ts -``` - -# Troubleshooting - -## Configuration - -ts-node uses sensible default configurations to reduce boilerplate while still respecting `tsconfig.json` if you -have one. If you are unsure which configuration is used, you can log it with `ts-node --showConfig`. This is similar to -`tsc --showConfig` but includes `"ts-node"` options as well. - -ts-node also respects your locally-installed `typescript` version, but global installations fallback to the globally-installed -`typescript`. If you are unsure which versions are used, `ts-node -vv` will log them. - -```shell -$ ts-node -vv -ts-node v10.0.0 -node v16.1.0 -compiler v4.2.2 - -$ ts-node --showConfig -{ - "compilerOptions": { - "target": "es6", - "lib": [ - "es6", - "dom" - ], - "rootDir": "./src", - "outDir": "./.ts-node", - "module": "commonjs", - "moduleResolution": "node", - "strict": true, - "declaration": false, - "sourceMap": true, - "inlineSources": true, - "types": [ - "node" - ], - "stripInternal": true, - "incremental": true, - "skipLibCheck": true, - "importsNotUsedAsValues": "error", - "inlineSourceMap": false, - "noEmit": false - }, - "ts-node": { - "cwd": "/d/project", - "projectSearchDir": "/d/project", - "require": [], - "project": "/d/project/tsconfig.json" - } -} -``` - -## Common errors - -It is important to differentiate between errors from ts-node, errors from the TypeScript compiler, and errors from `node`. It is also important to understand when errors are caused by a type error in your code, a bug in your code, or a flaw in your configuration. - -### `TSError` - -Type errors from the compiler are thrown as a `TSError`. These are the same as errors you get from `tsc`. - -### `SyntaxError` - -Any error that is not a `TSError` is from node.js (e.g. `SyntaxError`), and cannot be fixed by TypeScript or ts-node. These are bugs in your code or configuration. - -#### Unsupported JavaScript syntax - -Your version of `node` may not support all JavaScript syntax supported by TypeScript. The compiler must transform this syntax via "downleveling," which is controlled by -the [tsconfig `"target"` option](https://www.typescriptlang.org/tsconfig#target). Otherwise your code will compile fine, but node will throw a `SyntaxError`. - -For example, `node` 12 does not understand the `?.` optional chaining operator. If you use `"target": "esnext"`, then the following TypeScript syntax: - -```typescript twoslash -const bar: string | undefined = foo?.bar; -``` - -will compile into this JavaScript: - -```javascript -const a = foo?.bar; -``` - -When you try to run this code, node 12 will throw a `SyntaxError`. To fix this, you must switch to `"target": "es2019"` or lower so TypeScript transforms `?.` into something `node` can understand. - -### `ERR_REQUIRE_ESM` - -This error is thrown by node when a module is `require()`d, but node believes it should execute as native ESM. This can happen for a few reasons: - -* You have installed an ESM dependency but your own code compiles to CommonJS. - * Solution: configure your project to compile and execute as native ESM. [Docs](#native-ecmascript-modules) - * Solution: downgrade the dependency to an older, CommonJS version. -* You have moved your project to ESM but still have a config file, such as `webpack.config.ts`, which must be executed as CommonJS - * Solution: if supported by the relevant tool, rename your config file to `.cts` - * Solution: Configure a module type override. [Docs](#module-type-overrides) -* You have a mix of CommonJS and native ESM in your project - * Solution: double-check all package.json "type" and tsconfig.json "module" configuration [Docs](#commonjs-vs-native-ecmascript-modules) - * Solution: consider simplifying by making your project entirely CommonJS or entirely native ESM - -### `ERR_UNKNOWN_FILE_EXTENSION` - -This error is thrown by node when a module has an unrecognized file extension, or no extension at all, and is being executed as native ESM. This can happen for a few reasons: - -* You are using a tool which has an extensionless binary, such as `mocha`. - * CommonJS supports extensionless files but native ESM does not. - * Solution: upgrade to ts-node >=[v10.6.0](https://github.com/TypeStrong/ts-node/releases/tag/v10.6.0), which implements a workaround. -* Our ESM loader is not installed. - * Solution: Use `ts-node-esm`, `ts-node --esm`, or add `"ts-node": {"esm": true}` to your tsconfig.json. [Docs](#native-ecmascript-modules) -* You have moved your project to ESM but still have a config file, such as `webpack.config.ts`, which must be executed as CommonJS - * Solution: if supported by the relevant tool, rename your config file to `.cts` - * Solution: Configure a module type override. [Docs](#module-type-overrides) - -## Missing Types - -ts-node does *not* eagerly load `files`, `include` or `exclude` by default. This is because a large majority of projects do not use all of the files in a project directory (e.g. `Gulpfile.ts`, runtime vs tests) and parsing every file for types slows startup time. Instead, ts-node starts with the script file (e.g. `ts-node index.ts`) and TypeScript resolves dependencies based on imports and references. - -Occasionally, this optimization leads to missing types. Fortunately, there are other ways to include them in typechecking. - -For global definitions, you can use the `typeRoots` compiler option. This requires that your type definitions be structured as type packages (not loose TypeScript definition files). More details on how this works can be found in the [TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types). - -Example `tsconfig.json`: - -```jsonc -{ - "compilerOptions": { - "typeRoots" : ["./node_modules/@types", "./typings"] - } -} -``` - -Example project structure: - -```text -/ --- tsconfig.json --- typings/ - -- / - -- index.d.ts -``` - -Example module declaration file: - -```typescript twoslash -declare module '' { - // module definitions go here -} -``` - -For module definitions, you can use [`paths`](https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping): - -```jsonc title="tsconfig.json" -{ - "compilerOptions": { - "baseUrl": ".", - "paths": { - "custom-module-type": ["types/custom-module-type"] - } - } -} -``` - -Another option is [triple-slash directives](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html). This may be helpful if you prefer not to change your `compilerOptions` or structure your type definitions for `typeRoots`. Below is an example of a triple-slash directive as a relative path within your project: - -```typescript twoslash -/// -import {Greeter} from "lib_greeter" -const g = new Greeter(); -g.sayHello(); -``` - -If none of the above work, and you *must* use `files`, `include`, or `exclude`, enable our [`files`](#files) option. - -## npx, yarn dlx, and node_modules - -When executing TypeScript with `npx` or `yarn dlx`, the code resides within a temporary `node_modules` directory. - -The contents of `node_modules` are ignored by default. If execution fails, enable [`skipIgnore`](#skipignore). - - - -# Performance - -These tricks will make ts-node faster. - -## Skip typechecking - -It is often better to typecheck as part of your tests or linting. You can run `tsc --noEmit` to do this. In these cases, ts-node can skip typechecking, making it much faster. - -To skip typechecking in ts-node, do one of the following: - -* Enable [swc](#swc) - * This is by far the fastest option -* Enable [`transpileOnly`](#transpileonly) to skip typechecking without swc - -## With typechecking - -If you absolutely must typecheck in ts-node: - -* Avoid dynamic `require()` which may trigger repeated typechecking; prefer `import` -* Try with and without `--files`; one may be faster depending on your project -* Check `tsc --showConfig`; make sure all executed files are included -* Enable [`skipLibCheck`](https://www.typescriptlang.org/tsconfig#skipLibCheck) -* Set a [`types`](https://www.typescriptlang.org/tsconfig#types) array to avoid loading unnecessary `@types` - -# Advanced - -## How it works - -ts-node works by registering hooks for `.ts`, `.tsx`, `.js`, and/or `.jsx` extensions. - -Vanilla `node` loads `.js` by reading code from disk and executing it. Our hook runs in the middle, transforming code from TypeScript to JavaScript and passing the result to `node` for execution. This transformation will respect your `tsconfig.json` as if you had compiled via `tsc`. - -We also register a few other hooks to apply sourcemaps to stack traces and remap from `.js` imports to `.ts`. - -## Ignored files - -ts-node transforms certain files and ignores others. We refer to this mechanism as "scoping." There are various -options to configure scoping, so that ts-node transforms only the files in your project. - -> **Warning:** -> -> An ignored file can still be executed by node.js. Ignoring a file means we do not transform it from TypeScript into JavaScript, but it does not prevent execution. -> -> If a file requires transformation but is ignored, node may either fail to resolve it or attempt to execute it as vanilla JavaScript. This may cause syntax errors or other failures, because node does not understand TypeScript type syntax nor bleeding-edge ECMAScript features. - -### File extensions - -`.js` and `.jsx` are only transformed when [`allowJs`](https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options) is enabled. - -`.tsx` and `.jsx` are only transformed when [`jsx`](https://www.typescriptlang.org/docs/handbook/jsx.html) is enabled. - -> **Warning:** -> -> When ts-node is used with `allowJs`, *all* non-ignored JavaScript files are transformed by ts-node. - -### Skipping `node_modules` - -By default, ts-node avoids compiling files in `/node_modules/` for three reasons: - -1. Modules should always be published in a format node.js can consume -2. Transpiling the entire dependency tree will make your project slower -3. Differing behaviours between TypeScript and node.js (e.g. ES2015 modules) can result in a project that works until you decide to support a feature natively from node.js - -If you need to import uncompiled TypeScript in `node_modules`, use [`--skipIgnore`](#skipignore) or [`TS_NODE_SKIP_IGNORE`](#skipignore) to bypass this restriction. - -### Skipping pre-compiled TypeScript - -If a compiled JavaScript file with the same name as a TypeScript file already exists, the TypeScript file will be ignored. ts-node will import the pre-compiled JavaScript. - -To force ts-node to import the TypeScript source, not the precompiled JavaScript, use [`--preferTsExts`](#prefertsexts). - -### Scope by directory - -Our [`scope`](#scope) and [`scopeDir`](#scopedir) options will limit transformation to files -within a directory. - -### Ignore by regexp - -Our [`ignore`](#ignore) option will ignore files matching one or more regular expressions. - -## paths and baseUrl - -You can use ts-node together with [tsconfig-paths](https://www.npmjs.com/package/tsconfig-paths) to load modules according to the `paths` section in `tsconfig.json`. - -```jsonc title="tsconfig.json" -{ - "ts-node": { - // Do not forget to `npm i -D tsconfig-paths` - "require": ["tsconfig-paths/register"] - } -} -``` - -### Why is this not built-in to ts-node? - -The official TypeScript Handbook explains the intended purpose for `"paths"` in ["Additional module resolution flags"](https://www.typescriptlang.org/docs/handbook/module-resolution.html#additional-module-resolution-flags). - -> The TypeScript compiler has a set of additional flags to *inform* the compiler of transformations that are expected to happen to the sources to generate the final output. -> -> It is important to note that the compiler will not perform any of these transformations; it just uses these pieces of information to guide the process of resolving a module import to its definition file. - -This means `"paths"` are intended to describe mappings that the build tool or runtime *already* performs, not to tell the build tool or -runtime how to resolve modules. In other words, they intend us to write our imports in a way `node` already understands. For this reason, ts-node does not modify `node`'s module resolution behavior to implement `"paths"` mappings. - -## Third-party compilers - -Some projects require a patched typescript compiler which adds additional features. For example, [`ttypescript`](https://github.com/cevek/ttypescript/tree/master/packages/ttypescript) and [`ts-patch`](https://github.com/nonara/ts-patch#readme) -add the ability to configure custom transformers. These are drop-in replacements for the vanilla `typescript` module and -implement the same API. - -For example, to use `ttypescript` and `ts-transformer-keys`, add this to your `tsconfig.json`: - -```jsonc title="tsconfig.json" -{ - "ts-node": { - // This can be omitted when using ts-patch - "compiler": "ttypescript" - }, - "compilerOptions": { - // plugin configuration is the same for both ts-patch and ttypescript - "plugins": [ - { "transform": "ts-transformer-keys/transformer" } - ] - } -} -``` - -## Transpilers - -ts-node supports third-party transpilers as plugins. Transpilers such as swc can transform TypeScript into JavaScript -much faster than the TypeScript compiler. You will still benefit from ts-node's automatic `tsconfig.json` discovery, -sourcemap support, and global ts-node CLI. Plugins automatically derive an appropriate configuration from your existing -`tsconfig.json` which simplifies project boilerplate. - -> **What is the difference between a compiler and a transpiler?** -> -> For our purposes, a compiler implements TypeScript's API and can perform typechecking. -> A third-party transpiler does not. Both transform TypeScript into JavaScript. - -### Third-party plugins - -The `transpiler` option allows using third-party transpiler plugins with ts-node. `transpiler` must be given the -name of a module which can be `require()`d. The built-in `swc` plugin is exposed as `ts-node/transpilers/swc`. - -For example, to use a hypothetical "@cspotcode/fast-ts-compiler", first install it into your project: `npm install @cspotcode/fast-ts-compiler` - -Then add the following to your tsconfig: - -```jsonc title="tsconfig.json" -{ - "ts-node": { - "transpileOnly": true, - "transpiler": "@cspotcode/fast-ts-compiler" - } -} -``` - -### Write your own plugin - -To write your own transpiler plugin, check our [API docs](https://typestrong.org/ts-node/api/interfaces/TranspilerModule.html). - -Plugins are `require()`d by ts-node, so they can be a local script or a node module published to npm. The module must -export a `create` function described by our -[`TranspilerModule`](https://typestrong.org/ts-node/api/interfaces/TranspilerModule.html) interface. `create` is -invoked by ts-node at startup to create one or more transpiler instances. The instances are used to transform -TypeScript into JavaScript. - -For a working example, check out out our bundled swc plugin: https://github.com/TypeStrong/ts-node/blob/main/src/transpilers/swc.ts - -## Module type overrides - -> Wherever possible, it is recommended to use TypeScript's [`NodeNext` or `Node16` mode](https://www.typescriptlang.org/docs/handbook/esm-node.html) instead of the options described -> in this section. Setting `"module": "NodeNext"` and using the `.cts` file extension should work well for most projects. - -When deciding how a file should be compiled and executed -- as either CommonJS or native ECMAScript module -- ts-node matches -`node` and `tsc` behavior. This means TypeScript files are transformed according to your `tsconfig.json` `"module"` -option and executed according to node's rules for the `package.json` `"type"` field. Set `"module": "NodeNext"` and everything should work. - -In rare cases, you may need to override this behavior for some files. For example, some tools read a `name-of-tool.config.ts` -and require that file to execute as CommonJS. If you have `package.json` configured with `"type": "module"` and `tsconfig.json` with -`"module": "esnext"`, the config is native ECMAScript by default and will raise an error. You will need to force the config and -any supporting scripts to execute as CommonJS. - -In these situations, our `moduleTypes` option can override certain files to be -CommonJS or ESM. Similar overriding is possible by using `.mts`, `.cts`, `.cjs` and `.mjs` file extensions. -`moduleTypes` achieves the same effect for `.ts` and `.js` files, and *also* overrides your `tsconfig.json` `"module"` -config appropriately. - -The following example tells ts-node to execute a webpack config as CommonJS: - -```jsonc title="tsconfig.json" -{ - "ts-node": { - "transpileOnly": true, - "moduleTypes": { - "webpack.config.ts": "cjs", - // Globs are also supported with the same behavior as tsconfig "include" - "webpack-config-scripts/**/*": "cjs" - } - }, - "compilerOptions": { - "module": "es2020", - "target": "es2020" - } -} -``` - -Each key is a glob pattern with the same syntax as tsconfig's `"include"` array. -When multiple patterns match the same file, the last pattern takes precedence. - -* `cjs` overrides matches files to compile and execute as CommonJS. -* `esm` overrides matches files to compile and execute as native ECMAScript modules. -* `package` resets either of the above to default behavior, which obeys `package.json` `"type"` and `tsconfig.json` `"module"` options. - -### Caveats - -Files with an overridden module type are transformed with the same limitations as [`isolatedModules`](https://www.typescriptlang.org/tsconfig#isolatedModules). This will only affect rare cases such as using `const enum`s with [`preserveConstEnums`](https://www.typescriptlang.org/tsconfig#preserveConstEnums) disabled. - -This feature is meant to facilitate scenarios where normal `compilerOptions` and `package.json` configuration is not possible. For example, a `webpack.config.ts` cannot be given its own `package.json` to override `"type"`. Wherever possible you should favor using traditional `package.json` and `tsconfig.json` configurations. - -## API - -ts-node's complete API is documented here: [API Docs](https://typestrong.org/ts-node/api/) - -Here are a few highlights of what you can accomplish: - -* [`create()`](https://typestrong.org/ts-node/api/index.html#create) creates ts-node's compiler service without - registering any hooks. -* [`createRepl()`](https://typestrong.org/ts-node/api/index.html#createRepl) creates an instance of our REPL service, so - you can create your own TypeScript-powered REPLs. -* [`createEsmHooks()`](https://typestrong.org/ts-node/api/index.html#createEsmHooks) creates our ESM loader hooks, - suitable for composing with other loaders or augmenting with additional features. - -# Recipes - -## Watching and restarting - -ts-node focuses on adding first-class TypeScript support to node. Watching files and code reloads are out of scope for the project. - -If you want to restart the `ts-node` process on file change, existing node.js tools such as [nodemon](https://github.com/remy/nodemon), [onchange](https://github.com/Qard/onchange) and [node-dev](https://github.com/fgnass/node-dev) work. - -There's also [`ts-node-dev`](https://github.com/whitecolor/ts-node-dev), a modified version of [`node-dev`](https://github.com/fgnass/node-dev) using `ts-node` for compilation that will restart the process on file change. Note that `ts-node-dev` is incompatible with our native ESM loader. - -## AVA - -Assuming you are configuring AVA via your `package.json`, add one of the following configurations. - -### CommonJS - -Use this configuration if your `package.json` does not have `"type": "module"`. - -```jsonc title="package.json" -{ - "ava": { - "extensions": [ - "ts" - ], - "require": [ - "ts-node/register" - ] - } -} -``` - -### Native ECMAScript modules - -This configuration is necessary if your `package.json` has `"type": "module"`. - -```jsonc title="package.json" -{ - "ava": { - "extensions": { - "ts": "module" - }, - "nonSemVerExperiments": { - "configurableModuleFormat": true - }, - "nodeArguments": [ - "--loader=ts-node/esm" - ] - } -} -``` - -## Gulp - -ts-node support is built-in to gulp. - -```sh -# Create a `gulpfile.ts` and run `gulp`. -gulp -``` - -See also: https://gulpjs.com/docs/en/getting-started/javascript-and-gulpfiles#transpilation - -## IntelliJ and Webstorm - -Create a new Node.js configuration and add `-r ts-node/register` to "Node parameters." - -**Note:** If you are using the `--project ` command line argument as per the [Configuration Options](#configuration), and want to apply this same behavior when launching in IntelliJ, specify under "Environment Variables": `TS_NODE_PROJECT=`. - -## Mocha - -### Mocha 7 and newer - -```shell -mocha --require ts-node/register --extensions ts,tsx --watch --watch-files src 'tests/**/*.{ts,tsx}' [...args] -``` - -Or specify options via your mocha config file. - -```jsonc title=".mocharc.json" -{ - // Specify "require" for CommonJS - "require": "ts-node/register", - // Specify "loader" for native ESM - "loader": "ts-node/esm", - "extensions": ["ts", "tsx"], - "spec": [ - "tests/**/*.spec.*" - ], - "watch-files": [ - "src" - ] -} -``` - -See also: https://mochajs.org/#configuring-mocha-nodejs - -### Mocha <=6 - -```shell -mocha --require ts-node/register --watch-extensions ts,tsx "test/**/*.{ts,tsx}" [...args] -``` - -**Note:** `--watch-extensions` is only used in `--watch` mode. - -## Tape - -```shell -ts-node node_modules/tape/bin/tape [...args] -``` - -## Visual Studio Code - -Create a new Node.js debug configuration, add `-r ts-node/register` to node args and move the `program` to the `args` list (so VS Code doesn't look for `outFiles`). - -```jsonc title=".vscode/launch.json" -{ - "configurations": [{ - "type": "node", - "request": "launch", - "name": "Launch Program", - "runtimeArgs": [ - "-r", - "ts-node/register" - ], - "args": [ - "${workspaceFolder}/src/index.ts" - ] - }], -} -``` - -**Note:** If you are using the `--project ` command line argument as per the [Configuration Options](#configuration), and want to apply this same behavior when launching in VS Code, add an "env" key into the launch configuration: `"env": { "TS_NODE_PROJECT": "" }`. - -## Other - -In many cases, setting [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#cli_node_options_options) will enable `ts-node` within other node tools, child processes, and worker threads. - -```shell -NODE_OPTIONS="-r ts-node/register" -``` - -Or, if you require native ESM support: - -```shell -NODE_OPTIONS="--loader ts-node/esm" -``` - -This tells any node processes which receive this environment variable to install `ts-node`'s hooks before executing other code. - -# License - -ts-node is licensed under the MIT license. [MIT](https://github.com/TypeStrong/ts-node/blob/main/LICENSE) - -ts-node includes source code from Node.js which is licensed under the MIT license. [Node.js license information](https://raw.githubusercontent.com/nodejs/node/master/LICENSE) - -ts-node includes source code from the TypeScript compiler which is licensed under the Apache License 2.0. [TypeScript license information](https://github.com/microsoft/TypeScript/blob/master/LICENSE.txt) diff --git a/node_modules/ts-node/child-loader.mjs b/node_modules/ts-node/child-loader.mjs deleted file mode 100644 index 6ef592a..0000000 --- a/node_modules/ts-node/child-loader.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import { fileURLToPath } from 'url'; -import { createRequire } from 'module'; -const require = createRequire(fileURLToPath(import.meta.url)); - -// TODO why use require() here? I think we can just `import` -/** @type {import('./dist/child-loader')} */ -const childLoader = require('./dist/child/child-loader'); -export const { resolve, load, getFormat, transformSource } = childLoader; diff --git a/node_modules/ts-node/dist-raw/NODE-LICENSE.md b/node_modules/ts-node/dist-raw/NODE-LICENSE.md deleted file mode 100644 index c1de8e9..0000000 --- a/node_modules/ts-node/dist-raw/NODE-LICENSE.md +++ /dev/null @@ -1,24 +0,0 @@ -This directory contains portions of Node.js source code which is licensed as follows: - ---- - -Copyright Joyent, Inc. and other Node 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/ts-node/dist-raw/README.md b/node_modules/ts-node/dist-raw/README.md deleted file mode 100644 index 9eeaed3..0000000 --- a/node_modules/ts-node/dist-raw/README.md +++ /dev/null @@ -1,36 +0,0 @@ -The `dist-raw` directory contains JS sources that are distributed verbatim, not compiled nor typechecked via TS. - -To implement ESM support, we unfortunately must duplicate some of node's built-in functionality that is not -exposed via an API. We have copy-pasted the necessary code from https://github.com/nodejs/node/tree/master/lib -then modified it to suite our needs. - -Formatting may be intentionally bad to keep the diff as small as possible, to make it easier to merge -upstream changes and understand our modifications. For example, when we need to wrap node's source code -in a factory function, we will not indent the function body, to avoid whitespace changes in the diff. - -One obvious problem with this approach: the code has been pulled from one version of node, whereas users of ts-node -run multiple versions of node. -Users running node 12 may see that ts-node behaves like node 14, for example. - -## `raw` directory - -Within the `raw` directory, we keep unmodified copies of the node source files. This allows us to use diffing tools to -compare files in `raw` to those in `dist-raw`, which will highlight all of the changes we have made. Hopefully, these -changes are as minimal as possible. - -## Naming convention - -Not used consistently, but the idea is: - -`node-(...-)-.js` - -`node-internal-errors.js` -> `github.com/nodejs/node/blob/TAG/lib/internal/errors.js` - -So, take the path within node's `lib/` directory, and replace slashes with hyphens. - -In the `raw` directory, files are suffixed with the version number or revision from which -they were downloaded. - -If they have a `stripped` suffix, this means they have large chunks of code deleted, but no other modifications. -This is useful when diffing. Sometimes our `dist-raw` files only have a small part of a much larger node source file. -It is easier to diff `raw/*-stripped.js` against `dist-raw/*.js`. diff --git a/node_modules/ts-node/dist-raw/node-internal-constants.js b/node_modules/ts-node/dist-raw/node-internal-constants.js deleted file mode 100644 index b4aa7aa..0000000 --- a/node_modules/ts-node/dist-raw/node-internal-constants.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copied from https://github.com/nodejs/node/blob/master/lib/internal/constants.js -module.exports = { - CHAR_FORWARD_SLASH: 47, /* / */ -}; diff --git a/node_modules/ts-node/dist-raw/node-internal-errors.js b/node_modules/ts-node/dist-raw/node-internal-errors.js deleted file mode 100644 index ddcd661..0000000 --- a/node_modules/ts-node/dist-raw/node-internal-errors.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; - -const path = require('path'); - -exports.codes = { - ERR_INPUT_TYPE_NOT_ALLOWED: createErrorCtor(joinArgs('ERR_INPUT_TYPE_NOT_ALLOWED')), - ERR_INVALID_ARG_VALUE: createErrorCtor(joinArgs('ERR_INVALID_ARG_VALUE')), - ERR_INVALID_MODULE_SPECIFIER: createErrorCtor(joinArgs('ERR_INVALID_MODULE_SPECIFIER')), - ERR_INVALID_PACKAGE_CONFIG: createErrorCtor(joinArgs('ERR_INVALID_PACKAGE_CONFIG')), - ERR_INVALID_PACKAGE_TARGET: createErrorCtor(joinArgs('ERR_INVALID_PACKAGE_TARGET')), - ERR_MANIFEST_DEPENDENCY_MISSING: createErrorCtor(joinArgs('ERR_MANIFEST_DEPENDENCY_MISSING')), - ERR_MODULE_NOT_FOUND: createErrorCtor((path, base, type = 'package') => { - return `Cannot find ${type} '${path}' imported from ${base}` - }), - ERR_PACKAGE_IMPORT_NOT_DEFINED: createErrorCtor(joinArgs('ERR_PACKAGE_IMPORT_NOT_DEFINED')), - ERR_PACKAGE_PATH_NOT_EXPORTED: createErrorCtor(joinArgs('ERR_PACKAGE_PATH_NOT_EXPORTED')), - ERR_UNSUPPORTED_DIR_IMPORT: createErrorCtor(joinArgs('ERR_UNSUPPORTED_DIR_IMPORT')), - ERR_UNSUPPORTED_ESM_URL_SCHEME: createErrorCtor(joinArgs('ERR_UNSUPPORTED_ESM_URL_SCHEME')), - ERR_UNKNOWN_FILE_EXTENSION: createErrorCtor(joinArgs('ERR_UNKNOWN_FILE_EXTENSION')), -} - -function joinArgs(name) { - return (...args) => { - return [name, ...args].join(' ') - } -} - -function createErrorCtor(errorMessageCreator) { - return class CustomError extends Error { - constructor(...args) { - super(errorMessageCreator(...args)) - } - } -} -exports.createErrRequireEsm = createErrRequireEsm; - -// Native ERR_REQUIRE_ESM Error is declared here: -// https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L1294-L1313 -// Error class factory is implemented here: -// function E: https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L323-L341 -// function makeNodeErrorWithCode: https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L251-L278 -// The code below should create an error that matches the native error as closely as possible. -// Third-party libraries which attempt to catch the native ERR_REQUIRE_ESM should recognize our imitation error. -function createErrRequireEsm(filename, parentPath, packageJsonPath) { - const code = 'ERR_REQUIRE_ESM' - const err = new Error(getErrRequireEsmMessage(filename, parentPath, packageJsonPath)) - // Set `name` to be used in stack trace, generate stack trace with that name baked in, then re-declare the `name` field. - // This trick is copied from node's source. - err.name = `Error [${ code }]` - err.stack - Object.defineProperty(err, 'name', { - value: 'Error', - enumerable: false, - writable: true, - configurable: true - }) - err.code = code - return err -} - -// Copy-pasted from https://github.com/nodejs/node/blob/b533fb3508009e5f567cc776daba8fbf665386a6/lib/internal/errors.js#L1293-L1311 -// so that our error message is identical to the native message. -function getErrRequireEsmMessage(filename, parentPath = null, packageJsonPath = null) { - const ext = path.extname(filename) - let msg = `Must use import to load ES Module: ${filename}`; - if (parentPath && packageJsonPath) { - const path = require('path'); - const basename = path.basename(filename) === path.basename(parentPath) ? - filename : path.basename(filename); - msg += - '\nrequire() of ES modules is not supported.\nrequire() of ' + - `${filename} ${parentPath ? `from ${parentPath} ` : ''}` + - `is an ES module file as it is a ${ext} file whose nearest parent ` + - `package.json contains "type": "module" which defines all ${ext} ` + - 'files in that package scope as ES modules.\nInstead ' + - 'change the requiring code to use ' + - 'import(), or remove "type": "module" from ' + - `${packageJsonPath}.\n`; - return msg; - } - return msg; -} diff --git a/node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js b/node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js deleted file mode 100644 index bd4f702..0000000 --- a/node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copied from https://github.com/nodejs/node/blob/v17.0.1/lib/internal/modules/cjs/helpers.js - -'use strict'; - -const { - ArrayPrototypeForEach, - ObjectDefineProperty, - ObjectPrototypeHasOwnProperty, - SafeSet, - StringPrototypeIncludes, - StringPrototypeStartsWith, -} = require('./node-primordials'); - -const { getOptionValue } = require('./node-options'); -const userConditions = getOptionValue('--conditions'); - -const noAddons = getOptionValue('--no-addons'); -const addonConditions = noAddons ? [] : ['node-addons']; - -// TODO: Use this set when resolving pkg#exports conditions in loader.js. -const cjsConditions = new SafeSet([ - 'require', - 'node', - ...addonConditions, - ...userConditions, -]); - -/** - * @param {any} object - * @param {string} [dummyModuleName] - * @return {void} - */ -function addBuiltinLibsToObject(object, dummyModuleName) { - // Make built-in modules available directly (loaded lazily). - const Module = require('module').Module; - const { builtinModules } = Module; - - // To require built-in modules in user-land and ignore modules whose - // `canBeRequiredByUsers` is false. So we create a dummy module object and not - // use `require()` directly. - const dummyModule = new Module(dummyModuleName); - - ArrayPrototypeForEach(builtinModules, (name) => { - // Neither add underscored modules, nor ones that contain slashes (e.g., - // 'fs/promises') or ones that are already defined. - if (StringPrototypeStartsWith(name, '_') || - StringPrototypeIncludes(name, '/') || - ObjectPrototypeHasOwnProperty(object, name)) { - return; - } - // Goals of this mechanism are: - // - Lazy loading of built-in modules - // - Having all built-in modules available as non-enumerable properties - // - Allowing the user to re-assign these variables as if there were no - // pre-existing globals with the same name. - - const setReal = (val) => { - // Deleting the property before re-assigning it disables the - // getter/setter mechanism. - delete object[name]; - object[name] = val; - }; - - ObjectDefineProperty(object, name, { - get: () => { - // Node 12 hack; remove when we drop node12 support - const lib = (dummyModule.require || require)(name); - - // Disable the current getter/setter and set up a new - // non-enumerable property. - delete object[name]; - ObjectDefineProperty(object, name, { - get: () => lib, - set: setReal, - configurable: true, - enumerable: false - }); - - return lib; - }, - set: setReal, - configurable: true, - enumerable: false - }); - }); -} - -exports.addBuiltinLibsToObject = addBuiltinLibsToObject; -exports.cjsConditions = cjsConditions; diff --git a/node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js b/node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js deleted file mode 100644 index cb83c35..0000000 --- a/node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js +++ /dev/null @@ -1,593 +0,0 @@ -// Copied from several files in node's source code. -// https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/modules/cjs/loader.js -// Each function and variable below must have a comment linking to the source in node's github repo. - -'use strict'; - -const { - ArrayIsArray, - ArrayPrototypeIncludes, - ArrayPrototypeJoin, - ArrayPrototypePush, - JSONParse, - ObjectKeys, - RegExpPrototypeTest, - SafeMap, - SafeWeakMap, - StringPrototypeCharCodeAt, - StringPrototypeEndsWith, - StringPrototypeLastIndexOf, - StringPrototypeIndexOf, - StringPrototypeMatch, - StringPrototypeSlice, - StringPrototypeStartsWith, -} = require('./node-primordials'); -const { NativeModule } = require('./node-nativemodule'); -const { pathToFileURL, fileURLToPath } = require('url'); -const fs = require('fs'); -const path = require('path'); -const { sep } = path; -const { internalModuleStat } = require('./node-internalBinding-fs'); -const packageJsonReader = require('./node-internal-modules-package_json_reader'); -const { - cjsConditions, -} = require('./node-internal-modules-cjs-helpers'); -const { getOptionValue } = require('./node-options'); -const preserveSymlinks = getOptionValue('--preserve-symlinks'); -const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); -const {normalizeSlashes} = require('../dist/util'); -const {createErrRequireEsm} = require('./node-internal-errors'); -const { - codes: { - ERR_INVALID_MODULE_SPECIFIER, - }, -} = require('./node-internal-errors'); - -const { - CHAR_FORWARD_SLASH, -} = require('./node-internal-constants'); - -const Module = require('module'); - -const isWindows = process.platform === 'win32'; - -let statCache = null; - -function stat(filename) { - filename = path.toNamespacedPath(filename); - if (statCache !== null) { - const result = statCache.get(filename); - if (result !== undefined) return result; - } - const result = internalModuleStat(filename); - if (statCache !== null && result >= 0) { - // Only set cache when `internalModuleStat(filename)` succeeds. - statCache.set(filename, result); - } - return result; -} - -// Note: -// we cannot get access to node's internal cache, which is populated from -// within node's Module constructor. So the cache here will always be empty. -// It's possible we could approximate our own cache by building it up with -// hacky workarounds, but it's not worth the complexity and flakiness. -const moduleParentCache = new SafeWeakMap(); - -// Given a module name, and a list of paths to test, returns the first -// matching file in the following precedence. -// -// require("a.") -// -> a. -// -// require("a") -// -> a -// -> a. -// -> a/index. - -const packageJsonCache = new SafeMap(); - -function readPackage(requestPath) { - const jsonPath = path.resolve(requestPath, 'package.json'); - - const existing = packageJsonCache.get(jsonPath); - if (existing !== undefined) return existing; - - const result = packageJsonReader.read(jsonPath); - const json = result.containsKeys === false ? '{}' : result.string; - if (json === undefined) { - packageJsonCache.set(jsonPath, false); - return false; - } - - try { - const parsed = JSONParse(json); - const filtered = { - name: parsed.name, - main: parsed.main, - exports: parsed.exports, - imports: parsed.imports, - type: parsed.type - }; - packageJsonCache.set(jsonPath, filtered); - return filtered; - } catch (e) { - e.path = jsonPath; - e.message = 'Error parsing ' + jsonPath + ': ' + e.message; - throw e; - } -} - -function readPackageScope(checkPath) { - const rootSeparatorIndex = StringPrototypeIndexOf(checkPath, sep); - let separatorIndex; - do { - separatorIndex = StringPrototypeLastIndexOf(checkPath, sep); - checkPath = StringPrototypeSlice(checkPath, 0, separatorIndex); - if (StringPrototypeEndsWith(checkPath, sep + 'node_modules')) - return false; - const pjson = readPackage(checkPath + sep); - if (pjson) return { - data: pjson, - path: checkPath, - }; - } while (separatorIndex > rootSeparatorIndex); - return false; -} - -/** - * @param {{ - * nodeEsmResolver: ReturnType, - * extensions: import('../src/file-extensions').Extensions, - * preferTsExts - * }} opts - */ -function createCjsLoader(opts) { -const {nodeEsmResolver, preferTsExts} = opts; -const {replacementsForCjs, replacementsForJs, replacementsForMjs, replacementsForJsx} = opts.extensions; -const { - encodedSepRegEx, - packageExportsResolve, - packageImportsResolve -} = nodeEsmResolver; - -function tryPackage(requestPath, exts, isMain, originalPath) { - // const pkg = readPackage(requestPath)?.main; - const tmp = readPackage(requestPath) - const pkg = tmp != null ? tmp.main : undefined; - - if (!pkg) { - return tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); - } - - const filename = path.resolve(requestPath, pkg); - let actual = tryReplacementExtensions(filename, isMain) || - tryFile(filename, isMain) || - tryExtensions(filename, exts, isMain) || - tryExtensions(path.resolve(filename, 'index'), exts, isMain); - if (actual === false) { - actual = tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); - if (!actual) { - // eslint-disable-next-line no-restricted-syntax - const err = new Error( - `Cannot find module '${filename}'. ` + - 'Please verify that the package.json has a valid "main" entry' - ); - err.code = 'MODULE_NOT_FOUND'; - err.path = path.resolve(requestPath, 'package.json'); - err.requestPath = originalPath; - // TODO(BridgeAR): Add the requireStack as well. - throw err; - } else { - const jsonPath = path.resolve(requestPath, 'package.json'); - process.emitWarning( - `Invalid 'main' field in '${jsonPath}' of '${pkg}'. ` + - 'Please either fix that or report it to the module author', - 'DeprecationWarning', - 'DEP0128' - ); - } - } - return actual; -} - -// In order to minimize unnecessary lstat() calls, -// this cache is a list of known-real paths. -// Set to an empty Map to reset. -const realpathCache = new SafeMap(); - -// Check if the file exists and is not a directory -// if using --preserve-symlinks and isMain is false, -// keep symlinks intact, otherwise resolve to the -// absolute realpath. -function tryFile(requestPath, isMain) { - const rc = stat(requestPath); - if (rc !== 0) return; - if (preserveSymlinks && !isMain) { - return path.resolve(requestPath); - } - return toRealPath(requestPath); -} - -function toRealPath(requestPath) { - return fs.realpathSync(requestPath, { - // [internalFS.realpathCacheKey]: realpathCache - }); -} - -function statReplacementExtensions(p) { - const lastDotIndex = p.lastIndexOf('.'); - if(lastDotIndex >= 0) { - const ext = p.slice(lastDotIndex); - if (ext === '.js' || ext === '.jsx' || ext === '.mjs' || ext === '.cjs') { - const pathnameWithoutExtension = p.slice(0, lastDotIndex); - const replacementExts = - ext === '.js' ? replacementsForJs - : ext === '.jsx' ? replacementsForJsx - : ext === '.mjs' ? replacementsForMjs - : replacementsForCjs; - for (let i = 0; i < replacementExts.length; i++) { - const filename = pathnameWithoutExtension + replacementExts[i]; - const rc = stat(filename); - if (rc === 0) { - return [rc, filename]; - } - } - } - } - return [stat(p), p]; -} -function tryReplacementExtensions(p, isMain) { - const lastDotIndex = p.lastIndexOf('.'); - if(lastDotIndex >= 0) { - const ext = p.slice(lastDotIndex); - if (ext === '.js' || ext === '.jsx' || ext === '.mjs' || ext === '.cjs') { - const pathnameWithoutExtension = p.slice(0, lastDotIndex); - const replacementExts = - ext === '.js' ? replacementsForJs - : ext === '.jsx' ? replacementsForJsx - : ext === '.mjs' ? replacementsForMjs - : replacementsForCjs; - for (let i = 0; i < replacementExts.length; i++) { - const filename = tryFile(pathnameWithoutExtension + replacementExts[i], isMain); - if (filename) { - return filename; - } - } - } - } - return false; -} - -// Given a path, check if the file exists with any of the set extensions -function tryExtensions(p, exts, isMain) { - for (let i = 0; i < exts.length; i++) { - const filename = tryFile(p + exts[i], isMain); - - if (filename) { - return filename; - } - } - return false; -} - -function trySelfParentPath(parent) { - if (!parent) return false; - - if (parent.filename) { - return parent.filename; - } else if (parent.id === '' || parent.id === 'internal/preload') { - try { - return process.cwd() + path.sep; - } catch { - return false; - } - } -} - -function trySelf(parentPath, request) { - if (!parentPath) return false; - - const { data: pkg, path: pkgPath } = readPackageScope(parentPath) || {}; - if (!pkg || pkg.exports === undefined) return false; - if (typeof pkg.name !== 'string') return false; - - let expansion; - if (request === pkg.name) { - expansion = '.'; - } else if (StringPrototypeStartsWith(request, `${pkg.name}/`)) { - expansion = '.' + StringPrototypeSlice(request, pkg.name.length); - } else { - return false; - } - - try { - return finalizeEsmResolution(packageExportsResolve( - pathToFileURL(pkgPath + '/package.json'), expansion, pkg, - pathToFileURL(parentPath), cjsConditions).resolved, parentPath, pkgPath); - } catch (e) { - if (e.code === 'ERR_MODULE_NOT_FOUND') - throw createEsmNotFoundErr(request, pkgPath + '/package.json'); - throw e; - } -} - -// This only applies to requests of a specific form: -// 1. name/.* -// 2. @scope/name/.* -const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^./\\%][^/\\%]*)(\/.*)?$/; -function resolveExports(nmPath, request) { - // The implementation's behavior is meant to mirror resolution in ESM. - const { 1: name, 2: expansion = '' } = - StringPrototypeMatch(request, EXPORTS_PATTERN) || []; - if (!name) - return; - const pkgPath = path.resolve(nmPath, name); - const pkg = readPackage(pkgPath); - // if (pkg?.exports != null) { - if (pkg != null && pkg.exports != null) { - try { - return finalizeEsmResolution(packageExportsResolve( - pathToFileURL(pkgPath + '/package.json'), '.' + expansion, pkg, null, - cjsConditions).resolved, null, pkgPath); - } catch (e) { - if (e.code === 'ERR_MODULE_NOT_FOUND') - throw createEsmNotFoundErr(request, pkgPath + '/package.json'); - throw e; - } - } -} - -// Backwards compat for old node versions -const hasModulePathCache = !!require('module')._pathCache; -const Module_pathCache = Object.create(null); -const Module_pathCache_get = hasModulePathCache ? (cacheKey) => Module._pathCache[cacheKey] : (cacheKey) => Module_pathCache[cacheKey]; -const Module_pathCache_set = hasModulePathCache ? (cacheKey, value) => (Module._pathCache[cacheKey] = value) : (cacheKey) => (Module_pathCache[cacheKey] = value); - -const trailingSlashRegex = /(?:^|\/)\.?\.$/; -const Module_findPath = function _findPath(request, paths, isMain) { - const absoluteRequest = path.isAbsolute(request); - if (absoluteRequest) { - paths = ['']; - } else if (!paths || paths.length === 0) { - return false; - } - - const cacheKey = request + '\x00' + ArrayPrototypeJoin(paths, '\x00'); - const entry = Module_pathCache_get(cacheKey); - if (entry) - return entry; - - let exts; - let trailingSlash = request.length > 0 && - StringPrototypeCharCodeAt(request, request.length - 1) === - CHAR_FORWARD_SLASH; - if (!trailingSlash) { - trailingSlash = RegExpPrototypeTest(trailingSlashRegex, request); - } - - // For each path - for (let i = 0; i < paths.length; i++) { - // Don't search further if path doesn't exist - const curPath = paths[i]; - if (curPath && stat(curPath) < 1) continue; - - if (!absoluteRequest) { - const exportsResolved = resolveExports(curPath, request); - if (exportsResolved) - return exportsResolved; - } - - const _basePath = path.resolve(curPath, request); - let filename; - - const [rc, basePath] = statReplacementExtensions(_basePath); - if (!trailingSlash) { - if (rc === 0) { // File. - if (!isMain) { - if (preserveSymlinks) { - filename = path.resolve(basePath); - } else { - filename = toRealPath(basePath); - } - } else if (preserveSymlinksMain) { - // For the main module, we use the preserveSymlinksMain flag instead - // mainly for backward compatibility, as the preserveSymlinks flag - // historically has not applied to the main module. Most likely this - // was intended to keep .bin/ binaries working, as following those - // symlinks is usually required for the imports in the corresponding - // files to resolve; that said, in some use cases following symlinks - // causes bigger problems which is why the preserveSymlinksMain option - // is needed. - filename = path.resolve(basePath); - } else { - filename = toRealPath(basePath); - } - } - - if (!filename) { - // Try it with each of the extensions - if (exts === undefined) - exts = ObjectKeys(Module._extensions); - filename = tryExtensions(basePath, exts, isMain); - } - } - - if (!filename && rc === 1) { // Directory. - // try it with each of the extensions at "index" - if (exts === undefined) - exts = ObjectKeys(Module._extensions); - filename = tryPackage(basePath, exts, isMain, request); - } - - if (filename) { - Module_pathCache_set(cacheKey, filename); - return filename; - } - } - - return false; -}; - -const Module_resolveFilename = function _resolveFilename(request, parent, isMain, options) { - if (StringPrototypeStartsWith(request, 'node:') || - NativeModule.canBeRequiredByUsers(request)) { - return request; - } - - let paths; - - if (typeof options === 'object' && options !== null) { - if (ArrayIsArray(options.paths)) { - const isRelative = StringPrototypeStartsWith(request, './') || - StringPrototypeStartsWith(request, '../') || - ((isWindows && StringPrototypeStartsWith(request, '.\\')) || - StringPrototypeStartsWith(request, '..\\')); - - if (isRelative) { - paths = options.paths; - } else { - const fakeParent = new Module('', null); - - paths = []; - - for (let i = 0; i < options.paths.length; i++) { - const path = options.paths[i]; - fakeParent.paths = Module._nodeModulePaths(path); - const lookupPaths = Module._resolveLookupPaths(request, fakeParent); - - for (let j = 0; j < lookupPaths.length; j++) { - if (!ArrayPrototypeIncludes(paths, lookupPaths[j])) - ArrayPrototypePush(paths, lookupPaths[j]); - } - } - } - } else if (options.paths === undefined) { - paths = Module._resolveLookupPaths(request, parent); - } else { - throw new ERR_INVALID_ARG_VALUE('options.paths', options.paths); - } - } else { - paths = Module._resolveLookupPaths(request, parent); - } - - // if (parent?.filename) { - // node 12 hack - if (parent != null && parent.filename) { - if (request[0] === '#') { - const pkg = readPackageScope(parent.filename) || {}; - - // if (pkg.data?.imports != null) { - // node 12 hack - if (pkg.data != null && pkg.data.imports != null) { - try { - return finalizeEsmResolution( - packageImportsResolve(request, pathToFileURL(parent.filename), - cjsConditions), parent.filename, - pkg.path); - } catch (e) { - if (e.code === 'ERR_MODULE_NOT_FOUND') - throw createEsmNotFoundErr(request); - throw e; - } - } - } - } - - // Try module self resolution first - const parentPath = trySelfParentPath(parent); - const selfResolved = trySelf(parentPath, request); - if (selfResolved) { - const cacheKey = request + '\x00' + - (paths.length === 1 ? paths[0] : ArrayPrototypeJoin(paths, '\x00')); - Module._pathCache[cacheKey] = selfResolved; - return selfResolved; - } - - // Look up the filename first, since that's the cache key. - const filename = Module._findPath(request, paths, isMain, false); - if (filename) return filename; - const requireStack = []; - for (let cursor = parent; - cursor; - cursor = moduleParentCache.get(cursor)) { - ArrayPrototypePush(requireStack, cursor.filename || cursor.id); - } - let message = `Cannot find module '${request}'`; - if (requireStack.length > 0) { - message = message + '\nRequire stack:\n- ' + - ArrayPrototypeJoin(requireStack, '\n- '); - } - // eslint-disable-next-line no-restricted-syntax - const err = new Error(message); - err.code = 'MODULE_NOT_FOUND'; - err.requireStack = requireStack; - throw err; -}; - -function finalizeEsmResolution(resolved, parentPath, pkgPath) { - if (RegExpPrototypeTest(encodedSepRegEx, resolved)) - throw new ERR_INVALID_MODULE_SPECIFIER( - resolved, 'must not include encoded "/" or "\\" characters', parentPath); - const filename = fileURLToPath(resolved); - const actual = tryReplacementExtensions(filename) || tryFile(filename); - if (actual) - return actual; - const err = createEsmNotFoundErr(filename, - path.resolve(pkgPath, 'package.json')); - throw err; -} - -function createEsmNotFoundErr(request, path) { - // eslint-disable-next-line no-restricted-syntax - const err = new Error(`Cannot find module '${request}'`); - err.code = 'MODULE_NOT_FOUND'; - if (path) - err.path = path; - // TODO(BridgeAR): Add the requireStack as well. - return err; -} - - -return { - Module_findPath, - Module_resolveFilename -} - -} - -/** - * copied from Module._extensions['.js'] - * https://github.com/nodejs/node/blob/v15.3.0/lib/internal/modules/cjs/loader.js#L1113-L1120 - * @param {import('../src/index').Service} service - * @param {NodeJS.Module} module - * @param {string} filename - */ -function assertScriptCanLoadAsCJSImpl(service, module, filename) { - const pkg = readPackageScope(filename); - - // ts-node modification: allow our configuration to override - const tsNodeClassification = service.moduleTypeClassifier.classifyModuleByModuleTypeOverrides(normalizeSlashes(filename)); - if(tsNodeClassification.moduleType === 'cjs') return; - - // ignore package.json when file extension is ESM-only or CJS-only - // [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS] - const lastDotIndex = filename.lastIndexOf('.'); - const ext = lastDotIndex >= 0 ? filename.slice(lastDotIndex) : ''; - - if((ext === '.cts' || ext === '.cjs') && tsNodeClassification.moduleType === 'auto') return; - - // Function require shouldn't be used in ES modules. - if (ext === '.mts' || ext === '.mjs' || tsNodeClassification.moduleType === 'esm' || (pkg && pkg.data && pkg.data.type === 'module')) { - const parentPath = module.parent && module.parent.filename; - const packageJsonPath = pkg ? path.resolve(pkg.path, 'package.json') : null; - throw createErrRequireEsm(filename, parentPath, packageJsonPath); - } -} - - -module.exports = { - createCjsLoader, - assertScriptCanLoadAsCJSImpl, - readPackageScope -}; diff --git a/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js b/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js deleted file mode 100644 index e85e0ab..0000000 --- a/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js +++ /dev/null @@ -1,106 +0,0 @@ -// Copied from https://raw.githubusercontent.com/nodejs/node/v15.3.0/lib/internal/modules/esm/get_format.js - -'use strict'; -const { - RegExpPrototypeExec, - StringPrototypeStartsWith, -} = require('./node-primordials'); -const { extname } = require('path'); -const { getOptionValue } = require('./node-options'); - -const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(s => parseInt(s, 10)); -const experimentalJsonModules = - nodeMajor > 17 - || (nodeMajor === 17 && nodeMinor >= 5) - || (nodeMajor === 16 && nodeMinor >= 15) - || getOptionValue('--experimental-json-modules'); -const experimentalWasmModules = getOptionValue('--experimental-wasm-modules'); -const { URL, fileURLToPath } = require('url'); -const { ERR_UNKNOWN_FILE_EXTENSION } = require('./node-internal-errors').codes; - -const extensionFormatMap = { - '__proto__': null, - '.cjs': 'commonjs', - '.js': 'module', - '.mjs': 'module' -}; - -const legacyExtensionFormatMap = { - '__proto__': null, - '.cjs': 'commonjs', - '.js': 'commonjs', - '.json': 'commonjs', - '.mjs': 'module', - '.node': 'commonjs' -}; - -if (experimentalWasmModules) - extensionFormatMap['.wasm'] = legacyExtensionFormatMap['.wasm'] = 'wasm'; - -if (experimentalJsonModules) - extensionFormatMap['.json'] = legacyExtensionFormatMap['.json'] = 'json'; - -/** - * - * @param {'node' | 'explicit'} [tsNodeExperimentalSpecifierResolution] - * @param {ReturnType< - * typeof import('../dist-raw/node-internal-modules-esm-resolve').createResolve - * >} nodeEsmResolver - */ -function createGetFormat(tsNodeExperimentalSpecifierResolution, nodeEsmResolver) { -// const experimentalSpeciferResolution = tsNodeExperimentalSpecifierResolution ?? getOptionValue('--experimental-specifier-resolution'); -let experimentalSpeciferResolution = tsNodeExperimentalSpecifierResolution != null ? tsNodeExperimentalSpecifierResolution : getOptionValue('--experimental-specifier-resolution'); -const { getPackageType } = nodeEsmResolver; - -/** - * @param {string} url - * @param {{}} context - * @param {any} defaultGetFormatUnused - * @returns {ReturnType} - */ -function defaultGetFormat(url, context, defaultGetFormatUnused) { - if (StringPrototypeStartsWith(url, 'node:')) { - return { format: 'builtin' }; - } - const parsed = new URL(url); - if (parsed.protocol === 'data:') { - const [ , mime ] = RegExpPrototypeExec( - /^([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/, - parsed.pathname, - ) || [ null, null, null ]; - const format = ({ - '__proto__': null, - 'text/javascript': 'module', - 'application/json': experimentalJsonModules ? 'json' : null, - 'application/wasm': experimentalWasmModules ? 'wasm' : null - })[mime] || null; - return { format }; - } else if (parsed.protocol === 'file:') { - const ext = extname(parsed.pathname); - let format; - if (ext === '.js') { - format = getPackageType(parsed.href) === 'module' ? 'module' : 'commonjs'; - } else { - format = extensionFormatMap[ext]; - } - if (!format) { - if (experimentalSpeciferResolution === 'node') { - process.emitWarning( - 'The Node.js specifier resolution in ESM is experimental.', - 'ExperimentalWarning'); - format = legacyExtensionFormatMap[ext]; - } else { - throw new ERR_UNKNOWN_FILE_EXTENSION(ext, fileURLToPath(url)); - } - } - return { format: format || null }; - } - return { format: null }; -} - -return {defaultGetFormat}; -} - -module.exports = { - createGetFormat -}; diff --git a/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js b/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js deleted file mode 100644 index 2fbd832..0000000 --- a/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js +++ /dev/null @@ -1,962 +0,0 @@ -// Copied from https://raw.githubusercontent.com/nodejs/node/v15.3.0/lib/internal/modules/esm/resolve.js - -'use strict'; - -const {versionGteLt} = require('../dist/util'); - -// Test for node >14.13.1 || (>=12.20.0 && <13) -const builtinModuleProtocol = - versionGteLt(process.versions.node, '14.13.1') || - versionGteLt(process.versions.node, '12.20.0', '13.0.0') - ? 'node:' - : 'nodejs:'; - -const { - ArrayIsArray, - ArrayPrototypeJoin, - ArrayPrototypeShift, - JSONParse, - JSONStringify, - ObjectFreeze, - ObjectGetOwnPropertyNames, - ObjectPrototypeHasOwnProperty, - RegExpPrototypeTest, - SafeMap, - SafeSet, - StringPrototypeEndsWith, - StringPrototypeIndexOf, - StringPrototypeLastIndexOf, - StringPrototypeReplace, - StringPrototypeSlice, - StringPrototypeSplit, - StringPrototypeStartsWith, - StringPrototypeSubstr, -} = require('./node-primordials'); - -// const internalFS = require('internal/fs/utils'); -const Module = require('module'); -const { NativeModule } = require('./node-nativemodule'); -const { - realpathSync, - statSync, - Stats, -} = require('fs'); -// const { getOptionValue } = require('internal/options'); -const { getOptionValue } = require('./node-options'); -// // Do not eagerly grab .manifest, it may be in TDZ -// const policy = getOptionValue('--experimental-policy') ? -// require('internal/process/policy') : -// null; -// disabled for now. I am not sure if/how we should support this -const policy = null; -const { sep, relative } = require('path'); -const preserveSymlinks = getOptionValue('--preserve-symlinks'); -const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); -const typeFlag = getOptionValue('--input-type'); -// const { URL, pathToFileURL, fileURLToPath } = require('internal/url'); -const { URL, pathToFileURL, fileURLToPath } = require('url'); -const { - ERR_INPUT_TYPE_NOT_ALLOWED, - ERR_INVALID_ARG_VALUE, - ERR_INVALID_MODULE_SPECIFIER, - ERR_INVALID_PACKAGE_CONFIG, - ERR_INVALID_PACKAGE_TARGET, - ERR_MANIFEST_DEPENDENCY_MISSING, - ERR_MODULE_NOT_FOUND, - ERR_PACKAGE_IMPORT_NOT_DEFINED, - ERR_PACKAGE_PATH_NOT_EXPORTED, - ERR_UNSUPPORTED_DIR_IMPORT, - ERR_UNSUPPORTED_ESM_URL_SCHEME, -// } = require('internal/errors').codes; -} = require('./node-internal-errors').codes; - -// const { Module: CJSModule } = require('internal/modules/cjs/loader'); -const CJSModule = Module; - -// const packageJsonReader = require('internal/modules/package_json_reader'); -const packageJsonReader = require('./node-internal-modules-package_json_reader'); -const userConditions = getOptionValue('--conditions'); -const DEFAULT_CONDITIONS = ObjectFreeze(['node', 'import', ...userConditions]); -const DEFAULT_CONDITIONS_SET = new SafeSet(DEFAULT_CONDITIONS); - -const pendingDeprecation = getOptionValue('--pending-deprecation'); - -/** - * @param {{ - * extensions: import('../src/file-extensions').Extensions, - * preferTsExts: boolean | undefined; - * tsNodeExperimentalSpecifierResolution: import('../src/index').ExperimentalSpecifierResolution | undefined; - * }} opts - */ -function createResolve(opts) { -// TODO receive cached fs implementations here -const {preferTsExts, tsNodeExperimentalSpecifierResolution, extensions} = opts; -const esrnExtensions = extensions.experimentalSpecifierResolutionAddsIfOmitted; -const {legacyMainResolveAddsIfOmitted, replacementsForCjs, replacementsForJs, replacementsForMjs, replacementsForJsx} = extensions; -// const experimentalSpecifierResolution = tsNodeExperimentalSpecifierResolution ?? getOptionValue('--experimental-specifier-resolution'); -const experimentalSpecifierResolution = tsNodeExperimentalSpecifierResolution != null ? tsNodeExperimentalSpecifierResolution : getOptionValue('--experimental-specifier-resolution'); - -const emittedPackageWarnings = new SafeSet(); -function emitFolderMapDeprecation(match, pjsonUrl, isExports, base) { - const pjsonPath = fileURLToPath(pjsonUrl); - if (!pendingDeprecation) { - const nodeModulesIndex = StringPrototypeLastIndexOf(pjsonPath, - '/node_modules/'); - if (nodeModulesIndex !== -1) { - const afterNodeModulesPath = StringPrototypeSlice(pjsonPath, - nodeModulesIndex + 14, - -13); - try { - const { packageSubpath } = parsePackageName(afterNodeModulesPath); - if (packageSubpath === '.') - return; - } catch {} - } - } - if (emittedPackageWarnings.has(pjsonPath + '|' + match)) - return; - emittedPackageWarnings.add(pjsonPath + '|' + match); - process.emitWarning( - `Use of deprecated folder mapping "${match}" in the ${isExports ? - '"exports"' : '"imports"'} field module resolution of the package at ${ - pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ''}.\n` + - `Update this package.json to use a subpath pattern like "${match}*".`, - 'DeprecationWarning', - 'DEP0148' - ); -} - -function getConditionsSet(conditions) { - if (conditions !== undefined && conditions !== DEFAULT_CONDITIONS) { - if (!ArrayIsArray(conditions)) { - throw new ERR_INVALID_ARG_VALUE('conditions', conditions, - 'expected an array'); - } - return new SafeSet(conditions); - } - return DEFAULT_CONDITIONS_SET; -} - -const realpathCache = new SafeMap(); -const packageJSONCache = new SafeMap(); /* string -> PackageConfig */ - -const statSupportsThrowIfNoEntry = versionGteLt(process.versions.node, '15.3.0') || - versionGteLt(process.versions.node, '14.17.0', '15.0.0'); -const tryStatSync = statSupportsThrowIfNoEntry ? tryStatSyncWithoutErrors : tryStatSyncWithErrors; -const statsIfNotFound = new Stats(); -function tryStatSyncWithoutErrors(path) { - const stats = statSync(path, { throwIfNoEntry: false }); - if(stats != null) return stats; - return statsIfNotFound; -} -function tryStatSyncWithErrors(path) { - try { - return statSync(path); - } catch { - return statsIfNotFound; - } -} - -function getPackageConfig(path, specifier, base) { - const existing = packageJSONCache.get(path); - if (existing !== undefined) { - return existing; - } - const source = packageJsonReader.read(path).string; - if (source === undefined) { - const packageConfig = { - pjsonPath: path, - exists: false, - main: undefined, - name: undefined, - type: 'none', - exports: undefined, - imports: undefined, - }; - packageJSONCache.set(path, packageConfig); - return packageConfig; - } - - let packageJSON; - try { - packageJSON = JSONParse(source); - } catch (error) { - throw new ERR_INVALID_PACKAGE_CONFIG( - path, - (base ? `"${specifier}" from ` : '') + fileURLToPath(base || specifier), - error.message - ); - } - - let { imports, main, name, type } = packageJSON; - const { exports } = packageJSON; - if (typeof imports !== 'object' || imports === null) imports = undefined; - if (typeof main !== 'string') main = undefined; - if (typeof name !== 'string') name = undefined; - // Ignore unknown types for forwards compatibility - if (type !== 'module' && type !== 'commonjs') type = 'none'; - - const packageConfig = { - pjsonPath: path, - exists: true, - main, - name, - type, - exports, - imports, - }; - packageJSONCache.set(path, packageConfig); - return packageConfig; -} - -function getPackageScopeConfig(resolved) { - let packageJSONUrl = new URL('./package.json', resolved); - while (true) { - const packageJSONPath = packageJSONUrl.pathname; - if (StringPrototypeEndsWith(packageJSONPath, 'node_modules/package.json')) - break; - const packageConfig = getPackageConfig(fileURLToPath(packageJSONUrl), - resolved); - if (packageConfig.exists) return packageConfig; - - const lastPackageJSONUrl = packageJSONUrl; - packageJSONUrl = new URL('../package.json', packageJSONUrl); - - // Terminates at root where ../package.json equals ../../package.json - // (can't just check "/package.json" for Windows support). - if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) break; - } - const packageJSONPath = fileURLToPath(packageJSONUrl); - const packageConfig = { - pjsonPath: packageJSONPath, - exists: false, - main: undefined, - name: undefined, - type: 'none', - exports: undefined, - imports: undefined, - }; - packageJSONCache.set(packageJSONPath, packageConfig); - return packageConfig; -} - -/* - * Legacy CommonJS main resolution: - * 1. let M = pkg_url + (json main field) - * 2. TRY(M, M.js, M.json, M.node) - * 3. TRY(M/index.js, M/index.json, M/index.node) - * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node) - * 5. NOT_FOUND - */ -function fileExists(url) { - return tryStatSync(fileURLToPath(url)).isFile(); -} - -function legacyMainResolve(packageJSONUrl, packageConfig, base) { - let guess; - if (packageConfig.main !== undefined) { - // Note: fs check redundances will be handled by Descriptor cache here. - if(guess = resolveReplacementExtensions(new URL(`./${packageConfig.main}`, packageJSONUrl))) { - return guess; - } - if (fileExists(guess = new URL(`./${packageConfig.main}`, - packageJSONUrl))) { - return guess; - } - for(const extension of legacyMainResolveAddsIfOmitted) { - if (fileExists(guess = new URL(`./${packageConfig.main}${extension}`, - packageJSONUrl))) { - return guess; - } - } - for(const extension of legacyMainResolveAddsIfOmitted) { - if (fileExists(guess = new URL(`./${packageConfig.main}/index${extension}`, - packageJSONUrl))) { - return guess; - } - } - // Fallthrough. - } - for(const extension of legacyMainResolveAddsIfOmitted) { - if (fileExists(guess = new URL(`./index${extension}`, packageJSONUrl))) { - return guess; - } - } - // Not found. - throw new ERR_MODULE_NOT_FOUND( - fileURLToPath(new URL('.', packageJSONUrl)), fileURLToPath(base)); -} - -/** attempts replacement extensions, then tries exact name, then attempts appending extensions */ -function resolveExtensionsWithTryExactName(search) { - const resolvedReplacementExtension = resolveReplacementExtensions(search); - if(resolvedReplacementExtension) return resolvedReplacementExtension; - if (fileExists(search)) return search; - return resolveExtensions(search); -} - -// This appends missing extensions -function resolveExtensions(search) { - for (let i = 0; i < esrnExtensions.length; i++) { - const extension = esrnExtensions[i]; - const guess = new URL(`${search.pathname}${extension}`, search); - if (fileExists(guess)) return guess; - } - return undefined; -} - -/** This replaces JS with TS extensions */ -function resolveReplacementExtensions(search) { - const lastDotIndex = search.pathname.lastIndexOf('.'); - if(lastDotIndex >= 0) { - const ext = search.pathname.slice(lastDotIndex); - if (ext === '.js' || ext === '.jsx' || ext === '.mjs' || ext === '.cjs') { - const pathnameWithoutExtension = search.pathname.slice(0, lastDotIndex); - const replacementExts = - ext === '.js' ? replacementsForJs - : ext === '.jsx' ? replacementsForJsx - : ext === '.mjs' ? replacementsForMjs - : replacementsForCjs; - const guess = new URL(search.toString()); - for (let i = 0; i < replacementExts.length; i++) { - const extension = replacementExts[i]; - guess.pathname = `${pathnameWithoutExtension}${extension}`; - if (fileExists(guess)) return guess; - } - } - } - return undefined; -} - -function resolveIndex(search) { - return resolveExtensions(new URL('index', search)); -} - -const encodedSepRegEx = /%2F|%2C/i; -function finalizeResolution(resolved, base) { - if (RegExpPrototypeTest(encodedSepRegEx, resolved.pathname)) - throw new ERR_INVALID_MODULE_SPECIFIER( - resolved.pathname, 'must not include encoded "/" or "\\" characters', - fileURLToPath(base)); - - if (experimentalSpecifierResolution === 'node') { - const path = fileURLToPath(resolved); - let file = resolveExtensionsWithTryExactName(resolved); - if (file !== undefined) return file; - if (!StringPrototypeEndsWith(path, '/')) { - file = resolveIndex(new URL(`${resolved}/`)); - if (file !== undefined) return file; - } else { - return resolveIndex(resolved) || resolved; - } - throw new ERR_MODULE_NOT_FOUND( - resolved.pathname, fileURLToPath(base), 'module'); - } - - const file = resolveReplacementExtensions(resolved) || resolved; - const path = fileURLToPath(file); - - const stats = tryStatSync(StringPrototypeEndsWith(path, '/') ? - StringPrototypeSlice(path, -1) : path); - if (stats.isDirectory()) { - const err = new ERR_UNSUPPORTED_DIR_IMPORT(path, fileURLToPath(base)); - err.url = String(resolved); - throw err; - } else if (!stats.isFile()) { - throw new ERR_MODULE_NOT_FOUND( - path || resolved.pathname, fileURLToPath(base), 'module'); - } - - return file; -} - -function throwImportNotDefined(specifier, packageJSONUrl, base) { - throw new ERR_PACKAGE_IMPORT_NOT_DEFINED( - specifier, packageJSONUrl && fileURLToPath(new URL('.', packageJSONUrl)), - fileURLToPath(base)); -} - -function throwExportsNotFound(subpath, packageJSONUrl, base) { - throw new ERR_PACKAGE_PATH_NOT_EXPORTED( - fileURLToPath(new URL('.', packageJSONUrl)), subpath, - base && fileURLToPath(base)); -} - -function throwInvalidSubpath(subpath, packageJSONUrl, internal, base) { - const reason = `request is not a valid subpath for the "${internal ? - 'imports' : 'exports'}" resolution of ${fileURLToPath(packageJSONUrl)}`; - throw new ERR_INVALID_MODULE_SPECIFIER(subpath, reason, - base && fileURLToPath(base)); -} - -function throwInvalidPackageTarget( - subpath, target, packageJSONUrl, internal, base) { - if (typeof target === 'object' && target !== null) { - target = JSONStringify(target, null, ''); - } else { - target = `${target}`; - } - throw new ERR_INVALID_PACKAGE_TARGET( - fileURLToPath(new URL('.', packageJSONUrl)), subpath, target, - internal, base && fileURLToPath(base)); -} - -const invalidSegmentRegEx = /(^|\\|\/)(\.\.?|node_modules)(\\|\/|$)/; -const patternRegEx = /\*/g; - -function resolvePackageTargetString( - target, subpath, match, packageJSONUrl, base, pattern, internal, conditions) { - if (subpath !== '' && !pattern && target[target.length - 1] !== '/') - throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); - - if (!StringPrototypeStartsWith(target, './')) { - if (internal && !StringPrototypeStartsWith(target, '../') && - !StringPrototypeStartsWith(target, '/')) { - let isURL = false; - try { - new URL(target); - isURL = true; - } catch {} - if (!isURL) { - const exportTarget = pattern ? - StringPrototypeReplace(target, patternRegEx, subpath) : - target + subpath; - return packageResolve(exportTarget, packageJSONUrl, conditions); - } - } - throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); - } - - if (RegExpPrototypeTest(invalidSegmentRegEx, StringPrototypeSlice(target, 2))) - throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); - - const resolved = new URL(target, packageJSONUrl); - const resolvedPath = resolved.pathname; - const packagePath = new URL('.', packageJSONUrl).pathname; - - if (!StringPrototypeStartsWith(resolvedPath, packagePath)) - throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); - - if (subpath === '') return resolved; - - if (RegExpPrototypeTest(invalidSegmentRegEx, subpath)) - throwInvalidSubpath(match + subpath, packageJSONUrl, internal, base); - - if (pattern) - return new URL(StringPrototypeReplace(resolved.href, patternRegEx, - subpath)); - return new URL(subpath, resolved); -} - -/** - * @param {string} key - * @returns {boolean} - */ -function isArrayIndex(key) { - const keyNum = +key; - if (`${keyNum}` !== key) return false; - return keyNum >= 0 && keyNum < 0xFFFF_FFFF; -} - -function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, - base, pattern, internal, conditions) { - if (typeof target === 'string') { - return resolvePackageTargetString( - target, subpath, packageSubpath, packageJSONUrl, base, pattern, internal, - conditions); - } else if (ArrayIsArray(target)) { - if (target.length === 0) - return null; - - let lastException; - for (let i = 0; i < target.length; i++) { - const targetItem = target[i]; - let resolved; - try { - resolved = resolvePackageTarget( - packageJSONUrl, targetItem, subpath, packageSubpath, base, pattern, - internal, conditions); - } catch (e) { - lastException = e; - if (e.code === 'ERR_INVALID_PACKAGE_TARGET') - continue; - throw e; - } - if (resolved === undefined) - continue; - if (resolved === null) { - lastException = null; - continue; - } - return resolved; - } - if (lastException === undefined || lastException === null) - return lastException; - throw lastException; - } else if (typeof target === 'object' && target !== null) { - const keys = ObjectGetOwnPropertyNames(target); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (isArrayIndex(key)) { - throw new ERR_INVALID_PACKAGE_CONFIG( - fileURLToPath(packageJSONUrl), base, - '"exports" cannot contain numeric property keys.'); - } - } - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key === 'default' || conditions.has(key)) { - const conditionalTarget = target[key]; - const resolved = resolvePackageTarget( - packageJSONUrl, conditionalTarget, subpath, packageSubpath, base, - pattern, internal, conditions); - if (resolved === undefined) - continue; - return resolved; - } - } - return undefined; - } else if (target === null) { - return null; - } - throwInvalidPackageTarget(packageSubpath, target, packageJSONUrl, internal, - base); -} - -function isConditionalExportsMainSugar(exports, packageJSONUrl, base) { - if (typeof exports === 'string' || ArrayIsArray(exports)) return true; - if (typeof exports !== 'object' || exports === null) return false; - - const keys = ObjectGetOwnPropertyNames(exports); - let isConditionalSugar = false; - let i = 0; - for (let j = 0; j < keys.length; j++) { - const key = keys[j]; - const curIsConditionalSugar = key === '' || key[0] !== '.'; - if (i++ === 0) { - isConditionalSugar = curIsConditionalSugar; - } else if (isConditionalSugar !== curIsConditionalSugar) { - throw new ERR_INVALID_PACKAGE_CONFIG( - fileURLToPath(packageJSONUrl), base, - '"exports" cannot contain some keys starting with \'.\' and some not.' + - ' The exports object must either be an object of package subpath keys' + - ' or an object of main entry condition name keys only.'); - } - } - return isConditionalSugar; -} - -/** - * @param {URL} packageJSONUrl - * @param {string} packageSubpath - * @param {object} packageConfig - * @param {string} base - * @param {Set} conditions - * @returns {{resolved: URL, exact: boolean}} - */ -function packageExportsResolve( - packageJSONUrl, packageSubpath, packageConfig, base, conditions) { - let exports = packageConfig.exports; - if (isConditionalExportsMainSugar(exports, packageJSONUrl, base)) - exports = { '.': exports }; - - if (ObjectPrototypeHasOwnProperty(exports, packageSubpath)) { - const target = exports[packageSubpath]; - const resolved = resolvePackageTarget( - packageJSONUrl, target, '', packageSubpath, base, false, false, conditions - ); - if (resolved === null || resolved === undefined) - throwExportsNotFound(packageSubpath, packageJSONUrl, base); - return { resolved, exact: true }; - } - - let bestMatch = ''; - const keys = ObjectGetOwnPropertyNames(exports); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key[key.length - 1] === '*' && - StringPrototypeStartsWith(packageSubpath, - StringPrototypeSlice(key, 0, -1)) && - packageSubpath.length >= key.length && - key.length > bestMatch.length) { - bestMatch = key; - } else if (key[key.length - 1] === '/' && - StringPrototypeStartsWith(packageSubpath, key) && - key.length > bestMatch.length) { - bestMatch = key; - } - } - - if (bestMatch) { - const target = exports[bestMatch]; - const pattern = bestMatch[bestMatch.length - 1] === '*'; - const subpath = StringPrototypeSubstr(packageSubpath, bestMatch.length - - (pattern ? 1 : 0)); - const resolved = resolvePackageTarget(packageJSONUrl, target, subpath, - bestMatch, base, pattern, false, - conditions); - if (resolved === null || resolved === undefined) - throwExportsNotFound(packageSubpath, packageJSONUrl, base); - if (!pattern) - emitFolderMapDeprecation(bestMatch, packageJSONUrl, true, base); - return { resolved, exact: pattern }; - } - - throwExportsNotFound(packageSubpath, packageJSONUrl, base); -} - -function packageImportsResolve(name, base, conditions) { - if (name === '#' || StringPrototypeStartsWith(name, '#/')) { - const reason = 'is not a valid internal imports specifier name'; - throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base)); - } - let packageJSONUrl; - const packageConfig = getPackageScopeConfig(base); - if (packageConfig.exists) { - packageJSONUrl = pathToFileURL(packageConfig.pjsonPath); - const imports = packageConfig.imports; - if (imports) { - if (ObjectPrototypeHasOwnProperty(imports, name)) { - const resolved = resolvePackageTarget( - packageJSONUrl, imports[name], '', name, base, false, true, conditions - ); - if (resolved !== null) - return { resolved, exact: true }; - } else { - let bestMatch = ''; - const keys = ObjectGetOwnPropertyNames(imports); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key[key.length - 1] === '*' && - StringPrototypeStartsWith(name, - StringPrototypeSlice(key, 0, -1)) && - name.length >= key.length && - key.length > bestMatch.length) { - bestMatch = key; - } else if (key[key.length - 1] === '/' && - StringPrototypeStartsWith(name, key) && - key.length > bestMatch.length) { - bestMatch = key; - } - } - - if (bestMatch) { - const target = imports[bestMatch]; - const pattern = bestMatch[bestMatch.length - 1] === '*'; - const subpath = StringPrototypeSubstr(name, bestMatch.length - - (pattern ? 1 : 0)); - const resolved = resolvePackageTarget( - packageJSONUrl, target, subpath, bestMatch, base, pattern, true, - conditions); - if (resolved !== null) { - if (!pattern) - emitFolderMapDeprecation(bestMatch, packageJSONUrl, false, base); - return { resolved, exact: pattern }; - } - } - } - } - } - throwImportNotDefined(name, packageJSONUrl, base); -} - -function getPackageType(url) { - const packageConfig = getPackageScopeConfig(url); - return packageConfig.type; -} - -function parsePackageName(specifier, base) { - let separatorIndex = StringPrototypeIndexOf(specifier, '/'); - let validPackageName = true; - let isScoped = false; - if (specifier[0] === '@') { - isScoped = true; - if (separatorIndex === -1 || specifier.length === 0) { - validPackageName = false; - } else { - separatorIndex = StringPrototypeIndexOf( - specifier, '/', separatorIndex + 1); - } - } - - const packageName = separatorIndex === -1 ? - specifier : StringPrototypeSlice(specifier, 0, separatorIndex); - - // Package name cannot have leading . and cannot have percent-encoding or - // separators. - for (let i = 0; i < packageName.length; i++) { - if (packageName[i] === '%' || packageName[i] === '\\') { - validPackageName = false; - break; - } - } - - if (!validPackageName) { - throw new ERR_INVALID_MODULE_SPECIFIER( - specifier, 'is not a valid package name', fileURLToPath(base)); - } - - const packageSubpath = '.' + (separatorIndex === -1 ? '' : - StringPrototypeSlice(specifier, separatorIndex)); - - return { packageName, packageSubpath, isScoped }; -} - -/** - * @param {string} specifier - * @param {URL} base - * @param {Set} conditions - * @returns {URL} - */ -function packageResolve(specifier, base, conditions) { - const { packageName, packageSubpath, isScoped } = - parsePackageName(specifier, base); - - // ResolveSelf - const packageConfig = getPackageScopeConfig(base); - if (packageConfig.exists) { - const packageJSONUrl = pathToFileURL(packageConfig.pjsonPath); - if (packageConfig.name === packageName && - packageConfig.exports !== undefined && packageConfig.exports !== null) { - return packageExportsResolve( - packageJSONUrl, packageSubpath, packageConfig, base, conditions - ).resolved; - } - } - - let packageJSONUrl = - new URL('./node_modules/' + packageName + '/package.json', base); - let packageJSONPath = fileURLToPath(packageJSONUrl); - let lastPath; - do { - const stat = tryStatSync(StringPrototypeSlice(packageJSONPath, 0, - packageJSONPath.length - 13)); - if (!stat.isDirectory()) { - lastPath = packageJSONPath; - packageJSONUrl = new URL((isScoped ? - '../../../../node_modules/' : '../../../node_modules/') + - packageName + '/package.json', packageJSONUrl); - packageJSONPath = fileURLToPath(packageJSONUrl); - continue; - } - - // Package match. - const packageConfig = getPackageConfig(packageJSONPath, specifier, base); - if (packageConfig.exports !== undefined && packageConfig.exports !== null) - return packageExportsResolve( - packageJSONUrl, packageSubpath, packageConfig, base, conditions - ).resolved; - if (packageSubpath === '.') - return legacyMainResolve(packageJSONUrl, packageConfig, base); - return new URL(packageSubpath, packageJSONUrl); - // Cross-platform root check. - } while (packageJSONPath.length !== lastPath.length); - - // eslint can't handle the above code. - // eslint-disable-next-line no-unreachable - throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base)); -} - -function isBareSpecifier(specifier) { - return specifier[0] && specifier[0] !== '/' && specifier[0] !== '.'; -} - -function isRelativeSpecifier(specifier) { - if (specifier[0] === '.') { - if (specifier.length === 1 || specifier[1] === '/') return true; - if (specifier[1] === '.') { - if (specifier.length === 2 || specifier[2] === '/') return true; - } - } - return false; -} - -function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) { - if (specifier === '') return false; - if (specifier[0] === '/') return true; - return isRelativeSpecifier(specifier); -} - -/** - * @param {string} specifier - * @param {URL} base - * @param {Set} conditions - * @returns {URL} - */ -function moduleResolve(specifier, base, conditions) { - // Order swapped from spec for minor perf gain. - // Ok since relative URLs cannot parse as URLs. - let resolved; - if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { - resolved = new URL(specifier, base); - } else if (specifier[0] === '#') { - ({ resolved } = packageImportsResolve(specifier, base, conditions)); - } else { - try { - resolved = new URL(specifier); - } catch { - resolved = packageResolve(specifier, base, conditions); - } - } - return finalizeResolution(resolved, base); -} - -/** - * Try to resolve an import as a CommonJS module - * @param {string} specifier - * @param {string} parentURL - * @returns {boolean|string} - */ -function resolveAsCommonJS(specifier, parentURL) { - try { - const parent = fileURLToPath(parentURL); - const tmpModule = new CJSModule(parent, null); - tmpModule.paths = CJSModule._nodeModulePaths(parent); - - let found = CJSModule._resolveFilename(specifier, tmpModule, false); - - // If it is a relative specifier return the relative path - // to the parent - if (isRelativeSpecifier(specifier)) { - found = relative(parent, found); - // Add '.separator if the path does not start with '..separator' - // This should be a safe assumption because when loading - // esm modules there should be always a file specified so - // there should not be a specifier like '..' or '.' - if (!StringPrototypeStartsWith(found, `..${sep}`)) { - found = `.${sep}${found}`; - } - } else if (isBareSpecifier(specifier)) { - // If it is a bare specifier return the relative path within the - // module - const pkg = StringPrototypeSplit(specifier, '/')[0]; - const index = StringPrototypeIndexOf(found, pkg); - if (index !== -1) { - found = StringPrototypeSlice(found, index); - } - } - // Normalize the path separator to give a valid suggestion - // on Windows - if (process.platform === 'win32') { - found = StringPrototypeReplace(found, new RegExp(`\\${sep}`, 'g'), '/'); - } - return found; - } catch { - return false; - } -} - -function defaultResolve(specifier, context = {}, defaultResolveUnused) { - let { parentURL, conditions } = context; - if (parentURL && policy != null && policy.manifest) { - const redirects = policy.manifest.getDependencyMapper(parentURL); - if (redirects) { - const { resolve, reaction } = redirects; - const destination = resolve(specifier, new SafeSet(conditions)); - let missing = true; - if (destination === true) { - missing = false; - } else if (destination) { - const href = destination.href; - return { url: href }; - } - if (missing) { - reaction(new ERR_MANIFEST_DEPENDENCY_MISSING( - parentURL, - specifier, - ArrayPrototypeJoin([...conditions], ', ')) - ); - } - } - } - let parsed; - try { - parsed = new URL(specifier); - if (parsed.protocol === 'data:') { - return { - url: specifier - }; - } - } catch {} - if (parsed && parsed.protocol === builtinModuleProtocol) - return { url: specifier }; - if (parsed && parsed.protocol !== 'file:' && parsed.protocol !== 'data:') - throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed); - if (NativeModule.canBeRequiredByUsers(specifier)) { - return { - url: builtinModuleProtocol + specifier - }; - } - if (parentURL && StringPrototypeStartsWith(parentURL, 'data:')) { - // This is gonna blow up, we want the error - new URL(specifier, parentURL); - } - - const isMain = parentURL === undefined; - if (isMain) { - parentURL = pathToFileURL(`${process.cwd()}/`).href; - - // This is the initial entry point to the program, and --input-type has - // been passed as an option; but --input-type can only be used with - // --eval, --print or STDIN string input. It is not allowed with file - // input, to avoid user confusion over how expansive the effect of the - // flag should be (i.e. entry point only, package scope surrounding the - // entry point, etc.). - if (typeFlag) - throw new ERR_INPUT_TYPE_NOT_ALLOWED(); - } - - conditions = getConditionsSet(conditions); - let url; - try { - url = moduleResolve(specifier, parentURL, conditions); - } catch (error) { - // Try to give the user a hint of what would have been the - // resolved CommonJS module - if (error.code === 'ERR_MODULE_NOT_FOUND' || - error.code === 'ERR_UNSUPPORTED_DIR_IMPORT') { - if (StringPrototypeStartsWith(specifier, 'file://')) { - specifier = fileURLToPath(specifier); - } - const found = resolveAsCommonJS(specifier, parentURL); - if (found) { - // Modify the stack and message string to include the hint - const lines = StringPrototypeSplit(error.stack, '\n'); - const hint = `Did you mean to import ${found}?`; - error.stack = - ArrayPrototypeShift(lines) + '\n' + - hint + '\n' + - ArrayPrototypeJoin(lines, '\n'); - error.message += `\n${hint}`; - } - } - throw error; - } - - if (isMain ? !preserveSymlinksMain : !preserveSymlinks) { - const urlPath = fileURLToPath(url); - const real = realpathSync(urlPath, { - // [internalFS.realpathCacheKey]: realpathCache - }); - const old = url; - url = pathToFileURL( - real + (StringPrototypeEndsWith(urlPath, sep) ? '/' : '')); - url.search = old.search; - url.hash = old.hash; - } - - return { url: `${url}` }; -} - -return { - DEFAULT_CONDITIONS, - defaultResolve, - encodedSepRegEx, - getPackageType, - packageExportsResolve, - packageImportsResolve -}; -} -module.exports = { - createResolve -}; diff --git a/node_modules/ts-node/dist-raw/node-internal-modules-package_json_reader.js b/node_modules/ts-node/dist-raw/node-internal-modules-package_json_reader.js deleted file mode 100644 index 9266bc1..0000000 --- a/node_modules/ts-node/dist-raw/node-internal-modules-package_json_reader.js +++ /dev/null @@ -1,44 +0,0 @@ -// copied from https://github.com/nodejs/node/blob/v15.3.0/lib/internal/modules/package_json_reader.js -'use strict'; - -const { SafeMap } = require('./node-primordials'); -const { internalModuleReadJSON } = require('./node-internalBinding-fs'); -const { pathToFileURL } = require('url'); -const { toNamespacedPath } = require('path'); -// const { getOptionValue } = require('./node-options'); - -const cache = new SafeMap(); - -let manifest; - -/** - * @param {string} jsonPath - * @return {{string: string, containsKeys: boolean}} - */ -function read(jsonPath) { - if (cache.has(jsonPath)) { - return cache.get(jsonPath); - } - - const [string, containsKeys] = internalModuleReadJSON( - toNamespacedPath(jsonPath) - ); - const result = { string, containsKeys }; - if (string !== undefined) { - if (manifest === undefined) { - // manifest = getOptionValue('--experimental-policy') ? - // require('internal/process/policy').manifest : - // null; - // disabled for now. I am not sure if/how we should support this - manifest = null; - } - if (manifest !== null) { - const jsonURL = pathToFileURL(jsonPath); - manifest.assertIntegrity(jsonURL, string); - } - } - cache.set(jsonPath, result); - return result; -} - -module.exports = { read }; diff --git a/node_modules/ts-node/dist-raw/node-internal-repl-await.js b/node_modules/ts-node/dist-raw/node-internal-repl-await.js deleted file mode 100644 index 85bff2d..0000000 --- a/node_modules/ts-node/dist-raw/node-internal-repl-await.js +++ /dev/null @@ -1,254 +0,0 @@ -// copied from https://github.com/nodejs/node/blob/88799930794045795e8abac874730f9eba7e2300/lib/internal/repl/await.js -'use strict'; - -const { - ArrayFrom, - ArrayPrototypeForEach, - ArrayPrototypeIncludes, - ArrayPrototypeJoin, - ArrayPrototypePop, - ArrayPrototypePush, - FunctionPrototype, - ObjectKeys, - RegExpPrototypeSymbolReplace, - StringPrototypeEndsWith, - StringPrototypeIncludes, - StringPrototypeIndexOf, - StringPrototypeRepeat, - StringPrototypeSplit, - StringPrototypeStartsWith, - SyntaxError, -} = require('./node-primordials'); - -const parser = require('acorn').Parser; -const walk = require('acorn-walk'); -const { Recoverable } = require('repl'); - -function isTopLevelDeclaration(state) { - return state.ancestors[state.ancestors.length - 2] === state.body; -} - -const noop = FunctionPrototype; -const visitorsWithoutAncestors = { - ClassDeclaration(node, state, c) { - if (isTopLevelDeclaration(state)) { - state.prepend(node, `${node.id.name}=`); - ArrayPrototypePush( - state.hoistedDeclarationStatements, - `let ${node.id.name}; ` - ); - } - - walk.base.ClassDeclaration(node, state, c); - }, - ForOfStatement(node, state, c) { - if (node.await === true) { - state.containsAwait = true; - } - walk.base.ForOfStatement(node, state, c); - }, - FunctionDeclaration(node, state, c) { - state.prepend(node, `${node.id.name}=`); - ArrayPrototypePush( - state.hoistedDeclarationStatements, - `var ${node.id.name}; ` - ); - }, - FunctionExpression: noop, - ArrowFunctionExpression: noop, - MethodDefinition: noop, - AwaitExpression(node, state, c) { - state.containsAwait = true; - walk.base.AwaitExpression(node, state, c); - }, - ReturnStatement(node, state, c) { - state.containsReturn = true; - walk.base.ReturnStatement(node, state, c); - }, - VariableDeclaration(node, state, c) { - const variableKind = node.kind; - const isIterableForDeclaration = ArrayPrototypeIncludes( - ['ForOfStatement', 'ForInStatement'], - state.ancestors[state.ancestors.length - 2].type - ); - - if (variableKind === 'var' || isTopLevelDeclaration(state)) { - state.replace( - node.start, - node.start + variableKind.length + (isIterableForDeclaration ? 1 : 0), - variableKind === 'var' && isIterableForDeclaration ? - '' : - 'void' + (node.declarations.length === 1 ? '' : ' (') - ); - - if (!isIterableForDeclaration) { - ArrayPrototypeForEach(node.declarations, (decl) => { - state.prepend(decl, '('); - state.append(decl, decl.init ? ')' : '=undefined)'); - }); - - if (node.declarations.length !== 1) { - state.append(node.declarations[node.declarations.length - 1], ')'); - } - } - - const variableIdentifiersToHoist = [ - ['var', []], - ['let', []], - ]; - function registerVariableDeclarationIdentifiers(node) { - switch (node.type) { - case 'Identifier': - ArrayPrototypePush( - variableIdentifiersToHoist[variableKind === 'var' ? 0 : 1][1], - node.name - ); - break; - case 'ObjectPattern': - ArrayPrototypeForEach(node.properties, (property) => { - registerVariableDeclarationIdentifiers(property.value); - }); - break; - case 'ArrayPattern': - ArrayPrototypeForEach(node.elements, (element) => { - registerVariableDeclarationIdentifiers(element); - }); - break; - } - } - - ArrayPrototypeForEach(node.declarations, (decl) => { - registerVariableDeclarationIdentifiers(decl.id); - }); - - ArrayPrototypeForEach( - variableIdentifiersToHoist, - ({ 0: kind, 1: identifiers }) => { - if (identifiers.length > 0) { - ArrayPrototypePush( - state.hoistedDeclarationStatements, - `${kind} ${ArrayPrototypeJoin(identifiers, ', ')}; ` - ); - } - } - ); - } - - walk.base.VariableDeclaration(node, state, c); - } -}; - -const visitors = {}; -for (const nodeType of ObjectKeys(walk.base)) { - const callback = visitorsWithoutAncestors[nodeType] || walk.base[nodeType]; - visitors[nodeType] = (node, state, c) => { - const isNew = node !== state.ancestors[state.ancestors.length - 1]; - if (isNew) { - ArrayPrototypePush(state.ancestors, node); - } - callback(node, state, c); - if (isNew) { - ArrayPrototypePop(state.ancestors); - } - }; -} - -function processTopLevelAwait(src) { - const wrapPrefix = '(async () => { '; - const wrapped = `${wrapPrefix}${src} })()`; - const wrappedArray = ArrayFrom(wrapped); - let root; - try { - root = parser.parse(wrapped, { ecmaVersion: 'latest' }); - } catch (e) { - if (StringPrototypeStartsWith(e.message, 'Unterminated ')) - throw new Recoverable(e); - // If the parse error is before the first "await", then use the execution - // error. Otherwise we must emit this parse error, making it look like a - // proper syntax error. - const awaitPos = StringPrototypeIndexOf(src, 'await'); - const errPos = e.pos - wrapPrefix.length; - if (awaitPos > errPos) - return null; - // Convert keyword parse errors on await into their original errors when - // possible. - if (errPos === awaitPos + 6 && - StringPrototypeIncludes(e.message, 'Expecting Unicode escape sequence')) - return null; - if (errPos === awaitPos + 7 && - StringPrototypeIncludes(e.message, 'Unexpected token')) - return null; - const line = e.loc.line; - const column = line === 1 ? e.loc.column - wrapPrefix.length : e.loc.column; - let message = '\n' + StringPrototypeSplit(src, '\n')[line - 1] + '\n' + - StringPrototypeRepeat(' ', column) + - '^\n\n' + RegExpPrototypeSymbolReplace(/ \([^)]+\)/, e.message, ''); - // V8 unexpected token errors include the token string. - if (StringPrototypeEndsWith(message, 'Unexpected token')) - message += " '" + - // Wrapper end may cause acorn to report error position after the source - ((src.length - 1) >= (e.pos - wrapPrefix.length) - ? src[e.pos - wrapPrefix.length] - : src[src.length - 1]) + - "'"; - // eslint-disable-next-line no-restricted-syntax - throw new SyntaxError(message); - } - const body = root.body[0].expression.callee.body; - const state = { - body, - ancestors: [], - hoistedDeclarationStatements: [], - replace(from, to, str) { - for (let i = from; i < to; i++) { - wrappedArray[i] = ''; - } - if (from === to) str += wrappedArray[from]; - wrappedArray[from] = str; - }, - prepend(node, str) { - wrappedArray[node.start] = str + wrappedArray[node.start]; - }, - append(node, str) { - wrappedArray[node.end - 1] += str; - }, - containsAwait: false, - containsReturn: false - }; - - walk.recursive(body, state, visitors); - - // Do not transform if - // 1. False alarm: there isn't actually an await expression. - // 2. There is a top-level return, which is not allowed. - if (!state.containsAwait || state.containsReturn) { - return null; - } - - const last = body.body[body.body.length - 1]; - if (last.type === 'ExpressionStatement') { - // For an expression statement of the form - // ( expr ) ; - // ^^^^^^^^^^ // last - // ^^^^ // last.expression - // - // We do not want the left parenthesis before the `return` keyword; - // therefore we prepend the `return (` to `last`. - // - // On the other hand, we do not want the right parenthesis after the - // semicolon. Since there can only be more right parentheses between - // last.expression.end and the semicolon, appending one more to - // last.expression should be fine. - state.prepend(last, 'return ('); - state.append(last.expression, ')'); - } - - return ( - ArrayPrototypeJoin(state.hoistedDeclarationStatements, '') + - ArrayPrototypeJoin(wrappedArray, '') - ); -} - -module.exports = { - processTopLevelAwait -}; diff --git a/node_modules/ts-node/dist-raw/node-internalBinding-fs.js b/node_modules/ts-node/dist-raw/node-internalBinding-fs.js deleted file mode 100644 index e85bc82..0000000 --- a/node_modules/ts-node/dist-raw/node-internalBinding-fs.js +++ /dev/null @@ -1,58 +0,0 @@ -const fs = require('fs'); -const {versionGteLt} = require('../dist/util'); - -// In node's core, this is implemented in C -// https://github.com/nodejs/node/blob/v15.3.0/src/node_file.cc#L891-L985 -/** - * @param {string} path - * @returns {[] | [string, boolean]} - */ -function internalModuleReadJSON(path) { - let string - try { - string = fs.readFileSync(path, 'utf8') - } catch (e) { - if (e.code === 'ENOENT') return [] - throw e - } - // Node's implementation checks for the presence of relevant keys: main, name, type, exports, imports - // Node does this for performance to skip unnecessary parsing. - // This would slow us down and, based on our usage, we can skip it. - const containsKeys = true - return [string, containsKeys] -} - -// In node's core, this is implemented in C -// https://github.com/nodejs/node/blob/63e7dc1e5c71b70c80ed9eda230991edb00811e2/src/node_file.cc#L987-L1005 -/** - * @param {string} path - * @returns {number} 0 = file, 1 = dir, negative = error - */ -function internalModuleStat(path) { - const stat = fs.statSync(path, { throwIfNoEntry: false }); - if(!stat) return -1; - if(stat.isFile()) return 0; - if(stat.isDirectory()) return 1; -} - -/** - * @param {string} path - * @returns {number} 0 = file, 1 = dir, negative = error - */ -function internalModuleStatInefficient(path) { - try { - const stat = fs.statSync(path); - if(stat.isFile()) return 0; - if(stat.isDirectory()) return 1; - } catch(e) { - return -e.errno || -1; - } -} - -const statSupportsThrowIfNoEntry = versionGteLt(process.versions.node, '15.3.0') || - versionGteLt(process.versions.node, '14.17.0', '15.0.0'); - -module.exports = { - internalModuleReadJSON, - internalModuleStat: statSupportsThrowIfNoEntry ? internalModuleStat : internalModuleStatInefficient -}; diff --git a/node_modules/ts-node/dist-raw/node-nativemodule.js b/node_modules/ts-node/dist-raw/node-nativemodule.js deleted file mode 100644 index ea54fcd..0000000 --- a/node_modules/ts-node/dist-raw/node-nativemodule.js +++ /dev/null @@ -1,9 +0,0 @@ - -// Node imports this from 'internal/bootstrap/loaders' -const Module = require('module'); -const NativeModule = { - canBeRequiredByUsers(specifier) { - return Module.builtinModules.includes(specifier) - } -}; -exports.NativeModule = NativeModule; diff --git a/node_modules/ts-node/dist-raw/node-options.js b/node_modules/ts-node/dist-raw/node-options.js deleted file mode 100644 index 2272275..0000000 --- a/node_modules/ts-node/dist-raw/node-options.js +++ /dev/null @@ -1,103 +0,0 @@ -// Replacement for node's internal 'internal/options' module - -exports.getOptionValue = getOptionValue; -function getOptionValue(opt) { - parseOptions(); - return options[opt]; -} - -let options; -function parseOptions() { - if (!options) { - options = { - '--preserve-symlinks': false, - '--preserve-symlinks-main': false, - '--input-type': undefined, - '--experimental-specifier-resolution': 'explicit', - '--experimental-policy': undefined, - '--conditions': [], - '--pending-deprecation': false, - ...parseArgv(getNodeOptionsEnvArgv()), - ...parseArgv(process.execArgv), - ...getOptionValuesFromOtherEnvVars() - } - } -} - -function parseArgv(argv) { - return require('arg')({ - '--preserve-symlinks': Boolean, - '--preserve-symlinks-main': Boolean, - '--input-type': String, - '--experimental-specifier-resolution': String, - // Legacy alias for node versions prior to 12.16 - '--es-module-specifier-resolution': '--experimental-specifier-resolution', - '--experimental-policy': String, - '--conditions': [String], - '--pending-deprecation': Boolean, - '--experimental-json-modules': Boolean, - '--experimental-wasm-modules': Boolean, - }, { - argv, - permissive: true - }); -} - -function getNodeOptionsEnvArgv() { - const errors = []; - const envArgv = ParseNodeOptionsEnvVar(process.env.NODE_OPTIONS || '', errors); - if (errors.length !== 0) { - // TODO: handle errors somehow - } - return envArgv; -} - -// Direct JS port of C implementation: https://github.com/nodejs/node/blob/67ba825037b4082d5d16f922fb9ce54516b4a869/src/node_options.cc#L1024-L1063 -function ParseNodeOptionsEnvVar(node_options, errors) { - const env_argv = []; - - let is_in_string = false; - let will_start_new_arg = true; - for (let index = 0; index < node_options.length; ++index) { - let c = node_options[index]; - - // Backslashes escape the following character - if (c === '\\' && is_in_string) { - if (index + 1 === node_options.length) { - errors.push("invalid value for NODE_OPTIONS " + - "(invalid escape)\n"); - return env_argv; - } else { - c = node_options[++index]; - } - } else if (c === ' ' && !is_in_string) { - will_start_new_arg = true; - continue; - } else if (c === '"') { - is_in_string = !is_in_string; - continue; - } - - if (will_start_new_arg) { - env_argv.push(c); - will_start_new_arg = false; - } else { - env_argv[env_argv.length - 1] += c; - } - } - - if (is_in_string) { - errors.push("invalid value for NODE_OPTIONS " + - "(unterminated string)\n"); - } - return env_argv; -} - -// Get option values that can be specified via env vars besides NODE_OPTIONS -function getOptionValuesFromOtherEnvVars() { - const options = {}; - if(process.env.NODE_PENDING_DEPRECATION === '1') { - options['--pending-deprecation'] = true; - } - return options; -} diff --git a/node_modules/ts-node/dist-raw/node-primordials.js b/node_modules/ts-node/dist-raw/node-primordials.js deleted file mode 100644 index a7c1574..0000000 --- a/node_modules/ts-node/dist-raw/node-primordials.js +++ /dev/null @@ -1,37 +0,0 @@ -module.exports = { - ArrayFrom: Array.from, - ArrayIsArray: Array.isArray, - ArrayPrototypeShift: (obj) => Array.prototype.shift.call(obj), - ArrayPrototypeForEach: (arr, ...rest) => Array.prototype.forEach.apply(arr, rest), - ArrayPrototypeIncludes: (arr, ...rest) => Array.prototype.includes.apply(arr, rest), - ArrayPrototypeJoin: (arr, ...rest) => Array.prototype.join.apply(arr, rest), - ArrayPrototypePop: (arr, ...rest) => Array.prototype.pop.apply(arr, rest), - ArrayPrototypePush: (arr, ...rest) => Array.prototype.push.apply(arr, rest), - FunctionPrototype: Function.prototype, - JSONParse: JSON.parse, - JSONStringify: JSON.stringify, - ObjectFreeze: Object.freeze, - ObjectKeys: Object.keys, - ObjectGetOwnPropertyNames: Object.getOwnPropertyNames, - ObjectDefineProperty: Object.defineProperty, - ObjectPrototypeHasOwnProperty: (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop), - RegExpPrototypeExec: (obj, string) => RegExp.prototype.exec.call(obj, string), - RegExpPrototypeTest: (obj, string) => RegExp.prototype.test.call(obj, string), - RegExpPrototypeSymbolReplace: (obj, ...rest) => RegExp.prototype[Symbol.replace].apply(obj, rest), - SafeMap: Map, - SafeSet: Set, - SafeWeakMap: WeakMap, - StringPrototypeEndsWith: (str, ...rest) => String.prototype.endsWith.apply(str, rest), - StringPrototypeIncludes: (str, ...rest) => String.prototype.includes.apply(str, rest), - StringPrototypeLastIndexOf: (str, ...rest) => String.prototype.lastIndexOf.apply(str, rest), - StringPrototypeIndexOf: (str, ...rest) => String.prototype.indexOf.apply(str, rest), - StringPrototypeRepeat: (str, ...rest) => String.prototype.repeat.apply(str, rest), - StringPrototypeReplace: (str, ...rest) => String.prototype.replace.apply(str, rest), - StringPrototypeSlice: (str, ...rest) => String.prototype.slice.apply(str, rest), - StringPrototypeSplit: (str, ...rest) => String.prototype.split.apply(str, rest), - StringPrototypeStartsWith: (str, ...rest) => String.prototype.startsWith.apply(str, rest), - StringPrototypeSubstr: (str, ...rest) => String.prototype.substr.apply(str, rest), - StringPrototypeCharCodeAt: (str, ...rest) => String.prototype.charCodeAt.apply(str, rest), - StringPrototypeMatch: (str, ...rest) => String.prototype.match.apply(str, rest), - SyntaxError: SyntaxError -}; diff --git a/node_modules/ts-node/dist-raw/runmain-hack.js b/node_modules/ts-node/dist-raw/runmain-hack.js deleted file mode 100644 index 6c0688e..0000000 --- a/node_modules/ts-node/dist-raw/runmain-hack.js +++ /dev/null @@ -1,9 +0,0 @@ -const {pathToFileURL} = require('url'); - -// Hack to avoid Module.runMain on node 18.6.0 -// Keeping it simple for now, isolated in this file. -// Could theoretically probe `getFormat` impl to determine if `import()` or `Module._load()` is best -// Note that I attempted a try-catch around `Module._load`, but it poisons some sort of cache such that subsequent `import()` is impossible. -exports.run = function(entryPointPath) { - import(pathToFileURL(entryPointPath)); -} diff --git a/node_modules/ts-node/dist/bin-cwd.d.ts b/node_modules/ts-node/dist/bin-cwd.d.ts deleted file mode 100644 index b798801..0000000 --- a/node_modules/ts-node/dist/bin-cwd.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -export {}; diff --git a/node_modules/ts-node/dist/bin-cwd.js b/node_modules/ts-node/dist/bin-cwd.js deleted file mode 100755 index dc241b6..0000000 --- a/node_modules/ts-node/dist/bin-cwd.js +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env node -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const bin_1 = require("./bin"); -(0, bin_1.main)(undefined, { '--cwdMode': true }); -//# sourceMappingURL=bin-cwd.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-cwd.js.map b/node_modules/ts-node/dist/bin-cwd.js.map deleted file mode 100644 index f50e7e3..0000000 --- a/node_modules/ts-node/dist/bin-cwd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin-cwd.js","sourceRoot":"","sources":["../src/bin-cwd.ts"],"names":[],"mappings":";;;AAEA,+BAA6B;AAE7B,IAAA,UAAI,EAAC,SAAS,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { main } from './bin';\n\nmain(undefined, { '--cwdMode': true });\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-esm.d.ts b/node_modules/ts-node/dist/bin-esm.d.ts deleted file mode 100644 index b798801..0000000 --- a/node_modules/ts-node/dist/bin-esm.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -export {}; diff --git a/node_modules/ts-node/dist/bin-esm.js b/node_modules/ts-node/dist/bin-esm.js deleted file mode 100755 index 3c7a778..0000000 --- a/node_modules/ts-node/dist/bin-esm.js +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env node -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const bin_1 = require("./bin"); -(0, bin_1.main)(undefined, { '--esm': true }); -//# sourceMappingURL=bin-esm.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-esm.js.map b/node_modules/ts-node/dist/bin-esm.js.map deleted file mode 100644 index a5fc896..0000000 --- a/node_modules/ts-node/dist/bin-esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin-esm.js","sourceRoot":"","sources":["../src/bin-esm.ts"],"names":[],"mappings":";;;AAEA,+BAA6B;AAE7B,IAAA,UAAI,EAAC,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { main } from './bin';\n\nmain(undefined, { '--esm': true });\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-script-deprecated.d.ts b/node_modules/ts-node/dist/bin-script-deprecated.d.ts deleted file mode 100644 index b798801..0000000 --- a/node_modules/ts-node/dist/bin-script-deprecated.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -export {}; diff --git a/node_modules/ts-node/dist/bin-script-deprecated.js b/node_modules/ts-node/dist/bin-script-deprecated.js deleted file mode 100755 index 94029dc..0000000 --- a/node_modules/ts-node/dist/bin-script-deprecated.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const bin_1 = require("./bin"); -console.warn('ts-script has been deprecated and will be removed in the next major release.', 'Please use ts-node-script instead'); -(0, bin_1.main)(undefined, { '--scriptMode': true }); -//# sourceMappingURL=bin-script-deprecated.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-script-deprecated.js.map b/node_modules/ts-node/dist/bin-script-deprecated.js.map deleted file mode 100644 index 7a116c0..0000000 --- a/node_modules/ts-node/dist/bin-script-deprecated.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin-script-deprecated.js","sourceRoot":"","sources":["../src/bin-script-deprecated.ts"],"names":[],"mappings":";;;AAEA,+BAA6B;AAE7B,OAAO,CAAC,IAAI,CACV,8EAA8E,EAC9E,mCAAmC,CACpC,CAAC;AAEF,IAAA,UAAI,EAAC,SAAS,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { main } from './bin';\n\nconsole.warn(\n 'ts-script has been deprecated and will be removed in the next major release.',\n 'Please use ts-node-script instead'\n);\n\nmain(undefined, { '--scriptMode': true });\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-script.d.ts b/node_modules/ts-node/dist/bin-script.d.ts deleted file mode 100644 index b798801..0000000 --- a/node_modules/ts-node/dist/bin-script.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -export {}; diff --git a/node_modules/ts-node/dist/bin-script.js b/node_modules/ts-node/dist/bin-script.js deleted file mode 100755 index 3a9c821..0000000 --- a/node_modules/ts-node/dist/bin-script.js +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env node -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const bin_1 = require("./bin"); -(0, bin_1.main)(undefined, { '--scriptMode': true }); -//# sourceMappingURL=bin-script.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-script.js.map b/node_modules/ts-node/dist/bin-script.js.map deleted file mode 100644 index 004c805..0000000 --- a/node_modules/ts-node/dist/bin-script.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin-script.js","sourceRoot":"","sources":["../src/bin-script.ts"],"names":[],"mappings":";;;AAEA,+BAA6B;AAE7B,IAAA,UAAI,EAAC,SAAS,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { main } from './bin';\n\nmain(undefined, { '--scriptMode': true });\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-transpile.d.ts b/node_modules/ts-node/dist/bin-transpile.d.ts deleted file mode 100644 index b798801..0000000 --- a/node_modules/ts-node/dist/bin-transpile.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -export {}; diff --git a/node_modules/ts-node/dist/bin-transpile.js b/node_modules/ts-node/dist/bin-transpile.js deleted file mode 100755 index 7bcdc38..0000000 --- a/node_modules/ts-node/dist/bin-transpile.js +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env node -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const bin_1 = require("./bin"); -(0, bin_1.main)(undefined, { '--transpileOnly': true }); -//# sourceMappingURL=bin-transpile.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-transpile.js.map b/node_modules/ts-node/dist/bin-transpile.js.map deleted file mode 100644 index deb663e..0000000 --- a/node_modules/ts-node/dist/bin-transpile.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin-transpile.js","sourceRoot":"","sources":["../src/bin-transpile.ts"],"names":[],"mappings":";;;AAEA,+BAA6B;AAE7B,IAAA,UAAI,EAAC,SAAS,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { main } from './bin';\n\nmain(undefined, { '--transpileOnly': true });\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin.d.ts b/node_modules/ts-node/dist/bin.d.ts deleted file mode 100644 index 0817f88..0000000 --- a/node_modules/ts-node/dist/bin.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env node -/** - * Main `bin` functionality. - * - * This file is split into a chain of functions (phases), each one adding to a shared state object. - * This is done so that the next function can either be invoked in-process or, if necessary, invoked in a child process. - * - * The functions are intentionally given uncreative names and left in the same order as the original code, to make a - * smaller git diff. - */ -export declare function main(argv?: string[], entrypointArgs?: Record): void; diff --git a/node_modules/ts-node/dist/bin.js b/node_modules/ts-node/dist/bin.js deleted file mode 100755 index 0e6fe23..0000000 --- a/node_modules/ts-node/dist/bin.js +++ /dev/null @@ -1,581 +0,0 @@ -#!/usr/bin/env node -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.bootstrap = exports.main = void 0; -const path_1 = require("path"); -const util_1 = require("util"); -const Module = require("module"); -let arg; -const util_2 = require("./util"); -const repl_1 = require("./repl"); -const index_1 = require("./index"); -const node_internal_modules_cjs_helpers_1 = require("../dist-raw/node-internal-modules-cjs-helpers"); -const spawn_child_1 = require("./child/spawn-child"); -const configuration_1 = require("./configuration"); -/** - * Main `bin` functionality. - * - * This file is split into a chain of functions (phases), each one adding to a shared state object. - * This is done so that the next function can either be invoked in-process or, if necessary, invoked in a child process. - * - * The functions are intentionally given uncreative names and left in the same order as the original code, to make a - * smaller git diff. - */ -function main(argv = process.argv.slice(2), entrypointArgs = {}) { - const args = parseArgv(argv, entrypointArgs); - const state = { - shouldUseChildProcess: false, - isInChildProcess: false, - isCli: true, - tsNodeScript: __filename, - parseArgvResult: args, - }; - return bootstrap(state); -} -exports.main = main; -/** @internal */ -function bootstrap(state) { - if (!state.phase2Result) { - state.phase2Result = phase2(state); - if (state.shouldUseChildProcess && !state.isInChildProcess) { - // Note: When transitioning into the child-process after `phase2`, - // the updated working directory needs to be preserved. - return (0, spawn_child_1.callInChild)(state); - } - } - if (!state.phase3Result) { - state.phase3Result = phase3(state); - if (state.shouldUseChildProcess && !state.isInChildProcess) { - // Note: When transitioning into the child-process after `phase2`, - // the updated working directory needs to be preserved. - return (0, spawn_child_1.callInChild)(state); - } - } - return phase4(state); -} -exports.bootstrap = bootstrap; -function parseArgv(argv, entrypointArgs) { - arg !== null && arg !== void 0 ? arg : (arg = require('arg')); - // HACK: technically, this function is not marked @internal so it's possible - // that libraries in the wild are doing `require('ts-node/dist/bin').main({'--transpile-only': true})` - // We can mark this function @internal in next major release. - // For now, rewrite args to avoid a breaking change. - entrypointArgs = { ...entrypointArgs }; - for (const key of Object.keys(entrypointArgs)) { - entrypointArgs[key.replace(/([a-z])-([a-z])/g, (_$0, $1, $2) => `${$1}${$2.toUpperCase()}`)] = entrypointArgs[key]; - } - const args = { - ...entrypointArgs, - ...arg({ - // Node.js-like options. - '--eval': String, - '--interactive': Boolean, - '--print': Boolean, - '--require': [String], - // CLI options. - '--help': Boolean, - '--cwdMode': Boolean, - '--scriptMode': Boolean, - '--version': arg.COUNT, - '--showConfig': Boolean, - '--esm': Boolean, - // Project options. - '--cwd': String, - '--files': Boolean, - '--compiler': String, - '--compilerOptions': util_2.parse, - '--project': String, - '--ignoreDiagnostics': [String], - '--ignore': [String], - '--transpileOnly': Boolean, - '--transpiler': String, - '--swc': Boolean, - '--typeCheck': Boolean, - '--compilerHost': Boolean, - '--pretty': Boolean, - '--skipProject': Boolean, - '--skipIgnore': Boolean, - '--preferTsExts': Boolean, - '--logError': Boolean, - '--emit': Boolean, - '--scope': Boolean, - '--scopeDir': String, - '--noExperimentalReplAwait': Boolean, - '--experimentalSpecifierResolution': String, - // Aliases. - '-e': '--eval', - '-i': '--interactive', - '-p': '--print', - '-r': '--require', - '-h': '--help', - '-s': '--script-mode', - '-v': '--version', - '-T': '--transpileOnly', - '-H': '--compilerHost', - '-I': '--ignore', - '-P': '--project', - '-C': '--compiler', - '-D': '--ignoreDiagnostics', - '-O': '--compilerOptions', - '--dir': '--cwd', - // Support both tsc-style camelCase and node-style hypen-case for *all* flags - '--cwd-mode': '--cwdMode', - '--script-mode': '--scriptMode', - '--show-config': '--showConfig', - '--compiler-options': '--compilerOptions', - '--ignore-diagnostics': '--ignoreDiagnostics', - '--transpile-only': '--transpileOnly', - '--type-check': '--typeCheck', - '--compiler-host': '--compilerHost', - '--skip-project': '--skipProject', - '--skip-ignore': '--skipIgnore', - '--prefer-ts-exts': '--preferTsExts', - '--log-error': '--logError', - '--scope-dir': '--scopeDir', - '--no-experimental-repl-await': '--noExperimentalReplAwait', - '--experimental-specifier-resolution': '--experimentalSpecifierResolution', - }, { - argv, - stopAtPositional: true, - }), - }; - // Only setting defaults for CLI-specific flags - // Anything passed to `register()` can be `undefined`; `create()` will apply - // defaults. - const { '--cwd': cwdArg, '--help': help = false, '--scriptMode': scriptMode, '--cwdMode': cwdMode, '--version': version = 0, '--showConfig': showConfig, '--require': argsRequire = [], '--eval': code = undefined, '--print': print = false, '--interactive': interactive = false, '--files': files, '--compiler': compiler, '--compilerOptions': compilerOptions, '--project': project, '--ignoreDiagnostics': ignoreDiagnostics, '--ignore': ignore, '--transpileOnly': transpileOnly, '--typeCheck': typeCheck, '--transpiler': transpiler, '--swc': swc, '--compilerHost': compilerHost, '--pretty': pretty, '--skipProject': skipProject, '--skipIgnore': skipIgnore, '--preferTsExts': preferTsExts, '--logError': logError, '--emit': emit, '--scope': scope = undefined, '--scopeDir': scopeDir = undefined, '--noExperimentalReplAwait': noExperimentalReplAwait, '--experimentalSpecifierResolution': experimentalSpecifierResolution, '--esm': esm, _: restArgs, } = args; - return { - // Note: argv and restArgs may be overwritten by child process - argv: process.argv, - restArgs, - cwdArg, - help, - scriptMode, - cwdMode, - version, - showConfig, - argsRequire, - code, - print, - interactive, - files, - compiler, - compilerOptions, - project, - ignoreDiagnostics, - ignore, - transpileOnly, - typeCheck, - transpiler, - swc, - compilerHost, - pretty, - skipProject, - skipIgnore, - preferTsExts, - logError, - emit, - scope, - scopeDir, - noExperimentalReplAwait, - experimentalSpecifierResolution, - esm, - }; -} -function phase2(payload) { - const { help, version, cwdArg, esm } = payload.parseArgvResult; - if (help) { - console.log(` -Usage: ts-node [options] [ -e script | script.ts ] [arguments] - -Options: - - -e, --eval [code] Evaluate code - -p, --print Print result of \`--eval\` - -r, --require [path] Require a node module before execution - -i, --interactive Opens the REPL even if stdin does not appear to be a terminal - - --esm Bootstrap with the ESM loader, enabling full ESM support - --swc Use the faster swc transpiler - - -h, --help Print CLI usage - -v, --version Print module version information. -vvv to print additional information - --showConfig Print resolved configuration and exit - - -T, --transpileOnly Use TypeScript's faster \`transpileModule\` or a third-party transpiler - -H, --compilerHost Use TypeScript's compiler host API - -I, --ignore [pattern] Override the path patterns to skip compilation - -P, --project [path] Path to TypeScript JSON project file - -C, --compiler [name] Specify a custom TypeScript compiler - --transpiler [name] Specify a third-party, non-typechecking transpiler - -D, --ignoreDiagnostics [code] Ignore TypeScript warnings by diagnostic code - -O, --compilerOptions [opts] JSON object to merge with compiler options - - --cwd Behave as if invoked within this working directory. - --files Load \`files\`, \`include\` and \`exclude\` from \`tsconfig.json\` on startup - --pretty Use pretty diagnostic formatter (usually enabled by default) - --cwdMode Use current directory instead of for config resolution - --skipProject Skip reading \`tsconfig.json\` - --skipIgnore Skip \`--ignore\` checks - --emit Emit output files into \`.ts-node\` directory - --scope Scope compiler to files within \`scopeDir\`. Anything outside this directory is ignored. - --scopeDir Directory for \`--scope\` - --preferTsExts Prefer importing TypeScript files over JavaScript files - --logError Logs TypeScript errors to stderr instead of throwing exceptions - --noExperimentalReplAwait Disable top-level await in REPL. Equivalent to node's --no-experimental-repl-await - --experimentalSpecifierResolution [node|explicit] - Equivalent to node's --experimental-specifier-resolution -`); - process.exit(0); - } - // Output project information. - if (version === 1) { - console.log(`v${index_1.VERSION}`); - process.exit(0); - } - const cwd = cwdArg ? (0, path_1.resolve)(cwdArg) : process.cwd(); - // If ESM is explicitly enabled through the flag, stage3 should be run in a child process - // with the ESM loaders configured. - if (esm) - payload.shouldUseChildProcess = true; - return { - cwd, - }; -} -function phase3(payload) { - const { emit, files, pretty, transpileOnly, transpiler, noExperimentalReplAwait, typeCheck, swc, compilerHost, ignore, preferTsExts, logError, scriptMode, cwdMode, project, skipProject, skipIgnore, compiler, ignoreDiagnostics, compilerOptions, argsRequire, scope, scopeDir, esm, experimentalSpecifierResolution, } = payload.parseArgvResult; - const { cwd } = payload.phase2Result; - // NOTE: When we transition to a child process for ESM, the entry-point script determined - // here might not be the one used later in `phase4`. This can happen when we execute the - // original entry-point but then the process forks itself using e.g. `child_process.fork`. - // We will always use the original TS project in forked processes anyway, so it is - // expected and acceptable to retrieve the entry-point information here in `phase2`. - // See: https://github.com/TypeStrong/ts-node/issues/1812. - const { entryPointPath } = getEntryPointInfo(payload); - const preloadedConfig = (0, configuration_1.findAndReadConfig)({ - cwd, - emit, - files, - pretty, - transpileOnly: (transpileOnly !== null && transpileOnly !== void 0 ? transpileOnly : transpiler != null) ? true : undefined, - experimentalReplAwait: noExperimentalReplAwait ? false : undefined, - typeCheck, - transpiler, - swc, - compilerHost, - ignore, - logError, - projectSearchDir: getProjectSearchDir(cwd, scriptMode, cwdMode, entryPointPath), - project, - skipProject, - skipIgnore, - compiler, - ignoreDiagnostics, - compilerOptions, - require: argsRequire, - scope, - scopeDir, - preferTsExts, - esm, - experimentalSpecifierResolution: experimentalSpecifierResolution, - }); - // If ESM is enabled through the parsed tsconfig, stage4 should be run in a child - // process with the ESM loaders configured. - if (preloadedConfig.options.esm) - payload.shouldUseChildProcess = true; - return { preloadedConfig }; -} -/** - * Determines the entry-point information from the argv and phase2 result. This - * method will be invoked in two places: - * - * 1. In phase 3 to be able to find a project from the potential entry-point script. - * 2. In phase 4 to determine the actual entry-point script. - * - * Note that we need to explicitly re-resolve the entry-point information in the final - * stage because the previous stage information could be modified when the bootstrap - * invocation transitioned into a child process for ESM. - * - * Stages before (phase 4) can and will be cached by the child process through the Brotli - * configuration and entry-point information is only reliable in the final phase. More - * details can be found in here: https://github.com/TypeStrong/ts-node/issues/1812. - */ -function getEntryPointInfo(state) { - const { code, interactive, restArgs } = state.parseArgvResult; - const { cwd } = state.phase2Result; - const { isCli } = state; - // Figure out which we are executing: piped stdin, --eval, REPL, and/or entrypoint - // This is complicated because node's behavior is complicated - // `node -e code -i ./script.js` ignores -e - const executeEval = code != null && !(interactive && restArgs.length); - const executeEntrypoint = !executeEval && restArgs.length > 0; - const executeRepl = !executeEntrypoint && - (interactive || (process.stdin.isTTY && !executeEval)); - const executeStdin = !executeEval && !executeRepl && !executeEntrypoint; - /** - * Unresolved. May point to a symlink, not realpath. May be missing file extension - * NOTE: resolution relative to cwd option (not `process.cwd()`) is legacy backwards-compat; should be changed in next major: https://github.com/TypeStrong/ts-node/issues/1834 - */ - const entryPointPath = executeEntrypoint - ? isCli - ? (0, path_1.resolve)(cwd, restArgs[0]) - : (0, path_1.resolve)(restArgs[0]) - : undefined; - return { - executeEval, - executeEntrypoint, - executeRepl, - executeStdin, - entryPointPath, - }; -} -function phase4(payload) { - var _a, _b, _c, _d, _e, _f, _g; - const { isInChildProcess, tsNodeScript } = payload; - const { version, showConfig, restArgs, code, print, argv } = payload.parseArgvResult; - const { cwd } = payload.phase2Result; - const { preloadedConfig } = payload.phase3Result; - const { entryPointPath, executeEntrypoint, executeEval, executeRepl, executeStdin, } = getEntryPointInfo(payload); - let evalStuff; - let replStuff; - let stdinStuff; - let evalAwarePartialHost = undefined; - if (executeEval) { - const state = new repl_1.EvalState((0, path_1.join)(cwd, repl_1.EVAL_FILENAME)); - evalStuff = { - state, - repl: (0, repl_1.createRepl)({ - state, - composeWithEvalAwarePartialHost: evalAwarePartialHost, - ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl: false, - }), - }; - ({ evalAwarePartialHost } = evalStuff.repl); - // Create a local module instance based on `cwd`. - const module = (evalStuff.module = new Module(repl_1.EVAL_NAME)); - module.filename = evalStuff.state.path; - module.paths = Module._nodeModulePaths(cwd); - } - if (executeStdin) { - const state = new repl_1.EvalState((0, path_1.join)(cwd, repl_1.STDIN_FILENAME)); - stdinStuff = { - state, - repl: (0, repl_1.createRepl)({ - state, - composeWithEvalAwarePartialHost: evalAwarePartialHost, - ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl: false, - }), - }; - ({ evalAwarePartialHost } = stdinStuff.repl); - // Create a local module instance based on `cwd`. - const module = (stdinStuff.module = new Module(repl_1.STDIN_NAME)); - module.filename = stdinStuff.state.path; - module.paths = Module._nodeModulePaths(cwd); - } - if (executeRepl) { - const state = new repl_1.EvalState((0, path_1.join)(cwd, repl_1.REPL_FILENAME)); - replStuff = { - state, - repl: (0, repl_1.createRepl)({ - state, - composeWithEvalAwarePartialHost: evalAwarePartialHost, - }), - }; - ({ evalAwarePartialHost } = replStuff.repl); - } - // Register the TypeScript compiler instance. - const service = (0, index_1.createFromPreloadedConfig)({ - // Since this struct may have been marshalled across thread or process boundaries, we must restore - // un-marshall-able values. - ...preloadedConfig, - options: { - ...preloadedConfig.options, - readFile: (_a = evalAwarePartialHost === null || evalAwarePartialHost === void 0 ? void 0 : evalAwarePartialHost.readFile) !== null && _a !== void 0 ? _a : undefined, - fileExists: (_b = evalAwarePartialHost === null || evalAwarePartialHost === void 0 ? void 0 : evalAwarePartialHost.fileExists) !== null && _b !== void 0 ? _b : undefined, - tsTrace: index_1.DEFAULTS.tsTrace, - }, - }); - (0, index_1.register)(service); - if (isInChildProcess) - require('./child/child-loader').lateBindHooks((0, index_1.createEsmHooks)(service)); - // Bind REPL service to ts-node compiler service (chicken-and-egg problem) - replStuff === null || replStuff === void 0 ? void 0 : replStuff.repl.setService(service); - evalStuff === null || evalStuff === void 0 ? void 0 : evalStuff.repl.setService(service); - stdinStuff === null || stdinStuff === void 0 ? void 0 : stdinStuff.repl.setService(service); - // Output project information. - if (version === 2) { - console.log(`ts-node v${index_1.VERSION}`); - console.log(`node ${process.version}`); - console.log(`compiler v${service.ts.version}`); - process.exit(0); - } - if (version >= 3) { - console.log(`ts-node v${index_1.VERSION} ${(0, path_1.dirname)(__dirname)}`); - console.log(`node ${process.version}`); - console.log(`compiler v${service.ts.version} ${(_c = service.compilerPath) !== null && _c !== void 0 ? _c : ''}`); - process.exit(0); - } - if (showConfig) { - const ts = service.ts; - if (typeof ts.convertToTSConfig !== 'function') { - console.error('Error: --showConfig requires a typescript versions >=3.2 that support --showConfig'); - process.exit(1); - } - let moduleTypes = undefined; - if (service.options.moduleTypes) { - // Assumption: this codepath requires CLI invocation, so moduleTypes must have come from a tsconfig, not API. - const showRelativeTo = (0, path_1.dirname)(service.configFilePath); - moduleTypes = {}; - for (const [key, value] of Object.entries(service.options.moduleTypes)) { - moduleTypes[(0, path_1.relative)(showRelativeTo, (0, path_1.resolve)((_d = service.options.optionBasePaths) === null || _d === void 0 ? void 0 : _d.moduleTypes, key))] = value; - } - } - const json = { - ['ts-node']: { - ...service.options, - require: ((_e = service.options.require) === null || _e === void 0 ? void 0 : _e.length) - ? service.options.require - : undefined, - moduleTypes, - optionBasePaths: undefined, - compilerOptions: undefined, - project: (_f = service.configFilePath) !== null && _f !== void 0 ? _f : service.options.project, - }, - ...ts.convertToTSConfig(service.config, (_g = service.configFilePath) !== null && _g !== void 0 ? _g : (0, path_1.join)(cwd, 'ts-node-implicit-tsconfig.json'), service.ts.sys), - }; - console.log( - // Assumes that all configuration options which can possibly be specified via the CLI are JSON-compatible. - // If, in the future, we must log functions, for example readFile and fileExists, then we can implement a JSON - // replacer function. - JSON.stringify(json, null, 2)); - process.exit(0); - } - // Prepend `ts-node` arguments to CLI for child processes. - process.execArgv.push(tsNodeScript, ...argv.slice(2, argv.length - restArgs.length)); - // TODO this comes from BootstrapState - process.argv = [process.argv[1]] - .concat(executeEntrypoint ? [entryPointPath] : []) - .concat(restArgs.slice(executeEntrypoint ? 1 : 0)); - // Execute the main contents (either eval, script or piped). - if (executeEntrypoint) { - if (payload.isInChildProcess && - (0, util_2.versionGteLt)(process.versions.node, '18.6.0')) { - // HACK workaround node regression - require('../dist-raw/runmain-hack.js').run(entryPointPath); - } - else { - Module.runMain(); - } - } - else { - // Note: eval and repl may both run, but never with stdin. - // If stdin runs, eval and repl will not. - if (executeEval) { - (0, node_internal_modules_cjs_helpers_1.addBuiltinLibsToObject)(global); - evalAndExitOnTsError(evalStuff.repl, evalStuff.module, code, print, 'eval'); - } - if (executeRepl) { - replStuff.repl.start(); - } - if (executeStdin) { - let buffer = code || ''; - process.stdin.on('data', (chunk) => (buffer += chunk)); - process.stdin.on('end', () => { - evalAndExitOnTsError(stdinStuff.repl, stdinStuff.module, buffer, - // `echo 123 | node -p` still prints 123 - print, 'stdin'); - }); - } - } -} -/** - * Get project search path from args. - */ -function getProjectSearchDir(cwd, scriptMode, cwdMode, scriptPath) { - // Validate `--script-mode` / `--cwd-mode` / `--cwd` usage is correct. - if (scriptMode && cwdMode) { - throw new TypeError('--cwd-mode cannot be combined with --script-mode'); - } - if (scriptMode && !scriptPath) { - throw new TypeError('--script-mode must be used with a script name, e.g. `ts-node --script-mode `'); - } - const doScriptMode = scriptMode === true ? true : cwdMode === true ? false : !!scriptPath; - if (doScriptMode) { - // Use node's own resolution behavior to ensure we follow symlinks. - // scriptPath may omit file extension or point to a directory with or without package.json. - // This happens before we are registered, so we tell node's resolver to consider ts, tsx, and jsx files. - // In extremely rare cases, is is technically possible to resolve the wrong directory, - // because we do not yet know preferTsExts, jsx, nor allowJs. - // See also, justification why this will not happen in real-world situations: - // https://github.com/TypeStrong/ts-node/pull/1009#issuecomment-613017081 - const exts = ['.js', '.jsx', '.ts', '.tsx']; - const extsTemporarilyInstalled = []; - for (const ext of exts) { - if (!(0, util_2.hasOwnProperty)(require.extensions, ext)) { - extsTemporarilyInstalled.push(ext); - require.extensions[ext] = function () { }; - } - } - try { - return (0, path_1.dirname)(requireResolveNonCached(scriptPath)); - } - finally { - for (const ext of extsTemporarilyInstalled) { - delete require.extensions[ext]; - } - } - } - return cwd; -} -const guaranteedNonexistentDirectoryPrefix = (0, path_1.resolve)(__dirname, 'doesnotexist'); -let guaranteedNonexistentDirectorySuffix = 0; -/** - * require.resolve an absolute path, tricking node into *not* caching the results. - * Necessary so that we do not pollute require.resolve cache prior to installing require.extensions - * - * Is a terrible hack, because node does not expose the necessary cache invalidation APIs - * https://stackoverflow.com/questions/59865584/how-to-invalidate-cached-require-resolve-results - */ -function requireResolveNonCached(absoluteModuleSpecifier) { - // node <= 12.1.x fallback: The trick below triggers a node bug on old versions. - // On these old versions, pollute the require cache instead. This is a deliberate - // ts-node limitation that will *rarely* manifest, and will not matter once node 12 - // is end-of-life'd on 2022-04-30 - const isSupportedNodeVersion = (0, util_2.versionGteLt)(process.versions.node, '12.2.0'); - if (!isSupportedNodeVersion) - return require.resolve(absoluteModuleSpecifier); - const { dir, base } = (0, path_1.parse)(absoluteModuleSpecifier); - const relativeModuleSpecifier = `./${base}`; - const req = (0, util_2.createRequire)((0, path_1.join)(dir, 'imaginaryUncacheableRequireResolveScript')); - return req.resolve(relativeModuleSpecifier, { - paths: [ - `${guaranteedNonexistentDirectoryPrefix}${guaranteedNonexistentDirectorySuffix++}`, - ...(req.resolve.paths(relativeModuleSpecifier) || []), - ], - }); -} -/** - * Evaluate an [eval] or [stdin] script - */ -function evalAndExitOnTsError(replService, module, code, isPrinted, filenameAndDirname) { - let result; - (0, repl_1.setupContext)(global, module, filenameAndDirname); - try { - result = replService.evalCode(code); - } - catch (error) { - if (error instanceof index_1.TSError) { - console.error(error); - process.exit(1); - } - throw error; - } - if (isPrinted) { - console.log(typeof result === 'string' - ? result - : (0, util_1.inspect)(result, { colors: process.stdout.isTTY })); - } -} -if (require.main === module) { - main(); -} -//# sourceMappingURL=bin.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin.js.map b/node_modules/ts-node/dist/bin.js.map deleted file mode 100644 index efb2739..0000000 --- a/node_modules/ts-node/dist/bin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";;;;AAEA,+BAA4E;AAC5E,+BAA+B;AAC/B,iCAAkC;AAClC,IAAI,GAAyB,CAAC;AAC9B,iCAA4E;AA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,IAAI,CAAC,CAAC,CAAC,CAAC;SACjB;QAED,MAAM,KAAK,CAAC;KACb;IAED,IAAI,SAAS,EAAE;QACb,OAAO,CAAC,GAAG,CACT,OAAO,MAAM,KAAK,QAAQ;YACxB,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,IAAA,cAAO,EAAC,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CACtD,CAAC;KACH;AACH,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;IAC3B,IAAI,EAAE,CAAC;CACR","sourcesContent":["#!/usr/bin/env node\n\nimport { join, resolve, dirname, parse as parsePath, relative } from 'path';\nimport { inspect } from 'util';\nimport Module = require('module');\nlet arg: typeof import('arg');\nimport { parse, createRequire, hasOwnProperty, versionGteLt } from './util';\nimport {\n EVAL_FILENAME,\n EvalState,\n createRepl,\n ReplService,\n setupContext,\n STDIN_FILENAME,\n EvalAwarePartialHost,\n EVAL_NAME,\n STDIN_NAME,\n REPL_FILENAME,\n} from './repl';\nimport {\n VERSION,\n TSError,\n register,\n createEsmHooks,\n createFromPreloadedConfig,\n DEFAULTS,\n ExperimentalSpecifierResolution,\n} from './index';\nimport type { TSInternal } from './ts-compiler-types';\nimport { addBuiltinLibsToObject } from '../dist-raw/node-internal-modules-cjs-helpers';\nimport { callInChild } from './child/spawn-child';\nimport { findAndReadConfig } from './configuration';\n\n/**\n * Main `bin` functionality.\n *\n * This file is split into a chain of functions (phases), each one adding to a shared state object.\n * This is done so that the next function can either be invoked in-process or, if necessary, invoked in a child process.\n *\n * The functions are intentionally given uncreative names and left in the same order as the original code, to make a\n * smaller git diff.\n */\nexport function main(\n argv: string[] = process.argv.slice(2),\n entrypointArgs: Record = {}\n) {\n const args = parseArgv(argv, entrypointArgs);\n const state: BootstrapState = {\n shouldUseChildProcess: false,\n isInChildProcess: false,\n isCli: true,\n tsNodeScript: __filename,\n parseArgvResult: args,\n };\n return bootstrap(state);\n}\n\n/**\n * @internal\n * Describes state of CLI bootstrapping.\n * Can be marshalled when necessary to resume bootstrapping in a child process.\n */\nexport interface BootstrapState {\n isInChildProcess: boolean;\n shouldUseChildProcess: boolean;\n /**\n * True if bootstrapping the ts-node CLI process or the direct child necessitated by `--esm`.\n * false if bootstrapping a subsequently `fork()`ed child.\n */\n isCli: boolean;\n tsNodeScript: string;\n parseArgvResult: ReturnType;\n phase2Result?: ReturnType;\n phase3Result?: ReturnType;\n}\n\n/** @internal */\nexport function bootstrap(state: BootstrapState) {\n if (!state.phase2Result) {\n state.phase2Result = phase2(state);\n if (state.shouldUseChildProcess && !state.isInChildProcess) {\n // Note: When transitioning into the child-process after `phase2`,\n // the updated working directory needs to be preserved.\n return callInChild(state);\n }\n }\n if (!state.phase3Result) {\n state.phase3Result = phase3(state);\n if (state.shouldUseChildProcess && !state.isInChildProcess) {\n // Note: When transitioning into the child-process after `phase2`,\n // the updated working directory needs to be preserved.\n return callInChild(state);\n }\n }\n return phase4(state);\n}\n\nfunction parseArgv(argv: string[], entrypointArgs: Record) {\n arg ??= require('arg');\n // HACK: technically, this function is not marked @internal so it's possible\n // that libraries in the wild are doing `require('ts-node/dist/bin').main({'--transpile-only': true})`\n // We can mark this function @internal in next major release.\n // For now, rewrite args to avoid a breaking change.\n entrypointArgs = { ...entrypointArgs };\n for (const key of Object.keys(entrypointArgs)) {\n entrypointArgs[\n key.replace(\n /([a-z])-([a-z])/g,\n (_$0, $1, $2: string) => `${$1}${$2.toUpperCase()}`\n )\n ] = entrypointArgs[key];\n }\n\n const args = {\n ...entrypointArgs,\n ...arg(\n {\n // Node.js-like options.\n '--eval': String,\n '--interactive': Boolean,\n '--print': Boolean,\n '--require': [String],\n\n // CLI options.\n '--help': Boolean,\n '--cwdMode': Boolean,\n '--scriptMode': Boolean,\n '--version': arg.COUNT,\n '--showConfig': Boolean,\n '--esm': Boolean,\n\n // Project options.\n '--cwd': String,\n '--files': Boolean,\n '--compiler': String,\n '--compilerOptions': parse,\n '--project': String,\n '--ignoreDiagnostics': [String],\n '--ignore': [String],\n '--transpileOnly': Boolean,\n '--transpiler': String,\n '--swc': Boolean,\n '--typeCheck': Boolean,\n '--compilerHost': Boolean,\n '--pretty': Boolean,\n '--skipProject': Boolean,\n '--skipIgnore': Boolean,\n '--preferTsExts': Boolean,\n '--logError': Boolean,\n '--emit': Boolean,\n '--scope': Boolean,\n '--scopeDir': String,\n '--noExperimentalReplAwait': Boolean,\n '--experimentalSpecifierResolution': String,\n\n // Aliases.\n '-e': '--eval',\n '-i': '--interactive',\n '-p': '--print',\n '-r': '--require',\n '-h': '--help',\n '-s': '--script-mode',\n '-v': '--version',\n '-T': '--transpileOnly',\n '-H': '--compilerHost',\n '-I': '--ignore',\n '-P': '--project',\n '-C': '--compiler',\n '-D': '--ignoreDiagnostics',\n '-O': '--compilerOptions',\n '--dir': '--cwd',\n\n // Support both tsc-style camelCase and node-style hypen-case for *all* flags\n '--cwd-mode': '--cwdMode',\n '--script-mode': '--scriptMode',\n '--show-config': '--showConfig',\n '--compiler-options': '--compilerOptions',\n '--ignore-diagnostics': '--ignoreDiagnostics',\n '--transpile-only': '--transpileOnly',\n '--type-check': '--typeCheck',\n '--compiler-host': '--compilerHost',\n '--skip-project': '--skipProject',\n '--skip-ignore': '--skipIgnore',\n '--prefer-ts-exts': '--preferTsExts',\n '--log-error': '--logError',\n '--scope-dir': '--scopeDir',\n '--no-experimental-repl-await': '--noExperimentalReplAwait',\n '--experimental-specifier-resolution':\n '--experimentalSpecifierResolution',\n },\n {\n argv,\n stopAtPositional: true,\n }\n ),\n };\n\n // Only setting defaults for CLI-specific flags\n // Anything passed to `register()` can be `undefined`; `create()` will apply\n // defaults.\n const {\n '--cwd': cwdArg,\n '--help': help = false,\n '--scriptMode': scriptMode,\n '--cwdMode': cwdMode,\n '--version': version = 0,\n '--showConfig': showConfig,\n '--require': argsRequire = [],\n '--eval': code = undefined,\n '--print': print = false,\n '--interactive': interactive = false,\n '--files': files,\n '--compiler': compiler,\n '--compilerOptions': compilerOptions,\n '--project': project,\n '--ignoreDiagnostics': ignoreDiagnostics,\n '--ignore': ignore,\n '--transpileOnly': transpileOnly,\n '--typeCheck': typeCheck,\n '--transpiler': transpiler,\n '--swc': swc,\n '--compilerHost': compilerHost,\n '--pretty': pretty,\n '--skipProject': skipProject,\n '--skipIgnore': skipIgnore,\n '--preferTsExts': preferTsExts,\n '--logError': logError,\n '--emit': emit,\n '--scope': scope = undefined,\n '--scopeDir': scopeDir = undefined,\n '--noExperimentalReplAwait': noExperimentalReplAwait,\n '--experimentalSpecifierResolution': experimentalSpecifierResolution,\n '--esm': esm,\n _: restArgs,\n } = args;\n return {\n // Note: argv and restArgs may be overwritten by child process\n argv: process.argv,\n restArgs,\n\n cwdArg,\n help,\n scriptMode,\n cwdMode,\n version,\n showConfig,\n argsRequire,\n code,\n print,\n interactive,\n files,\n compiler,\n compilerOptions,\n project,\n ignoreDiagnostics,\n ignore,\n transpileOnly,\n typeCheck,\n transpiler,\n swc,\n compilerHost,\n pretty,\n skipProject,\n skipIgnore,\n preferTsExts,\n logError,\n emit,\n scope,\n scopeDir,\n noExperimentalReplAwait,\n experimentalSpecifierResolution,\n esm,\n };\n}\n\nfunction phase2(payload: BootstrapState) {\n const { help, version, cwdArg, esm } = payload.parseArgvResult;\n\n if (help) {\n console.log(`\nUsage: ts-node [options] [ -e script | script.ts ] [arguments]\n\nOptions:\n\n -e, --eval [code] Evaluate code\n -p, --print Print result of \\`--eval\\`\n -r, --require [path] Require a node module before execution\n -i, --interactive Opens the REPL even if stdin does not appear to be a terminal\n\n --esm Bootstrap with the ESM loader, enabling full ESM support\n --swc Use the faster swc transpiler\n\n -h, --help Print CLI usage\n -v, --version Print module version information. -vvv to print additional information\n --showConfig Print resolved configuration and exit\n\n -T, --transpileOnly Use TypeScript's faster \\`transpileModule\\` or a third-party transpiler\n -H, --compilerHost Use TypeScript's compiler host API\n -I, --ignore [pattern] Override the path patterns to skip compilation\n -P, --project [path] Path to TypeScript JSON project file\n -C, --compiler [name] Specify a custom TypeScript compiler\n --transpiler [name] Specify a third-party, non-typechecking transpiler\n -D, --ignoreDiagnostics [code] Ignore TypeScript warnings by diagnostic code\n -O, --compilerOptions [opts] JSON object to merge with compiler options\n\n --cwd Behave as if invoked within this working directory.\n --files Load \\`files\\`, \\`include\\` and \\`exclude\\` from \\`tsconfig.json\\` on startup\n --pretty Use pretty diagnostic formatter (usually enabled by default)\n --cwdMode Use current directory instead of for config resolution\n --skipProject Skip reading \\`tsconfig.json\\`\n --skipIgnore Skip \\`--ignore\\` checks\n --emit Emit output files into \\`.ts-node\\` directory\n --scope Scope compiler to files within \\`scopeDir\\`. Anything outside this directory is ignored.\n --scopeDir Directory for \\`--scope\\`\n --preferTsExts Prefer importing TypeScript files over JavaScript files\n --logError Logs TypeScript errors to stderr instead of throwing exceptions\n --noExperimentalReplAwait Disable top-level await in REPL. Equivalent to node's --no-experimental-repl-await\n --experimentalSpecifierResolution [node|explicit]\n Equivalent to node's --experimental-specifier-resolution\n`);\n\n process.exit(0);\n }\n\n // Output project information.\n if (version === 1) {\n console.log(`v${VERSION}`);\n process.exit(0);\n }\n\n const cwd = cwdArg ? resolve(cwdArg) : process.cwd();\n\n // If ESM is explicitly enabled through the flag, stage3 should be run in a child process\n // with the ESM loaders configured.\n if (esm) payload.shouldUseChildProcess = true;\n\n return {\n cwd,\n };\n}\n\nfunction phase3(payload: BootstrapState) {\n const {\n emit,\n files,\n pretty,\n transpileOnly,\n transpiler,\n noExperimentalReplAwait,\n typeCheck,\n swc,\n compilerHost,\n ignore,\n preferTsExts,\n logError,\n scriptMode,\n cwdMode,\n project,\n skipProject,\n skipIgnore,\n compiler,\n ignoreDiagnostics,\n compilerOptions,\n argsRequire,\n scope,\n scopeDir,\n esm,\n experimentalSpecifierResolution,\n } = payload.parseArgvResult;\n const { cwd } = payload.phase2Result!;\n\n // NOTE: When we transition to a child process for ESM, the entry-point script determined\n // here might not be the one used later in `phase4`. This can happen when we execute the\n // original entry-point but then the process forks itself using e.g. `child_process.fork`.\n // We will always use the original TS project in forked processes anyway, so it is\n // expected and acceptable to retrieve the entry-point information here in `phase2`.\n // See: https://github.com/TypeStrong/ts-node/issues/1812.\n const { entryPointPath } = getEntryPointInfo(payload);\n\n const preloadedConfig = findAndReadConfig({\n cwd,\n emit,\n files,\n pretty,\n transpileOnly: transpileOnly ?? transpiler != null ? true : undefined,\n experimentalReplAwait: noExperimentalReplAwait ? false : undefined,\n typeCheck,\n transpiler,\n swc,\n compilerHost,\n ignore,\n logError,\n projectSearchDir: getProjectSearchDir(\n cwd,\n scriptMode,\n cwdMode,\n entryPointPath\n ),\n project,\n skipProject,\n skipIgnore,\n compiler,\n ignoreDiagnostics,\n compilerOptions,\n require: argsRequire,\n scope,\n scopeDir,\n preferTsExts,\n esm,\n experimentalSpecifierResolution:\n experimentalSpecifierResolution as ExperimentalSpecifierResolution,\n });\n\n // If ESM is enabled through the parsed tsconfig, stage4 should be run in a child\n // process with the ESM loaders configured.\n if (preloadedConfig.options.esm) payload.shouldUseChildProcess = true;\n\n return { preloadedConfig };\n}\n\n/**\n * Determines the entry-point information from the argv and phase2 result. This\n * method will be invoked in two places:\n *\n * 1. In phase 3 to be able to find a project from the potential entry-point script.\n * 2. In phase 4 to determine the actual entry-point script.\n *\n * Note that we need to explicitly re-resolve the entry-point information in the final\n * stage because the previous stage information could be modified when the bootstrap\n * invocation transitioned into a child process for ESM.\n *\n * Stages before (phase 4) can and will be cached by the child process through the Brotli\n * configuration and entry-point information is only reliable in the final phase. More\n * details can be found in here: https://github.com/TypeStrong/ts-node/issues/1812.\n */\nfunction getEntryPointInfo(state: BootstrapState) {\n const { code, interactive, restArgs } = state.parseArgvResult!;\n const { cwd } = state.phase2Result!;\n const { isCli } = state;\n\n // Figure out which we are executing: piped stdin, --eval, REPL, and/or entrypoint\n // This is complicated because node's behavior is complicated\n // `node -e code -i ./script.js` ignores -e\n const executeEval = code != null && !(interactive && restArgs.length);\n const executeEntrypoint = !executeEval && restArgs.length > 0;\n const executeRepl =\n !executeEntrypoint &&\n (interactive || (process.stdin.isTTY && !executeEval));\n const executeStdin = !executeEval && !executeRepl && !executeEntrypoint;\n\n /**\n * Unresolved. May point to a symlink, not realpath. May be missing file extension\n * NOTE: resolution relative to cwd option (not `process.cwd()`) is legacy backwards-compat; should be changed in next major: https://github.com/TypeStrong/ts-node/issues/1834\n */\n const entryPointPath = executeEntrypoint\n ? isCli\n ? resolve(cwd, restArgs[0])\n : resolve(restArgs[0])\n : undefined;\n\n return {\n executeEval,\n executeEntrypoint,\n executeRepl,\n executeStdin,\n entryPointPath,\n };\n}\n\nfunction phase4(payload: BootstrapState) {\n const { isInChildProcess, tsNodeScript } = payload;\n const { version, showConfig, restArgs, code, print, argv } =\n payload.parseArgvResult;\n const { cwd } = payload.phase2Result!;\n const { preloadedConfig } = payload.phase3Result!;\n\n const {\n entryPointPath,\n executeEntrypoint,\n executeEval,\n executeRepl,\n executeStdin,\n } = getEntryPointInfo(payload);\n\n /**\n * , [stdin], and [eval] are all essentially virtual files that do not exist on disc and are backed by a REPL\n * service to handle eval-ing of code.\n */\n interface VirtualFileState {\n state: EvalState;\n repl: ReplService;\n module?: Module;\n }\n let evalStuff: VirtualFileState | undefined;\n let replStuff: VirtualFileState | undefined;\n let stdinStuff: VirtualFileState | undefined;\n let evalAwarePartialHost: EvalAwarePartialHost | undefined = undefined;\n if (executeEval) {\n const state = new EvalState(join(cwd, EVAL_FILENAME));\n evalStuff = {\n state,\n repl: createRepl({\n state,\n composeWithEvalAwarePartialHost: evalAwarePartialHost,\n ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl: false,\n }),\n };\n ({ evalAwarePartialHost } = evalStuff.repl);\n // Create a local module instance based on `cwd`.\n const module = (evalStuff.module = new Module(EVAL_NAME));\n module.filename = evalStuff.state.path;\n module.paths = (Module as any)._nodeModulePaths(cwd);\n }\n if (executeStdin) {\n const state = new EvalState(join(cwd, STDIN_FILENAME));\n stdinStuff = {\n state,\n repl: createRepl({\n state,\n composeWithEvalAwarePartialHost: evalAwarePartialHost,\n ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl: false,\n }),\n };\n ({ evalAwarePartialHost } = stdinStuff.repl);\n // Create a local module instance based on `cwd`.\n const module = (stdinStuff.module = new Module(STDIN_NAME));\n module.filename = stdinStuff.state.path;\n module.paths = (Module as any)._nodeModulePaths(cwd);\n }\n if (executeRepl) {\n const state = new EvalState(join(cwd, REPL_FILENAME));\n replStuff = {\n state,\n repl: createRepl({\n state,\n composeWithEvalAwarePartialHost: evalAwarePartialHost,\n }),\n };\n ({ evalAwarePartialHost } = replStuff.repl);\n }\n\n // Register the TypeScript compiler instance.\n const service = createFromPreloadedConfig({\n // Since this struct may have been marshalled across thread or process boundaries, we must restore\n // un-marshall-able values.\n ...preloadedConfig,\n options: {\n ...preloadedConfig.options,\n readFile: evalAwarePartialHost?.readFile ?? undefined,\n fileExists: evalAwarePartialHost?.fileExists ?? undefined,\n tsTrace: DEFAULTS.tsTrace,\n },\n });\n register(service);\n if (isInChildProcess)\n (\n require('./child/child-loader') as typeof import('./child/child-loader')\n ).lateBindHooks(createEsmHooks(service));\n\n // Bind REPL service to ts-node compiler service (chicken-and-egg problem)\n replStuff?.repl.setService(service);\n evalStuff?.repl.setService(service);\n stdinStuff?.repl.setService(service);\n\n // Output project information.\n if (version === 2) {\n console.log(`ts-node v${VERSION}`);\n console.log(`node ${process.version}`);\n console.log(`compiler v${service.ts.version}`);\n process.exit(0);\n }\n if (version >= 3) {\n console.log(`ts-node v${VERSION} ${dirname(__dirname)}`);\n console.log(`node ${process.version}`);\n console.log(\n `compiler v${service.ts.version} ${service.compilerPath ?? ''}`\n );\n process.exit(0);\n }\n\n if (showConfig) {\n const ts = service.ts as any as TSInternal;\n if (typeof ts.convertToTSConfig !== 'function') {\n console.error(\n 'Error: --showConfig requires a typescript versions >=3.2 that support --showConfig'\n );\n process.exit(1);\n }\n let moduleTypes = undefined;\n if (service.options.moduleTypes) {\n // Assumption: this codepath requires CLI invocation, so moduleTypes must have come from a tsconfig, not API.\n const showRelativeTo = dirname(service.configFilePath!);\n moduleTypes = {} as Record;\n for (const [key, value] of Object.entries(service.options.moduleTypes)) {\n moduleTypes[\n relative(\n showRelativeTo,\n resolve(service.options.optionBasePaths?.moduleTypes!, key)\n )\n ] = value;\n }\n }\n const json = {\n ['ts-node']: {\n ...service.options,\n require: service.options.require?.length\n ? service.options.require\n : undefined,\n moduleTypes,\n optionBasePaths: undefined,\n compilerOptions: undefined,\n project: service.configFilePath ?? service.options.project,\n },\n ...ts.convertToTSConfig(\n service.config,\n service.configFilePath ?? join(cwd, 'ts-node-implicit-tsconfig.json'),\n service.ts.sys\n ),\n };\n console.log(\n // Assumes that all configuration options which can possibly be specified via the CLI are JSON-compatible.\n // If, in the future, we must log functions, for example readFile and fileExists, then we can implement a JSON\n // replacer function.\n JSON.stringify(json, null, 2)\n );\n process.exit(0);\n }\n\n // Prepend `ts-node` arguments to CLI for child processes.\n process.execArgv.push(\n tsNodeScript,\n ...argv.slice(2, argv.length - restArgs.length)\n );\n\n // TODO this comes from BootstrapState\n process.argv = [process.argv[1]]\n .concat(executeEntrypoint ? ([entryPointPath] as string[]) : [])\n .concat(restArgs.slice(executeEntrypoint ? 1 : 0));\n\n // Execute the main contents (either eval, script or piped).\n if (executeEntrypoint) {\n if (\n payload.isInChildProcess &&\n versionGteLt(process.versions.node, '18.6.0')\n ) {\n // HACK workaround node regression\n require('../dist-raw/runmain-hack.js').run(entryPointPath);\n } else {\n Module.runMain();\n }\n } else {\n // Note: eval and repl may both run, but never with stdin.\n // If stdin runs, eval and repl will not.\n if (executeEval) {\n addBuiltinLibsToObject(global);\n evalAndExitOnTsError(\n evalStuff!.repl,\n evalStuff!.module!,\n code!,\n print,\n 'eval'\n );\n }\n\n if (executeRepl) {\n replStuff!.repl.start();\n }\n\n if (executeStdin) {\n let buffer = code || '';\n process.stdin.on('data', (chunk: Buffer) => (buffer += chunk));\n process.stdin.on('end', () => {\n evalAndExitOnTsError(\n stdinStuff!.repl,\n stdinStuff!.module!,\n buffer,\n // `echo 123 | node -p` still prints 123\n print,\n 'stdin'\n );\n });\n }\n }\n}\n\n/**\n * Get project search path from args.\n */\nfunction getProjectSearchDir(\n cwd?: string,\n scriptMode?: boolean,\n cwdMode?: boolean,\n scriptPath?: string\n) {\n // Validate `--script-mode` / `--cwd-mode` / `--cwd` usage is correct.\n if (scriptMode && cwdMode) {\n throw new TypeError('--cwd-mode cannot be combined with --script-mode');\n }\n if (scriptMode && !scriptPath) {\n throw new TypeError(\n '--script-mode must be used with a script name, e.g. `ts-node --script-mode `'\n );\n }\n const doScriptMode =\n scriptMode === true ? true : cwdMode === true ? false : !!scriptPath;\n if (doScriptMode) {\n // Use node's own resolution behavior to ensure we follow symlinks.\n // scriptPath may omit file extension or point to a directory with or without package.json.\n // This happens before we are registered, so we tell node's resolver to consider ts, tsx, and jsx files.\n // In extremely rare cases, is is technically possible to resolve the wrong directory,\n // because we do not yet know preferTsExts, jsx, nor allowJs.\n // See also, justification why this will not happen in real-world situations:\n // https://github.com/TypeStrong/ts-node/pull/1009#issuecomment-613017081\n const exts = ['.js', '.jsx', '.ts', '.tsx'];\n const extsTemporarilyInstalled: string[] = [];\n for (const ext of exts) {\n if (!hasOwnProperty(require.extensions, ext)) {\n extsTemporarilyInstalled.push(ext);\n require.extensions[ext] = function () {};\n }\n }\n try {\n return dirname(requireResolveNonCached(scriptPath!));\n } finally {\n for (const ext of extsTemporarilyInstalled) {\n delete require.extensions[ext];\n }\n }\n }\n\n return cwd;\n}\n\nconst guaranteedNonexistentDirectoryPrefix = resolve(__dirname, 'doesnotexist');\nlet guaranteedNonexistentDirectorySuffix = 0;\n\n/**\n * require.resolve an absolute path, tricking node into *not* caching the results.\n * Necessary so that we do not pollute require.resolve cache prior to installing require.extensions\n *\n * Is a terrible hack, because node does not expose the necessary cache invalidation APIs\n * https://stackoverflow.com/questions/59865584/how-to-invalidate-cached-require-resolve-results\n */\nfunction requireResolveNonCached(absoluteModuleSpecifier: string) {\n // node <= 12.1.x fallback: The trick below triggers a node bug on old versions.\n // On these old versions, pollute the require cache instead. This is a deliberate\n // ts-node limitation that will *rarely* manifest, and will not matter once node 12\n // is end-of-life'd on 2022-04-30\n const isSupportedNodeVersion = versionGteLt(process.versions.node, '12.2.0');\n if (!isSupportedNodeVersion) return require.resolve(absoluteModuleSpecifier);\n\n const { dir, base } = parsePath(absoluteModuleSpecifier);\n const relativeModuleSpecifier = `./${base}`;\n\n const req = createRequire(\n join(dir, 'imaginaryUncacheableRequireResolveScript')\n );\n return req.resolve(relativeModuleSpecifier, {\n paths: [\n `${guaranteedNonexistentDirectoryPrefix}${guaranteedNonexistentDirectorySuffix++}`,\n ...(req.resolve.paths(relativeModuleSpecifier) || []),\n ],\n });\n}\n\n/**\n * Evaluate an [eval] or [stdin] script\n */\nfunction evalAndExitOnTsError(\n replService: ReplService,\n module: Module,\n code: string,\n isPrinted: boolean,\n filenameAndDirname: 'eval' | 'stdin'\n) {\n let result: any;\n setupContext(global, module, filenameAndDirname);\n\n try {\n result = replService.evalCode(code);\n } catch (error) {\n if (error instanceof TSError) {\n console.error(error);\n process.exit(1);\n }\n\n throw error;\n }\n\n if (isPrinted) {\n console.log(\n typeof result === 'string'\n ? result\n : inspect(result, { colors: process.stdout.isTTY })\n );\n }\n}\n\nif (require.main === module) {\n main();\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/argv-payload.d.ts b/node_modules/ts-node/dist/child/argv-payload.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/child/argv-payload.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/child/argv-payload.js b/node_modules/ts-node/dist/child/argv-payload.js deleted file mode 100644 index 669e747..0000000 --- a/node_modules/ts-node/dist/child/argv-payload.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decompress = exports.compress = exports.argPrefix = void 0; -const zlib_1 = require("zlib"); -/** @internal */ -exports.argPrefix = '--brotli-base64-config='; -/** @internal */ -function compress(object) { - return (0, zlib_1.brotliCompressSync)(Buffer.from(JSON.stringify(object), 'utf8'), { - [zlib_1.constants.BROTLI_PARAM_QUALITY]: zlib_1.constants.BROTLI_MIN_QUALITY, - }).toString('base64'); -} -exports.compress = compress; -/** @internal */ -function decompress(str) { - return JSON.parse((0, zlib_1.brotliDecompressSync)(Buffer.from(str, 'base64')).toString()); -} -exports.decompress = decompress; -//# sourceMappingURL=argv-payload.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/argv-payload.js.map b/node_modules/ts-node/dist/child/argv-payload.js.map deleted file mode 100644 index 84a3b8f..0000000 --- a/node_modules/ts-node/dist/child/argv-payload.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"argv-payload.js","sourceRoot":"","sources":["../../src/child/argv-payload.ts"],"names":[],"mappings":";;;AAAA,+BAA2E;AAE3E,gBAAgB;AACH,QAAA,SAAS,GAAG,yBAAyB,CAAC;AAEnD,gBAAgB;AAChB,SAAgB,QAAQ,CAAC,MAAW;IAClC,OAAO,IAAA,yBAAkB,EAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE;QACrE,CAAC,gBAAS,CAAC,oBAAoB,CAAC,EAAE,gBAAS,CAAC,kBAAkB;KAC/D,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACxB,CAAC;AAJD,4BAIC;AAED,gBAAgB;AAChB,SAAgB,UAAU,CAAC,GAAW;IACpC,OAAO,IAAI,CAAC,KAAK,CACf,IAAA,2BAAoB,EAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,CAC5D,CAAC;AACJ,CAAC;AAJD,gCAIC","sourcesContent":["import { brotliCompressSync, brotliDecompressSync, constants } from 'zlib';\n\n/** @internal */\nexport const argPrefix = '--brotli-base64-config=';\n\n/** @internal */\nexport function compress(object: any) {\n return brotliCompressSync(Buffer.from(JSON.stringify(object), 'utf8'), {\n [constants.BROTLI_PARAM_QUALITY]: constants.BROTLI_MIN_QUALITY,\n }).toString('base64');\n}\n\n/** @internal */\nexport function decompress(str: string) {\n return JSON.parse(\n brotliDecompressSync(Buffer.from(str, 'base64')).toString()\n );\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/child-entrypoint.d.ts b/node_modules/ts-node/dist/child/child-entrypoint.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/child/child-entrypoint.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/child/child-entrypoint.js b/node_modules/ts-node/dist/child/child-entrypoint.js deleted file mode 100644 index f498b4c..0000000 --- a/node_modules/ts-node/dist/child/child-entrypoint.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const bin_1 = require("../bin"); -const argv_payload_1 = require("./argv-payload"); -const base64ConfigArg = process.argv[2]; -if (!base64ConfigArg.startsWith(argv_payload_1.argPrefix)) - throw new Error('unexpected argv'); -const base64Payload = base64ConfigArg.slice(argv_payload_1.argPrefix.length); -const state = (0, argv_payload_1.decompress)(base64Payload); -state.isInChildProcess = true; -state.tsNodeScript = __filename; -state.parseArgvResult.argv = process.argv; -state.parseArgvResult.restArgs = process.argv.slice(3); -// Modify and re-compress the payload delivered to subsequent child processes. -// This logic may be refactored into bin.ts by https://github.com/TypeStrong/ts-node/issues/1831 -if (state.isCli) { - const stateForChildren = { - ...state, - isCli: false, - }; - state.parseArgvResult.argv[2] = `${argv_payload_1.argPrefix}${(0, argv_payload_1.compress)(stateForChildren)}`; -} -(0, bin_1.bootstrap)(state); -//# sourceMappingURL=child-entrypoint.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/child-entrypoint.js.map b/node_modules/ts-node/dist/child/child-entrypoint.js.map deleted file mode 100644 index bdab0f0..0000000 --- a/node_modules/ts-node/dist/child/child-entrypoint.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"child-entrypoint.js","sourceRoot":"","sources":["../../src/child/child-entrypoint.ts"],"names":[],"mappings":";;AAAA,gCAAmD;AACnD,iDAAiE;AAEjE,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACxC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,wBAAS,CAAC;IAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAC/E,MAAM,aAAa,GAAG,eAAe,CAAC,KAAK,CAAC,wBAAS,CAAC,MAAM,CAAC,CAAC;AAC9D,MAAM,KAAK,GAAG,IAAA,yBAAU,EAAC,aAAa,CAAmB,CAAC;AAE1D,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;AAC9B,KAAK,CAAC,YAAY,GAAG,UAAU,CAAC;AAChC,KAAK,CAAC,eAAe,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAC1C,KAAK,CAAC,eAAe,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEvD,8EAA8E;AAC9E,gGAAgG;AAChG,IAAI,KAAK,CAAC,KAAK,EAAE;IACf,MAAM,gBAAgB,GAAmB;QACvC,GAAG,KAAK;QACR,KAAK,EAAE,KAAK;KACb,CAAC;IACF,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,wBAAS,GAAG,IAAA,uBAAQ,EAAC,gBAAgB,CAAC,EAAE,CAAC;CAC7E;AAED,IAAA,eAAS,EAAC,KAAK,CAAC,CAAC","sourcesContent":["import { BootstrapState, bootstrap } from '../bin';\nimport { argPrefix, compress, decompress } from './argv-payload';\n\nconst base64ConfigArg = process.argv[2];\nif (!base64ConfigArg.startsWith(argPrefix)) throw new Error('unexpected argv');\nconst base64Payload = base64ConfigArg.slice(argPrefix.length);\nconst state = decompress(base64Payload) as BootstrapState;\n\nstate.isInChildProcess = true;\nstate.tsNodeScript = __filename;\nstate.parseArgvResult.argv = process.argv;\nstate.parseArgvResult.restArgs = process.argv.slice(3);\n\n// Modify and re-compress the payload delivered to subsequent child processes.\n// This logic may be refactored into bin.ts by https://github.com/TypeStrong/ts-node/issues/1831\nif (state.isCli) {\n const stateForChildren: BootstrapState = {\n ...state,\n isCli: false,\n };\n state.parseArgvResult.argv[2] = `${argPrefix}${compress(stateForChildren)}`;\n}\n\nbootstrap(state);\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/child-loader.d.ts b/node_modules/ts-node/dist/child/child-loader.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/child/child-loader.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/child/child-loader.js b/node_modules/ts-node/dist/child/child-loader.js deleted file mode 100644 index a56286e..0000000 --- a/node_modules/ts-node/dist/child/child-loader.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.transformSource = exports.getFormat = exports.load = exports.resolve = exports.lateBindHooks = void 0; -const esm_1 = require("../esm"); -let hooks; -/** @internal */ -function lateBindHooks(_hooks) { - hooks = _hooks; -} -exports.lateBindHooks = lateBindHooks; -const proxy = { - resolve(...args) { - var _a; - return ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.resolve) !== null && _a !== void 0 ? _a : args[2])(...args); - }, - load(...args) { - var _a; - return ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.load) !== null && _a !== void 0 ? _a : args[2])(...args); - }, - getFormat(...args) { - var _a; - return ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.getFormat) !== null && _a !== void 0 ? _a : args[2])(...args); - }, - transformSource(...args) { - var _a; - return ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.transformSource) !== null && _a !== void 0 ? _a : args[2])(...args); - }, -}; -/** @internal */ -_a = (0, esm_1.filterHooksByAPIVersion)(proxy), exports.resolve = _a.resolve, exports.load = _a.load, exports.getFormat = _a.getFormat, exports.transformSource = _a.transformSource; -//# sourceMappingURL=child-loader.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/child-loader.js.map b/node_modules/ts-node/dist/child/child-loader.js.map deleted file mode 100644 index 3c59ed6..0000000 --- a/node_modules/ts-node/dist/child/child-loader.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"child-loader.js","sourceRoot":"","sources":["../../src/child/child-loader.ts"],"names":[],"mappings":";;;;AACA,gCAAiD;AAEjD,IAAI,KAAgD,CAAC;AAErD,gBAAgB;AAChB,SAAgB,aAAa,CAC3B,MAAiD;IAEjD,KAAK,GAAG,MAAmD,CAAC;AAC9D,CAAC;AAJD,sCAIC;AAED,MAAM,KAAK,GAA8C;IACvD,OAAO,CAAC,GAAG,IAAgD;;QACzD,OAAO,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC9C,CAAC;IACD,IAAI,CAAC,GAAG,IAA6C;;QACnD,OAAO,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3C,CAAC;IACD,SAAS,CAAC,GAAG,IAAkD;;QAC7D,OAAO,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAChD,CAAC;IACD,eAAe,CAAC,GAAG,IAAwD;;QACzE,OAAO,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,eAAe,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACtD,CAAC;CACF,CAAC;AAEF,gBAAgB;AACH,KACX,IAAA,6BAAuB,EAAC,KAAK,CAA8C,EAD9D,eAAO,eAAE,YAAI,YAAE,iBAAS,iBAAE,uBAAe,sBACsB","sourcesContent":["import type { NodeLoaderHooksAPI1, NodeLoaderHooksAPI2 } from '..';\nimport { filterHooksByAPIVersion } from '../esm';\n\nlet hooks: NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2;\n\n/** @internal */\nexport function lateBindHooks(\n _hooks: NodeLoaderHooksAPI1 | NodeLoaderHooksAPI2\n) {\n hooks = _hooks as NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2;\n}\n\nconst proxy: NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2 = {\n resolve(...args: Parameters) {\n return (hooks?.resolve ?? args[2])(...args);\n },\n load(...args: Parameters) {\n return (hooks?.load ?? args[2])(...args);\n },\n getFormat(...args: Parameters) {\n return (hooks?.getFormat ?? args[2])(...args);\n },\n transformSource(...args: Parameters) {\n return (hooks?.transformSource ?? args[2])(...args);\n },\n};\n\n/** @internal */\nexport const { resolve, load, getFormat, transformSource } =\n filterHooksByAPIVersion(proxy) as NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2;\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/child-require.d.ts b/node_modules/ts-node/dist/child/child-require.d.ts deleted file mode 100644 index 1dae4d8..0000000 --- a/node_modules/ts-node/dist/child/child-require.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -interface EventEmitterInternals { - _events: Record>; -} -declare const _process: EventEmitterInternals; -declare let originalOnWarning: Function | undefined; -declare const messageMatch: RegExp; -declare function onWarning(this: any, warning: Error, ...rest: any[]): any; diff --git a/node_modules/ts-node/dist/child/child-require.js b/node_modules/ts-node/dist/child/child-require.js deleted file mode 100644 index 2dbde85..0000000 --- a/node_modules/ts-node/dist/child/child-require.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -const _process = process; -// Not shown here: Additional logic to correctly interact with process's events, either using this direct manipulation, or via the API -let originalOnWarning; -if (Array.isArray(_process._events.warning)) { - originalOnWarning = _process._events.warning[0]; - _process._events.warning[0] = onWarning; -} -else { - originalOnWarning = _process._events.warning; - _process._events.warning = onWarning; -} -const messageMatch = /(?:--(?:experimental-)?loader\b|\bCustom ESM Loaders\b)/; -function onWarning(warning, ...rest) { - // Suppress warning about how `--loader` is experimental - if ((warning === null || warning === void 0 ? void 0 : warning.name) === 'ExperimentalWarning' && - messageMatch.test(warning === null || warning === void 0 ? void 0 : warning.message)) - return; - // Will be undefined if `--no-warnings` - return originalOnWarning === null || originalOnWarning === void 0 ? void 0 : originalOnWarning.call(this, warning, ...rest); -} -//# sourceMappingURL=child-require.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/child-require.js.map b/node_modules/ts-node/dist/child/child-require.js.map deleted file mode 100644 index 51f712c..0000000 --- a/node_modules/ts-node/dist/child/child-require.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"child-require.js","sourceRoot":"","sources":["../../src/child/child-require.ts"],"names":[],"mappings":";AAGA,MAAM,QAAQ,GAAG,OAAuC,CAAC;AAEzD,sIAAsI;AAEtI,IAAI,iBAAuC,CAAC;AAC5C,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;IAC3C,iBAAiB,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAChD,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;CACzC;KAAM;IACL,iBAAiB,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC;IAC7C,QAAQ,CAAC,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,YAAY,GAAG,yDAAyD,CAAC;AAC/E,SAAS,SAAS,CAAY,OAAc,EAAE,GAAG,IAAW;IAC1D,wDAAwD;IACxD,IACE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,qBAAqB;QACvC,YAAY,CAAC,IAAI,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC;QAEnC,OAAO;IACT,uCAAuC;IACvC,OAAO,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AACzD,CAAC","sourcesContent":["interface EventEmitterInternals {\n _events: Record>;\n}\nconst _process = process as any as EventEmitterInternals;\n\n// Not shown here: Additional logic to correctly interact with process's events, either using this direct manipulation, or via the API\n\nlet originalOnWarning: Function | undefined;\nif (Array.isArray(_process._events.warning)) {\n originalOnWarning = _process._events.warning[0];\n _process._events.warning[0] = onWarning;\n} else {\n originalOnWarning = _process._events.warning;\n _process._events.warning = onWarning;\n}\n\nconst messageMatch = /(?:--(?:experimental-)?loader\\b|\\bCustom ESM Loaders\\b)/;\nfunction onWarning(this: any, warning: Error, ...rest: any[]) {\n // Suppress warning about how `--loader` is experimental\n if (\n warning?.name === 'ExperimentalWarning' &&\n messageMatch.test(warning?.message)\n )\n return;\n // Will be undefined if `--no-warnings`\n return originalOnWarning?.call(this, warning, ...rest);\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/spawn-child.d.ts b/node_modules/ts-node/dist/child/spawn-child.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/child/spawn-child.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/child/spawn-child.js b/node_modules/ts-node/dist/child/spawn-child.js deleted file mode 100644 index 6efdfd7..0000000 --- a/node_modules/ts-node/dist/child/spawn-child.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.callInChild = void 0; -const child_process_1 = require("child_process"); -const url_1 = require("url"); -const util_1 = require("../util"); -const argv_payload_1 = require("./argv-payload"); -/** - * @internal - * @param state Bootstrap state to be transferred into the child process. - * @param targetCwd Working directory to be preserved when transitioning to - * the child process. - */ -function callInChild(state) { - if (!(0, util_1.versionGteLt)(process.versions.node, '12.17.0')) { - throw new Error('`ts-node-esm` and `ts-node --esm` require node version 12.17.0 or newer.'); - } - const child = (0, child_process_1.spawn)(process.execPath, [ - '--require', - require.resolve('./child-require.js'), - '--loader', - // Node on Windows doesn't like `c:\` absolute paths here; must be `file:///c:/` - (0, url_1.pathToFileURL)(require.resolve('../../child-loader.mjs')).toString(), - require.resolve('./child-entrypoint.js'), - `${argv_payload_1.argPrefix}${(0, argv_payload_1.compress)(state)}`, - ...state.parseArgvResult.restArgs, - ], { - stdio: 'inherit', - argv0: process.argv0, - }); - child.on('error', (error) => { - console.error(error); - process.exit(1); - }); - child.on('exit', (code) => { - child.removeAllListeners(); - process.off('SIGINT', sendSignalToChild); - process.off('SIGTERM', sendSignalToChild); - process.exitCode = code === null ? 1 : code; - }); - // Ignore sigint and sigterm in parent; pass them to child - process.on('SIGINT', sendSignalToChild); - process.on('SIGTERM', sendSignalToChild); - function sendSignalToChild(signal) { - process.kill(child.pid, signal); - } -} -exports.callInChild = callInChild; -//# sourceMappingURL=spawn-child.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/spawn-child.js.map b/node_modules/ts-node/dist/child/spawn-child.js.map deleted file mode 100644 index 12e7f60..0000000 --- a/node_modules/ts-node/dist/child/spawn-child.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"spawn-child.js","sourceRoot":"","sources":["../../src/child/spawn-child.ts"],"names":[],"mappings":";;;AACA,iDAAsC;AACtC,6BAAoC;AACpC,kCAAuC;AACvC,iDAAqD;AAErD;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,KAAqB;IAC/C,IAAI,CA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;IACxC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;IACzC,SAAS,iBAAiB,CAAC,MAAc;QACvC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAvCD,kCAuCC","sourcesContent":["import type { BootstrapState } from '../bin';\nimport { spawn } from 'child_process';\nimport { pathToFileURL } from 'url';\nimport { versionGteLt } from '../util';\nimport { argPrefix, compress } from './argv-payload';\n\n/**\n * @internal\n * @param state Bootstrap state to be transferred into the child process.\n * @param targetCwd Working directory to be preserved when transitioning to\n * the child process.\n */\nexport function callInChild(state: BootstrapState) {\n if (!versionGteLt(process.versions.node, '12.17.0')) {\n throw new Error(\n '`ts-node-esm` and `ts-node --esm` require node version 12.17.0 or newer.'\n );\n }\n const child = spawn(\n process.execPath,\n [\n '--require',\n require.resolve('./child-require.js'),\n '--loader',\n // Node on Windows doesn't like `c:\\` absolute paths here; must be `file:///c:/`\n pathToFileURL(require.resolve('../../child-loader.mjs')).toString(),\n require.resolve('./child-entrypoint.js'),\n `${argPrefix}${compress(state)}`,\n ...state.parseArgvResult.restArgs,\n ],\n {\n stdio: 'inherit',\n argv0: process.argv0,\n }\n );\n child.on('error', (error) => {\n console.error(error);\n process.exit(1);\n });\n child.on('exit', (code) => {\n child.removeAllListeners();\n process.off('SIGINT', sendSignalToChild);\n process.off('SIGTERM', sendSignalToChild);\n process.exitCode = code === null ? 1 : code;\n });\n // Ignore sigint and sigterm in parent; pass them to child\n process.on('SIGINT', sendSignalToChild);\n process.on('SIGTERM', sendSignalToChild);\n function sendSignalToChild(signal: string) {\n process.kill(child.pid, signal);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/cjs-resolve-hooks.d.ts b/node_modules/ts-node/dist/cjs-resolve-hooks.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/cjs-resolve-hooks.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/cjs-resolve-hooks.js b/node_modules/ts-node/dist/cjs-resolve-hooks.js deleted file mode 100644 index 8e05695..0000000 --- a/node_modules/ts-node/dist/cjs-resolve-hooks.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.installCommonjsResolveHooksIfNecessary = void 0; -/** - * @internal - */ -function installCommonjsResolveHooksIfNecessary(tsNodeService) { - const Module = require('module'); - const originalResolveFilename = Module._resolveFilename; - const originalFindPath = Module._findPath; - const shouldInstallHook = tsNodeService.options.experimentalResolver; - if (shouldInstallHook) { - const { Module_findPath, Module_resolveFilename } = tsNodeService.getNodeCjsLoader(); - Module._resolveFilename = _resolveFilename; - Module._findPath = _findPath; - function _resolveFilename(request, parent, isMain, options, ...rest) { - if (!tsNodeService.enabled()) - return originalResolveFilename.call(this, request, parent, isMain, options, ...rest); - return Module_resolveFilename.call(this, request, parent, isMain, options, ...rest); - } - function _findPath() { - if (!tsNodeService.enabled()) - return originalFindPath.apply(this, arguments); - return Module_findPath.apply(this, arguments); - } - } -} -exports.installCommonjsResolveHooksIfNecessary = installCommonjsResolveHooksIfNecessary; -//# sourceMappingURL=cjs-resolve-hooks.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/cjs-resolve-hooks.js.map b/node_modules/ts-node/dist/cjs-resolve-hooks.js.map deleted file mode 100644 index 3f49b7d..0000000 --- a/node_modules/ts-node/dist/cjs-resolve-hooks.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cjs-resolve-hooks.js","sourceRoot":"","sources":["../src/cjs-resolve-hooks.ts"],"names":[],"mappings":";;;AAoBA;;GAEG;AACH,SAAgB,sCAAsC,CAAC,aAAsB;IAC3E,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAmC,CAAC;IACnE,MAAM,uBAAuB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACxD,MAAM,gBAAgB,GAAG,MAAM,CAAC,SAAS,CAAC;IAC1C,MAAM,iBAAiB,GAAG,aAAa,CAAC,OAAO,CAAC,oBAAoB,CAAC;IACrE,IAAI,iBAAiB,EAAE;QACrB,MAAM,EAAE,eAAe,EAAE,sBAAsB,EAAE,GAC/C,aAAa,CAAC,gBAAgB,EAAE,CAAC;QACnC,MAAM,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QAC3C,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;QAC7B,SAAS,gBAAgB,CAEvB,OAAe,EACf,MAAe,EACf,MAAgB,EAChB,OAAsC,EACtC,GAAG,IAAQ;YAEX,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;gBAC1B,OAAO,uBAAuB,CAAC,IAAI,CACjC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAM,EACN,OAAO,EACP,GAAG,IAAI,CACR,CAAC;YAEJ,OAAO,sBAAsB,CAAC,IAAI,CAChC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAM,EACN,OAAO,EACP,GAAG,IAAI,CACR,CAAC;QACJ,CAAC;QACD,SAAS,SAAS;YAChB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;gBAC1B,OAAO,gBAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,SAAgB,CAAC,CAAC;YACxD,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,SAAgB,CAAC,CAAC;QACvD,CAAC;KACF;AACH,CAAC;AA3CD,wFA2CC","sourcesContent":["import type Module = require('module');\nimport type { Service } from '.';\n\n/** @internal */\nexport type ModuleConstructorWithInternals = typeof Module & {\n _resolveFilename(\n request: string,\n parent?: Module,\n isMain?: boolean,\n options?: ModuleResolveFilenameOptions,\n ...rest: any[]\n ): string;\n _preloadModules(requests?: string[]): void;\n _findPath(request: string, paths: string[], isMain: boolean): string;\n};\n\ninterface ModuleResolveFilenameOptions {\n paths?: Array;\n}\n\n/**\n * @internal\n */\nexport function installCommonjsResolveHooksIfNecessary(tsNodeService: Service) {\n const Module = require('module') as ModuleConstructorWithInternals;\n const originalResolveFilename = Module._resolveFilename;\n const originalFindPath = Module._findPath;\n const shouldInstallHook = tsNodeService.options.experimentalResolver;\n if (shouldInstallHook) {\n const { Module_findPath, Module_resolveFilename } =\n tsNodeService.getNodeCjsLoader();\n Module._resolveFilename = _resolveFilename;\n Module._findPath = _findPath;\n function _resolveFilename(\n this: any,\n request: string,\n parent?: Module,\n isMain?: boolean,\n options?: ModuleResolveFilenameOptions,\n ...rest: []\n ): string {\n if (!tsNodeService.enabled())\n return originalResolveFilename.call(\n this,\n request,\n parent,\n isMain,\n options,\n ...rest\n );\n\n return Module_resolveFilename.call(\n this,\n request,\n parent,\n isMain,\n options,\n ...rest\n );\n }\n function _findPath(this: any): string {\n if (!tsNodeService.enabled())\n return originalFindPath.apply(this, arguments as any);\n return Module_findPath.apply(this, arguments as any);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/configuration.d.ts b/node_modules/ts-node/dist/configuration.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/configuration.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/configuration.js b/node_modules/ts-node/dist/configuration.js deleted file mode 100644 index 2e55dcd..0000000 --- a/node_modules/ts-node/dist/configuration.js +++ /dev/null @@ -1,308 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getTsConfigDefaults = exports.ComputeAsCommonRootOfFiles = exports.loadCompiler = exports.resolveAndLoadCompiler = exports.readConfig = exports.findAndReadConfig = void 0; -const path_1 = require("path"); -const index_1 = require("./index"); -const ts_internals_1 = require("./ts-internals"); -const tsconfigs_1 = require("./tsconfigs"); -const util_1 = require("./util"); -/** - * TypeScript compiler option values required by `ts-node` which cannot be overridden. - */ -const TS_NODE_COMPILER_OPTIONS = { - sourceMap: true, - inlineSourceMap: false, - inlineSources: true, - declaration: false, - noEmit: false, - outDir: '.ts-node', -}; -/* - * Do post-processing on config options to support `ts-node`. - */ -function fixConfig(ts, config) { - // Delete options that *should not* be passed through. - delete config.options.out; - delete config.options.outFile; - delete config.options.composite; - delete config.options.declarationDir; - delete config.options.declarationMap; - delete config.options.emitDeclarationOnly; - // Target ES5 output by default (instead of ES3). - if (config.options.target === undefined) { - config.options.target = ts.ScriptTarget.ES5; - } - // Target CommonJS modules by default (instead of magically switching to ES6 when the target is ES6). - if (config.options.module === undefined) { - config.options.module = ts.ModuleKind.CommonJS; - } - return config; -} -/** @internal */ -function findAndReadConfig(rawOptions) { - var _a, _b, _c, _d, _e; - const cwd = (0, path_1.resolve)((_c = (_b = (_a = rawOptions.cwd) !== null && _a !== void 0 ? _a : rawOptions.dir) !== null && _b !== void 0 ? _b : index_1.DEFAULTS.cwd) !== null && _c !== void 0 ? _c : process.cwd()); - const compilerName = (_d = rawOptions.compiler) !== null && _d !== void 0 ? _d : index_1.DEFAULTS.compiler; - // Compute minimum options to read the config file. - let projectLocalResolveDir = (0, util_1.getBasePathForProjectLocalDependencyResolution)(undefined, rawOptions.projectSearchDir, rawOptions.project, cwd); - let { compiler, ts } = resolveAndLoadCompiler(compilerName, projectLocalResolveDir); - // Read config file and merge new options between env and CLI options. - const { configFilePath, config, tsNodeOptionsFromTsconfig, optionBasePaths } = readConfig(cwd, ts, rawOptions); - const options = (0, util_1.assign)({}, index_1.DEFAULTS, tsNodeOptionsFromTsconfig || {}, { optionBasePaths }, rawOptions); - options.require = [ - ...(tsNodeOptionsFromTsconfig.require || []), - ...(rawOptions.require || []), - ]; - // Re-resolve the compiler in case it has changed. - // Compiler is loaded relative to tsconfig.json, so tsconfig discovery may cause us to load a - // different compiler than we did above, even if the name has not changed. - if (configFilePath) { - projectLocalResolveDir = (0, util_1.getBasePathForProjectLocalDependencyResolution)(configFilePath, rawOptions.projectSearchDir, rawOptions.project, cwd); - ({ compiler } = resolveCompiler(options.compiler, (_e = optionBasePaths.compiler) !== null && _e !== void 0 ? _e : projectLocalResolveDir)); - } - return { - options, - config, - projectLocalResolveDir, - optionBasePaths, - configFilePath, - cwd, - compiler, - }; -} -exports.findAndReadConfig = findAndReadConfig; -/** - * Load TypeScript configuration. Returns the parsed TypeScript config and - * any `ts-node` options specified in the config file. - * - * Even when a tsconfig.json is not loaded, this function still handles merging - * compilerOptions from various sources: API, environment variables, etc. - * - * @internal - */ -function readConfig(cwd, ts, rawApiOptions) { - var _a, _b, _c; - // Ordered [a, b, c] where config a extends b extends c - const configChain = []; - let config = { compilerOptions: {} }; - let basePath = cwd; - let configFilePath = undefined; - const projectSearchDir = (0, path_1.resolve)(cwd, (_a = rawApiOptions.projectSearchDir) !== null && _a !== void 0 ? _a : cwd); - const { fileExists = ts.sys.fileExists, readFile = ts.sys.readFile, skipProject = index_1.DEFAULTS.skipProject, project = index_1.DEFAULTS.project, tsTrace = index_1.DEFAULTS.tsTrace, } = rawApiOptions; - // Read project configuration when available. - if (!skipProject) { - if (project) { - const resolved = (0, path_1.resolve)(cwd, project); - const nested = (0, path_1.join)(resolved, 'tsconfig.json'); - configFilePath = fileExists(nested) ? nested : resolved; - } - else { - configFilePath = ts.findConfigFile(projectSearchDir, fileExists); - } - if (configFilePath) { - let pathToNextConfigInChain = configFilePath; - const tsInternals = (0, ts_internals_1.createTsInternals)(ts); - const errors = []; - // Follow chain of "extends" - while (true) { - const result = ts.readConfigFile(pathToNextConfigInChain, readFile); - // Return diagnostics. - if (result.error) { - return { - configFilePath, - config: { errors: [result.error], fileNames: [], options: {} }, - tsNodeOptionsFromTsconfig: {}, - optionBasePaths: {}, - }; - } - const c = result.config; - const bp = (0, path_1.dirname)(pathToNextConfigInChain); - configChain.push({ - config: c, - basePath: bp, - configPath: pathToNextConfigInChain, - }); - if (c.extends == null) - break; - const resolvedExtendedConfigPath = tsInternals.getExtendsConfigPath(c.extends, { - fileExists, - readDirectory: ts.sys.readDirectory, - readFile, - useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames, - trace: tsTrace, - }, bp, errors, ts.createCompilerDiagnostic); - if (errors.length) { - return { - configFilePath, - config: { errors, fileNames: [], options: {} }, - tsNodeOptionsFromTsconfig: {}, - optionBasePaths: {}, - }; - } - if (resolvedExtendedConfigPath == null) - break; - pathToNextConfigInChain = resolvedExtendedConfigPath; - } - ({ config, basePath } = configChain[0]); - } - } - // Merge and fix ts-node options that come from tsconfig.json(s) - const tsNodeOptionsFromTsconfig = {}; - const optionBasePaths = {}; - for (let i = configChain.length - 1; i >= 0; i--) { - const { config, basePath, configPath } = configChain[i]; - const options = filterRecognizedTsConfigTsNodeOptions(config['ts-node']).recognized; - // Some options are relative to the config file, so must be converted to absolute paths here - if (options.require) { - // Modules are found relative to the tsconfig file, not the `dir` option - const tsconfigRelativeResolver = (0, util_1.createProjectLocalResolveHelper)((0, path_1.dirname)(configPath)); - options.require = options.require.map((path) => tsconfigRelativeResolver(path, false)); - } - if (options.scopeDir) { - options.scopeDir = (0, path_1.resolve)(basePath, options.scopeDir); - } - // Downstream code uses the basePath; we do not do that here. - if (options.moduleTypes) { - optionBasePaths.moduleTypes = basePath; - } - if (options.transpiler != null) { - optionBasePaths.transpiler = basePath; - } - if (options.compiler != null) { - optionBasePaths.compiler = basePath; - } - if (options.swc != null) { - optionBasePaths.swc = basePath; - } - (0, util_1.assign)(tsNodeOptionsFromTsconfig, options); - } - // Remove resolution of "files". - const files = (_c = (_b = rawApiOptions.files) !== null && _b !== void 0 ? _b : tsNodeOptionsFromTsconfig.files) !== null && _c !== void 0 ? _c : index_1.DEFAULTS.files; - // Only if a config file is *not* loaded, load an implicit configuration from @tsconfig/bases - const skipDefaultCompilerOptions = configFilePath != null; - const defaultCompilerOptionsForNodeVersion = skipDefaultCompilerOptions - ? undefined - : { - ...(0, tsconfigs_1.getDefaultTsconfigJsonForNodeVersion)(ts).compilerOptions, - types: ['node'], - }; - // Merge compilerOptions from all sources - config.compilerOptions = Object.assign({}, - // automatically-applied options from @tsconfig/bases - defaultCompilerOptionsForNodeVersion, - // tsconfig.json "compilerOptions" - config.compilerOptions, - // from env var - index_1.DEFAULTS.compilerOptions, - // tsconfig.json "ts-node": "compilerOptions" - tsNodeOptionsFromTsconfig.compilerOptions, - // passed programmatically - rawApiOptions.compilerOptions, - // overrides required by ts-node, cannot be changed - TS_NODE_COMPILER_OPTIONS); - const fixedConfig = fixConfig(ts, ts.parseJsonConfigFileContent(config, { - fileExists, - readFile, - // Only used for globbing "files", "include", "exclude" - // When `files` option disabled, we want to avoid the fs calls - readDirectory: files ? ts.sys.readDirectory : () => [], - useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames, - }, basePath, undefined, configFilePath)); - return { - configFilePath, - config: fixedConfig, - tsNodeOptionsFromTsconfig, - optionBasePaths, - }; -} -exports.readConfig = readConfig; -/** - * Load the typescript compiler. It is required to load the tsconfig but might - * be changed by the tsconfig, so we have to do this twice. - * @internal - */ -function resolveAndLoadCompiler(name, relativeToPath) { - const { compiler } = resolveCompiler(name, relativeToPath); - const ts = loadCompiler(compiler); - return { compiler, ts }; -} -exports.resolveAndLoadCompiler = resolveAndLoadCompiler; -function resolveCompiler(name, relativeToPath) { - const projectLocalResolveHelper = (0, util_1.createProjectLocalResolveHelper)(relativeToPath); - const compiler = projectLocalResolveHelper(name || 'typescript', true); - return { compiler }; -} -/** @internal */ -function loadCompiler(compiler) { - return (0, util_1.attemptRequireWithV8CompileCache)(require, compiler); -} -exports.loadCompiler = loadCompiler; -/** - * Given the raw "ts-node" sub-object from a tsconfig, return an object with only the properties - * recognized by "ts-node" - */ -function filterRecognizedTsConfigTsNodeOptions(jsonObject) { - if (jsonObject == null) - return { recognized: {}, unrecognized: {} }; - const { compiler, compilerHost, compilerOptions, emit, files, ignore, ignoreDiagnostics, logError, preferTsExts, pretty, require, skipIgnore, transpileOnly, typeCheck, transpiler, scope, scopeDir, moduleTypes, experimentalReplAwait, swc, experimentalResolver, esm, experimentalSpecifierResolution, experimentalTsImportSpecifiers, ...unrecognized } = jsonObject; - const filteredTsConfigOptions = { - compiler, - compilerHost, - compilerOptions, - emit, - experimentalReplAwait, - files, - ignore, - ignoreDiagnostics, - logError, - preferTsExts, - pretty, - require, - skipIgnore, - transpileOnly, - typeCheck, - transpiler, - scope, - scopeDir, - moduleTypes, - swc, - experimentalResolver, - esm, - experimentalSpecifierResolution, - experimentalTsImportSpecifiers, - }; - // Use the typechecker to make sure this implementation has the correct set of properties - const catchExtraneousProps = null; - const catchMissingProps = null; - return { recognized: filteredTsConfigOptions, unrecognized }; -} -/** @internal */ -exports.ComputeAsCommonRootOfFiles = Symbol(); -/** - * Some TS compiler options have defaults which are not provided by TS's config parsing functions. - * This function centralizes the logic for computing those defaults. - * @internal - */ -function getTsConfigDefaults(config, basePath, _files, _include, _exclude) { - const { composite = false } = config.options; - let rootDir = config.options.rootDir; - if (rootDir == null) { - if (composite) - rootDir = basePath; - // Return this symbol to avoid computing from `files`, which would require fs calls - else - rootDir = exports.ComputeAsCommonRootOfFiles; - } - const { outDir = rootDir } = config.options; - // Docs are wrong: https://www.typescriptlang.org/tsconfig#include - // Docs say **, but it's actually **/*; compiler throws error for ** - const include = _files ? [] : ['**/*']; - const files = _files !== null && _files !== void 0 ? _files : []; - // Docs are misleading: https://www.typescriptlang.org/tsconfig#exclude - // Docs say it excludes node_modules, bower_components, jspm_packages, but actually those are excluded via behavior of "include" - const exclude = _exclude !== null && _exclude !== void 0 ? _exclude : [outDir]; // TODO technically, outDir is absolute path, but exclude should be relative glob pattern? - // TODO compute baseUrl - return { rootDir, outDir, include, files, exclude, composite }; -} -exports.getTsConfigDefaults = getTsConfigDefaults; -//# sourceMappingURL=configuration.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/configuration.js.map b/node_modules/ts-node/dist/configuration.js.map deleted file mode 100644 index 392a32f..0000000 --- a/node_modules/ts-node/dist/configuration.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":";;;AAAA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,aAAR,QAAQ,cAAR,QAAQ,GAAI,CAAC,MAAM,CAAC,CAAC,CAAC,0FAA0F;IAEhI,uBAAuB;IAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AACjE,CAAC;AA3BD,kDA2BC","sourcesContent":["import { resolve, dirname, join } from 'path';\nimport type * as _ts from 'typescript';\nimport {\n CreateOptions,\n DEFAULTS,\n OptionBasePaths,\n RegisterOptions,\n TSCommon,\n TsConfigOptions,\n} from './index';\nimport type { TSInternal } from './ts-compiler-types';\nimport { createTsInternals } from './ts-internals';\nimport { getDefaultTsconfigJsonForNodeVersion } from './tsconfigs';\nimport {\n assign,\n attemptRequireWithV8CompileCache,\n createProjectLocalResolveHelper,\n getBasePathForProjectLocalDependencyResolution,\n} from './util';\n\n/**\n * TypeScript compiler option values required by `ts-node` which cannot be overridden.\n */\nconst TS_NODE_COMPILER_OPTIONS = {\n sourceMap: true,\n inlineSourceMap: false,\n inlineSources: true,\n declaration: false,\n noEmit: false,\n outDir: '.ts-node',\n};\n\n/*\n * Do post-processing on config options to support `ts-node`.\n */\nfunction fixConfig(ts: TSCommon, config: _ts.ParsedCommandLine) {\n // Delete options that *should not* be passed through.\n delete config.options.out;\n delete config.options.outFile;\n delete config.options.composite;\n delete config.options.declarationDir;\n delete config.options.declarationMap;\n delete config.options.emitDeclarationOnly;\n\n // Target ES5 output by default (instead of ES3).\n if (config.options.target === undefined) {\n config.options.target = ts.ScriptTarget.ES5;\n }\n\n // Target CommonJS modules by default (instead of magically switching to ES6 when the target is ES6).\n if (config.options.module === undefined) {\n config.options.module = ts.ModuleKind.CommonJS;\n }\n\n return config;\n}\n\n/** @internal */\nexport function findAndReadConfig(rawOptions: CreateOptions) {\n const cwd = resolve(\n rawOptions.cwd ?? rawOptions.dir ?? DEFAULTS.cwd ?? process.cwd()\n );\n const compilerName = rawOptions.compiler ?? DEFAULTS.compiler;\n\n // Compute minimum options to read the config file.\n let projectLocalResolveDir = getBasePathForProjectLocalDependencyResolution(\n undefined,\n rawOptions.projectSearchDir,\n rawOptions.project,\n cwd\n );\n let { compiler, ts } = resolveAndLoadCompiler(\n compilerName,\n projectLocalResolveDir\n );\n\n // Read config file and merge new options between env and CLI options.\n const { configFilePath, config, tsNodeOptionsFromTsconfig, optionBasePaths } =\n readConfig(cwd, ts, rawOptions);\n\n const options = assign(\n {},\n DEFAULTS,\n tsNodeOptionsFromTsconfig || {},\n { optionBasePaths },\n rawOptions\n );\n options.require = [\n ...(tsNodeOptionsFromTsconfig.require || []),\n ...(rawOptions.require || []),\n ];\n\n // Re-resolve the compiler in case it has changed.\n // Compiler is loaded relative to tsconfig.json, so tsconfig discovery may cause us to load a\n // different compiler than we did above, even if the name has not changed.\n if (configFilePath) {\n projectLocalResolveDir = getBasePathForProjectLocalDependencyResolution(\n configFilePath,\n rawOptions.projectSearchDir,\n rawOptions.project,\n cwd\n );\n ({ compiler } = resolveCompiler(\n options.compiler,\n optionBasePaths.compiler ?? projectLocalResolveDir\n ));\n }\n\n return {\n options,\n config,\n projectLocalResolveDir,\n optionBasePaths,\n configFilePath,\n cwd,\n compiler,\n };\n}\n\n/**\n * Load TypeScript configuration. Returns the parsed TypeScript config and\n * any `ts-node` options specified in the config file.\n *\n * Even when a tsconfig.json is not loaded, this function still handles merging\n * compilerOptions from various sources: API, environment variables, etc.\n *\n * @internal\n */\nexport function readConfig(\n cwd: string,\n ts: TSCommon,\n rawApiOptions: CreateOptions\n): {\n /**\n * Path of tsconfig file if one was loaded\n */\n configFilePath: string | undefined;\n /**\n * Parsed TypeScript configuration with compilerOptions merged from all other sources (env vars, etc)\n */\n config: _ts.ParsedCommandLine;\n /**\n * ts-node options pulled from `tsconfig.json`, NOT merged with any other sources. Merging must happen outside\n * this function.\n */\n tsNodeOptionsFromTsconfig: TsConfigOptions;\n optionBasePaths: OptionBasePaths;\n} {\n // Ordered [a, b, c] where config a extends b extends c\n const configChain: Array<{\n config: any;\n basePath: string;\n configPath: string;\n }> = [];\n let config: any = { compilerOptions: {} };\n let basePath = cwd;\n let configFilePath: string | undefined = undefined;\n const projectSearchDir = resolve(cwd, rawApiOptions.projectSearchDir ?? cwd);\n\n const {\n fileExists = ts.sys.fileExists,\n readFile = ts.sys.readFile,\n skipProject = DEFAULTS.skipProject,\n project = DEFAULTS.project,\n tsTrace = DEFAULTS.tsTrace,\n } = rawApiOptions;\n\n // Read project configuration when available.\n if (!skipProject) {\n if (project) {\n const resolved = resolve(cwd, project);\n const nested = join(resolved, 'tsconfig.json');\n configFilePath = fileExists(nested) ? nested : resolved;\n } else {\n configFilePath = ts.findConfigFile(projectSearchDir, fileExists);\n }\n\n if (configFilePath) {\n let pathToNextConfigInChain = configFilePath;\n const tsInternals = createTsInternals(ts);\n const errors: Array<_ts.Diagnostic> = [];\n\n // Follow chain of \"extends\"\n while (true) {\n const result = ts.readConfigFile(pathToNextConfigInChain, readFile);\n\n // Return diagnostics.\n if (result.error) {\n return {\n configFilePath,\n config: { errors: [result.error], fileNames: [], options: {} },\n tsNodeOptionsFromTsconfig: {},\n optionBasePaths: {},\n };\n }\n\n const c = result.config;\n const bp = dirname(pathToNextConfigInChain);\n configChain.push({\n config: c,\n basePath: bp,\n configPath: pathToNextConfigInChain,\n });\n\n if (c.extends == null) break;\n const resolvedExtendedConfigPath = tsInternals.getExtendsConfigPath(\n c.extends,\n {\n fileExists,\n readDirectory: ts.sys.readDirectory,\n readFile,\n useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,\n trace: tsTrace,\n },\n bp,\n errors,\n (ts as unknown as TSInternal).createCompilerDiagnostic\n );\n if (errors.length) {\n return {\n configFilePath,\n config: { errors, fileNames: [], options: {} },\n tsNodeOptionsFromTsconfig: {},\n optionBasePaths: {},\n };\n }\n if (resolvedExtendedConfigPath == null) break;\n pathToNextConfigInChain = resolvedExtendedConfigPath;\n }\n\n ({ config, basePath } = configChain[0]);\n }\n }\n\n // Merge and fix ts-node options that come from tsconfig.json(s)\n const tsNodeOptionsFromTsconfig: TsConfigOptions = {};\n const optionBasePaths: OptionBasePaths = {};\n for (let i = configChain.length - 1; i >= 0; i--) {\n const { config, basePath, configPath } = configChain[i];\n const options = filterRecognizedTsConfigTsNodeOptions(\n config['ts-node']\n ).recognized;\n\n // Some options are relative to the config file, so must be converted to absolute paths here\n if (options.require) {\n // Modules are found relative to the tsconfig file, not the `dir` option\n const tsconfigRelativeResolver = createProjectLocalResolveHelper(\n dirname(configPath)\n );\n options.require = options.require.map((path: string) =>\n tsconfigRelativeResolver(path, false)\n );\n }\n if (options.scopeDir) {\n options.scopeDir = resolve(basePath, options.scopeDir!);\n }\n\n // Downstream code uses the basePath; we do not do that here.\n if (options.moduleTypes) {\n optionBasePaths.moduleTypes = basePath;\n }\n if (options.transpiler != null) {\n optionBasePaths.transpiler = basePath;\n }\n if (options.compiler != null) {\n optionBasePaths.compiler = basePath;\n }\n if (options.swc != null) {\n optionBasePaths.swc = basePath;\n }\n\n assign(tsNodeOptionsFromTsconfig, options);\n }\n\n // Remove resolution of \"files\".\n const files =\n rawApiOptions.files ?? tsNodeOptionsFromTsconfig.files ?? DEFAULTS.files;\n\n // Only if a config file is *not* loaded, load an implicit configuration from @tsconfig/bases\n const skipDefaultCompilerOptions = configFilePath != null;\n const defaultCompilerOptionsForNodeVersion = skipDefaultCompilerOptions\n ? undefined\n : {\n ...getDefaultTsconfigJsonForNodeVersion(ts).compilerOptions,\n types: ['node'],\n };\n\n // Merge compilerOptions from all sources\n config.compilerOptions = Object.assign(\n {},\n // automatically-applied options from @tsconfig/bases\n defaultCompilerOptionsForNodeVersion,\n // tsconfig.json \"compilerOptions\"\n config.compilerOptions,\n // from env var\n DEFAULTS.compilerOptions,\n // tsconfig.json \"ts-node\": \"compilerOptions\"\n tsNodeOptionsFromTsconfig.compilerOptions,\n // passed programmatically\n rawApiOptions.compilerOptions,\n // overrides required by ts-node, cannot be changed\n TS_NODE_COMPILER_OPTIONS\n );\n\n const fixedConfig = fixConfig(\n ts,\n ts.parseJsonConfigFileContent(\n config,\n {\n fileExists,\n readFile,\n // Only used for globbing \"files\", \"include\", \"exclude\"\n // When `files` option disabled, we want to avoid the fs calls\n readDirectory: files ? ts.sys.readDirectory : () => [],\n useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,\n },\n basePath,\n undefined,\n configFilePath\n )\n );\n\n return {\n configFilePath,\n config: fixedConfig,\n tsNodeOptionsFromTsconfig,\n optionBasePaths,\n };\n}\n\n/**\n * Load the typescript compiler. It is required to load the tsconfig but might\n * be changed by the tsconfig, so we have to do this twice.\n * @internal\n */\nexport function resolveAndLoadCompiler(\n name: string | undefined,\n relativeToPath: string\n) {\n const { compiler } = resolveCompiler(name, relativeToPath);\n const ts = loadCompiler(compiler);\n return { compiler, ts };\n}\n\nfunction resolveCompiler(name: string | undefined, relativeToPath: string) {\n const projectLocalResolveHelper =\n createProjectLocalResolveHelper(relativeToPath);\n const compiler = projectLocalResolveHelper(name || 'typescript', true);\n return { compiler };\n}\n\n/** @internal */\nexport function loadCompiler(compiler: string): TSCommon {\n return attemptRequireWithV8CompileCache(require, compiler);\n}\n\n/**\n * Given the raw \"ts-node\" sub-object from a tsconfig, return an object with only the properties\n * recognized by \"ts-node\"\n */\nfunction filterRecognizedTsConfigTsNodeOptions(jsonObject: any): {\n recognized: TsConfigOptions;\n unrecognized: any;\n} {\n if (jsonObject == null) return { recognized: {}, unrecognized: {} };\n const {\n compiler,\n compilerHost,\n compilerOptions,\n emit,\n files,\n ignore,\n ignoreDiagnostics,\n logError,\n preferTsExts,\n pretty,\n require,\n skipIgnore,\n transpileOnly,\n typeCheck,\n transpiler,\n scope,\n scopeDir,\n moduleTypes,\n experimentalReplAwait,\n swc,\n experimentalResolver,\n esm,\n experimentalSpecifierResolution,\n experimentalTsImportSpecifiers,\n ...unrecognized\n } = jsonObject as TsConfigOptions;\n const filteredTsConfigOptions = {\n compiler,\n compilerHost,\n compilerOptions,\n emit,\n experimentalReplAwait,\n files,\n ignore,\n ignoreDiagnostics,\n logError,\n preferTsExts,\n pretty,\n require,\n skipIgnore,\n transpileOnly,\n typeCheck,\n transpiler,\n scope,\n scopeDir,\n moduleTypes,\n swc,\n experimentalResolver,\n esm,\n experimentalSpecifierResolution,\n experimentalTsImportSpecifiers,\n };\n // Use the typechecker to make sure this implementation has the correct set of properties\n const catchExtraneousProps: keyof TsConfigOptions =\n null as any as keyof typeof filteredTsConfigOptions;\n const catchMissingProps: keyof typeof filteredTsConfigOptions =\n null as any as keyof TsConfigOptions;\n return { recognized: filteredTsConfigOptions, unrecognized };\n}\n\n/** @internal */\nexport const ComputeAsCommonRootOfFiles = Symbol();\n\n/**\n * Some TS compiler options have defaults which are not provided by TS's config parsing functions.\n * This function centralizes the logic for computing those defaults.\n * @internal\n */\nexport function getTsConfigDefaults(\n config: _ts.ParsedCommandLine,\n basePath: string,\n _files: string[] | undefined,\n _include: string[] | undefined,\n _exclude: string[] | undefined\n) {\n const { composite = false } = config.options;\n let rootDir: string | typeof ComputeAsCommonRootOfFiles =\n config.options.rootDir!;\n if (rootDir == null) {\n if (composite) rootDir = basePath;\n // Return this symbol to avoid computing from `files`, which would require fs calls\n else rootDir = ComputeAsCommonRootOfFiles;\n }\n const { outDir = rootDir } = config.options;\n // Docs are wrong: https://www.typescriptlang.org/tsconfig#include\n // Docs say **, but it's actually **/*; compiler throws error for **\n const include = _files ? [] : ['**/*'];\n const files = _files ?? [];\n // Docs are misleading: https://www.typescriptlang.org/tsconfig#exclude\n // Docs say it excludes node_modules, bower_components, jspm_packages, but actually those are excluded via behavior of \"include\"\n const exclude = _exclude ?? [outDir]; // TODO technically, outDir is absolute path, but exclude should be relative glob pattern?\n\n // TODO compute baseUrl\n\n return { rootDir, outDir, include, files, exclude, composite };\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/esm.d.ts b/node_modules/ts-node/dist/esm.d.ts deleted file mode 100644 index bbd0e23..0000000 --- a/node_modules/ts-node/dist/esm.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/// -/// -import { Service } from './index'; -export interface NodeLoaderHooksAPI1 { - resolve: NodeLoaderHooksAPI1.ResolveHook; - getFormat: NodeLoaderHooksAPI1.GetFormatHook; - transformSource: NodeLoaderHooksAPI1.TransformSourceHook; -} -export declare namespace NodeLoaderHooksAPI1 { - type ResolveHook = NodeLoaderHooksAPI2.ResolveHook; - type GetFormatHook = (url: string, context: {}, defaultGetFormat: GetFormatHook) => Promise<{ - format: NodeLoaderHooksFormat; - }>; - type TransformSourceHook = (source: string | Buffer, context: { - url: string; - format: NodeLoaderHooksFormat; - }, defaultTransformSource: NodeLoaderHooksAPI1.TransformSourceHook) => Promise<{ - source: string | Buffer; - }>; -} -export interface NodeLoaderHooksAPI2 { - resolve: NodeLoaderHooksAPI2.ResolveHook; - load: NodeLoaderHooksAPI2.LoadHook; -} -export declare namespace NodeLoaderHooksAPI2 { - type ResolveHook = (specifier: string, context: { - conditions?: NodeImportConditions; - importAssertions?: NodeImportAssertions; - parentURL: string; - }, defaultResolve: ResolveHook) => Promise<{ - url: string; - format?: NodeLoaderHooksFormat; - shortCircuit?: boolean; - }>; - type LoadHook = (url: string, context: { - format: NodeLoaderHooksFormat | null | undefined; - importAssertions?: NodeImportAssertions; - }, defaultLoad: NodeLoaderHooksAPI2['load']) => Promise<{ - format: NodeLoaderHooksFormat; - source: string | Buffer | undefined; - shortCircuit?: boolean; - }>; - type NodeImportConditions = unknown; - interface NodeImportAssertions { - type?: 'json'; - } -} -export declare type NodeLoaderHooksFormat = 'builtin' | 'commonjs' | 'dynamic' | 'json' | 'module' | 'wasm'; -export declare type NodeImportConditions = unknown; -export interface NodeImportAssertions { - type?: 'json'; -} -export declare function createEsmHooks(tsNodeService: Service): NodeLoaderHooksAPI1 | NodeLoaderHooksAPI2; diff --git a/node_modules/ts-node/dist/esm.js b/node_modules/ts-node/dist/esm.js deleted file mode 100644 index 33a6b6b..0000000 --- a/node_modules/ts-node/dist/esm.js +++ /dev/null @@ -1,228 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createEsmHooks = exports.registerAndCreateEsmHooks = exports.filterHooksByAPIVersion = void 0; -const index_1 = require("./index"); -const url_1 = require("url"); -const path_1 = require("path"); -const assert = require("assert"); -const util_1 = require("./util"); -const module_1 = require("module"); -// The hooks API changed in node version X so we need to check for backwards compatibility. -const newHooksAPI = (0, util_1.versionGteLt)(process.versions.node, '16.12.0'); -/** @internal */ -function filterHooksByAPIVersion(hooks) { - const { getFormat, load, resolve, transformSource } = hooks; - // Explicit return type to avoid TS's non-ideal inferred type - const hooksAPI = newHooksAPI - ? { resolve, load, getFormat: undefined, transformSource: undefined } - : { resolve, getFormat, transformSource, load: undefined }; - return hooksAPI; -} -exports.filterHooksByAPIVersion = filterHooksByAPIVersion; -/** @internal */ -function registerAndCreateEsmHooks(opts) { - // Automatically performs registration just like `-r ts-node/register` - const tsNodeInstance = (0, index_1.register)(opts); - return createEsmHooks(tsNodeInstance); -} -exports.registerAndCreateEsmHooks = registerAndCreateEsmHooks; -function createEsmHooks(tsNodeService) { - tsNodeService.enableExperimentalEsmLoaderInterop(); - // Custom implementation that considers additional file extensions and automatically adds file extensions - const nodeResolveImplementation = tsNodeService.getNodeEsmResolver(); - const nodeGetFormatImplementation = tsNodeService.getNodeEsmGetFormat(); - const extensions = tsNodeService.extensions; - const hooksAPI = filterHooksByAPIVersion({ - resolve, - load, - getFormat, - transformSource, - }); - function isFileUrlOrNodeStyleSpecifier(parsed) { - // We only understand file:// URLs, but in node, the specifier can be a node-style `./foo` or `foo` - const { protocol } = parsed; - return protocol === null || protocol === 'file:'; - } - /** - * Named "probably" as a reminder that this is a guess. - * node does not explicitly tell us if we're resolving the entrypoint or not. - */ - function isProbablyEntrypoint(specifier, parentURL) { - return parentURL === undefined && specifier.startsWith('file://'); - } - // Side-channel between `resolve()` and `load()` hooks - const rememberIsProbablyEntrypoint = new Set(); - const rememberResolvedViaCommonjsFallback = new Set(); - async function resolve(specifier, context, defaultResolve) { - const defer = async () => { - const r = await defaultResolve(specifier, context, defaultResolve); - return r; - }; - // See: https://github.com/nodejs/node/discussions/41711 - // nodejs will likely implement a similar fallback. Till then, we can do our users a favor and fallback today. - async function entrypointFallback(cb) { - try { - const resolution = await cb(); - if ((resolution === null || resolution === void 0 ? void 0 : resolution.url) && - isProbablyEntrypoint(specifier, context.parentURL)) - rememberIsProbablyEntrypoint.add(resolution.url); - return resolution; - } - catch (esmResolverError) { - if (!isProbablyEntrypoint(specifier, context.parentURL)) - throw esmResolverError; - try { - let cjsSpecifier = specifier; - // Attempt to convert from ESM file:// to CommonJS path - try { - if (specifier.startsWith('file://')) - cjsSpecifier = (0, url_1.fileURLToPath)(specifier); - } - catch { } - const resolution = (0, url_1.pathToFileURL)((0, module_1.createRequire)(process.cwd()).resolve(cjsSpecifier)).toString(); - rememberIsProbablyEntrypoint.add(resolution); - rememberResolvedViaCommonjsFallback.add(resolution); - return { url: resolution, format: 'commonjs' }; - } - catch (commonjsResolverError) { - throw esmResolverError; - } - } - } - return addShortCircuitFlag(async () => { - const parsed = (0, url_1.parse)(specifier); - const { pathname, protocol, hostname } = parsed; - if (!isFileUrlOrNodeStyleSpecifier(parsed)) { - return entrypointFallback(defer); - } - if (protocol !== null && protocol !== 'file:') { - return entrypointFallback(defer); - } - // Malformed file:// URL? We should always see `null` or `''` - if (hostname) { - // TODO file://./foo sets `hostname` to `'.'`. Perhaps we should special-case this. - return entrypointFallback(defer); - } - // pathname is the path to be resolved - return entrypointFallback(() => nodeResolveImplementation.defaultResolve(specifier, context, defaultResolve)); - }); - } - // `load` from new loader hook API (See description at the top of this file) - async function load(url, context, defaultLoad) { - return addShortCircuitFlag(async () => { - var _a; - // If we get a format hint from resolve() on the context then use it - // otherwise call the old getFormat() hook using node's old built-in defaultGetFormat() that ships with ts-node - const format = (_a = context.format) !== null && _a !== void 0 ? _a : (await getFormat(url, context, nodeGetFormatImplementation.defaultGetFormat)).format; - let source = undefined; - if (format !== 'builtin' && format !== 'commonjs') { - // Call the new defaultLoad() to get the source - const { source: rawSource } = await defaultLoad(url, { - ...context, - format, - }, defaultLoad); - if (rawSource === undefined || rawSource === null) { - throw new Error(`Failed to load raw source: Format was '${format}' and url was '${url}''.`); - } - // Emulate node's built-in old defaultTransformSource() so we can re-use the old transformSource() hook - const defaultTransformSource = async (source, _context, _defaultTransformSource) => ({ source }); - // Call the old hook - const { source: transformedSource } = await transformSource(rawSource, { url, format }, defaultTransformSource); - source = transformedSource; - } - return { format, source }; - }); - } - async function getFormat(url, context, defaultGetFormat) { - const defer = (overrideUrl = url) => defaultGetFormat(overrideUrl, context, defaultGetFormat); - // See: https://github.com/nodejs/node/discussions/41711 - // nodejs will likely implement a similar fallback. Till then, we can do our users a favor and fallback today. - async function entrypointFallback(cb) { - try { - return await cb(); - } - catch (getFormatError) { - if (!rememberIsProbablyEntrypoint.has(url)) - throw getFormatError; - return { format: 'commonjs' }; - } - } - const parsed = (0, url_1.parse)(url); - if (!isFileUrlOrNodeStyleSpecifier(parsed)) { - return entrypointFallback(defer); - } - const { pathname } = parsed; - assert(pathname !== null, 'ESM getFormat() hook: URL should never have null pathname'); - const nativePath = (0, url_1.fileURLToPath)(url); - let nodeSays; - // If file has extension not understood by node, then ask node how it would treat the emitted extension. - // E.g. .mts compiles to .mjs, so ask node how to classify an .mjs file. - const ext = (0, path_1.extname)(nativePath); - const tsNodeIgnored = tsNodeService.ignored(nativePath); - const nodeEquivalentExt = extensions.nodeEquivalents.get(ext); - if (nodeEquivalentExt && !tsNodeIgnored) { - nodeSays = await entrypointFallback(() => defer((0, url_1.format)((0, url_1.pathToFileURL)(nativePath + nodeEquivalentExt)))); - } - else { - try { - nodeSays = await entrypointFallback(defer); - } - catch (e) { - if (e instanceof Error && - tsNodeIgnored && - extensions.nodeDoesNotUnderstand.includes(ext)) { - e.message += - `\n\n` + - `Hint:\n` + - `ts-node is configured to ignore this file.\n` + - `If you want ts-node to handle this file, consider enabling the "skipIgnore" option or adjusting your "ignore" patterns.\n` + - `https://typestrong.org/ts-node/docs/scope\n`; - } - throw e; - } - } - // For files compiled by ts-node that node believes are either CJS or ESM, check if we should override that classification - if (!tsNodeService.ignored(nativePath) && - (nodeSays.format === 'commonjs' || nodeSays.format === 'module')) { - const { moduleType } = tsNodeService.moduleTypeClassifier.classifyModuleByModuleTypeOverrides((0, util_1.normalizeSlashes)(nativePath)); - if (moduleType === 'cjs') { - return { format: 'commonjs' }; - } - else if (moduleType === 'esm') { - return { format: 'module' }; - } - } - return nodeSays; - } - async function transformSource(source, context, defaultTransformSource) { - if (source === null || source === undefined) { - throw new Error('No source'); - } - const defer = () => defaultTransformSource(source, context, defaultTransformSource); - const sourceAsString = typeof source === 'string' ? source : source.toString('utf8'); - const { url } = context; - const parsed = (0, url_1.parse)(url); - if (!isFileUrlOrNodeStyleSpecifier(parsed)) { - return defer(); - } - const nativePath = (0, url_1.fileURLToPath)(url); - if (tsNodeService.ignored(nativePath)) { - return defer(); - } - const emittedJs = tsNodeService.compile(sourceAsString, nativePath); - return { source: emittedJs }; - } - return hooksAPI; -} -exports.createEsmHooks = createEsmHooks; -async function addShortCircuitFlag(fn) { - const ret = await fn(); - // Not sure if this is necessary; being lazy. Can revisit in the future. - if (ret == null) - return ret; - return { - ...ret, - shortCircuit: true, - }; -} -//# sourceMappingURL=esm.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/esm.js.map b/node_modules/ts-node/dist/esm.js.map deleted file mode 100644 index 89b91ae..0000000 --- a/node_modules/ts-node/dist/esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"esm.js","sourceRoot":"","sources":["../src/esm.ts"],"names":[],"mappings":";;;AAAA,mCAA6D;AAC7D,6BAMa;AACb,+BAA+B;AAC/B,iCAAiC;AACjC,iCAAwD;AACxD,mCAAuC;AAsFvC,2FAA2F;AAC3F,MAAM,WAAW,GAAG,IAAA,mBAAY,EAAC,OAAO,CAAC,QAAQ,CAAC,IA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AC;QAEtC,IAAI,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YACrC,OAAO,KAAK,EAAE,CAAC;SAChB;QAED,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;QAEpE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAC/B,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AA7RD,wCA6RC;AAED,KAAK,UAAU,mBAAmB,CAAI,EAAoB;IACxD,MAAM,GAAG,GAAG,MAAM,EAAE,EAAE,CAAC;IACvB,yEAAyE;IACzE,IAAI,GAAG,IAAI,IAAI;QAAE,OAAO,GAAG,CAAC;IAC5B,OAAO;QACL,GAAG,GAAG;QACN,YAAY,EAAE,IAAI;KACnB,CAAC;AACJ,CAAC","sourcesContent":["import { register, RegisterOptions, Service } from './index';\nimport {\n parse as parseUrl,\n format as formatUrl,\n UrlWithStringQuery,\n fileURLToPath,\n pathToFileURL,\n} from 'url';\nimport { extname } from 'path';\nimport * as assert from 'assert';\nimport { normalizeSlashes, versionGteLt } from './util';\nimport { createRequire } from 'module';\n\n// Note: On Windows, URLs look like this: file:///D:/dev/@TypeStrong/ts-node-examples/foo.ts\n\n// NOTE ABOUT MULTIPLE EXPERIMENTAL LOADER APIS\n//\n// At the time of writing, this file implements 2x different loader APIs.\n// Node made a breaking change to the loader API in https://github.com/nodejs/node/pull/37468\n//\n// We check the node version number and export either the *old* or the *new* API.\n//\n// Today, we are implementing the *new* API on top of our implementation of the *old* API,\n// which relies on copy-pasted code from the *old* hooks implementation in node.\n//\n// In the future, we will likely invert this: we will copy-paste the *new* API implementation\n// from node, build our implementation of the *new* API on top of it, and implement the *old*\n// hooks API as a shim to the *new* API.\n\nexport interface NodeLoaderHooksAPI1 {\n resolve: NodeLoaderHooksAPI1.ResolveHook;\n getFormat: NodeLoaderHooksAPI1.GetFormatHook;\n transformSource: NodeLoaderHooksAPI1.TransformSourceHook;\n}\nexport namespace NodeLoaderHooksAPI1 {\n export type ResolveHook = NodeLoaderHooksAPI2.ResolveHook;\n export type GetFormatHook = (\n url: string,\n context: {},\n defaultGetFormat: GetFormatHook\n ) => Promise<{ format: NodeLoaderHooksFormat }>;\n export type TransformSourceHook = (\n source: string | Buffer,\n context: { url: string; format: NodeLoaderHooksFormat },\n defaultTransformSource: NodeLoaderHooksAPI1.TransformSourceHook\n ) => Promise<{ source: string | Buffer }>;\n}\n\nexport interface NodeLoaderHooksAPI2 {\n resolve: NodeLoaderHooksAPI2.ResolveHook;\n load: NodeLoaderHooksAPI2.LoadHook;\n}\nexport namespace NodeLoaderHooksAPI2 {\n export type ResolveHook = (\n specifier: string,\n context: {\n conditions?: NodeImportConditions;\n importAssertions?: NodeImportAssertions;\n parentURL: string;\n },\n defaultResolve: ResolveHook\n ) => Promise<{\n url: string;\n format?: NodeLoaderHooksFormat;\n shortCircuit?: boolean;\n }>;\n export type LoadHook = (\n url: string,\n context: {\n format: NodeLoaderHooksFormat | null | undefined;\n importAssertions?: NodeImportAssertions;\n },\n defaultLoad: NodeLoaderHooksAPI2['load']\n ) => Promise<{\n format: NodeLoaderHooksFormat;\n source: string | Buffer | undefined;\n shortCircuit?: boolean;\n }>;\n export type NodeImportConditions = unknown;\n export interface NodeImportAssertions {\n type?: 'json';\n }\n}\n\nexport type NodeLoaderHooksFormat =\n | 'builtin'\n | 'commonjs'\n | 'dynamic'\n | 'json'\n | 'module'\n | 'wasm';\n\nexport type NodeImportConditions = unknown;\nexport interface NodeImportAssertions {\n type?: 'json';\n}\n\n// The hooks API changed in node version X so we need to check for backwards compatibility.\nconst newHooksAPI = versionGteLt(process.versions.node, '16.12.0');\n\n/** @internal */\nexport function filterHooksByAPIVersion(\n hooks: NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2\n): NodeLoaderHooksAPI1 | NodeLoaderHooksAPI2 {\n const { getFormat, load, resolve, transformSource } = hooks;\n // Explicit return type to avoid TS's non-ideal inferred type\n const hooksAPI: NodeLoaderHooksAPI1 | NodeLoaderHooksAPI2 = newHooksAPI\n ? { resolve, load, getFormat: undefined, transformSource: undefined }\n : { resolve, getFormat, transformSource, load: undefined };\n return hooksAPI;\n}\n\n/** @internal */\nexport function registerAndCreateEsmHooks(opts?: RegisterOptions) {\n // Automatically performs registration just like `-r ts-node/register`\n const tsNodeInstance = register(opts);\n\n return createEsmHooks(tsNodeInstance);\n}\n\nexport function createEsmHooks(tsNodeService: Service) {\n tsNodeService.enableExperimentalEsmLoaderInterop();\n\n // Custom implementation that considers additional file extensions and automatically adds file extensions\n const nodeResolveImplementation = tsNodeService.getNodeEsmResolver();\n const nodeGetFormatImplementation = tsNodeService.getNodeEsmGetFormat();\n const extensions = tsNodeService.extensions;\n\n const hooksAPI = filterHooksByAPIVersion({\n resolve,\n load,\n getFormat,\n transformSource,\n });\n\n function isFileUrlOrNodeStyleSpecifier(parsed: UrlWithStringQuery) {\n // We only understand file:// URLs, but in node, the specifier can be a node-style `./foo` or `foo`\n const { protocol } = parsed;\n return protocol === null || protocol === 'file:';\n }\n\n /**\n * Named \"probably\" as a reminder that this is a guess.\n * node does not explicitly tell us if we're resolving the entrypoint or not.\n */\n function isProbablyEntrypoint(specifier: string, parentURL: string) {\n return parentURL === undefined && specifier.startsWith('file://');\n }\n // Side-channel between `resolve()` and `load()` hooks\n const rememberIsProbablyEntrypoint = new Set();\n const rememberResolvedViaCommonjsFallback = new Set();\n\n async function resolve(\n specifier: string,\n context: { parentURL: string },\n defaultResolve: typeof resolve\n ): Promise<{ url: string; format?: NodeLoaderHooksFormat }> {\n const defer = async () => {\n const r = await defaultResolve(specifier, context, defaultResolve);\n return r;\n };\n // See: https://github.com/nodejs/node/discussions/41711\n // nodejs will likely implement a similar fallback. Till then, we can do our users a favor and fallback today.\n async function entrypointFallback(\n cb: () => ReturnType | Awaited>\n ): ReturnType {\n try {\n const resolution = await cb();\n if (\n resolution?.url &&\n isProbablyEntrypoint(specifier, context.parentURL)\n )\n rememberIsProbablyEntrypoint.add(resolution.url);\n return resolution;\n } catch (esmResolverError) {\n if (!isProbablyEntrypoint(specifier, context.parentURL))\n throw esmResolverError;\n try {\n let cjsSpecifier = specifier;\n // Attempt to convert from ESM file:// to CommonJS path\n try {\n if (specifier.startsWith('file://'))\n cjsSpecifier = fileURLToPath(specifier);\n } catch {}\n const resolution = pathToFileURL(\n createRequire(process.cwd()).resolve(cjsSpecifier)\n ).toString();\n rememberIsProbablyEntrypoint.add(resolution);\n rememberResolvedViaCommonjsFallback.add(resolution);\n return { url: resolution, format: 'commonjs' };\n } catch (commonjsResolverError) {\n throw esmResolverError;\n }\n }\n }\n\n return addShortCircuitFlag(async () => {\n const parsed = parseUrl(specifier);\n const { pathname, protocol, hostname } = parsed;\n\n if (!isFileUrlOrNodeStyleSpecifier(parsed)) {\n return entrypointFallback(defer);\n }\n\n if (protocol !== null && protocol !== 'file:') {\n return entrypointFallback(defer);\n }\n\n // Malformed file:// URL? We should always see `null` or `''`\n if (hostname) {\n // TODO file://./foo sets `hostname` to `'.'`. Perhaps we should special-case this.\n return entrypointFallback(defer);\n }\n\n // pathname is the path to be resolved\n\n return entrypointFallback(() =>\n nodeResolveImplementation.defaultResolve(\n specifier,\n context,\n defaultResolve\n )\n );\n });\n }\n\n // `load` from new loader hook API (See description at the top of this file)\n async function load(\n url: string,\n context: {\n format: NodeLoaderHooksFormat | null | undefined;\n importAssertions?: NodeLoaderHooksAPI2.NodeImportAssertions;\n },\n defaultLoad: typeof load\n ): Promise<{\n format: NodeLoaderHooksFormat;\n source: string | Buffer | undefined;\n }> {\n return addShortCircuitFlag(async () => {\n // If we get a format hint from resolve() on the context then use it\n // otherwise call the old getFormat() hook using node's old built-in defaultGetFormat() that ships with ts-node\n const format =\n context.format ??\n (\n await getFormat(\n url,\n context,\n nodeGetFormatImplementation.defaultGetFormat\n )\n ).format;\n\n let source = undefined;\n if (format !== 'builtin' && format !== 'commonjs') {\n // Call the new defaultLoad() to get the source\n const { source: rawSource } = await defaultLoad(\n url,\n {\n ...context,\n format,\n },\n defaultLoad\n );\n\n if (rawSource === undefined || rawSource === null) {\n throw new Error(\n `Failed to load raw source: Format was '${format}' and url was '${url}''.`\n );\n }\n\n // Emulate node's built-in old defaultTransformSource() so we can re-use the old transformSource() hook\n const defaultTransformSource: typeof transformSource = async (\n source,\n _context,\n _defaultTransformSource\n ) => ({ source });\n\n // Call the old hook\n const { source: transformedSource } = await transformSource(\n rawSource,\n { url, format },\n defaultTransformSource\n );\n source = transformedSource;\n }\n\n return { format, source };\n });\n }\n\n async function getFormat(\n url: string,\n context: {},\n defaultGetFormat: typeof getFormat\n ): Promise<{ format: NodeLoaderHooksFormat }> {\n const defer = (overrideUrl: string = url) =>\n defaultGetFormat(overrideUrl, context, defaultGetFormat);\n\n // See: https://github.com/nodejs/node/discussions/41711\n // nodejs will likely implement a similar fallback. Till then, we can do our users a favor and fallback today.\n async function entrypointFallback(\n cb: () => ReturnType\n ): ReturnType {\n try {\n return await cb();\n } catch (getFormatError) {\n if (!rememberIsProbablyEntrypoint.has(url)) throw getFormatError;\n return { format: 'commonjs' };\n }\n }\n\n const parsed = parseUrl(url);\n\n if (!isFileUrlOrNodeStyleSpecifier(parsed)) {\n return entrypointFallback(defer);\n }\n\n const { pathname } = parsed;\n assert(\n pathname !== null,\n 'ESM getFormat() hook: URL should never have null pathname'\n );\n\n const nativePath = fileURLToPath(url);\n\n let nodeSays: { format: NodeLoaderHooksFormat };\n\n // If file has extension not understood by node, then ask node how it would treat the emitted extension.\n // E.g. .mts compiles to .mjs, so ask node how to classify an .mjs file.\n const ext = extname(nativePath);\n const tsNodeIgnored = tsNodeService.ignored(nativePath);\n const nodeEquivalentExt = extensions.nodeEquivalents.get(ext);\n if (nodeEquivalentExt && !tsNodeIgnored) {\n nodeSays = await entrypointFallback(() =>\n defer(formatUrl(pathToFileURL(nativePath + nodeEquivalentExt)))\n );\n } else {\n try {\n nodeSays = await entrypointFallback(defer);\n } catch (e) {\n if (\n e instanceof Error &&\n tsNodeIgnored &&\n extensions.nodeDoesNotUnderstand.includes(ext)\n ) {\n e.message +=\n `\\n\\n` +\n `Hint:\\n` +\n `ts-node is configured to ignore this file.\\n` +\n `If you want ts-node to handle this file, consider enabling the \"skipIgnore\" option or adjusting your \"ignore\" patterns.\\n` +\n `https://typestrong.org/ts-node/docs/scope\\n`;\n }\n throw e;\n }\n }\n // For files compiled by ts-node that node believes are either CJS or ESM, check if we should override that classification\n if (\n !tsNodeService.ignored(nativePath) &&\n (nodeSays.format === 'commonjs' || nodeSays.format === 'module')\n ) {\n const { moduleType } =\n tsNodeService.moduleTypeClassifier.classifyModuleByModuleTypeOverrides(\n normalizeSlashes(nativePath)\n );\n if (moduleType === 'cjs') {\n return { format: 'commonjs' };\n } else if (moduleType === 'esm') {\n return { format: 'module' };\n }\n }\n return nodeSays;\n }\n\n async function transformSource(\n source: string | Buffer,\n context: { url: string; format: NodeLoaderHooksFormat },\n defaultTransformSource: typeof transformSource\n ): Promise<{ source: string | Buffer }> {\n if (source === null || source === undefined) {\n throw new Error('No source');\n }\n\n const defer = () =>\n defaultTransformSource(source, context, defaultTransformSource);\n\n const sourceAsString =\n typeof source === 'string' ? source : source.toString('utf8');\n\n const { url } = context;\n const parsed = parseUrl(url);\n\n if (!isFileUrlOrNodeStyleSpecifier(parsed)) {\n return defer();\n }\n const nativePath = fileURLToPath(url);\n\n if (tsNodeService.ignored(nativePath)) {\n return defer();\n }\n\n const emittedJs = tsNodeService.compile(sourceAsString, nativePath);\n\n return { source: emittedJs };\n }\n\n return hooksAPI;\n}\n\nasync function addShortCircuitFlag(fn: () => Promise) {\n const ret = await fn();\n // Not sure if this is necessary; being lazy. Can revisit in the future.\n if (ret == null) return ret;\n return {\n ...ret,\n shortCircuit: true,\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/file-extensions.d.ts b/node_modules/ts-node/dist/file-extensions.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/file-extensions.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/file-extensions.js b/node_modules/ts-node/dist/file-extensions.js deleted file mode 100644 index e148e04..0000000 --- a/node_modules/ts-node/dist/file-extensions.js +++ /dev/null @@ -1,133 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getExtensions = void 0; -const util_1 = require("./util"); -const nodeEquivalents = new Map([ - ['.ts', '.js'], - ['.tsx', '.js'], - ['.jsx', '.js'], - ['.mts', '.mjs'], - ['.cts', '.cjs'], -]); -const tsResolverEquivalents = new Map([ - ['.ts', ['.js']], - ['.tsx', ['.js', '.jsx']], - ['.mts', ['.mjs']], - ['.cts', ['.cjs']], -]); -// All extensions understood by vanilla node -const vanillaNodeExtensions = [ - '.js', - '.json', - '.node', - '.mjs', - '.cjs', -]; -// Extensions added by vanilla node's require() if you omit them: -// js, json, node -// Extensions added by vanilla node if you omit them with --experimental-specifier-resolution=node -// js, json, node, mjs -// Extensions added by ESM codepath's legacy package.json "main" resolver -// js, json, node (not mjs!) -const nodeDoesNotUnderstand = [ - '.ts', - '.tsx', - '.jsx', - '.cts', - '.mts', -]; -/** - * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS] - * @internal - */ -function getExtensions(config, options, tsVersion) { - // TS 4.5 is first version to understand .cts, .mts, .cjs, and .mjs extensions - const tsSupportsMtsCtsExts = (0, util_1.versionGteLt)(tsVersion, '4.5.0'); - const requiresHigherTypescriptVersion = []; - if (!tsSupportsMtsCtsExts) - requiresHigherTypescriptVersion.push('.cts', '.cjs', '.mts', '.mjs'); - const allPossibleExtensionsSortedByPreference = Array.from(new Set([ - ...(options.preferTsExts ? nodeDoesNotUnderstand : []), - ...vanillaNodeExtensions, - ...nodeDoesNotUnderstand, - ])); - const compiledJsUnsorted = ['.ts']; - const compiledJsxUnsorted = []; - if (config.options.jsx) - compiledJsxUnsorted.push('.tsx'); - if (tsSupportsMtsCtsExts) - compiledJsUnsorted.push('.mts', '.cts'); - if (config.options.allowJs) { - compiledJsUnsorted.push('.js'); - if (config.options.jsx) - compiledJsxUnsorted.push('.jsx'); - if (tsSupportsMtsCtsExts) - compiledJsUnsorted.push('.mjs', '.cjs'); - } - const compiledUnsorted = [...compiledJsUnsorted, ...compiledJsxUnsorted]; - const compiled = allPossibleExtensionsSortedByPreference.filter((ext) => compiledUnsorted.includes(ext)); - const compiledNodeDoesNotUnderstand = nodeDoesNotUnderstand.filter((ext) => compiled.includes(ext)); - /** - * TS's resolver can resolve foo.js to foo.ts, by replacing .js extension with several source extensions. - * IMPORTANT: Must preserve ordering according to preferTsExts! - * Must include the .js/.mjs/.cjs extension in the array! - * This affects resolution behavior! - * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS] - */ - const r = allPossibleExtensionsSortedByPreference.filter((ext) => [...compiledUnsorted, '.js', '.mjs', '.cjs', '.mts', '.cts'].includes(ext)); - const replacementsForJs = r.filter((ext) => ['.js', '.jsx', '.ts', '.tsx'].includes(ext)); - const replacementsForJsx = r.filter((ext) => ['.jsx', '.tsx'].includes(ext)); - const replacementsForMjs = r.filter((ext) => ['.mjs', '.mts'].includes(ext)); - const replacementsForCjs = r.filter((ext) => ['.cjs', '.cts'].includes(ext)); - const replacementsForJsOrMjs = r.filter((ext) => ['.js', '.jsx', '.ts', '.tsx', '.mjs', '.mts'].includes(ext)); - // Node allows omitting .js or .mjs extension in certain situations (CJS, ESM w/experimental flag) - // So anything that compiles to .js or .mjs can also be omitted. - const experimentalSpecifierResolutionAddsIfOmitted = Array.from(new Set([...replacementsForJsOrMjs, '.json', '.node'])); - // Same as above, except node curiuosly doesn't do .mjs here - const legacyMainResolveAddsIfOmitted = Array.from(new Set([...replacementsForJs, '.json', '.node'])); - return { - /** All file extensions we transform, ordered by resolution preference according to preferTsExts */ - compiled, - /** Resolved extensions that vanilla node will not understand; we should handle them */ - nodeDoesNotUnderstand, - /** Like the above, but only the ones we're compiling */ - compiledNodeDoesNotUnderstand, - /** - * Mapping from extensions understood by tsc to the equivalent for node, - * as far as getFormat is concerned. - */ - nodeEquivalents, - /** - * Mapping from extensions rejected by TSC in import specifiers, to the - * possible alternatives that TS's resolver will accept. - * - * When we allow users to opt-in to .ts extensions in import specifiers, TS's - * resolver requires us to replace the .ts extensions with .js alternatives. - * Otherwise, resolution fails. - * - * Note TS's resolver is only used by, and only required for, typechecking. - * This is separate from node's resolver, which we hook separately and which - * does not require this mapping. - */ - tsResolverEquivalents, - /** - * Extensions that we can support if the user upgrades their typescript version. - * Used when raising hints. - */ - requiresHigherTypescriptVersion, - /** - * --experimental-specifier-resolution=node will add these extensions. - */ - experimentalSpecifierResolutionAddsIfOmitted, - /** - * ESM loader will add these extensions to package.json "main" field - */ - legacyMainResolveAddsIfOmitted, - replacementsForMjs, - replacementsForCjs, - replacementsForJsx, - replacementsForJs, - }; -} -exports.getExtensions = getExtensions; -//# sourceMappingURL=file-extensions.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/file-extensions.js.map b/node_modules/ts-node/dist/file-extensions.js.map deleted file mode 100644 index 6b99baa..0000000 --- a/node_modules/ts-node/dist/file-extensions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"file-extensions.js","sourceRoot":"","sources":["../src/file-extensions.ts"],"names":[],"mappings":";;;AAEA,iCAAsC;AAWtC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAiB;IAC9C,CAAC,KAAK,EAAE,KAAK,CAAC;IACd,CAAC,MAAM,EAAE,KAAK,CAAC;IACf,CAAC,MAAM,EAAE,KAAK,CAAC;IACf,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,MAAM,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAA4B;IAC/D,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;IAChB,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACzB,CAAC,MAAM,EA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,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7E,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7E,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAC9C,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAC7D,CAAC;IAEF,kGAAkG;IAClG,gEAAgE;IAChE,MAAM,4CAA4C,GAAG,KAAK,CAAC,IAAI,CAC7D,IAAI,GAAG,CAAC,CAAC,GAAG,sBAAsB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CACvD,CAAC;IACF,4DAA4D;IAC5D,MAAM,8BAA8B,GAAG,KAAK,CAAC,IAAI,CAC/C,IAAI,GAAG,CAAC,CAAC,GAAG,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAClD,CAAC;IAEF,OAAO;QACL,mGAAmG;QACnG,QAAQ;QACR,uFAAuF;QACvF,qBAAqB;QACrB,wDAAwD;QACxD,6BAA6B;QAC7B;;;WAGG;QACH,eAAe;QACf;;;;;;;;;;;WAWG;QACH,qBAAqB;QACrB;;;WAGG;QACH,+BAA+B;QAC/B;;WAEG;QACH,4CAA4C;QAC5C;;WAEG;QACH,8BAA8B;QAC9B,kBAAkB;QAClB,kBAAkB;QAClB,kBAAkB;QAClB,iBAAiB;KAClB,CAAC;AACJ,CAAC;AAjHD,sCAiHC","sourcesContent":["import type * as _ts from 'typescript';\nimport type { RegisterOptions } from '.';\nimport { versionGteLt } from './util';\n\n/**\n * Centralized specification of how we deal with file extensions based on\n * project options:\n * which ones we do/don't support, in what situations, etc. These rules drive\n * logic elsewhere.\n * @internal\n * */\nexport type Extensions = ReturnType;\n\nconst nodeEquivalents = new Map([\n ['.ts', '.js'],\n ['.tsx', '.js'],\n ['.jsx', '.js'],\n ['.mts', '.mjs'],\n ['.cts', '.cjs'],\n]);\n\nconst tsResolverEquivalents = new Map([\n ['.ts', ['.js']],\n ['.tsx', ['.js', '.jsx']],\n ['.mts', ['.mjs']],\n ['.cts', ['.cjs']],\n]);\n\n// All extensions understood by vanilla node\nconst vanillaNodeExtensions: readonly string[] = [\n '.js',\n '.json',\n '.node',\n '.mjs',\n '.cjs',\n];\n\n// Extensions added by vanilla node's require() if you omit them:\n// js, json, node\n// Extensions added by vanilla node if you omit them with --experimental-specifier-resolution=node\n// js, json, node, mjs\n// Extensions added by ESM codepath's legacy package.json \"main\" resolver\n// js, json, node (not mjs!)\n\nconst nodeDoesNotUnderstand: readonly string[] = [\n '.ts',\n '.tsx',\n '.jsx',\n '.cts',\n '.mts',\n];\n\n/**\n * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]\n * @internal\n */\nexport function getExtensions(\n config: _ts.ParsedCommandLine,\n options: RegisterOptions,\n tsVersion: string\n) {\n // TS 4.5 is first version to understand .cts, .mts, .cjs, and .mjs extensions\n const tsSupportsMtsCtsExts = versionGteLt(tsVersion, '4.5.0');\n\n const requiresHigherTypescriptVersion: string[] = [];\n if (!tsSupportsMtsCtsExts)\n requiresHigherTypescriptVersion.push('.cts', '.cjs', '.mts', '.mjs');\n\n const allPossibleExtensionsSortedByPreference = Array.from(\n new Set([\n ...(options.preferTsExts ? nodeDoesNotUnderstand : []),\n ...vanillaNodeExtensions,\n ...nodeDoesNotUnderstand,\n ])\n );\n\n const compiledJsUnsorted: string[] = ['.ts'];\n const compiledJsxUnsorted: string[] = [];\n\n if (config.options.jsx) compiledJsxUnsorted.push('.tsx');\n if (tsSupportsMtsCtsExts) compiledJsUnsorted.push('.mts', '.cts');\n if (config.options.allowJs) {\n compiledJsUnsorted.push('.js');\n if (config.options.jsx) compiledJsxUnsorted.push('.jsx');\n if (tsSupportsMtsCtsExts) compiledJsUnsorted.push('.mjs', '.cjs');\n }\n\n const compiledUnsorted = [...compiledJsUnsorted, ...compiledJsxUnsorted];\n const compiled = allPossibleExtensionsSortedByPreference.filter((ext) =>\n compiledUnsorted.includes(ext)\n );\n\n const compiledNodeDoesNotUnderstand = nodeDoesNotUnderstand.filter((ext) =>\n compiled.includes(ext)\n );\n\n /**\n * TS's resolver can resolve foo.js to foo.ts, by replacing .js extension with several source extensions.\n * IMPORTANT: Must preserve ordering according to preferTsExts!\n * Must include the .js/.mjs/.cjs extension in the array!\n * This affects resolution behavior!\n * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]\n */\n const r = allPossibleExtensionsSortedByPreference.filter((ext) =>\n [...compiledUnsorted, '.js', '.mjs', '.cjs', '.mts', '.cts'].includes(ext)\n );\n const replacementsForJs = r.filter((ext) =>\n ['.js', '.jsx', '.ts', '.tsx'].includes(ext)\n );\n const replacementsForJsx = r.filter((ext) => ['.jsx', '.tsx'].includes(ext));\n const replacementsForMjs = r.filter((ext) => ['.mjs', '.mts'].includes(ext));\n const replacementsForCjs = r.filter((ext) => ['.cjs', '.cts'].includes(ext));\n const replacementsForJsOrMjs = r.filter((ext) =>\n ['.js', '.jsx', '.ts', '.tsx', '.mjs', '.mts'].includes(ext)\n );\n\n // Node allows omitting .js or .mjs extension in certain situations (CJS, ESM w/experimental flag)\n // So anything that compiles to .js or .mjs can also be omitted.\n const experimentalSpecifierResolutionAddsIfOmitted = Array.from(\n new Set([...replacementsForJsOrMjs, '.json', '.node'])\n );\n // Same as above, except node curiuosly doesn't do .mjs here\n const legacyMainResolveAddsIfOmitted = Array.from(\n new Set([...replacementsForJs, '.json', '.node'])\n );\n\n return {\n /** All file extensions we transform, ordered by resolution preference according to preferTsExts */\n compiled,\n /** Resolved extensions that vanilla node will not understand; we should handle them */\n nodeDoesNotUnderstand,\n /** Like the above, but only the ones we're compiling */\n compiledNodeDoesNotUnderstand,\n /**\n * Mapping from extensions understood by tsc to the equivalent for node,\n * as far as getFormat is concerned.\n */\n nodeEquivalents,\n /**\n * Mapping from extensions rejected by TSC in import specifiers, to the\n * possible alternatives that TS's resolver will accept.\n *\n * When we allow users to opt-in to .ts extensions in import specifiers, TS's\n * resolver requires us to replace the .ts extensions with .js alternatives.\n * Otherwise, resolution fails.\n *\n * Note TS's resolver is only used by, and only required for, typechecking.\n * This is separate from node's resolver, which we hook separately and which\n * does not require this mapping.\n */\n tsResolverEquivalents,\n /**\n * Extensions that we can support if the user upgrades their typescript version.\n * Used when raising hints.\n */\n requiresHigherTypescriptVersion,\n /**\n * --experimental-specifier-resolution=node will add these extensions.\n */\n experimentalSpecifierResolutionAddsIfOmitted,\n /**\n * ESM loader will add these extensions to package.json \"main\" field\n */\n legacyMainResolveAddsIfOmitted,\n replacementsForMjs,\n replacementsForCjs,\n replacementsForJsx,\n replacementsForJs,\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/index.d.ts b/node_modules/ts-node/dist/index.d.ts deleted file mode 100644 index 8364b0e..0000000 --- a/node_modules/ts-node/dist/index.d.ts +++ /dev/null @@ -1,332 +0,0 @@ -import { BaseError } from 'make-error'; -import type * as _ts from 'typescript'; -import type { TSCommon } from './ts-compiler-types'; -import type { createEsmHooks as createEsmHooksFn } from './esm'; -export { TSCommon }; -export { createRepl, CreateReplOptions, ReplService, EvalAwarePartialHost, } from './repl'; -export type { TranspilerModule, TranspilerFactory, CreateTranspilerOptions, TranspileOutput, TranspileOptions, Transpiler, } from './transpilers/types'; -export type { NodeLoaderHooksAPI1, NodeLoaderHooksAPI2, NodeLoaderHooksFormat, } from './esm'; -/** - * Registered `ts-node` instance information. - */ -export declare const REGISTER_INSTANCE: unique symbol; -/** - * Expose `REGISTER_INSTANCE` information on node.js `process`. - */ -declare global { - namespace NodeJS { - interface Process { - [REGISTER_INSTANCE]?: Service; - } - } -} -/** - * Export the current version. - */ -export declare const VERSION: any; -/** - * Options for creating a new TypeScript compiler instance. - - * @category Basic - */ -export interface CreateOptions { - /** - * Behave as if invoked within this working directory. Roughly equivalent to `cd $dir && ts-node ...` - * - * @default process.cwd() - */ - cwd?: string; - /** - * Legacy alias for `cwd` - * - * @deprecated use `projectSearchDir` or `cwd` - */ - dir?: string; - /** - * Emit output files into `.ts-node` directory. - * - * @default false - */ - emit?: boolean; - /** - * Scope compiler to files within `scopeDir`. - * - * @default false - */ - scope?: boolean; - /** - * @default First of: `tsconfig.json` "rootDir" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded. - */ - scopeDir?: string; - /** - * Use pretty diagnostic formatter. - * - * @default false - */ - pretty?: boolean; - /** - * Use TypeScript's faster `transpileModule`. - * - * @default false - */ - transpileOnly?: boolean; - /** - * **DEPRECATED** Specify type-check is enabled (e.g. `transpileOnly == false`). - * - * @default true - */ - typeCheck?: boolean; - /** - * Use TypeScript's compiler host API instead of the language service API. - * - * @default false - */ - compilerHost?: boolean; - /** - * Logs TypeScript errors to stderr instead of throwing exceptions. - * - * @default false - */ - logError?: boolean; - /** - * Load "files" and "include" from `tsconfig.json` on startup. - * - * Default is to override `tsconfig.json` "files" and "include" to only include the entrypoint script. - * - * @default false - */ - files?: boolean; - /** - * Specify a custom TypeScript compiler. - * - * @default "typescript" - */ - compiler?: string; - /** - * Specify a custom transpiler for use with transpileOnly - */ - transpiler?: string | [string, object]; - /** - * Transpile with swc instead of the TypeScript compiler, and skip typechecking. - * - * Equivalent to setting both `transpileOnly: true` and `transpiler: 'ts-node/transpilers/swc'` - * - * For complete instructions: https://typestrong.org/ts-node/docs/transpilers - */ - swc?: boolean; - /** - * Paths which should not be compiled. - * - * Each string in the array is converted to a regular expression via `new RegExp()` and tested against source paths prior to compilation. - * - * Source paths are normalized to posix-style separators, relative to the directory containing `tsconfig.json` or to cwd if no `tsconfig.json` is loaded. - * - * Default is to ignore all node_modules subdirectories. - * - * @default ["(?:^|/)node_modules/"] - */ - ignore?: string[]; - /** - * Path to TypeScript config file or directory containing a `tsconfig.json`. - * Similar to the `tsc --project` flag: https://www.typescriptlang.org/docs/handbook/compiler-options.html - */ - project?: string; - /** - * Search for TypeScript config file (`tsconfig.json`) in this or parent directories. - */ - projectSearchDir?: string; - /** - * Skip project config resolution and loading. - * - * @default false - */ - skipProject?: boolean; - /** - * Skip ignore check, so that compilation will be attempted for all files with matching extensions. - * - * @default false - */ - skipIgnore?: boolean; - /** - * JSON object to merge with TypeScript `compilerOptions`. - * - * @allOf [{"$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json#definitions/compilerOptionsDefinition/properties/compilerOptions"}] - */ - compilerOptions?: object; - /** - * Ignore TypeScript warnings by diagnostic code. - */ - ignoreDiagnostics?: Array; - /** - * Modules to require, like node's `--require` flag. - * - * If specified in `tsconfig.json`, the modules will be resolved relative to the `tsconfig.json` file. - * - * If specified programmatically, each input string should be pre-resolved to an absolute path for - * best results. - */ - require?: Array; - readFile?: (path: string) => string | undefined; - fileExists?: (path: string) => boolean; - transformers?: _ts.CustomTransformers | ((p: _ts.Program) => _ts.CustomTransformers); - /** - * Allows the usage of top level await in REPL. - * - * Uses node's implementation which accomplishes this with an AST syntax transformation. - * - * Enabled by default when tsconfig target is es2018 or above. Set to false to disable. - * - * **Note**: setting to `true` when tsconfig target is too low will throw an Error. Leave as `undefined` - * to get default, automatic behavior. - */ - experimentalReplAwait?: boolean; - /** - * Override certain paths to be compiled and executed as CommonJS or ECMAScript modules. - * When overridden, the tsconfig "module" and package.json "type" fields are overridden, and - * the file extension is ignored. - * This is useful if you cannot use .mts, .cts, .mjs, or .cjs file extensions; - * it achieves the same effect. - * - * Each key is a glob pattern following the same rules as tsconfig's "include" array. - * When multiple patterns match the same file, the last pattern takes precedence. - * - * `cjs` overrides matches files to compile and execute as CommonJS. - * `esm` overrides matches files to compile and execute as native ECMAScript modules. - * `package` overrides either of the above to default behavior, which obeys package.json "type" and - * tsconfig.json "module" options. - */ - moduleTypes?: ModuleTypes; - /** - * A function to collect trace messages from the TypeScript compiler, for example when `traceResolution` is enabled. - * - * @default console.log - */ - tsTrace?: (str: string) => void; - /** - * Enable native ESM support. - * - * For details, see https://typestrong.org/ts-node/docs/imports#native-ecmascript-modules - */ - esm?: boolean; - /** - * Re-order file extensions so that TypeScript imports are preferred. - * - * For example, when both `index.js` and `index.ts` exist, enabling this option causes `require('./index')` to resolve to `index.ts` instead of `index.js` - * - * @default false - */ - preferTsExts?: boolean; - /** - * Like node's `--experimental-specifier-resolution`, , but can also be set in your `tsconfig.json` for convenience. - * - * For details, see https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm - */ - experimentalSpecifierResolution?: 'node' | 'explicit'; - /** - * Allow using voluntary `.ts` file extension in import specifiers. - * - * Typically, in ESM projects, import specifiers must have an emit extension, `.js`, `.cjs`, or `.mjs`, - * and we automatically map to the corresponding `.ts`, `.cts`, or `.mts` source file. This is the - * recommended approach. - * - * However, if you really want to use `.ts` in import specifiers, and are aware that this may - * break tooling, you can enable this flag. - */ - experimentalTsImportSpecifiers?: boolean; -} -export declare type ModuleTypes = Record; -export declare type ModuleTypeOverride = 'cjs' | 'esm' | 'package'; -/** - * Options for registering a TypeScript compiler instance globally. - - * @category Basic - */ -export interface RegisterOptions extends CreateOptions { - /** - * Enable experimental features that re-map imports and require calls to support: - * `baseUrl`, `paths`, `rootDirs`, `.js` to `.ts` file extension mappings, - * `outDir` to `rootDir` mappings for composite projects and monorepos. - * - * For details, see https://github.com/TypeStrong/ts-node/issues/1514 - */ - experimentalResolver?: boolean; -} -export declare type ExperimentalSpecifierResolution = 'node' | 'explicit'; -/** - * Must be an interface to support `typescript-json-schema`. - */ -export interface TsConfigOptions extends Omit { -} -/** - * Information retrieved from type info check. - */ -export interface TypeInfo { - name: string; - comment: string; -} -/** - * TypeScript diagnostics error. - */ -export declare class TSError extends BaseError { - diagnosticCodes: number[]; - name: string; - diagnosticText: string; - diagnostics: ReadonlyArray<_ts.Diagnostic>; - constructor(diagnosticText: string, diagnosticCodes: number[], diagnostics?: ReadonlyArray<_ts.Diagnostic>); -} -/** - * Primary ts-node service, which wraps the TypeScript API and can compile TypeScript to JavaScript - */ -export interface Service { - ts: TSCommon; - config: _ts.ParsedCommandLine; - options: RegisterOptions; - enabled(enabled?: boolean): boolean; - ignored(fileName: string): boolean; - compile(code: string, fileName: string, lineOffset?: number): string; - getTypeInfo(code: string, fileName: string, position: number): TypeInfo; -} -/** - * Re-export of `Service` interface for backwards-compatibility - * @deprecated use `Service` instead - * @see {Service} - */ -export declare type Register = Service; -/** - * Create a new TypeScript compiler instance and register it onto node.js - * - * @category Basic - */ -export declare function register(opts?: RegisterOptions): Service; -/** - * Register TypeScript compiler instance onto node.js - - * @category Basic - */ -export declare function register(service: Service): Service; -/** - * Create TypeScript compiler instance. - * - * @category Basic - */ -export declare function create(rawOptions?: CreateOptions): Service; -/** - * Create an implementation of node's ESM loader hooks. - * - * This may be useful if you - * want to wrap or compose the loader hooks to add additional functionality or - * combine with another loader. - * - * Node changed the hooks API, so there are two possible APIs. This function - * detects your node version and returns the appropriate API. - * - * @category ESM Loader - */ -export declare const createEsmHooks: typeof createEsmHooksFn; -/** - * When using `module: nodenext` or `module: node12`, there are two possible styles of emit depending in file extension or package.json "type": - * - * - CommonJS with dynamic imports preserved (not transformed into `require()` calls) - * - ECMAScript modules with `import foo = require()` transformed into `require = createRequire(); const foo = require()` - */ -export declare type NodeModuleEmitKind = 'nodeesm' | 'nodecjs'; diff --git a/node_modules/ts-node/dist/index.js b/node_modules/ts-node/dist/index.js deleted file mode 100644 index c03afbf..0000000 --- a/node_modules/ts-node/dist/index.js +++ /dev/null @@ -1,953 +0,0 @@ -"use strict"; -var _a, _b; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createEsmHooks = exports.createFromPreloadedConfig = exports.create = exports.register = exports.TSError = exports.DEFAULTS = exports.VERSION = exports.debug = exports.INSPECT_CUSTOM = exports.env = exports.REGISTER_INSTANCE = exports.createRepl = void 0; -const path_1 = require("path"); -const module_1 = require("module"); -const util = require("util"); -const url_1 = require("url"); -const make_error_1 = require("make-error"); -const util_1 = require("./util"); -const configuration_1 = require("./configuration"); -const module_type_classifier_1 = require("./module-type-classifier"); -const resolver_functions_1 = require("./resolver-functions"); -const cjs_resolve_hooks_1 = require("./cjs-resolve-hooks"); -const node_module_type_classifier_1 = require("./node-module-type-classifier"); -const file_extensions_1 = require("./file-extensions"); -const ts_transpile_module_1 = require("./ts-transpile-module"); -var repl_1 = require("./repl"); -Object.defineProperty(exports, "createRepl", { enumerable: true, get: function () { return repl_1.createRepl; } }); -/** - * Does this version of node obey the package.json "type" field - * and throw ERR_REQUIRE_ESM when attempting to require() an ESM modules. - */ -const engineSupportsPackageTypeField = parseInt(process.versions.node.split('.')[0], 10) >= 12; -/** - * Assert that script can be loaded as CommonJS when we attempt to require it. - * If it should be loaded as ESM, throw ERR_REQUIRE_ESM like node does. - * - * Loaded conditionally so we don't need to support older node versions - */ -let assertScriptCanLoadAsCJS = engineSupportsPackageTypeField - ? require('../dist-raw/node-internal-modules-cjs-loader').assertScriptCanLoadAsCJSImpl - : () => { - /* noop */ - }; -/** - * Registered `ts-node` instance information. - */ -exports.REGISTER_INSTANCE = Symbol.for('ts-node.register.instance'); -/** @internal */ -exports.env = process.env; -/** - * @internal - */ -exports.INSPECT_CUSTOM = util.inspect.custom || 'inspect'; -/** - * Debugging `ts-node`. - */ -const shouldDebug = (0, util_1.yn)(exports.env.TS_NODE_DEBUG); -/** @internal */ -exports.debug = shouldDebug - ? (...args) => console.log(`[ts-node ${new Date().toISOString()}]`, ...args) - : () => undefined; -const debugFn = shouldDebug - ? (key, fn) => { - let i = 0; - return (x) => { - (0, exports.debug)(key, x, ++i); - return fn(x); - }; - } - : (_, fn) => fn; -/** - * Export the current version. - */ -exports.VERSION = require('../package.json').version; -/** - * Default register options, including values specified via environment - * variables. - * @internal - */ -exports.DEFAULTS = { - cwd: (_a = exports.env.TS_NODE_CWD) !== null && _a !== void 0 ? _a : exports.env.TS_NODE_DIR, - emit: (0, util_1.yn)(exports.env.TS_NODE_EMIT), - scope: (0, util_1.yn)(exports.env.TS_NODE_SCOPE), - scopeDir: exports.env.TS_NODE_SCOPE_DIR, - files: (0, util_1.yn)(exports.env.TS_NODE_FILES), - pretty: (0, util_1.yn)(exports.env.TS_NODE_PRETTY), - compiler: exports.env.TS_NODE_COMPILER, - compilerOptions: (0, util_1.parse)(exports.env.TS_NODE_COMPILER_OPTIONS), - ignore: (0, util_1.split)(exports.env.TS_NODE_IGNORE), - project: exports.env.TS_NODE_PROJECT, - skipProject: (0, util_1.yn)(exports.env.TS_NODE_SKIP_PROJECT), - skipIgnore: (0, util_1.yn)(exports.env.TS_NODE_SKIP_IGNORE), - preferTsExts: (0, util_1.yn)(exports.env.TS_NODE_PREFER_TS_EXTS), - ignoreDiagnostics: (0, util_1.split)(exports.env.TS_NODE_IGNORE_DIAGNOSTICS), - transpileOnly: (0, util_1.yn)(exports.env.TS_NODE_TRANSPILE_ONLY), - typeCheck: (0, util_1.yn)(exports.env.TS_NODE_TYPE_CHECK), - compilerHost: (0, util_1.yn)(exports.env.TS_NODE_COMPILER_HOST), - logError: (0, util_1.yn)(exports.env.TS_NODE_LOG_ERROR), - experimentalReplAwait: (_b = (0, util_1.yn)(exports.env.TS_NODE_EXPERIMENTAL_REPL_AWAIT)) !== null && _b !== void 0 ? _b : undefined, - tsTrace: console.log.bind(console), -}; -/** - * TypeScript diagnostics error. - */ -class TSError extends make_error_1.BaseError { - constructor(diagnosticText, diagnosticCodes, diagnostics = []) { - super(`⨯ Unable to compile TypeScript:\n${diagnosticText}`); - this.diagnosticCodes = diagnosticCodes; - this.name = 'TSError'; - Object.defineProperty(this, 'diagnosticText', { - configurable: true, - writable: true, - value: diagnosticText, - }); - Object.defineProperty(this, 'diagnostics', { - configurable: true, - writable: true, - value: diagnostics, - }); - } - /** - * @internal - */ - [exports.INSPECT_CUSTOM]() { - return this.diagnosticText; - } -} -exports.TSError = TSError; -const TS_NODE_SERVICE_BRAND = Symbol('TS_NODE_SERVICE_BRAND'); -function register(serviceOrOpts) { - // Is this a Service or a RegisterOptions? - let service = serviceOrOpts; - if (!(serviceOrOpts === null || serviceOrOpts === void 0 ? void 0 : serviceOrOpts[TS_NODE_SERVICE_BRAND])) { - // Not a service; is options - service = create((serviceOrOpts !== null && serviceOrOpts !== void 0 ? serviceOrOpts : {})); - } - const originalJsHandler = require.extensions['.js']; - // Expose registered instance globally. - process[exports.REGISTER_INSTANCE] = service; - // Register the extensions. - registerExtensions(service.options.preferTsExts, service.extensions.compiled, service, originalJsHandler); - (0, cjs_resolve_hooks_1.installCommonjsResolveHooksIfNecessary)(service); - // Require specified modules before start-up. - module_1.Module._preloadModules(service.options.require); - return service; -} -exports.register = register; -/** - * Create TypeScript compiler instance. - * - * @category Basic - */ -function create(rawOptions = {}) { - const foundConfigResult = (0, configuration_1.findAndReadConfig)(rawOptions); - return createFromPreloadedConfig(foundConfigResult); -} -exports.create = create; -/** @internal */ -function createFromPreloadedConfig(foundConfigResult) { - var _a, _b, _c, _d; - const { configFilePath, cwd, options, config, compiler, projectLocalResolveDir, optionBasePaths, } = foundConfigResult; - const projectLocalResolveHelper = (0, util_1.createProjectLocalResolveHelper)(projectLocalResolveDir); - const ts = (0, configuration_1.loadCompiler)(compiler); - // Experimental REPL await is not compatible targets lower than ES2018 - const targetSupportsTla = config.options.target >= ts.ScriptTarget.ES2018; - if (options.experimentalReplAwait === true && !targetSupportsTla) { - throw new Error('Experimental REPL await is not compatible with targets lower than ES2018'); - } - // Top-level await was added in TS 3.8 - const tsVersionSupportsTla = (0, util_1.versionGteLt)(ts.version, '3.8.0'); - if (options.experimentalReplAwait === true && !tsVersionSupportsTla) { - throw new Error('Experimental REPL await is not compatible with TypeScript versions older than 3.8'); - } - const shouldReplAwait = options.experimentalReplAwait !== false && - tsVersionSupportsTla && - targetSupportsTla; - // swc implies two other options - // typeCheck option was implemented specifically to allow overriding tsconfig transpileOnly from the command-line - // So we should allow using typeCheck to override swc - if (options.swc && !options.typeCheck) { - if (options.transpileOnly === false) { - throw new Error("Cannot enable 'swc' option with 'transpileOnly: false'. 'swc' implies 'transpileOnly'."); - } - if (options.transpiler) { - throw new Error("Cannot specify both 'swc' and 'transpiler' options. 'swc' uses the built-in swc transpiler."); - } - } - const readFile = options.readFile || ts.sys.readFile; - const fileExists = options.fileExists || ts.sys.fileExists; - // typeCheck can override transpileOnly, useful for CLI flag to override config file - const transpileOnly = (options.transpileOnly === true || options.swc === true) && - options.typeCheck !== true; - let transpiler = undefined; - let transpilerBasePath = undefined; - if (options.transpiler) { - transpiler = options.transpiler; - transpilerBasePath = optionBasePaths.transpiler; - } - else if (options.swc) { - transpiler = require.resolve('./transpilers/swc.js'); - transpilerBasePath = optionBasePaths.swc; - } - const transformers = options.transformers || undefined; - const diagnosticFilters = [ - { - appliesToAllFiles: true, - filenamesAbsolute: [], - diagnosticsIgnored: [ - 6059, - 18002, - 18003, - ...(options.experimentalTsImportSpecifiers - ? [ - 2691, // "An import path cannot end with a '.ts' extension. Consider importing '' instead." - ] - : []), - ...(options.ignoreDiagnostics || []), - ].map(Number), - }, - ]; - const configDiagnosticList = filterDiagnostics(config.errors, diagnosticFilters); - const outputCache = new Map(); - const configFileDirname = configFilePath ? (0, path_1.dirname)(configFilePath) : null; - const scopeDir = (_c = (_b = (_a = options.scopeDir) !== null && _a !== void 0 ? _a : config.options.rootDir) !== null && _b !== void 0 ? _b : configFileDirname) !== null && _c !== void 0 ? _c : cwd; - const ignoreBaseDir = configFileDirname !== null && configFileDirname !== void 0 ? configFileDirname : cwd; - const isScoped = options.scope - ? (fileName) => (0, path_1.relative)(scopeDir, fileName).charAt(0) !== '.' - : () => true; - const shouldIgnore = createIgnore(ignoreBaseDir, options.skipIgnore - ? [] - : (options.ignore || ['(?:^|/)node_modules/']).map((str) => new RegExp(str))); - const diagnosticHost = { - getNewLine: () => ts.sys.newLine, - getCurrentDirectory: () => cwd, - // TODO switch to getCanonicalFileName we already create later in scope - getCanonicalFileName: ts.sys.useCaseSensitiveFileNames - ? (x) => x - : (x) => x.toLowerCase(), - }; - if (options.transpileOnly && typeof transformers === 'function') { - throw new TypeError('Transformers function is unavailable in "--transpile-only"'); - } - let createTranspiler = initializeTranspilerFactory(); - function initializeTranspilerFactory() { - var _a; - if (transpiler) { - if (!transpileOnly) - throw new Error('Custom transpiler can only be used when transpileOnly is enabled.'); - const transpilerName = typeof transpiler === 'string' ? transpiler : transpiler[0]; - const transpilerOptions = typeof transpiler === 'string' ? {} : (_a = transpiler[1]) !== null && _a !== void 0 ? _a : {}; - const transpilerConfigLocalResolveHelper = transpilerBasePath - ? (0, util_1.createProjectLocalResolveHelper)(transpilerBasePath) - : projectLocalResolveHelper; - const transpilerPath = transpilerConfigLocalResolveHelper(transpilerName, true); - const transpilerFactory = require(transpilerPath) - .create; - return createTranspiler; - function createTranspiler(compilerOptions, nodeModuleEmitKind) { - return transpilerFactory === null || transpilerFactory === void 0 ? void 0 : transpilerFactory({ - service: { - options, - config: { - ...config, - options: compilerOptions, - }, - projectLocalResolveHelper, - }, - transpilerConfigLocalResolveHelper, - nodeModuleEmitKind, - ...transpilerOptions, - }); - } - } - } - /** - * True if require() hooks should interop with experimental ESM loader. - * Enabled explicitly via a flag since it is a breaking change. - */ - let experimentalEsmLoader = false; - function enableExperimentalEsmLoaderInterop() { - experimentalEsmLoader = true; - } - // Install source map support and read from memory cache. - installSourceMapSupport(); - function installSourceMapSupport() { - const sourceMapSupport = require('@cspotcode/source-map-support'); - sourceMapSupport.install({ - environment: 'node', - retrieveFile(pathOrUrl) { - var _a; - let path = pathOrUrl; - // If it's a file URL, convert to local path - // Note: fileURLToPath does not exist on early node v10 - // I could not find a way to handle non-URLs except to swallow an error - if (experimentalEsmLoader && path.startsWith('file://')) { - try { - path = (0, url_1.fileURLToPath)(path); - } - catch (e) { - /* swallow error */ - } - } - path = (0, util_1.normalizeSlashes)(path); - return ((_a = outputCache.get(path)) === null || _a === void 0 ? void 0 : _a.content) || ''; - }, - redirectConflictingLibrary: true, - onConflictingLibraryRedirect(request, parent, isMain, options, redirectedRequest) { - (0, exports.debug)(`Redirected an attempt to require source-map-support to instead receive @cspotcode/source-map-support. "${parent.filename}" attempted to require or resolve "${request}" and was redirected to "${redirectedRequest}".`); - }, - }); - } - const shouldHavePrettyErrors = options.pretty === undefined ? process.stdout.isTTY : options.pretty; - const formatDiagnostics = shouldHavePrettyErrors - ? ts.formatDiagnosticsWithColorAndContext || ts.formatDiagnostics - : ts.formatDiagnostics; - function createTSError(diagnostics) { - const diagnosticText = formatDiagnostics(diagnostics, diagnosticHost); - const diagnosticCodes = diagnostics.map((x) => x.code); - return new TSError(diagnosticText, diagnosticCodes, diagnostics); - } - function reportTSError(configDiagnosticList) { - const error = createTSError(configDiagnosticList); - if (options.logError) { - // Print error in red color and continue execution. - console.error('\x1b[31m%s\x1b[0m', error); - } - else { - // Throw error and exit the script. - throw error; - } - } - // Render the configuration errors. - if (configDiagnosticList.length) - reportTSError(configDiagnosticList); - const jsxEmitPreserve = config.options.jsx === ts.JsxEmit.Preserve; - /** - * Get the extension for a transpiled file. - * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS] - */ - function getEmitExtension(path) { - const lastDotIndex = path.lastIndexOf('.'); - if (lastDotIndex >= 0) { - const ext = path.slice(lastDotIndex); - switch (ext) { - case '.js': - case '.ts': - return '.js'; - case '.jsx': - case '.tsx': - return jsxEmitPreserve ? '.jsx' : '.js'; - case '.mjs': - case '.mts': - return '.mjs'; - case '.cjs': - case '.cts': - return '.cjs'; - } - } - return '.js'; - } - /** - * Get output from TS compiler w/typechecking. `undefined` in `transpileOnly` - * mode. - */ - let getOutput; - let getTypeInfo; - const getCanonicalFileName = ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames); - const moduleTypeClassifier = (0, module_type_classifier_1.createModuleTypeClassifier)({ - basePath: (_d = options.optionBasePaths) === null || _d === void 0 ? void 0 : _d.moduleTypes, - patterns: options.moduleTypes, - }); - const extensions = (0, file_extensions_1.getExtensions)(config, options, ts.version); - // Use full language services when the fast option is disabled. - if (!transpileOnly) { - const fileContents = new Map(); - const rootFileNames = new Set(config.fileNames); - const cachedReadFile = (0, util_1.cachedLookup)(debugFn('readFile', readFile)); - // Use language services by default - if (!options.compilerHost) { - let projectVersion = 1; - const fileVersions = new Map(Array.from(rootFileNames).map((fileName) => [fileName, 0])); - const getCustomTransformers = () => { - if (typeof transformers === 'function') { - const program = service.getProgram(); - return program ? transformers(program) : undefined; - } - return transformers; - }; - // Create the compiler host for type checking. - const serviceHost = { - getProjectVersion: () => String(projectVersion), - getScriptFileNames: () => Array.from(rootFileNames), - getScriptVersion: (fileName) => { - const version = fileVersions.get(fileName); - return version ? version.toString() : ''; - }, - getScriptSnapshot(fileName) { - // TODO ordering of this with getScriptVersion? Should they sync up? - let contents = fileContents.get(fileName); - // Read contents into TypeScript memory cache. - if (contents === undefined) { - contents = cachedReadFile(fileName); - if (contents === undefined) - return; - fileVersions.set(fileName, 1); - fileContents.set(fileName, contents); - projectVersion++; - } - return ts.ScriptSnapshot.fromString(contents); - }, - readFile: cachedReadFile, - readDirectory: ts.sys.readDirectory, - getDirectories: (0, util_1.cachedLookup)(debugFn('getDirectories', ts.sys.getDirectories)), - fileExists: (0, util_1.cachedLookup)(debugFn('fileExists', fileExists)), - directoryExists: (0, util_1.cachedLookup)(debugFn('directoryExists', ts.sys.directoryExists)), - realpath: ts.sys.realpath - ? (0, util_1.cachedLookup)(debugFn('realpath', ts.sys.realpath)) - : undefined, - getNewLine: () => ts.sys.newLine, - useCaseSensitiveFileNames: () => ts.sys.useCaseSensitiveFileNames, - getCurrentDirectory: () => cwd, - getCompilationSettings: () => config.options, - getDefaultLibFileName: () => ts.getDefaultLibFilePath(config.options), - getCustomTransformers: getCustomTransformers, - trace: options.tsTrace, - }; - const { resolveModuleNames, getResolvedModuleWithFailedLookupLocationsFromCache, resolveTypeReferenceDirectives, isFileKnownToBeInternal, markBucketOfFilenameInternal, } = (0, resolver_functions_1.createResolverFunctions)({ - host: serviceHost, - getCanonicalFileName, - ts, - cwd, - config, - projectLocalResolveHelper, - options, - extensions, - }); - serviceHost.resolveModuleNames = resolveModuleNames; - serviceHost.getResolvedModuleWithFailedLookupLocationsFromCache = - getResolvedModuleWithFailedLookupLocationsFromCache; - serviceHost.resolveTypeReferenceDirectives = - resolveTypeReferenceDirectives; - const registry = ts.createDocumentRegistry(ts.sys.useCaseSensitiveFileNames, cwd); - const service = ts.createLanguageService(serviceHost, registry); - const updateMemoryCache = (contents, fileName) => { - // Add to `rootFiles` as necessary, either to make TS include a file it has not seen, - // or to trigger a re-classification of files from external to internal. - if (!rootFileNames.has(fileName) && - !isFileKnownToBeInternal(fileName)) { - markBucketOfFilenameInternal(fileName); - rootFileNames.add(fileName); - // Increment project version for every change to rootFileNames. - projectVersion++; - } - const previousVersion = fileVersions.get(fileName) || 0; - const previousContents = fileContents.get(fileName); - // Avoid incrementing cache when nothing has changed. - if (contents !== previousContents) { - fileVersions.set(fileName, previousVersion + 1); - fileContents.set(fileName, contents); - // Increment project version for every file change. - projectVersion++; - } - }; - let previousProgram = undefined; - getOutput = (code, fileName) => { - updateMemoryCache(code, fileName); - const programBefore = service.getProgram(); - if (programBefore !== previousProgram) { - (0, exports.debug)(`compiler rebuilt Program instance when getting output for ${fileName}`); - } - const output = service.getEmitOutput(fileName); - // Get the relevant diagnostics - this is 3x faster than `getPreEmitDiagnostics`. - const diagnostics = service - .getSemanticDiagnostics(fileName) - .concat(service.getSyntacticDiagnostics(fileName)); - const programAfter = service.getProgram(); - (0, exports.debug)('invariant: Is service.getProject() identical before and after getting emit output and diagnostics? (should always be true) ', programBefore === programAfter); - previousProgram = programAfter; - const diagnosticList = filterDiagnostics(diagnostics, diagnosticFilters); - if (diagnosticList.length) - reportTSError(diagnosticList); - if (output.emitSkipped) { - return [undefined, undefined, true]; - } - // Throw an error when requiring `.d.ts` files. - if (output.outputFiles.length === 0) { - throw new TypeError(`Unable to require file: ${(0, path_1.relative)(cwd, fileName)}\n` + - 'This is usually the result of a faulty configuration or import. ' + - 'Make sure there is a `.js`, `.json` or other executable extension with ' + - 'loader attached before `ts-node` available.'); - } - return [output.outputFiles[1].text, output.outputFiles[0].text, false]; - }; - getTypeInfo = (code, fileName, position) => { - const normalizedFileName = (0, util_1.normalizeSlashes)(fileName); - updateMemoryCache(code, normalizedFileName); - const info = service.getQuickInfoAtPosition(normalizedFileName, position); - const name = ts.displayPartsToString(info ? info.displayParts : []); - const comment = ts.displayPartsToString(info ? info.documentation : []); - return { name, comment }; - }; - } - else { - const sys = { - ...ts.sys, - ...diagnosticHost, - readFile: (fileName) => { - const cacheContents = fileContents.get(fileName); - if (cacheContents !== undefined) - return cacheContents; - const contents = cachedReadFile(fileName); - if (contents) - fileContents.set(fileName, contents); - return contents; - }, - readDirectory: ts.sys.readDirectory, - getDirectories: (0, util_1.cachedLookup)(debugFn('getDirectories', ts.sys.getDirectories)), - fileExists: (0, util_1.cachedLookup)(debugFn('fileExists', fileExists)), - directoryExists: (0, util_1.cachedLookup)(debugFn('directoryExists', ts.sys.directoryExists)), - resolvePath: (0, util_1.cachedLookup)(debugFn('resolvePath', ts.sys.resolvePath)), - realpath: ts.sys.realpath - ? (0, util_1.cachedLookup)(debugFn('realpath', ts.sys.realpath)) - : undefined, - }; - const host = ts.createIncrementalCompilerHost - ? ts.createIncrementalCompilerHost(config.options, sys) - : { - ...sys, - getSourceFile: (fileName, languageVersion) => { - const contents = sys.readFile(fileName); - if (contents === undefined) - return; - return ts.createSourceFile(fileName, contents, languageVersion); - }, - getDefaultLibLocation: () => (0, util_1.normalizeSlashes)((0, path_1.dirname)(compiler)), - getDefaultLibFileName: () => (0, util_1.normalizeSlashes)((0, path_1.join)((0, path_1.dirname)(compiler), ts.getDefaultLibFileName(config.options))), - useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, - }; - host.trace = options.tsTrace; - const { resolveModuleNames, resolveTypeReferenceDirectives, isFileKnownToBeInternal, markBucketOfFilenameInternal, } = (0, resolver_functions_1.createResolverFunctions)({ - host, - cwd, - config, - ts, - getCanonicalFileName, - projectLocalResolveHelper, - options, - extensions, - }); - host.resolveModuleNames = resolveModuleNames; - host.resolveTypeReferenceDirectives = resolveTypeReferenceDirectives; - // Fallback for older TypeScript releases without incremental API. - let builderProgram = ts.createIncrementalProgram - ? ts.createIncrementalProgram({ - rootNames: Array.from(rootFileNames), - options: config.options, - host, - configFileParsingDiagnostics: config.errors, - projectReferences: config.projectReferences, - }) - : ts.createEmitAndSemanticDiagnosticsBuilderProgram(Array.from(rootFileNames), config.options, host, undefined, config.errors, config.projectReferences); - // Read and cache custom transformers. - const customTransformers = typeof transformers === 'function' - ? transformers(builderProgram.getProgram()) - : transformers; - // Set the file contents into cache manually. - const updateMemoryCache = (contents, fileName) => { - const previousContents = fileContents.get(fileName); - const contentsChanged = previousContents !== contents; - if (contentsChanged) { - fileContents.set(fileName, contents); - } - // Add to `rootFiles` when discovered by compiler for the first time. - let addedToRootFileNames = false; - if (!rootFileNames.has(fileName) && - !isFileKnownToBeInternal(fileName)) { - markBucketOfFilenameInternal(fileName); - rootFileNames.add(fileName); - addedToRootFileNames = true; - } - // Update program when file changes. - if (addedToRootFileNames || contentsChanged) { - builderProgram = ts.createEmitAndSemanticDiagnosticsBuilderProgram(Array.from(rootFileNames), config.options, host, builderProgram, config.errors, config.projectReferences); - } - }; - getOutput = (code, fileName) => { - let outText = ''; - let outMap = ''; - updateMemoryCache(code, fileName); - const sourceFile = builderProgram.getSourceFile(fileName); - if (!sourceFile) - throw new TypeError(`Unable to read file: ${fileName}`); - const program = builderProgram.getProgram(); - const diagnostics = ts.getPreEmitDiagnostics(program, sourceFile); - const diagnosticList = filterDiagnostics(diagnostics, diagnosticFilters); - if (diagnosticList.length) - reportTSError(diagnosticList); - const result = builderProgram.emit(sourceFile, (path, file, writeByteOrderMark) => { - if (path.endsWith('.map')) { - outMap = file; - } - else { - outText = file; - } - if (options.emit) - sys.writeFile(path, file, writeByteOrderMark); - }, undefined, undefined, customTransformers); - if (result.emitSkipped) { - return [undefined, undefined, true]; - } - // Throw an error when requiring files that cannot be compiled. - if (outText === '') { - if (program.isSourceFileFromExternalLibrary(sourceFile)) { - throw new TypeError(`Unable to compile file from external library: ${(0, path_1.relative)(cwd, fileName)}`); - } - throw new TypeError(`Unable to require file: ${(0, path_1.relative)(cwd, fileName)}\n` + - 'This is usually the result of a faulty configuration or import. ' + - 'Make sure there is a `.js`, `.json` or other executable extension with ' + - 'loader attached before `ts-node` available.'); - } - return [outText, outMap, false]; - }; - getTypeInfo = (code, fileName, position) => { - const normalizedFileName = (0, util_1.normalizeSlashes)(fileName); - updateMemoryCache(code, normalizedFileName); - const sourceFile = builderProgram.getSourceFile(normalizedFileName); - if (!sourceFile) - throw new TypeError(`Unable to read file: ${fileName}`); - const node = getTokenAtPosition(ts, sourceFile, position); - const checker = builderProgram.getProgram().getTypeChecker(); - const symbol = checker.getSymbolAtLocation(node); - if (!symbol) - return { name: '', comment: '' }; - const type = checker.getTypeOfSymbolAtLocation(symbol, node); - const signatures = [ - ...type.getConstructSignatures(), - ...type.getCallSignatures(), - ]; - return { - name: signatures.length - ? signatures.map((x) => checker.signatureToString(x)).join('\n') - : checker.typeToString(type), - comment: ts.displayPartsToString(symbol ? symbol.getDocumentationComment(checker) : []), - }; - }; - // Write `.tsbuildinfo` when `--build` is enabled. - if (options.emit && config.options.incremental) { - process.on('exit', () => { - // Emits `.tsbuildinfo` to filesystem. - builderProgram.getProgram().emitBuildInfo(); - }); - } - } - } - else { - getTypeInfo = () => { - throw new TypeError('Type information is unavailable in "--transpile-only"'); - }; - } - function createTranspileOnlyGetOutputFunction(overrideModuleType, nodeModuleEmitKind) { - const compilerOptions = { ...config.options }; - if (overrideModuleType !== undefined) - compilerOptions.module = overrideModuleType; - let customTranspiler = createTranspiler === null || createTranspiler === void 0 ? void 0 : createTranspiler(compilerOptions, nodeModuleEmitKind); - let tsTranspileModule = (0, util_1.versionGteLt)(ts.version, '4.7.0') - ? (0, ts_transpile_module_1.createTsTranspileModule)(ts, { - compilerOptions, - reportDiagnostics: true, - transformers: transformers, - }) - : undefined; - return (code, fileName) => { - let result; - if (customTranspiler) { - result = customTranspiler.transpile(code, { - fileName, - }); - } - else if (tsTranspileModule) { - result = tsTranspileModule(code, { - fileName, - }, nodeModuleEmitKind === 'nodeesm' ? 'module' : 'commonjs'); - } - else { - result = ts.transpileModule(code, { - fileName, - compilerOptions, - reportDiagnostics: true, - transformers: transformers, - }); - } - const diagnosticList = filterDiagnostics(result.diagnostics || [], diagnosticFilters); - if (diagnosticList.length) - reportTSError(diagnosticList); - return [result.outputText, result.sourceMapText, false]; - }; - } - // When true, these mean that a `moduleType` override will cause a different emit - // than the TypeScript compiler, so we *must* overwrite the emit. - const shouldOverwriteEmitWhenForcingCommonJS = config.options.module !== ts.ModuleKind.CommonJS; - // [MUST_UPDATE_FOR_NEW_MODULEKIND] - const shouldOverwriteEmitWhenForcingEsm = !(config.options.module === ts.ModuleKind.ES2015 || - (ts.ModuleKind.ES2020 && config.options.module === ts.ModuleKind.ES2020) || - (ts.ModuleKind.ES2022 && config.options.module === ts.ModuleKind.ES2022) || - config.options.module === ts.ModuleKind.ESNext); - /** - * node16 or nodenext - * [MUST_UPDATE_FOR_NEW_MODULEKIND] - */ - const isNodeModuleType = (ts.ModuleKind.Node16 && config.options.module === ts.ModuleKind.Node16) || - (ts.ModuleKind.NodeNext && - config.options.module === ts.ModuleKind.NodeNext); - const getOutputForceCommonJS = createTranspileOnlyGetOutputFunction(ts.ModuleKind.CommonJS); - const getOutputForceNodeCommonJS = createTranspileOnlyGetOutputFunction(ts.ModuleKind.NodeNext, 'nodecjs'); - const getOutputForceNodeESM = createTranspileOnlyGetOutputFunction(ts.ModuleKind.NodeNext, 'nodeesm'); - // [MUST_UPDATE_FOR_NEW_MODULEKIND] - const getOutputForceESM = createTranspileOnlyGetOutputFunction(ts.ModuleKind.ES2022 || ts.ModuleKind.ES2020 || ts.ModuleKind.ES2015); - const getOutputTranspileOnly = createTranspileOnlyGetOutputFunction(); - // Create a simple TypeScript compiler proxy. - function compile(code, fileName, lineOffset = 0) { - const normalizedFileName = (0, util_1.normalizeSlashes)(fileName); - const classification = moduleTypeClassifier.classifyModuleByModuleTypeOverrides(normalizedFileName); - let value = ''; - let sourceMap = ''; - let emitSkipped = true; - if (getOutput) { - // Must always call normal getOutput to throw typechecking errors - [value, sourceMap, emitSkipped] = getOutput(code, normalizedFileName); - } - // If module classification contradicts the above, call the relevant transpiler - if (classification.moduleType === 'cjs' && - (shouldOverwriteEmitWhenForcingCommonJS || emitSkipped)) { - [value, sourceMap] = getOutputForceCommonJS(code, normalizedFileName); - } - else if (classification.moduleType === 'esm' && - (shouldOverwriteEmitWhenForcingEsm || emitSkipped)) { - [value, sourceMap] = getOutputForceESM(code, normalizedFileName); - } - else if (emitSkipped) { - // Happens when ts compiler skips emit or in transpileOnly mode - const classification = (0, node_module_type_classifier_1.classifyModule)(fileName, isNodeModuleType); - [value, sourceMap] = - classification === 'nodecjs' - ? getOutputForceNodeCommonJS(code, normalizedFileName) - : classification === 'nodeesm' - ? getOutputForceNodeESM(code, normalizedFileName) - : classification === 'cjs' - ? getOutputForceCommonJS(code, normalizedFileName) - : classification === 'esm' - ? getOutputForceESM(code, normalizedFileName) - : getOutputTranspileOnly(code, normalizedFileName); - } - const output = updateOutput(value, normalizedFileName, sourceMap, getEmitExtension); - outputCache.set(normalizedFileName, { content: output }); - return output; - } - let active = true; - const enabled = (enabled) => enabled === undefined ? active : (active = !!enabled); - const ignored = (fileName) => { - if (!active) - return true; - const ext = (0, path_1.extname)(fileName); - if (extensions.compiled.includes(ext)) { - return !isScoped(fileName) || shouldIgnore(fileName); - } - return true; - }; - function addDiagnosticFilter(filter) { - diagnosticFilters.push({ - ...filter, - filenamesAbsolute: filter.filenamesAbsolute.map((f) => (0, util_1.normalizeSlashes)(f)), - }); - } - const getNodeEsmResolver = (0, util_1.once)(() => require('../dist-raw/node-internal-modules-esm-resolve').createResolve({ - extensions, - preferTsExts: options.preferTsExts, - tsNodeExperimentalSpecifierResolution: options.experimentalSpecifierResolution, - })); - const getNodeEsmGetFormat = (0, util_1.once)(() => require('../dist-raw/node-internal-modules-esm-get_format').createGetFormat(options.experimentalSpecifierResolution, getNodeEsmResolver())); - const getNodeCjsLoader = (0, util_1.once)(() => require('../dist-raw/node-internal-modules-cjs-loader').createCjsLoader({ - extensions, - preferTsExts: options.preferTsExts, - nodeEsmResolver: getNodeEsmResolver(), - })); - return { - [TS_NODE_SERVICE_BRAND]: true, - ts, - compilerPath: compiler, - config, - compile, - getTypeInfo, - ignored, - enabled, - options, - configFilePath, - moduleTypeClassifier, - shouldReplAwait, - addDiagnosticFilter, - installSourceMapSupport, - enableExperimentalEsmLoaderInterop, - transpileOnly, - projectLocalResolveHelper, - getNodeEsmResolver, - getNodeEsmGetFormat, - getNodeCjsLoader, - extensions, - }; -} -exports.createFromPreloadedConfig = createFromPreloadedConfig; -/** - * Check if the filename should be ignored. - */ -function createIgnore(ignoreBaseDir, ignore) { - return (fileName) => { - const relname = (0, path_1.relative)(ignoreBaseDir, fileName); - const path = (0, util_1.normalizeSlashes)(relname); - return ignore.some((x) => x.test(path)); - }; -} -/** - * Register the extensions to support when importing files. - */ -function registerExtensions(preferTsExts, extensions, service, originalJsHandler) { - const exts = new Set(extensions); - // Can't add these extensions cuz would allow omitting file extension; node requires ext for .cjs and .mjs - // Unless they're already registered by something else (nyc does this): - // then we *must* hook them or else our transformer will not be called. - for (const cannotAdd of ['.mts', '.cts', '.mjs', '.cjs']) { - if (exts.has(cannotAdd) && !(0, util_1.hasOwnProperty)(require.extensions, cannotAdd)) { - // Unrecognized file exts can be transformed via the `.js` handler. - exts.add('.js'); - exts.delete(cannotAdd); - } - } - // Register new extensions. - for (const ext of exts) { - registerExtension(ext, service, originalJsHandler); - } - if (preferTsExts) { - const preferredExtensions = new Set([ - ...exts, - ...Object.keys(require.extensions), - ]); - // Re-sort iteration order of Object.keys() - for (const ext of preferredExtensions) { - const old = Object.getOwnPropertyDescriptor(require.extensions, ext); - delete require.extensions[ext]; - Object.defineProperty(require.extensions, ext, old); - } - } -} -/** - * Register the extension for node. - */ -function registerExtension(ext, service, originalHandler) { - const old = require.extensions[ext] || originalHandler; - require.extensions[ext] = function (m, filename) { - if (service.ignored(filename)) - return old(m, filename); - assertScriptCanLoadAsCJS(service, m, filename); - const _compile = m._compile; - m._compile = function (code, fileName) { - (0, exports.debug)('module._compile', fileName); - const result = service.compile(code, fileName); - return _compile.call(this, result, fileName); - }; - return old(m, filename); - }; -} -/** - * Update the output remapping the source map. - */ -function updateOutput(outputText, fileName, sourceMap, getEmitExtension) { - const base64Map = Buffer.from(updateSourceMap(sourceMap, fileName), 'utf8').toString('base64'); - const sourceMapContent = `//# sourceMappingURL=data:application/json;charset=utf-8;base64,${base64Map}`; - // Expected form: `//# sourceMappingURL=foo bar.js.map` or `//# sourceMappingURL=foo%20bar.js.map` for input file "foo bar.tsx" - // Percent-encoding behavior added in TS 4.1.1: https://github.com/microsoft/TypeScript/issues/40951 - const prefix = '//# sourceMappingURL='; - const prefixLength = prefix.length; - const baseName = /*foo.tsx*/ (0, path_1.basename)(fileName); - const extName = /*.tsx*/ (0, path_1.extname)(fileName); - const extension = /*.js*/ getEmitExtension(fileName); - const sourcemapFilename = baseName.slice(0, -extName.length) + extension + '.map'; - const sourceMapLengthWithoutPercentEncoding = prefixLength + sourcemapFilename.length; - /* - * Only rewrite if existing directive exists at the location we expect, to support: - * a) compilers that do not append a sourcemap directive - * b) situations where we did the math wrong - * Not ideal, but appending our sourcemap *after* a pre-existing sourcemap still overrides, so the end-user is happy. - */ - if (outputText.substr(-sourceMapLengthWithoutPercentEncoding, prefixLength) === - prefix) { - return (outputText.slice(0, -sourceMapLengthWithoutPercentEncoding) + - sourceMapContent); - } - // If anyone asks why we're not using URL, the URL equivalent is: `u = new URL('http://d'); u.pathname = "/" + sourcemapFilename; return u.pathname.slice(1); - const sourceMapLengthWithPercentEncoding = prefixLength + encodeURI(sourcemapFilename).length; - if (outputText.substr(-sourceMapLengthWithPercentEncoding, prefixLength) === - prefix) { - return (outputText.slice(0, -sourceMapLengthWithPercentEncoding) + - sourceMapContent); - } - return `${outputText}\n${sourceMapContent}`; -} -/** - * Update the source map contents for improved output. - */ -function updateSourceMap(sourceMapText, fileName) { - const sourceMap = JSON.parse(sourceMapText); - sourceMap.file = fileName; - sourceMap.sources = [fileName]; - delete sourceMap.sourceRoot; - return JSON.stringify(sourceMap); -} -/** - * Filter diagnostics. - */ -function filterDiagnostics(diagnostics, filters) { - return diagnostics.filter((d) => filters.every((f) => { - var _a; - return (!f.appliesToAllFiles && - f.filenamesAbsolute.indexOf((_a = d.file) === null || _a === void 0 ? void 0 : _a.fileName) === -1) || - f.diagnosticsIgnored.indexOf(d.code) === -1; - })); -} -/** - * Get token at file position. - * - * Reference: https://github.com/microsoft/TypeScript/blob/fcd9334f57d85b73dd66ad2d21c02e84822f4841/src/services/utilities.ts#L705-L731 - */ -function getTokenAtPosition(ts, sourceFile, position) { - let current = sourceFile; - outer: while (true) { - for (const child of current.getChildren(sourceFile)) { - const start = child.getFullStart(); - if (start > position) - break; - const end = child.getEnd(); - if (position <= end) { - current = child; - continue outer; - } - } - return current; - } -} -/** - * Create an implementation of node's ESM loader hooks. - * - * This may be useful if you - * want to wrap or compose the loader hooks to add additional functionality or - * combine with another loader. - * - * Node changed the hooks API, so there are two possible APIs. This function - * detects your node version and returns the appropriate API. - * - * @category ESM Loader - */ -const createEsmHooks = (tsNodeService) => require('./esm').createEsmHooks(tsNodeService); -exports.createEsmHooks = createEsmHooks; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/index.js.map b/node_modules/ts-node/dist/index.js.map deleted file mode 100644 index c65cd12..0000000 --- a/node_modules/ts-node/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","s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nB,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,MAAA,CAAC,CAAC,IAAI,0CAAE,QAAS,CAAC,KAAK,CAAC,CAAC,CAAC;YACxD,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;KAAA,CAC9C,CACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAS,kBAAkB,CACzB,EAAY,EACZ,UAA0B,EAC1B,QAAgB;IAEhB,IAAI,OAAO,GAAa,UAAU,CAAC;IAEnC,KAAK,EAAE,OAAO,IAAI,EAAE;QAClB,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE;YACnD,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;YACnC,IAAI,KAAK,GAAG,QAAQ;gBAAE,MAAM;YAE5B,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YAC3B,IAAI,QAAQ,IAAI,GAAG,EAAE;gBACnB,OAAO,GAAG,KAAK,CAAC;gBAChB,SAAS,KAAK,CAAC;aAChB;SACF;QAED,OAAO,OAAO,CAAC;KAChB;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACI,MAAM,cAAc,GAA4B,CACrD,aAAsB,EACtB,EAAE,CAAE,OAAO,CAAC,OAAO,CAA4B,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;AAFnE,QAAA,cAAc,kBAEqD","sourcesContent":["import { relative, basename, extname, dirname, join } from 'path';\nimport { Module } from 'module';\nimport * as util from 'util';\nimport { fileURLToPath } from 'url';\n\nimport type * as _sourceMapSupport from '@cspotcode/source-map-support';\nimport { BaseError } from 'make-error';\nimport type * as _ts from 'typescript';\n\nimport type { Transpiler, TranspilerFactory } from './transpilers/types';\nimport {\n cachedLookup,\n createProjectLocalResolveHelper,\n hasOwnProperty,\n normalizeSlashes,\n once,\n parse,\n ProjectLocalResolveHelper,\n split,\n versionGteLt,\n yn,\n} from './util';\nimport { findAndReadConfig, loadCompiler } from './configuration';\nimport type { TSCommon, TSInternal } from './ts-compiler-types';\nimport {\n createModuleTypeClassifier,\n ModuleTypeClassifier,\n} from './module-type-classifier';\nimport { createResolverFunctions } from './resolver-functions';\nimport type { createEsmHooks as createEsmHooksFn } from './esm';\nimport {\n installCommonjsResolveHooksIfNecessary,\n ModuleConstructorWithInternals,\n} from './cjs-resolve-hooks';\nimport { classifyModule } from './node-module-type-classifier';\nimport type * as _nodeInternalModulesEsmResolve from '../dist-raw/node-internal-modules-esm-resolve';\nimport type * as _nodeInternalModulesEsmGetFormat from '../dist-raw/node-internal-modules-esm-get_format';\nimport type * as _nodeInternalModulesCjsLoader from '../dist-raw/node-internal-modules-cjs-loader';\nimport { Extensions, getExtensions } from './file-extensions';\nimport { createTsTranspileModule } from './ts-transpile-module';\n\nexport { TSCommon };\nexport {\n createRepl,\n CreateReplOptions,\n ReplService,\n EvalAwarePartialHost,\n} from './repl';\nexport type {\n TranspilerModule,\n TranspilerFactory,\n CreateTranspilerOptions,\n TranspileOutput,\n TranspileOptions,\n Transpiler,\n} from './transpilers/types';\nexport type {\n NodeLoaderHooksAPI1,\n NodeLoaderHooksAPI2,\n NodeLoaderHooksFormat,\n} from './esm';\n\n/**\n * Does this version of node obey the package.json \"type\" field\n * and throw ERR_REQUIRE_ESM when attempting to require() an ESM modules.\n */\nconst engineSupportsPackageTypeField =\n parseInt(process.versions.node.split('.')[0], 10) >= 12;\n\n/**\n * Assert that script can be loaded as CommonJS when we attempt to require it.\n * If it should be loaded as ESM, throw ERR_REQUIRE_ESM like node does.\n *\n * Loaded conditionally so we don't need to support older node versions\n */\nlet assertScriptCanLoadAsCJS: (\n service: Service,\n module: NodeJS.Module,\n filename: string\n) => void = engineSupportsPackageTypeField\n ? (\n require('../dist-raw/node-internal-modules-cjs-loader') as typeof _nodeInternalModulesCjsLoader\n ).assertScriptCanLoadAsCJSImpl\n : () => {\n /* noop */\n };\n\n/**\n * Registered `ts-node` instance information.\n */\nexport const REGISTER_INSTANCE = Symbol.for('ts-node.register.instance');\n\n/**\n * Expose `REGISTER_INSTANCE` information on node.js `process`.\n */\ndeclare global {\n namespace NodeJS {\n interface Process {\n [REGISTER_INSTANCE]?: Service;\n }\n }\n}\n\n/** @internal */\nexport const env = process.env as ProcessEnv;\n/**\n * Declare all env vars, to aid discoverability.\n * If an env var affects ts-node's behavior, it should not be buried somewhere in our codebase.\n * @internal\n */\nexport interface ProcessEnv {\n TS_NODE_DEBUG?: string;\n TS_NODE_CWD?: string;\n /** @deprecated */\n TS_NODE_DIR?: string;\n TS_NODE_EMIT?: string;\n TS_NODE_SCOPE?: string;\n TS_NODE_SCOPE_DIR?: string;\n TS_NODE_FILES?: string;\n TS_NODE_PRETTY?: string;\n TS_NODE_COMPILER?: string;\n TS_NODE_COMPILER_OPTIONS?: string;\n TS_NODE_IGNORE?: string;\n TS_NODE_PROJECT?: string;\n TS_NODE_SKIP_PROJECT?: string;\n TS_NODE_SKIP_IGNORE?: string;\n TS_NODE_PREFER_TS_EXTS?: string;\n TS_NODE_IGNORE_DIAGNOSTICS?: string;\n TS_NODE_TRANSPILE_ONLY?: string;\n TS_NODE_TYPE_CHECK?: string;\n TS_NODE_COMPILER_HOST?: string;\n TS_NODE_LOG_ERROR?: string;\n TS_NODE_HISTORY?: string;\n TS_NODE_EXPERIMENTAL_REPL_AWAIT?: string;\n\n NODE_NO_READLINE?: string;\n}\n\n/**\n * @internal\n */\nexport const INSPECT_CUSTOM = util.inspect.custom || 'inspect';\n\n/**\n * Debugging `ts-node`.\n */\nconst shouldDebug = yn(env.TS_NODE_DEBUG);\n/** @internal */\nexport const debug = shouldDebug\n ? (...args: any) =>\n console.log(`[ts-node ${new Date().toISOString()}]`, ...args)\n : () => undefined;\nconst debugFn = shouldDebug\n ? (key: string, fn: (arg: T) => U) => {\n let i = 0;\n return (x: T) => {\n debug(key, x, ++i);\n return fn(x);\n };\n }\n : (_: string, fn: (arg: T) => U) => fn;\n\n/**\n * Export the current version.\n */\nexport const VERSION = require('../package.json').version;\n\n/**\n * Options for creating a new TypeScript compiler instance.\n\n * @category Basic\n */\nexport interface CreateOptions {\n /**\n * Behave as if invoked within this working directory. Roughly equivalent to `cd $dir && ts-node ...`\n *\n * @default process.cwd()\n */\n cwd?: string;\n /**\n * Legacy alias for `cwd`\n *\n * @deprecated use `projectSearchDir` or `cwd`\n */\n dir?: string;\n /**\n * Emit output files into `.ts-node` directory.\n *\n * @default false\n */\n emit?: boolean;\n /**\n * Scope compiler to files within `scopeDir`.\n *\n * @default false\n */\n scope?: boolean;\n /**\n * @default First of: `tsconfig.json` \"rootDir\" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded.\n */\n scopeDir?: string;\n /**\n * Use pretty diagnostic formatter.\n *\n * @default false\n */\n pretty?: boolean;\n /**\n * Use TypeScript's faster `transpileModule`.\n *\n * @default false\n */\n transpileOnly?: boolean;\n /**\n * **DEPRECATED** Specify type-check is enabled (e.g. `transpileOnly == false`).\n *\n * @default true\n */\n typeCheck?: boolean;\n /**\n * Use TypeScript's compiler host API instead of the language service API.\n *\n * @default false\n */\n compilerHost?: boolean;\n /**\n * Logs TypeScript errors to stderr instead of throwing exceptions.\n *\n * @default false\n */\n logError?: boolean;\n /**\n * Load \"files\" and \"include\" from `tsconfig.json` on startup.\n *\n * Default is to override `tsconfig.json` \"files\" and \"include\" to only include the entrypoint script.\n *\n * @default false\n */\n files?: boolean;\n /**\n * Specify a custom TypeScript compiler.\n *\n * @default \"typescript\"\n */\n compiler?: string;\n /**\n * Specify a custom transpiler for use with transpileOnly\n */\n transpiler?: string | [string, object];\n /**\n * Transpile with swc instead of the TypeScript compiler, and skip typechecking.\n *\n * Equivalent to setting both `transpileOnly: true` and `transpiler: 'ts-node/transpilers/swc'`\n *\n * For complete instructions: https://typestrong.org/ts-node/docs/transpilers\n */\n swc?: boolean;\n /**\n * Paths which should not be compiled.\n *\n * Each string in the array is converted to a regular expression via `new RegExp()` and tested against source paths prior to compilation.\n *\n * Source paths are normalized to posix-style separators, relative to the directory containing `tsconfig.json` or to cwd if no `tsconfig.json` is loaded.\n *\n * Default is to ignore all node_modules subdirectories.\n *\n * @default [\"(?:^|/)node_modules/\"]\n */\n ignore?: string[];\n /**\n * Path to TypeScript config file or directory containing a `tsconfig.json`.\n * Similar to the `tsc --project` flag: https://www.typescriptlang.org/docs/handbook/compiler-options.html\n */\n project?: string;\n /**\n * Search for TypeScript config file (`tsconfig.json`) in this or parent directories.\n */\n projectSearchDir?: string;\n /**\n * Skip project config resolution and loading.\n *\n * @default false\n */\n skipProject?: boolean;\n /**\n * Skip ignore check, so that compilation will be attempted for all files with matching extensions.\n *\n * @default false\n */\n skipIgnore?: boolean;\n /**\n * JSON object to merge with TypeScript `compilerOptions`.\n *\n * @allOf [{\"$ref\": \"https://schemastore.azurewebsites.net/schemas/json/tsconfig.json#definitions/compilerOptionsDefinition/properties/compilerOptions\"}]\n */\n compilerOptions?: object;\n /**\n * Ignore TypeScript warnings by diagnostic code.\n */\n ignoreDiagnostics?: Array;\n /**\n * Modules to require, like node's `--require` flag.\n *\n * If specified in `tsconfig.json`, the modules will be resolved relative to the `tsconfig.json` file.\n *\n * If specified programmatically, each input string should be pre-resolved to an absolute path for\n * best results.\n */\n require?: Array;\n readFile?: (path: string) => string | undefined;\n fileExists?: (path: string) => boolean;\n transformers?:\n | _ts.CustomTransformers\n | ((p: _ts.Program) => _ts.CustomTransformers);\n /**\n * Allows the usage of top level await in REPL.\n *\n * Uses node's implementation which accomplishes this with an AST syntax transformation.\n *\n * Enabled by default when tsconfig target is es2018 or above. Set to false to disable.\n *\n * **Note**: setting to `true` when tsconfig target is too low will throw an Error. Leave as `undefined`\n * to get default, automatic behavior.\n */\n experimentalReplAwait?: boolean;\n /**\n * Override certain paths to be compiled and executed as CommonJS or ECMAScript modules.\n * When overridden, the tsconfig \"module\" and package.json \"type\" fields are overridden, and\n * the file extension is ignored.\n * This is useful if you cannot use .mts, .cts, .mjs, or .cjs file extensions;\n * it achieves the same effect.\n *\n * Each key is a glob pattern following the same rules as tsconfig's \"include\" array.\n * When multiple patterns match the same file, the last pattern takes precedence.\n *\n * `cjs` overrides matches files to compile and execute as CommonJS.\n * `esm` overrides matches files to compile and execute as native ECMAScript modules.\n * `package` overrides either of the above to default behavior, which obeys package.json \"type\" and\n * tsconfig.json \"module\" options.\n */\n moduleTypes?: ModuleTypes;\n /**\n * @internal\n * Set by our configuration loader whenever a config file contains options that\n * are relative to the config file they came from, *and* when other logic needs\n * to know this. Some options can be eagerly resolved to absolute paths by\n * the configuration loader, so it is *not* necessary for their source to be set here.\n */\n optionBasePaths?: OptionBasePaths;\n /**\n * A function to collect trace messages from the TypeScript compiler, for example when `traceResolution` is enabled.\n *\n * @default console.log\n */\n tsTrace?: (str: string) => void;\n /**\n * Enable native ESM support.\n *\n * For details, see https://typestrong.org/ts-node/docs/imports#native-ecmascript-modules\n */\n esm?: boolean;\n /**\n * Re-order file extensions so that TypeScript imports are preferred.\n *\n * For example, when both `index.js` and `index.ts` exist, enabling this option causes `require('./index')` to resolve to `index.ts` instead of `index.js`\n *\n * @default false\n */\n preferTsExts?: boolean;\n /**\n * Like node's `--experimental-specifier-resolution`, , but can also be set in your `tsconfig.json` for convenience.\n *\n * For details, see https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm\n */\n experimentalSpecifierResolution?: 'node' | 'explicit';\n /**\n * Allow using voluntary `.ts` file extension in import specifiers.\n *\n * Typically, in ESM projects, import specifiers must have an emit extension, `.js`, `.cjs`, or `.mjs`,\n * and we automatically map to the corresponding `.ts`, `.cts`, or `.mts` source file. This is the\n * recommended approach.\n *\n * However, if you really want to use `.ts` in import specifiers, and are aware that this may\n * break tooling, you can enable this flag.\n */\n experimentalTsImportSpecifiers?: boolean;\n}\n\nexport type ModuleTypes = Record;\nexport type ModuleTypeOverride = 'cjs' | 'esm' | 'package';\n\n/** @internal */\nexport interface OptionBasePaths {\n moduleTypes?: string;\n transpiler?: string;\n compiler?: string;\n swc?: string;\n}\n\n/**\n * Options for registering a TypeScript compiler instance globally.\n\n * @category Basic\n */\nexport interface RegisterOptions extends CreateOptions {\n /**\n * Enable experimental features that re-map imports and require calls to support:\n * `baseUrl`, `paths`, `rootDirs`, `.js` to `.ts` file extension mappings,\n * `outDir` to `rootDir` mappings for composite projects and monorepos.\n *\n * For details, see https://github.com/TypeStrong/ts-node/issues/1514\n */\n experimentalResolver?: boolean;\n}\n\nexport type ExperimentalSpecifierResolution = 'node' | 'explicit';\n\n/**\n * Must be an interface to support `typescript-json-schema`.\n */\nexport interface TsConfigOptions\n extends Omit<\n RegisterOptions,\n | 'transformers'\n | 'readFile'\n | 'fileExists'\n | 'skipProject'\n | 'project'\n | 'dir'\n | 'cwd'\n | 'projectSearchDir'\n | 'optionBasePaths'\n | 'tsTrace'\n > {}\n\n/**\n * Information retrieved from type info check.\n */\nexport interface TypeInfo {\n name: string;\n comment: string;\n}\n\n/**\n * Default register options, including values specified via environment\n * variables.\n * @internal\n */\nexport const DEFAULTS: RegisterOptions = {\n cwd: env.TS_NODE_CWD ?? env.TS_NODE_DIR,\n emit: yn(env.TS_NODE_EMIT),\n scope: yn(env.TS_NODE_SCOPE),\n scopeDir: env.TS_NODE_SCOPE_DIR,\n files: yn(env.TS_NODE_FILES),\n pretty: yn(env.TS_NODE_PRETTY),\n compiler: env.TS_NODE_COMPILER,\n compilerOptions: parse(env.TS_NODE_COMPILER_OPTIONS),\n ignore: split(env.TS_NODE_IGNORE),\n project: env.TS_NODE_PROJECT,\n skipProject: yn(env.TS_NODE_SKIP_PROJECT),\n skipIgnore: yn(env.TS_NODE_SKIP_IGNORE),\n preferTsExts: yn(env.TS_NODE_PREFER_TS_EXTS),\n ignoreDiagnostics: split(env.TS_NODE_IGNORE_DIAGNOSTICS),\n transpileOnly: yn(env.TS_NODE_TRANSPILE_ONLY),\n typeCheck: yn(env.TS_NODE_TYPE_CHECK),\n compilerHost: yn(env.TS_NODE_COMPILER_HOST),\n logError: yn(env.TS_NODE_LOG_ERROR),\n experimentalReplAwait: yn(env.TS_NODE_EXPERIMENTAL_REPL_AWAIT) ?? undefined,\n tsTrace: console.log.bind(console),\n};\n\n/**\n * TypeScript diagnostics error.\n */\nexport class TSError extends BaseError {\n name = 'TSError';\n diagnosticText!: string;\n diagnostics!: ReadonlyArray<_ts.Diagnostic>;\n\n constructor(\n diagnosticText: string,\n public diagnosticCodes: number[],\n diagnostics: ReadonlyArray<_ts.Diagnostic> = []\n ) {\n super(`⨯ Unable to compile TypeScript:\\n${diagnosticText}`);\n Object.defineProperty(this, 'diagnosticText', {\n configurable: true,\n writable: true,\n value: diagnosticText,\n });\n Object.defineProperty(this, 'diagnostics', {\n configurable: true,\n writable: true,\n value: diagnostics,\n });\n }\n\n /**\n * @internal\n */\n [INSPECT_CUSTOM]() {\n return this.diagnosticText;\n }\n}\n\nconst TS_NODE_SERVICE_BRAND = Symbol('TS_NODE_SERVICE_BRAND');\n\n/**\n * Primary ts-node service, which wraps the TypeScript API and can compile TypeScript to JavaScript\n */\nexport interface Service {\n /** @internal */\n [TS_NODE_SERVICE_BRAND]: true;\n ts: TSCommon;\n /** @internal */\n compilerPath: string;\n config: _ts.ParsedCommandLine;\n options: RegisterOptions;\n enabled(enabled?: boolean): boolean;\n ignored(fileName: string): boolean;\n compile(code: string, fileName: string, lineOffset?: number): string;\n getTypeInfo(code: string, fileName: string, position: number): TypeInfo;\n /** @internal */\n configFilePath: string | undefined;\n /** @internal */\n moduleTypeClassifier: ModuleTypeClassifier;\n /** @internal */\n readonly shouldReplAwait: boolean;\n /** @internal */\n addDiagnosticFilter(filter: DiagnosticFilter): void;\n /** @internal */\n installSourceMapSupport(): void;\n /** @internal */\n enableExperimentalEsmLoaderInterop(): void;\n /** @internal */\n transpileOnly: boolean;\n /** @internal */\n projectLocalResolveHelper: ProjectLocalResolveHelper;\n /** @internal */\n getNodeEsmResolver: () => ReturnType<\n typeof import('../dist-raw/node-internal-modules-esm-resolve').createResolve\n >;\n /** @internal */\n getNodeEsmGetFormat: () => ReturnType<\n typeof import('../dist-raw/node-internal-modules-esm-get_format').createGetFormat\n >;\n /** @internal */\n getNodeCjsLoader: () => ReturnType<\n typeof import('../dist-raw/node-internal-modules-cjs-loader').createCjsLoader\n >;\n /** @internal */\n extensions: Extensions;\n}\n\n/**\n * Re-export of `Service` interface for backwards-compatibility\n * @deprecated use `Service` instead\n * @see {Service}\n */\nexport type Register = Service;\n\n/** @internal */\nexport interface DiagnosticFilter {\n /** if true, filter applies to all files */\n appliesToAllFiles: boolean;\n /** Filter applies onto to these filenames. Only used if appliesToAllFiles is false */\n filenamesAbsolute: string[];\n /** these diagnostic codes are ignored */\n diagnosticsIgnored: number[];\n}\n\n/**\n * Create a new TypeScript compiler instance and register it onto node.js\n *\n * @category Basic\n */\nexport function register(opts?: RegisterOptions): Service;\n/**\n * Register TypeScript compiler instance onto node.js\n\n * @category Basic\n */\nexport function register(service: Service): Service;\nexport function register(\n serviceOrOpts: Service | RegisterOptions | undefined\n): Service {\n // Is this a Service or a RegisterOptions?\n let service = serviceOrOpts as Service;\n if (!(serviceOrOpts as Service)?.[TS_NODE_SERVICE_BRAND]) {\n // Not a service; is options\n service = create((serviceOrOpts ?? {}) as RegisterOptions);\n }\n\n const originalJsHandler = require.extensions['.js'];\n\n // Expose registered instance globally.\n process[REGISTER_INSTANCE] = service;\n\n // Register the extensions.\n registerExtensions(\n service.options.preferTsExts,\n service.extensions.compiled,\n service,\n originalJsHandler\n );\n\n installCommonjsResolveHooksIfNecessary(service);\n\n // Require specified modules before start-up.\n (Module as ModuleConstructorWithInternals)._preloadModules(\n service.options.require\n );\n\n return service;\n}\n\n/**\n * Create TypeScript compiler instance.\n *\n * @category Basic\n */\nexport function create(rawOptions: CreateOptions = {}): Service {\n const foundConfigResult = findAndReadConfig(rawOptions);\n return createFromPreloadedConfig(foundConfigResult);\n}\n\n/** @internal */\nexport function createFromPreloadedConfig(\n foundConfigResult: ReturnType\n): Service {\n const {\n configFilePath,\n cwd,\n options,\n config,\n compiler,\n projectLocalResolveDir,\n optionBasePaths,\n } = foundConfigResult;\n\n const projectLocalResolveHelper = createProjectLocalResolveHelper(\n projectLocalResolveDir\n );\n\n const ts = loadCompiler(compiler);\n\n // Experimental REPL await is not compatible targets lower than ES2018\n const targetSupportsTla = config.options.target! >= ts.ScriptTarget.ES2018;\n if (options.experimentalReplAwait === true && !targetSupportsTla) {\n throw new Error(\n 'Experimental REPL await is not compatible with targets lower than ES2018'\n );\n }\n // Top-level await was added in TS 3.8\n const tsVersionSupportsTla = versionGteLt(ts.version, '3.8.0');\n if (options.experimentalReplAwait === true && !tsVersionSupportsTla) {\n throw new Error(\n 'Experimental REPL await is not compatible with TypeScript versions older than 3.8'\n );\n }\n\n const shouldReplAwait =\n options.experimentalReplAwait !== false &&\n tsVersionSupportsTla &&\n targetSupportsTla;\n\n // swc implies two other options\n // typeCheck option was implemented specifically to allow overriding tsconfig transpileOnly from the command-line\n // So we should allow using typeCheck to override swc\n if (options.swc && !options.typeCheck) {\n if (options.transpileOnly === false) {\n throw new Error(\n \"Cannot enable 'swc' option with 'transpileOnly: false'. 'swc' implies 'transpileOnly'.\"\n );\n }\n if (options.transpiler) {\n throw new Error(\n \"Cannot specify both 'swc' and 'transpiler' options. 'swc' uses the built-in swc transpiler.\"\n );\n }\n }\n\n const readFile = options.readFile || ts.sys.readFile;\n const fileExists = options.fileExists || ts.sys.fileExists;\n // typeCheck can override transpileOnly, useful for CLI flag to override config file\n const transpileOnly =\n (options.transpileOnly === true || options.swc === true) &&\n options.typeCheck !== true;\n let transpiler: RegisterOptions['transpiler'] | undefined = undefined;\n let transpilerBasePath: string | undefined = undefined;\n if (options.transpiler) {\n transpiler = options.transpiler;\n transpilerBasePath = optionBasePaths.transpiler;\n } else if (options.swc) {\n transpiler = require.resolve('./transpilers/swc.js');\n transpilerBasePath = optionBasePaths.swc;\n }\n const transformers = options.transformers || undefined;\n const diagnosticFilters: Array = [\n {\n appliesToAllFiles: true,\n filenamesAbsolute: [],\n diagnosticsIgnored: [\n 6059, // \"'rootDir' is expected to contain all source files.\"\n 18002, // \"The 'files' list in config file is empty.\"\n 18003, // \"No inputs were found in config file.\"\n ...(options.experimentalTsImportSpecifiers\n ? [\n 2691, // \"An import path cannot end with a '.ts' extension. Consider importing '' instead.\"\n ]\n : []),\n ...(options.ignoreDiagnostics || []),\n ].map(Number),\n },\n ];\n\n const configDiagnosticList = filterDiagnostics(\n config.errors,\n diagnosticFilters\n );\n const outputCache = new Map<\n string,\n {\n content: string;\n }\n >();\n\n const configFileDirname = configFilePath ? dirname(configFilePath) : null;\n const scopeDir =\n options.scopeDir ?? config.options.rootDir ?? configFileDirname ?? cwd;\n const ignoreBaseDir = configFileDirname ?? cwd;\n const isScoped = options.scope\n ? (fileName: string) => relative(scopeDir, fileName).charAt(0) !== '.'\n : () => true;\n const shouldIgnore = createIgnore(\n ignoreBaseDir,\n options.skipIgnore\n ? []\n : (options.ignore || ['(?:^|/)node_modules/']).map(\n (str) => new RegExp(str)\n )\n );\n\n const diagnosticHost: _ts.FormatDiagnosticsHost = {\n getNewLine: () => ts.sys.newLine,\n getCurrentDirectory: () => cwd,\n // TODO switch to getCanonicalFileName we already create later in scope\n getCanonicalFileName: ts.sys.useCaseSensitiveFileNames\n ? (x) => x\n : (x) => x.toLowerCase(),\n };\n\n if (options.transpileOnly && typeof transformers === 'function') {\n throw new TypeError(\n 'Transformers function is unavailable in \"--transpile-only\"'\n );\n }\n let createTranspiler = initializeTranspilerFactory();\n function initializeTranspilerFactory() {\n if (transpiler) {\n if (!transpileOnly)\n throw new Error(\n 'Custom transpiler can only be used when transpileOnly is enabled.'\n );\n const transpilerName =\n typeof transpiler === 'string' ? transpiler : transpiler[0];\n const transpilerOptions =\n typeof transpiler === 'string' ? {} : transpiler[1] ?? {};\n const transpilerConfigLocalResolveHelper = transpilerBasePath\n ? createProjectLocalResolveHelper(transpilerBasePath)\n : projectLocalResolveHelper;\n const transpilerPath = transpilerConfigLocalResolveHelper(\n transpilerName,\n true\n );\n const transpilerFactory = require(transpilerPath)\n .create as TranspilerFactory;\n return createTranspiler;\n\n function createTranspiler(\n compilerOptions: TSCommon.CompilerOptions,\n nodeModuleEmitKind?: NodeModuleEmitKind\n ) {\n return transpilerFactory?.({\n service: {\n options,\n config: {\n ...config,\n options: compilerOptions,\n },\n projectLocalResolveHelper,\n },\n transpilerConfigLocalResolveHelper,\n nodeModuleEmitKind,\n ...transpilerOptions,\n });\n }\n }\n }\n\n /**\n * True if require() hooks should interop with experimental ESM loader.\n * Enabled explicitly via a flag since it is a breaking change.\n */\n let experimentalEsmLoader = false;\n function enableExperimentalEsmLoaderInterop() {\n experimentalEsmLoader = true;\n }\n\n // Install source map support and read from memory cache.\n installSourceMapSupport();\n function installSourceMapSupport() {\n const sourceMapSupport =\n require('@cspotcode/source-map-support') as typeof _sourceMapSupport;\n sourceMapSupport.install({\n environment: 'node',\n retrieveFile(pathOrUrl: string) {\n let path = pathOrUrl;\n // If it's a file URL, convert to local path\n // Note: fileURLToPath does not exist on early node v10\n // I could not find a way to handle non-URLs except to swallow an error\n if (experimentalEsmLoader && path.startsWith('file://')) {\n try {\n path = fileURLToPath(path);\n } catch (e) {\n /* swallow error */\n }\n }\n path = normalizeSlashes(path);\n return outputCache.get(path)?.content || '';\n },\n redirectConflictingLibrary: true,\n onConflictingLibraryRedirect(\n request,\n parent,\n isMain,\n options,\n redirectedRequest\n ) {\n debug(\n `Redirected an attempt to require source-map-support to instead receive @cspotcode/source-map-support. \"${\n (parent as NodeJS.Module).filename\n }\" attempted to require or resolve \"${request}\" and was redirected to \"${redirectedRequest}\".`\n );\n },\n });\n }\n\n const shouldHavePrettyErrors =\n options.pretty === undefined ? process.stdout.isTTY : options.pretty;\n\n const formatDiagnostics = shouldHavePrettyErrors\n ? ts.formatDiagnosticsWithColorAndContext || ts.formatDiagnostics\n : ts.formatDiagnostics;\n\n function createTSError(diagnostics: ReadonlyArray<_ts.Diagnostic>) {\n const diagnosticText = formatDiagnostics(diagnostics, diagnosticHost);\n const diagnosticCodes = diagnostics.map((x) => x.code);\n return new TSError(diagnosticText, diagnosticCodes, diagnostics);\n }\n\n function reportTSError(configDiagnosticList: _ts.Diagnostic[]) {\n const error = createTSError(configDiagnosticList);\n if (options.logError) {\n // Print error in red color and continue execution.\n console.error('\\x1b[31m%s\\x1b[0m', error);\n } else {\n // Throw error and exit the script.\n throw error;\n }\n }\n\n // Render the configuration errors.\n if (configDiagnosticList.length) reportTSError(configDiagnosticList);\n\n const jsxEmitPreserve = config.options.jsx === ts.JsxEmit.Preserve;\n /**\n * Get the extension for a transpiled file.\n * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]\n */\n function getEmitExtension(path: string) {\n const lastDotIndex = path.lastIndexOf('.');\n if (lastDotIndex >= 0) {\n const ext = path.slice(lastDotIndex);\n switch (ext) {\n case '.js':\n case '.ts':\n return '.js';\n case '.jsx':\n case '.tsx':\n return jsxEmitPreserve ? '.jsx' : '.js';\n case '.mjs':\n case '.mts':\n return '.mjs';\n case '.cjs':\n case '.cts':\n return '.cjs';\n }\n }\n return '.js';\n }\n\n type GetOutputFunction = (code: string, fileName: string) => SourceOutput;\n /**\n * Get output from TS compiler w/typechecking. `undefined` in `transpileOnly`\n * mode.\n */\n let getOutput: GetOutputFunction | undefined;\n let getTypeInfo: (\n _code: string,\n _fileName: string,\n _position: number\n ) => TypeInfo;\n\n const getCanonicalFileName = (\n ts as unknown as TSInternal\n ).createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames);\n\n const moduleTypeClassifier = createModuleTypeClassifier({\n basePath: options.optionBasePaths?.moduleTypes,\n patterns: options.moduleTypes,\n });\n\n const extensions = getExtensions(config, options, ts.version);\n\n // Use full language services when the fast option is disabled.\n if (!transpileOnly) {\n const fileContents = new Map();\n const rootFileNames = new Set(config.fileNames);\n const cachedReadFile = cachedLookup(debugFn('readFile', readFile));\n\n // Use language services by default\n if (!options.compilerHost) {\n let projectVersion = 1;\n const fileVersions = new Map(\n Array.from(rootFileNames).map((fileName) => [fileName, 0])\n );\n\n const getCustomTransformers = () => {\n if (typeof transformers === 'function') {\n const program = service.getProgram();\n return program ? transformers(program) : undefined;\n }\n\n return transformers;\n };\n\n // Create the compiler host for type checking.\n const serviceHost: _ts.LanguageServiceHost &\n Required> = {\n getProjectVersion: () => String(projectVersion),\n getScriptFileNames: () => Array.from(rootFileNames),\n getScriptVersion: (fileName: string) => {\n const version = fileVersions.get(fileName);\n return version ? version.toString() : '';\n },\n getScriptSnapshot(fileName: string) {\n // TODO ordering of this with getScriptVersion? Should they sync up?\n let contents = fileContents.get(fileName);\n\n // Read contents into TypeScript memory cache.\n if (contents === undefined) {\n contents = cachedReadFile(fileName);\n if (contents === undefined) return;\n\n fileVersions.set(fileName, 1);\n fileContents.set(fileName, contents);\n projectVersion++;\n }\n\n return ts.ScriptSnapshot.fromString(contents);\n },\n readFile: cachedReadFile,\n readDirectory: ts.sys.readDirectory,\n getDirectories: cachedLookup(\n debugFn('getDirectories', ts.sys.getDirectories)\n ),\n fileExists: cachedLookup(debugFn('fileExists', fileExists)),\n directoryExists: cachedLookup(\n debugFn('directoryExists', ts.sys.directoryExists)\n ),\n realpath: ts.sys.realpath\n ? cachedLookup(debugFn('realpath', ts.sys.realpath))\n : undefined,\n getNewLine: () => ts.sys.newLine,\n useCaseSensitiveFileNames: () => ts.sys.useCaseSensitiveFileNames,\n getCurrentDirectory: () => cwd,\n getCompilationSettings: () => config.options,\n getDefaultLibFileName: () => ts.getDefaultLibFilePath(config.options),\n getCustomTransformers: getCustomTransformers,\n trace: options.tsTrace,\n };\n const {\n resolveModuleNames,\n getResolvedModuleWithFailedLookupLocationsFromCache,\n resolveTypeReferenceDirectives,\n isFileKnownToBeInternal,\n markBucketOfFilenameInternal,\n } = createResolverFunctions({\n host: serviceHost,\n getCanonicalFileName,\n ts,\n cwd,\n config,\n projectLocalResolveHelper,\n options,\n extensions,\n });\n serviceHost.resolveModuleNames = resolveModuleNames;\n serviceHost.getResolvedModuleWithFailedLookupLocationsFromCache =\n getResolvedModuleWithFailedLookupLocationsFromCache;\n serviceHost.resolveTypeReferenceDirectives =\n resolveTypeReferenceDirectives;\n\n const registry = ts.createDocumentRegistry(\n ts.sys.useCaseSensitiveFileNames,\n cwd\n );\n const service = ts.createLanguageService(serviceHost, registry);\n\n const updateMemoryCache = (contents: string, fileName: string) => {\n // Add to `rootFiles` as necessary, either to make TS include a file it has not seen,\n // or to trigger a re-classification of files from external to internal.\n if (\n !rootFileNames.has(fileName) &&\n !isFileKnownToBeInternal(fileName)\n ) {\n markBucketOfFilenameInternal(fileName);\n rootFileNames.add(fileName);\n // Increment project version for every change to rootFileNames.\n projectVersion++;\n }\n\n const previousVersion = fileVersions.get(fileName) || 0;\n const previousContents = fileContents.get(fileName);\n // Avoid incrementing cache when nothing has changed.\n if (contents !== previousContents) {\n fileVersions.set(fileName, previousVersion + 1);\n fileContents.set(fileName, contents);\n // Increment project version for every file change.\n projectVersion++;\n }\n };\n\n let previousProgram: _ts.Program | undefined = undefined;\n\n getOutput = (code: string, fileName: string) => {\n updateMemoryCache(code, fileName);\n\n const programBefore = service.getProgram();\n if (programBefore !== previousProgram) {\n debug(\n `compiler rebuilt Program instance when getting output for ${fileName}`\n );\n }\n\n const output = service.getEmitOutput(fileName);\n\n // Get the relevant diagnostics - this is 3x faster than `getPreEmitDiagnostics`.\n const diagnostics = service\n .getSemanticDiagnostics(fileName)\n .concat(service.getSyntacticDiagnostics(fileName));\n\n const programAfter = service.getProgram();\n\n debug(\n 'invariant: Is service.getProject() identical before and after getting emit output and diagnostics? (should always be true) ',\n programBefore === programAfter\n );\n\n previousProgram = programAfter;\n\n const diagnosticList = filterDiagnostics(\n diagnostics,\n diagnosticFilters\n );\n if (diagnosticList.length) reportTSError(diagnosticList);\n\n if (output.emitSkipped) {\n return [undefined, undefined, true];\n }\n\n // Throw an error when requiring `.d.ts` files.\n if (output.outputFiles.length === 0) {\n throw new TypeError(\n `Unable to require file: ${relative(cwd, fileName)}\\n` +\n 'This is usually the result of a faulty configuration or import. ' +\n 'Make sure there is a `.js`, `.json` or other executable extension with ' +\n 'loader attached before `ts-node` available.'\n );\n }\n\n return [output.outputFiles[1].text, output.outputFiles[0].text, false];\n };\n\n getTypeInfo = (code: string, fileName: string, position: number) => {\n const normalizedFileName = normalizeSlashes(fileName);\n updateMemoryCache(code, normalizedFileName);\n\n const info = service.getQuickInfoAtPosition(\n normalizedFileName,\n position\n );\n const name = ts.displayPartsToString(info ? info.displayParts : []);\n const comment = ts.displayPartsToString(info ? info.documentation : []);\n\n return { name, comment };\n };\n } else {\n const sys: _ts.System & _ts.FormatDiagnosticsHost = {\n ...ts.sys,\n ...diagnosticHost,\n readFile: (fileName: string) => {\n const cacheContents = fileContents.get(fileName);\n if (cacheContents !== undefined) return cacheContents;\n const contents = cachedReadFile(fileName);\n if (contents) fileContents.set(fileName, contents);\n return contents;\n },\n readDirectory: ts.sys.readDirectory,\n getDirectories: cachedLookup(\n debugFn('getDirectories', ts.sys.getDirectories)\n ),\n fileExists: cachedLookup(debugFn('fileExists', fileExists)),\n directoryExists: cachedLookup(\n debugFn('directoryExists', ts.sys.directoryExists)\n ),\n resolvePath: cachedLookup(debugFn('resolvePath', ts.sys.resolvePath)),\n realpath: ts.sys.realpath\n ? cachedLookup(debugFn('realpath', ts.sys.realpath))\n : undefined,\n };\n\n const host: _ts.CompilerHost = ts.createIncrementalCompilerHost\n ? ts.createIncrementalCompilerHost(config.options, sys)\n : {\n ...sys,\n getSourceFile: (fileName, languageVersion) => {\n const contents = sys.readFile(fileName);\n if (contents === undefined) return;\n return ts.createSourceFile(fileName, contents, languageVersion);\n },\n getDefaultLibLocation: () => normalizeSlashes(dirname(compiler)),\n getDefaultLibFileName: () =>\n normalizeSlashes(\n join(\n dirname(compiler),\n ts.getDefaultLibFileName(config.options)\n )\n ),\n useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames,\n };\n host.trace = options.tsTrace;\n const {\n resolveModuleNames,\n resolveTypeReferenceDirectives,\n isFileKnownToBeInternal,\n markBucketOfFilenameInternal,\n } = createResolverFunctions({\n host,\n cwd,\n config,\n ts,\n getCanonicalFileName,\n projectLocalResolveHelper,\n options,\n extensions,\n });\n host.resolveModuleNames = resolveModuleNames;\n host.resolveTypeReferenceDirectives = resolveTypeReferenceDirectives;\n\n // Fallback for older TypeScript releases without incremental API.\n let builderProgram = ts.createIncrementalProgram\n ? ts.createIncrementalProgram({\n rootNames: Array.from(rootFileNames),\n options: config.options,\n host,\n configFileParsingDiagnostics: config.errors,\n projectReferences: config.projectReferences,\n })\n : ts.createEmitAndSemanticDiagnosticsBuilderProgram(\n Array.from(rootFileNames),\n config.options,\n host,\n undefined,\n config.errors,\n config.projectReferences\n );\n\n // Read and cache custom transformers.\n const customTransformers =\n typeof transformers === 'function'\n ? transformers(builderProgram.getProgram())\n : transformers;\n\n // Set the file contents into cache manually.\n const updateMemoryCache = (contents: string, fileName: string) => {\n const previousContents = fileContents.get(fileName);\n const contentsChanged = previousContents !== contents;\n if (contentsChanged) {\n fileContents.set(fileName, contents);\n }\n\n // Add to `rootFiles` when discovered by compiler for the first time.\n let addedToRootFileNames = false;\n if (\n !rootFileNames.has(fileName) &&\n !isFileKnownToBeInternal(fileName)\n ) {\n markBucketOfFilenameInternal(fileName);\n rootFileNames.add(fileName);\n addedToRootFileNames = true;\n }\n\n // Update program when file changes.\n if (addedToRootFileNames || contentsChanged) {\n builderProgram = ts.createEmitAndSemanticDiagnosticsBuilderProgram(\n Array.from(rootFileNames),\n config.options,\n host,\n builderProgram,\n config.errors,\n config.projectReferences\n );\n }\n };\n\n getOutput = (code: string, fileName: string) => {\n let outText = '';\n let outMap = '';\n\n updateMemoryCache(code, fileName);\n\n const sourceFile = builderProgram.getSourceFile(fileName);\n if (!sourceFile)\n throw new TypeError(`Unable to read file: ${fileName}`);\n\n const program = builderProgram.getProgram();\n const diagnostics = ts.getPreEmitDiagnostics(program, sourceFile);\n const diagnosticList = filterDiagnostics(\n diagnostics,\n diagnosticFilters\n );\n if (diagnosticList.length) reportTSError(diagnosticList);\n\n const result = builderProgram.emit(\n sourceFile,\n (path, file, writeByteOrderMark) => {\n if (path.endsWith('.map')) {\n outMap = file;\n } else {\n outText = file;\n }\n\n if (options.emit) sys.writeFile(path, file, writeByteOrderMark);\n },\n undefined,\n undefined,\n customTransformers\n );\n\n if (result.emitSkipped) {\n return [undefined, undefined, true];\n }\n\n // Throw an error when requiring files that cannot be compiled.\n if (outText === '') {\n if (program.isSourceFileFromExternalLibrary(sourceFile)) {\n throw new TypeError(\n `Unable to compile file from external library: ${relative(\n cwd,\n fileName\n )}`\n );\n }\n\n throw new TypeError(\n `Unable to require file: ${relative(cwd, fileName)}\\n` +\n 'This is usually the result of a faulty configuration or import. ' +\n 'Make sure there is a `.js`, `.json` or other executable extension with ' +\n 'loader attached before `ts-node` available.'\n );\n }\n\n return [outText, outMap, false];\n };\n\n getTypeInfo = (code: string, fileName: string, position: number) => {\n const normalizedFileName = normalizeSlashes(fileName);\n updateMemoryCache(code, normalizedFileName);\n\n const sourceFile = builderProgram.getSourceFile(normalizedFileName);\n if (!sourceFile)\n throw new TypeError(`Unable to read file: ${fileName}`);\n\n const node = getTokenAtPosition(ts, sourceFile, position);\n const checker = builderProgram.getProgram().getTypeChecker();\n const symbol = checker.getSymbolAtLocation(node);\n\n if (!symbol) return { name: '', comment: '' };\n\n const type = checker.getTypeOfSymbolAtLocation(symbol, node);\n const signatures = [\n ...type.getConstructSignatures(),\n ...type.getCallSignatures(),\n ];\n\n return {\n name: signatures.length\n ? signatures.map((x) => checker.signatureToString(x)).join('\\n')\n : checker.typeToString(type),\n comment: ts.displayPartsToString(\n symbol ? symbol.getDocumentationComment(checker) : []\n ),\n };\n };\n\n // Write `.tsbuildinfo` when `--build` is enabled.\n if (options.emit && config.options.incremental) {\n process.on('exit', () => {\n // Emits `.tsbuildinfo` to filesystem.\n (builderProgram.getProgram() as any).emitBuildInfo();\n });\n }\n }\n } else {\n getTypeInfo = () => {\n throw new TypeError(\n 'Type information is unavailable in \"--transpile-only\"'\n );\n };\n }\n\n function createTranspileOnlyGetOutputFunction(\n overrideModuleType?: _ts.ModuleKind,\n nodeModuleEmitKind?: NodeModuleEmitKind\n ): GetOutputFunction {\n const compilerOptions = { ...config.options };\n if (overrideModuleType !== undefined)\n compilerOptions.module = overrideModuleType;\n let customTranspiler = createTranspiler?.(\n compilerOptions,\n nodeModuleEmitKind\n );\n let tsTranspileModule = versionGteLt(ts.version, '4.7.0')\n ? createTsTranspileModule(ts, {\n compilerOptions,\n reportDiagnostics: true,\n transformers: transformers as _ts.CustomTransformers | undefined,\n })\n : undefined;\n return (code: string, fileName: string): SourceOutput => {\n let result: _ts.TranspileOutput;\n if (customTranspiler) {\n result = customTranspiler.transpile(code, {\n fileName,\n });\n } else if (tsTranspileModule) {\n result = tsTranspileModule(\n code,\n {\n fileName,\n },\n nodeModuleEmitKind === 'nodeesm' ? 'module' : 'commonjs'\n );\n } else {\n result = ts.transpileModule(code, {\n fileName,\n compilerOptions,\n reportDiagnostics: true,\n transformers: transformers as _ts.CustomTransformers | undefined,\n });\n }\n\n const diagnosticList = filterDiagnostics(\n result.diagnostics || [],\n diagnosticFilters\n );\n if (diagnosticList.length) reportTSError(diagnosticList);\n\n return [result.outputText, result.sourceMapText as string, false];\n };\n }\n\n // When true, these mean that a `moduleType` override will cause a different emit\n // than the TypeScript compiler, so we *must* overwrite the emit.\n const shouldOverwriteEmitWhenForcingCommonJS =\n config.options.module !== ts.ModuleKind.CommonJS;\n // [MUST_UPDATE_FOR_NEW_MODULEKIND]\n const shouldOverwriteEmitWhenForcingEsm = !(\n config.options.module === ts.ModuleKind.ES2015 ||\n (ts.ModuleKind.ES2020 && config.options.module === ts.ModuleKind.ES2020) ||\n (ts.ModuleKind.ES2022 && config.options.module === ts.ModuleKind.ES2022) ||\n config.options.module === ts.ModuleKind.ESNext\n );\n /**\n * node16 or nodenext\n * [MUST_UPDATE_FOR_NEW_MODULEKIND]\n */\n const isNodeModuleType =\n (ts.ModuleKind.Node16 && config.options.module === ts.ModuleKind.Node16) ||\n (ts.ModuleKind.NodeNext &&\n config.options.module === ts.ModuleKind.NodeNext);\n const getOutputForceCommonJS = createTranspileOnlyGetOutputFunction(\n ts.ModuleKind.CommonJS\n );\n const getOutputForceNodeCommonJS = createTranspileOnlyGetOutputFunction(\n ts.ModuleKind.NodeNext,\n 'nodecjs'\n );\n const getOutputForceNodeESM = createTranspileOnlyGetOutputFunction(\n ts.ModuleKind.NodeNext,\n 'nodeesm'\n );\n // [MUST_UPDATE_FOR_NEW_MODULEKIND]\n const getOutputForceESM = createTranspileOnlyGetOutputFunction(\n ts.ModuleKind.ES2022 || ts.ModuleKind.ES2020 || ts.ModuleKind.ES2015\n );\n const getOutputTranspileOnly = createTranspileOnlyGetOutputFunction();\n\n // Create a simple TypeScript compiler proxy.\n function compile(code: string, fileName: string, lineOffset = 0) {\n const normalizedFileName = normalizeSlashes(fileName);\n const classification =\n moduleTypeClassifier.classifyModuleByModuleTypeOverrides(\n normalizedFileName\n );\n let value: string | undefined = '';\n let sourceMap: string | undefined = '';\n let emitSkipped = true;\n if (getOutput) {\n // Must always call normal getOutput to throw typechecking errors\n [value, sourceMap, emitSkipped] = getOutput(code, normalizedFileName);\n }\n // If module classification contradicts the above, call the relevant transpiler\n if (\n classification.moduleType === 'cjs' &&\n (shouldOverwriteEmitWhenForcingCommonJS || emitSkipped)\n ) {\n [value, sourceMap] = getOutputForceCommonJS(code, normalizedFileName);\n } else if (\n classification.moduleType === 'esm' &&\n (shouldOverwriteEmitWhenForcingEsm || emitSkipped)\n ) {\n [value, sourceMap] = getOutputForceESM(code, normalizedFileName);\n } else if (emitSkipped) {\n // Happens when ts compiler skips emit or in transpileOnly mode\n const classification = classifyModule(fileName, isNodeModuleType);\n [value, sourceMap] =\n classification === 'nodecjs'\n ? getOutputForceNodeCommonJS(code, normalizedFileName)\n : classification === 'nodeesm'\n ? getOutputForceNodeESM(code, normalizedFileName)\n : classification === 'cjs'\n ? getOutputForceCommonJS(code, normalizedFileName)\n : classification === 'esm'\n ? getOutputForceESM(code, normalizedFileName)\n : getOutputTranspileOnly(code, normalizedFileName);\n }\n const output = updateOutput(\n value!,\n normalizedFileName,\n sourceMap!,\n getEmitExtension\n );\n outputCache.set(normalizedFileName, { content: output });\n return output;\n }\n\n let active = true;\n const enabled = (enabled?: boolean) =>\n enabled === undefined ? active : (active = !!enabled);\n const ignored = (fileName: string) => {\n if (!active) return true;\n const ext = extname(fileName);\n if (extensions.compiled.includes(ext)) {\n return !isScoped(fileName) || shouldIgnore(fileName);\n }\n return true;\n };\n\n function addDiagnosticFilter(filter: DiagnosticFilter) {\n diagnosticFilters.push({\n ...filter,\n filenamesAbsolute: filter.filenamesAbsolute.map((f) =>\n normalizeSlashes(f)\n ),\n });\n }\n\n const getNodeEsmResolver = once(() =>\n (\n require('../dist-raw/node-internal-modules-esm-resolve') as typeof _nodeInternalModulesEsmResolve\n ).createResolve({\n extensions,\n preferTsExts: options.preferTsExts,\n tsNodeExperimentalSpecifierResolution:\n options.experimentalSpecifierResolution,\n })\n );\n const getNodeEsmGetFormat = once(() =>\n (\n require('../dist-raw/node-internal-modules-esm-get_format') as typeof _nodeInternalModulesEsmGetFormat\n ).createGetFormat(\n options.experimentalSpecifierResolution,\n getNodeEsmResolver()\n )\n );\n const getNodeCjsLoader = once(() =>\n (\n require('../dist-raw/node-internal-modules-cjs-loader') as typeof _nodeInternalModulesCjsLoader\n ).createCjsLoader({\n extensions,\n preferTsExts: options.preferTsExts,\n nodeEsmResolver: getNodeEsmResolver(),\n })\n );\n\n return {\n [TS_NODE_SERVICE_BRAND]: true,\n ts,\n compilerPath: compiler,\n config,\n compile,\n getTypeInfo,\n ignored,\n enabled,\n options,\n configFilePath,\n moduleTypeClassifier,\n shouldReplAwait,\n addDiagnosticFilter,\n installSourceMapSupport,\n enableExperimentalEsmLoaderInterop,\n transpileOnly,\n projectLocalResolveHelper,\n getNodeEsmResolver,\n getNodeEsmGetFormat,\n getNodeCjsLoader,\n extensions,\n };\n}\n\n/**\n * Check if the filename should be ignored.\n */\nfunction createIgnore(ignoreBaseDir: string, ignore: RegExp[]) {\n return (fileName: string) => {\n const relname = relative(ignoreBaseDir, fileName);\n const path = normalizeSlashes(relname);\n\n return ignore.some((x) => x.test(path));\n };\n}\n\n/**\n * Register the extensions to support when importing files.\n */\nfunction registerExtensions(\n preferTsExts: boolean | null | undefined,\n extensions: string[],\n service: Service,\n originalJsHandler: (m: NodeModule, filename: string) => any\n) {\n const exts = new Set(extensions);\n // Can't add these extensions cuz would allow omitting file extension; node requires ext for .cjs and .mjs\n // Unless they're already registered by something else (nyc does this):\n // then we *must* hook them or else our transformer will not be called.\n for (const cannotAdd of ['.mts', '.cts', '.mjs', '.cjs']) {\n if (exts.has(cannotAdd) && !hasOwnProperty(require.extensions, cannotAdd)) {\n // Unrecognized file exts can be transformed via the `.js` handler.\n exts.add('.js');\n exts.delete(cannotAdd);\n }\n }\n\n // Register new extensions.\n for (const ext of exts) {\n registerExtension(ext, service, originalJsHandler);\n }\n\n if (preferTsExts) {\n const preferredExtensions = new Set([\n ...exts,\n ...Object.keys(require.extensions),\n ]);\n\n // Re-sort iteration order of Object.keys()\n for (const ext of preferredExtensions) {\n const old = Object.getOwnPropertyDescriptor(require.extensions, ext);\n delete require.extensions[ext];\n Object.defineProperty(require.extensions, ext, old!);\n }\n }\n}\n\n/**\n * Register the extension for node.\n */\nfunction registerExtension(\n ext: string,\n service: Service,\n originalHandler: (m: NodeModule, filename: string) => any\n) {\n const old = require.extensions[ext] || originalHandler;\n\n require.extensions[ext] = function (m: any, filename) {\n if (service.ignored(filename)) return old(m, filename);\n\n assertScriptCanLoadAsCJS(service, m, filename);\n\n const _compile = m._compile;\n\n m._compile = function (code: string, fileName: string) {\n debug('module._compile', fileName);\n\n const result = service.compile(code, fileName);\n return _compile.call(this, result, fileName);\n };\n\n return old(m, filename);\n };\n}\n\n/**\n * Internal source output.\n */\ntype SourceOutput = [string, string, false] | [undefined, undefined, true];\n\n/**\n * Update the output remapping the source map.\n */\nfunction updateOutput(\n outputText: string,\n fileName: string,\n sourceMap: string,\n getEmitExtension: (fileName: string) => string\n) {\n const base64Map = Buffer.from(\n updateSourceMap(sourceMap, fileName),\n 'utf8'\n ).toString('base64');\n const sourceMapContent = `//# sourceMappingURL=data:application/json;charset=utf-8;base64,${base64Map}`;\n // Expected form: `//# sourceMappingURL=foo bar.js.map` or `//# sourceMappingURL=foo%20bar.js.map` for input file \"foo bar.tsx\"\n // Percent-encoding behavior added in TS 4.1.1: https://github.com/microsoft/TypeScript/issues/40951\n const prefix = '//# sourceMappingURL=';\n const prefixLength = prefix.length;\n const baseName = /*foo.tsx*/ basename(fileName);\n const extName = /*.tsx*/ extname(fileName);\n const extension = /*.js*/ getEmitExtension(fileName);\n const sourcemapFilename =\n baseName.slice(0, -extName.length) + extension + '.map';\n const sourceMapLengthWithoutPercentEncoding =\n prefixLength + sourcemapFilename.length;\n /*\n * Only rewrite if existing directive exists at the location we expect, to support:\n * a) compilers that do not append a sourcemap directive\n * b) situations where we did the math wrong\n * Not ideal, but appending our sourcemap *after* a pre-existing sourcemap still overrides, so the end-user is happy.\n */\n if (\n outputText.substr(-sourceMapLengthWithoutPercentEncoding, prefixLength) ===\n prefix\n ) {\n return (\n outputText.slice(0, -sourceMapLengthWithoutPercentEncoding) +\n sourceMapContent\n );\n }\n // If anyone asks why we're not using URL, the URL equivalent is: `u = new URL('http://d'); u.pathname = \"/\" + sourcemapFilename; return u.pathname.slice(1);\n const sourceMapLengthWithPercentEncoding =\n prefixLength + encodeURI(sourcemapFilename).length;\n if (\n outputText.substr(-sourceMapLengthWithPercentEncoding, prefixLength) ===\n prefix\n ) {\n return (\n outputText.slice(0, -sourceMapLengthWithPercentEncoding) +\n sourceMapContent\n );\n }\n\n return `${outputText}\\n${sourceMapContent}`;\n}\n\n/**\n * Update the source map contents for improved output.\n */\nfunction updateSourceMap(sourceMapText: string, fileName: string) {\n const sourceMap = JSON.parse(sourceMapText);\n sourceMap.file = fileName;\n sourceMap.sources = [fileName];\n delete sourceMap.sourceRoot;\n return JSON.stringify(sourceMap);\n}\n\n/**\n * Filter diagnostics.\n */\nfunction filterDiagnostics(\n diagnostics: readonly _ts.Diagnostic[],\n filters: DiagnosticFilter[]\n) {\n return diagnostics.filter((d) =>\n filters.every(\n (f) =>\n (!f.appliesToAllFiles &&\n f.filenamesAbsolute.indexOf(d.file?.fileName!) === -1) ||\n f.diagnosticsIgnored.indexOf(d.code) === -1\n )\n );\n}\n\n/**\n * Get token at file position.\n *\n * Reference: https://github.com/microsoft/TypeScript/blob/fcd9334f57d85b73dd66ad2d21c02e84822f4841/src/services/utilities.ts#L705-L731\n */\nfunction getTokenAtPosition(\n ts: TSCommon,\n sourceFile: _ts.SourceFile,\n position: number\n): _ts.Node {\n let current: _ts.Node = sourceFile;\n\n outer: while (true) {\n for (const child of current.getChildren(sourceFile)) {\n const start = child.getFullStart();\n if (start > position) break;\n\n const end = child.getEnd();\n if (position <= end) {\n current = child;\n continue outer;\n }\n }\n\n return current;\n }\n}\n\n/**\n * Create an implementation of node's ESM loader hooks.\n *\n * This may be useful if you\n * want to wrap or compose the loader hooks to add additional functionality or\n * combine with another loader.\n *\n * Node changed the hooks API, so there are two possible APIs. This function\n * detects your node version and returns the appropriate API.\n *\n * @category ESM Loader\n */\nexport const createEsmHooks: typeof createEsmHooksFn = (\n tsNodeService: Service\n) => (require('./esm') as typeof import('./esm')).createEsmHooks(tsNodeService);\n\n/**\n * When using `module: nodenext` or `module: node12`, there are two possible styles of emit depending in file extension or package.json \"type\":\n *\n * - CommonJS with dynamic imports preserved (not transformed into `require()` calls)\n * - ECMAScript modules with `import foo = require()` transformed into `require = createRequire(); const foo = require()`\n */\nexport type NodeModuleEmitKind = 'nodeesm' | 'nodecjs';\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/module-type-classifier.d.ts b/node_modules/ts-node/dist/module-type-classifier.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/module-type-classifier.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/module-type-classifier.js b/node_modules/ts-node/dist/module-type-classifier.js deleted file mode 100644 index 4d2aabb..0000000 --- a/node_modules/ts-node/dist/module-type-classifier.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createModuleTypeClassifier = void 0; -const ts_internals_1 = require("./ts-internals"); -const util_1 = require("./util"); -/** - * @internal - * May receive non-normalized options -- basePath and patterns -- and will normalize them - * internally. - * However, calls to `classifyModule` must pass pre-normalized paths! - */ -function createModuleTypeClassifier(options) { - const { patterns, basePath: _basePath } = options; - const basePath = _basePath !== undefined - ? (0, util_1.normalizeSlashes)(_basePath).replace(/\/$/, '') - : undefined; - const patternTypePairs = Object.entries(patterns !== null && patterns !== void 0 ? patterns : []).map(([_pattern, type]) => { - const pattern = (0, util_1.normalizeSlashes)(_pattern); - return { pattern: parsePattern(basePath, pattern), type }; - }); - const classifications = { - package: { - moduleType: 'auto', - }, - cjs: { - moduleType: 'cjs', - }, - esm: { - moduleType: 'esm', - }, - }; - const auto = classifications.package; - // Passed path must be normalized! - function classifyModuleNonCached(path) { - const matched = matchPatterns(patternTypePairs, (_) => _.pattern, path); - if (matched) - return classifications[matched.type]; - return auto; - } - const classifyModule = (0, util_1.cachedLookup)(classifyModuleNonCached); - function classifyModuleAuto(path) { - return auto; - } - return { - classifyModuleByModuleTypeOverrides: patternTypePairs.length - ? classifyModule - : classifyModuleAuto, - }; -} -exports.createModuleTypeClassifier = createModuleTypeClassifier; -function parsePattern(basePath, patternString) { - const pattern = (0, ts_internals_1.getPatternFromSpec)(patternString, basePath); - return pattern !== undefined ? new RegExp(pattern) : /(?:)/; -} -function matchPatterns(objects, getPattern, candidate) { - for (let i = objects.length - 1; i >= 0; i--) { - const object = objects[i]; - const pattern = getPattern(object); - if (pattern === null || pattern === void 0 ? void 0 : pattern.test(candidate)) { - return object; - } - } -} -//# sourceMappingURL=module-type-classifier.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/module-type-classifier.js.map b/node_modules/ts-node/dist/module-type-classifier.js.map deleted file mode 100644 index 731dfad..0000000 --- a/node_modules/ts-node/dist/module-type-classifier.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"module-type-classifier.js","sourceRoot":"","sources":["../src/module-type-classifier.ts"],"names":[],"mappings":";;;AACA,iDAAoD;AACpD,iCAAwD;AAwBxD;;;;;GAKG;AACH,SAAgB,0BAA0B,CACxC,OAAoC;IAEpC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAClD,MAAM,QAAQ,GACZ,SAAS,KAAK,SAAS;QACrB,CAAC,CAAC,IAAA,uBAAgB,EAAC,SAAS,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;QAChD,CAAC,CAAC,SAAS,CAAC;IAEhB,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC,CAAC,GAAG,CACzD,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE;QACnB,MAAM,OAAO,GAAG,IAAA,uBAAgB,EAAC,QAAQ,CAAC,CAAC;QAC3C,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,QAAS,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC;IAC7D,CAAC,CACF,CAAC;IAEF,MAAM,eAAe,GACnB;QACE,OAAO,EAAE;YACP,UAAU,EAAE,MAAM;SACnB;QACD,GAAG,EAAE;YACH,UAAU,EAAE,KAAK;SAClB;QACD,GAAG,EAAE;YACH,UAAU,EAAE,KAAK;SAClB;KACF,CAAC;IACJ,MAAM,IAAI,GAAG,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type { ModuleTypeOverride, ModuleTypes } from '.';\nimport { getPatternFromSpec } from './ts-internals';\nimport { cachedLookup, normalizeSlashes } from './util';\n\n// Logic to support our `moduleTypes` option, which allows overriding node's default ESM / CJS\n// classification of `.js` files based on package.json `type` field.\n\n/**\n * Seperate internal type because `auto` is clearer than `package`, but changing\n * the public API is a breaking change.\n * @internal\n */\nexport type InternalModuleTypeOverride = 'cjs' | 'esm' | 'auto';\n/** @internal */\nexport interface ModuleTypeClassification {\n moduleType: InternalModuleTypeOverride;\n}\n/** @internal */\nexport interface ModuleTypeClassifierOptions {\n basePath?: string;\n patterns?: ModuleTypes;\n}\n/** @internal */\nexport type ModuleTypeClassifier = ReturnType<\n typeof createModuleTypeClassifier\n>;\n/**\n * @internal\n * May receive non-normalized options -- basePath and patterns -- and will normalize them\n * internally.\n * However, calls to `classifyModule` must pass pre-normalized paths!\n */\nexport function createModuleTypeClassifier(\n options: ModuleTypeClassifierOptions\n) {\n const { patterns, basePath: _basePath } = options;\n const basePath =\n _basePath !== undefined\n ? normalizeSlashes(_basePath).replace(/\\/$/, '')\n : undefined;\n\n const patternTypePairs = Object.entries(patterns ?? []).map(\n ([_pattern, type]) => {\n const pattern = normalizeSlashes(_pattern);\n return { pattern: parsePattern(basePath!, pattern), type };\n }\n );\n\n const classifications: Record =\n {\n package: {\n moduleType: 'auto',\n },\n cjs: {\n moduleType: 'cjs',\n },\n esm: {\n moduleType: 'esm',\n },\n };\n const auto = classifications.package;\n\n // Passed path must be normalized!\n function classifyModuleNonCached(path: string): ModuleTypeClassification {\n const matched = matchPatterns(patternTypePairs, (_) => _.pattern, path);\n if (matched) return classifications[matched.type];\n return auto;\n }\n\n const classifyModule = cachedLookup(classifyModuleNonCached);\n\n function classifyModuleAuto(path: String) {\n return auto;\n }\n\n return {\n classifyModuleByModuleTypeOverrides: patternTypePairs.length\n ? classifyModule\n : classifyModuleAuto,\n };\n}\n\nfunction parsePattern(basePath: string, patternString: string): RegExp {\n const pattern = getPatternFromSpec(patternString, basePath);\n return pattern !== undefined ? new RegExp(pattern) : /(?:)/;\n}\n\nfunction matchPatterns(\n objects: T[],\n getPattern: (t: T) => RegExp,\n candidate: string\n): T | undefined {\n for (let i = objects.length - 1; i >= 0; i--) {\n const object = objects[i];\n const pattern = getPattern(object);\n\n if (pattern?.test(candidate)) {\n return object;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/node-module-type-classifier.d.ts b/node_modules/ts-node/dist/node-module-type-classifier.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/node-module-type-classifier.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/node-module-type-classifier.js b/node_modules/ts-node/dist/node-module-type-classifier.js deleted file mode 100644 index 664cd9f..0000000 --- a/node_modules/ts-node/dist/node-module-type-classifier.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.classifyModule = void 0; -const node_internal_modules_cjs_loader_1 = require("../dist-raw/node-internal-modules-cjs-loader"); -/** - * Determine how to emit a module based on tsconfig "module" and package.json "type" - * - * Supports module=nodenext/node16 with transpileOnly, where we cannot ask the - * TS typechecker to tell us if a file is CJS or ESM. - * - * Return values indicate: - * - cjs - * - esm - * - nodecjs == node-flavored cjs where dynamic imports are *not* transformed into `require()` - * - undefined == emit according to tsconfig `module` config, whatever that is - * @internal - */ -function classifyModule(nativeFilename, isNodeModuleType) { - // [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS] - const lastDotIndex = nativeFilename.lastIndexOf('.'); - const ext = lastDotIndex >= 0 ? nativeFilename.slice(lastDotIndex) : ''; - switch (ext) { - case '.cjs': - case '.cts': - return isNodeModuleType ? 'nodecjs' : 'cjs'; - case '.mjs': - case '.mts': - return isNodeModuleType ? 'nodeesm' : 'esm'; - } - if (isNodeModuleType) { - const packageScope = (0, node_internal_modules_cjs_loader_1.readPackageScope)(nativeFilename); - if (packageScope && packageScope.data.type === 'module') - return 'nodeesm'; - return 'nodecjs'; - } - return undefined; -} -exports.classifyModule = classifyModule; -//# sourceMappingURL=node-module-type-classifier.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/node-module-type-classifier.js.map b/node_modules/ts-node/dist/node-module-type-classifier.js.map deleted file mode 100644 index b2f4bad..0000000 --- a/node_modules/ts-node/dist/node-module-type-classifier.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node-module-type-classifier.js","sourceRoot":"","sources":["../src/node-module-type-classifier.ts"],"names":[],"mappings":";;;AAAA,mGAAgF;AAEhF;;;;;;;;;;;;GAYG;AACH,SAAgB,cAAc,CAC5B,cAAsB,EACtB,gBAAyB;IAEzB,wCAAwC;IACxC,MAAM,YAAY,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACrD,MAAM,GAAG,GAAG,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACxE,QAAQ,GAAG,EAAE;QACX,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM;YACT,OAAO,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;QAC9C,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM;YACT,OAAO,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;KAC/C;IACD,IAAI,gBAAgB,EAAE;QACpB,MAAM,YAAY,GAAG,IAAA,mDAAgB,EAAC,cAAc,CAAC,CAAC;QACtD,IAAI,YAAY,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,SAAS,CAAC;QAC1E,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AArBD,wCAqBC","sourcesContent":["import { readPackageScope } from '../dist-raw/node-internal-modules-cjs-loader';\n\n/**\n * Determine how to emit a module based on tsconfig \"module\" and package.json \"type\"\n *\n * Supports module=nodenext/node16 with transpileOnly, where we cannot ask the\n * TS typechecker to tell us if a file is CJS or ESM.\n *\n * Return values indicate:\n * - cjs\n * - esm\n * - nodecjs == node-flavored cjs where dynamic imports are *not* transformed into `require()`\n * - undefined == emit according to tsconfig `module` config, whatever that is\n * @internal\n */\nexport function classifyModule(\n nativeFilename: string,\n isNodeModuleType: boolean\n): 'nodecjs' | 'cjs' | 'esm' | 'nodeesm' | undefined {\n // [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]\n const lastDotIndex = nativeFilename.lastIndexOf('.');\n const ext = lastDotIndex >= 0 ? nativeFilename.slice(lastDotIndex) : '';\n switch (ext) {\n case '.cjs':\n case '.cts':\n return isNodeModuleType ? 'nodecjs' : 'cjs';\n case '.mjs':\n case '.mts':\n return isNodeModuleType ? 'nodeesm' : 'esm';\n }\n if (isNodeModuleType) {\n const packageScope = readPackageScope(nativeFilename);\n if (packageScope && packageScope.data.type === 'module') return 'nodeesm';\n return 'nodecjs';\n }\n return undefined;\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/repl.d.ts b/node_modules/ts-node/dist/repl.d.ts deleted file mode 100644 index 4cd68bb..0000000 --- a/node_modules/ts-node/dist/repl.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -/// -import { Service, CreateOptions } from './index'; -export interface ReplService { - readonly state: EvalState; - /** - * Bind this REPL to a ts-node compiler service. A compiler service must be bound before `eval`-ing code or starting the REPL - */ - setService(service: Service): void; - /** - * Append code to the virtual source file, compile it to JavaScript, throw semantic errors if the typechecker is enabled, - * and execute it. - * - * Note: typically, you will want to call `start()` instead of using this method. - * - * @param code string of TypeScript. - */ - evalCode(code: string): any; - /** - * `eval` implementation compatible with node's REPL API - * - * Can be used in advanced scenarios if you want to manually create your own - * node REPL instance and delegate eval to this `ReplService`. - * - * Example: - * - * import {start} from 'repl'; - * const replService: tsNode.ReplService = ...; // assuming you have already created a ts-node ReplService - * const nodeRepl = start({eval: replService.eval}); - */ - nodeEval(code: string, context: any, _filename: string, callback: (err: Error | null, result?: any) => any): void; - evalAwarePartialHost: EvalAwarePartialHost; - /** Start a node REPL */ - start(): void; - /** - * Start a node REPL, evaling a string of TypeScript before it starts. - * @deprecated - */ - start(code: string): void; -} -/** @category REPL */ -export interface CreateReplOptions { - service?: Service; - state?: EvalState; - stdin?: NodeJS.ReadableStream; - stdout?: NodeJS.WritableStream; - stderr?: NodeJS.WritableStream; -} -/** - * Create a ts-node REPL instance. - * - * Pay close attention to the example below. Today, the API requires a few lines - * of boilerplate to correctly bind the `ReplService` to the ts-node `Service` and - * vice-versa. - * - * Usage example: - * - * const repl = tsNode.createRepl(); - * const service = tsNode.create({...repl.evalAwarePartialHost}); - * repl.setService(service); - * repl.start(); - * - * @category REPL - */ -export declare function createRepl(options?: CreateReplOptions): ReplService; -/** - * Eval state management. Stores virtual `[eval].ts` file - */ -export declare class EvalState { - path: string; - __tsNodeEvalStateBrand: unknown; - constructor(path: string); -} -/** - * Filesystem host functions which are aware of the "virtual" `[eval].ts`, ``, or `[stdin].ts` file used to compile REPL inputs. - * Must be passed to `create()` to create a ts-node compiler service which can compile REPL inputs. - */ -export declare type EvalAwarePartialHost = Pick; -export declare function createEvalAwarePartialHost(state: EvalState, composeWith?: EvalAwarePartialHost): EvalAwarePartialHost; diff --git a/node_modules/ts-node/dist/repl.js b/node_modules/ts-node/dist/repl.js deleted file mode 100644 index 6955818..0000000 --- a/node_modules/ts-node/dist/repl.js +++ /dev/null @@ -1,561 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.setupContext = exports.createEvalAwarePartialHost = exports.EvalState = exports.createRepl = exports.REPL_NAME = exports.REPL_FILENAME = exports.STDIN_NAME = exports.STDIN_FILENAME = exports.EVAL_NAME = exports.EVAL_FILENAME = void 0; -const os_1 = require("os"); -const path_1 = require("path"); -const repl_1 = require("repl"); -const vm_1 = require("vm"); -const index_1 = require("./index"); -const fs_1 = require("fs"); -const console_1 = require("console"); -const assert = require("assert"); -const module_1 = require("module"); -// Lazy-loaded. -let _processTopLevelAwait; -function getProcessTopLevelAwait() { - if (_processTopLevelAwait === undefined) { - ({ - processTopLevelAwait: _processTopLevelAwait, - } = require('../dist-raw/node-internal-repl-await')); - } - return _processTopLevelAwait; -} -let diff; -function getDiffLines() { - if (diff === undefined) { - diff = require('diff'); - } - return diff.diffLines; -} -/** @internal */ -exports.EVAL_FILENAME = `[eval].ts`; -/** @internal */ -exports.EVAL_NAME = `[eval]`; -/** @internal */ -exports.STDIN_FILENAME = `[stdin].ts`; -/** @internal */ -exports.STDIN_NAME = `[stdin]`; -/** @internal */ -exports.REPL_FILENAME = '.ts'; -/** @internal */ -exports.REPL_NAME = ''; -/** - * Create a ts-node REPL instance. - * - * Pay close attention to the example below. Today, the API requires a few lines - * of boilerplate to correctly bind the `ReplService` to the ts-node `Service` and - * vice-versa. - * - * Usage example: - * - * const repl = tsNode.createRepl(); - * const service = tsNode.create({...repl.evalAwarePartialHost}); - * repl.setService(service); - * repl.start(); - * - * @category REPL - */ -function createRepl(options = {}) { - var _a, _b, _c, _d, _e; - const { ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl = true } = options; - let service = options.service; - let nodeReplServer; - // If `useGlobal` is not true, then REPL creates a context when started. - // This stores a reference to it or to `global`, whichever is used, after REPL has started. - let context; - const state = (_a = options.state) !== null && _a !== void 0 ? _a : new EvalState((0, path_1.join)(process.cwd(), exports.REPL_FILENAME)); - const evalAwarePartialHost = createEvalAwarePartialHost(state, options.composeWithEvalAwarePartialHost); - const stdin = (_b = options.stdin) !== null && _b !== void 0 ? _b : process.stdin; - const stdout = (_c = options.stdout) !== null && _c !== void 0 ? _c : process.stdout; - const stderr = (_d = options.stderr) !== null && _d !== void 0 ? _d : process.stderr; - const _console = stdout === process.stdout && stderr === process.stderr - ? console - : new console_1.Console(stdout, stderr); - const replService = { - state: (_e = options.state) !== null && _e !== void 0 ? _e : new EvalState((0, path_1.join)(process.cwd(), exports.EVAL_FILENAME)), - setService, - evalCode, - evalCodeInternal, - nodeEval, - evalAwarePartialHost, - start, - startInternal, - stdin, - stdout, - stderr, - console: _console, - }; - return replService; - function setService(_service) { - service = _service; - if (ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl) { - service.addDiagnosticFilter({ - appliesToAllFiles: false, - filenamesAbsolute: [state.path], - diagnosticsIgnored: [ - 2393, - 6133, - 7027, - ...(service.shouldReplAwait ? topLevelAwaitDiagnosticCodes : []), - ], - }); - } - } - function evalCode(code) { - const result = appendCompileAndEvalInput({ - service: service, - state, - input: code, - context, - overrideIsCompletion: false, - }); - assert(result.containsTopLevelAwait === false); - return result.value; - } - function evalCodeInternal(options) { - const { code, enableTopLevelAwait, context } = options; - return appendCompileAndEvalInput({ - service: service, - state, - input: code, - enableTopLevelAwait, - context, - }); - } - function nodeEval(code, context, _filename, callback) { - // TODO: Figure out how to handle completion here. - if (code === '.scope') { - callback(null); - return; - } - try { - const evalResult = evalCodeInternal({ - code, - enableTopLevelAwait: true, - context, - }); - if (evalResult.containsTopLevelAwait) { - (async () => { - try { - callback(null, await evalResult.valuePromise); - } - catch (promiseError) { - handleError(promiseError); - } - })(); - } - else { - callback(null, evalResult.value); - } - } - catch (error) { - handleError(error); - } - // Log TSErrors, check if they're recoverable, log helpful hints for certain - // well-known errors, and invoke `callback()` - // TODO should evalCode API get the same error-handling benefits? - function handleError(error) { - var _a, _b; - // Don't show TLA hint if the user explicitly disabled repl top level await - const canLogTopLevelAwaitHint = service.options.experimentalReplAwait !== false && - !service.shouldReplAwait; - if (error instanceof index_1.TSError) { - // Support recoverable compilations using >= node 6. - if (repl_1.Recoverable && isRecoverable(error)) { - callback(new repl_1.Recoverable(error)); - return; - } - else { - _console.error(error); - if (canLogTopLevelAwaitHint && - error.diagnosticCodes.some((dC) => topLevelAwaitDiagnosticCodes.includes(dC))) { - _console.error(getTopLevelAwaitHint()); - } - callback(null); - } - } - else { - let _error = error; - if (canLogTopLevelAwaitHint && - _error instanceof SyntaxError && - ((_a = _error.message) === null || _a === void 0 ? void 0 : _a.includes('await is only valid'))) { - try { - // Only way I know to make our hint appear after the error - _error.message += `\n\n${getTopLevelAwaitHint()}`; - _error.stack = (_b = _error.stack) === null || _b === void 0 ? void 0 : _b.replace(/(SyntaxError:.*)/, (_, $1) => `${$1}\n\n${getTopLevelAwaitHint()}`); - } - catch { } - } - callback(_error); - } - } - function getTopLevelAwaitHint() { - return `Hint: REPL top-level await requires TypeScript version 3.8 or higher and target ES2018 or higher. You are using TypeScript ${service.ts.version} and target ${service.ts.ScriptTarget[service.config.options.target]}.`; - } - } - // Note: `code` argument is deprecated - function start(code) { - startInternal({ code }); - } - // Note: `code` argument is deprecated - function startInternal(options) { - const { code, forceToBeModule = true, ...optionsOverride } = options !== null && options !== void 0 ? options : {}; - // TODO assert that `service` is set; remove all `service!` non-null assertions - // Eval incoming code before the REPL starts. - // Note: deprecated - if (code) { - try { - evalCode(`${code}\n`); - } - catch (err) { - _console.error(err); - // Note: should not be killing the process here, but this codepath is deprecated anyway - process.exit(1); - } - } - // In case the typescript compiler hasn't compiled anything yet, - // make it run though compilation at least one time before - // the REPL starts for a snappier user experience on startup. - service === null || service === void 0 ? void 0 : service.compile('', state.path); - const repl = (0, repl_1.start)({ - prompt: '> ', - input: replService.stdin, - output: replService.stdout, - // Mimicking node's REPL implementation: https://github.com/nodejs/node/blob/168b22ba073ee1cbf8d0bcb4ded7ff3099335d04/lib/internal/repl.js#L28-L30 - terminal: stdout.isTTY && - !parseInt(index_1.env.NODE_NO_READLINE, 10), - eval: nodeEval, - useGlobal: true, - ...optionsOverride, - }); - nodeReplServer = repl; - context = repl.context; - // Bookmark the point where we should reset the REPL state. - const resetEval = appendToEvalState(state, ''); - function reset() { - resetEval(); - // Hard fix for TypeScript forcing `Object.defineProperty(exports, ...)`. - runInContext('exports = module.exports', state.path, context); - if (forceToBeModule) { - state.input += 'export {};void 0;\n'; - } - // Declare node builtins. - // Skip the same builtins as `addBuiltinLibsToObject`: - // those starting with _ - // those containing / - // those that already exist as globals - // Intentionally suppress type errors in case @types/node does not declare any of them, and because - // `declare import` is technically invalid syntax. - // Avoid this when in transpileOnly, because third-party transpilers may not handle `declare import`. - if (!(service === null || service === void 0 ? void 0 : service.transpileOnly)) { - state.input += `// @ts-ignore\n${module_1.builtinModules - .filter((name) => !name.startsWith('_') && - !name.includes('/') && - !['console', 'module', 'process'].includes(name)) - .map((name) => `declare import ${name} = require('${name}')`) - .join(';')}\n`; - } - } - reset(); - repl.on('reset', reset); - repl.defineCommand('type', { - help: 'Check the type of a TypeScript identifier', - action: function (identifier) { - if (!identifier) { - repl.displayPrompt(); - return; - } - const undo = appendToEvalState(state, identifier); - const { name, comment } = service.getTypeInfo(state.input, state.path, state.input.length); - undo(); - if (name) - repl.outputStream.write(`${name}\n`); - if (comment) - repl.outputStream.write(`${comment}\n`); - repl.displayPrompt(); - }, - }); - // Set up REPL history when available natively via node.js >= 11. - if (repl.setupHistory) { - const historyPath = index_1.env.TS_NODE_HISTORY || (0, path_1.join)((0, os_1.homedir)(), '.ts_node_repl_history'); - repl.setupHistory(historyPath, (err) => { - if (!err) - return; - _console.error(err); - process.exit(1); - }); - } - return repl; - } -} -exports.createRepl = createRepl; -/** - * Eval state management. Stores virtual `[eval].ts` file - */ -class EvalState { - constructor(path) { - this.path = path; - /** @internal */ - this.input = ''; - /** @internal */ - this.output = ''; - /** @internal */ - this.version = 0; - /** @internal */ - this.lines = 0; - } -} -exports.EvalState = EvalState; -function createEvalAwarePartialHost(state, composeWith) { - function readFile(path) { - if (path === state.path) - return state.input; - if (composeWith === null || composeWith === void 0 ? void 0 : composeWith.readFile) - return composeWith.readFile(path); - try { - return (0, fs_1.readFileSync)(path, 'utf8'); - } - catch (err) { - /* Ignore. */ - } - } - function fileExists(path) { - if (path === state.path) - return true; - if (composeWith === null || composeWith === void 0 ? void 0 : composeWith.fileExists) - return composeWith.fileExists(path); - try { - const stats = (0, fs_1.statSync)(path); - return stats.isFile() || stats.isFIFO(); - } - catch (err) { - return false; - } - } - return { readFile, fileExists }; -} -exports.createEvalAwarePartialHost = createEvalAwarePartialHost; -const sourcemapCommentRe = /\/\/# ?sourceMappingURL=\S+[\s\r\n]*$/; -/** - * Evaluate the code snippet. - * - * Append it to virtual .ts file, compile, handle compiler errors, compute a diff of the JS, and eval any code that - * appears as "added" in the diff. - */ -function appendCompileAndEvalInput(options) { - const { service, state, wrappedErr, enableTopLevelAwait = false, context, overrideIsCompletion, } = options; - let { input } = options; - // It's confusing for `{ a: 1 }` to be interpreted as a block statement - // rather than an object literal. So, we first try to wrap it in - // parentheses, so that it will be interpreted as an expression. - // Based on https://github.com/nodejs/node/blob/c2e6822153bad023ab7ebd30a6117dcc049e475c/lib/repl.js#L413-L422 - let wrappedCmd = false; - if (!wrappedErr && /^\s*{/.test(input) && !/;\s*$/.test(input)) { - input = `(${input.trim()})\n`; - wrappedCmd = true; - } - const lines = state.lines; - const isCompletion = overrideIsCompletion !== null && overrideIsCompletion !== void 0 ? overrideIsCompletion : !/\n$/.test(input); - const undo = appendToEvalState(state, input); - let output; - // Based on https://github.com/nodejs/node/blob/92573721c7cff104ccb82b6ed3e8aa69c4b27510/lib/repl.js#L457-L461 - function adjustUseStrict(code) { - // "void 0" keeps the repl from returning "use strict" as the result - // value for statements and declarations that don't return a value. - return code.replace(/^"use strict";/, '"use strict"; void 0;'); - } - try { - output = service.compile(state.input, state.path, -lines); - } - catch (err) { - undo(); - if (wrappedCmd) { - if (err instanceof index_1.TSError && err.diagnosticCodes[0] === 2339) { - // Ensure consistent and more sane behavior between { a: 1 }['b'] and ({ a: 1 }['b']) - throw err; - } - // Unwrap and try again - return appendCompileAndEvalInput({ - ...options, - wrappedErr: err, - }); - } - if (wrappedErr) - throw wrappedErr; - throw err; - } - output = adjustUseStrict(output); - // Note: REPL does not respect sourcemaps! - // To properly do that, we'd need to prefix the code we eval -- which comes - // from `diffLines` -- with newlines so that it's at the proper line numbers. - // Then we'd need to ensure each bit of eval-ed code, if there are multiples, - // has the sourcemap appended to it. - // We might also need to integrate with our sourcemap hooks' cache; I'm not sure. - const outputWithoutSourcemapComment = output.replace(sourcemapCommentRe, ''); - const oldOutputWithoutSourcemapComment = state.output.replace(sourcemapCommentRe, ''); - // Use `diff` to check for new JavaScript to execute. - const changes = getDiffLines()(oldOutputWithoutSourcemapComment, outputWithoutSourcemapComment); - if (isCompletion) { - undo(); - } - else { - state.output = output; - // Insert a semicolon to make sure that the code doesn't interact with the next line, - // for example to prevent `2\n+ 2` from producing 4. - // This is safe since the output will not change since we can only get here with successful inputs, - // and adding a semicolon to the end of a successful input won't ever change the output. - state.input = state.input.replace(/([^\n\s])([\n\s]*)$/, (all, lastChar, whitespace) => { - if (lastChar !== ';') - return `${lastChar};${whitespace}`; - return all; - }); - } - let commands = []; - let containsTopLevelAwait = false; - // Build a list of "commands": bits of JS code in the diff that must be executed. - for (const change of changes) { - if (change.added) { - if (enableTopLevelAwait && - service.shouldReplAwait && - change.value.indexOf('await') > -1) { - const processTopLevelAwait = getProcessTopLevelAwait(); - // Newline prevents comments to mess with wrapper - const wrappedResult = processTopLevelAwait(change.value + '\n'); - if (wrappedResult !== null) { - containsTopLevelAwait = true; - commands.push({ - mustAwait: true, - execCommand: () => runInContext(wrappedResult, state.path, context), - }); - continue; - } - } - commands.push({ - execCommand: () => runInContext(change.value, state.path, context), - }); - } - } - // Execute all commands asynchronously if necessary, returning the result or a - // promise of the result. - if (containsTopLevelAwait) { - return { - containsTopLevelAwait, - valuePromise: (async () => { - let value; - for (const command of commands) { - const r = command.execCommand(); - value = command.mustAwait ? await r : r; - } - return value; - })(), - }; - } - else { - return { - containsTopLevelAwait: false, - value: commands.reduce((_, c) => c.execCommand(), undefined), - }; - } -} -/** - * Low-level execution of JS code in context - */ -function runInContext(code, filename, context) { - const script = new vm_1.Script(code, { filename }); - if (context === undefined || context === global) { - return script.runInThisContext(); - } - else { - return script.runInContext(context); - } -} -/** - * Append to the eval instance and return an undo function. - */ -function appendToEvalState(state, input) { - const undoInput = state.input; - const undoVersion = state.version; - const undoOutput = state.output; - const undoLines = state.lines; - state.input += input; - state.lines += lineCount(input); - state.version++; - return function () { - state.input = undoInput; - state.output = undoOutput; - state.version = undoVersion; - state.lines = undoLines; - }; -} -/** - * Count the number of lines. - */ -function lineCount(value) { - let count = 0; - for (const char of value) { - if (char === '\n') { - count++; - } - } - return count; -} -/** - * TS diagnostic codes which are recoverable, meaning that the user likely entered an incomplete line of code - * and should be prompted for the next. For example, starting a multi-line for() loop and not finishing it. - * null value means code is always recoverable. `Set` means code is only recoverable when occurring alongside at least one - * of the other codes. - */ -const RECOVERY_CODES = new Map([ - [1003, null], - [1005, null], - [1109, null], - [1126, null], - [ - 1136, - new Set([1005]), // happens when typing out an object literal or block scope across multiple lines: '{ foo: 123,' - ], - [1160, null], - [1161, null], - [2355, null], - [2391, null], - [ - 7010, - new Set([1005]), // happens when fn signature spread across multiple lines: 'function a(\nb: any\n) {' - ], -]); -/** - * Diagnostic codes raised when using top-level await. - * These are suppressed when top-level await is enabled. - * When it is *not* enabled, these trigger a helpful hint about enabling top-level await. - */ -const topLevelAwaitDiagnosticCodes = [ - 1375, - 1378, - 1431, - 1432, // Top-level 'for await' loops are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher. -]; -/** - * Check if a function can recover gracefully. - */ -function isRecoverable(error) { - return error.diagnosticCodes.every((code) => { - const deps = RECOVERY_CODES.get(code); - return (deps === null || - (deps && error.diagnosticCodes.some((code) => deps.has(code)))); - }); -} -/** - * @internal - * Set properties on `context` before eval-ing [stdin] or [eval] input. - */ -function setupContext(context, module, filenameAndDirname) { - if (filenameAndDirname) { - context.__dirname = '.'; - context.__filename = `[${filenameAndDirname}]`; - } - context.module = module; - context.exports = module.exports; - context.require = module.require.bind(module); -} -exports.setupContext = setupContext; -//# sourceMappingURL=repl.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/repl.js.map b/node_modules/ts-node/dist/repl.js.map deleted file mode 100644 index c375c84..0000000 --- a/node_modules/ts-node/dist/repl.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"repl.js","sourceRoot":"","sources":["../src/repl.ts"],"names":[],"mappings":";;;AACA,2BAA6B;AAC7B,+BAA4B;AAC5B,+BAKc;AACd,2BAAoD;AACpD,mCAA+D;AAC/D,2BAA4C;AAC5C,qCAAkC;AAClC,iCAAiC;AAGjC,mCAAwC;AAExC,eAAe;AACf,IAAI,qBAAqD,CAAC;AAC1D,SAAS,uBAAuB;IAC9B,IAAI,qBAAqB,KAAK,SAAS,EAAE;QACvC,CAAC;YACC,oBAAoB,EAAE,qBAAqB;SAC5C,GAAG,OAAO,CAAC,sCAAsC,CAAC,CAAC,CAAC;KACtD;IACD,OAAO,qBAAqB,CAAC;AAC/B,CAAC;AACD,IAAI,IAAkB,CAAC;AACvB,SAAS,YAAY;IACnB,IAAI,IAAI,KAAK,SAAS,EAAE;QACtB,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;KACxB;IACD,OAAO,IAAI,CAAC,SAAS,CAAC;AACxB,CAAC;AAED,gBAAgB;AACH,QAAA,aAAa,GAAG,WAAW,CAAC;AACzC,gBAAgB;AACH,QAAA,SAAS,GAAG,QAAQ,CAAC;AAClC,gBAAgB;AACH,QAAA,cAAc,GAAG,YAAY,CAAC;AAC3C,gBAAgB;AACH,QAAA,UAAU,GAAG,SAAS,CAAC;AACpC,gBAAgB;AACH,QAAA,aAAa,GAAG,WAAW,CAAC;AACzC,gBAAgB;AACH,QAAA,SAAS,GAAG,QAAQ,CAAC;AAsFlC;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,UAAU,CAAC,UAA6B,EAAE;;IACxD,MAAM,EAAE,iDAAiD,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAC7E,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAC9B,IAAI,cAA0B,CAAC;IAC/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CAAC;QACxB,OAAO,CAAC,UAAU,GAAG,IAAI,kBAAkB,GAAG,CAAC;KAChD;IACD,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IACjC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAZD,oCAYC","sourcesContent":["import type * as _diff from 'diff';\nimport { homedir } from 'os';\nimport { join } from 'path';\nimport {\n Recoverable,\n ReplOptions,\n REPLServer,\n start as nodeReplStart,\n} from 'repl';\nimport { Context, createContext, Script } from 'vm';\nimport { Service, CreateOptions, TSError, env } from './index';\nimport { readFileSync, statSync } from 'fs';\nimport { Console } from 'console';\nimport * as assert from 'assert';\nimport type * as tty from 'tty';\nimport type * as Module from 'module';\nimport { builtinModules } from 'module';\n\n// Lazy-loaded.\nlet _processTopLevelAwait: (src: string) => string | null;\nfunction getProcessTopLevelAwait() {\n if (_processTopLevelAwait === undefined) {\n ({\n processTopLevelAwait: _processTopLevelAwait,\n } = require('../dist-raw/node-internal-repl-await'));\n }\n return _processTopLevelAwait;\n}\nlet diff: typeof _diff;\nfunction getDiffLines() {\n if (diff === undefined) {\n diff = require('diff');\n }\n return diff.diffLines;\n}\n\n/** @internal */\nexport const EVAL_FILENAME = `[eval].ts`;\n/** @internal */\nexport const EVAL_NAME = `[eval]`;\n/** @internal */\nexport const STDIN_FILENAME = `[stdin].ts`;\n/** @internal */\nexport const STDIN_NAME = `[stdin]`;\n/** @internal */\nexport const REPL_FILENAME = '.ts';\n/** @internal */\nexport const REPL_NAME = '';\n\nexport interface ReplService {\n readonly state: EvalState;\n /**\n * Bind this REPL to a ts-node compiler service. A compiler service must be bound before `eval`-ing code or starting the REPL\n */\n setService(service: Service): void;\n /**\n * Append code to the virtual source file, compile it to JavaScript, throw semantic errors if the typechecker is enabled,\n * and execute it.\n *\n * Note: typically, you will want to call `start()` instead of using this method.\n *\n * @param code string of TypeScript.\n */\n evalCode(code: string): any;\n /** @internal */\n evalCodeInternal(opts: {\n code: string;\n enableTopLevelAwait?: boolean;\n context?: Context;\n }):\n | {\n containsTopLevelAwait: true;\n valuePromise: Promise;\n }\n | {\n containsTopLevelAwait: false;\n value: any;\n };\n /**\n * `eval` implementation compatible with node's REPL API\n *\n * Can be used in advanced scenarios if you want to manually create your own\n * node REPL instance and delegate eval to this `ReplService`.\n *\n * Example:\n *\n * import {start} from 'repl';\n * const replService: tsNode.ReplService = ...; // assuming you have already created a ts-node ReplService\n * const nodeRepl = start({eval: replService.eval});\n */\n nodeEval(\n code: string,\n // TODO change to `Context` in a future release? Technically a breaking change\n context: any,\n _filename: string,\n callback: (err: Error | null, result?: any) => any\n ): void;\n evalAwarePartialHost: EvalAwarePartialHost;\n /** Start a node REPL */\n start(): void;\n /**\n * Start a node REPL, evaling a string of TypeScript before it starts.\n * @deprecated\n */\n start(code: string): void;\n /** @internal */\n startInternal(opts?: ReplOptions): REPLServer;\n /** @internal */\n readonly stdin: NodeJS.ReadableStream;\n /** @internal */\n readonly stdout: NodeJS.WritableStream;\n /** @internal */\n readonly stderr: NodeJS.WritableStream;\n /** @internal */\n readonly console: Console;\n}\n\n/** @category REPL */\nexport interface CreateReplOptions {\n service?: Service;\n state?: EvalState;\n stdin?: NodeJS.ReadableStream;\n stdout?: NodeJS.WritableStream;\n stderr?: NodeJS.WritableStream;\n /** @internal */\n composeWithEvalAwarePartialHost?: EvalAwarePartialHost;\n /**\n * @internal\n * Ignore diagnostics that are annoying when interactively entering input line-by-line.\n */\n ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl?: boolean;\n}\n\n/**\n * Create a ts-node REPL instance.\n *\n * Pay close attention to the example below. Today, the API requires a few lines\n * of boilerplate to correctly bind the `ReplService` to the ts-node `Service` and\n * vice-versa.\n *\n * Usage example:\n *\n * const repl = tsNode.createRepl();\n * const service = tsNode.create({...repl.evalAwarePartialHost});\n * repl.setService(service);\n * repl.start();\n *\n * @category REPL\n */\nexport function createRepl(options: CreateReplOptions = {}) {\n const { ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl = true } = options;\n let service = options.service;\n let nodeReplServer: REPLServer;\n // If `useGlobal` is not true, then REPL creates a context when started.\n // This stores a reference to it or to `global`, whichever is used, after REPL has started.\n let context: Context | undefined;\n const state =\n options.state ?? new EvalState(join(process.cwd(), REPL_FILENAME));\n const evalAwarePartialHost = createEvalAwarePartialHost(\n state,\n options.composeWithEvalAwarePartialHost\n );\n const stdin = options.stdin ?? process.stdin;\n const stdout = options.stdout ?? process.stdout;\n const stderr = options.stderr ?? process.stderr;\n const _console =\n stdout === process.stdout && stderr === process.stderr\n ? console\n : new Console(stdout, stderr);\n\n const replService: ReplService = {\n state: options.state ?? new EvalState(join(process.cwd(), EVAL_FILENAME)),\n setService,\n evalCode,\n evalCodeInternal,\n nodeEval,\n evalAwarePartialHost,\n start,\n startInternal,\n stdin,\n stdout,\n stderr,\n console: _console,\n };\n\n return replService;\n\n function setService(_service: Service) {\n service = _service;\n if (ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl) {\n service.addDiagnosticFilter({\n appliesToAllFiles: false,\n filenamesAbsolute: [state.path],\n diagnosticsIgnored: [\n 2393, // Duplicate function implementation: https://github.com/TypeStrong/ts-node/issues/729\n 6133, // is declared but its value is never read. https://github.com/TypeStrong/ts-node/issues/850\n 7027, // Unreachable code detected. https://github.com/TypeStrong/ts-node/issues/469\n ...(service.shouldReplAwait ? topLevelAwaitDiagnosticCodes : []),\n ],\n });\n }\n }\n\n function evalCode(code: string) {\n const result = appendCompileAndEvalInput({\n service: service!,\n state,\n input: code,\n context,\n overrideIsCompletion: false,\n });\n assert(result.containsTopLevelAwait === false);\n return result.value;\n }\n\n function evalCodeInternal(options: {\n code: string;\n enableTopLevelAwait?: boolean;\n context: Context;\n }) {\n const { code, enableTopLevelAwait, context } = options;\n return appendCompileAndEvalInput({\n service: service!,\n state,\n input: code,\n enableTopLevelAwait,\n context,\n });\n }\n\n function nodeEval(\n code: string,\n context: any,\n _filename: string,\n callback: (err: Error | null, result?: any) => any\n ) {\n // TODO: Figure out how to handle completion here.\n if (code === '.scope') {\n callback(null);\n return;\n }\n\n try {\n const evalResult = evalCodeInternal({\n code,\n enableTopLevelAwait: true,\n context,\n });\n\n if (evalResult.containsTopLevelAwait) {\n (async () => {\n try {\n callback(null, await evalResult.valuePromise);\n } catch (promiseError) {\n handleError(promiseError);\n }\n })();\n } else {\n callback(null, evalResult.value);\n }\n } catch (error) {\n handleError(error);\n }\n\n // Log TSErrors, check if they're recoverable, log helpful hints for certain\n // well-known errors, and invoke `callback()`\n // TODO should evalCode API get the same error-handling benefits?\n function handleError(error: unknown) {\n // Don't show TLA hint if the user explicitly disabled repl top level await\n const canLogTopLevelAwaitHint =\n service!.options.experimentalReplAwait !== false &&\n !service!.shouldReplAwait;\n if (error instanceof TSError) {\n // Support recoverable compilations using >= node 6.\n if (Recoverable && isRecoverable(error)) {\n callback(new Recoverable(error));\n return;\n } else {\n _console.error(error);\n\n if (\n canLogTopLevelAwaitHint &&\n error.diagnosticCodes.some((dC) =>\n topLevelAwaitDiagnosticCodes.includes(dC)\n )\n ) {\n _console.error(getTopLevelAwaitHint());\n }\n callback(null);\n }\n } else {\n let _error = error as Error | undefined;\n if (\n canLogTopLevelAwaitHint &&\n _error instanceof SyntaxError &&\n _error.message?.includes('await is only valid')\n ) {\n try {\n // Only way I know to make our hint appear after the error\n _error.message += `\\n\\n${getTopLevelAwaitHint()}`;\n _error.stack = _error.stack?.replace(\n /(SyntaxError:.*)/,\n (_, $1) => `${$1}\\n\\n${getTopLevelAwaitHint()}`\n );\n } catch {}\n }\n callback(_error as Error);\n }\n }\n function getTopLevelAwaitHint() {\n return `Hint: REPL top-level await requires TypeScript version 3.8 or higher and target ES2018 or higher. You are using TypeScript ${\n service!.ts.version\n } and target ${\n service!.ts.ScriptTarget[service!.config.options.target!]\n }.`;\n }\n }\n\n // Note: `code` argument is deprecated\n function start(code?: string) {\n startInternal({ code });\n }\n\n // Note: `code` argument is deprecated\n function startInternal(\n options?: ReplOptions & { code?: string; forceToBeModule?: boolean }\n ) {\n const { code, forceToBeModule = true, ...optionsOverride } = options ?? {};\n // TODO assert that `service` is set; remove all `service!` non-null assertions\n\n // Eval incoming code before the REPL starts.\n // Note: deprecated\n if (code) {\n try {\n evalCode(`${code}\\n`);\n } catch (err) {\n _console.error(err);\n // Note: should not be killing the process here, but this codepath is deprecated anyway\n process.exit(1);\n }\n }\n\n // In case the typescript compiler hasn't compiled anything yet,\n // make it run though compilation at least one time before\n // the REPL starts for a snappier user experience on startup.\n service?.compile('', state.path);\n\n const repl = nodeReplStart({\n prompt: '> ',\n input: replService.stdin,\n output: replService.stdout,\n // Mimicking node's REPL implementation: https://github.com/nodejs/node/blob/168b22ba073ee1cbf8d0bcb4ded7ff3099335d04/lib/internal/repl.js#L28-L30\n terminal:\n (stdout as tty.WriteStream).isTTY &&\n !parseInt(env.NODE_NO_READLINE!, 10),\n eval: nodeEval,\n useGlobal: true,\n ...optionsOverride,\n });\n\n nodeReplServer = repl;\n context = repl.context;\n\n // Bookmark the point where we should reset the REPL state.\n const resetEval = appendToEvalState(state, '');\n\n function reset() {\n resetEval();\n\n // Hard fix for TypeScript forcing `Object.defineProperty(exports, ...)`.\n runInContext('exports = module.exports', state.path, context);\n if (forceToBeModule) {\n state.input += 'export {};void 0;\\n';\n }\n\n // Declare node builtins.\n // Skip the same builtins as `addBuiltinLibsToObject`:\n // those starting with _\n // those containing /\n // those that already exist as globals\n // Intentionally suppress type errors in case @types/node does not declare any of them, and because\n // `declare import` is technically invalid syntax.\n // Avoid this when in transpileOnly, because third-party transpilers may not handle `declare import`.\n if (!service?.transpileOnly) {\n state.input += `// @ts-ignore\\n${builtinModules\n .filter(\n (name) =>\n !name.startsWith('_') &&\n !name.includes('/') &&\n !['console', 'module', 'process'].includes(name)\n )\n .map((name) => `declare import ${name} = require('${name}')`)\n .join(';')}\\n`;\n }\n }\n\n reset();\n repl.on('reset', reset);\n\n repl.defineCommand('type', {\n help: 'Check the type of a TypeScript identifier',\n action: function (identifier: string) {\n if (!identifier) {\n repl.displayPrompt();\n return;\n }\n\n const undo = appendToEvalState(state, identifier);\n const { name, comment } = service!.getTypeInfo(\n state.input,\n state.path,\n state.input.length\n );\n\n undo();\n\n if (name) repl.outputStream.write(`${name}\\n`);\n if (comment) repl.outputStream.write(`${comment}\\n`);\n repl.displayPrompt();\n },\n });\n\n // Set up REPL history when available natively via node.js >= 11.\n if (repl.setupHistory) {\n const historyPath =\n env.TS_NODE_HISTORY || join(homedir(), '.ts_node_repl_history');\n\n repl.setupHistory(historyPath, (err) => {\n if (!err) return;\n\n _console.error(err);\n process.exit(1);\n });\n }\n\n return repl;\n }\n}\n\n/**\n * Eval state management. Stores virtual `[eval].ts` file\n */\nexport class EvalState {\n /** @internal */\n input = '';\n /** @internal */\n output = '';\n /** @internal */\n version = 0;\n /** @internal */\n lines = 0;\n\n __tsNodeEvalStateBrand: unknown;\n\n constructor(public path: string) {}\n}\n\n/**\n * Filesystem host functions which are aware of the \"virtual\" `[eval].ts`, ``, or `[stdin].ts` file used to compile REPL inputs.\n * Must be passed to `create()` to create a ts-node compiler service which can compile REPL inputs.\n */\nexport type EvalAwarePartialHost = Pick<\n CreateOptions,\n 'readFile' | 'fileExists'\n>;\n\nexport function createEvalAwarePartialHost(\n state: EvalState,\n composeWith?: EvalAwarePartialHost\n): EvalAwarePartialHost {\n function readFile(path: string) {\n if (path === state.path) return state.input;\n\n if (composeWith?.readFile) return composeWith.readFile(path);\n\n try {\n return readFileSync(path, 'utf8');\n } catch (err) {\n /* Ignore. */\n }\n }\n function fileExists(path: string) {\n if (path === state.path) return true;\n\n if (composeWith?.fileExists) return composeWith.fileExists(path);\n\n try {\n const stats = statSync(path);\n return stats.isFile() || stats.isFIFO();\n } catch (err) {\n return false;\n }\n }\n return { readFile, fileExists };\n}\n\nconst sourcemapCommentRe = /\\/\\/# ?sourceMappingURL=\\S+[\\s\\r\\n]*$/;\n\ntype AppendCompileAndEvalInputResult =\n | { containsTopLevelAwait: true; valuePromise: Promise }\n | { containsTopLevelAwait: false; value: any };\n/**\n * Evaluate the code snippet.\n *\n * Append it to virtual .ts file, compile, handle compiler errors, compute a diff of the JS, and eval any code that\n * appears as \"added\" in the diff.\n */\nfunction appendCompileAndEvalInput(options: {\n service: Service;\n state: EvalState;\n input: string;\n wrappedErr?: unknown;\n /** Enable top-level await but only if the TSNode service allows it. */\n enableTopLevelAwait?: boolean;\n context: Context | undefined;\n /**\n * Added so that `evalCode` can be guaranteed *not* to trigger the `isCompletion`\n * codepath. However, the `isCompletion` logic is ancient and maybe should be removed entirely.\n * Nobody's looked at it in a long time.\n */\n overrideIsCompletion?: boolean;\n}): AppendCompileAndEvalInputResult {\n const {\n service,\n state,\n wrappedErr,\n enableTopLevelAwait = false,\n context,\n overrideIsCompletion,\n } = options;\n let { input } = options;\n\n // It's confusing for `{ a: 1 }` to be interpreted as a block statement\n // rather than an object literal. So, we first try to wrap it in\n // parentheses, so that it will be interpreted as an expression.\n // Based on https://github.com/nodejs/node/blob/c2e6822153bad023ab7ebd30a6117dcc049e475c/lib/repl.js#L413-L422\n let wrappedCmd = false;\n if (!wrappedErr && /^\\s*{/.test(input) && !/;\\s*$/.test(input)) {\n input = `(${input.trim()})\\n`;\n wrappedCmd = true;\n }\n\n const lines = state.lines;\n const isCompletion = overrideIsCompletion ?? !/\\n$/.test(input);\n const undo = appendToEvalState(state, input);\n let output: string;\n\n // Based on https://github.com/nodejs/node/blob/92573721c7cff104ccb82b6ed3e8aa69c4b27510/lib/repl.js#L457-L461\n function adjustUseStrict(code: string) {\n // \"void 0\" keeps the repl from returning \"use strict\" as the result\n // value for statements and declarations that don't return a value.\n return code.replace(/^\"use strict\";/, '\"use strict\"; void 0;');\n }\n\n try {\n output = service.compile(state.input, state.path, -lines);\n } catch (err) {\n undo();\n\n if (wrappedCmd) {\n if (err instanceof TSError && err.diagnosticCodes[0] === 2339) {\n // Ensure consistent and more sane behavior between { a: 1 }['b'] and ({ a: 1 }['b'])\n throw err;\n }\n // Unwrap and try again\n return appendCompileAndEvalInput({\n ...options,\n wrappedErr: err,\n });\n }\n\n if (wrappedErr) throw wrappedErr;\n throw err;\n }\n\n output = adjustUseStrict(output);\n\n // Note: REPL does not respect sourcemaps!\n // To properly do that, we'd need to prefix the code we eval -- which comes\n // from `diffLines` -- with newlines so that it's at the proper line numbers.\n // Then we'd need to ensure each bit of eval-ed code, if there are multiples,\n // has the sourcemap appended to it.\n // We might also need to integrate with our sourcemap hooks' cache; I'm not sure.\n const outputWithoutSourcemapComment = output.replace(sourcemapCommentRe, '');\n const oldOutputWithoutSourcemapComment = state.output.replace(\n sourcemapCommentRe,\n ''\n );\n\n // Use `diff` to check for new JavaScript to execute.\n const changes = getDiffLines()(\n oldOutputWithoutSourcemapComment,\n outputWithoutSourcemapComment\n );\n\n if (isCompletion) {\n undo();\n } else {\n state.output = output;\n\n // Insert a semicolon to make sure that the code doesn't interact with the next line,\n // for example to prevent `2\\n+ 2` from producing 4.\n // This is safe since the output will not change since we can only get here with successful inputs,\n // and adding a semicolon to the end of a successful input won't ever change the output.\n state.input = state.input.replace(\n /([^\\n\\s])([\\n\\s]*)$/,\n (all, lastChar, whitespace) => {\n if (lastChar !== ';') return `${lastChar};${whitespace}`;\n return all;\n }\n );\n }\n\n let commands: Array<{ mustAwait?: true; execCommand: () => any }> = [];\n let containsTopLevelAwait = false;\n\n // Build a list of \"commands\": bits of JS code in the diff that must be executed.\n for (const change of changes) {\n if (change.added) {\n if (\n enableTopLevelAwait &&\n service.shouldReplAwait &&\n change.value.indexOf('await') > -1\n ) {\n const processTopLevelAwait = getProcessTopLevelAwait();\n\n // Newline prevents comments to mess with wrapper\n const wrappedResult = processTopLevelAwait(change.value + '\\n');\n if (wrappedResult !== null) {\n containsTopLevelAwait = true;\n commands.push({\n mustAwait: true,\n execCommand: () => runInContext(wrappedResult, state.path, context),\n });\n continue;\n }\n }\n commands.push({\n execCommand: () => runInContext(change.value, state.path, context),\n });\n }\n }\n\n // Execute all commands asynchronously if necessary, returning the result or a\n // promise of the result.\n if (containsTopLevelAwait) {\n return {\n containsTopLevelAwait,\n valuePromise: (async () => {\n let value;\n for (const command of commands) {\n const r = command.execCommand();\n value = command.mustAwait ? await r : r;\n }\n return value;\n })(),\n };\n } else {\n return {\n containsTopLevelAwait: false,\n value: commands.reduce((_, c) => c.execCommand(), undefined),\n };\n }\n}\n\n/**\n * Low-level execution of JS code in context\n */\nfunction runInContext(code: string, filename: string, context?: Context) {\n const script = new Script(code, { filename });\n\n if (context === undefined || context === global) {\n return script.runInThisContext();\n } else {\n return script.runInContext(context);\n }\n}\n\n/**\n * Append to the eval instance and return an undo function.\n */\nfunction appendToEvalState(state: EvalState, input: string) {\n const undoInput = state.input;\n const undoVersion = state.version;\n const undoOutput = state.output;\n const undoLines = state.lines;\n\n state.input += input;\n state.lines += lineCount(input);\n state.version++;\n\n return function () {\n state.input = undoInput;\n state.output = undoOutput;\n state.version = undoVersion;\n state.lines = undoLines;\n };\n}\n\n/**\n * Count the number of lines.\n */\nfunction lineCount(value: string) {\n let count = 0;\n\n for (const char of value) {\n if (char === '\\n') {\n count++;\n }\n }\n\n return count;\n}\n\n/**\n * TS diagnostic codes which are recoverable, meaning that the user likely entered an incomplete line of code\n * and should be prompted for the next. For example, starting a multi-line for() loop and not finishing it.\n * null value means code is always recoverable. `Set` means code is only recoverable when occurring alongside at least one\n * of the other codes.\n */\nconst RECOVERY_CODES: Map | null> = new Map([\n [1003, null], // \"Identifier expected.\"\n [1005, null], // \"')' expected.\", \"'}' expected.\"\n [1109, null], // \"Expression expected.\"\n [1126, null], // \"Unexpected end of text.\"\n [\n 1136, // \"Property assignment expected.\"\n new Set([1005]), // happens when typing out an object literal or block scope across multiple lines: '{ foo: 123,'\n ],\n [1160, null], // \"Unterminated template literal.\"\n [1161, null], // \"Unterminated regular expression literal.\"\n [2355, null], // \"A function whose declared type is neither 'void' nor 'any' must return a value.\"\n [2391, null], // \"Function implementation is missing or not immediately following the declaration.\"\n [\n 7010, // \"Function, which lacks return-type annotation, implicitly has an 'any' return type.\"\n new Set([1005]), // happens when fn signature spread across multiple lines: 'function a(\\nb: any\\n) {'\n ],\n]);\n\n/**\n * Diagnostic codes raised when using top-level await.\n * These are suppressed when top-level await is enabled.\n * When it is *not* enabled, these trigger a helpful hint about enabling top-level await.\n */\nconst topLevelAwaitDiagnosticCodes = [\n 1375, // 'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.\n 1378, // Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.\n 1431, // 'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.\n 1432, // Top-level 'for await' loops are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.\n];\n\n/**\n * Check if a function can recover gracefully.\n */\nfunction isRecoverable(error: TSError) {\n return error.diagnosticCodes.every((code) => {\n const deps = RECOVERY_CODES.get(code);\n return (\n deps === null ||\n (deps && error.diagnosticCodes.some((code) => deps.has(code)))\n );\n });\n}\n\n/**\n * @internal\n * Set properties on `context` before eval-ing [stdin] or [eval] input.\n */\nexport function setupContext(\n context: any,\n module: Module,\n filenameAndDirname: 'eval' | 'stdin' | null\n) {\n if (filenameAndDirname) {\n context.__dirname = '.';\n context.__filename = `[${filenameAndDirname}]`;\n }\n context.module = module;\n context.exports = module.exports;\n context.require = module.require.bind(module);\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/resolver-functions.d.ts b/node_modules/ts-node/dist/resolver-functions.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/resolver-functions.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/resolver-functions.js b/node_modules/ts-node/dist/resolver-functions.js deleted file mode 100644 index 16ed046..0000000 --- a/node_modules/ts-node/dist/resolver-functions.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createResolverFunctions = void 0; -const path_1 = require("path"); -/** - * @internal - * In a factory because these are shared across both CompilerHost and LanguageService codepaths - */ -function createResolverFunctions(kwargs) { - const { host, ts, config, cwd, getCanonicalFileName, projectLocalResolveHelper, options, extensions, } = kwargs; - const moduleResolutionCache = ts.createModuleResolutionCache(cwd, getCanonicalFileName, config.options); - const knownInternalFilenames = new Set(); - /** "Buckets" (module directories) whose contents should be marked "internal" */ - const internalBuckets = new Set(); - // Get bucket for a source filename. Bucket is the containing `./node_modules/*/` directory - // For '/project/node_modules/foo/node_modules/bar/lib/index.js' bucket is '/project/node_modules/foo/node_modules/bar/' - // For '/project/node_modules/foo/node_modules/@scope/bar/lib/index.js' bucket is '/project/node_modules/foo/node_modules/@scope/bar/' - const moduleBucketRe = /.*\/node_modules\/(?:@[^\/]+\/)?[^\/]+\//; - function getModuleBucket(filename) { - const find = moduleBucketRe.exec(filename); - if (find) - return find[0]; - return ''; - } - // Mark that this file and all siblings in its bucket should be "internal" - function markBucketOfFilenameInternal(filename) { - internalBuckets.add(getModuleBucket(filename)); - } - function isFileInInternalBucket(filename) { - return internalBuckets.has(getModuleBucket(filename)); - } - function isFileKnownToBeInternal(filename) { - return knownInternalFilenames.has(filename); - } - /** - * If we need to emit JS for a file, force TS to consider it non-external - */ - const fixupResolvedModule = (resolvedModule) => { - const { resolvedFileName } = resolvedModule; - if (resolvedFileName === undefined) - return; - // [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS] - // .ts,.mts,.cts is always switched to internal - // .js is switched on-demand - if (resolvedModule.isExternalLibraryImport && - ((resolvedFileName.endsWith('.ts') && - !resolvedFileName.endsWith('.d.ts')) || - (resolvedFileName.endsWith('.cts') && - !resolvedFileName.endsWith('.d.cts')) || - (resolvedFileName.endsWith('.mts') && - !resolvedFileName.endsWith('.d.mts')) || - isFileKnownToBeInternal(resolvedFileName) || - isFileInInternalBucket(resolvedFileName))) { - resolvedModule.isExternalLibraryImport = false; - } - if (!resolvedModule.isExternalLibraryImport) { - knownInternalFilenames.add(resolvedFileName); - } - }; - /* - * NOTE: - * Older ts versions do not pass `redirectedReference` nor `options`. - * We must pass `redirectedReference` to newer ts versions, but cannot rely on `options`, hence the weird argument name - */ - const resolveModuleNames = (moduleNames, containingFile, reusedNames, redirectedReference, optionsOnlyWithNewerTsVersions, containingSourceFile) => { - return moduleNames.map((moduleName, i) => { - var _a, _b; - const mode = containingSourceFile - ? (_b = (_a = ts).getModeForResolutionAtIndex) === null || _b === void 0 ? void 0 : _b.call(_a, containingSourceFile, i) - : undefined; - let { resolvedModule } = ts.resolveModuleName(moduleName, containingFile, config.options, host, moduleResolutionCache, redirectedReference, mode); - if (!resolvedModule && options.experimentalTsImportSpecifiers) { - const lastDotIndex = moduleName.lastIndexOf('.'); - const ext = lastDotIndex >= 0 ? moduleName.slice(lastDotIndex) : ''; - if (ext) { - const replacements = extensions.tsResolverEquivalents.get(ext); - for (const replacementExt of replacements !== null && replacements !== void 0 ? replacements : []) { - ({ resolvedModule } = ts.resolveModuleName(moduleName.slice(0, -ext.length) + replacementExt, containingFile, config.options, host, moduleResolutionCache, redirectedReference, mode)); - if (resolvedModule) - break; - } - } - } - if (resolvedModule) { - fixupResolvedModule(resolvedModule); - } - return resolvedModule; - }); - }; - // language service never calls this, but TS docs recommend that we implement it - const getResolvedModuleWithFailedLookupLocationsFromCache = (moduleName, containingFile, resolutionMode) => { - const ret = ts.resolveModuleNameFromCache(moduleName, containingFile, moduleResolutionCache, resolutionMode); - if (ret && ret.resolvedModule) { - fixupResolvedModule(ret.resolvedModule); - } - return ret; - }; - const resolveTypeReferenceDirectives = (typeDirectiveNames, containingFile, redirectedReference, options, containingFileMode // new impliedNodeFormat is accepted by compilerHost - ) => { - // Note: seems to be called with empty typeDirectiveNames array for all files. - // TODO consider using `ts.loadWithTypeDirectiveCache` - return typeDirectiveNames.map((typeDirectiveName) => { - // Copy-pasted from TS source: - const nameIsString = typeof typeDirectiveName === 'string'; - const mode = nameIsString - ? undefined - : ts.getModeForFileReference(typeDirectiveName, containingFileMode); - const strName = nameIsString - ? typeDirectiveName - : typeDirectiveName.fileName.toLowerCase(); - let { resolvedTypeReferenceDirective } = ts.resolveTypeReferenceDirective(strName, containingFile, config.options, host, redirectedReference, undefined, mode); - if (typeDirectiveName === 'node' && !resolvedTypeReferenceDirective) { - // Resolve @types/node relative to project first, then __dirname (copy logic from elsewhere / refactor into reusable function) - let typesNodePackageJsonPath; - try { - typesNodePackageJsonPath = projectLocalResolveHelper('@types/node/package.json', true); - } - catch { } // gracefully do nothing when @types/node is not installed for any reason - if (typesNodePackageJsonPath) { - const typeRoots = [(0, path_1.resolve)(typesNodePackageJsonPath, '../..')]; - ({ resolvedTypeReferenceDirective } = - ts.resolveTypeReferenceDirective(typeDirectiveName, containingFile, { - ...config.options, - typeRoots, - }, host, redirectedReference)); - } - } - if (resolvedTypeReferenceDirective) { - fixupResolvedModule(resolvedTypeReferenceDirective); - } - return resolvedTypeReferenceDirective; - }); - }; - return { - resolveModuleNames, - getResolvedModuleWithFailedLookupLocationsFromCache, - resolveTypeReferenceDirectives, - isFileKnownToBeInternal, - markBucketOfFilenameInternal, - }; -} -exports.createResolverFunctions = createResolverFunctions; -//# sourceMappingURL=resolver-functions.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/resolver-functions.js.map b/node_modules/ts-node/dist/resolver-functions.js.map deleted file mode 100644 index 1ef0d82..0000000 --- a/node_modules/ts-node/dist/resolver-functions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolver-functions.js","sourceRoot":"","sources":["../src/resolver-functions.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAM/B;;;GAGG;AACH,SAAgB,uBAAuB,CAAC,MASvC;IACC,MAAM,EACJ,IAAI,EACJ,EA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kBAAkB;QAClB,mDAAmD;QACnD,8BAA8B;QAC9B,uBAAuB;QACvB,4BAA4B;KAC7B,CAAC;AACJ,CAAC;AAnOD,0DAmOC","sourcesContent":["import { resolve } from 'path';\nimport type { CreateOptions } from '.';\nimport type { Extensions } from './file-extensions';\nimport type { TSCommon, TSInternal } from './ts-compiler-types';\nimport type { ProjectLocalResolveHelper } from './util';\n\n/**\n * @internal\n * In a factory because these are shared across both CompilerHost and LanguageService codepaths\n */\nexport function createResolverFunctions(kwargs: {\n ts: TSCommon;\n host: TSCommon.ModuleResolutionHost;\n cwd: string;\n getCanonicalFileName: (filename: string) => string;\n config: TSCommon.ParsedCommandLine;\n projectLocalResolveHelper: ProjectLocalResolveHelper;\n options: CreateOptions;\n extensions: Extensions;\n}) {\n const {\n host,\n ts,\n config,\n cwd,\n getCanonicalFileName,\n projectLocalResolveHelper,\n options,\n extensions,\n } = kwargs;\n const moduleResolutionCache = ts.createModuleResolutionCache(\n cwd,\n getCanonicalFileName,\n config.options\n );\n const knownInternalFilenames = new Set();\n /** \"Buckets\" (module directories) whose contents should be marked \"internal\" */\n const internalBuckets = new Set();\n\n // Get bucket for a source filename. Bucket is the containing `./node_modules/*/` directory\n // For '/project/node_modules/foo/node_modules/bar/lib/index.js' bucket is '/project/node_modules/foo/node_modules/bar/'\n // For '/project/node_modules/foo/node_modules/@scope/bar/lib/index.js' bucket is '/project/node_modules/foo/node_modules/@scope/bar/'\n const moduleBucketRe = /.*\\/node_modules\\/(?:@[^\\/]+\\/)?[^\\/]+\\//;\n function getModuleBucket(filename: string) {\n const find = moduleBucketRe.exec(filename);\n if (find) return find[0];\n return '';\n }\n\n // Mark that this file and all siblings in its bucket should be \"internal\"\n function markBucketOfFilenameInternal(filename: string) {\n internalBuckets.add(getModuleBucket(filename));\n }\n\n function isFileInInternalBucket(filename: string) {\n return internalBuckets.has(getModuleBucket(filename));\n }\n\n function isFileKnownToBeInternal(filename: string) {\n return knownInternalFilenames.has(filename);\n }\n\n /**\n * If we need to emit JS for a file, force TS to consider it non-external\n */\n const fixupResolvedModule = (\n resolvedModule:\n | TSCommon.ResolvedModule\n | TSCommon.ResolvedTypeReferenceDirective\n ) => {\n const { resolvedFileName } = resolvedModule;\n if (resolvedFileName === undefined) return;\n // [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]\n // .ts,.mts,.cts is always switched to internal\n // .js is switched on-demand\n if (\n resolvedModule.isExternalLibraryImport &&\n ((resolvedFileName.endsWith('.ts') &&\n !resolvedFileName.endsWith('.d.ts')) ||\n (resolvedFileName.endsWith('.cts') &&\n !resolvedFileName.endsWith('.d.cts')) ||\n (resolvedFileName.endsWith('.mts') &&\n !resolvedFileName.endsWith('.d.mts')) ||\n isFileKnownToBeInternal(resolvedFileName) ||\n isFileInInternalBucket(resolvedFileName))\n ) {\n resolvedModule.isExternalLibraryImport = false;\n }\n if (!resolvedModule.isExternalLibraryImport) {\n knownInternalFilenames.add(resolvedFileName);\n }\n };\n /*\n * NOTE:\n * Older ts versions do not pass `redirectedReference` nor `options`.\n * We must pass `redirectedReference` to newer ts versions, but cannot rely on `options`, hence the weird argument name\n */\n const resolveModuleNames: TSCommon.LanguageServiceHost['resolveModuleNames'] =\n (\n moduleNames: string[],\n containingFile: string,\n reusedNames: string[] | undefined,\n redirectedReference: TSCommon.ResolvedProjectReference | undefined,\n optionsOnlyWithNewerTsVersions: TSCommon.CompilerOptions,\n containingSourceFile?: TSCommon.SourceFile\n ): (TSCommon.ResolvedModule | undefined)[] => {\n return moduleNames.map((moduleName, i) => {\n const mode = containingSourceFile\n ? (ts as any as TSInternal).getModeForResolutionAtIndex?.(\n containingSourceFile,\n i\n )\n : undefined;\n let { resolvedModule } = ts.resolveModuleName(\n moduleName,\n containingFile,\n config.options,\n host,\n moduleResolutionCache,\n redirectedReference,\n mode\n );\n if (!resolvedModule && options.experimentalTsImportSpecifiers) {\n const lastDotIndex = moduleName.lastIndexOf('.');\n const ext = lastDotIndex >= 0 ? moduleName.slice(lastDotIndex) : '';\n if (ext) {\n const replacements = extensions.tsResolverEquivalents.get(ext);\n for (const replacementExt of replacements ?? []) {\n ({ resolvedModule } = ts.resolveModuleName(\n moduleName.slice(0, -ext.length) + replacementExt,\n containingFile,\n config.options,\n host,\n moduleResolutionCache,\n redirectedReference,\n mode\n ));\n if (resolvedModule) break;\n }\n }\n }\n if (resolvedModule) {\n fixupResolvedModule(resolvedModule);\n }\n return resolvedModule;\n });\n };\n\n // language service never calls this, but TS docs recommend that we implement it\n const getResolvedModuleWithFailedLookupLocationsFromCache: TSCommon.LanguageServiceHost['getResolvedModuleWithFailedLookupLocationsFromCache'] =\n (\n moduleName,\n containingFile,\n resolutionMode?: TSCommon.ModuleKind.CommonJS | TSCommon.ModuleKind.ESNext\n ): TSCommon.ResolvedModuleWithFailedLookupLocations | undefined => {\n const ret = ts.resolveModuleNameFromCache(\n moduleName,\n containingFile,\n moduleResolutionCache,\n resolutionMode\n );\n if (ret && ret.resolvedModule) {\n fixupResolvedModule(ret.resolvedModule);\n }\n return ret;\n };\n\n const resolveTypeReferenceDirectives: TSCommon.LanguageServiceHost['resolveTypeReferenceDirectives'] =\n (\n typeDirectiveNames: string[] | readonly TSCommon.FileReference[],\n containingFile: string,\n redirectedReference: TSCommon.ResolvedProjectReference | undefined,\n options: TSCommon.CompilerOptions,\n containingFileMode?: TSCommon.SourceFile['impliedNodeFormat'] | undefined // new impliedNodeFormat is accepted by compilerHost\n ): (TSCommon.ResolvedTypeReferenceDirective | undefined)[] => {\n // Note: seems to be called with empty typeDirectiveNames array for all files.\n // TODO consider using `ts.loadWithTypeDirectiveCache`\n return typeDirectiveNames.map((typeDirectiveName) => {\n // Copy-pasted from TS source:\n const nameIsString = typeof typeDirectiveName === 'string';\n const mode = nameIsString\n ? undefined\n : (ts as any as TSInternal).getModeForFileReference!(\n typeDirectiveName,\n containingFileMode\n );\n const strName = nameIsString\n ? typeDirectiveName\n : typeDirectiveName.fileName.toLowerCase();\n let { resolvedTypeReferenceDirective } =\n ts.resolveTypeReferenceDirective(\n strName,\n containingFile,\n config.options,\n host,\n redirectedReference,\n undefined,\n mode\n );\n if (typeDirectiveName === 'node' && !resolvedTypeReferenceDirective) {\n // Resolve @types/node relative to project first, then __dirname (copy logic from elsewhere / refactor into reusable function)\n let typesNodePackageJsonPath: string | undefined;\n try {\n typesNodePackageJsonPath = projectLocalResolveHelper(\n '@types/node/package.json',\n true\n );\n } catch {} // gracefully do nothing when @types/node is not installed for any reason\n if (typesNodePackageJsonPath) {\n const typeRoots = [resolve(typesNodePackageJsonPath, '../..')];\n ({ resolvedTypeReferenceDirective } =\n ts.resolveTypeReferenceDirective(\n typeDirectiveName,\n containingFile,\n {\n ...config.options,\n typeRoots,\n },\n host,\n redirectedReference\n ));\n }\n }\n if (resolvedTypeReferenceDirective) {\n fixupResolvedModule(resolvedTypeReferenceDirective);\n }\n return resolvedTypeReferenceDirective;\n });\n };\n\n return {\n resolveModuleNames,\n getResolvedModuleWithFailedLookupLocationsFromCache,\n resolveTypeReferenceDirectives,\n isFileKnownToBeInternal,\n markBucketOfFilenameInternal,\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/transpilers/swc.d.ts b/node_modules/ts-node/dist/transpilers/swc.d.ts deleted file mode 100644 index 942e746..0000000 --- a/node_modules/ts-node/dist/transpilers/swc.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type * as swcWasm from '@swc/wasm'; -import type { CreateTranspilerOptions, Transpiler } from './types'; -export interface SwcTranspilerOptions extends CreateTranspilerOptions { - /** - * swc compiler to use for compilation - * Set to '@swc/wasm' to use swc's WASM compiler - * Default: '@swc/core', falling back to '@swc/wasm' - */ - swc?: string | typeof swcWasm; -} -export declare function create(createOptions: SwcTranspilerOptions): Transpiler; diff --git a/node_modules/ts-node/dist/transpilers/swc.js b/node_modules/ts-node/dist/transpilers/swc.js deleted file mode 100644 index eeddd4f..0000000 --- a/node_modules/ts-node/dist/transpilers/swc.js +++ /dev/null @@ -1,212 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createSwcOptions = exports.targetMapping = exports.create = void 0; -function create(createOptions) { - const { swc, service: { config, projectLocalResolveHelper }, transpilerConfigLocalResolveHelper, nodeModuleEmitKind, } = createOptions; - // Load swc compiler - let swcInstance; - // Used later in diagnostics; merely needs to be human-readable. - let swcDepName = 'swc'; - if (typeof swc === 'string') { - swcDepName = swc; - swcInstance = require(transpilerConfigLocalResolveHelper(swc, true)); - } - else if (swc == null) { - let swcResolved; - try { - swcDepName = '@swc/core'; - swcResolved = transpilerConfigLocalResolveHelper(swcDepName, true); - } - catch (e) { - try { - swcDepName = '@swc/wasm'; - swcResolved = transpilerConfigLocalResolveHelper(swcDepName, true); - } - catch (e) { - throw new Error('swc compiler requires either @swc/core or @swc/wasm to be installed as a dependency. See https://typestrong.org/ts-node/docs/transpilers'); - } - } - swcInstance = require(swcResolved); - } - else { - swcInstance = swc; - } - // Prepare SWC options derived from typescript compiler options - const { nonTsxOptions, tsxOptions } = createSwcOptions(config.options, nodeModuleEmitKind, swcInstance, swcDepName); - const transpile = (input, transpileOptions) => { - const { fileName } = transpileOptions; - const swcOptions = fileName.endsWith('.tsx') || fileName.endsWith('.jsx') - ? tsxOptions - : nonTsxOptions; - const { code, map } = swcInstance.transformSync(input, { - ...swcOptions, - filename: fileName, - }); - return { outputText: code, sourceMapText: map }; - }; - return { - transpile, - }; -} -exports.create = create; -/** @internal */ -exports.targetMapping = new Map(); -exports.targetMapping.set(/* ts.ScriptTarget.ES3 */ 0, 'es3'); -exports.targetMapping.set(/* ts.ScriptTarget.ES5 */ 1, 'es5'); -exports.targetMapping.set(/* ts.ScriptTarget.ES2015 */ 2, 'es2015'); -exports.targetMapping.set(/* ts.ScriptTarget.ES2016 */ 3, 'es2016'); -exports.targetMapping.set(/* ts.ScriptTarget.ES2017 */ 4, 'es2017'); -exports.targetMapping.set(/* ts.ScriptTarget.ES2018 */ 5, 'es2018'); -exports.targetMapping.set(/* ts.ScriptTarget.ES2019 */ 6, 'es2019'); -exports.targetMapping.set(/* ts.ScriptTarget.ES2020 */ 7, 'es2020'); -exports.targetMapping.set(/* ts.ScriptTarget.ES2021 */ 8, 'es2021'); -exports.targetMapping.set(/* ts.ScriptTarget.ES2022 */ 9, 'es2022'); -exports.targetMapping.set(/* ts.ScriptTarget.ESNext */ 99, 'es2022'); -/** - * @internal - * We use this list to downgrade to a prior target when we probe swc to detect if it supports a particular target - */ -const swcTargets = [ - 'es3', - 'es5', - 'es2015', - 'es2016', - 'es2017', - 'es2018', - 'es2019', - 'es2020', - 'es2021', - 'es2022', -]; -const ModuleKind = { - None: 0, - CommonJS: 1, - AMD: 2, - UMD: 3, - System: 4, - ES2015: 5, - ES2020: 6, - ESNext: 99, - Node16: 100, - NodeNext: 199, -}; -const JsxEmit = { - ReactJSX: /* ts.JsxEmit.ReactJSX */ 4, - ReactJSXDev: /* ts.JsxEmit.ReactJSXDev */ 5, -}; -/** - * Prepare SWC options derived from typescript compiler options. - * @internal exported for testing - */ -function createSwcOptions(compilerOptions, nodeModuleEmitKind, swcInstance, swcDepName) { - var _a; - const { esModuleInterop, sourceMap, importHelpers, experimentalDecorators, emitDecoratorMetadata, target, module, jsx, jsxFactory, jsxFragmentFactory, strict, alwaysStrict, noImplicitUseStrict, } = compilerOptions; - let swcTarget = (_a = exports.targetMapping.get(target)) !== null && _a !== void 0 ? _a : 'es3'; - // Downgrade to lower target if swc does not support the selected target. - // Perhaps project has an older version of swc. - // TODO cache the results of this; slightly faster - let swcTargetIndex = swcTargets.indexOf(swcTarget); - for (; swcTargetIndex >= 0; swcTargetIndex--) { - try { - swcInstance.transformSync('', { - jsc: { target: swcTargets[swcTargetIndex] }, - }); - break; - } - catch (e) { } - } - swcTarget = swcTargets[swcTargetIndex]; - const keepClassNames = target >= /* ts.ScriptTarget.ES2016 */ 3; - const isNodeModuleKind = module === ModuleKind.Node16 || module === ModuleKind.NodeNext; - // swc only supports these 4x module options [MUST_UPDATE_FOR_NEW_MODULEKIND] - const moduleType = module === ModuleKind.CommonJS - ? 'commonjs' - : module === ModuleKind.AMD - ? 'amd' - : module === ModuleKind.UMD - ? 'umd' - : isNodeModuleKind && nodeModuleEmitKind === 'nodecjs' - ? 'commonjs' - : isNodeModuleKind && nodeModuleEmitKind === 'nodeesm' - ? 'es6' - : 'es6'; - // In swc: - // strictMode means `"use strict"` is *always* emitted for non-ES module, *never* for ES module where it is assumed it can be omitted. - // (this assumption is invalid, but that's the way swc behaves) - // tsc is a bit more complex: - // alwaysStrict will force emitting it always unless `import`/`export` syntax is emitted which implies it per the JS spec. - // if not alwaysStrict, will emit implicitly whenever module target is non-ES *and* transformed module syntax is emitted. - // For node, best option is to assume that all scripts are modules (commonjs or esm) and thus should get tsc's implicit strict behavior. - // Always set strictMode, *unless* alwaysStrict is disabled and noImplicitUseStrict is enabled - const strictMode = - // if `alwaysStrict` is disabled, remembering that `strict` defaults `alwaysStrict` to true - (alwaysStrict === false || (alwaysStrict !== true && strict !== true)) && - // if noImplicitUseStrict is enabled - noImplicitUseStrict === true - ? false - : true; - const jsxRuntime = jsx === JsxEmit.ReactJSX || jsx === JsxEmit.ReactJSXDev - ? 'automatic' - : undefined; - const jsxDevelopment = jsx === JsxEmit.ReactJSXDev ? true : undefined; - const nonTsxOptions = createVariant(false); - const tsxOptions = createVariant(true); - return { nonTsxOptions, tsxOptions }; - function createVariant(isTsx) { - const swcOptions = { - sourceMaps: sourceMap, - // isModule: true, - module: moduleType - ? { - noInterop: !esModuleInterop, - type: moduleType, - strictMode, - // For NodeNext and Node12, emit as CJS but do not transform dynamic imports - ignoreDynamic: nodeModuleEmitKind === 'nodecjs', - } - : undefined, - swcrc: false, - jsc: { - externalHelpers: importHelpers, - parser: { - syntax: 'typescript', - tsx: isTsx, - decorators: experimentalDecorators, - dynamicImport: true, - importAssertions: true, - }, - target: swcTarget, - transform: { - decoratorMetadata: emitDecoratorMetadata, - legacyDecorator: true, - react: { - throwIfNamespace: false, - development: jsxDevelopment, - useBuiltins: false, - pragma: jsxFactory, - pragmaFrag: jsxFragmentFactory, - runtime: jsxRuntime, - }, - }, - keepClassNames, - experimental: { - keepImportAssertions: true, - }, - }, - }; - // Throw a helpful error if swc version is old, for example, if it rejects `ignoreDynamic` - try { - swcInstance.transformSync('', swcOptions); - } - catch (e) { - throw new Error(`${swcDepName} threw an error when attempting to validate swc compiler options.\n` + - 'You may be using an old version of swc which does not support the options used by ts-node.\n' + - 'Try upgrading to the latest version of swc.\n' + - 'Error message from swc:\n' + - (e === null || e === void 0 ? void 0 : e.message)); - } - return swcOptions; - } -} -exports.createSwcOptions = createSwcOptions; -//# sourceMappingURL=swc.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/transpilers/swc.js.map b/node_modules/ts-node/dist/transpilers/swc.js.map deleted file mode 100644 index 77a0776..0000000 --- a/node_modules/ts-node/dist/transpilers/swc.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"swc.js","sourceRoot":"","sources":["../../src/transpilers/swc.ts"],"names":[],"mappings":";;;AAgBA,SAAgB,MAAM,CAAC,aAAmC;IACxD,MAAM,EACJ,GAAG,EACH,OAAO,EAAE,EAAE,MAAM,EAAE,yBAAyB,EAAE,EAC9C,kCAAkC,EAClC,kBAAkB,GACnB,GAAG,aAAa,CAAC;IAElB,oBAAoB;IACpB,IAAI,WAAwB,CAAC;IAC7B,gEAAgE;IAChE,IAAI,UAAU,GAAW,KAAK,CAAC;IAC/B,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC3B,UAAU,GAAG,GAAG,CAAC;QACjB,WAAW,GAAG,OAAO,CAAC,kCAAkC,CACtD,GAAG,EACH,IAAI,CACL,CAAmB,CAAC;KACtB;SAAM,IAAI,GAAG,IAAI,IAAI,EAAE;QACtB,IAAI,WAAW,CAAC;QAChB,IAAI;YACF,UAAU,GAAG,WAAW,CAAC;YACzB,WAAW,GAAG,kCAAkC,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;SACpE;QAA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Z,GAAG,EAAE;gBACH,eAAe,EAAE,aAAa;gBAC9B,MAAM,EAAE;oBACN,MAAM,EAAE,YAAY;oBACpB,GAAG,EAAE,KAAK;oBACV,UAAU,EAAE,sBAAsB;oBAClC,aAAa,EAAE,IAAI;oBACnB,gBAAgB,EAAE,IAAI;iBACvB;gBACD,MAAM,EAAE,SAAS;gBACjB,SAAS,EAAE;oBACT,iBAAiB,EAAE,qBAAqB;oBACxC,eAAe,EAAE,IAAI;oBACrB,KAAK,EAAE;wBACL,gBAAgB,EAAE,KAAK;wBACvB,WAAW,EAAE,cAAc;wBAC3B,WAAW,EAAE,KAAK;wBAClB,MAAM,EAAE,UAAW;wBACnB,UAAU,EAAE,kBAAmB;wBAC/B,OAAO,EAAE,UAAU;qBACI;iBAC1B;gBACD,cAAc;gBACd,YAAY,EAAE;oBACZ,oBAAoB,EAAE,IAAI;iBAC3B;aACoB;SACxB,CAAC;QAEF,0FAA0F;QAC1F,IAAI;YACF,WAAW,CAAC,aAAa,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;SAC3C;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,IAAI,KAAK,CACb,GAAG,UAAU,qEAAqE;gBAChF,8FAA8F;gBAC9F,+CAA+C;gBAC/C,2BAA2B;iBAC1B,CAAW,aAAX,CAAC,uBAAD,CAAC,CAAY,OAAO,CAAA,CACxB,CAAC;SACH;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;AACH,CAAC;AA1ID,4CA0IC","sourcesContent":["import type * as ts from 'typescript';\nimport type * as swcWasm from '@swc/wasm';\nimport type * as swcTypes from '@swc/core';\nimport type { CreateTranspilerOptions, Transpiler } from './types';\nimport type { NodeModuleEmitKind } from '..';\n\ntype SwcInstance = typeof swcWasm;\nexport interface SwcTranspilerOptions extends CreateTranspilerOptions {\n /**\n * swc compiler to use for compilation\n * Set to '@swc/wasm' to use swc's WASM compiler\n * Default: '@swc/core', falling back to '@swc/wasm'\n */\n swc?: string | typeof swcWasm;\n}\n\nexport function create(createOptions: SwcTranspilerOptions): Transpiler {\n const {\n swc,\n service: { config, projectLocalResolveHelper },\n transpilerConfigLocalResolveHelper,\n nodeModuleEmitKind,\n } = createOptions;\n\n // Load swc compiler\n let swcInstance: SwcInstance;\n // Used later in diagnostics; merely needs to be human-readable.\n let swcDepName: string = 'swc';\n if (typeof swc === 'string') {\n swcDepName = swc;\n swcInstance = require(transpilerConfigLocalResolveHelper(\n swc,\n true\n )) as typeof swcWasm;\n } else if (swc == null) {\n let swcResolved;\n try {\n swcDepName = '@swc/core';\n swcResolved = transpilerConfigLocalResolveHelper(swcDepName, true);\n } catch (e) {\n try {\n swcDepName = '@swc/wasm';\n swcResolved = transpilerConfigLocalResolveHelper(swcDepName, true);\n } catch (e) {\n throw new Error(\n 'swc compiler requires either @swc/core or @swc/wasm to be installed as a dependency. See https://typestrong.org/ts-node/docs/transpilers'\n );\n }\n }\n swcInstance = require(swcResolved) as typeof swcWasm;\n } else {\n swcInstance = swc;\n }\n\n // Prepare SWC options derived from typescript compiler options\n const { nonTsxOptions, tsxOptions } = createSwcOptions(\n config.options,\n nodeModuleEmitKind,\n swcInstance,\n swcDepName\n );\n\n const transpile: Transpiler['transpile'] = (input, transpileOptions) => {\n const { fileName } = transpileOptions;\n const swcOptions =\n fileName.endsWith('.tsx') || fileName.endsWith('.jsx')\n ? tsxOptions\n : nonTsxOptions;\n const { code, map } = swcInstance.transformSync(input, {\n ...swcOptions,\n filename: fileName,\n });\n return { outputText: code, sourceMapText: map };\n };\n\n return {\n transpile,\n };\n}\n\n/** @internal */\nexport const targetMapping = new Map();\ntargetMapping.set(/* ts.ScriptTarget.ES3 */ 0, 'es3');\ntargetMapping.set(/* ts.ScriptTarget.ES5 */ 1, 'es5');\ntargetMapping.set(/* ts.ScriptTarget.ES2015 */ 2, 'es2015');\ntargetMapping.set(/* ts.ScriptTarget.ES2016 */ 3, 'es2016');\ntargetMapping.set(/* ts.ScriptTarget.ES2017 */ 4, 'es2017');\ntargetMapping.set(/* ts.ScriptTarget.ES2018 */ 5, 'es2018');\ntargetMapping.set(/* ts.ScriptTarget.ES2019 */ 6, 'es2019');\ntargetMapping.set(/* ts.ScriptTarget.ES2020 */ 7, 'es2020');\ntargetMapping.set(/* ts.ScriptTarget.ES2021 */ 8, 'es2021');\ntargetMapping.set(/* ts.ScriptTarget.ES2022 */ 9, 'es2022');\ntargetMapping.set(/* ts.ScriptTarget.ESNext */ 99, 'es2022');\n\ntype SwcTarget = typeof swcTargets[number];\n/**\n * @internal\n * We use this list to downgrade to a prior target when we probe swc to detect if it supports a particular target\n */\nconst swcTargets = [\n 'es3',\n 'es5',\n 'es2015',\n 'es2016',\n 'es2017',\n 'es2018',\n 'es2019',\n 'es2020',\n 'es2021',\n 'es2022',\n] as const;\n\nconst ModuleKind = {\n None: 0,\n CommonJS: 1,\n AMD: 2,\n UMD: 3,\n System: 4,\n ES2015: 5,\n ES2020: 6,\n ESNext: 99,\n Node16: 100,\n NodeNext: 199,\n} as const;\n\nconst JsxEmit = {\n ReactJSX: /* ts.JsxEmit.ReactJSX */ 4,\n ReactJSXDev: /* ts.JsxEmit.ReactJSXDev */ 5,\n} as const;\n\n/**\n * Prepare SWC options derived from typescript compiler options.\n * @internal exported for testing\n */\nexport function createSwcOptions(\n compilerOptions: ts.CompilerOptions,\n nodeModuleEmitKind: NodeModuleEmitKind | undefined,\n swcInstance: SwcInstance,\n swcDepName: string\n) {\n const {\n esModuleInterop,\n sourceMap,\n importHelpers,\n experimentalDecorators,\n emitDecoratorMetadata,\n target,\n module,\n jsx,\n jsxFactory,\n jsxFragmentFactory,\n strict,\n alwaysStrict,\n noImplicitUseStrict,\n } = compilerOptions;\n\n let swcTarget = targetMapping.get(target!) ?? 'es3';\n // Downgrade to lower target if swc does not support the selected target.\n // Perhaps project has an older version of swc.\n // TODO cache the results of this; slightly faster\n let swcTargetIndex = swcTargets.indexOf(swcTarget);\n for (; swcTargetIndex >= 0; swcTargetIndex--) {\n try {\n swcInstance.transformSync('', {\n jsc: { target: swcTargets[swcTargetIndex] },\n });\n break;\n } catch (e) {}\n }\n swcTarget = swcTargets[swcTargetIndex];\n const keepClassNames = target! >= /* ts.ScriptTarget.ES2016 */ 3;\n const isNodeModuleKind =\n module === ModuleKind.Node16 || module === ModuleKind.NodeNext;\n // swc only supports these 4x module options [MUST_UPDATE_FOR_NEW_MODULEKIND]\n const moduleType =\n module === ModuleKind.CommonJS\n ? 'commonjs'\n : module === ModuleKind.AMD\n ? 'amd'\n : module === ModuleKind.UMD\n ? 'umd'\n : isNodeModuleKind && nodeModuleEmitKind === 'nodecjs'\n ? 'commonjs'\n : isNodeModuleKind && nodeModuleEmitKind === 'nodeesm'\n ? 'es6'\n : 'es6';\n // In swc:\n // strictMode means `\"use strict\"` is *always* emitted for non-ES module, *never* for ES module where it is assumed it can be omitted.\n // (this assumption is invalid, but that's the way swc behaves)\n // tsc is a bit more complex:\n // alwaysStrict will force emitting it always unless `import`/`export` syntax is emitted which implies it per the JS spec.\n // if not alwaysStrict, will emit implicitly whenever module target is non-ES *and* transformed module syntax is emitted.\n // For node, best option is to assume that all scripts are modules (commonjs or esm) and thus should get tsc's implicit strict behavior.\n\n // Always set strictMode, *unless* alwaysStrict is disabled and noImplicitUseStrict is enabled\n const strictMode =\n // if `alwaysStrict` is disabled, remembering that `strict` defaults `alwaysStrict` to true\n (alwaysStrict === false || (alwaysStrict !== true && strict !== true)) &&\n // if noImplicitUseStrict is enabled\n noImplicitUseStrict === true\n ? false\n : true;\n\n const jsxRuntime: swcTypes.ReactConfig['runtime'] =\n jsx === JsxEmit.ReactJSX || jsx === JsxEmit.ReactJSXDev\n ? 'automatic'\n : undefined;\n const jsxDevelopment: swcTypes.ReactConfig['development'] =\n jsx === JsxEmit.ReactJSXDev ? true : undefined;\n\n const nonTsxOptions = createVariant(false);\n const tsxOptions = createVariant(true);\n return { nonTsxOptions, tsxOptions };\n\n function createVariant(isTsx: boolean): swcTypes.Options {\n const swcOptions: swcTypes.Options = {\n sourceMaps: sourceMap,\n // isModule: true,\n module: moduleType\n ? ({\n noInterop: !esModuleInterop,\n type: moduleType,\n strictMode,\n // For NodeNext and Node12, emit as CJS but do not transform dynamic imports\n ignoreDynamic: nodeModuleEmitKind === 'nodecjs',\n } as swcTypes.ModuleConfig)\n : undefined,\n swcrc: false,\n jsc: {\n externalHelpers: importHelpers,\n parser: {\n syntax: 'typescript',\n tsx: isTsx,\n decorators: experimentalDecorators,\n dynamicImport: true,\n importAssertions: true,\n },\n target: swcTarget,\n transform: {\n decoratorMetadata: emitDecoratorMetadata,\n legacyDecorator: true,\n react: {\n throwIfNamespace: false,\n development: jsxDevelopment,\n useBuiltins: false,\n pragma: jsxFactory!,\n pragmaFrag: jsxFragmentFactory!,\n runtime: jsxRuntime,\n } as swcTypes.ReactConfig,\n },\n keepClassNames,\n experimental: {\n keepImportAssertions: true,\n },\n } as swcTypes.JscConfig,\n };\n\n // Throw a helpful error if swc version is old, for example, if it rejects `ignoreDynamic`\n try {\n swcInstance.transformSync('', swcOptions);\n } catch (e) {\n throw new Error(\n `${swcDepName} threw an error when attempting to validate swc compiler options.\\n` +\n 'You may be using an old version of swc which does not support the options used by ts-node.\\n' +\n 'Try upgrading to the latest version of swc.\\n' +\n 'Error message from swc:\\n' +\n (e as Error)?.message\n );\n }\n\n return swcOptions;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/transpilers/types.d.ts b/node_modules/ts-node/dist/transpilers/types.d.ts deleted file mode 100644 index 13049f8..0000000 --- a/node_modules/ts-node/dist/transpilers/types.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type * as ts from 'typescript'; -import type { Service } from '../index'; -/** - * Third-party transpilers are implemented as a CommonJS module with a - * named export "create" - * - * @category Transpiler - */ -export interface TranspilerModule { - create: TranspilerFactory; -} -/** - * Called by ts-node to create a custom transpiler. - * - * @category Transpiler - */ -export declare type TranspilerFactory = (options: CreateTranspilerOptions) => Transpiler; -/** @category Transpiler */ -export interface CreateTranspilerOptions { - service: Pick>; -} -/** @category Transpiler */ -export interface Transpiler { - transpile(input: string, options: TranspileOptions): TranspileOutput; -} -/** @category Transpiler */ -export interface TranspileOptions { - fileName: string; -} -/** @category Transpiler */ -export interface TranspileOutput { - outputText: string; - diagnostics?: ts.Diagnostic[]; - sourceMapText?: string; -} diff --git a/node_modules/ts-node/dist/transpilers/types.js b/node_modules/ts-node/dist/transpilers/types.js deleted file mode 100644 index 11e638d..0000000 --- a/node_modules/ts-node/dist/transpilers/types.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/transpilers/types.js.map b/node_modules/ts-node/dist/transpilers/types.js.map deleted file mode 100644 index 2a00c2f..0000000 --- a/node_modules/ts-node/dist/transpilers/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/transpilers/types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as ts from 'typescript';\nimport type { NodeModuleEmitKind, Service } from '../index';\nimport type { ProjectLocalResolveHelper } from '../util';\n\n/**\n * Third-party transpilers are implemented as a CommonJS module with a\n * named export \"create\"\n *\n * @category Transpiler\n */\nexport interface TranspilerModule {\n create: TranspilerFactory;\n}\n/**\n * Called by ts-node to create a custom transpiler.\n *\n * @category Transpiler\n */\nexport type TranspilerFactory = (\n options: CreateTranspilerOptions\n) => Transpiler;\n/** @category Transpiler */\nexport interface CreateTranspilerOptions {\n // TODO this is confusing because its only a partial Service. Rename?\n // Careful: must avoid stripInternal breakage by guarding with Extract<>\n service: Pick<\n Service,\n Extract<'config' | 'options' | 'projectLocalResolveHelper', keyof Service>\n >;\n /**\n * If `\"transpiler\"` option is declared in an \"extends\" tsconfig, this path might be different than\n * the `projectLocalResolveHelper`\n *\n * @internal\n */\n transpilerConfigLocalResolveHelper: ProjectLocalResolveHelper;\n /**\n * When using `module: nodenext` or `module: node12`, there are two possible styles of emit:\n * - CommonJS with dynamic imports preserved (not transformed into `require()` calls)\n * - ECMAScript modules with `import foo = require()` transformed into `require = createRequire(); const foo = require()`\n * @internal\n */\n nodeModuleEmitKind?: NodeModuleEmitKind;\n}\n/** @category Transpiler */\nexport interface Transpiler {\n // TODOs\n // Create spec for returning diagnostics? Currently transpilers are allowed to\n // throw an error but that's it.\n transpile(input: string, options: TranspileOptions): TranspileOutput;\n}\n/** @category Transpiler */\nexport interface TranspileOptions {\n fileName: string;\n}\n/** @category Transpiler */\nexport interface TranspileOutput {\n outputText: string;\n diagnostics?: ts.Diagnostic[];\n sourceMapText?: string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/ts-compiler-types.d.ts b/node_modules/ts-node/dist/ts-compiler-types.d.ts deleted file mode 100644 index 99cd4c6..0000000 --- a/node_modules/ts-node/dist/ts-compiler-types.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type * as _ts from 'typescript'; -/** - * Common TypeScript interfaces between versions. We endeavour to write ts-node's own code against these types instead - * of against `import "typescript"`, though we are not yet doing this consistently. - * - * Sometimes typescript@next adds an API we need to use. But we build ts-node against typescript@latest. - * In these cases, we must declare that API explicitly here. Our declarations include the newer typescript@next APIs. - * Importantly, these re-declarations are *not* TypeScript internals. They are public APIs that only exist in - * pre-release versions of typescript. - */ -export interface TSCommon { - version: typeof _ts.version; - sys: typeof _ts.sys; - ScriptSnapshot: typeof _ts.ScriptSnapshot; - displayPartsToString: typeof _ts.displayPartsToString; - createLanguageService: typeof _ts.createLanguageService; - getDefaultLibFilePath: typeof _ts.getDefaultLibFilePath; - getPreEmitDiagnostics: typeof _ts.getPreEmitDiagnostics; - flattenDiagnosticMessageText: typeof _ts.flattenDiagnosticMessageText; - transpileModule: typeof _ts.transpileModule; - ModuleKind: TSCommon.ModuleKindEnum; - ScriptTarget: typeof _ts.ScriptTarget; - findConfigFile: typeof _ts.findConfigFile; - readConfigFile: typeof _ts.readConfigFile; - parseJsonConfigFileContent: typeof _ts.parseJsonConfigFileContent; - formatDiagnostics: typeof _ts.formatDiagnostics; - formatDiagnosticsWithColorAndContext: typeof _ts.formatDiagnosticsWithColorAndContext; - createDocumentRegistry: typeof _ts.createDocumentRegistry; - JsxEmit: typeof _ts.JsxEmit; - createModuleResolutionCache: typeof _ts.createModuleResolutionCache; - resolveModuleName: typeof _ts.resolveModuleName; - resolveModuleNameFromCache: typeof _ts.resolveModuleNameFromCache; - resolveTypeReferenceDirective: typeof _ts.resolveTypeReferenceDirective; - createIncrementalCompilerHost: typeof _ts.createIncrementalCompilerHost; - createSourceFile: typeof _ts.createSourceFile; - getDefaultLibFileName: typeof _ts.getDefaultLibFileName; - createIncrementalProgram: typeof _ts.createIncrementalProgram; - createEmitAndSemanticDiagnosticsBuilderProgram: typeof _ts.createEmitAndSemanticDiagnosticsBuilderProgram; - Extension: typeof _ts.Extension; - ModuleResolutionKind: typeof _ts.ModuleResolutionKind; -} -export declare namespace TSCommon { - interface LanguageServiceHost extends _ts.LanguageServiceHost { - } - type ModuleResolutionHost = _ts.ModuleResolutionHost; - type ParsedCommandLine = _ts.ParsedCommandLine; - type ResolvedModule = _ts.ResolvedModule; - type ResolvedTypeReferenceDirective = _ts.ResolvedTypeReferenceDirective; - type CompilerOptions = _ts.CompilerOptions; - type ResolvedProjectReference = _ts.ResolvedProjectReference; - type ResolvedModuleWithFailedLookupLocations = _ts.ResolvedModuleWithFailedLookupLocations; - type FileReference = _ts.FileReference; - type SourceFile = _ts.SourceFile; - type ModuleKindEnum = typeof _ts.ModuleKind & { - Node16: typeof _ts.ModuleKind extends { - Node16: any; - } ? typeof _ts.ModuleKind['Node16'] : 100; - }; - namespace ModuleKind { - type CommonJS = _ts.ModuleKind.CommonJS; - type ESNext = _ts.ModuleKind.ESNext; - } -} diff --git a/node_modules/ts-node/dist/ts-compiler-types.js b/node_modules/ts-node/dist/ts-compiler-types.js deleted file mode 100644 index 5b1ec92..0000000 --- a/node_modules/ts-node/dist/ts-compiler-types.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ts-compiler-types.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/ts-compiler-types.js.map b/node_modules/ts-node/dist/ts-compiler-types.js.map deleted file mode 100644 index 2602c9c..0000000 --- a/node_modules/ts-node/dist/ts-compiler-types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ts-compiler-types.js","sourceRoot":"","sources":["../src/ts-compiler-types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as _ts from 'typescript';\n\n/**\n * Common TypeScript interfaces between versions. We endeavour to write ts-node's own code against these types instead\n * of against `import \"typescript\"`, though we are not yet doing this consistently.\n *\n * Sometimes typescript@next adds an API we need to use. But we build ts-node against typescript@latest.\n * In these cases, we must declare that API explicitly here. Our declarations include the newer typescript@next APIs.\n * Importantly, these re-declarations are *not* TypeScript internals. They are public APIs that only exist in\n * pre-release versions of typescript.\n */\nexport interface TSCommon {\n version: typeof _ts.version;\n sys: typeof _ts.sys;\n ScriptSnapshot: typeof _ts.ScriptSnapshot;\n displayPartsToString: typeof _ts.displayPartsToString;\n createLanguageService: typeof _ts.createLanguageService;\n getDefaultLibFilePath: typeof _ts.getDefaultLibFilePath;\n getPreEmitDiagnostics: typeof _ts.getPreEmitDiagnostics;\n flattenDiagnosticMessageText: typeof _ts.flattenDiagnosticMessageText;\n transpileModule: typeof _ts.transpileModule;\n ModuleKind: TSCommon.ModuleKindEnum;\n ScriptTarget: typeof _ts.ScriptTarget;\n findConfigFile: typeof _ts.findConfigFile;\n readConfigFile: typeof _ts.readConfigFile;\n parseJsonConfigFileContent: typeof _ts.parseJsonConfigFileContent;\n formatDiagnostics: typeof _ts.formatDiagnostics;\n formatDiagnosticsWithColorAndContext: typeof _ts.formatDiagnosticsWithColorAndContext;\n\n createDocumentRegistry: typeof _ts.createDocumentRegistry;\n JsxEmit: typeof _ts.JsxEmit;\n createModuleResolutionCache: typeof _ts.createModuleResolutionCache;\n resolveModuleName: typeof _ts.resolveModuleName;\n resolveModuleNameFromCache: typeof _ts.resolveModuleNameFromCache;\n resolveTypeReferenceDirective: typeof _ts.resolveTypeReferenceDirective;\n createIncrementalCompilerHost: typeof _ts.createIncrementalCompilerHost;\n createSourceFile: typeof _ts.createSourceFile;\n getDefaultLibFileName: typeof _ts.getDefaultLibFileName;\n createIncrementalProgram: typeof _ts.createIncrementalProgram;\n createEmitAndSemanticDiagnosticsBuilderProgram: typeof _ts.createEmitAndSemanticDiagnosticsBuilderProgram;\n\n Extension: typeof _ts.Extension;\n ModuleResolutionKind: typeof _ts.ModuleResolutionKind;\n}\nexport namespace TSCommon {\n export interface LanguageServiceHost extends _ts.LanguageServiceHost {}\n export type ModuleResolutionHost = _ts.ModuleResolutionHost;\n export type ParsedCommandLine = _ts.ParsedCommandLine;\n export type ResolvedModule = _ts.ResolvedModule;\n export type ResolvedTypeReferenceDirective =\n _ts.ResolvedTypeReferenceDirective;\n export type CompilerOptions = _ts.CompilerOptions;\n export type ResolvedProjectReference = _ts.ResolvedProjectReference;\n export type ResolvedModuleWithFailedLookupLocations =\n _ts.ResolvedModuleWithFailedLookupLocations;\n export type FileReference = _ts.FileReference;\n export type SourceFile = _ts.SourceFile;\n // Hack until we start building against TS >= 4.7.0\n export type ModuleKindEnum = typeof _ts.ModuleKind & {\n Node16: typeof _ts.ModuleKind extends { Node16: any }\n ? typeof _ts.ModuleKind['Node16']\n : 100;\n };\n // Can't figure out how to re-export an enum\n // `export import ... =` complains that _ts is type-only import\n export namespace ModuleKind {\n export type CommonJS = _ts.ModuleKind.CommonJS;\n export type ESNext = _ts.ModuleKind.ESNext;\n }\n}\n\n/**\n * Compiler APIs we use that are marked internal and not included in TypeScript's public API declarations\n * @internal\n */\nexport interface TSInternal {\n // https://github.com/microsoft/TypeScript/blob/4a34294908bed6701dcba2456ca7ac5eafe0ddff/src/compiler/core.ts#L1906-L1909\n createGetCanonicalFileName(\n useCaseSensitiveFileNames: boolean\n ): TSInternal.GetCanonicalFileName;\n // https://github.com/microsoft/TypeScript/blob/c117c266e09c80e8a06b24a6e94b9d018f5fae6b/src/compiler/commandLineParser.ts#L2054\n convertToTSConfig(\n configParseResult: _ts.ParsedCommandLine,\n configFileName: string,\n host: TSInternal.ConvertToTSConfigHost\n ): any;\n libs?: string[];\n Diagnostics: {\n File_0_not_found: _ts.DiagnosticMessage;\n };\n createCompilerDiagnostic(\n message: _ts.DiagnosticMessage,\n ...args: (string | number | undefined)[]\n ): _ts.Diagnostic;\n nodeModuleNameResolver(\n moduleName: string,\n containingFile: string,\n compilerOptions: _ts.CompilerOptions,\n host: _ts.ModuleResolutionHost,\n cache?: _ts.ModuleResolutionCache,\n redirectedReference?: _ts.ResolvedProjectReference,\n lookupConfig?: boolean\n ): _ts.ResolvedModuleWithFailedLookupLocations;\n // Added in TS 4.7\n getModeForFileReference?: (\n ref: _ts.FileReference | string,\n containingFileMode: _ts.SourceFile['impliedNodeFormat']\n ) => _ts.SourceFile['impliedNodeFormat'];\n // TODO do we need these? Which TS version adds them?\n getPatternFromSpec(\n spec: string,\n basePath: string,\n usage: 'files' | 'directories' | 'exclude'\n ): string | undefined;\n getRegularExpressionForWildcard(\n specs: readonly string[] | undefined,\n basePath: string,\n usage: 'files' | 'directories' | 'exclude'\n ): string | undefined;\n // Added in TS 4.7\n getModeForResolutionAtIndex?(\n file: TSInternal.SourceFileImportsList,\n index: number\n ): _ts.SourceFile['impliedNodeFormat'];\n}\n/** @internal */\nexport namespace TSInternal {\n // https://github.com/microsoft/TypeScript/blob/4a34294908bed6701dcba2456ca7ac5eafe0ddff/src/compiler/core.ts#L1906\n export type GetCanonicalFileName = (fileName: string) => string;\n // https://github.com/microsoft/TypeScript/blob/c117c266e09c80e8a06b24a6e94b9d018f5fae6b/src/compiler/commandLineParser.ts#L2041\n export interface ConvertToTSConfigHost {\n getCurrentDirectory(): string;\n useCaseSensitiveFileNames: boolean;\n }\n // Note: is only a partial declaration, TS sources declare other fields\n export interface SourceFileImportsList {\n impliedNodeFormat?: TSCommon.SourceFile['impliedNodeFormat'];\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/ts-internals.d.ts b/node_modules/ts-node/dist/ts-internals.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/ts-internals.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/ts-internals.js b/node_modules/ts-node/dist/ts-internals.js deleted file mode 100644 index 97ea748..0000000 --- a/node_modules/ts-node/dist/ts-internals.js +++ /dev/null @@ -1,299 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getPatternFromSpec = exports.createTsInternals = void 0; -const path_1 = require("path"); -const util_1 = require("./util"); -/** @internal */ -exports.createTsInternals = (0, util_1.cachedLookup)(createTsInternalsUncached); -/** - * Given a reference to the TS compiler, return some TS internal functions that we - * could not or did not want to grab off the `ts` object. - * These have been copy-pasted from TS's source and tweaked as necessary. - * - * NOTE: This factory returns *only* functions which need a reference to the TS - * compiler. Other functions do not need a reference to the TS compiler so are - * exported directly from this file. - */ -function createTsInternalsUncached(_ts) { - const ts = _ts; - /** - * Copied from: - * https://github.com/microsoft/TypeScript/blob/v4.3.2/src/compiler/commandLineParser.ts#L2821-L2846 - */ - function getExtendsConfigPath(extendedConfig, host, basePath, errors, createDiagnostic) { - extendedConfig = (0, util_1.normalizeSlashes)(extendedConfig); - if (isRootedDiskPath(extendedConfig) || - startsWith(extendedConfig, './') || - startsWith(extendedConfig, '../')) { - let extendedConfigPath = getNormalizedAbsolutePath(extendedConfig, basePath); - if (!host.fileExists(extendedConfigPath) && - !endsWith(extendedConfigPath, ts.Extension.Json)) { - extendedConfigPath = `${extendedConfigPath}.json`; - if (!host.fileExists(extendedConfigPath)) { - errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig)); - return undefined; - } - } - return extendedConfigPath; - } - // If the path isn't a rooted or relative path, resolve like a module - const resolved = ts.nodeModuleNameResolver(extendedConfig, combinePaths(basePath, 'tsconfig.json'), { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, - /*cache*/ undefined, - /*projectRefs*/ undefined, - /*lookupConfig*/ true); - if (resolved.resolvedModule) { - return resolved.resolvedModule.resolvedFileName; - } - errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig)); - return undefined; - } - return { getExtendsConfigPath }; -} -// These functions have alternative implementation to avoid copying too much from TS -function isRootedDiskPath(path) { - return (0, path_1.isAbsolute)(path); -} -function combinePaths(path, ...paths) { - return (0, util_1.normalizeSlashes)((0, path_1.resolve)(path, ...paths.filter((path) => path))); -} -function getNormalizedAbsolutePath(fileName, currentDirectory) { - return (0, util_1.normalizeSlashes)(currentDirectory != null - ? (0, path_1.resolve)(currentDirectory, fileName) - : (0, path_1.resolve)(fileName)); -} -function startsWith(str, prefix) { - return str.lastIndexOf(prefix, 0) === 0; -} -function endsWith(str, suffix) { - const expectedPos = str.length - suffix.length; - return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos; -} -// Reserved characters, forces escaping of any non-word (or digit), non-whitespace character. -// It may be inefficient (we could just match (/[-[\]{}()*+?.,\\^$|#\s]/g), but this is future -// proof. -const reservedCharacterPattern = /[^\w\s\/]/g; -/** - * @internal - * See also: getRegularExpressionForWildcard, which seems to do almost the same thing - */ -function getPatternFromSpec(spec, basePath) { - const pattern = spec && getSubPatternFromSpec(spec, basePath, excludeMatcher); - return pattern && `^(${pattern})${'($|/)'}`; -} -exports.getPatternFromSpec = getPatternFromSpec; -function getSubPatternFromSpec(spec, basePath, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter, }) { - let subpattern = ''; - let hasWrittenComponent = false; - const components = getNormalizedPathComponents(spec, basePath); - const lastComponent = last(components); - // getNormalizedPathComponents includes the separator for the root component. - // We need to remove to create our regex correctly. - components[0] = removeTrailingDirectorySeparator(components[0]); - if (isImplicitGlob(lastComponent)) { - components.push('**', '*'); - } - let optionalCount = 0; - for (let component of components) { - if (component === '**') { - subpattern += doubleAsteriskRegexFragment; - } - else { - if (hasWrittenComponent) { - subpattern += directorySeparator; - } - subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter); - } - hasWrittenComponent = true; - } - while (optionalCount > 0) { - subpattern += ')?'; - optionalCount--; - } - return subpattern; -} -const directoriesMatcher = { - singleAsteriskRegexFragment: '[^/]*', - /** - * Regex for the ** wildcard. Matches any num of subdirectories. When used for including - * files or directories, does not match subdirectories that start with a . character - */ - doubleAsteriskRegexFragment: `(/[^/.][^/]*)*?`, - replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment), -}; -const excludeMatcher = { - singleAsteriskRegexFragment: '[^/]*', - doubleAsteriskRegexFragment: '(/.+?)?', - replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment), -}; -function getNormalizedPathComponents(path, currentDirectory) { - return reducePathComponents(getPathComponents(path, currentDirectory)); -} -function getPathComponents(path, currentDirectory = '') { - path = combinePaths(currentDirectory, path); - return pathComponents(path, getRootLength(path)); -} -function reducePathComponents(components) { - if (!some(components)) - return []; - const reduced = [components[0]]; - for (let i = 1; i < components.length; i++) { - const component = components[i]; - if (!component) - continue; - if (component === '.') - continue; - if (component === '..') { - if (reduced.length > 1) { - if (reduced[reduced.length - 1] !== '..') { - reduced.pop(); - continue; - } - } - else if (reduced[0]) - continue; - } - reduced.push(component); - } - return reduced; -} -function getRootLength(path) { - const rootLength = getEncodedRootLength(path); - return rootLength < 0 ? ~rootLength : rootLength; -} -function getEncodedRootLength(path) { - if (!path) - return 0; - const ch0 = path.charCodeAt(0); - // POSIX or UNC - if (ch0 === 47 /* CharacterCodes.slash */ || ch0 === 92 /* CharacterCodes.backslash */) { - if (path.charCodeAt(1) !== ch0) - return 1; // POSIX: "/" (or non-normalized "\") - const p1 = path.indexOf(ch0 === 47 /* CharacterCodes.slash */ ? directorySeparator : altDirectorySeparator, 2); - if (p1 < 0) - return path.length; // UNC: "//server" or "\\server" - return p1 + 1; // UNC: "//server/" or "\\server\" - } - // DOS - if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* CharacterCodes.colon */) { - const ch2 = path.charCodeAt(2); - if (ch2 === 47 /* CharacterCodes.slash */ || ch2 === 92 /* CharacterCodes.backslash */) - return 3; // DOS: "c:/" or "c:\" - if (path.length === 2) - return 2; // DOS: "c:" (but not "c:d") - } - // URL - const schemeEnd = path.indexOf(urlSchemeSeparator); - if (schemeEnd !== -1) { - const authorityStart = schemeEnd + urlSchemeSeparator.length; - const authorityEnd = path.indexOf(directorySeparator, authorityStart); - if (authorityEnd !== -1) { - // URL: "file:///", "file://server/", "file://server/path" - // For local "file" URLs, include the leading DOS volume (if present). - // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a - // special case interpreted as "the machine from which the URL is being interpreted". - const scheme = path.slice(0, schemeEnd); - const authority = path.slice(authorityStart, authorityEnd); - if (scheme === 'file' && - (authority === '' || authority === 'localhost') && - isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { - const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); - if (volumeSeparatorEnd !== -1) { - if (path.charCodeAt(volumeSeparatorEnd) === 47 /* CharacterCodes.slash */) { - // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" - return ~(volumeSeparatorEnd + 1); - } - if (volumeSeparatorEnd === path.length) { - // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" - // but not "file:///c:d" or "file:///c%3ad" - return ~volumeSeparatorEnd; - } - } - } - return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" - } - return ~path.length; // URL: "file://server", "http://server" - } - // relative - return 0; -} -function ensureTrailingDirectorySeparator(path) { - if (!hasTrailingDirectorySeparator(path)) { - return path + directorySeparator; - } - return path; -} -function hasTrailingDirectorySeparator(path) { - return (path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1))); -} -function isAnyDirectorySeparator(charCode) { - return (charCode === 47 /* CharacterCodes.slash */ || charCode === 92 /* CharacterCodes.backslash */); -} -function removeTrailingDirectorySeparator(path) { - if (hasTrailingDirectorySeparator(path)) { - return path.substr(0, path.length - 1); - } - return path; -} -const directorySeparator = '/'; -const altDirectorySeparator = '\\'; -const urlSchemeSeparator = '://'; -function isVolumeCharacter(charCode) { - return ((charCode >= 97 /* CharacterCodes.a */ && charCode <= 122 /* CharacterCodes.z */) || - (charCode >= 65 /* CharacterCodes.A */ && charCode <= 90 /* CharacterCodes.Z */)); -} -function getFileUrlVolumeSeparatorEnd(url, start) { - const ch0 = url.charCodeAt(start); - if (ch0 === 58 /* CharacterCodes.colon */) - return start + 1; - if (ch0 === 37 /* CharacterCodes.percent */ && - url.charCodeAt(start + 1) === 51 /* CharacterCodes._3 */) { - const ch2 = url.charCodeAt(start + 2); - if (ch2 === 97 /* CharacterCodes.a */ || ch2 === 65 /* CharacterCodes.A */) - return start + 3; - } - return -1; -} -function some(array, predicate) { - if (array) { - if (predicate) { - for (const v of array) { - if (predicate(v)) { - return true; - } - } - } - else { - return array.length > 0; - } - } - return false; -} -function pathComponents(path, rootLength) { - const root = path.substring(0, rootLength); - const rest = path.substring(rootLength).split(directorySeparator); - if (rest.length && !lastOrUndefined(rest)) - rest.pop(); - return [root, ...rest]; -} -function lastOrUndefined(array) { - return array.length === 0 ? undefined : array[array.length - 1]; -} -function last(array) { - // Debug.assert(array.length !== 0); - return array[array.length - 1]; -} -function replaceWildcardCharacter(match, singleAsteriskRegexFragment) { - return match === '*' - ? singleAsteriskRegexFragment - : match === '?' - ? '[^/]' - : '\\' + match; -} -/** - * An "includes" path "foo" is implicitly a glob "foo/** /*" (without the space) if its last component has no extension, - * and does not contain any glob characters itself. - */ -function isImplicitGlob(lastPathComponent) { - return !/[.*?]/.test(lastPathComponent); -} -//# sourceMappingURL=ts-internals.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/ts-internals.js.map b/node_modules/ts-node/dist/ts-internals.js.map deleted file mode 100644 index d774d1b..0000000 --- a/node_modules/ts-node/dist/ts-internals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ts-internals.js","sourceRoot":"","sources":["../src/ts-internals.ts"],"names":[],"mappings":";;;AAAA,+BAA2C;AAC3C,iCAAwD;AAIxD,gBAAgB;AACH,QAAA,iBAAiB,GAAG,IAAA,mBAAY,EAAC,yBAAyB,CAAC,CAAC;AACzE;;;;;;;;GAQG;AACH,SAAS,yBAAyB,CAAC,GAAa;IAC9C,MAAM,EAAE,GAAG,GAA4B,CAAC;IACxC;;;OAGG;IACH,SAAS,oBAAoB,CAC3B,cAAsB,EACtB,IAAyB,EACzB,QAAgB,EAChB,MAAgC,EAChC,gBAGmB;QAEnB,cAAc,GAAG,IAAA,uBAAgB,EAAC,cAAc,CAAC,CAAC;QAClD,IACE,gBAAgB,CAAC,cAAc,CAAC;YAChC,UAAU,CAAC,cAAc,EAAE,IAAI,CAAC;YAChC,UAAU,CAAC,cAAc,EAAE,KAAK,CAAC,EACjC;YACA,IAAI,kBAAkB,GAAG,yBAAyB,CAChD,cAAc,EACd,QAAQ,CACT,CAAC;YACF,IACE,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;gBACpC,CAAC,QAAQ,CAAC,kBAAkB,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAChD;gBACA,kBAAkB,GAAG,GAAG,kBAAkB,OAAO,CAAC;gBAClD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE;oBACxC,MAAM,CAAC,IAAI,CACT,gBAAgB,CAAC,EAAE,CAAC,WAAW,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAClE,CAAC;oBACF,OAAO,SAAS,CAAC;iBAClB;aACF;YACD,OAAO,kBAAkB,CAAC;SAC3B;QACD,qEAAqE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IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAClE,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QAAE,IAAI,CAAC,GAAG,EAAE,CAAC;IACtD,OAAO,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;AACzB,CAAC;AACD,SAAS,eAAe,CAAI,KAAmB;IAC7C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAClE,CAAC;AACD,SAAS,IAAI,CAAI,KAAmB;IAClC,oCAAoC;IACpC,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACjC,CAAC;AACD,SAAS,wBAAwB,CAC/B,KAAa,EACb,2BAAmC;IAEnC,OAAO,KAAK,KAAK,GAAG;QAClB,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,KAAK,KAAK,GAAG;YACf,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC;AACnB,CAAC;AACD;;;GAGG;AACH,SAAS,cAAc,CAAC,iBAAyB;IAC/C,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import { isAbsolute, resolve } from 'path';\nimport { cachedLookup, normalizeSlashes } from './util';\nimport type * as _ts from 'typescript';\nimport type { TSCommon, TSInternal } from './ts-compiler-types';\n\n/** @internal */\nexport const createTsInternals = cachedLookup(createTsInternalsUncached);\n/**\n * Given a reference to the TS compiler, return some TS internal functions that we\n * could not or did not want to grab off the `ts` object.\n * These have been copy-pasted from TS's source and tweaked as necessary.\n *\n * NOTE: This factory returns *only* functions which need a reference to the TS\n * compiler. Other functions do not need a reference to the TS compiler so are\n * exported directly from this file.\n */\nfunction createTsInternalsUncached(_ts: TSCommon) {\n const ts = _ts as TSCommon & TSInternal;\n /**\n * Copied from:\n * https://github.com/microsoft/TypeScript/blob/v4.3.2/src/compiler/commandLineParser.ts#L2821-L2846\n */\n function getExtendsConfigPath(\n extendedConfig: string,\n host: _ts.ParseConfigHost,\n basePath: string,\n errors: _ts.Push<_ts.Diagnostic>,\n createDiagnostic: (\n message: _ts.DiagnosticMessage,\n arg1?: string\n ) => _ts.Diagnostic\n ) {\n extendedConfig = normalizeSlashes(extendedConfig);\n if (\n isRootedDiskPath(extendedConfig) ||\n startsWith(extendedConfig, './') ||\n startsWith(extendedConfig, '../')\n ) {\n let extendedConfigPath = getNormalizedAbsolutePath(\n extendedConfig,\n basePath\n );\n if (\n !host.fileExists(extendedConfigPath) &&\n !endsWith(extendedConfigPath, ts.Extension.Json)\n ) {\n extendedConfigPath = `${extendedConfigPath}.json`;\n if (!host.fileExists(extendedConfigPath)) {\n errors.push(\n createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig)\n );\n return undefined;\n }\n }\n return extendedConfigPath;\n }\n // If the path isn't a rooted or relative path, resolve like a module\n const resolved = ts.nodeModuleNameResolver(\n extendedConfig,\n combinePaths(basePath, 'tsconfig.json'),\n { moduleResolution: ts.ModuleResolutionKind.NodeJs },\n host,\n /*cache*/ undefined,\n /*projectRefs*/ undefined,\n /*lookupConfig*/ true\n );\n if (resolved.resolvedModule) {\n return resolved.resolvedModule.resolvedFileName;\n }\n errors.push(\n createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig)\n );\n return undefined;\n }\n\n return { getExtendsConfigPath };\n}\n\n// These functions have alternative implementation to avoid copying too much from TS\nfunction isRootedDiskPath(path: string) {\n return isAbsolute(path);\n}\nfunction combinePaths(path: string, ...paths: (string | undefined)[]): string {\n return normalizeSlashes(\n resolve(path, ...(paths.filter((path) => path) as string[]))\n );\n}\nfunction getNormalizedAbsolutePath(\n fileName: string,\n currentDirectory: string | undefined\n) {\n return normalizeSlashes(\n currentDirectory != null\n ? resolve(currentDirectory!, fileName)\n : resolve(fileName)\n );\n}\n\nfunction startsWith(str: string, prefix: string): boolean {\n return str.lastIndexOf(prefix, 0) === 0;\n}\n\nfunction endsWith(str: string, suffix: string): boolean {\n const expectedPos = str.length - suffix.length;\n return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;\n}\n// Reserved characters, forces escaping of any non-word (or digit), non-whitespace character.\n// It may be inefficient (we could just match (/[-[\\]{}()*+?.,\\\\^$|#\\s]/g), but this is future\n// proof.\nconst reservedCharacterPattern = /[^\\w\\s\\/]/g;\n\n/**\n * @internal\n * See also: getRegularExpressionForWildcard, which seems to do almost the same thing\n */\nexport function getPatternFromSpec(spec: string, basePath: string) {\n const pattern = spec && getSubPatternFromSpec(spec, basePath, excludeMatcher);\n return pattern && `^(${pattern})${'($|/)'}`;\n}\nfunction getSubPatternFromSpec(\n spec: string,\n basePath: string,\n {\n singleAsteriskRegexFragment,\n doubleAsteriskRegexFragment,\n replaceWildcardCharacter,\n }: WildcardMatcher\n): string {\n let subpattern = '';\n let hasWrittenComponent = false;\n const components = getNormalizedPathComponents(spec, basePath);\n const lastComponent = last(components);\n\n // getNormalizedPathComponents includes the separator for the root component.\n // We need to remove to create our regex correctly.\n components[0] = removeTrailingDirectorySeparator(components[0]);\n\n if (isImplicitGlob(lastComponent)) {\n components.push('**', '*');\n }\n\n let optionalCount = 0;\n for (let component of components) {\n if (component === '**') {\n subpattern += doubleAsteriskRegexFragment;\n } else {\n if (hasWrittenComponent) {\n subpattern += directorySeparator;\n }\n subpattern += component.replace(\n reservedCharacterPattern,\n replaceWildcardCharacter\n );\n }\n\n hasWrittenComponent = true;\n }\n\n while (optionalCount > 0) {\n subpattern += ')?';\n optionalCount--;\n }\n\n return subpattern;\n}\ninterface WildcardMatcher {\n singleAsteriskRegexFragment: string;\n doubleAsteriskRegexFragment: string;\n replaceWildcardCharacter: (match: string) => string;\n}\nconst directoriesMatcher: WildcardMatcher = {\n singleAsteriskRegexFragment: '[^/]*',\n /**\n * Regex for the ** wildcard. Matches any num of subdirectories. When used for including\n * files or directories, does not match subdirectories that start with a . character\n */\n doubleAsteriskRegexFragment: `(/[^/.][^/]*)*?`,\n replaceWildcardCharacter: (match) =>\n replaceWildcardCharacter(\n match,\n directoriesMatcher.singleAsteriskRegexFragment\n ),\n};\nconst excludeMatcher: WildcardMatcher = {\n singleAsteriskRegexFragment: '[^/]*',\n doubleAsteriskRegexFragment: '(/.+?)?',\n replaceWildcardCharacter: (match) =>\n replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment),\n};\nfunction getNormalizedPathComponents(\n path: string,\n currentDirectory: string | undefined\n) {\n return reducePathComponents(getPathComponents(path, currentDirectory));\n}\nfunction getPathComponents(path: string, currentDirectory = '') {\n path = combinePaths(currentDirectory, path);\n return pathComponents(path, getRootLength(path));\n}\nfunction reducePathComponents(components: readonly string[]) {\n if (!some(components)) return [];\n const reduced = [components[0]];\n for (let i = 1; i < components.length; i++) {\n const component = components[i];\n if (!component) continue;\n if (component === '.') continue;\n if (component === '..') {\n if (reduced.length > 1) {\n if (reduced[reduced.length - 1] !== '..') {\n reduced.pop();\n continue;\n }\n } else if (reduced[0]) continue;\n }\n reduced.push(component);\n }\n return reduced;\n}\nfunction getRootLength(path: string) {\n const rootLength = getEncodedRootLength(path);\n return rootLength < 0 ? ~rootLength : rootLength;\n}\nfunction getEncodedRootLength(path: string): number {\n if (!path) return 0;\n const ch0 = path.charCodeAt(0);\n\n // POSIX or UNC\n if (ch0 === CharacterCodes.slash || ch0 === CharacterCodes.backslash) {\n if (path.charCodeAt(1) !== ch0) return 1; // POSIX: \"/\" (or non-normalized \"\\\")\n\n const p1 = path.indexOf(\n ch0 === CharacterCodes.slash ? directorySeparator : altDirectorySeparator,\n 2\n );\n if (p1 < 0) return path.length; // UNC: \"//server\" or \"\\\\server\"\n\n return p1 + 1; // UNC: \"//server/\" or \"\\\\server\\\"\n }\n\n // DOS\n if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodes.colon) {\n const ch2 = path.charCodeAt(2);\n if (ch2 === CharacterCodes.slash || ch2 === CharacterCodes.backslash)\n return 3; // DOS: \"c:/\" or \"c:\\\"\n if (path.length === 2) return 2; // DOS: \"c:\" (but not \"c:d\")\n }\n\n // URL\n const schemeEnd = path.indexOf(urlSchemeSeparator);\n if (schemeEnd !== -1) {\n const authorityStart = schemeEnd + urlSchemeSeparator.length;\n const authorityEnd = path.indexOf(directorySeparator, authorityStart);\n if (authorityEnd !== -1) {\n // URL: \"file:///\", \"file://server/\", \"file://server/path\"\n // For local \"file\" URLs, include the leading DOS volume (if present).\n // Per https://www.ietf.org/rfc/rfc1738.txt, a host of \"\" or \"localhost\" is a\n // special case interpreted as \"the machine from which the URL is being interpreted\".\n const scheme = path.slice(0, schemeEnd);\n const authority = path.slice(authorityStart, authorityEnd);\n if (\n scheme === 'file' &&\n (authority === '' || authority === 'localhost') &&\n isVolumeCharacter(path.charCodeAt(authorityEnd + 1))\n ) {\n const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(\n path,\n authorityEnd + 2\n );\n if (volumeSeparatorEnd !== -1) {\n if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) {\n // URL: \"file:///c:/\", \"file://localhost/c:/\", \"file:///c%3a/\", \"file://localhost/c%3a/\"\n return ~(volumeSeparatorEnd + 1);\n }\n if (volumeSeparatorEnd === path.length) {\n // URL: \"file:///c:\", \"file://localhost/c:\", \"file:///c$3a\", \"file://localhost/c%3a\"\n // but not \"file:///c:d\" or \"file:///c%3ad\"\n return ~volumeSeparatorEnd;\n }\n }\n }\n return ~(authorityEnd + 1); // URL: \"file://server/\", \"http://server/\"\n }\n return ~path.length; // URL: \"file://server\", \"http://server\"\n }\n\n // relative\n return 0;\n}\nfunction ensureTrailingDirectorySeparator(path: string) {\n if (!hasTrailingDirectorySeparator(path)) {\n return path + directorySeparator;\n }\n\n return path;\n}\nfunction hasTrailingDirectorySeparator(path: string) {\n return (\n path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1))\n );\n}\nfunction isAnyDirectorySeparator(charCode: number): boolean {\n return (\n charCode === CharacterCodes.slash || charCode === CharacterCodes.backslash\n );\n}\nfunction removeTrailingDirectorySeparator(path: string) {\n if (hasTrailingDirectorySeparator(path)) {\n return path.substr(0, path.length - 1);\n }\n\n return path;\n}\nconst directorySeparator = '/';\nconst altDirectorySeparator = '\\\\';\nconst urlSchemeSeparator = '://';\nfunction isVolumeCharacter(charCode: number) {\n return (\n (charCode >= CharacterCodes.a && charCode <= CharacterCodes.z) ||\n (charCode >= CharacterCodes.A && charCode <= CharacterCodes.Z)\n );\n}\nfunction getFileUrlVolumeSeparatorEnd(url: string, start: number) {\n const ch0 = url.charCodeAt(start);\n if (ch0 === CharacterCodes.colon) return start + 1;\n if (\n ch0 === CharacterCodes.percent &&\n url.charCodeAt(start + 1) === CharacterCodes._3\n ) {\n const ch2 = url.charCodeAt(start + 2);\n if (ch2 === CharacterCodes.a || ch2 === CharacterCodes.A) return start + 3;\n }\n return -1;\n}\nfunction some(array: readonly T[] | undefined): array is readonly T[];\nfunction some(\n array: readonly T[] | undefined,\n predicate: (value: T) => boolean\n): boolean;\nfunction some(\n array: readonly T[] | undefined,\n predicate?: (value: T) => boolean\n): boolean {\n if (array) {\n if (predicate) {\n for (const v of array) {\n if (predicate(v)) {\n return true;\n }\n }\n } else {\n return array.length > 0;\n }\n }\n return false;\n}\n/* @internal */\nconst enum CharacterCodes {\n _3 = 0x33,\n a = 0x61,\n z = 0x7a,\n A = 0x41,\n Z = 0x5a,\n asterisk = 0x2a, // *\n backslash = 0x5c, // \\\n colon = 0x3a, // :\n percent = 0x25, // %\n question = 0x3f, // ?\n slash = 0x2f, // /\n}\nfunction pathComponents(path: string, rootLength: number) {\n const root = path.substring(0, rootLength);\n const rest = path.substring(rootLength).split(directorySeparator);\n if (rest.length && !lastOrUndefined(rest)) rest.pop();\n return [root, ...rest];\n}\nfunction lastOrUndefined(array: readonly T[]): T | undefined {\n return array.length === 0 ? undefined : array[array.length - 1];\n}\nfunction last(array: readonly T[]): T {\n // Debug.assert(array.length !== 0);\n return array[array.length - 1];\n}\nfunction replaceWildcardCharacter(\n match: string,\n singleAsteriskRegexFragment: string\n) {\n return match === '*'\n ? singleAsteriskRegexFragment\n : match === '?'\n ? '[^/]'\n : '\\\\' + match;\n}\n/**\n * An \"includes\" path \"foo\" is implicitly a glob \"foo/** /*\" (without the space) if its last component has no extension,\n * and does not contain any glob characters itself.\n */\nfunction isImplicitGlob(lastPathComponent: string): boolean {\n return !/[.*?]/.test(lastPathComponent);\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/ts-transpile-module.d.ts b/node_modules/ts-node/dist/ts-transpile-module.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/ts-transpile-module.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/ts-transpile-module.js b/node_modules/ts-node/dist/ts-transpile-module.js deleted file mode 100644 index 5002855..0000000 --- a/node_modules/ts-node/dist/ts-transpile-module.js +++ /dev/null @@ -1,100 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createTsTranspileModule = void 0; -/** @internal */ -function createTsTranspileModule(ts, transpileOptions) { - const { createProgram, createSourceFile, getDefaultCompilerOptions, getImpliedNodeFormatForFile, fixupCompilerOptions, transpileOptionValueCompilerOptions, getNewLineCharacter, fileExtensionIs, normalizePath, Debug, toPath, getSetExternalModuleIndicator, getEntries, addRange, hasProperty, getEmitScriptTarget, getDirectoryPath, } = ts; - const compilerOptionsDiagnostics = []; - const options = transpileOptions.compilerOptions - ? fixupCompilerOptions(transpileOptions.compilerOptions, compilerOptionsDiagnostics) - : {}; - // mix in default options - const defaultOptions = getDefaultCompilerOptions(); - for (const key in defaultOptions) { - if (hasProperty(defaultOptions, key) && options[key] === undefined) { - options[key] = defaultOptions[key]; - } - } - for (const option of transpileOptionValueCompilerOptions) { - options[option.name] = option.transpileOptionValue; - } - // transpileModule does not write anything to disk so there is no need to verify that there are no conflicts between input and output paths. - options.suppressOutputPathCheck = true; - // Filename can be non-ts file. - options.allowNonTsExtensions = true; - const newLine = getNewLineCharacter(options); - // Create a compilerHost object to allow the compiler to read and write files - const compilerHost = { - getSourceFile: (fileName) => fileName === normalizePath(inputFileName) ? sourceFile : undefined, - writeFile: (name, text) => { - if (fileExtensionIs(name, '.map')) { - Debug.assertEqual(sourceMapText, undefined, 'Unexpected multiple source map outputs, file:', name); - sourceMapText = text; - } - else { - Debug.assertEqual(outputText, undefined, 'Unexpected multiple outputs, file:', name); - outputText = text; - } - }, - getDefaultLibFileName: () => 'lib.d.ts', - useCaseSensitiveFileNames: () => true, - getCanonicalFileName: (fileName) => fileName, - getCurrentDirectory: () => '', - getNewLine: () => newLine, - fileExists: (fileName) => fileName === inputFileName || fileName === packageJsonFileName, - readFile: (fileName) => fileName === packageJsonFileName ? `{"type": "${_packageJsonType}"}` : '', - directoryExists: () => true, - getDirectories: () => [], - }; - let inputFileName; - let packageJsonFileName; - let _packageJsonType; - let sourceFile; - let outputText; - let sourceMapText; - return transpileModule; - function transpileModule(input, transpileOptions2, packageJsonType = 'commonjs') { - // if jsx is specified then treat file as .tsx - inputFileName = - transpileOptions2.fileName || - (transpileOptions.compilerOptions && transpileOptions.compilerOptions.jsx - ? 'module.tsx' - : 'module.ts'); - packageJsonFileName = getDirectoryPath(inputFileName) + '/package.json'; - _packageJsonType = packageJsonType; - sourceFile = createSourceFile(inputFileName, input, { - languageVersion: getEmitScriptTarget(options), - impliedNodeFormat: getImpliedNodeFormatForFile(toPath(inputFileName, '', compilerHost.getCanonicalFileName), - /*cache*/ undefined, compilerHost, options), - setExternalModuleIndicator: getSetExternalModuleIndicator(options), - }); - if (transpileOptions2.moduleName) { - sourceFile.moduleName = transpileOptions2.moduleName; - } - if (transpileOptions2.renamedDependencies) { - sourceFile.renamedDependencies = new Map(getEntries(transpileOptions2.renamedDependencies)); - } - // Output - outputText = undefined; - sourceMapText = undefined; - const program = createProgram([inputFileName], options, compilerHost); - const diagnostics = compilerOptionsDiagnostics.slice(); - if (transpileOptions.reportDiagnostics) { - addRange( - /*to*/ diagnostics, - /*from*/ program.getSyntacticDiagnostics(sourceFile)); - addRange(/*to*/ diagnostics, /*from*/ program.getOptionsDiagnostics()); - } - // Emit - program.emit( - /*targetSourceFile*/ undefined, - /*writeFile*/ undefined, - /*cancellationToken*/ undefined, - /*emitOnlyDtsFiles*/ undefined, transpileOptions.transformers); - if (outputText === undefined) - return Debug.fail('Output generation failed'); - return { outputText, diagnostics, sourceMapText }; - } -} -exports.createTsTranspileModule = createTsTranspileModule; -//# sourceMappingURL=ts-transpile-module.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/ts-transpile-module.js.map b/node_modules/ts-node/dist/ts-transpile-module.js.map deleted file mode 100644 index f2b69ad..0000000 --- a/node_modules/ts-node/dist/ts-transpile-module.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ts-transpile-module.js","sourceRoot":"","sources":["../src/ts-transpile-module.ts"],"names":[],"mappings":";;;AAUA,gBAAgB;AAChB,SAAgB,uBAAuB,CACrC,EAAY,EACZ,gBAGC;IAED,MAAM,EACJ,aAAa,EACb,gBAAgB,EAChB,yBAAyB,EACzB,2BAA2B,EAC3B,oBAAoB,EACpB,mCAAmC,EACnC,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,KAAK,EACL,MAAM,EACN,6BAA6B,EAC7B,UAAU,EACV,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,gBAAgB,GACjB,GAAG,EAAS,CAAC;IAEd,MAAM,0BAA0B,GAAiB,EAAE,CAAC;IAEpD,MAAM,OAAO,GAAoB,gBAAgB,CAAC,eAAe;QAC/D,CAAC,CAAC,oBAAoB,CAClB,gBAAgB,CAAC,eAAe,EAChC,0BAA0B,CAC3B;QACH,CAAC,CAAC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Options,\n TranspileOutput,\n} from 'typescript';\nimport type { TSCommon } from './ts-compiler-types';\n\n/** @internal */\nexport function createTsTranspileModule(\n ts: TSCommon,\n transpileOptions: Pick<\n TranspileOptions,\n 'compilerOptions' | 'reportDiagnostics' | 'transformers'\n >\n) {\n const {\n createProgram,\n createSourceFile,\n getDefaultCompilerOptions,\n getImpliedNodeFormatForFile,\n fixupCompilerOptions,\n transpileOptionValueCompilerOptions,\n getNewLineCharacter,\n fileExtensionIs,\n normalizePath,\n Debug,\n toPath,\n getSetExternalModuleIndicator,\n getEntries,\n addRange,\n hasProperty,\n getEmitScriptTarget,\n getDirectoryPath,\n } = ts as any;\n\n const compilerOptionsDiagnostics: Diagnostic[] = [];\n\n const options: CompilerOptions = transpileOptions.compilerOptions\n ? fixupCompilerOptions(\n transpileOptions.compilerOptions,\n compilerOptionsDiagnostics\n )\n : {};\n\n // mix in default options\n const defaultOptions = getDefaultCompilerOptions();\n for (const key in defaultOptions) {\n if (hasProperty(defaultOptions, key) && options[key] === undefined) {\n options[key] = defaultOptions[key];\n }\n }\n\n for (const option of transpileOptionValueCompilerOptions) {\n options[option.name] = option.transpileOptionValue;\n }\n\n // transpileModule does not write anything to disk so there is no need to verify that there are no conflicts between input and output paths.\n options.suppressOutputPathCheck = true;\n\n // Filename can be non-ts file.\n options.allowNonTsExtensions = true;\n\n const newLine = getNewLineCharacter(options);\n // Create a compilerHost object to allow the compiler to read and write files\n const compilerHost: CompilerHost = {\n getSourceFile: (fileName) =>\n fileName === normalizePath(inputFileName) ? sourceFile : undefined,\n writeFile: (name, text) => {\n if (fileExtensionIs(name, '.map')) {\n Debug.assertEqual(\n sourceMapText,\n undefined,\n 'Unexpected multiple source map outputs, file:',\n name\n );\n sourceMapText = text;\n } else {\n Debug.assertEqual(\n outputText,\n undefined,\n 'Unexpected multiple outputs, file:',\n name\n );\n outputText = text;\n }\n },\n getDefaultLibFileName: () => 'lib.d.ts',\n useCaseSensitiveFileNames: () => true,\n getCanonicalFileName: (fileName) => fileName,\n getCurrentDirectory: () => '',\n getNewLine: () => newLine,\n fileExists: (fileName): boolean =>\n fileName === inputFileName || fileName === packageJsonFileName,\n readFile: (fileName) =>\n fileName === packageJsonFileName ? `{\"type\": \"${_packageJsonType}\"}` : '',\n directoryExists: () => true,\n getDirectories: () => [],\n };\n\n let inputFileName: string;\n let packageJsonFileName: string;\n let _packageJsonType: 'module' | 'commonjs';\n let sourceFile: SourceFile;\n let outputText: string | undefined;\n let sourceMapText: string | undefined;\n\n return transpileModule;\n\n function transpileModule(\n input: string,\n transpileOptions2: Pick<\n TranspileOptions,\n 'fileName' | 'moduleName' | 'renamedDependencies'\n >,\n packageJsonType: 'module' | 'commonjs' = 'commonjs'\n ): TranspileOutput {\n // if jsx is specified then treat file as .tsx\n inputFileName =\n transpileOptions2.fileName ||\n (transpileOptions.compilerOptions && transpileOptions.compilerOptions.jsx\n ? 'module.tsx'\n : 'module.ts');\n packageJsonFileName = getDirectoryPath(inputFileName) + '/package.json';\n _packageJsonType = packageJsonType;\n\n sourceFile = createSourceFile(inputFileName, input, {\n languageVersion: getEmitScriptTarget(options),\n impliedNodeFormat: getImpliedNodeFormatForFile(\n toPath(inputFileName, '', compilerHost.getCanonicalFileName),\n /*cache*/ undefined,\n compilerHost,\n options\n ),\n setExternalModuleIndicator: getSetExternalModuleIndicator(options),\n });\n if (transpileOptions2.moduleName) {\n sourceFile.moduleName = transpileOptions2.moduleName;\n }\n\n if (transpileOptions2.renamedDependencies) {\n (sourceFile as any).renamedDependencies = new Map(\n getEntries(transpileOptions2.renamedDependencies)\n );\n }\n\n // Output\n outputText = undefined;\n sourceMapText = undefined;\n\n const program = createProgram([inputFileName], options, compilerHost);\n\n const diagnostics = compilerOptionsDiagnostics.slice();\n\n if (transpileOptions.reportDiagnostics) {\n addRange(\n /*to*/ diagnostics,\n /*from*/ program.getSyntacticDiagnostics(sourceFile)\n );\n addRange(/*to*/ diagnostics, /*from*/ program.getOptionsDiagnostics());\n }\n // Emit\n program.emit(\n /*targetSourceFile*/ undefined,\n /*writeFile*/ undefined,\n /*cancellationToken*/ undefined,\n /*emitOnlyDtsFiles*/ undefined,\n transpileOptions.transformers\n );\n\n if (outputText === undefined) return Debug.fail('Output generation failed');\n\n return { outputText, diagnostics, sourceMapText };\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/tsconfig-schema.d.ts b/node_modules/ts-node/dist/tsconfig-schema.d.ts deleted file mode 100644 index a13c6e9..0000000 --- a/node_modules/ts-node/dist/tsconfig-schema.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { TsConfigOptions } from './index'; -/** - * tsconfig schema which includes "ts-node" options. - * @allOf [{"$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json"}] - */ -export interface TsConfigSchema { - /** - * ts-node options. See also: https://typestrong.org/ts-node/docs/configuration - * - * ts-node offers TypeScript execution and REPL for node.js, with source map support. - */ - 'ts-node': TsConfigOptions; -} diff --git a/node_modules/ts-node/dist/tsconfig-schema.js b/node_modules/ts-node/dist/tsconfig-schema.js deleted file mode 100644 index 945d414..0000000 --- a/node_modules/ts-node/dist/tsconfig-schema.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=tsconfig-schema.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/tsconfig-schema.js.map b/node_modules/ts-node/dist/tsconfig-schema.js.map deleted file mode 100644 index 0c786f0..0000000 --- a/node_modules/ts-node/dist/tsconfig-schema.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tsconfig-schema.js","sourceRoot":"","sources":["../src/tsconfig-schema.ts"],"names":[],"mappings":"","sourcesContent":["import type { TsConfigOptions } from './index';\n\n/*\n * This interface exists solely for generating a JSON schema for tsconfig.json.\n * We do *not* extend the compiler's tsconfig interface. Instead we handle that\n * on a schema level, via \"allOf\", so we pull in the same schema that VSCode\n * already uses.\n */\n/**\n * tsconfig schema which includes \"ts-node\" options.\n * @allOf [{\"$ref\": \"https://schemastore.azurewebsites.net/schemas/json/tsconfig.json\"}]\n */\nexport interface TsConfigSchema {\n /**\n * ts-node options. See also: https://typestrong.org/ts-node/docs/configuration\n *\n * ts-node offers TypeScript execution and REPL for node.js, with source map support.\n */\n 'ts-node': TsConfigOptions;\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/tsconfigs.d.ts b/node_modules/ts-node/dist/tsconfigs.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/ts-node/dist/tsconfigs.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-node/dist/tsconfigs.js b/node_modules/ts-node/dist/tsconfigs.js deleted file mode 100644 index 08d61b1..0000000 --- a/node_modules/ts-node/dist/tsconfigs.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getDefaultTsconfigJsonForNodeVersion = void 0; -const nodeMajor = parseInt(process.versions.node.split('.')[0], 10); -/** - * return parsed JSON of the bundled @tsconfig/bases config appropriate for the - * running version of nodejs - * @internal - */ -function getDefaultTsconfigJsonForNodeVersion(ts) { - const tsInternal = ts; - if (nodeMajor >= 16) { - const config = require('@tsconfig/node16/tsconfig.json'); - if (configCompatible(config)) - return config; - } - if (nodeMajor >= 14) { - const config = require('@tsconfig/node14/tsconfig.json'); - if (configCompatible(config)) - return config; - } - if (nodeMajor >= 12) { - const config = require('@tsconfig/node12/tsconfig.json'); - if (configCompatible(config)) - return config; - } - return require('@tsconfig/node10/tsconfig.json'); - // Verify that tsconfig target and lib options are compatible with TypeScript compiler - function configCompatible(config) { - return (typeof ts.ScriptTarget[config.compilerOptions.target.toUpperCase()] === 'number' && - tsInternal.libs && - config.compilerOptions.lib.every((lib) => tsInternal.libs.includes(lib))); - } -} -exports.getDefaultTsconfigJsonForNodeVersion = getDefaultTsconfigJsonForNodeVersion; -//# sourceMappingURL=tsconfigs.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/tsconfigs.js.map b/node_modules/ts-node/dist/tsconfigs.js.map deleted file mode 100644 index add3514..0000000 --- a/node_modules/ts-node/dist/tsconfigs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tsconfigs.js","sourceRoot":"","sources":["../src/tsconfigs.ts"],"names":[],"mappings":";;;AAEA,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACpE;;;;GAIG;AACH,SAAgB,oCAAoC,CAAC,EAAY;IAC/D,MAAM,UAAU,GAAG,EAAuB,CAAC;IAC3C,IAAI,SAAS,IAAI,EAAE,EAAE;QACnB,MAAM,MAAM,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;QACzD,IAAI,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,MAAM,CAAC;KAC7C;IACD,IAAI,SAAS,IAAI,EAAE,EAAE;QACnB,MAAM,MAAM,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;QACzD,IAAI,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,MAAM,CAAC;KAC7C;IACD,IAAI,SAAS,IAAI,EAAE,EAAE;QACnB,MAAM,MAAM,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;QACzD,IAAI,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,MAAM,CAAC;KAC7C;IACD,OAAO,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAEjD,sFAAsF;IACtF,SAAS,gBAAgB,CAAC,MAKzB;QACC,OAAO,CACL,OAAQ,EAAE,CAAC,YAAoB,CAC7B,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,WAAW,EAAE,CAC5C,KAAK,QAAQ;YACd,UAAU,CAAC,IAAI;YACf,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,IAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAC1E,CAAC;IACJ,CAAC;AACH,CAAC;AA/BD,oFA+BC","sourcesContent":["import type { TSCommon, TSInternal } from './ts-compiler-types';\n\nconst nodeMajor = parseInt(process.versions.node.split('.')[0], 10);\n/**\n * return parsed JSON of the bundled @tsconfig/bases config appropriate for the\n * running version of nodejs\n * @internal\n */\nexport function getDefaultTsconfigJsonForNodeVersion(ts: TSCommon): any {\n const tsInternal = ts as any as TSInternal;\n if (nodeMajor >= 16) {\n const config = require('@tsconfig/node16/tsconfig.json');\n if (configCompatible(config)) return config;\n }\n if (nodeMajor >= 14) {\n const config = require('@tsconfig/node14/tsconfig.json');\n if (configCompatible(config)) return config;\n }\n if (nodeMajor >= 12) {\n const config = require('@tsconfig/node12/tsconfig.json');\n if (configCompatible(config)) return config;\n }\n return require('@tsconfig/node10/tsconfig.json');\n\n // Verify that tsconfig target and lib options are compatible with TypeScript compiler\n function configCompatible(config: {\n compilerOptions: {\n lib: string[];\n target: string;\n };\n }) {\n return (\n typeof (ts.ScriptTarget as any)[\n config.compilerOptions.target.toUpperCase()\n ] === 'number' &&\n tsInternal.libs &&\n config.compilerOptions.lib.every((lib) => tsInternal.libs!.includes(lib))\n );\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/util.d.ts b/node_modules/ts-node/dist/util.d.ts deleted file mode 100644 index 0e07d4b..0000000 --- a/node_modules/ts-node/dist/util.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Cached fs operation wrapper. - */ -export declare function cachedLookup(fn: (arg: T) => R): (arg: T) => R; diff --git a/node_modules/ts-node/dist/util.js b/node_modules/ts-node/dist/util.js deleted file mode 100644 index fcce901..0000000 --- a/node_modules/ts-node/dist/util.js +++ /dev/null @@ -1,175 +0,0 @@ -"use strict"; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.versionGteLt = exports.once = exports.getBasePathForProjectLocalDependencyResolution = exports.createProjectLocalResolveHelper = exports.attemptRequireWithV8CompileCache = exports.cachedLookup = exports.hasOwnProperty = exports.normalizeSlashes = exports.parse = exports.split = exports.assign = exports.yn = exports.createRequire = void 0; -const module_1 = require("module"); -const ynModule = require("yn"); -const path_1 = require("path"); -/** @internal */ -exports.createRequire = (_a = module_1.createRequire !== null && module_1.createRequire !== void 0 ? module_1.createRequire : module_1.createRequireFromPath) !== null && _a !== void 0 ? _a : require('create-require'); -/** - * Wrapper around yn module that returns `undefined` instead of `null`. - * This is implemented by yn v4, but we're staying on v3 to avoid v4's node 10 requirement. - * @internal - */ -function yn(value) { - var _a; - return (_a = ynModule(value)) !== null && _a !== void 0 ? _a : undefined; -} -exports.yn = yn; -/** - * Like `Object.assign`, but ignores `undefined` properties. - * - * @internal - */ -function assign(initialValue, ...sources) { - for (const source of sources) { - for (const key of Object.keys(source)) { - const value = source[key]; - if (value !== undefined) - initialValue[key] = value; - } - } - return initialValue; -} -exports.assign = assign; -/** - * Split a string array of values - * and remove empty strings from the resulting array. - * @internal - */ -function split(value) { - return typeof value === 'string' - ? value.split(/ *, */g).filter((v) => v !== '') - : undefined; -} -exports.split = split; -/** - * Parse a string as JSON. - * @internal - */ -function parse(value) { - return typeof value === 'string' ? JSON.parse(value) : undefined; -} -exports.parse = parse; -const directorySeparator = '/'; -const backslashRegExp = /\\/g; -/** - * Replace backslashes with forward slashes. - * @internal - */ -function normalizeSlashes(value) { - return value.replace(backslashRegExp, directorySeparator); -} -exports.normalizeSlashes = normalizeSlashes; -/** - * Safe `hasOwnProperty` - * @internal - */ -function hasOwnProperty(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); -} -exports.hasOwnProperty = hasOwnProperty; -/** - * Cached fs operation wrapper. - */ -function cachedLookup(fn) { - const cache = new Map(); - return (arg) => { - if (!cache.has(arg)) { - const v = fn(arg); - cache.set(arg, v); - return v; - } - return cache.get(arg); - }; -} -exports.cachedLookup = cachedLookup; -/** - * @internal - * Require something with v8-compile-cache, which should make subsequent requires faster. - * Do lots of error-handling so that, worst case, we require without the cache, and users are not blocked. - */ -function attemptRequireWithV8CompileCache(requireFn, specifier) { - try { - const v8CC = require('v8-compile-cache-lib').install(); - try { - return requireFn(specifier); - } - finally { - v8CC === null || v8CC === void 0 ? void 0 : v8CC.uninstall(); - } - } - catch (e) { - return requireFn(specifier); - } -} -exports.attemptRequireWithV8CompileCache = attemptRequireWithV8CompileCache; -/** - * Helper to discover dependencies relative to a user's project, optionally - * falling back to relative to ts-node. This supports global installations of - * ts-node, for example where someone does `#!/usr/bin/env -S ts-node --swc` and - * we need to fallback to a global install of @swc/core - * @internal - */ -function createProjectLocalResolveHelper(localDirectory) { - return function projectLocalResolveHelper(specifier, fallbackToTsNodeRelative) { - return require.resolve(specifier, { - paths: fallbackToTsNodeRelative - ? [localDirectory, __dirname] - : [localDirectory], - }); - }; -} -exports.createProjectLocalResolveHelper = createProjectLocalResolveHelper; -/** - * Used as a reminder of all the factors we must consider when finding project-local dependencies and when a config file - * on disk may or may not exist. - * @internal - */ -function getBasePathForProjectLocalDependencyResolution(configFilePath, projectSearchDirOption, projectOption, cwdOption) { - var _a; - if (configFilePath != null) - return (0, path_1.dirname)(configFilePath); - return (_a = projectSearchDirOption !== null && projectSearchDirOption !== void 0 ? projectSearchDirOption : projectOption) !== null && _a !== void 0 ? _a : cwdOption; - // TODO technically breaks if projectOption is path to a file, not a directory, - // and we attempt to resolve relative specifiers. By the time we resolve relative specifiers, - // should have configFilePath, so not reach this codepath. -} -exports.getBasePathForProjectLocalDependencyResolution = getBasePathForProjectLocalDependencyResolution; -/** @internal */ -function once(fn) { - let value; - let ran = false; - function onceFn(...args) { - if (ran) - return value; - value = fn(...args); - ran = true; - return value; - } - return onceFn; -} -exports.once = once; -/** @internal */ -function versionGteLt(version, gteRequirement, ltRequirement) { - const [major, minor, patch, extra] = parse(version); - const [gteMajor, gteMinor, gtePatch] = parse(gteRequirement); - const isGte = major > gteMajor || - (major === gteMajor && - (minor > gteMinor || (minor === gteMinor && patch >= gtePatch))); - let isLt = true; - if (ltRequirement) { - const [ltMajor, ltMinor, ltPatch] = parse(ltRequirement); - isLt = - major < ltMajor || - (major === ltMajor && - (minor < ltMinor || (minor === ltMinor && patch < ltPatch))); - } - return isGte && isLt; - function parse(requirement) { - return requirement.split(/[\.-]/).map((s) => parseInt(s, 10)); - } -} -exports.versionGteLt = versionGteLt; -//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/util.js.map b/node_modules/ts-node/dist/util.js.map deleted file mode 100644 index 1f7aa4f..0000000 --- a/node_modules/ts-node/dist/util.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;;AAAA,mCAGgB;AAEhB,+BAA+B;AAC/B,+BAA+B;AAE/B,gBAAgB;AACH,QAAA,aAAa,GACxB,MAAA,sBAAiB,aAAjB,sBAAiB,cAAjB,sBAAiB,GACjB,8BAAyB,mCACxB,OAAO,CAAC,gBAAgB,CAA2B,CAAC;AAEvD;;;;GAIG;AACH,SAAgB,EAAE,CAAC,KAAyB;;IAC1C,OAAO,MAAA,QAAQ,CAAC,KAAK,CAAC,mCAAI,SAAS,CAAC;AACtC,CAAC;AAFD,gBAEC;AAED;;;;GAIG;AACH,SAAgB,MAAM,CACpB,YAAe,EACf,GAAG,OAAiB;IAEpB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACrC,MAAM,KAAK,GAAI,MAAc,CAAC,GAAG,CAAC,CAAC;YACnC,IAAI,KAAK,KAAK,SAAS;gBAAG,YAAoB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SAC7D;KACF;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAXD,wBAWC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CAAC,KAAyB;IA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n createRequire as nodeCreateRequire,\n createRequireFromPath as nodeCreateRequireFromPath,\n} from 'module';\nimport type _createRequire from 'create-require';\nimport * as ynModule from 'yn';\nimport { dirname } from 'path';\n\n/** @internal */\nexport const createRequire =\n nodeCreateRequire ??\n nodeCreateRequireFromPath ??\n (require('create-require') as typeof _createRequire);\n\n/**\n * Wrapper around yn module that returns `undefined` instead of `null`.\n * This is implemented by yn v4, but we're staying on v3 to avoid v4's node 10 requirement.\n * @internal\n */\nexport function yn(value: string | undefined) {\n return ynModule(value) ?? undefined;\n}\n\n/**\n * Like `Object.assign`, but ignores `undefined` properties.\n *\n * @internal\n */\nexport function assign(\n initialValue: T,\n ...sources: Array\n): T {\n for (const source of sources) {\n for (const key of Object.keys(source)) {\n const value = (source as any)[key];\n if (value !== undefined) (initialValue as any)[key] = value;\n }\n }\n return initialValue;\n}\n\n/**\n * Split a string array of values\n * and remove empty strings from the resulting array.\n * @internal\n */\nexport function split(value: string | undefined) {\n return typeof value === 'string'\n ? value.split(/ *, */g).filter((v) => v !== '')\n : undefined;\n}\n\n/**\n * Parse a string as JSON.\n * @internal\n */\nexport function parse(value: string | undefined): object | undefined {\n return typeof value === 'string' ? JSON.parse(value) : undefined;\n}\n\nconst directorySeparator = '/';\nconst backslashRegExp = /\\\\/g;\n/**\n * Replace backslashes with forward slashes.\n * @internal\n */\nexport function normalizeSlashes(value: string): string {\n return value.replace(backslashRegExp, directorySeparator);\n}\n\n/**\n * Safe `hasOwnProperty`\n * @internal\n */\nexport function hasOwnProperty(object: any, property: string): boolean {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n\n/**\n * Cached fs operation wrapper.\n */\nexport function cachedLookup(fn: (arg: T) => R): (arg: T) => R {\n const cache = new Map();\n\n return (arg: T): R => {\n if (!cache.has(arg)) {\n const v = fn(arg);\n cache.set(arg, v);\n return v;\n }\n return cache.get(arg)!;\n };\n}\n\n/**\n * @internal\n * Require something with v8-compile-cache, which should make subsequent requires faster.\n * Do lots of error-handling so that, worst case, we require without the cache, and users are not blocked.\n */\nexport function attemptRequireWithV8CompileCache(\n requireFn: typeof require,\n specifier: string\n) {\n try {\n const v8CC = (\n require('v8-compile-cache-lib') as typeof import('v8-compile-cache-lib')\n ).install();\n try {\n return requireFn(specifier);\n } finally {\n v8CC?.uninstall();\n }\n } catch (e) {\n return requireFn(specifier);\n }\n}\n\n/**\n * Helper to discover dependencies relative to a user's project, optionally\n * falling back to relative to ts-node. This supports global installations of\n * ts-node, for example where someone does `#!/usr/bin/env -S ts-node --swc` and\n * we need to fallback to a global install of @swc/core\n * @internal\n */\nexport function createProjectLocalResolveHelper(localDirectory: string) {\n return function projectLocalResolveHelper(\n specifier: string,\n fallbackToTsNodeRelative: boolean\n ) {\n return require.resolve(specifier, {\n paths: fallbackToTsNodeRelative\n ? [localDirectory, __dirname]\n : [localDirectory],\n });\n };\n}\n/** @internal */\nexport type ProjectLocalResolveHelper = ReturnType<\n typeof createProjectLocalResolveHelper\n>;\n\n/**\n * Used as a reminder of all the factors we must consider when finding project-local dependencies and when a config file\n * on disk may or may not exist.\n * @internal\n */\nexport function getBasePathForProjectLocalDependencyResolution(\n configFilePath: string | undefined,\n projectSearchDirOption: string | undefined,\n projectOption: string | undefined,\n cwdOption: string\n) {\n if (configFilePath != null) return dirname(configFilePath);\n return projectSearchDirOption ?? projectOption ?? cwdOption;\n // TODO technically breaks if projectOption is path to a file, not a directory,\n // and we attempt to resolve relative specifiers. By the time we resolve relative specifiers,\n // should have configFilePath, so not reach this codepath.\n}\n\n/** @internal */\nexport function once any>(fn: Fn) {\n let value: ReturnType;\n let ran = false;\n function onceFn(...args: Parameters): ReturnType {\n if (ran) return value;\n value = fn(...args);\n ran = true;\n return value;\n }\n return onceFn;\n}\n\n/** @internal */\nexport function versionGteLt(\n version: string,\n gteRequirement: string,\n ltRequirement?: string\n) {\n const [major, minor, patch, extra] = parse(version);\n const [gteMajor, gteMinor, gtePatch] = parse(gteRequirement);\n const isGte =\n major > gteMajor ||\n (major === gteMajor &&\n (minor > gteMinor || (minor === gteMinor && patch >= gtePatch)));\n let isLt = true;\n if (ltRequirement) {\n const [ltMajor, ltMinor, ltPatch] = parse(ltRequirement);\n isLt =\n major < ltMajor ||\n (major === ltMajor &&\n (minor < ltMinor || (minor === ltMinor && patch < ltPatch)));\n }\n return isGte && isLt;\n\n function parse(requirement: string) {\n return requirement.split(/[\\.-]/).map((s) => parseInt(s, 10));\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/esm.mjs b/node_modules/ts-node/esm.mjs deleted file mode 100644 index 0843cf3..0000000 --- a/node_modules/ts-node/esm.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import { fileURLToPath } from 'url'; -import { createRequire } from 'module'; -const require = createRequire(fileURLToPath(import.meta.url)); - -/** @type {import('./dist/esm')} */ -const esm = require('./dist/esm'); -export const { resolve, load, getFormat, transformSource } = - esm.registerAndCreateEsmHooks(); diff --git a/node_modules/ts-node/esm/transpile-only.mjs b/node_modules/ts-node/esm/transpile-only.mjs deleted file mode 100644 index 2e154da..0000000 --- a/node_modules/ts-node/esm/transpile-only.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import { fileURLToPath } from 'url'; -import { createRequire } from 'module'; -const require = createRequire(fileURLToPath(import.meta.url)); - -/** @type {import('../dist/esm')} */ -const esm = require('../dist/esm'); -export const { resolve, load, getFormat, transformSource } = - esm.registerAndCreateEsmHooks({ transpileOnly: true }); diff --git a/node_modules/ts-node/node10/tsconfig.json b/node_modules/ts-node/node10/tsconfig.json deleted file mode 100644 index 7079f3a..0000000 --- a/node_modules/ts-node/node10/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "@tsconfig/node10/tsconfig.json" -} diff --git a/node_modules/ts-node/node12/tsconfig.json b/node_modules/ts-node/node12/tsconfig.json deleted file mode 100644 index 76603f1..0000000 --- a/node_modules/ts-node/node12/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "@tsconfig/node12/tsconfig.json", -} diff --git a/node_modules/ts-node/node14/tsconfig.json b/node_modules/ts-node/node14/tsconfig.json deleted file mode 100644 index b082851..0000000 --- a/node_modules/ts-node/node14/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "@tsconfig/node14/tsconfig.json" -} diff --git a/node_modules/ts-node/node16/tsconfig.json b/node_modules/ts-node/node16/tsconfig.json deleted file mode 100644 index e9c0baf..0000000 --- a/node_modules/ts-node/node16/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "@tsconfig/node16/tsconfig.json" -} diff --git a/node_modules/ts-node/package.json b/node_modules/ts-node/package.json deleted file mode 100644 index ae0924a..0000000 --- a/node_modules/ts-node/package.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "name": "ts-node", - "version": "10.9.1", - "description": "TypeScript execution environment and REPL for node.js, with source map support", - "main": "dist/index.js", - "exports": { - ".": "./dist/index.js", - "./package": "./package.json", - "./package.json": "./package.json", - "./dist/bin": "./dist/bin.js", - "./dist/bin.js": "./dist/bin.js", - "./dist/bin-transpile": "./dist/bin-transpile.js", - "./dist/bin-transpile.js": "./dist/bin-transpile.js", - "./dist/bin-script": "./dist/bin-script.js", - "./dist/bin-script.js": "./dist/bin-script.js", - "./dist/bin-cwd": "./dist/bin-cwd.js", - "./dist/bin-cwd.js": "./dist/bin-cwd.js", - "./dist/bin-esm": "./dist/bin-esm.js", - "./dist/bin-esm.js": "./dist/bin-esm.js", - "./register": "./register/index.js", - "./register/files": "./register/files.js", - "./register/transpile-only": "./register/transpile-only.js", - "./register/type-check": "./register/type-check.js", - "./esm": "./esm.mjs", - "./esm.mjs": "./esm.mjs", - "./esm/transpile-only": "./esm/transpile-only.mjs", - "./esm/transpile-only.mjs": "./esm/transpile-only.mjs", - "./child-loader.mjs": "./child-loader.mjs", - "./transpilers/swc": "./transpilers/swc.js", - "./transpilers/swc-experimental": "./transpilers/swc-experimental.js", - "./node10/tsconfig.json": "./node10/tsconfig.json", - "./node12/tsconfig.json": "./node12/tsconfig.json", - "./node14/tsconfig.json": "./node14/tsconfig.json", - "./node16/tsconfig.json": "./node16/tsconfig.json" - }, - "types": "dist/index.d.ts", - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "files": [ - "/transpilers/", - "/dist/", - "!/dist/test", - "/dist-raw/NODE-LICENSE.md", - "/dist-raw/**.js", - "/register/", - "/esm/", - "/esm.mjs", - "/child-loader.mjs", - "/LICENSE", - "/tsconfig.schema.json", - "/tsconfig.schemastore-schema.json", - "/node10/", - "/node12/", - "/node14/", - "/node16/" - ], - "scripts": { - "lint": "dprint check", - "lint-fix": "dprint fmt", - "clean": "rimraf temp dist tsconfig.schema.json tsconfig.schemastore-schema.json tsconfig.tsbuildinfo tests/ts-node-packed.tgz tests/node_modules tests/tmp", - "rebuild": "npm run clean && npm run build", - "build": "npm run build-nopack && npm run build-pack", - "build-nopack": "npm run build-tsc && npm run build-configSchema", - "build-tsc": "tsc -b ./tsconfig.build-dist.json", - "build-configSchema": "typescript-json-schema --topRef --refs --validationKeywords allOf --out tsconfig.schema.json tsconfig.build-schema.json TsConfigSchema && node --require ./register ./scripts/create-merged-schema", - "build-pack": "node ./scripts/build-pack.js", - "test-spec": "ava", - "test-cov": "nyc ava", - "test": "npm run build && npm run lint && npm run test-cov --", - "test-local": "npm run lint-fix && npm run build-tsc && npm run build-pack && npm run test-spec --", - "pre-debug": "npm run build-tsc && npm run build-pack", - "coverage-report": "nyc report --reporter=lcov", - "prepare": "npm run clean && npm run build-nopack", - "api-extractor": "api-extractor run --local --verbose", - "esm-usage-example": "npm run build-tsc && cd esm-usage-example && node --experimental-specifier-resolution node --loader ../esm.mjs ./index", - "esm-usage-example2": "npm run build-tsc && cd tests && TS_NODE_PROJECT=./module-types/override-to-cjs/tsconfig.json node --loader ../esm.mjs ./module-types/override-to-cjs/test.cjs" - }, - "repository": { - "type": "git", - "url": "git://github.com/TypeStrong/ts-node.git" - }, - "keywords": [ - "typescript", - "node", - "runtime", - "environment", - "ts", - "compiler" - ], - "author": { - "name": "Blake Embrey", - "email": "hello@blakeembrey.com", - "url": "http://blakeembrey.me" - }, - "contributors": [ - { - "name": "Andrew Bradley", - "email": "cspotcode@gmail.com", - "url": "https://github.com/cspotcode" - } - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/TypeStrong/ts-node/issues" - }, - "homepage": "https://typestrong.org/ts-node", - "devDependencies": { - "@microsoft/api-extractor": "^7.19.4", - "@swc/core": ">=1.2.205", - "@swc/wasm": ">=1.2.205", - "@types/diff": "^4.0.2", - "@types/lodash": "^4.14.151", - "@types/node": "13.13.5", - "@types/proper-lockfile": "^4.1.2", - "@types/proxyquire": "^1.3.28", - "@types/react": "^16.14.19", - "@types/rimraf": "^3.0.0", - "@types/semver": "^7.1.0", - "@yarnpkg/fslib": "^2.4.0", - "ava": "^3.15.0", - "axios": "^0.21.1", - "dprint": "^0.25.0", - "expect": "^27.0.2", - "get-stream": "^6.0.0", - "lodash": "^4.17.15", - "ntypescript": "^1.201507091536.1", - "nyc": "^15.0.1", - "outdent": "^0.8.0", - "proper-lockfile": "^4.1.2", - "proxyquire": "^2.0.0", - "react": "^16.14.0", - "rimraf": "^3.0.0", - "semver": "^7.1.3", - "throat": "^6.0.1", - "typedoc": "^0.22.10", - "typescript": "4.7.4", - "typescript-json-schema": "^0.53.0", - "util.promisify": "^1.0.1" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - }, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "prettier": { - "singleQuote": true - }, - "volta": { - "node": "18.1.0", - "npm": "6.14.15" - } -} diff --git a/node_modules/ts-node/register/files.js b/node_modules/ts-node/register/files.js deleted file mode 100644 index 9be5bf5..0000000 --- a/node_modules/ts-node/register/files.js +++ /dev/null @@ -1,3 +0,0 @@ -require('../dist').register({ - files: true, -}); diff --git a/node_modules/ts-node/register/index.js b/node_modules/ts-node/register/index.js deleted file mode 100644 index 4569117..0000000 --- a/node_modules/ts-node/register/index.js +++ /dev/null @@ -1 +0,0 @@ -require('../').register(); diff --git a/node_modules/ts-node/register/transpile-only.js b/node_modules/ts-node/register/transpile-only.js deleted file mode 100644 index 4c52698..0000000 --- a/node_modules/ts-node/register/transpile-only.js +++ /dev/null @@ -1,3 +0,0 @@ -require('../').register({ - transpileOnly: true, -}); diff --git a/node_modules/ts-node/register/type-check.js b/node_modules/ts-node/register/type-check.js deleted file mode 100644 index 3d3c60b..0000000 --- a/node_modules/ts-node/register/type-check.js +++ /dev/null @@ -1,3 +0,0 @@ -require('../').register({ - typeCheck: true, -}); diff --git a/node_modules/ts-node/transpilers/swc-experimental.js b/node_modules/ts-node/transpilers/swc-experimental.js deleted file mode 100644 index 7cf79b1..0000000 --- a/node_modules/ts-node/transpilers/swc-experimental.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/transpilers/swc') diff --git a/node_modules/ts-node/transpilers/swc.js b/node_modules/ts-node/transpilers/swc.js deleted file mode 100644 index 7cf79b1..0000000 --- a/node_modules/ts-node/transpilers/swc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/transpilers/swc') diff --git a/node_modules/ts-node/tsconfig.schema.json b/node_modules/ts-node/tsconfig.schema.json deleted file mode 100644 index 6e8c09e..0000000 --- a/node_modules/ts-node/tsconfig.schema.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "$ref": "#/definitions/TsConfigSchema", - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "ModuleTypes": { - "type": "object" - }, - "TsConfigOptions": { - "description": "Must be an interface to support `typescript-json-schema`.", - "properties": { - "compiler": { - "default": "typescript", - "description": "Specify a custom TypeScript compiler.", - "type": "string" - }, - "compilerHost": { - "default": false, - "description": "Use TypeScript's compiler host API instead of the language service API.", - "type": "boolean" - }, - "compilerOptions": { - "additionalProperties": true, - "allOf": [ - { - "$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json#definitions/compilerOptionsDefinition/properties/compilerOptions" - } - ], - "description": "JSON object to merge with TypeScript `compilerOptions`.", - "properties": {}, - "type": "object" - }, - "emit": { - "default": false, - "description": "Emit output files into `.ts-node` directory.", - "type": "boolean" - }, - "esm": { - "description": "Enable native ESM support.\n\nFor details, see https://typestrong.org/ts-node/docs/imports#native-ecmascript-modules", - "type": "boolean" - }, - "experimentalReplAwait": { - "description": "Allows the usage of top level await in REPL.\n\nUses node's implementation which accomplishes this with an AST syntax transformation.\n\nEnabled by default when tsconfig target is es2018 or above. Set to false to disable.\n\n**Note**: setting to `true` when tsconfig target is too low will throw an Error. Leave as `undefined`\nto get default, automatic behavior.", - "type": "boolean" - }, - "experimentalResolver": { - "description": "Enable experimental features that re-map imports and require calls to support:\n`baseUrl`, `paths`, `rootDirs`, `.js` to `.ts` file extension mappings,\n`outDir` to `rootDir` mappings for composite projects and monorepos.\n\nFor details, see https://github.com/TypeStrong/ts-node/issues/1514", - "type": "boolean" - }, - "experimentalSpecifierResolution": { - "description": "Like node's `--experimental-specifier-resolution`, , but can also be set in your `tsconfig.json` for convenience.\n\nFor details, see https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm", - "enum": [ - "explicit", - "node" - ], - "type": "string" - }, - "experimentalTsImportSpecifiers": { - "description": "Allow using voluntary `.ts` file extension in import specifiers.\n\nTypically, in ESM projects, import specifiers must have an emit extension, `.js`, `.cjs`, or `.mjs`,\nand we automatically map to the corresponding `.ts`, `.cts`, or `.mts` source file. This is the\nrecommended approach.\n\nHowever, if you really want to use `.ts` in import specifiers, and are aware that this may\nbreak tooling, you can enable this flag.", - "type": "boolean" - }, - "files": { - "default": false, - "description": "Load \"files\" and \"include\" from `tsconfig.json` on startup.\n\nDefault is to override `tsconfig.json` \"files\" and \"include\" to only include the entrypoint script.", - "type": "boolean" - }, - "ignore": { - "default": [ - "(?:^|/)node_modules/" - ], - "description": "Paths which should not be compiled.\n\nEach string in the array is converted to a regular expression via `new RegExp()` and tested against source paths prior to compilation.\n\nSource paths are normalized to posix-style separators, relative to the directory containing `tsconfig.json` or to cwd if no `tsconfig.json` is loaded.\n\nDefault is to ignore all node_modules subdirectories.", - "items": { - "type": "string" - }, - "type": "array" - }, - "ignoreDiagnostics": { - "description": "Ignore TypeScript warnings by diagnostic code.", - "items": { - "type": [ - "string", - "number" - ] - }, - "type": "array" - }, - "logError": { - "default": false, - "description": "Logs TypeScript errors to stderr instead of throwing exceptions.", - "type": "boolean" - }, - "moduleTypes": { - "$ref": "#/definitions/ModuleTypes", - "description": "Override certain paths to be compiled and executed as CommonJS or ECMAScript modules.\nWhen overridden, the tsconfig \"module\" and package.json \"type\" fields are overridden, and\nthe file extension is ignored.\nThis is useful if you cannot use .mts, .cts, .mjs, or .cjs file extensions;\nit achieves the same effect.\n\nEach key is a glob pattern following the same rules as tsconfig's \"include\" array.\nWhen multiple patterns match the same file, the last pattern takes precedence.\n\n`cjs` overrides matches files to compile and execute as CommonJS.\n`esm` overrides matches files to compile and execute as native ECMAScript modules.\n`package` overrides either of the above to default behavior, which obeys package.json \"type\" and\ntsconfig.json \"module\" options." - }, - "preferTsExts": { - "default": false, - "description": "Re-order file extensions so that TypeScript imports are preferred.\n\nFor example, when both `index.js` and `index.ts` exist, enabling this option causes `require('./index')` to resolve to `index.ts` instead of `index.js`", - "type": "boolean" - }, - "pretty": { - "default": false, - "description": "Use pretty diagnostic formatter.", - "type": "boolean" - }, - "require": { - "description": "Modules to require, like node's `--require` flag.\n\nIf specified in `tsconfig.json`, the modules will be resolved relative to the `tsconfig.json` file.\n\nIf specified programmatically, each input string should be pre-resolved to an absolute path for\nbest results.", - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "default": false, - "description": "Scope compiler to files within `scopeDir`.", - "type": "boolean" - }, - "scopeDir": { - "default": "First of: `tsconfig.json` \"rootDir\" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded.", - "type": "string" - }, - "skipIgnore": { - "default": false, - "description": "Skip ignore check, so that compilation will be attempted for all files with matching extensions.", - "type": "boolean" - }, - "swc": { - "description": "Transpile with swc instead of the TypeScript compiler, and skip typechecking.\n\nEquivalent to setting both `transpileOnly: true` and `transpiler: 'ts-node/transpilers/swc'`\n\nFor complete instructions: https://typestrong.org/ts-node/docs/transpilers", - "type": "boolean" - }, - "transpileOnly": { - "default": false, - "description": "Use TypeScript's faster `transpileModule`.", - "type": "boolean" - }, - "transpiler": { - "anyOf": [ - { - "items": [ - { - "type": "string" - }, - { - "additionalProperties": true, - "properties": {}, - "type": "object" - } - ], - "maxItems": 2, - "minItems": 2, - "type": "array" - }, - { - "type": "string" - } - ], - "description": "Specify a custom transpiler for use with transpileOnly" - }, - "typeCheck": { - "default": true, - "description": "**DEPRECATED** Specify type-check is enabled (e.g. `transpileOnly == false`).", - "type": "boolean" - } - }, - "type": "object" - }, - "TsConfigSchema": { - "allOf": [ - { - "$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json" - } - ], - "description": "tsconfig schema which includes \"ts-node\" options.", - "properties": { - "ts-node": { - "$ref": "#/definitions/TsConfigOptions", - "description": "ts-node options. See also: https://typestrong.org/ts-node/docs/configuration\n\nts-node offers TypeScript execution and REPL for node.js, with source map support." - } - }, - "type": "object" - } - } -} - diff --git a/node_modules/ts-node/tsconfig.schemastore-schema.json b/node_modules/ts-node/tsconfig.schemastore-schema.json deleted file mode 100644 index ca0139e..0000000 --- a/node_modules/ts-node/tsconfig.schemastore-schema.json +++ /dev/null @@ -1,1236 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "allOf": [ - { - "$ref": "#/definitions/compilerOptionsDefinition" - }, - { - "$ref": "#/definitions/compileOnSaveDefinition" - }, - { - "$ref": "#/definitions/typeAcquisitionDefinition" - }, - { - "$ref": "#/definitions/extendsDefinition" - }, - { - "$ref": "#/definitions/watchOptionsDefinition" - }, - { - "$ref": "#/definitions/buildOptionsDefinition" - }, - { - "$ref": "#/definitions/tsNodeDefinition" - }, - { - "anyOf": [ - { - "$ref": "#/definitions/filesDefinition" - }, - { - "$ref": "#/definitions/excludeDefinition" - }, - { - "$ref": "#/definitions/includeDefinition" - }, - { - "$ref": "#/definitions/referencesDefinition" - } - ] - } - ], - "definitions": { - "//": { - "explainer": "https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#overview", - "reference": "https://www.typescriptlang.org/tsconfig", - "reference metadata": "https://github.com/microsoft/TypeScript-Website/blob/v2/packages/tsconfig-reference/scripts/tsconfigRules.ts" - }, - "filesDefinition": { - "properties": { - "files": { - "description": "If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. When a 'files' property is specified, only those files and those specified by 'include' are included.", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - } - } - } - }, - "excludeDefinition": { - "properties": { - "exclude": { - "description": "Specifies a list of files to be excluded from compilation. The 'exclude' property only affects the files included via the 'include' property and not the 'files' property. Glob patterns require TypeScript version 2.0 or later.", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - } - } - } - }, - "includeDefinition": { - "properties": { - "include": { - "description": "Specifies a list of glob patterns that match files to be included in compilation. If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. Requires TypeScript version 2.0 or later.", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - } - } - } - }, - "compileOnSaveDefinition": { - "properties": { - "compileOnSave": { - "description": "Enable Compile-on-Save for this project.", - "type": "boolean" - } - } - }, - "extendsDefinition": { - "properties": { - "extends": { - "description": "Path to base configuration file to inherit from. Requires TypeScript version 2.1 or later.", - "type": "string" - } - } - }, - "buildOptionsDefinition": { - "properties": { - "buildOptions": { - "properties": { - "dry": { - "description": "~", - "type": "boolean", - "default": false - }, - "force": { - "description": "Build all projects, including those that appear to be up to date", - "type": "boolean", - "default": false, - "markdownDescription": "Build all projects, including those that appear to be up to date\n\nSee more: https://www.typescriptlang.org/tsconfig#force" - }, - "verbose": { - "description": "Enable verbose logging", - "type": "boolean", - "default": false, - "markdownDescription": "Enable verbose logging\n\nSee more: https://www.typescriptlang.org/tsconfig#verbose" - }, - "incremental": { - "description": "Save .tsbuildinfo files to allow for incremental compilation of projects.", - "type": "boolean", - "default": false, - "markdownDescription": "Save .tsbuildinfo files to allow for incremental compilation of projects.\n\nSee more: https://www.typescriptlang.org/tsconfig#incremental" - }, - "assumeChangesOnlyAffectDirectDependencies": { - "description": "Have recompiles in projects that use `incremental` and `watch` mode assume that changes within a file will only affect files directly depending on it.", - "type": "boolean", - "default": false, - "markdownDescription": "Have recompiles in projects that use `incremental` and `watch` mode assume that changes within a file will only affect files directly depending on it.\n\nSee more: https://www.typescriptlang.org/tsconfig#assumeChangesOnlyAffectDirectDependencies" - }, - "traceResolution": { - "description": "Log paths used during the `moduleResolution` process.", - "type": "boolean", - "default": false, - "markdownDescription": "Log paths used during the `moduleResolution` process.\n\nSee more: https://www.typescriptlang.org/tsconfig#traceResolution" - } - } - } - } - }, - "watchOptionsDefinition": { - "properties": { - "watchOptions": { - "type": "object", - "description": "Settings for the watch mode in TypeScript.", - "properties": { - "force": { - "description": "~", - "type": "string" - }, - "watchFile": { - "description": "Specify how the TypeScript watch mode works.", - "type": "string", - "markdownDescription": "Specify how the TypeScript watch mode works.\n\nSee more: https://www.typescriptlang.org/tsconfig#watchFile" - }, - "watchDirectory": { - "description": "Specify how directories are watched on systems that lack recursive file-watching functionality.", - "type": "string", - "markdownDescription": "Specify how directories are watched on systems that lack recursive file-watching functionality.\n\nSee more: https://www.typescriptlang.org/tsconfig#watchDirectory" - }, - "fallbackPolling": { - "description": "Specify what approach the watcher should use if the system runs out of native file watchers.", - "type": "string", - "markdownDescription": "Specify what approach the watcher should use if the system runs out of native file watchers.\n\nSee more: https://www.typescriptlang.org/tsconfig#fallbackPolling" - }, - "synchronousWatchDirectory": { - "description": "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively.", - "type": "boolean", - "markdownDescription": "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively.\n\nSee more: https://www.typescriptlang.org/tsconfig#synchronousWatchDirectory" - }, - "excludeFiles": { - "description": "Remove a list of files from the watch mode's processing.", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - }, - "markdownDescription": "Remove a list of files from the watch mode's processing.\n\nSee more: https://www.typescriptlang.org/tsconfig#excludeFiles" - }, - "excludeDirectories": { - "description": "Remove a list of directories from the watch process.", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - }, - "markdownDescription": "Remove a list of directories from the watch process.\n\nSee more: https://www.typescriptlang.org/tsconfig#excludeDirectories" - } - } - } - } - }, - "compilerOptionsDefinition": { - "properties": { - "compilerOptions": { - "type": "object", - "description": "Instructs the TypeScript compiler how to compile .ts files.", - "properties": { - "charset": { - "description": "No longer supported. In early versions, manually set the text encoding for reading files.", - "type": "string", - "markdownDescription": "No longer supported. In early versions, manually set the text encoding for reading files.\n\nSee more: https://www.typescriptlang.org/tsconfig#charset" - }, - "composite": { - "description": "Enable constraints that allow a TypeScript project to be used with project references.", - "type": "boolean", - "default": true, - "markdownDescription": "Enable constraints that allow a TypeScript project to be used with project references.\n\nSee more: https://www.typescriptlang.org/tsconfig#composite" - }, - "declaration": { - "description": "Generate .d.ts files from TypeScript and JavaScript files in your project.", - "type": "boolean", - "default": false, - "markdownDescription": "Generate .d.ts files from TypeScript and JavaScript files in your project.\n\nSee more: https://www.typescriptlang.org/tsconfig#declaration" - }, - "declarationDir": { - "description": "Specify the output directory for generated declaration files.", - "type": [ - "string", - "null" - ], - "markdownDescription": "Specify the output directory for generated declaration files.\n\nSee more: https://www.typescriptlang.org/tsconfig#declarationDir" - }, - "diagnostics": { - "description": "Output compiler performance information after building.", - "type": "boolean", - "markdownDescription": "Output compiler performance information after building.\n\nSee more: https://www.typescriptlang.org/tsconfig#diagnostics" - }, - "disableReferencedProjectLoad": { - "description": "Reduce the number of projects loaded automatically by TypeScript.", - "type": "boolean", - "markdownDescription": "Reduce the number of projects loaded automatically by TypeScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#disableReferencedProjectLoad" - }, - "noPropertyAccessFromIndexSignature": { - "description": "Enforces using indexed accessors for keys declared using an indexed type", - "type": "boolean", - "markdownDescription": "Enforces using indexed accessors for keys declared using an indexed type\n\nSee more: https://www.typescriptlang.org/tsconfig#noPropertyAccessFromIndexSignature" - }, - "emitBOM": { - "description": "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.", - "type": "boolean", - "default": false, - "markdownDescription": "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.\n\nSee more: https://www.typescriptlang.org/tsconfig#emitBOM" - }, - "emitDeclarationOnly": { - "description": "Only output d.ts files and not JavaScript files.", - "type": "boolean", - "default": false, - "markdownDescription": "Only output d.ts files and not JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#emitDeclarationOnly" - }, - "exactOptionalPropertyTypes": { - "description": "Differentiate between undefined and not present when type checking", - "type": "boolean", - "default": false, - "markdownDescription": "Differentiate between undefined and not present when type checking\n\nSee more: https://www.typescriptlang.org/tsconfig#exactOptionalPropertyTypes" - }, - "incremental": { - "description": "Enable incremental compilation. Requires TypeScript version 3.4 or later.", - "type": "boolean" - }, - "tsBuildInfoFile": { - "description": "Specify the folder for .tsbuildinfo incremental compilation files.", - "default": ".tsbuildinfo", - "type": "string", - "markdownDescription": "Specify the folder for .tsbuildinfo incremental compilation files.\n\nSee more: https://www.typescriptlang.org/tsconfig#tsBuildInfoFile" - }, - "inlineSourceMap": { - "description": "Include sourcemap files inside the emitted JavaScript.", - "type": "boolean", - "default": false, - "markdownDescription": "Include sourcemap files inside the emitted JavaScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#inlineSourceMap" - }, - "inlineSources": { - "description": "Include source code in the sourcemaps inside the emitted JavaScript.", - "type": "boolean", - "default": false, - "markdownDescription": "Include source code in the sourcemaps inside the emitted JavaScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#inlineSources" - }, - "jsx": { - "description": "Specify what JSX code is generated.", - "enum": [ - "preserve", - "react", - "react-jsx", - "react-jsxdev", - "react-native" - ] - }, - "reactNamespace": { - "description": "Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.", - "type": "string", - "default": "React", - "markdownDescription": "Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.\n\nSee more: https://www.typescriptlang.org/tsconfig#reactNamespace" - }, - "jsxFactory": { - "description": "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'", - "type": "string", - "default": "React.createElement", - "markdownDescription": "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'\n\nSee more: https://www.typescriptlang.org/tsconfig#jsxFactory" - }, - "jsxFragmentFactory": { - "description": "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.", - "type": "string", - "default": "React.Fragment", - "markdownDescription": "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.\n\nSee more: https://www.typescriptlang.org/tsconfig#jsxFragmentFactory" - }, - "jsxImportSource": { - "description": "Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx`.", - "type": "string", - "default": "react", - "markdownDescription": "Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx`.\n\nSee more: https://www.typescriptlang.org/tsconfig#jsxImportSource" - }, - "listFiles": { - "description": "Print all of the files read during the compilation.", - "type": "boolean", - "default": false, - "markdownDescription": "Print all of the files read during the compilation.\n\nSee more: https://www.typescriptlang.org/tsconfig#listFiles" - }, - "mapRoot": { - "description": "Specify the location where debugger should locate map files instead of generated locations.", - "type": "string", - "markdownDescription": "Specify the location where debugger should locate map files instead of generated locations.\n\nSee more: https://www.typescriptlang.org/tsconfig#mapRoot" - }, - "module": { - "description": "Specify what module code is generated.", - "type": "string", - "anyOf": [ - { - "enum": [ - "CommonJS", - "AMD", - "System", - "UMD", - "ES6", - "ES2015", - "ES2020", - "ESNext", - "None", - "ES2022", - "Node16", - "NodeNext" - ] - }, - { - "pattern": "^([Cc][Oo][Mm][Mm][Oo][Nn][Jj][Ss]|[AaUu][Mm][Dd]|[Ss][Yy][Ss][Tt][Ee][Mm]|[Ee][Ss]([356]|20(1[567]|2[02])|[Nn][Ee][Xx][Tt])|[Nn][Oo][dD][Ee]16|[Nn][Oo][Dd][Ed][Nn][Ee][Xx][Tt]|[Nn][Oo][Nn][Ee])$" - } - ], - "markdownDescription": "Specify what module code is generated.\n\nSee more: https://www.typescriptlang.org/tsconfig#module" - }, - "moduleResolution": { - "description": "Specify how TypeScript looks up a file from a given module specifier.", - "type": "string", - "anyOf": [ - { - "enum": [ - "Classic", - "Node", - "Node16", - "NodeNext" - ] - }, - { - "pattern": "^(([Nn]ode)|([Nn]ode16)|([Nn]ode[Nn]ext)|([Cc]lassic))$" - } - ], - "default": "classic", - "markdownDescription": "Specify how TypeScript looks up a file from a given module specifier.\n\nSee more: https://www.typescriptlang.org/tsconfig#moduleResolution" - }, - "newLine": { - "description": "Set the newline character for emitting files.", - "type": "string", - "anyOf": [ - { - "enum": [ - "crlf", - "lf" - ] - }, - { - "pattern": "^(CRLF|LF|crlf|lf)$" - } - ], - "markdownDescription": "Set the newline character for emitting files.\n\nSee more: https://www.typescriptlang.org/tsconfig#newLine" - }, - "noEmit": { - "description": "Disable emitting file from a compilation.", - "type": "boolean", - "default": false, - "markdownDescription": "Disable emitting file from a compilation.\n\nSee more: https://www.typescriptlang.org/tsconfig#noEmit" - }, - "noEmitHelpers": { - "description": "Disable generating custom helper functions like `__extends` in compiled output.", - "type": "boolean", - "default": false, - "markdownDescription": "Disable generating custom helper functions like `__extends` in compiled output.\n\nSee more: https://www.typescriptlang.org/tsconfig#noEmitHelpers" - }, - "noEmitOnError": { - "description": "Disable emitting files if any type checking errors are reported.", - "type": "boolean", - "default": false, - "markdownDescription": "Disable emitting files if any type checking errors are reported.\n\nSee more: https://www.typescriptlang.org/tsconfig#noEmitOnError" - }, - "noImplicitAny": { - "description": "Enable error reporting for expressions and declarations with an implied `any` type..", - "type": "boolean", - "markdownDescription": "Enable error reporting for expressions and declarations with an implied `any` type..\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitAny" - }, - "noImplicitThis": { - "description": "Enable error reporting when `this` is given the type `any`.", - "type": "boolean", - "markdownDescription": "Enable error reporting when `this` is given the type `any`.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitThis" - }, - "noUnusedLocals": { - "description": "Enable error reporting when a local variables aren't read.", - "type": "boolean", - "default": false, - "markdownDescription": "Enable error reporting when a local variables aren't read.\n\nSee more: https://www.typescriptlang.org/tsconfig#noUnusedLocals" - }, - "noUnusedParameters": { - "description": "Raise an error when a function parameter isn't read", - "type": "boolean", - "default": false, - "markdownDescription": "Raise an error when a function parameter isn't read\n\nSee more: https://www.typescriptlang.org/tsconfig#noUnusedParameters" - }, - "noLib": { - "description": "Disable including any library files, including the default lib.d.ts.", - "type": "boolean", - "default": false, - "markdownDescription": "Disable including any library files, including the default lib.d.ts.\n\nSee more: https://www.typescriptlang.org/tsconfig#noLib" - }, - "noResolve": { - "description": "Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project.", - "type": "boolean", - "default": false, - "markdownDescription": "Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project.\n\nSee more: https://www.typescriptlang.org/tsconfig#noResolve" - }, - "noStrictGenericChecks": { - "description": "Disable strict checking of generic signatures in function types.", - "type": "boolean", - "default": false, - "markdownDescription": "Disable strict checking of generic signatures in function types.\n\nSee more: https://www.typescriptlang.org/tsconfig#noStrictGenericChecks" - }, - "skipDefaultLibCheck": { - "description": "Skip type checking .d.ts files that are included with TypeScript.", - "type": "boolean", - "default": false, - "markdownDescription": "Skip type checking .d.ts files that are included with TypeScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#skipDefaultLibCheck" - }, - "skipLibCheck": { - "description": "Skip type checking all .d.ts files.", - "type": "boolean", - "default": false, - "markdownDescription": "Skip type checking all .d.ts files.\n\nSee more: https://www.typescriptlang.org/tsconfig#skipLibCheck" - }, - "outFile": { - "description": "Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output.", - "type": "string", - "markdownDescription": "Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output.\n\nSee more: https://www.typescriptlang.org/tsconfig#outFile" - }, - "outDir": { - "description": "Specify an output folder for all emitted files.", - "type": "string", - "markdownDescription": "Specify an output folder for all emitted files.\n\nSee more: https://www.typescriptlang.org/tsconfig#outDir" - }, - "preserveConstEnums": { - "description": "Disable erasing `const enum` declarations in generated code.", - "type": "boolean", - "default": false, - "markdownDescription": "Disable erasing `const enum` declarations in generated code.\n\nSee more: https://www.typescriptlang.org/tsconfig#preserveConstEnums" - }, - "preserveSymlinks": { - "description": "Disable resolving symlinks to their realpath. This correlates to the same flag in node.", - "type": "boolean", - "default": false, - "markdownDescription": "Disable resolving symlinks to their realpath. This correlates to the same flag in node.\n\nSee more: https://www.typescriptlang.org/tsconfig#preserveSymlinks" - }, - "preserveValueImports": { - "description": "Preserve unused imported values in the JavaScript output that would otherwise be removed", - "type": "boolean", - "default": false, - "markdownDescription": "Preserve unused imported values in the JavaScript output that would otherwise be removed\n\nSee more: https://www.typescriptlang.org/tsconfig#preserveValueImports" - }, - "preserveWatchOutput": { - "description": "Disable wiping the console in watch mode", - "type": "boolean", - "markdownDescription": "Disable wiping the console in watch mode\n\nSee more: https://www.typescriptlang.org/tsconfig#preserveWatchOutput" - }, - "pretty": { - "description": "Enable color and formatting in output to make compiler errors easier to read", - "type": "boolean", - "default": true, - "markdownDescription": "Enable color and formatting in output to make compiler errors easier to read\n\nSee more: https://www.typescriptlang.org/tsconfig#pretty" - }, - "removeComments": { - "description": "Disable emitting comments.", - "type": "boolean", - "default": false, - "markdownDescription": "Disable emitting comments.\n\nSee more: https://www.typescriptlang.org/tsconfig#removeComments" - }, - "rootDir": { - "description": "Specify the root folder within your source files.", - "type": "string", - "markdownDescription": "Specify the root folder within your source files.\n\nSee more: https://www.typescriptlang.org/tsconfig#rootDir" - }, - "isolatedModules": { - "description": "Ensure that each file can be safely transpiled without relying on other imports.", - "type": "boolean", - "default": false, - "markdownDescription": "Ensure that each file can be safely transpiled without relying on other imports.\n\nSee more: https://www.typescriptlang.org/tsconfig#isolatedModules" - }, - "sourceMap": { - "description": "Create source map files for emitted JavaScript files.", - "type": "boolean", - "default": false, - "markdownDescription": "Create source map files for emitted JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#sourceMap" - }, - "sourceRoot": { - "description": "Specify the root path for debuggers to find the reference source code.", - "type": "string", - "markdownDescription": "Specify the root path for debuggers to find the reference source code.\n\nSee more: https://www.typescriptlang.org/tsconfig#sourceRoot" - }, - "suppressExcessPropertyErrors": { - "description": "Disable reporting of excess property errors during the creation of object literals.", - "type": "boolean", - "default": false, - "markdownDescription": "Disable reporting of excess property errors during the creation of object literals.\n\nSee more: https://www.typescriptlang.org/tsconfig#suppressExcessPropertyErrors" - }, - "suppressImplicitAnyIndexErrors": { - "description": "Suppress `noImplicitAny` errors when indexing objects that lack index signatures.", - "type": "boolean", - "default": false, - "markdownDescription": "Suppress `noImplicitAny` errors when indexing objects that lack index signatures.\n\nSee more: https://www.typescriptlang.org/tsconfig#suppressImplicitAnyIndexErrors" - }, - "stripInternal": { - "description": "Disable emitting declarations that have `@internal` in their JSDoc comments.", - "type": "boolean", - "markdownDescription": "Disable emitting declarations that have `@internal` in their JSDoc comments.\n\nSee more: https://www.typescriptlang.org/tsconfig#stripInternal" - }, - "target": { - "description": "Set the JavaScript language version for emitted JavaScript and include compatible library declarations.", - "type": "string", - "default": "ES3", - "anyOf": [ - { - "enum": [ - "ES3", - "ES5", - "ES6", - "ES2015", - "ES2016", - "ES2017", - "ES2018", - "ES2019", - "ES2020", - "ES2021", - "ES2022", - "ESNext" - ] - }, - { - "pattern": "^([Ee][Ss]([356]|(20(1[56789]|2[012]))|[Nn][Ee][Xx][Tt]))$" - } - ], - "markdownDescription": "Set the JavaScript language version for emitted JavaScript and include compatible library declarations.\n\nSee more: https://www.typescriptlang.org/tsconfig#target" - }, - "useUnknownInCatchVariables": { - "description": "Default catch clause variables as `unknown` instead of `any`.", - "type": "boolean", - "default": false, - "markdownDescription": "Default catch clause variables as `unknown` instead of `any`.\n\nSee more: https://www.typescriptlang.org/tsconfig#useUnknownInCatchVariables" - }, - "watch": { - "description": "Watch input files.", - "type": "boolean" - }, - "fallbackPolling": { - "description": "Specify the polling strategy to use when the system runs out of or doesn't support native file watchers. Requires TypeScript version 3.8 or later.", - "enum": [ - "fixedPollingInterval", - "priorityPollingInterval", - "dynamicPriorityPolling", - "fixedInterval", - "priorityInterval", - "dynamicPriority", - "fixedChunkSize" - ] - }, - "watchDirectory": { - "description": "Specify the strategy for watching directories under systems that lack recursive file-watching functionality. Requires TypeScript version 3.8 or later.", - "enum": [ - "useFsEvents", - "fixedPollingInterval", - "dynamicPriorityPolling", - "fixedChunkSizePolling" - ], - "default": "useFsEvents" - }, - "watchFile": { - "description": "Specify the strategy for watching individual files. Requires TypeScript version 3.8 or later.", - "enum": [ - "fixedPollingInterval", - "priorityPollingInterval", - "dynamicPriorityPolling", - "useFsEvents", - "useFsEventsOnParentDirectory", - "fixedChunkSizePolling" - ], - "default": "useFsEvents" - }, - "experimentalDecorators": { - "description": "Enable experimental support for TC39 stage 2 draft decorators.", - "type": "boolean", - "markdownDescription": "Enable experimental support for TC39 stage 2 draft decorators.\n\nSee more: https://www.typescriptlang.org/tsconfig#experimentalDecorators" - }, - "emitDecoratorMetadata": { - "description": "Emit design-type metadata for decorated declarations in source files.", - "type": "boolean", - "markdownDescription": "Emit design-type metadata for decorated declarations in source files.\n\nSee more: https://www.typescriptlang.org/tsconfig#emitDecoratorMetadata" - }, - "allowUnusedLabels": { - "description": "Disable error reporting for unused labels.", - "type": "boolean", - "markdownDescription": "Disable error reporting for unused labels.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowUnusedLabels" - }, - "noImplicitReturns": { - "description": "Enable error reporting for codepaths that do not explicitly return in a function.", - "type": "boolean", - "default": false, - "markdownDescription": "Enable error reporting for codepaths that do not explicitly return in a function.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitReturns" - }, - "noUncheckedIndexedAccess": { - "description": "Add `undefined` to a type when accessed using an index.", - "type": "boolean", - "markdownDescription": "Add `undefined` to a type when accessed using an index.\n\nSee more: https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess" - }, - "noFallthroughCasesInSwitch": { - "description": "Enable error reporting for fallthrough cases in switch statements.", - "type": "boolean", - "default": false, - "markdownDescription": "Enable error reporting for fallthrough cases in switch statements.\n\nSee more: https://www.typescriptlang.org/tsconfig#noFallthroughCasesInSwitch" - }, - "noImplicitOverride": { - "description": "Ensure overriding members in derived classes are marked with an override modifier.", - "type": "boolean", - "default": false, - "markdownDescription": "Ensure overriding members in derived classes are marked with an override modifier.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitOverride" - }, - "allowUnreachableCode": { - "description": "Disable error reporting for unreachable code.", - "type": "boolean", - "markdownDescription": "Disable error reporting for unreachable code.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowUnreachableCode" - }, - "forceConsistentCasingInFileNames": { - "description": "Ensure that casing is correct in imports.", - "type": "boolean", - "default": false, - "markdownDescription": "Ensure that casing is correct in imports.\n\nSee more: https://www.typescriptlang.org/tsconfig#forceConsistentCasingInFileNames" - }, - "generateCpuProfile": { - "description": "Emit a v8 CPU profile of the compiler run for debugging.", - "type": "string", - "default": "profile.cpuprofile", - "markdownDescription": "Emit a v8 CPU profile of the compiler run for debugging.\n\nSee more: https://www.typescriptlang.org/tsconfig#generateCpuProfile" - }, - "baseUrl": { - "description": "Specify the base directory to resolve non-relative module names.", - "type": "string", - "markdownDescription": "Specify the base directory to resolve non-relative module names.\n\nSee more: https://www.typescriptlang.org/tsconfig#baseUrl" - }, - "paths": { - "description": "Specify a set of entries that re-map imports to additional lookup locations.", - "type": "object", - "additionalProperties": { - "type": "array", - "uniqueItems": true, - "items": { - "type": "string", - "description": "Path mapping to be computed relative to baseUrl option." - } - }, - "markdownDescription": "Specify a set of entries that re-map imports to additional lookup locations.\n\nSee more: https://www.typescriptlang.org/tsconfig#paths" - }, - "plugins": { - "description": "Specify a list of language service plugins to include.", - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "description": "Plugin name.", - "type": "string" - } - } - }, - "markdownDescription": "Specify a list of language service plugins to include.\n\nSee more: https://www.typescriptlang.org/tsconfig#plugins" - }, - "rootDirs": { - "description": "Allow multiple folders to be treated as one when resolving modules.", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - }, - "markdownDescription": "Allow multiple folders to be treated as one when resolving modules.\n\nSee more: https://www.typescriptlang.org/tsconfig#rootDirs" - }, - "typeRoots": { - "description": "Specify multiple folders that act like `./node_modules/@types`.", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - }, - "markdownDescription": "Specify multiple folders that act like `./node_modules/@types`.\n\nSee more: https://www.typescriptlang.org/tsconfig#typeRoots" - }, - "types": { - "description": "Specify type package names to be included without being referenced in a source file.", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - }, - "markdownDescription": "Specify type package names to be included without being referenced in a source file.\n\nSee more: https://www.typescriptlang.org/tsconfig#types" - }, - "traceResolution": { - "description": "Enable tracing of the name resolution process. Requires TypeScript version 2.0 or later.", - "type": "boolean", - "default": false - }, - "allowJs": { - "description": "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.", - "type": "boolean", - "default": false, - "markdownDescription": "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowJs" - }, - "noErrorTruncation": { - "description": "Disable truncating types in error messages.", - "type": "boolean", - "default": false, - "markdownDescription": "Disable truncating types in error messages.\n\nSee more: https://www.typescriptlang.org/tsconfig#noErrorTruncation" - }, - "allowSyntheticDefaultImports": { - "description": "Allow 'import x from y' when a module doesn't have a default export.", - "type": "boolean", - "markdownDescription": "Allow 'import x from y' when a module doesn't have a default export.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowSyntheticDefaultImports" - }, - "noImplicitUseStrict": { - "description": "Disable adding 'use strict' directives in emitted JavaScript files.", - "type": "boolean", - "default": false, - "markdownDescription": "Disable adding 'use strict' directives in emitted JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitUseStrict" - }, - "listEmittedFiles": { - "description": "Print the names of emitted files after a compilation.", - "type": "boolean", - "default": false, - "markdownDescription": "Print the names of emitted files after a compilation.\n\nSee more: https://www.typescriptlang.org/tsconfig#listEmittedFiles" - }, - "disableSizeLimit": { - "description": "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.", - "type": "boolean", - "default": false, - "markdownDescription": "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.\n\nSee more: https://www.typescriptlang.org/tsconfig#disableSizeLimit" - }, - "lib": { - "description": "Specify a set of bundled library declaration files that describe the target runtime environment.", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string", - "anyOf": [ - { - "enum": [ - "ES5", - "ES6", - "ES2015", - "ES2015.Collection", - "ES2015.Core", - "ES2015.Generator", - "ES2015.Iterable", - "ES2015.Promise", - "ES2015.Proxy", - "ES2015.Reflect", - "ES2015.Symbol.WellKnown", - "ES2015.Symbol", - "ES2016", - "ES2016.Array.Include", - "ES2017", - "ES2017.Intl", - "ES2017.Object", - "ES2017.SharedMemory", - "ES2017.String", - "ES2017.TypedArrays", - "ES2018", - "ES2018.AsyncGenerator", - "ES2018.AsyncIterable", - "ES2018.Intl", - "ES2018.Promise", - "ES2018.Regexp", - "ES2019", - "ES2019.Array", - "ES2019.Object", - "ES2019.String", - "ES2019.Symbol", - "ES2020", - "ES2020.BigInt", - "ES2020.Promise", - "ES2020.String", - "ES2020.Symbol.WellKnown", - "ESNext", - "ESNext.Array", - "ESNext.AsyncIterable", - "ESNext.BigInt", - "ESNext.Intl", - "ESNext.Promise", - "ESNext.String", - "ESNext.Symbol", - "DOM", - "DOM.Iterable", - "ScriptHost", - "WebWorker", - "WebWorker.ImportScripts", - "Webworker.Iterable", - "ES7", - "ES2021", - "ES2020.SharedMemory", - "ES2020.Intl", - "ES2021.Promise", - "ES2021.String", - "ES2021.WeakRef", - "ESNext.WeakRef", - "es2021.intl", - "ES2022", - "ES2022.Array", - "ES2022.Error", - "ES2022.Intl", - "ES2022.Object", - "ES2022.String" - ] - }, - { - "pattern": "^[Ee][Ss]5|[Ee][Ss]6|[Ee][Ss]7$" - }, - { - "pattern": "^[Ee][Ss]2015(\\.([Cc][Oo][Ll][Ll][Ee][Cc][Tt][Ii][Oo][Nn]|[Cc][Oo][Rr][Ee]|[Gg][Ee][Nn][Ee][Rr][Aa][Tt][Oo][Rr]|[Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Pp][Rr][Oo][Xx][Yy]|[Rr][Ee][Ff][Ll][Ee][Cc][Tt]|[Ss][Yy][Mm][Bb][Oo][Ll].[Ww][Ee][Ll][Ll][Kk][Nn][Oo][Ww][Nn]|[Ss][Yy][Mm][Bb][Oo][Ll]))?$" - }, - { - "pattern": "^[Ee][Ss]2016(\\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ee][Xx][Tt](\\.([Aa][Rr][Rr][Aa][Yy]|[Aa][Ss][Yy][Nn][Cc][Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee]|[Bb][Ii][Gg][Ii][Nn][Tt]|[Ii][Nn][Tt][Ll]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Ss][Yy][Mm][Bb][Oo][Ll]|[Ww][Ee][Aa][Kk][Rr][Ee][Ff]))?$" - }, - { - "pattern": "^[Dd][Oo][Mm](\\.[Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee])?$" - }, - { - "pattern": "^[Ss][Cc][Rr][Ii][Pp][Tt][Hh][Oo][Ss][Tt]$" - }, - { - "pattern": "^[Ww][Ee][Bb][Ww][Oo][Rr][Kk][Ee][Rr](\\.[Ii][Mm][Pp][Oo][Rr][Tt][Ss][Cc][Rr][Ii][Pp][Tt][Ss])?$" - } - ] - }, - "markdownDescription": "Specify a set of bundled library declaration files that describe the target runtime environment.\n\nSee more: https://www.typescriptlang.org/tsconfig#lib" - }, - "strictNullChecks": { - "description": "When type checking, take into account `null` and `undefined`.", - "type": "boolean", - "default": false, - "markdownDescription": "When type checking, take into account `null` and `undefined`.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictNullChecks" - }, - "maxNodeModuleJsDepth": { - "description": "Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`.", - "type": "number", - "default": 0, - "markdownDescription": "Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`.\n\nSee more: https://www.typescriptlang.org/tsconfig#maxNodeModuleJsDepth" - }, - "importHelpers": { - "description": "Allow importing helper functions from tslib once per project, instead of including them per-file.", - "type": "boolean", - "default": false, - "markdownDescription": "Allow importing helper functions from tslib once per project, instead of including them per-file.\n\nSee more: https://www.typescriptlang.org/tsconfig#importHelpers" - }, - "importsNotUsedAsValues": { - "description": "Specify emit/checking behavior for imports that are only used for types.", - "default": "remove", - "enum": [ - "remove", - "preserve", - "error" - ] - }, - "alwaysStrict": { - "description": "Ensure 'use strict' is always emitted.", - "type": "boolean", - "markdownDescription": "Ensure 'use strict' is always emitted.\n\nSee more: https://www.typescriptlang.org/tsconfig#alwaysStrict" - }, - "strict": { - "description": "Enable all strict type checking options.", - "type": "boolean", - "default": false, - "markdownDescription": "Enable all strict type checking options.\n\nSee more: https://www.typescriptlang.org/tsconfig#strict" - }, - "strictBindCallApply": { - "description": "Check that the arguments for `bind`, `call`, and `apply` methods match the original function.", - "type": "boolean", - "default": false, - "markdownDescription": "Check that the arguments for `bind`, `call`, and `apply` methods match the original function.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictBindCallApply" - }, - "downlevelIteration": { - "description": "Emit more compliant, but verbose and less performant JavaScript for iteration.", - "type": "boolean", - "default": false, - "markdownDescription": "Emit more compliant, but verbose and less performant JavaScript for iteration.\n\nSee more: https://www.typescriptlang.org/tsconfig#downlevelIteration" - }, - "checkJs": { - "description": "Enable error reporting in type-checked JavaScript files.", - "type": "boolean", - "default": false, - "markdownDescription": "Enable error reporting in type-checked JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#checkJs" - }, - "strictFunctionTypes": { - "description": "When assigning functions, check to ensure parameters and the return values are subtype-compatible.", - "type": "boolean", - "default": false, - "markdownDescription": "When assigning functions, check to ensure parameters and the return values are subtype-compatible.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictFunctionTypes" - }, - "strictPropertyInitialization": { - "description": "Check for class properties that are declared but not set in the constructor.", - "type": "boolean", - "default": false, - "markdownDescription": "Check for class properties that are declared but not set in the constructor.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictPropertyInitialization" - }, - "esModuleInterop": { - "description": "Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.", - "type": "boolean", - "default": false, - "markdownDescription": "Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.\n\nSee more: https://www.typescriptlang.org/tsconfig#esModuleInterop" - }, - "allowUmdGlobalAccess": { - "description": "Allow accessing UMD globals from modules.", - "type": "boolean", - "default": false, - "markdownDescription": "Allow accessing UMD globals from modules.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowUmdGlobalAccess" - }, - "keyofStringsOnly": { - "description": "Make keyof only return strings instead of string, numbers or symbols. Legacy option.", - "type": "boolean", - "default": false, - "markdownDescription": "Make keyof only return strings instead of string, numbers or symbols. Legacy option.\n\nSee more: https://www.typescriptlang.org/tsconfig#keyofStringsOnly" - }, - "useDefineForClassFields": { - "description": "Emit ECMAScript-standard-compliant class fields.", - "type": "boolean", - "default": false, - "markdownDescription": "Emit ECMAScript-standard-compliant class fields.\n\nSee more: https://www.typescriptlang.org/tsconfig#useDefineForClassFields" - }, - "declarationMap": { - "description": "Create sourcemaps for d.ts files.", - "type": "boolean", - "default": false, - "markdownDescription": "Create sourcemaps for d.ts files.\n\nSee more: https://www.typescriptlang.org/tsconfig#declarationMap" - }, - "resolveJsonModule": { - "description": "Enable importing .json files", - "type": "boolean", - "default": false, - "markdownDescription": "Enable importing .json files\n\nSee more: https://www.typescriptlang.org/tsconfig#resolveJsonModule" - }, - "assumeChangesOnlyAffectDirectDependencies": { - "description": "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it. Requires TypeScript version 3.8 or later.", - "type": "boolean" - }, - "extendedDiagnostics": { - "description": "Output more detailed compiler performance information after building.", - "type": "boolean", - "default": false, - "markdownDescription": "Output more detailed compiler performance information after building.\n\nSee more: https://www.typescriptlang.org/tsconfig#extendedDiagnostics" - }, - "listFilesOnly": { - "description": "Print names of files that are part of the compilation and then stop processing.", - "type": "boolean" - }, - "disableSourceOfProjectReferenceRedirect": { - "description": "Disable preferring source files instead of declaration files when referencing composite projects", - "type": "boolean", - "markdownDescription": "Disable preferring source files instead of declaration files when referencing composite projects\n\nSee more: https://www.typescriptlang.org/tsconfig#disableSourceOfProjectReferenceRedirect" - }, - "disableSolutionSearching": { - "description": "Opt a project out of multi-project reference checking when editing.", - "type": "boolean", - "markdownDescription": "Opt a project out of multi-project reference checking when editing.\n\nSee more: https://www.typescriptlang.org/tsconfig#disableSolutionSearching" - } - } - } - } - }, - "typeAcquisitionDefinition": { - "properties": { - "typeAcquisition": { - "type": "object", - "description": "Auto type (.d.ts) acquisition options for this project. Requires TypeScript version 2.1 or later.", - "properties": { - "enable": { - "description": "Enable auto type acquisition", - "type": "boolean", - "default": false - }, - "include": { - "description": "Specifies a list of type declarations to be included in auto type acquisition. Ex. [\"jquery\", \"lodash\"]", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "exclude": { - "description": "Specifies a list of type declarations to be excluded from auto type acquisition. Ex. [\"jquery\", \"lodash\"]", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - } - } - } - } - } - }, - "referencesDefinition": { - "properties": { - "references": { - "type": "array", - "uniqueItems": true, - "description": "Referenced projects. Requires TypeScript version 3.0 or later.", - "items": { - "type": "object", - "description": "Project reference.", - "properties": { - "path": { - "type": "string", - "description": "Path to referenced tsconfig or to folder containing tsconfig." - } - } - } - } - } - }, - "tsNodeModuleTypes": { - "type": "object" - }, - "tsNodeDefinition": { - "properties": { - "ts-node": { - "description": "ts-node options. See also: https://typestrong.org/ts-node/docs/configuration\n\nts-node offers TypeScript execution and REPL for node.js, with source map support.", - "properties": { - "compiler": { - "default": "typescript", - "description": "Specify a custom TypeScript compiler.", - "type": "string" - }, - "compilerHost": { - "default": false, - "description": "Use TypeScript's compiler host API instead of the language service API.", - "type": "boolean" - }, - "compilerOptions": { - "additionalProperties": true, - "allOf": [ - { - "$ref": "#/definitions/compilerOptionsDefinition/properties/compilerOptions" - } - ], - "description": "JSON object to merge with TypeScript `compilerOptions`.", - "properties": {}, - "type": "object" - }, - "emit": { - "default": false, - "description": "Emit output files into `.ts-node` directory.", - "type": "boolean" - }, - "esm": { - "description": "Enable native ESM support.\n\nFor details, see https://typestrong.org/ts-node/docs/imports#native-ecmascript-modules", - "type": "boolean" - }, - "experimentalReplAwait": { - "description": "Allows the usage of top level await in REPL.\n\nUses node's implementation which accomplishes this with an AST syntax transformation.\n\nEnabled by default when tsconfig target is es2018 or above. Set to false to disable.\n\n**Note**: setting to `true` when tsconfig target is too low will throw an Error. Leave as `undefined`\nto get default, automatic behavior.", - "type": "boolean" - }, - "experimentalResolver": { - "description": "Enable experimental features that re-map imports and require calls to support:\n`baseUrl`, `paths`, `rootDirs`, `.js` to `.ts` file extension mappings,\n`outDir` to `rootDir` mappings for composite projects and monorepos.\n\nFor details, see https://github.com/TypeStrong/ts-node/issues/1514", - "type": "boolean" - }, - "experimentalSpecifierResolution": { - "description": "Like node's `--experimental-specifier-resolution`, , but can also be set in your `tsconfig.json` for convenience.\n\nFor details, see https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm", - "enum": [ - "explicit", - "node" - ], - "type": "string" - }, - "experimentalTsImportSpecifiers": { - "description": "Allow using voluntary `.ts` file extension in import specifiers.\n\nTypically, in ESM projects, import specifiers must have an emit extension, `.js`, `.cjs`, or `.mjs`,\nand we automatically map to the corresponding `.ts`, `.cts`, or `.mts` source file. This is the\nrecommended approach.\n\nHowever, if you really want to use `.ts` in import specifiers, and are aware that this may\nbreak tooling, you can enable this flag.", - "type": "boolean" - }, - "files": { - "default": false, - "description": "Load \"files\" and \"include\" from `tsconfig.json` on startup.\n\nDefault is to override `tsconfig.json` \"files\" and \"include\" to only include the entrypoint script.", - "type": "boolean" - }, - "ignore": { - "default": [ - "(?:^|/)node_modules/" - ], - "description": "Paths which should not be compiled.\n\nEach string in the array is converted to a regular expression via `new RegExp()` and tested against source paths prior to compilation.\n\nSource paths are normalized to posix-style separators, relative to the directory containing `tsconfig.json` or to cwd if no `tsconfig.json` is loaded.\n\nDefault is to ignore all node_modules subdirectories.", - "items": { - "type": "string" - }, - "type": "array" - }, - "ignoreDiagnostics": { - "description": "Ignore TypeScript warnings by diagnostic code.", - "items": { - "type": [ - "string", - "number" - ] - }, - "type": "array" - }, - "logError": { - "default": false, - "description": "Logs TypeScript errors to stderr instead of throwing exceptions.", - "type": "boolean" - }, - "moduleTypes": { - "$ref": "#/definitions/tsNodeModuleTypes", - "description": "Override certain paths to be compiled and executed as CommonJS or ECMAScript modules.\nWhen overridden, the tsconfig \"module\" and package.json \"type\" fields are overridden, and\nthe file extension is ignored.\nThis is useful if you cannot use .mts, .cts, .mjs, or .cjs file extensions;\nit achieves the same effect.\n\nEach key is a glob pattern following the same rules as tsconfig's \"include\" array.\nWhen multiple patterns match the same file, the last pattern takes precedence.\n\n`cjs` overrides matches files to compile and execute as CommonJS.\n`esm` overrides matches files to compile and execute as native ECMAScript modules.\n`package` overrides either of the above to default behavior, which obeys package.json \"type\" and\ntsconfig.json \"module\" options." - }, - "preferTsExts": { - "default": false, - "description": "Re-order file extensions so that TypeScript imports are preferred.\n\nFor example, when both `index.js` and `index.ts` exist, enabling this option causes `require('./index')` to resolve to `index.ts` instead of `index.js`", - "type": "boolean" - }, - "pretty": { - "default": false, - "description": "Use pretty diagnostic formatter.", - "type": "boolean" - }, - "require": { - "description": "Modules to require, like node's `--require` flag.\n\nIf specified in `tsconfig.json`, the modules will be resolved relative to the `tsconfig.json` file.\n\nIf specified programmatically, each input string should be pre-resolved to an absolute path for\nbest results.", - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "default": false, - "description": "Scope compiler to files within `scopeDir`.", - "type": "boolean" - }, - "scopeDir": { - "default": "First of: `tsconfig.json` \"rootDir\" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded.", - "type": "string" - }, - "skipIgnore": { - "default": false, - "description": "Skip ignore check, so that compilation will be attempted for all files with matching extensions.", - "type": "boolean" - }, - "swc": { - "description": "Transpile with swc instead of the TypeScript compiler, and skip typechecking.\n\nEquivalent to setting both `transpileOnly: true` and `transpiler: 'ts-node/transpilers/swc'`\n\nFor complete instructions: https://typestrong.org/ts-node/docs/transpilers", - "type": "boolean" - }, - "transpileOnly": { - "default": false, - "description": "Use TypeScript's faster `transpileModule`.", - "type": "boolean" - }, - "transpiler": { - "anyOf": [ - { - "items": [ - { - "type": "string" - }, - { - "additionalProperties": true, - "properties": {}, - "type": "object" - } - ], - "maxItems": 2, - "minItems": 2, - "type": "array" - }, - { - "type": "string" - } - ], - "description": "Specify a custom transpiler for use with transpileOnly" - }, - "typeCheck": { - "default": true, - "description": "**DEPRECATED** Specify type-check is enabled (e.g. `transpileOnly == false`).", - "type": "boolean" - } - }, - "type": "object" - } - } - } - }, - "id": "https://json.schemastore.org/tsconfig", - "title": "JSON schema for the TypeScript compiler's configuration file", - "type": "object" -} \ No newline at end of file diff --git a/node_modules/v8-compile-cache-lib/CHANGELOG.md b/node_modules/v8-compile-cache-lib/CHANGELOG.md deleted file mode 100644 index d4da256..0000000 --- a/node_modules/v8-compile-cache-lib/CHANGELOG.md +++ /dev/null @@ -1,53 +0,0 @@ -# `v8-module-cache` Changelog - -## 2021-03-05, Version 2.3.0 - -* Fix use require.main instead of module.parent [#34](https://github.com/zertosh/v8-compile-cache/pull/34). - -## 2020-10-28, Version 2.2.0 - -* Added `V8_COMPILE_CACHE_CACHE_DIR` option [#23](https://github.com/zertosh/v8-compile-cache/pull/23). - -## 2020-05-30, Version 2.1.1 - -* Stop using process.umask() [#28](https://github.com/zertosh/v8-compile-cache/pull/28). - -## 2019-08-04, Version 2.1.0 - -* Fix Electron by calling the module wrapper with `Buffer` [#10](https://github.com/zertosh/v8-compile-cache/pull/10). - -## 2019-05-10, Version 2.0.3 - -* Add `LICENSE` file [#19](https://github.com/zertosh/v8-compile-cache/pull/19). -* Add "repository" to `package.json` (see [eea336e](https://github.com/zertosh/v8-compile-cache/commit/eea336eaa8360f9ded9342b8aa928e56ac6a7529)). -* Support `require.resolve.paths` (added in Node v8.9.0) [#20](https://github.com/zertosh/v8-compile-cache/pull/20)/[#22](https://github.com/zertosh/v8-compile-cache/pull/22). - -## 2018-08-06, Version 2.0.2 - -* Re-publish. - -## 2018-08-06, Version 2.0.1 - -* Support `require.resolve` options (added in Node v8.9.0). - -## 2018-04-30, Version 2.0.0 - -* Use `Buffer.alloc` instead of `new Buffer()`. -* Drop support for Node 5.x. - -## 2018-01-23, Version 1.1.2 - -* Instead of checking for `process.versions.v8`, check that `script.cachedDataProduced` is `true` (rather than `null`/`undefined`) for support to be considered existent. - -## 2018-01-23, Version 1.1.1 - -* Check for the existence of `process.versions.v8` before attaching hook (see [f8b0388](https://github.com/zertosh/v8-compile-cache/commit/f8b038848be94bc2c905880dd50447c73393f364)). - -## 2017-03-27, Version 1.1.0 - -* Safer cache directory creation (see [bcb3b12](https://github.com/zertosh/v8-compile-cache/commit/bcb3b12c819ab0927ec4408e70f612a6d50a9617)). - - The cache is now suffixed with the user's uid on POSIX systems (i.e. `/path/to/tmp/v8-compile-cache-1234`). - -## 2017-02-21, Version 1.0.0 - -* Initial release. diff --git a/node_modules/v8-compile-cache-lib/LICENSE b/node_modules/v8-compile-cache-lib/LICENSE deleted file mode 100644 index b72b670..0000000 --- a/node_modules/v8-compile-cache-lib/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2019 Andres Suarez - -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/v8-compile-cache-lib/README.md b/node_modules/v8-compile-cache-lib/README.md deleted file mode 100644 index 0593feb..0000000 --- a/node_modules/v8-compile-cache-lib/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# v8-compile-cache-lib - -> Fork of [`v8-compile-cache`](https://www.npmjs.com/package/v8-compile-cache) exposed as an API for programmatic usage in other libraries and tools. - ---- - -[![Build status](https://img.shields.io/github/workflow/status/cspotcode/v8-compile-cache-lib/Continuous%20Integration)](https://github.com/cspotcode/v8-compile-cache-lib/actions?query=workflow%3A%22Continuous+Integration%22) - -`v8-compile-cache-lib` attaches a `require` hook to use [V8's code cache](https://v8project.blogspot.com/2015/07/code-caching.html) to speed up instantiation time. The "code cache" is the work of parsing and compiling done by V8. - -The ability to tap into V8 to produce/consume this cache was introduced in [Node v5.7.0](https://nodejs.org/en/blog/release/v5.7.0/). - -## Usage - -1. Add the dependency: - - ```sh - $ npm install --save v8-compile-cache-lib - ``` - -2. Then, in your entry module add: - - ```js - require('v8-compile-cache-lib').install(); - ``` - -**`.install()` in Node <5.7.0 is a noop – but you need at least Node 4.0.0 to support the ES2015 syntax used by `v8-compile-cache-lib`.** - -## Options - -Set the environment variable `DISABLE_V8_COMPILE_CACHE=1` to disable the cache. - -Cache directory is defined by environment variable `V8_COMPILE_CACHE_CACHE_DIR` or defaults to `/v8-compile-cache-`. - -## Internals - -Cache files are suffixed `.BLOB` and `.MAP` corresponding to the entry module that required `v8-compile-cache-lib`. The cache is _entry module specific_ because it is faster to load the entire code cache into memory at once, than it is to read it from disk on a file-by-file basis. - -## Benchmarks - -See https://github.com/cspotcode/v8-compile-cache-lib/tree/master/bench. - -**Load Times:** - -| Module | Without Cache | With Cache | -| ---------------- | -------------:| ----------:| -| `babel-core` | `218ms` | `185ms` | -| `yarn` | `153ms` | `113ms` | -| `yarn` (bundled) | `228ms` | `105ms` | - -_^ Includes the overhead of loading the cache itself._ - -## Acknowledgements - -* The original [`v8-compile-cache`](https://github.com/zertosh/v8-compile-cache) from which this library is forked. -* `FileSystemBlobStore` and `NativeCompileCache` are based on Atom's implementation of their v8 compile cache: - - https://github.com/atom/atom/blob/b0d7a8a/src/file-system-blob-store.js - - https://github.com/atom/atom/blob/b0d7a8a/src/native-compile-cache.js -* `mkdirpSync` is based on: - - https://github.com/substack/node-mkdirp/blob/f2003bb/index.js#L55-L98 diff --git a/node_modules/v8-compile-cache-lib/package.json b/node_modules/v8-compile-cache-lib/package.json deleted file mode 100644 index e905b10..0000000 --- a/node_modules/v8-compile-cache-lib/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "v8-compile-cache-lib", - "version": "3.0.1", - "description": "Require hook for automatic V8 compile cache persistence", - "main": "v8-compile-cache.js", - "scripts": { - "bench": "bench/run.sh", - "eslint": "eslint --max-warnings=0 .", - "tap": "tap test/*-test.js", - "test": "npm run tap", - "posttest": "npm run eslint" - }, - "author": "Andrew Bradley ", - "repository": { - "type": "git", - "url": "https://github.com/cspotcode/v8-compile-cache-lib.git" - }, - "files": [ - "v8-compile-cache.d.ts", - "v8-compile-cache.js" - ], - "license": "MIT", - "dependencies": {}, - "devDependencies": { - "babel-core": "6.26.3", - "eslint": "^7.12.1", - "flow-parser": "0.136.0", - "rimraf": "^2.5.4", - "rxjs": "6.6.3", - "semver": "^5.3.0", - "tap": "^9.0.0", - "temp": "^0.8.3", - "yarn": "1.22.10" - } -} diff --git a/node_modules/v8-compile-cache-lib/v8-compile-cache.d.ts b/node_modules/v8-compile-cache-lib/v8-compile-cache.d.ts deleted file mode 100644 index fb80c2c..0000000 --- a/node_modules/v8-compile-cache-lib/v8-compile-cache.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function install(opts?: { - cacheDir?: string; - prefix?: string; -}): { - uninstall(): void; -} | undefined; -x \ No newline at end of file diff --git a/node_modules/v8-compile-cache-lib/v8-compile-cache.js b/node_modules/v8-compile-cache-lib/v8-compile-cache.js deleted file mode 100644 index baedb36..0000000 --- a/node_modules/v8-compile-cache-lib/v8-compile-cache.js +++ /dev/null @@ -1,391 +0,0 @@ -'use strict'; - -const Module = require('module'); -const crypto = require('crypto'); -const fs = require('fs'); -const path = require('path'); -const vm = require('vm'); -const os = require('os'); - -const hasOwnProperty = Object.prototype.hasOwnProperty; - -//------------------------------------------------------------------------------ -// FileSystemBlobStore -//------------------------------------------------------------------------------ - -class FileSystemBlobStore { - constructor(directory, prefix) { - const name = prefix ? slashEscape(prefix + '.') : ''; - this._blobFilename = path.join(directory, name + 'BLOB'); - this._mapFilename = path.join(directory, name + 'MAP'); - this._lockFilename = path.join(directory, name + 'LOCK'); - this._directory = directory; - this._load(); - } - - has(key, invalidationKey) { - if (hasOwnProperty.call(this._memoryBlobs, key)) { - return this._invalidationKeys[key] === invalidationKey; - } else if (hasOwnProperty.call(this._storedMap, key)) { - return this._storedMap[key][0] === invalidationKey; - } - return false; - } - - get(key, invalidationKey) { - if (hasOwnProperty.call(this._memoryBlobs, key)) { - if (this._invalidationKeys[key] === invalidationKey) { - return this._memoryBlobs[key]; - } - } else if (hasOwnProperty.call(this._storedMap, key)) { - const mapping = this._storedMap[key]; - if (mapping[0] === invalidationKey) { - return this._storedBlob.slice(mapping[1], mapping[2]); - } - } - } - - set(key, invalidationKey, buffer) { - this._invalidationKeys[key] = invalidationKey; - this._memoryBlobs[key] = buffer; - this._dirty = true; - } - - delete(key) { - if (hasOwnProperty.call(this._memoryBlobs, key)) { - this._dirty = true; - delete this._memoryBlobs[key]; - } - if (hasOwnProperty.call(this._invalidationKeys, key)) { - this._dirty = true; - delete this._invalidationKeys[key]; - } - if (hasOwnProperty.call(this._storedMap, key)) { - this._dirty = true; - delete this._storedMap[key]; - } - } - - isDirty() { - return this._dirty; - } - - save() { - const dump = this._getDump(); - const blobToStore = Buffer.concat(dump[0]); - const mapToStore = JSON.stringify(dump[1]); - - try { - mkdirpSync(this._directory); - fs.writeFileSync(this._lockFilename, 'LOCK', {flag: 'wx'}); - } catch (error) { - // Swallow the exception if we fail to acquire the lock. - return false; - } - - try { - fs.writeFileSync(this._blobFilename, blobToStore); - fs.writeFileSync(this._mapFilename, mapToStore); - } finally { - fs.unlinkSync(this._lockFilename); - } - - return true; - } - - _load() { - try { - this._storedBlob = fs.readFileSync(this._blobFilename); - this._storedMap = JSON.parse(fs.readFileSync(this._mapFilename)); - } catch (e) { - this._storedBlob = Buffer.alloc(0); - this._storedMap = {}; - } - this._dirty = false; - this._memoryBlobs = {}; - this._invalidationKeys = {}; - } - - _getDump() { - const buffers = []; - const newMap = {}; - let offset = 0; - - function push(key, invalidationKey, buffer) { - buffers.push(buffer); - newMap[key] = [invalidationKey, offset, offset + buffer.length]; - offset += buffer.length; - } - - for (const key of Object.keys(this._memoryBlobs)) { - const buffer = this._memoryBlobs[key]; - const invalidationKey = this._invalidationKeys[key]; - push(key, invalidationKey, buffer); - } - - for (const key of Object.keys(this._storedMap)) { - if (hasOwnProperty.call(newMap, key)) continue; - const mapping = this._storedMap[key]; - const buffer = this._storedBlob.slice(mapping[1], mapping[2]); - push(key, mapping[0], buffer); - } - - return [buffers, newMap]; - } -} - -//------------------------------------------------------------------------------ -// NativeCompileCache -//------------------------------------------------------------------------------ - -class NativeCompileCache { - constructor() { - this._cacheStore = null; - this._previousModuleCompile = null; - } - - setCacheStore(cacheStore) { - this._cacheStore = cacheStore; - } - - install() { - const self = this; - const hasRequireResolvePaths = typeof require.resolve.paths === 'function'; - this._previousModuleCompile = Module.prototype._compile; - Module.prototype._compile = this._ownModuleCompile = _ownModuleCompile; - self.enabled = true; - function _ownModuleCompile(content, filename) { - if(!self.enabled) return this._previousModuleCompile.apply(this, arguments); - const mod = this; - - function require(id) { - return mod.require(id); - } - - // https://github.com/nodejs/node/blob/v10.15.3/lib/internal/modules/cjs/helpers.js#L28 - function resolve(request, options) { - return Module._resolveFilename(request, mod, false, options); - } - require.resolve = resolve; - - // https://github.com/nodejs/node/blob/v10.15.3/lib/internal/modules/cjs/helpers.js#L37 - // resolve.resolve.paths was added in v8.9.0 - if (hasRequireResolvePaths) { - resolve.paths = function paths(request) { - return Module._resolveLookupPaths(request, mod, true); - }; - } - - require.main = process.mainModule; - - // Enable support to add extra extension types - require.extensions = Module._extensions; - require.cache = Module._cache; - - const dirname = path.dirname(filename); - - const compiledWrapper = self._moduleCompile(filename, content); - - // We skip the debugger setup because by the time we run, node has already - // done that itself. - - // `Buffer` is included for Electron. - // See https://github.com/zertosh/v8-compile-cache/pull/10#issuecomment-518042543 - const args = [mod.exports, require, mod, filename, dirname, process, global, Buffer]; - return compiledWrapper.apply(mod.exports, args); - } - } - - uninstall() { - this.enabled = false; - // If something else has since been installed on top of us, we cannot overwrite it. - if(Module.prototype._compile === this._ownModuleCompile) { - Module.prototype._compile = this._previousModuleCompile; - } - } - - _moduleCompile(filename, content) { - // https://github.com/nodejs/node/blob/v7.5.0/lib/module.js#L511 - - // Remove shebang - var contLen = content.length; - if (contLen >= 2) { - if (content.charCodeAt(0) === 35/*#*/ && - content.charCodeAt(1) === 33/*!*/) { - if (contLen === 2) { - // Exact match - content = ''; - } else { - // Find end of shebang line and slice it off - var i = 2; - for (; i < contLen; ++i) { - var code = content.charCodeAt(i); - if (code === 10/*\n*/ || code === 13/*\r*/) break; - } - if (i === contLen) { - content = ''; - } else { - // Note that this actually includes the newline character(s) in the - // new output. This duplicates the behavior of the regular - // expression that was previously used to replace the shebang line - content = content.slice(i); - } - } - } - } - - // create wrapper function - var wrapper = Module.wrap(content); - - var invalidationKey = crypto - .createHash('sha1') - .update(content, 'utf8') - .digest('hex'); - - var buffer = this._cacheStore.get(filename, invalidationKey); - - var script = new vm.Script(wrapper, { - filename: filename, - lineOffset: 0, - displayErrors: true, - cachedData: buffer, - produceCachedData: true, - }); - - if (script.cachedDataProduced) { - this._cacheStore.set(filename, invalidationKey, script.cachedData); - } else if (script.cachedDataRejected) { - this._cacheStore.delete(filename); - } - - var compiledWrapper = script.runInThisContext({ - filename: filename, - lineOffset: 0, - columnOffset: 0, - displayErrors: true, - }); - - return compiledWrapper; - } -} - -//------------------------------------------------------------------------------ -// utilities -// -// https://github.com/substack/node-mkdirp/blob/f2003bb/index.js#L55-L98 -// https://github.com/zertosh/slash-escape/blob/e7ebb99/slash-escape.js -//------------------------------------------------------------------------------ - -function mkdirpSync(p_) { - _mkdirpSync(path.resolve(p_), 0o777); -} - -function _mkdirpSync(p, mode) { - try { - fs.mkdirSync(p, mode); - } catch (err0) { - if (err0.code === 'ENOENT') { - _mkdirpSync(path.dirname(p)); - _mkdirpSync(p); - } else { - try { - const stat = fs.statSync(p); - if (!stat.isDirectory()) { throw err0; } - } catch (err1) { - throw err0; - } - } - } -} - -function slashEscape(str) { - const ESCAPE_LOOKUP = { - '\\': 'zB', - ':': 'zC', - '/': 'zS', - '\x00': 'z0', - 'z': 'zZ', - }; - const ESCAPE_REGEX = /[\\:/\x00z]/g; // eslint-disable-line no-control-regex - return str.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]); -} - -function supportsCachedData() { - const script = new vm.Script('""', {produceCachedData: true}); - // chakracore, as of v1.7.1.0, returns `false`. - return script.cachedDataProduced === true; -} - -function getCacheDir() { - const v8_compile_cache_cache_dir = process.env.V8_COMPILE_CACHE_CACHE_DIR; - if (v8_compile_cache_cache_dir) { - return v8_compile_cache_cache_dir; - } - - // Avoid cache ownership issues on POSIX systems. - const dirname = typeof process.getuid === 'function' - ? 'v8-compile-cache-' + process.getuid() - : 'v8-compile-cache'; - const version = typeof process.versions.v8 === 'string' - ? process.versions.v8 - : typeof process.versions.chakracore === 'string' - ? 'chakracore-' + process.versions.chakracore - : 'node-' + process.version; - const cacheDir = path.join(os.tmpdir(), dirname, version); - return cacheDir; -} - -function getMainName() { - // `require.main.filename` is undefined or null when: - // * node -e 'require("v8-compile-cache")' - // * node -r 'v8-compile-cache' - // * Or, requiring from the REPL. - const mainName = require.main && typeof require.main.filename === 'string' - ? require.main.filename - : process.cwd(); - return mainName; -} - -function install(opts) { - if (!process.env.DISABLE_V8_COMPILE_CACHE && supportsCachedData()) { - if(typeof opts === 'undefined') opts = {} - let cacheDir = opts.cacheDir - if(typeof cacheDir === 'undefined') cacheDir = getCacheDir(); - let prefix = opts.prefix - if(typeof prefix === 'undefined') prefix = getMainName(); - const blobStore = new FileSystemBlobStore(cacheDir, prefix); - - const nativeCompileCache = new NativeCompileCache(); - nativeCompileCache.setCacheStore(blobStore); - nativeCompileCache.install(); - - let uninstalled = false; - const uninstall = () => { - if(uninstalled) return; - uninstalled = true; - process.removeListener('exit', uninstall); - if (blobStore.isDirty()) { - blobStore.save(); - } - nativeCompileCache.uninstall(); - } - process.once('exit', uninstall); - return {uninstall}; - } -} - -//------------------------------------------------------------------------------ -// main -//------------------------------------------------------------------------------ - -module.exports.install = install; - -module.exports.__TEST__ = { - FileSystemBlobStore, - NativeCompileCache, - mkdirpSync, - slashEscape, - supportsCachedData, - getCacheDir, - getMainName, -}; diff --git a/node_modules/yn/index.d.ts b/node_modules/yn/index.d.ts deleted file mode 100644 index c72a414..0000000 --- a/node_modules/yn/index.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -declare namespace yn { - interface Options { - /** - Use a key distance-based score to leniently accept typos of `yes` and `no`. - - @default false - */ - readonly lenient?: boolean; - - /** - Default value if no match was found. - - @default null - */ - readonly default?: boolean | null; - } - - interface OptionsWithDefault extends Options { - default: boolean; - } -} - -declare const yn: { - /** - Parse yes/no like values. - - The following case-insensitive values are recognized: `'y', 'yes', 'true', true, '1', 1, 'n', 'no', 'false', false, '0', 0` - - @param input - Value that should be converted. - @returns The parsed input if it can be parsed or the default value defined in the `default` option. - - @example - ``` - import yn = require('yn'); - - yn('y'); - //=> true - - yn('NO'); - //=> false - - yn(true); - //=> true - - yn('abomasum'); - //=> null - - yn('abomasum', {default: false}); - //=> false - - yn('mo', {lenient: true}); - //=> false - ``` - */ - (input: unknown, options: yn.OptionsWithDefault): boolean; - (input: unknown, options?: yn.Options): boolean | null; - - // TODO: Remove this for the next major release, refactor the whole definition to: - // declare function yn(input: unknown, options: yn.OptionsWithDefault): boolean; - // declare function yn(input: unknown, options?: yn.Options): boolean | null; - // export = yn; - default: typeof yn; -}; - -export = yn; diff --git a/node_modules/yn/index.js b/node_modules/yn/index.js deleted file mode 100644 index a5a24c1..0000000 --- a/node_modules/yn/index.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; -const lenient = require('./lenient'); - -const yn = (input, options) => { - input = String(input).trim(); - - options = Object.assign({ - lenient: false, - default: null - }, options); - - if (options.default !== null && typeof options.default !== 'boolean') { - throw new TypeError(`Expected the \`default\` option to be of type \`boolean\`, got \`${typeof options.default}\``); - } - - if (/^(?:y|yes|true|1)$/i.test(input)) { - return true; - } - - if (/^(?:n|no|false|0)$/i.test(input)) { - return false; - } - - if (options.lenient === true) { - return lenient(input, options); - } - - return options.default; -}; - -module.exports = yn; -// TODO: Remove this for the next major release -module.exports.default = yn; diff --git a/node_modules/yn/lenient.js b/node_modules/yn/lenient.js deleted file mode 100644 index 51cd836..0000000 --- a/node_modules/yn/lenient.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict'; - -const YES_MATCH_SCORE_THRESHOLD = 2; -const NO_MATCH_SCORE_THRESHOLD = 1.25; - -const yMatch = new Map([ - [5, 0.25], - [6, 0.25], - [7, 0.25], - ['t', 0.75], - ['y', 1], - ['u', 0.75], - ['g', 0.25], - ['h', 0.25], - ['j', 0.25] -]); - -const eMatch = new Map([ - [2, 0.25], - [3, 0.25], - [4, 0.25], - ['w', 0.75], - ['e', 1], - ['r', 0.75], - ['s', 0.25], - ['d', 0.25], - ['f', 0.25] -]); - -const sMatch = new Map([ - ['q', 0.25], - ['w', 0.25], - ['e', 0.25], - ['a', 0.75], - ['s', 1], - ['d', 0.75], - ['z', 0.25], - ['x', 0.25], - ['c', 0.25] -]); - -const nMatch = new Map([ - ['h', 0.25], - ['j', 0.25], - ['k', 0.25], - ['b', 0.75], - ['n', 1], - ['m', 0.75] -]); - -const oMatch = new Map([ - [9, 0.25], - [0, 0.25], - ['i', 0.75], - ['o', 1], - ['p', 0.75], - ['k', 0.25], - ['l', 0.25] -]); - -function getYesMatchScore(value) { - const [y, e, s] = value; - let score = 0; - - if (yMatch.has(y)) { - score += yMatch.get(y); - } - - if (eMatch.has(e)) { - score += eMatch.get(e); - } - - if (sMatch.has(s)) { - score += sMatch.get(s); - } - - return score; -} - -function getNoMatchScore(value) { - const [n, o] = value; - let score = 0; - - if (nMatch.has(n)) { - score += nMatch.get(n); - } - - if (oMatch.has(o)) { - score += oMatch.get(o); - } - - return score; -} - -module.exports = (input, options) => { - if (getYesMatchScore(input) >= YES_MATCH_SCORE_THRESHOLD) { - return true; - } - - if (getNoMatchScore(input) >= NO_MATCH_SCORE_THRESHOLD) { - return false; - } - - return options.default; -}; diff --git a/node_modules/yn/license b/node_modules/yn/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/yn/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/yn/package.json b/node_modules/yn/package.json deleted file mode 100644 index 47d86f2..0000000 --- a/node_modules/yn/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "yn", - "version": "3.1.1", - "description": "Parse yes/no like values", - "license": "MIT", - "repository": "sindresorhus/yn", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "lenient.js", - "index.d.ts" - ], - "keywords": [ - "yn", - "yes", - "no", - "cli", - "prompt", - "validate", - "input", - "answer", - "true", - "false", - "parse", - "lenient" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/node_modules/yn/readme.md b/node_modules/yn/readme.md deleted file mode 100644 index 7be3114..0000000 --- a/node_modules/yn/readme.md +++ /dev/null @@ -1,83 +0,0 @@ -# yn [![Build Status](https://travis-ci.org/sindresorhus/yn.svg?branch=master)](https://travis-ci.org/sindresorhus/yn) - -> Parse yes/no like values - -Useful for validating answers of a CLI prompt. - ---- - -The following case-insensitive values are recognized: - -```js -'y', 'yes', 'true', true, '1', 1, 'n', 'no', 'false', false, '0', 0 -``` - -*Enable lenient mode to gracefully handle typos.* - - -## Install - -``` -$ npm install yn -``` - - -## Usage - -```js -const yn = require('yn'); - -yn('y'); -//=> true - -yn('NO'); -//=> false - -yn(true); -//=> true - -yn('abomasum'); -//=> null - -yn('abomasum', {default: false}); -//=> false - -yn('mo', {lenient: true}); -//=> false -``` - -Unrecognized values return `null`. - - -## API - -### yn(input, [options]) - -#### input - -Type: `any` - -Value that should be converted. - -#### options - -Type: `Object` - -##### lenient - -Type: `boolean`
-Default: `false` - -Use a key distance-based score to leniently accept typos of `yes` and `no`. - -##### default - -Type: `boolean`
-Default: `null` - -Default value if no match was found. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/package.json b/package.json index 89c9a08..d10f51a 100644 --- a/package.json +++ b/package.json @@ -11,17 +11,15 @@ "setup" ], "homepage": "https://bun.sh", - "type": "module", "main": "dist/action.js", "repository": "git@github.com:oven-sh/setup-bun.git", "bugs": "https://github.com/oven-sh/setup-bun/issues", "license": "MIT", "author": "xHyroM", "scripts": { - "format": "prettier --write src", - "build": "tsc -p .", - "start": "ts-node-esm src/action.ts", - "start:dist": "node dist/action.js" + "format": "prettier --write src *.yml *.json *.md", + "build": "esbuild --target=node16 --outdir=dist --bundle --platform=node --format=cjs src/action.ts", + "start": "bun run build && node dist/action.js" }, "dependencies": { "@actions/cache": "^3.1.4", @@ -32,10 +30,9 @@ "@actions/tool-cache": "^2.0.1" }, "devDependencies": { + "esbuild": "^0.19.2", "prettier": "^2.8.4", - "typescript": "^4.9.5", - "ts-node": "^10.9.1", - "esbuild": "^0.17.10" + "typescript": "^4.9.5" }, "prettier": { "quoteProps": "preserve" diff --git a/src/action.ts b/src/action.ts index 8164cc9..d0358b2 100644 --- a/src/action.ts +++ b/src/action.ts @@ -10,8 +10,9 @@ setup({ version: action.getInput("bun-version") || undefined, customUrl: action.getInput("bun-download-url") || undefined, }) - .then(({ version, cacheHit }) => { + .then(({ version, revision, cacheHit }) => { action.setOutput("bun-version", version); + action.setOutput("bun-revision", revision); action.setOutput("cache-hit", cacheHit); }) .catch((error) => { diff --git a/src/setup.ts b/src/setup.ts index 435ed9e..569ca56 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -1,6 +1,6 @@ import { homedir } from "node:os"; import { join } from "node:path"; -import { readdir } from "node:fs/promises"; +import { readdir, symlink } from "node:fs/promises"; import * as action from "@actions/core"; import { downloadTool, extractZip } from "@actions/tool-cache"; import * as cache from "@actions/cache"; @@ -13,6 +13,7 @@ export default async (options?: { customUrl?: string; }): Promise<{ version: string; + revision: string; cacheHit: boolean; }> => { const { url, cacheKey } = getDownloadUrl(options); @@ -20,13 +21,13 @@ export default async (options?: { const dir = join(homedir(), ".bun", "bin"); action.addPath(dir); const path = join(dir, "bun"); - let version: string | undefined; + let revision: string | undefined; let cacheHit = false; if (cacheEnabled) { const cacheRestored = await restoreCache([path], cacheKey); if (cacheRestored) { - version = await verifyBun(path); - if (version) { + revision = await verifyBun(path); + if (revision) { cacheHit = true; action.info("Using a cached version of Bun."); } else { @@ -44,9 +45,16 @@ export default async (options?: { await mkdirP(dir); await cp(exePath, path); await rmRF(exePath); - version = await verifyBun(path); + revision = await verifyBun(path); } - if (!version) { + try { + await symlink(path, join(dir, "bunx")); + } catch (error) { + if (error.code !== "EEXIST") { + throw error; + } + } + if (!revision) { throw new Error( "Downloaded a new version of Bun, but failed to check its version? Try again in debug mode." ); @@ -58,8 +66,10 @@ export default async (options?: { action.warning("Failed to save Bun to cache."); } } + const [version] = revision.split("+"); return { version, + revision, cacheHit, }; }; @@ -119,8 +129,17 @@ async function extractBun(path: string): Promise { } async function verifyBun(path: string): Promise { - const { exitCode, stdout } = await getExecOutput(path, ["--version"], { + const revision = await getExecOutput(path, ["--revision"], { ignoreReturnCode: true, }); - return exitCode === 0 ? stdout.trim() : undefined; + if (revision.exitCode === 0 && /^\d+\.\d+\.\d+/.test(revision.stdout)) { + return revision.stdout.trim(); + } + const version = await getExecOutput(path, ["--version"], { + ignoreReturnCode: true, + }); + if (version.exitCode === 0 && /^\d+\.\d+\.\d+/.test(version.stdout)) { + return version.stdout.trim(); + } + return undefined; }