@fleek-platform/next-on-fleek
Version:
`@fleek-platform/next-on-fleek` is a CLI tool that you can use to build and develop [Next.js](https://nextjs.org/) applications so that they can run on [Fleek Functions](https://fleek.xyz/docs/platform/fleek-functions/).
1,515 lines (1,481 loc) • 400 kB
JavaScript
"use strict";
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 __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(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// ../../node_modules/dedent-tabs/dist/dedent-tabs.js
var require_dedent_tabs = __commonJS({
"../../node_modules/dedent-tabs/dist/dedent-tabs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true }), exports["default"] = dedent2;
function dedent2(a4) {
for (var b = "string" == typeof a4 ? [a4] : a4.raw, c5 = "", d = 0; d < b.length; d++)
if (c5 += b[d].replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\\{/g, "{"), d < (1 >= arguments.length ? 0 : arguments.length - 1)) {
var e2 = c5.substring(c5.lastIndexOf("\n") + 1), f3 = e2.match(/^(\s*)\S?/);
c5 += ((1 > d + 1 || arguments.length <= d + 1 ? void 0 : arguments[d + 1]) + "").replace(/\n/g, "\n" + f3[1]);
}
var g4 = c5.split("\n"), h2 = null;
if (g4.forEach(function(a5) {
var b2 = Math.min, c6 = a5.match(/^(\s+)\S+/);
if (c6) {
var d2 = c6[1].length;
h2 = h2 ? b2(h2, d2) : d2;
}
}), null !== h2) {
var j = h2;
c5 = g4.map(function(a5) {
return " " === a5[0] || " " === a5[0] ? a5.slice(j) : a5;
}).join("\n");
}
return c5.trim().replace(/\\n/g, "\n");
}
}
});
// ../../node_modules/semver/internal/constants.js
var require_constants = __commonJS({
"../../node_modules/semver/internal/constants.js"(exports, module2) {
var SEMVER_SPEC_VERSION = "2.0.0";
var MAX_LENGTH = 256;
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
var MAX_SAFE_COMPONENT_LENGTH = 16;
var RELEASE_TYPES = [
"major",
"premajor",
"minor",
"preminor",
"patch",
"prepatch",
"prerelease"
];
module2.exports = {
MAX_LENGTH,
MAX_SAFE_COMPONENT_LENGTH,
MAX_SAFE_INTEGER,
RELEASE_TYPES,
SEMVER_SPEC_VERSION,
FLAG_INCLUDE_PRERELEASE: 1,
FLAG_LOOSE: 2
};
}
});
// ../../node_modules/semver/internal/debug.js
var require_debug = __commonJS({
"../../node_modules/semver/internal/debug.js"(exports, module2) {
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
};
module2.exports = debug;
}
});
// ../../node_modules/semver/internal/re.js
var require_re = __commonJS({
"../../node_modules/semver/internal/re.js"(exports, module2) {
var { MAX_SAFE_COMPONENT_LENGTH } = require_constants();
var debug = require_debug();
exports = module2.exports = {};
var re = exports.re = [];
var safeRe = exports.safeRe = [];
var src = exports.src = [];
var t = exports.t = {};
var R = 0;
var createToken = (name, value, isGlobal) => {
const safe = value.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s");
const index = R++;
debug(name, index, value);
t[name] = index;
src[index] = value;
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
};
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+");
createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*");
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+");
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
createToken("GTLT", "((?:<|>)?=?)");
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`);
createToken("COERCERTL", src[t.COERCE], true);
createToken("LONETILDE", "(?:~>?)");
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
exports.tildeTrimReplace = "$1~";
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
createToken("LONECARET", "(?:\\^)");
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
exports.caretTrimReplace = "$1^";
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
exports.comparatorTrimReplace = "$1$2$3";
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
createToken("STAR", "(<|>)?=?\\s*\\*");
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
}
});
// ../../node_modules/semver/internal/parse-options.js
var require_parse_options = __commonJS({
"../../node_modules/semver/internal/parse-options.js"(exports, module2) {
var looseOption = Object.freeze({ loose: true });
var emptyOpts = Object.freeze({});
var parseOptions = (options) => {
if (!options) {
return emptyOpts;
}
if (typeof options !== "object") {
return looseOption;
}
return options;
};
module2.exports = parseOptions;
}
});
// ../../node_modules/semver/internal/identifiers.js
var require_identifiers = __commonJS({
"../../node_modules/semver/internal/identifiers.js"(exports, module2) {
var numeric = /^[0-9]+$/;
var compareIdentifiers = (a4, b) => {
const anum = numeric.test(a4);
const bnum = numeric.test(b);
if (anum && bnum) {
a4 = +a4;
b = +b;
}
return a4 === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a4 < b ? -1 : 1;
};
var rcompareIdentifiers = (a4, b) => compareIdentifiers(b, a4);
module2.exports = {
compareIdentifiers,
rcompareIdentifiers
};
}
});
// ../../node_modules/semver/classes/semver.js
var require_semver = __commonJS({
"../../node_modules/semver/classes/semver.js"(exports, module2) {
var debug = require_debug();
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
var { safeRe: re, t } = require_re();
var parseOptions = require_parse_options();
var { compareIdentifiers } = require_identifiers();
var SemVer = class {
constructor(version2, options) {
options = parseOptions(options);
if (version2 instanceof SemVer) {
if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) {
return version2;
} else {
version2 = version2.version;
}
} else if (typeof version2 !== "string") {
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`);
}
if (version2.length > MAX_LENGTH) {
throw new TypeError(
`version is longer than ${MAX_LENGTH} characters`
);
}
debug("SemVer", version2, options);
this.options = options;
this.loose = !!options.loose;
this.includePrerelease = !!options.includePrerelease;
const m4 = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
if (!m4) {
throw new TypeError(`Invalid Version: ${version2}`);
}
this.raw = version2;
this.major = +m4[1];
this.minor = +m4[2];
this.patch = +m4[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 (!m4[4]) {
this.prerelease = [];
} else {
this.prerelease = m4[4].split(".").map((id) => {
if (/^[0-9]+$/.test(id)) {
const num = +id;
if (num >= 0 && num < MAX_SAFE_INTEGER) {
return num;
}
}
return id;
});
}
this.build = m4[5] ? m4[5].split(".") : [];
this.format();
}
format() {
this.version = `${this.major}.${this.minor}.${this.patch}`;
if (this.prerelease.length) {
this.version += `-${this.prerelease.join(".")}`;
}
return this.version;
}
toString() {
return this.version;
}
compare(other) {
debug("SemVer.compare", this.version, this.options, other);
if (!(other instanceof SemVer)) {
if (typeof other === "string" && other === this.version) {
return 0;
}
other = new SemVer(other, this.options);
}
if (other.version === this.version) {
return 0;
}
return this.compareMain(other) || this.comparePre(other);
}
compareMain(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);
}
comparePre(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;
}
let i3 = 0;
do {
const a4 = this.prerelease[i3];
const b = other.prerelease[i3];
debug("prerelease compare", i3, a4, b);
if (a4 === void 0 && b === void 0) {
return 0;
} else if (b === void 0) {
return 1;
} else if (a4 === void 0) {
return -1;
} else if (a4 === b) {
continue;
} else {
return compareIdentifiers(a4, b);
}
} while (++i3);
}
compareBuild(other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
}
let i3 = 0;
do {
const a4 = this.build[i3];
const b = other.build[i3];
debug("prerelease compare", i3, a4, b);
if (a4 === void 0 && b === void 0) {
return 0;
} else if (b === void 0) {
return 1;
} else if (a4 === void 0) {
return -1;
} else if (a4 === b) {
continue;
} else {
return compareIdentifiers(a4, b);
}
} while (++i3);
}
inc(release, identifier2, identifierBase) {
switch (release) {
case "premajor":
this.prerelease.length = 0;
this.patch = 0;
this.minor = 0;
this.major++;
this.inc("pre", identifier2, identifierBase);
break;
case "preminor":
this.prerelease.length = 0;
this.patch = 0;
this.minor++;
this.inc("pre", identifier2, identifierBase);
break;
case "prepatch":
this.prerelease.length = 0;
this.inc("patch", identifier2, identifierBase);
this.inc("pre", identifier2, identifierBase);
break;
case "prerelease":
if (this.prerelease.length === 0) {
this.inc("patch", identifier2, identifierBase);
}
this.inc("pre", identifier2, identifierBase);
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": {
const base = Number(identifierBase) ? 1 : 0;
if (!identifier2 && identifierBase === false) {
throw new Error("invalid increment argument: identifier is empty");
}
if (this.prerelease.length === 0) {
this.prerelease = [base];
} else {
let i3 = this.prerelease.length;
while (--i3 >= 0) {
if (typeof this.prerelease[i3] === "number") {
this.prerelease[i3]++;
i3 = -2;
}
}
if (i3 === -1) {
if (identifier2 === this.prerelease.join(".") && identifierBase === false) {
throw new Error("invalid increment argument: identifier already exists");
}
this.prerelease.push(base);
}
}
if (identifier2) {
let prerelease = [identifier2, base];
if (identifierBase === false) {
prerelease = [identifier2];
}
if (compareIdentifiers(this.prerelease[0], identifier2) === 0) {
if (isNaN(this.prerelease[1])) {
this.prerelease = prerelease;
}
} else {
this.prerelease = prerelease;
}
}
break;
}
default:
throw new Error(`invalid increment argument: ${release}`);
}
this.raw = this.format();
if (this.build.length) {
this.raw += `+${this.build.join(".")}`;
}
return this;
}
};
module2.exports = SemVer;
}
});
// ../../node_modules/semver/functions/parse.js
var require_parse = __commonJS({
"../../node_modules/semver/functions/parse.js"(exports, module2) {
var SemVer = require_semver();
var parse5 = (version2, options, throwErrors = false) => {
if (version2 instanceof SemVer) {
return version2;
}
try {
return new SemVer(version2, options);
} catch (er) {
if (!throwErrors) {
return null;
}
throw er;
}
};
module2.exports = parse5;
}
});
// ../../node_modules/semver/functions/valid.js
var require_valid = __commonJS({
"../../node_modules/semver/functions/valid.js"(exports, module2) {
var parse5 = require_parse();
var valid = (version2, options) => {
const v = parse5(version2, options);
return v ? v.version : null;
};
module2.exports = valid;
}
});
// ../../node_modules/semver/functions/clean.js
var require_clean = __commonJS({
"../../node_modules/semver/functions/clean.js"(exports, module2) {
var parse5 = require_parse();
var clean = (version2, options) => {
const s4 = parse5(version2.trim().replace(/^[=v]+/, ""), options);
return s4 ? s4.version : null;
};
module2.exports = clean;
}
});
// ../../node_modules/semver/functions/inc.js
var require_inc = __commonJS({
"../../node_modules/semver/functions/inc.js"(exports, module2) {
var SemVer = require_semver();
var inc = (version2, release, options, identifier2, identifierBase) => {
if (typeof options === "string") {
identifierBase = identifier2;
identifier2 = options;
options = void 0;
}
try {
return new SemVer(
version2 instanceof SemVer ? version2.version : version2,
options
).inc(release, identifier2, identifierBase).version;
} catch (er) {
return null;
}
};
module2.exports = inc;
}
});
// ../../node_modules/semver/functions/diff.js
var require_diff = __commonJS({
"../../node_modules/semver/functions/diff.js"(exports, module2) {
var parse5 = require_parse();
var diff = (version1, version2) => {
const v1 = parse5(version1, null, true);
const v2 = parse5(version2, null, true);
const comparison = v1.compare(v2);
if (comparison === 0) {
return null;
}
const v1Higher = comparison > 0;
const highVersion = v1Higher ? v1 : v2;
const lowVersion = v1Higher ? v2 : v1;
const highHasPre = !!highVersion.prerelease.length;
const lowHasPre = !!lowVersion.prerelease.length;
if (lowHasPre && !highHasPre) {
if (!lowVersion.patch && !lowVersion.minor) {
return "major";
}
if (highVersion.patch) {
return "patch";
}
if (highVersion.minor) {
return "minor";
}
return "major";
}
const prefix = highHasPre ? "pre" : "";
if (v1.major !== v2.major) {
return prefix + "major";
}
if (v1.minor !== v2.minor) {
return prefix + "minor";
}
if (v1.patch !== v2.patch) {
return prefix + "patch";
}
return "prerelease";
};
module2.exports = diff;
}
});
// ../../node_modules/semver/functions/major.js
var require_major = __commonJS({
"../../node_modules/semver/functions/major.js"(exports, module2) {
var SemVer = require_semver();
var major = (a4, loose) => new SemVer(a4, loose).major;
module2.exports = major;
}
});
// ../../node_modules/semver/functions/minor.js
var require_minor = __commonJS({
"../../node_modules/semver/functions/minor.js"(exports, module2) {
var SemVer = require_semver();
var minor = (a4, loose) => new SemVer(a4, loose).minor;
module2.exports = minor;
}
});
// ../../node_modules/semver/functions/patch.js
var require_patch = __commonJS({
"../../node_modules/semver/functions/patch.js"(exports, module2) {
var SemVer = require_semver();
var patch = (a4, loose) => new SemVer(a4, loose).patch;
module2.exports = patch;
}
});
// ../../node_modules/semver/functions/prerelease.js
var require_prerelease = __commonJS({
"../../node_modules/semver/functions/prerelease.js"(exports, module2) {
var parse5 = require_parse();
var prerelease = (version2, options) => {
const parsed = parse5(version2, options);
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
};
module2.exports = prerelease;
}
});
// ../../node_modules/semver/functions/compare.js
var require_compare = __commonJS({
"../../node_modules/semver/functions/compare.js"(exports, module2) {
var SemVer = require_semver();
var compare = (a4, b, loose) => new SemVer(a4, loose).compare(new SemVer(b, loose));
module2.exports = compare;
}
});
// ../../node_modules/semver/functions/rcompare.js
var require_rcompare = __commonJS({
"../../node_modules/semver/functions/rcompare.js"(exports, module2) {
var compare = require_compare();
var rcompare = (a4, b, loose) => compare(b, a4, loose);
module2.exports = rcompare;
}
});
// ../../node_modules/semver/functions/compare-loose.js
var require_compare_loose = __commonJS({
"../../node_modules/semver/functions/compare-loose.js"(exports, module2) {
var compare = require_compare();
var compareLoose = (a4, b) => compare(a4, b, true);
module2.exports = compareLoose;
}
});
// ../../node_modules/semver/functions/compare-build.js
var require_compare_build = __commonJS({
"../../node_modules/semver/functions/compare-build.js"(exports, module2) {
var SemVer = require_semver();
var compareBuild = (a4, b, loose) => {
const versionA = new SemVer(a4, loose);
const versionB = new SemVer(b, loose);
return versionA.compare(versionB) || versionA.compareBuild(versionB);
};
module2.exports = compareBuild;
}
});
// ../../node_modules/semver/functions/sort.js
var require_sort = __commonJS({
"../../node_modules/semver/functions/sort.js"(exports, module2) {
var compareBuild = require_compare_build();
var sort = (list, loose) => list.sort((a4, b) => compareBuild(a4, b, loose));
module2.exports = sort;
}
});
// ../../node_modules/semver/functions/rsort.js
var require_rsort = __commonJS({
"../../node_modules/semver/functions/rsort.js"(exports, module2) {
var compareBuild = require_compare_build();
var rsort = (list, loose) => list.sort((a4, b) => compareBuild(b, a4, loose));
module2.exports = rsort;
}
});
// ../../node_modules/semver/functions/gt.js
var require_gt = __commonJS({
"../../node_modules/semver/functions/gt.js"(exports, module2) {
var compare = require_compare();
var gt = (a4, b, loose) => compare(a4, b, loose) > 0;
module2.exports = gt;
}
});
// ../../node_modules/semver/functions/lt.js
var require_lt = __commonJS({
"../../node_modules/semver/functions/lt.js"(exports, module2) {
var compare = require_compare();
var lt = (a4, b, loose) => compare(a4, b, loose) < 0;
module2.exports = lt;
}
});
// ../../node_modules/semver/functions/eq.js
var require_eq = __commonJS({
"../../node_modules/semver/functions/eq.js"(exports, module2) {
var compare = require_compare();
var eq = (a4, b, loose) => compare(a4, b, loose) === 0;
module2.exports = eq;
}
});
// ../../node_modules/semver/functions/neq.js
var require_neq = __commonJS({
"../../node_modules/semver/functions/neq.js"(exports, module2) {
var compare = require_compare();
var neq = (a4, b, loose) => compare(a4, b, loose) !== 0;
module2.exports = neq;
}
});
// ../../node_modules/semver/functions/gte.js
var require_gte = __commonJS({
"../../node_modules/semver/functions/gte.js"(exports, module2) {
var compare = require_compare();
var gte = (a4, b, loose) => compare(a4, b, loose) >= 0;
module2.exports = gte;
}
});
// ../../node_modules/semver/functions/lte.js
var require_lte = __commonJS({
"../../node_modules/semver/functions/lte.js"(exports, module2) {
var compare = require_compare();
var lte = (a4, b, loose) => compare(a4, b, loose) <= 0;
module2.exports = lte;
}
});
// ../../node_modules/semver/functions/cmp.js
var require_cmp = __commonJS({
"../../node_modules/semver/functions/cmp.js"(exports, module2) {
var eq = require_eq();
var neq = require_neq();
var gt = require_gt();
var gte = require_gte();
var lt = require_lt();
var lte = require_lte();
var cmp = (a4, op, b, loose) => {
switch (op) {
case "===":
if (typeof a4 === "object") {
a4 = a4.version;
}
if (typeof b === "object") {
b = b.version;
}
return a4 === b;
case "!==":
if (typeof a4 === "object") {
a4 = a4.version;
}
if (typeof b === "object") {
b = b.version;
}
return a4 !== b;
case "":
case "=":
case "==":
return eq(a4, b, loose);
case "!=":
return neq(a4, b, loose);
case ">":
return gt(a4, b, loose);
case ">=":
return gte(a4, b, loose);
case "<":
return lt(a4, b, loose);
case "<=":
return lte(a4, b, loose);
default:
throw new TypeError(`Invalid operator: ${op}`);
}
};
module2.exports = cmp;
}
});
// ../../node_modules/semver/functions/coerce.js
var require_coerce = __commonJS({
"../../node_modules/semver/functions/coerce.js"(exports, module2) {
var SemVer = require_semver();
var parse5 = require_parse();
var { safeRe: re, t } = require_re();
var coerce = (version2, options) => {
if (version2 instanceof SemVer) {
return version2;
}
if (typeof version2 === "number") {
version2 = String(version2);
}
if (typeof version2 !== "string") {
return null;
}
options = options || {};
let match = null;
if (!options.rtl) {
match = version2.match(re[t.COERCE]);
} else {
let next;
while ((next = re[t.COERCERTL].exec(version2)) && (!match || match.index + match[0].length !== version2.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 parse5(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options);
};
module2.exports = coerce;
}
});
// ../../node_modules/semver/node_modules/yallist/iterator.js
var require_iterator = __commonJS({
"../../node_modules/semver/node_modules/yallist/iterator.js"(exports, module2) {
"use strict";
module2.exports = function(Yallist) {
Yallist.prototype[Symbol.iterator] = function* () {
for (let walker = this.head; walker; walker = walker.next) {
yield walker.value;
}
};
};
}
});
// ../../node_modules/semver/node_modules/yallist/yallist.js
var require_yallist = __commonJS({
"../../node_modules/semver/node_modules/yallist/yallist.js"(exports, module2) {
"use strict";
module2.exports = Yallist;
Yallist.Node = Node4;
Yallist.create = Yallist;
function Yallist(list) {
var self = this;
if (!(self instanceof Yallist)) {
self = new Yallist();
}
self.tail = null;
self.head = null;
self.length = 0;
if (list && typeof list.forEach === "function") {
list.forEach(function(item) {
self.push(item);
});
} else if (arguments.length > 0) {
for (var i3 = 0, l7 = arguments.length; i3 < l7; i3++) {
self.push(arguments[i3]);
}
}
return self;
}
Yallist.prototype.removeNode = function(node) {
if (node.list !== this) {
throw new Error("removing node which does not belong to this list");
}
var next = node.next;
var prev = node.prev;
if (next) {
next.prev = prev;
}
if (prev) {
prev.next = next;
}
if (node === this.head) {
this.head = next;
}
if (node === this.tail) {
this.tail = prev;
}
node.list.length--;
node.next = null;
node.prev = null;
node.list = null;
return next;
};
Yallist.prototype.unshiftNode = function(node) {
if (node === this.head) {
return;
}
if (node.list) {
node.list.removeNode(node);
}
var head = this.head;
node.list = this;
node.next = head;
if (head) {
head.prev = node;
}
this.head = node;
if (!this.tail) {
this.tail = node;
}
this.length++;
};
Yallist.prototype.pushNode = function(node) {
if (node === this.tail) {
return;
}
if (node.list) {
node.list.removeNode(node);
}
var tail = this.tail;
node.list = this;
node.prev = tail;
if (tail) {
tail.next = node;
}
this.tail = node;
if (!this.head) {
this.head = node;
}
this.length++;
};
Yallist.prototype.push = function() {
for (var i3 = 0, l7 = arguments.length; i3 < l7; i3++) {
push(this, arguments[i3]);
}
return this.length;
};
Yallist.prototype.unshift = function() {
for (var i3 = 0, l7 = arguments.length; i3 < l7; i3++) {
unshift(this, arguments[i3]);
}
return this.length;
};
Yallist.prototype.pop = function() {
if (!this.tail) {
return void 0;
}
var res = this.tail.value;
this.tail = this.tail.prev;
if (this.tail) {
this.tail.next = null;
} else {
this.head = null;
}
this.length--;
return res;
};
Yallist.prototype.shift = function() {
if (!this.head) {
return void 0;
}
var res = this.head.value;
this.head = this.head.next;
if (this.head) {
this.head.prev = null;
} else {
this.tail = null;
}
this.length--;
return res;
};
Yallist.prototype.forEach = function(fn, thisp) {
thisp = thisp || this;
for (var walker = this.head, i3 = 0; walker !== null; i3++) {
fn.call(thisp, walker.value, i3, this);
walker = walker.next;
}
};
Yallist.prototype.forEachReverse = function(fn, thisp) {
thisp = thisp || this;
for (var walker = this.tail, i3 = this.length - 1; walker !== null; i3--) {
fn.call(thisp, walker.value, i3, this);
walker = walker.prev;
}
};
Yallist.prototype.get = function(n4) {
for (var i3 = 0, walker = this.head; walker !== null && i3 < n4; i3++) {
walker = walker.next;
}
if (i3 === n4 && walker !== null) {
return walker.value;
}
};
Yallist.prototype.getReverse = function(n4) {
for (var i3 = 0, walker = this.tail; walker !== null && i3 < n4; i3++) {
walker = walker.prev;
}
if (i3 === n4 && walker !== null) {
return walker.value;
}
};
Yallist.prototype.map = function(fn, thisp) {
thisp = thisp || this;
var res = new Yallist();
for (var walker = this.head; walker !== null; ) {
res.push(fn.call(thisp, walker.value, this));
walker = walker.next;
}
return res;
};
Yallist.prototype.mapReverse = function(fn, thisp) {
thisp = thisp || this;
var res = new Yallist();
for (var walker = this.tail; walker !== null; ) {
res.push(fn.call(thisp, walker.value, this));
walker = walker.prev;
}
return res;
};
Yallist.prototype.reduce = function(fn, initial) {
var acc;
var walker = this.head;
if (arguments.length > 1) {
acc = initial;
} else if (this.head) {
walker = this.head.next;
acc = this.head.value;
} else {
throw new TypeError("Reduce of empty list with no initial value");
}
for (var i3 = 0; walker !== null; i3++) {
acc = fn(acc, walker.value, i3);
walker = walker.next;
}
return acc;
};
Yallist.prototype.reduceReverse = function(fn, initial) {
var acc;
var walker = this.tail;
if (arguments.length > 1) {
acc = initial;
} else if (this.tail) {
walker = this.tail.prev;
acc = this.tail.value;
} else {
throw new TypeError("Reduce of empty list with no initial value");
}
for (var i3 = this.length - 1; walker !== null; i3--) {
acc = fn(acc, walker.value, i3);
walker = walker.prev;
}
return acc;
};
Yallist.prototype.toArray = function() {
var arr = new Array(this.length);
for (var i3 = 0, walker = this.head; walker !== null; i3++) {
arr[i3] = walker.value;
walker = walker.next;
}
return arr;
};
Yallist.prototype.toArrayReverse = function() {
var arr = new Array(this.length);
for (var i3 = 0, walker = this.tail; walker !== null; i3++) {
arr[i3] = walker.value;
walker = walker.prev;
}
return arr;
};
Yallist.prototype.slice = function(from, to) {
to = to || this.length;
if (to < 0) {
to += this.length;
}
from = from || 0;
if (from < 0) {
from += this.length;
}
var ret = new Yallist();
if (to < from || to < 0) {
return ret;
}
if (from < 0) {
from = 0;
}
if (to > this.length) {
to = this.length;
}
for (var i3 = 0, walker = this.head; walker !== null && i3 < from; i3++) {
walker = walker.next;
}
for (; walker !== null && i3 < to; i3++, walker = walker.next) {
ret.push(walker.value);
}
return ret;
};
Yallist.prototype.sliceReverse = function(from, to) {
to = to || this.length;
if (to < 0) {
to += this.length;
}
from = from || 0;
if (from < 0) {
from += this.length;
}
var ret = new Yallist();
if (to < from || to < 0) {
return ret;
}
if (from < 0) {
from = 0;
}
if (to > this.length) {
to = this.length;
}
for (var i3 = this.length, walker = this.tail; walker !== null && i3 > to; i3--) {
walker = walker.prev;
}
for (; walker !== null && i3 > from; i3--, walker = walker.prev) {
ret.push(walker.value);
}
return ret;
};
Yallist.prototype.splice = function(start, deleteCount, ...nodes) {
if (start > this.length) {
start = this.length - 1;
}
if (start < 0) {
start = this.length + start;
}
for (var i3 = 0, walker = this.head; walker !== null && i3 < start; i3++) {
walker = walker.next;
}
var ret = [];
for (var i3 = 0; walker && i3 < deleteCount; i3++) {
ret.push(walker.value);
walker = this.removeNode(walker);
}
if (walker === null) {
walker = this.tail;
}
if (walker !== this.head && walker !== this.tail) {
walker = walker.prev;
}
for (var i3 = 0; i3 < nodes.length; i3++) {
walker = insert(this, walker, nodes[i3]);
}
return ret;
};
Yallist.prototype.reverse = function() {
var head = this.head;
var tail = this.tail;
for (var walker = head; walker !== null; walker = walker.prev) {
var p = walker.prev;
walker.prev = walker.next;
walker.next = p;
}
this.head = tail;
this.tail = head;
return this;
};
function insert(self, node, value) {
var inserted = node === self.head ? new Node4(value, null, node, self) : new Node4(value, node, node.next, self);
if (inserted.next === null) {
self.tail = inserted;
}
if (inserted.prev === null) {
self.head = inserted;
}
self.length++;
return inserted;
}
function push(self, item) {
self.tail = new Node4(item, self.tail, null, self);
if (!self.head) {
self.head = self.tail;
}
self.length++;
}
function unshift(self, item) {
self.head = new Node4(item, null, self.head, self);
if (!self.tail) {
self.tail = self.head;
}
self.length++;
}
function Node4(value, prev, next, list) {
if (!(this instanceof Node4)) {
return new Node4(value, prev, next, list);
}
this.list = list;
this.value = value;
if (prev) {
prev.next = this;
this.prev = prev;
} else {
this.prev = null;
}
if (next) {
next.prev = this;
this.next = next;
} else {
this.next = null;
}
}
try {
require_iterator()(Yallist);
} catch (er) {
}
}
});
// ../../node_modules/semver/node_modules/lru-cache/index.js
var require_lru_cache = __commonJS({
"../../node_modules/semver/node_modules/lru-cache/index.js"(exports, module2) {
"use strict";
var Yallist = require_yallist();
var MAX = Symbol("max");
var LENGTH = Symbol("length");
var LENGTH_CALCULATOR = Symbol("lengthCalculator");
var ALLOW_STALE = Symbol("allowStale");
var MAX_AGE = Symbol("maxAge");
var DISPOSE = Symbol("dispose");
var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
var LRU_LIST = Symbol("lruList");
var CACHE = Symbol("cache");
var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
var naiveLength = () => 1;
var LRUCache = class {
constructor(options) {
if (typeof options === "number")
options = { max: options };
if (!options)
options = {};
if (options.max && (typeof options.max !== "number" || options.max < 0))
throw new TypeError("max must be a non-negative number");
const max = this[MAX] = options.max || Infinity;
const lc = options.length || naiveLength;
this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
this[ALLOW_STALE] = options.stale || false;
if (options.maxAge && typeof options.maxAge !== "number")
throw new TypeError("maxAge must be a number");
this[MAX_AGE] = options.maxAge || 0;
this[DISPOSE] = options.dispose;
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
this.reset();
}
set max(mL) {
if (typeof mL !== "number" || mL < 0)
throw new TypeError("max must be a non-negative number");
this[MAX] = mL || Infinity;
trim(this);
}
get max() {
return this[MAX];
}
set allowStale(allowStale) {
this[ALLOW_STALE] = !!allowStale;
}
get allowStale() {
return this[ALLOW_STALE];
}
set maxAge(mA) {
if (typeof mA !== "number")
throw new TypeError("maxAge must be a non-negative number");
this[MAX_AGE] = mA;
trim(this);
}
get maxAge() {
return this[MAX_AGE];
}
set lengthCalculator(lC) {
if (typeof lC !== "function")
lC = naiveLength;
if (lC !== this[LENGTH_CALCULATOR]) {
this[LENGTH_CALCULATOR] = lC;
this[LENGTH] = 0;
this[LRU_LIST].forEach((hit) => {
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
this[LENGTH] += hit.length;
});
}
trim(this);
}
get lengthCalculator() {
return this[LENGTH_CALCULATOR];
}
get length() {
return this[LENGTH];
}
get itemCount() {
return this[LRU_LIST].length;
}
rforEach(fn, thisp) {
thisp = thisp || this;
for (let walker = this[LRU_LIST].tail; walker !== null; ) {
const prev = walker.prev;
forEachStep(this, fn, walker, thisp);
walker = prev;
}
}
forEach(fn, thisp) {
thisp = thisp || this;
for (let walker = this[LRU_LIST].head; walker !== null; ) {
const next = walker.next;
forEachStep(this, fn, walker, thisp);
walker = next;
}
}
keys() {
return this[LRU_LIST].toArray().map((k) => k.key);
}
values() {
return this[LRU_LIST].toArray().map((k) => k.value);
}
reset() {
if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
}
this[CACHE] = /* @__PURE__ */ new Map();
this[LRU_LIST] = new Yallist();
this[LENGTH] = 0;
}
dump() {
return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
k: hit.key,
v: hit.value,
e: hit.now + (hit.maxAge || 0)
}).toArray().filter((h2) => h2);
}
dumpLru() {
return this[LRU_LIST];
}
set(key, value, maxAge) {
maxAge = maxAge || this[MAX_AGE];
if (maxAge && typeof maxAge !== "number")
throw new TypeError("maxAge must be a number");
const now = maxAge ? Date.now() : 0;
const len = this[LENGTH_CALCULATOR](value, key);
if (this[CACHE].has(key)) {
if (len > this[MAX]) {
del(this, this[CACHE].get(key));
return false;
}
const node = this[CACHE].get(key);
const item = node.value;
if (this[DISPOSE]) {
if (!this[NO_DISPOSE_ON_SET])
this[DISPOSE](key, item.value);
}
item.now = now;
item.maxAge = maxAge;
item.value = value;
this[LENGTH] += len - item.length;
item.length = len;
this.get(key);
trim(this);
return true;
}
const hit = new Entry(key, value, len, now, maxAge);
if (hit.length > this[MAX]) {
if (this[DISPOSE])
this[DISPOSE](key, value);
return false;
}
this[LENGTH] += hit.length;
this[LRU_LIST].unshift(hit);
this[CACHE].set(key, this[LRU_LIST].head);
trim(this);
return true;
}
has(key) {
if (!this[CACHE].has(key))
return false;
const hit = this[CACHE].get(key).value;
return !isStale(this, hit);
}
get(key) {
return get(this, key, true);
}
peek(key) {
return get(this, key, false);
}
pop() {
const node = this[LRU_LIST].tail;
if (!node)
return null;
del(this, node);
return node.value;
}
del(key) {
del(this, this[CACHE].get(key));
}
load(arr) {
this.reset();
const now = Date.now();
for (let l7 = arr.length - 1; l7 >= 0; l7--) {
const hit = arr[l7];
const expiresAt = hit.e || 0;
if (expiresAt === 0)
this.set(hit.k, hit.v);
else {
const maxAge = expiresAt - now;
if (maxAge > 0) {
this.set(hit.k, hit.v, maxAge);
}
}
}
}
prune() {
this[CACHE].forEach((value, key) => get(this, key, false));
}
};
var get = (self, key, doUse) => {
const node = self[CACHE].get(key);
if (node) {
const hit = node.value;
if (isStale(self, hit)) {
del(self, node);
if (!self[ALLOW_STALE])
return void 0;
} else {
if (doUse) {
if (self[UPDATE_AGE_ON_GET])
node.value.now = Date.now();
self[LRU_LIST].unshiftNode(node);
}
}
return hit.value;
}
};
var isStale = (self, hit) => {
if (!hit || !hit.maxAge && !self[MAX_AGE])
return false;
const diff = Date.now() - hit.now;
return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE];
};
var trim = (self) => {
if (self[LENGTH] > self[MAX]) {
for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null; ) {
const prev = walker.prev;
del(self, walker);
walker = prev;
}
}
};
var del = (self, node) => {
if (node) {
const hit = node.value;
if (self[DISPOSE])
self[DISPOSE](hit.key, hit.value);
self[LENGTH] -= hit.length;
self[CACHE].delete(hit.key);
self[LRU_LIST].removeNode(node);
}
};
var Entry = class {
constructor(key, value, length, now, maxAge) {
this.key = key;
this.value = value;
this.length = length;
this.now = now;
this.maxAge = maxAge || 0;
}
};
var forEachStep = (self, fn, node, thisp) => {
let hit = node.value;
if (isStale(self, hit)) {
del(self, node);
if (!self[ALLOW_STALE])
hit = void 0;
}
if (hit)
fn.call(thisp, hit.value, hit.key, self);
};
module2.exports = LRUCache;
}
});
// ../../node_modules/semver/classes/range.js
var require_range = __commonJS({
"../../node_modules/semver/classes/range.js"(exports, module2) {
var Range = class {
constructor(range, options) {
options = parseOptions(options);
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) {
this.raw = range.value;
this.set = [[range]];
this.format();
return this;
}
this.options = options;
this.loose = !!options.loose;
this.includePrerelease = !!options.includePrerelease;
this.raw = range.trim().split(/\s+/).join(" ");
this.set = this.raw.split("||").map((r2) => this.parseRange(r2)).filter((c5) => c5.length);
if (!this.set.length) {
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
}
if (this.set.length > 1) {
const first = this.set[0];
this.set = this.set.filter((c5) => !isNullSet(c5[0]));
if (this.set.length === 0) {
this.set = [first];
} else if (this.set.length > 1) {
for (const c5 of this.set) {
if (c5.length === 1 && isAny(c5[0])) {
this.set = [c5];
break;
}
}
}
}
this.format();
}
format() {
this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
return this.range;
}
toString() {
return this.range;
}
parseRange(range) {
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
const memoKey = memoOpts + ":" + range;
const cached = cache.get(memoKey);
if (cached) {
return cached;
}
const loose = this.options.loose;
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
debug("hyphen replace", range);
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
debug("comparator trim", range);
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
if (loose) {
rangeList = rangeList.filter((comp) => {
debug("loose invalid filter", comp, this.options);
return !!comp.match(re[t.COMPARATORLOOSE]);
});
}
debug("range list", rangeList);
const rangeMap = /* @__PURE__