@storybook/cli
Version:
Storybook CLI: Develop, document, and test UI components in isolation
866 lines (863 loc) • 472 kB
JavaScript
import CJS_COMPAT_NODE_URL_61o8z39g0li from 'node:url';
import CJS_COMPAT_NODE_PATH_61o8z39g0li from 'node:path';
import CJS_COMPAT_NODE_MODULE_61o8z39g0li from "node:module";
var __filename = CJS_COMPAT_NODE_URL_61o8z39g0li.fileURLToPath(import.meta.url);
var __dirname = CJS_COMPAT_NODE_PATH_61o8z39g0li.dirname(__filename);
var require = CJS_COMPAT_NODE_MODULE_61o8z39g0li.createRequire(import.meta.url);
// ------------------------------------------------------------
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
// ------------------------------------------------------------
import {
bannerComment,
containsDirnameUsage,
containsESMUsage,
containsFilenameUsage,
containsRequireUsage,
findFilesUp,
getFrameworkPackageName,
getProjects,
getStorybookData,
hasRequireBanner,
processAutoblockerResults,
require_picocolors,
shortenPath,
updateMainConfig,
upgradeStorybookDependencies
} from "./chunk-7UZ7H5B2.js";
import {
slash
} from "./chunk-B6HMQRIY.js";
import {
require_semver
} from "./chunk-JORGKWDM.js";
import {
__commonJS,
__require,
__toESM
} from "./chunk-SXK662AZ.js";
// ../../node_modules/envinfo/dist/envinfo.js
var require_envinfo = __commonJS({
"../../node_modules/envinfo/dist/envinfo.js"(exports, module) {
(() => {
var e = { 2980: (e2, t11, n2) => {
"use strict";
n2(7360), n2(5888), n2(8412), n2(3852), n2(5584);
var r = n2(9892), o = n2(5008), i = n2(5088), s = n2(224);
function a(e3, t12) {
(t12 = t12 || {}).clipboard && console.log(`
*** Clipboard option removed - use clipboardy or clipboard-cli directly ***
`);
var n3 = Object.keys(e3).length > 0 ? e3 : i.defaults, s2 = Object.entries(n3).reduce((function(e4, n4) {
var o2 = n4[0], i2 = n4[1], s3 = r[`get${o2}`];
return s3 ? (i2 && e4.push(s3(i2, t12)), e4) : e4 = e4.concat((i2 || []).map((function(e5) {
var t13 = r[`get${e5.replace(/\s/g, "")}Info`];
return t13 ? t13() : Promise.resolve(["Unknown"]);
})));
}), []);
return Promise.all(s2).then((function(e4) {
var n4 = e4.reduce((function(e5, t13) {
return t13 && t13[0] && Object.assign(e5, { [t13[0]]: t13 }), e5;
}), {});
return (function(e5, t13) {
var n5 = t13.json ? o.json : t13.markdown ? o.markdown : o.yaml;
if (t13.console) {
var r2 = !1;
process.stdout.isTTY && (r2 = !0), console.log(n5(e5, Object.assign({}, t13, { console: r2 })));
}
return n5(e5, Object.assign({}, t13, { console: !1 }));
})(Object.entries(i.defaults).reduce((function(e5, t13) {
var r2 = t13[0], o2 = t13[1];
return n4[r2] ? Object.assign(e5, { [r2]: n4[r2][1] }) : Object.assign(e5, { [r2]: (o2 || []).reduce((function(e6, t14) {
return n4[t14] ? (n4[t14].shift(), n4[t14].length === 1 ? Object.assign(e6, { [t14]: n4[t14][0] }) : Object.assign(e6, { [t14]: { version: n4[t14][0], path: n4[t14][1] } })) : e6;
}), {}) });
}), {}), t12);
}));
}
e2.exports = { cli: function(e3) {
if (e3.all) return a(Object.assign({}, i.defaults, { npmPackages: !0, npmGlobalPackages: !0, pnpmGlobalPackages: !0 }), e3);
if (e3.raw) return a(JSON.parse(e3.raw), e3);
if (e3.helper) {
var t12 = r[`get${e3.helper}`] || r[`get${e3.helper}Info`] || r[e3.helper];
return t12 ? t12().then(console.log) : console.error("Not Found");
}
var n3 = function(e4, t13) {
return e4.toLowerCase().includes(t13.toLowerCase());
}, o2 = Object.keys(e3).filter((function(e4) {
return Object.keys(i.defaults).some((function(t13) {
return n3(t13, e4);
}));
})), c = Object.entries(i.defaults).reduce((function(t13, r2) {
return o2.some((function(e4) {
return n3(e4, r2[0]);
})) ? Object.assign(t13, { [r2[0]]: r2[1] || e3[r2[0]] }) : t13;
}), {});
return e3.preset ? i[e3.preset] ? a(Object.assign({}, s.omit(i[e3.preset], ["options"]), c), Object.assign({}, i[e3.preset].options, s.pick(e3, ["duplicates", "fullTree", "json", "markdown", "console"]))) : console.error(`
No "${e3.preset}" preset found.`) : a(c, e3);
}, helpers: r, main: a, run: function(e3, t12) {
return typeof e3.preset == "string" ? a(i[e3.preset], t12) : a(e3, t12);
} };
}, 5008: (e2, t11, n2) => {
"use strict";
n2(223), n2(3852), n2(4880), n2(3708), n2(5584), n2(5308);
var r = n2(6232), o = n2(224);
function i(e3, t12) {
return o.log("trace", "clean", e3), Object.keys(e3).reduce((function(n3, r2) {
return !t12.showNotFound && e3[r2] === "Not Found" || e3[r2] === "N/A" || e3[r2] === void 0 || Object.keys(e3[r2]).length === 0 ? n3 : o.isObject(e3[r2]) ? Object.values(e3[r2]).every((function(e4) {
return e4 === "N/A" || !t12.showNotFound && e4 === "Not Found";
})) ? n3 : Object.assign(n3, { [r2]: i(e3[r2], t12) }) : Object.assign(n3, { [r2]: e3[r2] });
}), {});
}
function s(e3, t12) {
o.log("trace", "formatHeaders"), t12 || (t12 = { type: "underline" });
var n3 = { underline: ["\x1B[4m", "\x1B[0m"] };
return e3.slice().split(`
`).map((function(e4) {
if (e4.slice("-1") === ":") {
var r2 = e4.match(/^[\s]*/g)[0];
return `${r2}${n3[t12.type][0]}${e4.slice(r2.length)}${n3[t12.type][1]}`;
}
return e4;
})).join(`
`);
}
function a(e3) {
return o.log("trace", "formatPackages"), e3.npmPackages ? Object.assign(e3, { npmPackages: Object.entries(e3.npmPackages || {}).reduce((function(e4, t12) {
var n3 = t12[0], r2 = t12[1];
if (r2 === "Not Found") return Object.assign(e4, { [n3]: r2 });
var o2 = r2.wanted ? `${r2.wanted} =>` : "", i2 = Array.isArray(r2.installed) ? r2.installed.join(", ") : r2.installed, s2 = r2.duplicates ? `(${r2.duplicates.join(", ")})` : "";
return Object.assign(e4, { [n3]: `${o2} ${i2} ${s2}` });
}), {}) }) : e3;
}
function c(e3, t12, n3) {
return n3 || (n3 = { emptyMessage: "None" }), Array.isArray(t12) && (t12 = t12.length > 0 ? t12.join(", ") : n3.emptyMessage), { [e3]: t12 };
}
function u(e3, t12) {
return Object.entries(e3).reduce((function(e4, n3) {
var r2 = n3[0], i2 = n3[1];
return o.isObject(i2) ? Object.assign(e4, { [r2]: u(i2, t12) }) : Object.assign(e4, t12(r2, i2));
}), {});
}
function l(e3) {
return o.log("trace", "serializeArrays"), u(e3, c);
}
function f(e3) {
return o.log("trace", "serializeVersionsAndPaths"), Object.entries(e3).reduce((function(e4, t12) {
return Object.assign(e4, { [t12[0]]: Object.entries(t12[1]).reduce((function(e5, t13) {
var n3 = t13[0], r2 = t13[1];
return r2.version ? Object.assign(e5, { [n3]: [r2.version, r2.path].filter(Boolean).join(" - ") }) : Object.assign(e5, { [n3]: [r2][0] });
}), {}) }, {});
}), {});
}
function p(e3) {
return r(e3, { indent: " ", prefix: `
`, postfix: `
` });
}
function h(e3) {
return e3.slice().split(`
`).map((function(e4) {
if (e4 !== "") {
var t12 = e4.slice("-1") === ":", n3 = e4.search(/\S|$/);
return t12 ? `${"#".repeat(n3 / 2 + 1)} ` + e4.slice(n3) : " - " + e4.slice(n3);
}
return "";
})).join(`
`);
}
function d(e3, t12) {
return t12 || (t12 = { indent: " " }), JSON.stringify(e3, null, t12.indent);
}
e2.exports = { json: function(e3, t12) {
return o.log("trace", "formatToJson"), t12 || (t12 = {}), e3 = o.pipe([function() {
return i(e3, t12);
}, t12.title ? function(e4) {
return { [t12.title]: e4 };
} : o.noop, d])(e3), e3 = t12.console ? `
${e3}
` : e3;
}, markdown: function(e3, t12) {
return o.log("trace", "formatToMarkdown"), o.pipe([function() {
return i(e3, t12);
}, a, l, f, p, h, t12.title ? function(e4) {
return `
# ${t12.title}${e4}`;
} : o.noop])(e3, t12);
}, yaml: function(e3, t12) {
return o.log("trace", "formatToYaml", t12), o.pipe([function() {
return i(e3, t12);
}, a, l, f, t12.title ? function(e4) {
return { [t12.title]: e4 };
} : o.noop, p, t12.console ? s : o.noop])(e3, t12);
} };
}, 6732: (e2, t11, n2) => {
"use strict";
n2(5888);
var r = n2(224);
e2.exports = { getNodeInfo: function() {
return r.log("trace", "getNodeInfo"), Promise.all([r.isWindows ? r.run("node -v").then(r.findVersion) : r.which("node").then((function(e3) {
return e3 ? r.run(e3 + " -v") : Promise.resolve("");
})).then(r.findVersion), r.which("node")]).then((function(e3) {
return r.determineFound("Node", e3[0], e3[1]);
}));
}, getnpmInfo: function() {
return r.log("trace", "getnpmInfo"), Promise.all([r.run("npm -v"), r.which("npm")]).then((function(e3) {
return r.determineFound("npm", e3[0], e3[1]);
}));
}, getWatchmanInfo: function() {
return r.log("trace", "getWatchmanInfo"), Promise.all([r.which("watchman").then((function(e3) {
return e3 ? r.run(e3 + " -v") : void 0;
})), r.which("watchman")]).then((function(e3) {
return r.determineFound("Watchman", e3[0], e3[1]);
}));
}, getYarnInfo: function() {
return r.log("trace", "getYarnInfo"), Promise.all([r.run("yarn -v"), r.which("yarn")]).then((function(e3) {
return r.determineFound("Yarn", e3[0], e3[1]);
}));
}, getpnpmInfo: function() {
return r.log("trace", "getpnpmInfo"), Promise.all([r.run("pnpm -v"), r.which("pnpm")]).then((function(e3) {
return r.determineFound("pnpm", e3[0], e3[1]);
}));
}, getbunInfo: function() {
return r.log("trace", "getbunInfo"), Promise.all([r.run("bun -v"), r.which("bun")]).then((function(e3) {
return r.determineFound("bun", e3[0], e3[1]);
}));
}, getDenoInfo: function() {
return r.log("trace", "getDenoInfo"), Promise.all([r.isWindows ? r.run("deno --version").then(r.findVersion) : r.which("deno").then((function(e3) {
return e3 ? r.run(e3 + " --version") : Promise.resolve("");
})).then(r.findVersion), r.which("deno")]).then((function(e3) {
return r.determineFound("Deno", e3[0], e3[1]);
}));
} };
}, 2524: (e2, t11, n2) => {
"use strict";
n2(3708), n2(5888), n2(8412);
var r = n2(2058), o = n2(8558), i = n2(224), s = n2(7072);
function a(e3, t12, n3) {
var r2;
return (i.isLinux ? i.run("firefox --version").then((function(e4) {
return e4.replace(/^.* ([^ ]*)/g, "$1");
})) : i.isMacOS && typeof t12 == "string" && t12 ? i.getDarwinApplicationVersion(t12) : i.isWindows && typeof n3 == "string" && n3 ? i.windowsExeExists(n3).then((function(e4) {
return r2 = e4, e4 ? i.run(`powershell "& '${e4}' -v | Write-Output"`).then((function(e5) {
return i.findVersion(e5);
})) : i.NA;
})) : Promise.resolve(i.NA)).then((function(t13) {
return i.determineFound(e3, t13, r2 || i.NA);
}));
}
e2.exports = { getBraveBrowserInfo: function() {
return i.log("trace", "getBraveBrowser"), (i.isLinux ? i.run("brave --version || brave-browser --version").then((function(e3) {
return e3.replace(/^.* ([^ ]*)/g, "$1");
})) : i.isMacOS ? i.getDarwinApplicationVersion(i.browserBundleIdentifiers["Brave Browser"]).then(i.findVersion) : Promise.resolve("N/A")).then((function(e3) {
return i.determineFound("Brave Browser", e3, "N/A");
}));
}, getChromeInfo: function() {
var e3;
if (i.log("trace", "getChromeInfo"), i.isLinux) e3 = i.run("google-chrome --version").then((function(e4) {
return e4.replace(" dev", "").replace(/^.* ([^ ]*)/g, "$1");
}));
else if (i.isMacOS) e3 = i.getDarwinApplicationVersion(i.browserBundleIdentifiers.Chrome).then(i.findVersion);
else if (i.isWindows) {
var t12;
try {
var n3 = [process.env.ProgramFiles, process.env["ProgramFiles(x86)"]].filter(Boolean).map((function(e4) {
try {
return r.readdirSync(s.join(e4, "Google/Chrome/Application"));
} catch {
return [];
}
})).reduce((function(e4, t13) {
return e4.concat(t13);
}), []);
t12 = n3.length ? i.findVersion(n3.join(`
`)) : i.NotFound;
} catch {
t12 = i.NotFound;
}
e3 = Promise.resolve(t12);
} else e3 = Promise.resolve("N/A");
return e3.then((function(e4) {
return i.determineFound("Chrome", e4, "N/A");
}));
}, getChromeCanaryInfo: function() {
return i.log("trace", "getChromeCanaryInfo"), i.getDarwinApplicationVersion(i.browserBundleIdentifiers["Chrome Canary"]).then((function(e3) {
return i.determineFound("Chrome Canary", e3, "N/A");
}));
}, getChromiumInfo: function() {
return i.log("trace", "getChromiumInfo"), (i.isLinux ? i.run("chromium --version").then(i.findVersion) : Promise.resolve("N/A")).then((function(e3) {
return i.determineFound("Chromium", e3, "N/A");
}));
}, getEdgeInfo: function() {
var e3;
if (i.log("trace", "getEdgeInfo"), i.isWindows && o.release().split(".")[0] === "10") {
var t12 = { Spartan: "Microsoft.MicrosoftEdge", Chromium: "Microsoft.MicrosoftEdge.Stable", ChromiumDev: "Microsoft.MicrosoftEdge.Dev" };
e3 = Promise.all(Object.keys(t12).map((function(e4) {
return (function(e5, t13) {
return i.run(`powershell get-appxpackage ${e5}`).then((function(e6) {
if (i.findVersion(e6) !== "") return `${t13} (${i.findVersion(e6)})`;
}));
})(t12[e4], e4);
})).filter((function(e4) {
return e4 !== void 0;
})));
} else {
if (!i.isMacOS) return Promise.resolve("N/A");
e3 = i.getDarwinApplicationVersion(i.browserBundleIdentifiers["Microsoft Edge"]);
}
return e3.then((function(e4) {
return i.determineFound("Edge", Array.isArray(e4) ? e4.filter((function(e5) {
return e5 !== void 0;
})) : e4, i.NA);
}));
}, getFirefoxInfo: function() {
return i.log("trace", "getFirefoxInfo"), a("Firefox", i.browserBundleIdentifiers.Firefox, "Mozilla Firefox/firefox.exe");
}, getFirefoxDeveloperEditionInfo: function() {
return i.log("trace", "getFirefoxDeveloperEditionInfo"), a("Firefox Developer Edition", i.browserBundleIdentifiers["Firefox Developer Edition"], "Firefox Developer Edition/firefox.exe");
}, getFirefoxNightlyInfo: function() {
return i.log("trace", "getFirefoxNightlyInfo"), (i.isLinux ? i.run("firefox-trunk --version").then((function(e3) {
return e3.replace(/^.* ([^ ]*)/g, "$1");
})) : i.isMacOS ? i.getDarwinApplicationVersion(i.browserBundleIdentifiers["Firefox Nightly"]) : Promise.resolve("N/A")).then((function(e3) {
return i.determineFound("Firefox Nightly", e3, "N/A");
}));
}, getInternetExplorerInfo: function() {
var e3;
if (i.log("trace", "getInternetExplorerInfo"), i.isWindows) {
var t12 = [process.env.SYSTEMDRIVE || "C:", "Program Files", "Internet Explorer", "iexplore.exe"].join("\\\\");
e3 = i.run(`wmic datafile where "name='${t12}'" get Version`).then(i.findVersion);
} else e3 = Promise.resolve("N/A");
return e3.then((function(e4) {
return i.determineFound("Internet Explorer", e4, "N/A");
}));
}, getSafariTechnologyPreviewInfo: function() {
return i.log("trace", "getSafariTechnologyPreviewInfo"), i.getDarwinApplicationVersion(i.browserBundleIdentifiers["Safari Technology Preview"]).then((function(e3) {
return i.determineFound("Safari Technology Preview", e3, "N/A");
}));
}, getSafariInfo: function() {
return i.log("trace", "getSafariInfo"), i.getDarwinApplicationVersion(i.browserBundleIdentifiers.Safari).then((function(e3) {
return i.determineFound("Safari", e3, "N/A");
}));
} };
}, 6620: (e2, t11, n2) => {
"use strict";
n2(7360), n2(5888);
var r = n2(224);
e2.exports = { getMongoDBInfo: function() {
return r.log("trace", "getMongoDBInfo"), Promise.all([r.run("mongo --version").then(r.findVersion), r.which("mongo")]).then((function(e3) {
return r.determineFound("MongoDB", e3[0], e3[1]);
}));
}, getMySQLInfo: function() {
return r.log("trace", "getMySQLInfo"), Promise.all([r.run("mysql --version").then((function(e3) {
return `${r.findVersion(e3, null, 1)}${e3.includes("MariaDB") ? " (MariaDB)" : ""}`;
})), r.which("mysql")]).then((function(e3) {
return r.determineFound("MySQL", e3[0], e3[1]);
}));
}, getPostgreSQLInfo: function() {
return r.log("trace", "getPostgreSQLInfo"), Promise.all([r.run("postgres --version").then(r.findVersion), r.which("postgres")]).then((function(e3) {
return r.determineFound("PostgreSQL", e3[0], e3[1]);
}));
}, getSQLiteInfo: function() {
return r.log("trace", "getSQLiteInfo"), Promise.all([r.run("sqlite3 --version").then(r.findVersion), r.which("sqlite3")]).then((function(e3) {
return r.determineFound("SQLite", e3[0], e3[1]);
}));
} };
}, 3224: (e2, t11, n2) => {
"use strict";
n2(3708), n2(8412), n2(5888);
var r = n2(7072), o = n2(224);
e2.exports = { getAndroidStudioInfo: function() {
var e3 = Promise.resolve("N/A");
if (o.isMacOS) {
var t12 = [r.join("/", "Applications", "Android Studio.app", "Contents", "Info.plist"), r.join(process.env.HOME, "Applications", "Android Studio.app", "Contents", "Info.plist"), r.join("/", "Applications", "JetBrains Toolbox", "Android Studio.app", "Contents", "Info.plist"), r.join(process.env.HOME, "Applications", "JetBrains Toolbox", "Android Studio.app", "Contents", "Info.plist")];
e3 = Promise.all(t12.map((function(e4) {
return o.fileExists(e4).then((function(t13) {
if (!t13) return null;
var n3 = o.generatePlistBuddyCommand(e4.replace(/ /g, "\\ "), ["CFBundleShortVersionString", "CFBundleVersion"]);
return o.run(n3).then((function(e5) {
return e5.split(`
`).join(" ");
}));
}));
}))).then((function(e4) {
return e4.find((function(e5) {
return e5 !== null;
})) || o.NotFound;
}));
} else o.isLinux ? e3 = Promise.all([o.run('cat /opt/android-studio/bin/studio.sh | grep "$Home/.AndroidStudio" | head -1').then(o.findVersion), o.run("cat /opt/android-studio/build.txt")]).then((function(e4) {
return `${e4[0]} ${e4[1]}`.trim() || o.NotFound;
})) : o.isWindows && (e3 = Promise.all([o.run('wmic datafile where name="C:\\\\Program Files\\\\Android\\\\Android Studio\\\\bin\\\\studio.exe" get Version').then((function(e4) {
return e4.replace(/(\r\n|\n|\r)/gm, "");
})), o.run('type "C:\\\\Program Files\\\\Android\\\\Android Studio\\\\build.txt"').then((function(e4) {
return e4.replace(/(\r\n|\n|\r)/gm, "");
}))]).then((function(e4) {
return `${e4[0]} ${e4[1]}`.trim() || o.NotFound;
})));
return e3.then((function(e4) {
return o.determineFound("Android Studio", e4);
}));
}, getAtomInfo: function() {
return o.log("trace", "getAtomInfo"), Promise.all([o.getDarwinApplicationVersion(o.ideBundleIdentifiers.Atom), "N/A"]).then((function(e3) {
return o.determineFound("Atom", e3[0], e3[1]);
}));
}, getEmacsInfo: function() {
return o.log("trace", "getEmacsInfo"), o.isMacOS || o.isLinux ? Promise.all([o.run("emacs --version").then(o.findVersion), o.which("emacs")]).then((function(e3) {
return o.determineFound("Emacs", e3[0], e3[1]);
})) : Promise.resolve(["Emacs", "N/A"]);
}, getIntelliJInfo: function() {
return o.log("trace", "getIntelliJInfo"), o.getDarwinApplicationVersion(o.ideBundleIdentifiers.IntelliJ).then((function(e3) {
return o.determineFound("IntelliJ", e3);
}));
}, getNanoInfo: function() {
return o.log("trace", "getNanoInfo"), o.isLinux ? Promise.all([o.run("nano --version").then(o.findVersion), o.which("nano")]).then((function(e3) {
return o.determineFound("Nano", e3[0], e3[1]);
})) : Promise.resolve(["Nano", "N/A"]);
}, getNvimInfo: function() {
return o.log("trace", "getNvimInfo"), o.isMacOS || o.isLinux ? Promise.all([o.run("nvim --version").then(o.findVersion), o.which("nvim")]).then((function(e3) {
return o.determineFound("Nvim", e3[0], e3[1]);
})) : Promise.resolve(["Vim", "N/A"]);
}, getPhpStormInfo: function() {
return o.log("trace", "getPhpStormInfo"), o.getDarwinApplicationVersion(o.ideBundleIdentifiers.PhpStorm).then((function(e3) {
return o.determineFound("PhpStorm", e3);
}));
}, getSublimeTextInfo: function() {
return o.log("trace", "getSublimeTextInfo"), Promise.all([o.run("subl --version").then((function(e3) {
return o.findVersion(e3, /\d+/);
})), o.which("subl")]).then((function(e3) {
return e3[0] === "" && o.isMacOS ? (o.log("trace", "getSublimeTextInfo using plist"), Promise.all([o.getDarwinApplicationVersion(o.ideBundleIdentifiers["Sublime Text"]), "N/A"])) : e3;
})).then((function(e3) {
return o.determineFound("Sublime Text", e3[0], e3[1]);
}));
}, getVimInfo: function() {
return o.log("trace", "getVimInfo"), o.isMacOS || o.isLinux ? Promise.all([o.run("vim --version").then(o.findVersion), o.which("vim")]).then((function(e3) {
return o.determineFound("Vim", e3[0], e3[1]);
})) : Promise.resolve(["Vim", "N/A"]);
}, getVSCodeInfo: function() {
return o.log("trace", "getVSCodeInfo"), Promise.all([o.run("code --version").then(o.findVersion), o.which("code")]).then((function(e3) {
return o.determineFound("VSCode", e3[0], e3[1]);
}));
}, getCursorInfo: function() {
return o.log("trace", "getCursorInfo"), Promise.all([o.run("cursor --version").then(o.findVersion), o.which("cursor")]).then((function(e3) {
return o.determineFound("Cursor", e3[0], e3[1]);
}));
}, getClaudeCodeInfo: function() {
return o.log("trace", "getClaudeCodeInfo"), Promise.all([o.run("claude --version").then(o.findVersion), o.which("claude")]).then((function(e3) {
return o.determineFound("Claude Code", e3[0], e3[1]);
}));
}, getopencodeInfo: function() {
return o.log("trace", "getopencodeInfo"), Promise.all([o.run("opencode --version").then(o.findVersion), o.which("opencode")]).then((function(e3) {
return o.determineFound("opencode", e3[0], e3[1]);
}));
}, getCodexInfo: function() {
return o.log("trace", "getCodexInfo"), Promise.all([o.run("codex --version").then(o.findVersion), o.which("codex")]).then((function(e3) {
return o.determineFound("Codex", e3[0], e3[1]);
}));
}, getVisualStudioInfo: function() {
return o.log("trace", "getVisualStudioInfo"), o.isWindows ? o.run(`"${process.env["ProgramFiles(x86)"]}/Microsoft Visual Studio/Installer/vswhere.exe" -format json -prerelease`).then((function(e3) {
var t12 = JSON.parse(e3).map((function(e4) {
return { Version: e4.installationVersion, DisplayName: e4.displayName };
}));
return o.determineFound("Visual Studio", t12.map((function(e4) {
return `${e4.Version} (${e4.DisplayName})`;
})));
})).catch((function() {
return Promise.resolve(["Visual Studio", o.NotFound]);
})) : Promise.resolve(["Visual Studio", o.NA]);
}, getWebStormInfo: function() {
return o.log("trace", "getWebStormInfo"), o.getDarwinApplicationVersion(o.ideBundleIdentifiers.WebStorm).then((function(e3) {
return o.determineFound("WebStorm", e3);
}));
}, getXcodeInfo: function() {
return o.log("trace", "getXcodeInfo"), o.isMacOS ? Promise.all([o.which("xcodebuild").then((function(e3) {
return o.run(e3 + " -version");
})).then((function(e3) {
return `${o.findVersion(e3)}/${e3.split("Build version ")[1]}`;
})), o.which("xcodebuild")]).then((function(e3) {
return o.determineFound("Xcode", e3[0], e3[1]);
})) : Promise.resolve(["Xcode", "N/A"]);
} };
}, 9892: (e2, t11, n2) => {
"use strict";
function r(e3, t12, n3) {
return t12 in e3 ? Object.defineProperty(e3, t12, { value: n3, enumerable: !0, configurable: !0, writable: !0 }) : e3[t12] = n3, e3;
}
n2(5584);
var o = n2(6304), i = n2(224), s = n2(6732), a = n2(2524), c = n2(6620), u = n2(3224), l = n2(6436), f = n2(760), p = n2(2060), h = n2(7508), d = n2(9284), m = n2(8144), g = n2(5882), v = n2(9676);
e2.exports = Object.assign({}, i, o, (function(e3) {
for (var t12 = 1; t12 < arguments.length; t12++) {
var n3 = arguments[t12] != null ? arguments[t12] : {}, o2 = Object.keys(n3);
typeof Object.getOwnPropertySymbols == "function" && (o2 = o2.concat(Object.getOwnPropertySymbols(n3).filter((function(e4) {
return Object.getOwnPropertyDescriptor(n3, e4).enumerable;
})))), o2.forEach((function(t13) {
r(e3, t13, n3[t13]);
}));
}
return e3;
})({}, s, a, c, u, l, f, p, h, d, m, g, v));
}, 6436: (e2, t11, n2) => {
"use strict";
n2(5888);
var r = n2(224);
e2.exports = { getBashInfo: function() {
return r.log("trace", "getBashInfo"), Promise.all([r.run("bash --version").then(r.findVersion), r.which("bash")]).then((function(e3) {
return r.determineFound("Bash", e3[0], e3[1]);
}));
}, getElixirInfo: function() {
return r.log("trace", "getElixirInfo"), Promise.all([r.run("elixir --version").then((function(e3) {
return r.findVersion(e3, /[Elixir]+\s([\d+.[\d+|.]+)/, 1);
})), r.which("elixir")]).then((function(e3) {
return Promise.resolve(r.determineFound("Elixir", e3[0], e3[1]));
}));
}, getErlangInfo: function() {
return r.log("trace", "getErlangInfo"), Promise.all([r.run(`erl -eval "{ok, Version} = file:read_file(filename:join([code:root_dir(), 'releases', erlang:system_info(otp_release), 'OTP_VERSION'])), io:fwrite(Version), halt()." -noshell`).then(r.findVersion), r.which("erl")]).then((function(e3) {
return Promise.resolve(r.determineFound("Erlang", e3[0], e3[1]));
}));
}, getGoInfo: function() {
return r.log("trace", "getGoInfo"), Promise.all([r.run("go version").then(r.findVersion), r.which("go")]).then((function(e3) {
return r.determineFound("Go", e3[0], e3[1]);
}));
}, getJavaInfo: function() {
return r.log("trace", "getJavaInfo"), Promise.all([r.run("javac -version", { unify: !0 }).then((function(e3) {
return r.findVersion(e3, /\d+\.[\w+|.|_|-]+/);
})), r.which("javac")]).then((function(e3) {
return r.determineFound("Java", e3[0], e3[1]);
}));
}, getPerlInfo: function() {
return r.log("trace", "getPerlInfo"), Promise.all([r.run("perl -v").then(r.findVersion), r.which("perl")]).then((function(e3) {
return r.determineFound("Perl", e3[0], e3[1]);
}));
}, getPHPInfo: function() {
return r.log("trace", "getPHPInfo"), Promise.all([r.run("php -v").then(r.findVersion), r.which("php")]).then((function(e3) {
return r.determineFound("PHP", e3[0], e3[1]);
}));
}, getProtocInfo: function() {
return r.log("trace", "getProtocInfo"), Promise.all([r.run("protoc --version").then(r.findVersion), r.which("protoc")]).then((function(e3) {
return r.determineFound("Protoc", e3[0], e3[1]);
}));
}, getPythonInfo: function() {
return r.log("trace", "getPythonInfo"), Promise.all([r.run("python -V 2>&1").then(r.findVersion), r.which("python")]).then((function(e3) {
return r.determineFound("Python", e3[0], e3[1]);
}));
}, getPython3Info: function() {
return r.log("trace", "getPython3Info"), Promise.all([r.run("python3 -V 2>&1").then(r.findVersion), r.which("python3")]).then((function(e3) {
return r.determineFound("Python3", e3[0], e3[1]);
}));
}, getRInfo: function() {
return r.log("trace", "getRInfo"), Promise.all([r.run("R --version", { unify: !0 }).then(r.findVersion), r.which("R")]).then((function(e3) {
return r.determineFound("R", e3[0], e3[1]);
}));
}, getRubyInfo: function() {
return r.log("trace", "getRubyInfo"), Promise.all([r.run("ruby -v").then(r.findVersion), r.which("ruby")]).then((function(e3) {
return r.determineFound("Ruby", e3[0], e3[1]);
}));
}, getRustInfo: function() {
return r.log("trace", "getRustInfo"), Promise.all([r.run("rustc --version").then(r.findVersion), r.which("rustc")]).then((function(e3) {
return r.determineFound("Rust", e3[0], e3[1]);
}));
}, getZigInfo: function() {
return r.log("trace", "getZigInfo"), Promise.all([r.run("zig version").then(r.findVersion), r.which("zig")]).then((function(e3) {
return r.determineFound("Zig", e3[0], e3[1]);
}));
}, getScalaInfo: function() {
return r.log("trace", "getScalaInfo"), r.isMacOS || r.isLinux ? Promise.all([r.run("scalac -version").then(r.findVersion), r.which("scalac")]).then((function(e3) {
return r.determineFound("Scala", e3[0], e3[1]);
})) : Promise.resolve(["Scala", "N/A"]);
} };
}, 760: (e2, t11, n2) => {
"use strict";
n2(5888);
var r = n2(224);
e2.exports = { getAptInfo: function() {
return r.log("trace", "getAptInfo"), r.isLinux ? Promise.all([r.run("apt --version").then(r.findVersion), r.which("apt")]).then((function(e3) {
return r.determineFound("Apt", e3[0], e3[1]);
})) : Promise.all(["Apt", "N/A"]);
}, getCargoInfo: function() {
return r.log("trace", "getCargoInfo"), Promise.all([r.run("cargo --version").then(r.findVersion), r.which("cargo")]).then((function(e3) {
return r.determineFound("Cargo", e3[0], e3[1]);
}));
}, getCocoaPodsInfo: function() {
return r.log("trace", "getCocoaPodsInfo"), r.isMacOS ? Promise.all([r.run("pod --version").then(r.findVersion), r.which("pod")]).then((function(e3) {
return r.determineFound("CocoaPods", e3[0], e3[1]);
})) : Promise.all(["CocoaPods", "N/A"]);
}, getComposerInfo: function() {
return r.log("trace", "getComposerInfo"), Promise.all([r.run("composer --version").then(r.findVersion), r.which("composer").then(r.condensePath)]).then((function(e3) {
return r.determineFound("Composer", e3[0], e3[1]);
}));
}, getGradleInfo: function() {
return r.log("trace", "getGradleInfo"), Promise.all([r.run("gradle --version").then(r.findVersion), r.which("gradle").then(r.condensePath)]).then((function(e3) {
return r.determineFound("Gradle", e3[0], e3[1]);
}));
}, getHomebrewInfo: function() {
return r.log("trace", "getHomebrewInfo"), r.isMacOS || r.isLinux ? Promise.all([r.run("brew --version").then(r.findVersion), r.which("brew")]).then((function(e3) {
return r.determineFound("Homebrew", e3[0], e3[1]);
})) : Promise.all(["Homebrew", "N/A"]);
}, getMavenInfo: function() {
return r.log("trace", "getMavenInfo"), Promise.all([r.run("mvn --version").then(r.findVersion), r.which("mvn").then(r.condensePath)]).then((function(e3) {
return r.determineFound("Maven", e3[0], e3[1]);
}));
}, getpip2Info: function() {
return r.log("trace", "getpip2Info"), Promise.all([r.run("pip2 --version").then(r.findVersion), r.which("pip2").then(r.condensePath)]).then((function(e3) {
return r.determineFound("pip2", e3[0], e3[1]);
}));
}, getpip3Info: function() {
return r.log("trace", "getpip3Info"), Promise.all([r.run("pip3 --version").then(r.findVersion), r.which("pip3").then(r.condensePath)]).then((function(e3) {
return r.determineFound("pip3", e3[0], e3[1]);
}));
}, getRubyGemsInfo: function() {
return r.log("trace", "getRubyGemsInfo"), Promise.all([r.run("gem --version").then(r.findVersion), r.which("gem")]).then((function(e3) {
return r.determineFound("RubyGems", e3[0], e3[1]);
}));
}, getYumInfo: function() {
return r.log("trace", "getYumInfo"), r.isLinux ? Promise.all([r.run("yum --version").then(r.findVersion), r.which("yum")]).then((function(e3) {
return r.determineFound("Yum", e3[0], e3[1]);
})) : Promise.all(["Yum", "N/A"]);
} };
}, 2060: (e2, t11, n2) => {
"use strict";
n2(5888);
var r = n2(224), o = n2(7072);
e2.exports = { getYarnWorkspacesInfo: function() {
return r.log("trace", "getYarnWorkspacesInfo"), Promise.all([r.run("yarn -v"), r.getPackageJsonByPath("package.json").then((function(e3) {
return e3 && "workspaces" in e3;
}))]).then((function(e3) {
var t12 = "Yarn Workspaces";
return e3[0] && e3[1] ? Promise.resolve([t12, e3[0]]) : Promise.resolve([t12, "Not Found"]);
}));
}, getLernaInfo: function() {
return r.log("trace", "getLernaInfo"), Promise.all([r.getPackageJsonByName("lerna").then((function(e3) {
return e3 && e3.version;
})), r.fileExists(o.join(process.cwd(), "lerna.json"))]).then((function(e3) {
var t12 = "Lerna";
return e3[0] && e3[1] ? Promise.resolve([t12, e3[0]]) : Promise.resolve([t12, "Not Found"]);
}));
} };
}, 7508: (e2, t11, n2) => {
"use strict";
n2(4880), n2(5888), n2(3708);
var r = n2(8558), o = n2(2058), i = n2(7072), s = n2(224);
e2.exports = { getAndroidSDKInfo: function() {
return s.run("sdkmanager --list").then((function(e3) {
return !e3 && process.env.ANDROID_HOME ? s.run(`${process.env.ANDROID_HOME}/tools/bin/sdkmanager --list`) : e3;
})).then((function(e3) {
return !e3 && process.env.ANDROID_HOME ? s.run(`${process.env.ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --list`) : e3;
})).then((function(e3) {
return !e3 && s.isMacOS ? s.run("~/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager --list") : e3;
})).then((function(e3) {
return !e3 && s.isMacOS ? s.run("~/Library/Android/sdk/tools/bin/sdkmanager --list") : e3;
})).then((function(e3) {
if (!e3 && s.isWindows) {
var t12 = i.join(r.homedir(), "AppData/Local/Android/Sdk/cmdline-tools/latest/bin/sdkmanager");
return s.run(`${t12} --list`);
}
return e3;
})).then((function(e3) {
var t12 = s.parseSDKManagerOutput(e3), n3 = function(e4) {
var t13, n4 = i.join(e4, "source.properties");
try {
t13 = o.readFileSync(n4, "utf8");
} catch (e5) {
if (e5.code === "ENOENT") return;
throw e5;
}
for (var r3 = t13.split(`
`), s2 = 0; s2 < r3.length; s2 += 1) {
var a = r3[s2].split("=");
if (a.length === 2 && a[0].trim() === "Pkg.Revision") return a[1].trim();
}
}, r2 = process.env.ANDROID_NDK ? n3(process.env.ANDROID_NDK) : process.env.ANDROID_NDK_HOME ? n3(process.env.ANDROID_NDK_HOME) : process.env.ANDROID_HOME ? n3(i.join(process.env.ANDROID_HOME, "ndk-bundle")) : void 0;
return t12.buildTools.length || t12.apiLevels.length || t12.systemImages.length || r2 ? Promise.resolve(["Android SDK", { "API Levels": t12.apiLevels || s.NotFound, "Build Tools": t12.buildTools || s.NotFound, "System Images": t12.systemImages || s.NotFound, "Android NDK": r2 || s.NotFound }]) : Promise.resolve(["Android SDK", s.NotFound]);
}));
}, getiOSSDKInfo: function() {
return s.isMacOS ? s.run("xcodebuild -showsdks").then((function(e3) {
return e3.match(/[\w]+\s[\d|.]+/g);
})).then(s.uniq).then((function(e3) {
return e3.length ? ["iOS SDK", { Platforms: e3 }] : ["iOS SDK", s.NotFound];
})) : Promise.resolve(["iOS SDK", "N/A"]);
}, getWindowsSDKInfo: function() {
if (s.log("trace", "getWindowsSDKInfo"), s.isWindows) {
var e3 = s.NotFound;
return s.run("reg query HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppModelUnlock").then((function(t12) {
e3 = t12.split(/[\r\n]/g).slice(1).filter((function(e4) {
return e4 !== "";
})).reduce((function(e4, t13) {
var n4 = t13.match(/[^\s]+/g);
return n4[2] !== "0x0" && n4[2] !== "0x1" || (n4[2] = n4[2] === "0x1" ? "Enabled" : "Disabled"), e4[n4[0]] = n4[2], e4;
}), {}), Object.keys(e3).length === 0 && (e3 = s.NotFound);
try {
var n3 = o.readdirSync(`${process.env["ProgramFiles(x86)"]}/Windows Kits/10/Platforms/UAP`);
e3.Versions = n3;
} catch {
}
return Promise.resolve(["Windows SDK", e3]);
}));
}
return Promise.resolve(["Windows SDK", s.NA]);
} };
}, 9284: (e2, t11, n2) => {
"use strict";
n2(5888);
var r = n2(224);
e2.exports = { getApacheInfo: function() {
return r.log("trace", "getApacheInfo"), r.isMacOS || r.isLinux ? Promise.all([r.run("apachectl -v").then(r.findVersion), r.which("apachectl")]).then((function(e3) {
return r.determineFound("Apache", e3[0], e3[1]);
})) : Promise.resolve(["Apache", "N/A"]);
}, getNginxInfo: function() {
return r.log("trace", "getNginxInfo"), r.isMacOS || r.isLinux ? Promise.all([r.run("nginx -v 2>&1").then(r.findVersion), r.which("nginx")]).then((function(e3) {
return r.determineFound("Nginx", e3[0], e3[1]);
})) : Promise.resolve(["Nginx", "N/A"]);
} };
}, 8144: (e2, t11, n2) => {
"use strict";
n2(3708), n2(4880), n2(5888);
var r = n2(2288), o = n2(224), i = n2(8558);
e2.exports = { getContainerInfo: function() {
return o.log("trace", "getContainerInfo"), o.isLinux ? Promise.all([o.fileExists("/.dockerenv"), o.readFile("/proc/self/cgroup")]).then((function(e3) {
return o.log("trace", "getContainerInfoThen", e3), Promise.resolve(["Container", e3[0] || e3[1] ? "Yes" : "N/A"]);
})).catch((function(e3) {
return o.log("trace", "getContainerInfoCatch", e3);
})) : Promise.resolve(["Container", "N/A"]);
}, getCPUInfo: function() {
var e3;
o.log("trace", "getCPUInfo");
try {
var t12 = i.cpus();
e3 = "(" + t12.length + ") " + i.arch() + " " + t12[0].model;
} catch {
e3 = "Unknown";
}
return Promise.all(["CPU", e3]);
}, getMemoryInfo: function() {
return o.log("trace", "getMemoryInfo"), Promise.all(["Memory", `${o.toReadableBytes(i.freemem())} / ${o.toReadableBytes(i.totalmem())}`]);
}, getOSInfo: function() {
var e3, t12;
if (o.log("trace", "getOSInfo"), o.isMacOS) e3 = o.run("sw_vers -productVersion ");
else if (o.isLinux) e3 = o.run("cat /etc/os-release").then((function(e4) {
var t13 = (e4 || "").match(/NAME="(.+)"/) || "", n4 = (e4 || "").match(/VERSION="(.+)"/) || ["", ""], r2 = n4 !== null ? n4[1] : "";
return `${t13[1]} ${r2}`.trim() || "";
}));
else if (o.isWindows) {
e3 = Promise.resolve(i.release());
var n3 = i.release().split(".");
n3[0] === "10" && n3[1] === "0" && n3[2] >= 22e3 && (t12 = "Windows 11");
} else e3 = Promise.resolve();
return e3.then((function(e4) {
return t12 = t12 || r(i.platform(), i.release()), e4 && (t12 += ` ${e4}`), ["OS", t12];
}));
}, getShellInfo: function() {
if (o.log("trace", "getShellInfo", process.env), o.isMacOS || o.isLinux) {
var e3 = process.env.SHELL || o.runSync("getent passwd $LOGNAME | cut -d: -f7 | head -1"), t12 = `${e3} --version 2>&1`;
return e3.match("/bin/ash") && (t12 = `${e3} --help 2>&1`), Promise.all([o.run(t12).then(o.findVersion), o.which(e3)]).then((function(e4) {
return o.determineFound("Shell", e4[0] || "Unknown", e4[1]);
}));
}
return Promise.resolve(["Shell", "N/A"]);
}, getGLibcInfo: function() {
return o.log("trace", "getGLibc"), o.isLinux ? Promise.all([o.run("ldd --version").then(o.findVersion)]).then((function(e3) {
return o.determineFound("GLibc", e3[0] || "Unknown");
})) : Promise.resolve(["GLibc", "N/A"]);
} };
}, 5882: (e2, t11, n2) => {
"use strict";
n2(5888);
var r = n2(224);
e2.exports = { getBazelInfo: function() {
return r.log("trace", "getBazelInfo"), Promise.all([r.run("bazel --version").then(r.findVersion), r.which("bazel")]).then((function(e3) {
return r.determineFound("Bazel", e3[0], e3[1]);
}));
}, getCMakeInfo: function() {
return r.log("trace", "getCMakeInfo"), Promise.all([r.run("cmake --version").then(r.findVersion), r.which("cmake")]).then((function(e3) {
return r.determineFound("CMake", e3[0], e3[1]);
}));
}, getGCCInfo: function() {
return r.log("trace", "getGCCInfo"), r.isMacOS || r.isLinux ? Promise.all([r.run("gcc -v 2>&1").then(r.findVersion), r.which("gcc")]).then((function(e3) {
return r.determineFound("GCC", e3[0], e3[1]);
})) : Promise.resolve(["GCC", "N/A"]);
}, getClangInfo: function() {
return r.log("trace", "getClangInfo"), Promise.all([r.run("clang --version").then(r.findVersion), r.which("clang")]).then((function(e3) {
return r.determineFound("Clang", e3[0], e3[1]);
}));
}, getGitInfo: function() {
return r.log("trace", "getGitInfo"), Promise.all([r.run("git --version").then(r.findVersion), r.which("git")]).then((function(e3) {
return r.determineFound("Git", e3[0], e3[1]);
}));
}, getGitLFSInfo: function() {
return r.log("trace", "getGitLFSInfo"), Promise.all([r.run("git lfs version").then(r.findVersion), r.which("git-lfs")]).then((function(e3) {
return r.determineFound("Git LFS", e3[0], e3[1]);
}));
}, getMakeInfo: function() {
return r.log("trace", "getMakeInfo"), r.isMacOS || r.isLinux ? Promise.all([r.run("make --version").then(r.findVersion), r.which("make")]).then((function(e3) {
return r.determineFound("Make", e3[0], e3[1]);
})) : Promise.resolve(["Make", "N/A"]);
}, getNinjaInfo: function() {
return r.log("trace", "getNinjaInfo"), Promise.all([r.run("ninja --version").then(r.findVersion), r.which("ninja")]).then((function(e3) {
return r.determineFound("Ninja", e3[0], e3[1]);
}));
}, getMercurialInfo: function() {
return r.log("trace", "getMercurialInfo"), r.isMacOS || r.isLinux ? Promise.all([r.run("hg --version").then(r.findVersion), r.which("hg")]).then((function(e3) {
return r.determineFound("Mercurial", e3[0], e3[1]);
})) : Promise.resolve(["Mercurial", "N/A"]);
}, getSubversionInfo: function() {
return r.log("trace", "getSubversionInfo"), r.isMacOS || r.isLinux ? Promise.all([r.run("svn --version").then(r.findVersion), r.which("svn")]).then((function(e3) {
return r.determineFound("Subversion", e3[0], e3[1]);
})) : Promise.resolve(["Subversion", "N/A"]);
}, getFFmpegInfo: function() {
return r.log("trace", "getFFmpegInfo"), Promise.all([r.run("ffmpeg -version").then(r.findVersion), r.which("ffmpeg")]).then((function(e3) {
return r.determineFound("FFmpeg", e3[0], e3[1]);
}));
}, getCurlInfo: function() {
return r.log("trace", "getCurlInfo"), Promise.all([r.run("curl --version").then(r.findVersion), r.which("curl")]).then((function(e3) {
return r.determineFound("Curl", e3[0], e3[1]);
}));
}, getOpenSSLInfo: function() {
return r.log("trace", "getOpenSSLInfo"), Promise.all([r.run("openssl version").then(r.findVersion), r.which("openssl")]).then((function(e3) {
return r.determineFound("OpenSSL", e3[0], e3[1]);
}));
}, getccacheInfo: function() {
return r.log("trace", "getccacheInfo"), Promise.all([r.run("ccache -V").then(r.findVersion), r.which("ccache")]).then((function(e3) {
return r.determineFound("ccache", e3[0], e3[1]);
}));
}, get7zInfo: function() {
r.log("trace", "get7zInfo");
var e3 = ["7z", "7zz"], t12 = function() {
return Promise.all(e3.map((function(e4) {
return r.which(e4);
}))).then((function(t13) {
var n3 = t13.findIndex(Boolean);
return n3 >= 0 ? { bin: e3[n3], path: t13[n3] } : null;
}));
};
return r.isWindows ? r.windowsExeExists("7-Zip/7z.exe").then((function(e4) {
return e4 ? Promise.all([r.run(`powershell "& '${e4}' i | Write-Output"`).then(r.findVersion), Promise.resolve(e4)]).then((function(e5) {
return r.determineFound("7z", e5[0], e5[1]);
})) : t12().then((function(e5) {
return e5 ? Promise.all([r.run(`${e5.bin} i`).then(r.findVersion), Promise.resolve(e5.path)]).then((function(e6) {
return r.determineFound("7z", e6[0], e6[1]);
})) : r.determineFound("7z", "", void 0);
}));
})) : t12().then((function(e4) {
return e4 ? Promise.all([r.run(`${e4.bin} i`).then(r.findVersion), Promise.resolve(e4.path)]).then((function(e5) {
return r.determineFound("7z", e5[0], e5[1]);
})) : r.determineFound("7z", "", void 0);
}));
}, getClashMetaInfo: function() {
r.log("trace", "getClashMetaInfo");
var e3 = ["mihomo"];
return Promise.all(e3.map((function(e4) {
return r.which(e4);
}))).then((function(t12) {
var n3 = t12.findIndex(Boolean);
return n3 >= 0 ? { bin: e3[n3], path: t12[n3] } : null;
})).then((function(e4) {
return e4 ? Promise.all([r.run(`${e4.bin} -v`).then(r.findVersion), Promise.resolve(e4.path)]).then((function(e5) {
return r.determineFound("Clash Meta", e5[0], e5[1]);
})) : r.determineFound("Clash Meta", "", void 0);
}));
} };
}, 9676: (e2, t11, n2) => {
"use strict";
n2(5888);
var r = n2(224);
e2.exports = { getDockerInfo: function() {
return r.log("trace", "getDockerInfo"), Promise.all([r.run("docker --version").then(r.findVersion), r.which("docker")]).then((function(e3) {
return r.determineFound("Docker", e3[0], e3[1]);
}));
}, getDockerComposeInfo: function() {
return r.log("trace", "getDockerComposeInfo"), Promise.all([r.run("docker-compose --version").then(r.findVersion), r.which("docker-compose")]).then((function(e3) {
return r.determ