anymorph 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +158 -0
- package/dist/index.js +483 -625
- package/package.json +16 -6
package/dist/index.js
CHANGED
|
@@ -1151,7 +1151,7 @@ var require_command = __commonJS({
|
|
|
1151
1151
|
var EventEmitter = __require("node:events").EventEmitter;
|
|
1152
1152
|
var childProcess2 = __require("node:child_process");
|
|
1153
1153
|
var path2 = __require("node:path");
|
|
1154
|
-
var
|
|
1154
|
+
var fs6 = __require("node:fs");
|
|
1155
1155
|
var process16 = __require("node:process");
|
|
1156
1156
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
1157
1157
|
var { CommanderError: CommanderError2 } = require_error();
|
|
@@ -2132,7 +2132,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2132
2132
|
* @param {string} subcommandName
|
|
2133
2133
|
*/
|
|
2134
2134
|
_checkForMissingExecutable(executableFile, executableDir, subcommandName) {
|
|
2135
|
-
if (
|
|
2135
|
+
if (fs6.existsSync(executableFile)) return;
|
|
2136
2136
|
const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
|
|
2137
2137
|
const executableMissing = `'${executableFile}' does not exist
|
|
2138
2138
|
- if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
@@ -2151,10 +2151,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2151
2151
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
2152
2152
|
function findFile(baseDir, baseName) {
|
|
2153
2153
|
const localBin = path2.resolve(baseDir, baseName);
|
|
2154
|
-
if (
|
|
2154
|
+
if (fs6.existsSync(localBin)) return localBin;
|
|
2155
2155
|
if (sourceExt.includes(path2.extname(baseName))) return void 0;
|
|
2156
2156
|
const foundExt = sourceExt.find(
|
|
2157
|
-
(ext) =>
|
|
2157
|
+
(ext) => fs6.existsSync(`${localBin}${ext}`)
|
|
2158
2158
|
);
|
|
2159
2159
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
2160
2160
|
return void 0;
|
|
@@ -2166,7 +2166,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2166
2166
|
if (this._scriptPath) {
|
|
2167
2167
|
let resolvedScriptPath;
|
|
2168
2168
|
try {
|
|
2169
|
-
resolvedScriptPath =
|
|
2169
|
+
resolvedScriptPath = fs6.realpathSync(this._scriptPath);
|
|
2170
2170
|
} catch {
|
|
2171
2171
|
resolvedScriptPath = this._scriptPath;
|
|
2172
2172
|
}
|
|
@@ -3326,9 +3326,9 @@ var require_commander = __commonJS({
|
|
|
3326
3326
|
}
|
|
3327
3327
|
});
|
|
3328
3328
|
|
|
3329
|
-
// node_modules/.pnpm/
|
|
3329
|
+
// node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/spinners.json
|
|
3330
3330
|
var require_spinners = __commonJS({
|
|
3331
|
-
"node_modules/.pnpm/
|
|
3331
|
+
"node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/spinners.json"(exports, module) {
|
|
3332
3332
|
module.exports = {
|
|
3333
3333
|
dots: {
|
|
3334
3334
|
interval: 80,
|
|
@@ -4954,9 +4954,9 @@ var require_spinners = __commonJS({
|
|
|
4954
4954
|
}
|
|
4955
4955
|
});
|
|
4956
4956
|
|
|
4957
|
-
// node_modules/.pnpm/
|
|
4957
|
+
// node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/index.js
|
|
4958
4958
|
var require_cli_spinners = __commonJS({
|
|
4959
|
-
"node_modules/.pnpm/
|
|
4959
|
+
"node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/index.js"(exports, module) {
|
|
4960
4960
|
"use strict";
|
|
4961
4961
|
var spinners = Object.assign({}, require_spinners());
|
|
4962
4962
|
var spinnersList = Object.keys(spinners);
|
|
@@ -4971,9 +4971,9 @@ var require_cli_spinners = __commonJS({
|
|
|
4971
4971
|
}
|
|
4972
4972
|
});
|
|
4973
4973
|
|
|
4974
|
-
// node_modules/.pnpm/node_modules/emoji-regex/index.js
|
|
4974
|
+
// node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.js
|
|
4975
4975
|
var require_emoji_regex = __commonJS({
|
|
4976
|
-
"node_modules/.pnpm/node_modules/emoji-regex/index.js"(exports, module) {
|
|
4976
|
+
"node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.js"(exports, module) {
|
|
4977
4977
|
module.exports = () => {
|
|
4978
4978
|
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
4979
4979
|
};
|
|
@@ -5004,21 +5004,21 @@ import path from "node:path";
|
|
|
5004
5004
|
import { fileURLToPath } from "node:url";
|
|
5005
5005
|
import { promisify as promisify5 } from "node:util";
|
|
5006
5006
|
import childProcess from "node:child_process";
|
|
5007
|
-
import
|
|
5007
|
+
import fs5, { constants as fsConstants2 } from "node:fs/promises";
|
|
5008
5008
|
|
|
5009
|
-
// node_modules/.pnpm/
|
|
5009
|
+
// node_modules/.pnpm/wsl-utils@0.1.0/node_modules/wsl-utils/index.js
|
|
5010
5010
|
import process3 from "node:process";
|
|
5011
5011
|
import fs4, { constants as fsConstants } from "node:fs/promises";
|
|
5012
5012
|
|
|
5013
|
-
// node_modules/.pnpm/node_modules/is-wsl/index.js
|
|
5013
|
+
// node_modules/.pnpm/is-wsl@3.1.1/node_modules/is-wsl/index.js
|
|
5014
5014
|
import process2 from "node:process";
|
|
5015
5015
|
import os from "node:os";
|
|
5016
5016
|
import fs3 from "node:fs";
|
|
5017
5017
|
|
|
5018
|
-
// node_modules/.pnpm/node_modules/is-inside-container/index.js
|
|
5018
|
+
// node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js
|
|
5019
5019
|
import fs2 from "node:fs";
|
|
5020
5020
|
|
|
5021
|
-
// node_modules/.pnpm/node_modules/is-docker/index.js
|
|
5021
|
+
// node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js
|
|
5022
5022
|
import fs from "node:fs";
|
|
5023
5023
|
var isDockerCached;
|
|
5024
5024
|
function hasDockerEnv() {
|
|
@@ -5043,7 +5043,7 @@ function isDocker() {
|
|
|
5043
5043
|
return isDockerCached;
|
|
5044
5044
|
}
|
|
5045
5045
|
|
|
5046
|
-
// node_modules/.pnpm/node_modules/is-inside-container/index.js
|
|
5046
|
+
// node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js
|
|
5047
5047
|
var cachedResult;
|
|
5048
5048
|
var hasContainerEnv = () => {
|
|
5049
5049
|
try {
|
|
@@ -5060,7 +5060,7 @@ function isInsideContainer() {
|
|
|
5060
5060
|
return cachedResult;
|
|
5061
5061
|
}
|
|
5062
5062
|
|
|
5063
|
-
// node_modules/.pnpm/node_modules/is-wsl/index.js
|
|
5063
|
+
// node_modules/.pnpm/is-wsl@3.1.1/node_modules/is-wsl/index.js
|
|
5064
5064
|
var isWsl = () => {
|
|
5065
5065
|
if (process2.platform !== "linux") {
|
|
5066
5066
|
return false;
|
|
@@ -5084,7 +5084,7 @@ var isWsl = () => {
|
|
|
5084
5084
|
};
|
|
5085
5085
|
var is_wsl_default = process2.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
5086
5086
|
|
|
5087
|
-
// node_modules/.pnpm/
|
|
5087
|
+
// node_modules/.pnpm/wsl-utils@0.1.0/node_modules/wsl-utils/index.js
|
|
5088
5088
|
var wslDrivesMountPoint = /* @__PURE__ */ (() => {
|
|
5089
5089
|
const defaultMountPoint = "/mnt/";
|
|
5090
5090
|
let mountPoint;
|
|
@@ -5123,7 +5123,7 @@ var powerShellPath = async () => {
|
|
|
5123
5123
|
return `${process3.env.SYSTEMROOT || process3.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
5124
5124
|
};
|
|
5125
5125
|
|
|
5126
|
-
// node_modules/.pnpm/
|
|
5126
|
+
// node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js
|
|
5127
5127
|
function defineLazyProperty(object, propertyName, valueGetter) {
|
|
5128
5128
|
const define = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true });
|
|
5129
5129
|
Object.defineProperty(object, propertyName, {
|
|
@@ -5141,12 +5141,12 @@ function defineLazyProperty(object, propertyName, valueGetter) {
|
|
|
5141
5141
|
return object;
|
|
5142
5142
|
}
|
|
5143
5143
|
|
|
5144
|
-
// node_modules/.pnpm/
|
|
5144
|
+
// node_modules/.pnpm/default-browser@5.5.0/node_modules/default-browser/index.js
|
|
5145
5145
|
import { promisify as promisify4 } from "node:util";
|
|
5146
5146
|
import process6 from "node:process";
|
|
5147
5147
|
import { execFile as execFile4 } from "node:child_process";
|
|
5148
5148
|
|
|
5149
|
-
// node_modules/.pnpm/node_modules/default-browser-id/index.js
|
|
5149
|
+
// node_modules/.pnpm/default-browser-id@5.0.1/node_modules/default-browser-id/index.js
|
|
5150
5150
|
import { promisify } from "node:util";
|
|
5151
5151
|
import process4 from "node:process";
|
|
5152
5152
|
import { execFile } from "node:child_process";
|
|
@@ -5164,7 +5164,7 @@ async function defaultBrowserId() {
|
|
|
5164
5164
|
return browserId;
|
|
5165
5165
|
}
|
|
5166
5166
|
|
|
5167
|
-
// node_modules/.pnpm/node_modules/run-applescript/index.js
|
|
5167
|
+
// node_modules/.pnpm/run-applescript@7.1.0/node_modules/run-applescript/index.js
|
|
5168
5168
|
import process5 from "node:process";
|
|
5169
5169
|
import { promisify as promisify2 } from "node:util";
|
|
5170
5170
|
import { execFile as execFile2, execFileSync } from "node:child_process";
|
|
@@ -5182,13 +5182,13 @@ async function runAppleScript(script, { humanReadableOutput = true, signal } = {
|
|
|
5182
5182
|
return stdout.trim();
|
|
5183
5183
|
}
|
|
5184
5184
|
|
|
5185
|
-
// node_modules/.pnpm/node_modules/bundle-name/index.js
|
|
5185
|
+
// node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js
|
|
5186
5186
|
async function bundleName(bundleId) {
|
|
5187
5187
|
return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
|
|
5188
5188
|
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
|
|
5189
5189
|
}
|
|
5190
5190
|
|
|
5191
|
-
// node_modules/.pnpm/
|
|
5191
|
+
// node_modules/.pnpm/default-browser@5.5.0/node_modules/default-browser/windows.js
|
|
5192
5192
|
import { promisify as promisify3 } from "node:util";
|
|
5193
5193
|
import { execFile as execFile3 } from "node:child_process";
|
|
5194
5194
|
var execFileAsync3 = promisify3(execFile3);
|
|
@@ -5233,7 +5233,7 @@ async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
|
5233
5233
|
return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
|
|
5234
5234
|
}
|
|
5235
5235
|
|
|
5236
|
-
// node_modules/.pnpm/
|
|
5236
|
+
// node_modules/.pnpm/default-browser@5.5.0/node_modules/default-browser/index.js
|
|
5237
5237
|
var execFileAsync4 = promisify4(execFile4);
|
|
5238
5238
|
var titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
|
|
5239
5239
|
async function defaultBrowser2() {
|
|
@@ -5254,24 +5254,6 @@ async function defaultBrowser2() {
|
|
|
5254
5254
|
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
5255
5255
|
}
|
|
5256
5256
|
|
|
5257
|
-
// node_modules/.pnpm/open@10.2.0/node_modules/is-inside-container/index.js
|
|
5258
|
-
import fs5 from "node:fs";
|
|
5259
|
-
var cachedResult2;
|
|
5260
|
-
var hasContainerEnv2 = () => {
|
|
5261
|
-
try {
|
|
5262
|
-
fs5.statSync("/run/.containerenv");
|
|
5263
|
-
return true;
|
|
5264
|
-
} catch {
|
|
5265
|
-
return false;
|
|
5266
|
-
}
|
|
5267
|
-
};
|
|
5268
|
-
function isInsideContainer2() {
|
|
5269
|
-
if (cachedResult2 === void 0) {
|
|
5270
|
-
cachedResult2 = hasContainerEnv2() || isDocker();
|
|
5271
|
-
}
|
|
5272
|
-
return cachedResult2;
|
|
5273
|
-
}
|
|
5274
|
-
|
|
5275
5257
|
// node_modules/.pnpm/open@10.2.0/node_modules/open/index.js
|
|
5276
5258
|
var execFile5 = promisify5(childProcess.execFile);
|
|
5277
5259
|
var __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
@@ -5389,7 +5371,7 @@ var baseOpen = async (options) => {
|
|
|
5389
5371
|
if (app) {
|
|
5390
5372
|
cliArguments.push("-a", app);
|
|
5391
5373
|
}
|
|
5392
|
-
} else if (platform === "win32" || is_wsl_default && !
|
|
5374
|
+
} else if (platform === "win32" || is_wsl_default && !isInsideContainer() && !app) {
|
|
5393
5375
|
command = await powerShellPath();
|
|
5394
5376
|
cliArguments.push(
|
|
5395
5377
|
"-NoProfile",
|
|
@@ -5425,7 +5407,7 @@ var baseOpen = async (options) => {
|
|
|
5425
5407
|
const isBundled = !__dirname || __dirname === "/";
|
|
5426
5408
|
let exeLocalXdgOpen = false;
|
|
5427
5409
|
try {
|
|
5428
|
-
await
|
|
5410
|
+
await fs5.access(localXdgOpenPath, fsConstants2.X_OK);
|
|
5429
5411
|
exeLocalXdgOpen = true;
|
|
5430
5412
|
} catch {
|
|
5431
5413
|
}
|
|
@@ -5448,14 +5430,14 @@ var baseOpen = async (options) => {
|
|
|
5448
5430
|
}
|
|
5449
5431
|
const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
|
|
5450
5432
|
if (options.wait) {
|
|
5451
|
-
return new Promise((
|
|
5433
|
+
return new Promise((resolve2, reject) => {
|
|
5452
5434
|
subprocess.once("error", reject);
|
|
5453
5435
|
subprocess.once("close", (exitCode) => {
|
|
5454
5436
|
if (!options.allowNonzeroExitCode && exitCode > 0) {
|
|
5455
5437
|
reject(new Error(`Exited with code ${exitCode}`));
|
|
5456
5438
|
return;
|
|
5457
5439
|
}
|
|
5458
|
-
|
|
5440
|
+
resolve2(subprocess);
|
|
5459
5441
|
});
|
|
5460
5442
|
});
|
|
5461
5443
|
}
|
|
@@ -5530,9 +5512,9 @@ defineLazyProperty(apps, "browserPrivate", () => "browserPrivate");
|
|
|
5530
5512
|
var open_default = open;
|
|
5531
5513
|
|
|
5532
5514
|
// node_modules/.pnpm/ora@8.2.0/node_modules/ora/index.js
|
|
5533
|
-
import
|
|
5515
|
+
import process15 from "node:process";
|
|
5534
5516
|
|
|
5535
|
-
// node_modules/.pnpm/
|
|
5517
|
+
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
5536
5518
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
5537
5519
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
5538
5520
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -5718,7 +5700,7 @@ function assembleStyles() {
|
|
|
5718
5700
|
var ansiStyles = assembleStyles();
|
|
5719
5701
|
var ansi_styles_default = ansiStyles;
|
|
5720
5702
|
|
|
5721
|
-
// node_modules/.pnpm/
|
|
5703
|
+
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
5722
5704
|
import process8 from "node:process";
|
|
5723
5705
|
import os2 from "node:os";
|
|
5724
5706
|
import tty from "node:tty";
|
|
@@ -5850,7 +5832,7 @@ var supportsColor = {
|
|
|
5850
5832
|
};
|
|
5851
5833
|
var supports_color_default = supportsColor;
|
|
5852
5834
|
|
|
5853
|
-
// node_modules/.pnpm/
|
|
5835
|
+
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
|
|
5854
5836
|
function stringReplaceAll(string, substring, replacer) {
|
|
5855
5837
|
let index = string.indexOf(substring);
|
|
5856
5838
|
if (index === -1) {
|
|
@@ -5880,7 +5862,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
5880
5862
|
return returnValue;
|
|
5881
5863
|
}
|
|
5882
5864
|
|
|
5883
|
-
// node_modules/.pnpm/
|
|
5865
|
+
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
|
|
5884
5866
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
5885
5867
|
var GENERATOR = Symbol("GENERATOR");
|
|
5886
5868
|
var STYLER = Symbol("STYLER");
|
|
@@ -5900,10 +5882,10 @@ var applyOptions = (object, options = {}) => {
|
|
|
5900
5882
|
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
5901
5883
|
};
|
|
5902
5884
|
var chalkFactory = (options) => {
|
|
5903
|
-
const
|
|
5904
|
-
applyOptions(
|
|
5905
|
-
Object.setPrototypeOf(
|
|
5906
|
-
return
|
|
5885
|
+
const chalk2 = (...strings) => strings.join(" ");
|
|
5886
|
+
applyOptions(chalk2, options);
|
|
5887
|
+
Object.setPrototypeOf(chalk2, createChalk.prototype);
|
|
5888
|
+
return chalk2;
|
|
5907
5889
|
};
|
|
5908
5890
|
function createChalk(options) {
|
|
5909
5891
|
return chalkFactory(options);
|
|
@@ -6027,13 +6009,13 @@ var chalk = createChalk();
|
|
|
6027
6009
|
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
6028
6010
|
var source_default = chalk;
|
|
6029
6011
|
|
|
6030
|
-
// node_modules/.pnpm/
|
|
6012
|
+
// node_modules/.pnpm/cli-cursor@5.0.0/node_modules/cli-cursor/index.js
|
|
6031
6013
|
import process11 from "node:process";
|
|
6032
6014
|
|
|
6033
|
-
// node_modules/.pnpm/node_modules/restore-cursor/index.js
|
|
6015
|
+
// node_modules/.pnpm/restore-cursor@5.1.0/node_modules/restore-cursor/index.js
|
|
6034
6016
|
import process10 from "node:process";
|
|
6035
6017
|
|
|
6036
|
-
// node_modules/.pnpm/node_modules/mimic-function/index.js
|
|
6018
|
+
// node_modules/.pnpm/mimic-function@5.0.1/node_modules/mimic-function/index.js
|
|
6037
6019
|
var copyProperty = (to, from, property, ignoreNonConfigurable) => {
|
|
6038
6020
|
if (property === "length" || property === "prototype") {
|
|
6039
6021
|
return;
|
|
@@ -6079,7 +6061,7 @@ function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
|
|
|
6079
6061
|
return to;
|
|
6080
6062
|
}
|
|
6081
6063
|
|
|
6082
|
-
// node_modules/.pnpm/node_modules/onetime/index.js
|
|
6064
|
+
// node_modules/.pnpm/onetime@7.0.0/node_modules/onetime/index.js
|
|
6083
6065
|
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
6084
6066
|
var onetime = (function_, options = {}) => {
|
|
6085
6067
|
if (typeof function_ !== "function") {
|
|
@@ -6110,7 +6092,7 @@ onetime.callCount = (function_) => {
|
|
|
6110
6092
|
};
|
|
6111
6093
|
var onetime_default = onetime;
|
|
6112
6094
|
|
|
6113
|
-
// node_modules/.pnpm/node_modules/signal-exit/dist/mjs/signals.js
|
|
6095
|
+
// node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
6114
6096
|
var signals = [];
|
|
6115
6097
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
6116
6098
|
if (process.platform !== "win32") {
|
|
@@ -6134,7 +6116,7 @@ if (process.platform === "linux") {
|
|
|
6134
6116
|
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
6135
6117
|
}
|
|
6136
6118
|
|
|
6137
|
-
// node_modules/.pnpm/node_modules/signal-exit/dist/mjs/index.js
|
|
6119
|
+
// node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
6138
6120
|
var processOk = (process16) => !!process16 && typeof process16 === "object" && typeof process16.removeListener === "function" && typeof process16.emit === "function" && typeof process16.reallyExit === "function" && typeof process16.listeners === "function" && typeof process16.kill === "function" && typeof process16.pid === "number" && typeof process16.on === "function";
|
|
6139
6121
|
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
6140
6122
|
var global = globalThis;
|
|
@@ -6361,7 +6343,7 @@ var {
|
|
|
6361
6343
|
unload
|
|
6362
6344
|
} = signalExitWrap(processOk(process9) ? new SignalExit(process9) : new SignalExitFallback());
|
|
6363
6345
|
|
|
6364
|
-
// node_modules/.pnpm/node_modules/restore-cursor/index.js
|
|
6346
|
+
// node_modules/.pnpm/restore-cursor@5.1.0/node_modules/restore-cursor/index.js
|
|
6365
6347
|
var terminal = process10.stderr.isTTY ? process10.stderr : process10.stdout.isTTY ? process10.stdout : void 0;
|
|
6366
6348
|
var restoreCursor = terminal ? onetime_default(() => {
|
|
6367
6349
|
onExit(() => {
|
|
@@ -6371,7 +6353,7 @@ var restoreCursor = terminal ? onetime_default(() => {
|
|
|
6371
6353
|
};
|
|
6372
6354
|
var restore_cursor_default = restoreCursor;
|
|
6373
6355
|
|
|
6374
|
-
// node_modules/.pnpm/
|
|
6356
|
+
// node_modules/.pnpm/cli-cursor@5.0.0/node_modules/cli-cursor/index.js
|
|
6375
6357
|
var isHidden = false;
|
|
6376
6358
|
var cliCursor = {};
|
|
6377
6359
|
cliCursor.show = (writableStream = process11.stderr) => {
|
|
@@ -6404,18 +6386,16 @@ var cli_cursor_default = cliCursor;
|
|
|
6404
6386
|
// node_modules/.pnpm/ora@8.2.0/node_modules/ora/index.js
|
|
6405
6387
|
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
6406
6388
|
|
|
6407
|
-
// node_modules/.pnpm/
|
|
6389
|
+
// node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js
|
|
6408
6390
|
import process12 from "node:process";
|
|
6409
6391
|
function isUnicodeSupported() {
|
|
6410
|
-
const { env: env3 } = process12;
|
|
6411
|
-
const { TERM, TERM_PROGRAM } = env3;
|
|
6412
6392
|
if (process12.platform !== "win32") {
|
|
6413
|
-
return TERM !== "linux";
|
|
6393
|
+
return process12.env.TERM !== "linux";
|
|
6414
6394
|
}
|
|
6415
|
-
return Boolean(
|
|
6395
|
+
return Boolean(process12.env.CI) || Boolean(process12.env.WT_SESSION) || Boolean(process12.env.TERMINUS_SUBLIME) || process12.env.ConEmuTask === "{cmd::Cmder}" || process12.env.TERM_PROGRAM === "Terminus-Sublime" || process12.env.TERM_PROGRAM === "vscode" || process12.env.TERM === "xterm-256color" || process12.env.TERM === "alacritty" || process12.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
6416
6396
|
}
|
|
6417
6397
|
|
|
6418
|
-
// node_modules/.pnpm/
|
|
6398
|
+
// node_modules/.pnpm/log-symbols@6.0.0/node_modules/log-symbols/index.js
|
|
6419
6399
|
var main = {
|
|
6420
6400
|
info: source_default.blue("\u2139"),
|
|
6421
6401
|
success: source_default.green("\u2714"),
|
|
@@ -6431,7 +6411,7 @@ var fallback = {
|
|
|
6431
6411
|
var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
6432
6412
|
var log_symbols_default = logSymbols;
|
|
6433
6413
|
|
|
6434
|
-
// node_modules/.pnpm/node_modules/ansi-regex/index.js
|
|
6414
|
+
// node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
6435
6415
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
6436
6416
|
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
6437
6417
|
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
@@ -6440,7 +6420,7 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
6440
6420
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
6441
6421
|
}
|
|
6442
6422
|
|
|
6443
|
-
// node_modules/.pnpm/
|
|
6423
|
+
// node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
6444
6424
|
var regex = ansiRegex();
|
|
6445
6425
|
function stripAnsi(string) {
|
|
6446
6426
|
if (typeof string !== "string") {
|
|
@@ -6452,14 +6432,14 @@ function stripAnsi(string) {
|
|
|
6452
6432
|
return string.replace(regex, "");
|
|
6453
6433
|
}
|
|
6454
6434
|
|
|
6455
|
-
// node_modules/.pnpm/node_modules/get-east-asian-width/lookup-data.js
|
|
6435
|
+
// node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
|
|
6456
6436
|
var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
6457
6437
|
var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
6458
6438
|
var halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
|
|
6459
6439
|
var narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
|
|
6460
6440
|
var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
|
|
6461
6441
|
|
|
6462
|
-
// node_modules/.pnpm/node_modules/get-east-asian-width/utilities.js
|
|
6442
|
+
// node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js
|
|
6463
6443
|
var isInRange = (ranges, codePoint) => {
|
|
6464
6444
|
let low = 0;
|
|
6465
6445
|
let high = Math.floor(ranges.length / 2) - 1;
|
|
@@ -6477,7 +6457,7 @@ var isInRange = (ranges, codePoint) => {
|
|
|
6477
6457
|
return false;
|
|
6478
6458
|
};
|
|
6479
6459
|
|
|
6480
|
-
// node_modules/.pnpm/node_modules/get-east-asian-width/lookup.js
|
|
6460
|
+
// node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
|
|
6481
6461
|
var minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
6482
6462
|
var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
6483
6463
|
var minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
@@ -6528,7 +6508,7 @@ var isWide = (codePoint) => {
|
|
|
6528
6508
|
return isInRange(wideRanges, codePoint);
|
|
6529
6509
|
};
|
|
6530
6510
|
|
|
6531
|
-
// node_modules/.pnpm/node_modules/get-east-asian-width/index.js
|
|
6511
|
+
// node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
|
|
6532
6512
|
function validate(codePoint) {
|
|
6533
6513
|
if (!Number.isSafeInteger(codePoint)) {
|
|
6534
6514
|
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
@@ -6542,7 +6522,7 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
|
6542
6522
|
return 1;
|
|
6543
6523
|
}
|
|
6544
6524
|
|
|
6545
|
-
// node_modules/.pnpm/
|
|
6525
|
+
// node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
|
|
6546
6526
|
var import_emoji_regex = __toESM(require_emoji_regex(), 1);
|
|
6547
6527
|
var segmenter = new Intl.Segmenter();
|
|
6548
6528
|
var defaultIgnorableCodePointRegex = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
|
|
@@ -6591,15 +6571,26 @@ function stringWidth(string, options = {}) {
|
|
|
6591
6571
|
return width;
|
|
6592
6572
|
}
|
|
6593
6573
|
|
|
6594
|
-
// node_modules/.pnpm/
|
|
6574
|
+
// node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js
|
|
6595
6575
|
function isInteractive({ stream = process.stdout } = {}) {
|
|
6596
6576
|
return Boolean(
|
|
6597
6577
|
stream && stream.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env)
|
|
6598
6578
|
);
|
|
6599
6579
|
}
|
|
6600
6580
|
|
|
6601
|
-
// node_modules/.pnpm/
|
|
6581
|
+
// node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
6602
6582
|
import process13 from "node:process";
|
|
6583
|
+
function isUnicodeSupported2() {
|
|
6584
|
+
const { env: env2 } = process13;
|
|
6585
|
+
const { TERM, TERM_PROGRAM } = env2;
|
|
6586
|
+
if (process13.platform !== "win32") {
|
|
6587
|
+
return TERM !== "linux";
|
|
6588
|
+
}
|
|
6589
|
+
return Boolean(env2.WT_SESSION) || Boolean(env2.TERMINUS_SUBLIME) || env2.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env2.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
6590
|
+
}
|
|
6591
|
+
|
|
6592
|
+
// node_modules/.pnpm/stdin-discarder@0.2.2/node_modules/stdin-discarder/index.js
|
|
6593
|
+
import process14 from "node:process";
|
|
6603
6594
|
var ASCII_ETX_CODE = 3;
|
|
6604
6595
|
var StdinDiscarder = class {
|
|
6605
6596
|
#activeCount = 0;
|
|
@@ -6619,24 +6610,24 @@ var StdinDiscarder = class {
|
|
|
6619
6610
|
}
|
|
6620
6611
|
}
|
|
6621
6612
|
#realStart() {
|
|
6622
|
-
if (
|
|
6613
|
+
if (process14.platform === "win32" || !process14.stdin.isTTY) {
|
|
6623
6614
|
return;
|
|
6624
6615
|
}
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6616
|
+
process14.stdin.setRawMode(true);
|
|
6617
|
+
process14.stdin.on("data", this.#handleInput);
|
|
6618
|
+
process14.stdin.resume();
|
|
6628
6619
|
}
|
|
6629
6620
|
#realStop() {
|
|
6630
|
-
if (!
|
|
6621
|
+
if (!process14.stdin.isTTY) {
|
|
6631
6622
|
return;
|
|
6632
6623
|
}
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6624
|
+
process14.stdin.off("data", this.#handleInput);
|
|
6625
|
+
process14.stdin.pause();
|
|
6626
|
+
process14.stdin.setRawMode(false);
|
|
6636
6627
|
}
|
|
6637
6628
|
#handleInput(chunk) {
|
|
6638
6629
|
if (chunk[0] === ASCII_ETX_CODE) {
|
|
6639
|
-
|
|
6630
|
+
process14.emit("SIGINT");
|
|
6640
6631
|
}
|
|
6641
6632
|
}
|
|
6642
6633
|
};
|
|
@@ -6671,7 +6662,7 @@ var Ora = class {
|
|
|
6671
6662
|
}
|
|
6672
6663
|
this.#options = {
|
|
6673
6664
|
color: "cyan",
|
|
6674
|
-
stream:
|
|
6665
|
+
stream: process15.stderr,
|
|
6675
6666
|
discardStdin: true,
|
|
6676
6667
|
hideCursor: true,
|
|
6677
6668
|
...options
|
|
@@ -6686,7 +6677,7 @@ var Ora = class {
|
|
|
6686
6677
|
this.prefixText = this.#options.prefixText;
|
|
6687
6678
|
this.suffixText = this.#options.suffixText;
|
|
6688
6679
|
this.indent = this.#options.indent;
|
|
6689
|
-
if (
|
|
6680
|
+
if (process15.env.NODE_ENV === "test") {
|
|
6690
6681
|
this._stream = this.#stream;
|
|
6691
6682
|
this._isEnabled = this.#isEnabled;
|
|
6692
6683
|
Object.defineProperty(this, "_linesToClear", {
|
|
@@ -6733,7 +6724,7 @@ var Ora = class {
|
|
|
6733
6724
|
throw new Error("The given spinner must have a `frames` property");
|
|
6734
6725
|
}
|
|
6735
6726
|
this.#spinner = spinner;
|
|
6736
|
-
} else if (!
|
|
6727
|
+
} else if (!isUnicodeSupported2()) {
|
|
6737
6728
|
this.#spinner = import_cli_spinners.default.line;
|
|
6738
6729
|
} else if (spinner === void 0) {
|
|
6739
6730
|
this.#spinner = import_cli_spinners.default.dots;
|
|
@@ -6876,7 +6867,7 @@ var Ora = class {
|
|
|
6876
6867
|
if (this.#options.hideCursor) {
|
|
6877
6868
|
cli_cursor_default.hide(this.#stream);
|
|
6878
6869
|
}
|
|
6879
|
-
if (this.#options.discardStdin &&
|
|
6870
|
+
if (this.#options.discardStdin && process15.stdin.isTTY) {
|
|
6880
6871
|
this.#isDiscardingStdin = true;
|
|
6881
6872
|
stdin_discarder_default.start();
|
|
6882
6873
|
}
|
|
@@ -6895,7 +6886,7 @@ var Ora = class {
|
|
|
6895
6886
|
if (this.#options.hideCursor) {
|
|
6896
6887
|
cli_cursor_default.show(this.#stream);
|
|
6897
6888
|
}
|
|
6898
|
-
if (this.#options.discardStdin &&
|
|
6889
|
+
if (this.#options.discardStdin && process15.stdin.isTTY && this.#isDiscardingStdin) {
|
|
6899
6890
|
stdin_discarder_default.stop();
|
|
6900
6891
|
this.#isDiscardingStdin = false;
|
|
6901
6892
|
}
|
|
@@ -6935,501 +6926,6 @@ function ora(options) {
|
|
|
6935
6926
|
return new Ora(options);
|
|
6936
6927
|
}
|
|
6937
6928
|
|
|
6938
|
-
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
6939
|
-
var ANSI_BACKGROUND_OFFSET2 = 10;
|
|
6940
|
-
var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
6941
|
-
var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
6942
|
-
var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
6943
|
-
var styles3 = {
|
|
6944
|
-
modifier: {
|
|
6945
|
-
reset: [0, 0],
|
|
6946
|
-
// 21 isn't widely supported and 22 does the same thing
|
|
6947
|
-
bold: [1, 22],
|
|
6948
|
-
dim: [2, 22],
|
|
6949
|
-
italic: [3, 23],
|
|
6950
|
-
underline: [4, 24],
|
|
6951
|
-
overline: [53, 55],
|
|
6952
|
-
inverse: [7, 27],
|
|
6953
|
-
hidden: [8, 28],
|
|
6954
|
-
strikethrough: [9, 29]
|
|
6955
|
-
},
|
|
6956
|
-
color: {
|
|
6957
|
-
black: [30, 39],
|
|
6958
|
-
red: [31, 39],
|
|
6959
|
-
green: [32, 39],
|
|
6960
|
-
yellow: [33, 39],
|
|
6961
|
-
blue: [34, 39],
|
|
6962
|
-
magenta: [35, 39],
|
|
6963
|
-
cyan: [36, 39],
|
|
6964
|
-
white: [37, 39],
|
|
6965
|
-
// Bright color
|
|
6966
|
-
blackBright: [90, 39],
|
|
6967
|
-
gray: [90, 39],
|
|
6968
|
-
// Alias of `blackBright`
|
|
6969
|
-
grey: [90, 39],
|
|
6970
|
-
// Alias of `blackBright`
|
|
6971
|
-
redBright: [91, 39],
|
|
6972
|
-
greenBright: [92, 39],
|
|
6973
|
-
yellowBright: [93, 39],
|
|
6974
|
-
blueBright: [94, 39],
|
|
6975
|
-
magentaBright: [95, 39],
|
|
6976
|
-
cyanBright: [96, 39],
|
|
6977
|
-
whiteBright: [97, 39]
|
|
6978
|
-
},
|
|
6979
|
-
bgColor: {
|
|
6980
|
-
bgBlack: [40, 49],
|
|
6981
|
-
bgRed: [41, 49],
|
|
6982
|
-
bgGreen: [42, 49],
|
|
6983
|
-
bgYellow: [43, 49],
|
|
6984
|
-
bgBlue: [44, 49],
|
|
6985
|
-
bgMagenta: [45, 49],
|
|
6986
|
-
bgCyan: [46, 49],
|
|
6987
|
-
bgWhite: [47, 49],
|
|
6988
|
-
// Bright color
|
|
6989
|
-
bgBlackBright: [100, 49],
|
|
6990
|
-
bgGray: [100, 49],
|
|
6991
|
-
// Alias of `bgBlackBright`
|
|
6992
|
-
bgGrey: [100, 49],
|
|
6993
|
-
// Alias of `bgBlackBright`
|
|
6994
|
-
bgRedBright: [101, 49],
|
|
6995
|
-
bgGreenBright: [102, 49],
|
|
6996
|
-
bgYellowBright: [103, 49],
|
|
6997
|
-
bgBlueBright: [104, 49],
|
|
6998
|
-
bgMagentaBright: [105, 49],
|
|
6999
|
-
bgCyanBright: [106, 49],
|
|
7000
|
-
bgWhiteBright: [107, 49]
|
|
7001
|
-
}
|
|
7002
|
-
};
|
|
7003
|
-
var modifierNames2 = Object.keys(styles3.modifier);
|
|
7004
|
-
var foregroundColorNames2 = Object.keys(styles3.color);
|
|
7005
|
-
var backgroundColorNames2 = Object.keys(styles3.bgColor);
|
|
7006
|
-
var colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
|
|
7007
|
-
function assembleStyles2() {
|
|
7008
|
-
const codes = /* @__PURE__ */ new Map();
|
|
7009
|
-
for (const [groupName, group] of Object.entries(styles3)) {
|
|
7010
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
7011
|
-
styles3[styleName] = {
|
|
7012
|
-
open: `\x1B[${style[0]}m`,
|
|
7013
|
-
close: `\x1B[${style[1]}m`
|
|
7014
|
-
};
|
|
7015
|
-
group[styleName] = styles3[styleName];
|
|
7016
|
-
codes.set(style[0], style[1]);
|
|
7017
|
-
}
|
|
7018
|
-
Object.defineProperty(styles3, groupName, {
|
|
7019
|
-
value: group,
|
|
7020
|
-
enumerable: false
|
|
7021
|
-
});
|
|
7022
|
-
}
|
|
7023
|
-
Object.defineProperty(styles3, "codes", {
|
|
7024
|
-
value: codes,
|
|
7025
|
-
enumerable: false
|
|
7026
|
-
});
|
|
7027
|
-
styles3.color.close = "\x1B[39m";
|
|
7028
|
-
styles3.bgColor.close = "\x1B[49m";
|
|
7029
|
-
styles3.color.ansi = wrapAnsi162();
|
|
7030
|
-
styles3.color.ansi256 = wrapAnsi2562();
|
|
7031
|
-
styles3.color.ansi16m = wrapAnsi16m2();
|
|
7032
|
-
styles3.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
|
|
7033
|
-
styles3.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
|
|
7034
|
-
styles3.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
|
|
7035
|
-
Object.defineProperties(styles3, {
|
|
7036
|
-
rgbToAnsi256: {
|
|
7037
|
-
value(red, green, blue) {
|
|
7038
|
-
if (red === green && green === blue) {
|
|
7039
|
-
if (red < 8) {
|
|
7040
|
-
return 16;
|
|
7041
|
-
}
|
|
7042
|
-
if (red > 248) {
|
|
7043
|
-
return 231;
|
|
7044
|
-
}
|
|
7045
|
-
return Math.round((red - 8) / 247 * 24) + 232;
|
|
7046
|
-
}
|
|
7047
|
-
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
7048
|
-
},
|
|
7049
|
-
enumerable: false
|
|
7050
|
-
},
|
|
7051
|
-
hexToRgb: {
|
|
7052
|
-
value(hex) {
|
|
7053
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
7054
|
-
if (!matches) {
|
|
7055
|
-
return [0, 0, 0];
|
|
7056
|
-
}
|
|
7057
|
-
let [colorString] = matches;
|
|
7058
|
-
if (colorString.length === 3) {
|
|
7059
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
7060
|
-
}
|
|
7061
|
-
const integer = Number.parseInt(colorString, 16);
|
|
7062
|
-
return [
|
|
7063
|
-
/* eslint-disable no-bitwise */
|
|
7064
|
-
integer >> 16 & 255,
|
|
7065
|
-
integer >> 8 & 255,
|
|
7066
|
-
integer & 255
|
|
7067
|
-
/* eslint-enable no-bitwise */
|
|
7068
|
-
];
|
|
7069
|
-
},
|
|
7070
|
-
enumerable: false
|
|
7071
|
-
},
|
|
7072
|
-
hexToAnsi256: {
|
|
7073
|
-
value: (hex) => styles3.rgbToAnsi256(...styles3.hexToRgb(hex)),
|
|
7074
|
-
enumerable: false
|
|
7075
|
-
},
|
|
7076
|
-
ansi256ToAnsi: {
|
|
7077
|
-
value(code) {
|
|
7078
|
-
if (code < 8) {
|
|
7079
|
-
return 30 + code;
|
|
7080
|
-
}
|
|
7081
|
-
if (code < 16) {
|
|
7082
|
-
return 90 + (code - 8);
|
|
7083
|
-
}
|
|
7084
|
-
let red;
|
|
7085
|
-
let green;
|
|
7086
|
-
let blue;
|
|
7087
|
-
if (code >= 232) {
|
|
7088
|
-
red = ((code - 232) * 10 + 8) / 255;
|
|
7089
|
-
green = red;
|
|
7090
|
-
blue = red;
|
|
7091
|
-
} else {
|
|
7092
|
-
code -= 16;
|
|
7093
|
-
const remainder = code % 36;
|
|
7094
|
-
red = Math.floor(code / 36) / 5;
|
|
7095
|
-
green = Math.floor(remainder / 6) / 5;
|
|
7096
|
-
blue = remainder % 6 / 5;
|
|
7097
|
-
}
|
|
7098
|
-
const value = Math.max(red, green, blue) * 2;
|
|
7099
|
-
if (value === 0) {
|
|
7100
|
-
return 30;
|
|
7101
|
-
}
|
|
7102
|
-
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
7103
|
-
if (value === 2) {
|
|
7104
|
-
result += 60;
|
|
7105
|
-
}
|
|
7106
|
-
return result;
|
|
7107
|
-
},
|
|
7108
|
-
enumerable: false
|
|
7109
|
-
},
|
|
7110
|
-
rgbToAnsi: {
|
|
7111
|
-
value: (red, green, blue) => styles3.ansi256ToAnsi(styles3.rgbToAnsi256(red, green, blue)),
|
|
7112
|
-
enumerable: false
|
|
7113
|
-
},
|
|
7114
|
-
hexToAnsi: {
|
|
7115
|
-
value: (hex) => styles3.ansi256ToAnsi(styles3.hexToAnsi256(hex)),
|
|
7116
|
-
enumerable: false
|
|
7117
|
-
}
|
|
7118
|
-
});
|
|
7119
|
-
return styles3;
|
|
7120
|
-
}
|
|
7121
|
-
var ansiStyles2 = assembleStyles2();
|
|
7122
|
-
var ansi_styles_default2 = ansiStyles2;
|
|
7123
|
-
|
|
7124
|
-
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
7125
|
-
import process15 from "node:process";
|
|
7126
|
-
import os3 from "node:os";
|
|
7127
|
-
import tty2 from "node:tty";
|
|
7128
|
-
function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process15.argv) {
|
|
7129
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
7130
|
-
const position = argv.indexOf(prefix + flag);
|
|
7131
|
-
const terminatorPosition = argv.indexOf("--");
|
|
7132
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
7133
|
-
}
|
|
7134
|
-
var { env: env2 } = process15;
|
|
7135
|
-
var flagForceColor2;
|
|
7136
|
-
if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
|
|
7137
|
-
flagForceColor2 = 0;
|
|
7138
|
-
} else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
|
|
7139
|
-
flagForceColor2 = 1;
|
|
7140
|
-
}
|
|
7141
|
-
function envForceColor2() {
|
|
7142
|
-
if ("FORCE_COLOR" in env2) {
|
|
7143
|
-
if (env2.FORCE_COLOR === "true") {
|
|
7144
|
-
return 1;
|
|
7145
|
-
}
|
|
7146
|
-
if (env2.FORCE_COLOR === "false") {
|
|
7147
|
-
return 0;
|
|
7148
|
-
}
|
|
7149
|
-
return env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
|
|
7150
|
-
}
|
|
7151
|
-
}
|
|
7152
|
-
function translateLevel2(level) {
|
|
7153
|
-
if (level === 0) {
|
|
7154
|
-
return false;
|
|
7155
|
-
}
|
|
7156
|
-
return {
|
|
7157
|
-
level,
|
|
7158
|
-
hasBasic: true,
|
|
7159
|
-
has256: level >= 2,
|
|
7160
|
-
has16m: level >= 3
|
|
7161
|
-
};
|
|
7162
|
-
}
|
|
7163
|
-
function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
7164
|
-
const noFlagForceColor = envForceColor2();
|
|
7165
|
-
if (noFlagForceColor !== void 0) {
|
|
7166
|
-
flagForceColor2 = noFlagForceColor;
|
|
7167
|
-
}
|
|
7168
|
-
const forceColor = sniffFlags ? flagForceColor2 : noFlagForceColor;
|
|
7169
|
-
if (forceColor === 0) {
|
|
7170
|
-
return 0;
|
|
7171
|
-
}
|
|
7172
|
-
if (sniffFlags) {
|
|
7173
|
-
if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
|
|
7174
|
-
return 3;
|
|
7175
|
-
}
|
|
7176
|
-
if (hasFlag2("color=256")) {
|
|
7177
|
-
return 2;
|
|
7178
|
-
}
|
|
7179
|
-
}
|
|
7180
|
-
if ("TF_BUILD" in env2 && "AGENT_NAME" in env2) {
|
|
7181
|
-
return 1;
|
|
7182
|
-
}
|
|
7183
|
-
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
7184
|
-
return 0;
|
|
7185
|
-
}
|
|
7186
|
-
const min = forceColor || 0;
|
|
7187
|
-
if (env2.TERM === "dumb") {
|
|
7188
|
-
return min;
|
|
7189
|
-
}
|
|
7190
|
-
if (process15.platform === "win32") {
|
|
7191
|
-
const osRelease = os3.release().split(".");
|
|
7192
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
7193
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
7194
|
-
}
|
|
7195
|
-
return 1;
|
|
7196
|
-
}
|
|
7197
|
-
if ("CI" in env2) {
|
|
7198
|
-
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env2)) {
|
|
7199
|
-
return 3;
|
|
7200
|
-
}
|
|
7201
|
-
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
|
|
7202
|
-
return 1;
|
|
7203
|
-
}
|
|
7204
|
-
return min;
|
|
7205
|
-
}
|
|
7206
|
-
if ("TEAMCITY_VERSION" in env2) {
|
|
7207
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
|
|
7208
|
-
}
|
|
7209
|
-
if (env2.COLORTERM === "truecolor") {
|
|
7210
|
-
return 3;
|
|
7211
|
-
}
|
|
7212
|
-
if (env2.TERM === "xterm-kitty") {
|
|
7213
|
-
return 3;
|
|
7214
|
-
}
|
|
7215
|
-
if (env2.TERM === "xterm-ghostty") {
|
|
7216
|
-
return 3;
|
|
7217
|
-
}
|
|
7218
|
-
if (env2.TERM === "wezterm") {
|
|
7219
|
-
return 3;
|
|
7220
|
-
}
|
|
7221
|
-
if ("TERM_PROGRAM" in env2) {
|
|
7222
|
-
const version = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
7223
|
-
switch (env2.TERM_PROGRAM) {
|
|
7224
|
-
case "iTerm.app": {
|
|
7225
|
-
return version >= 3 ? 3 : 2;
|
|
7226
|
-
}
|
|
7227
|
-
case "Apple_Terminal": {
|
|
7228
|
-
return 2;
|
|
7229
|
-
}
|
|
7230
|
-
}
|
|
7231
|
-
}
|
|
7232
|
-
if (/-256(color)?$/i.test(env2.TERM)) {
|
|
7233
|
-
return 2;
|
|
7234
|
-
}
|
|
7235
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
|
|
7236
|
-
return 1;
|
|
7237
|
-
}
|
|
7238
|
-
if ("COLORTERM" in env2) {
|
|
7239
|
-
return 1;
|
|
7240
|
-
}
|
|
7241
|
-
return min;
|
|
7242
|
-
}
|
|
7243
|
-
function createSupportsColor2(stream, options = {}) {
|
|
7244
|
-
const level = _supportsColor2(stream, {
|
|
7245
|
-
streamIsTTY: stream && stream.isTTY,
|
|
7246
|
-
...options
|
|
7247
|
-
});
|
|
7248
|
-
return translateLevel2(level);
|
|
7249
|
-
}
|
|
7250
|
-
var supportsColor2 = {
|
|
7251
|
-
stdout: createSupportsColor2({ isTTY: tty2.isatty(1) }),
|
|
7252
|
-
stderr: createSupportsColor2({ isTTY: tty2.isatty(2) })
|
|
7253
|
-
};
|
|
7254
|
-
var supports_color_default2 = supportsColor2;
|
|
7255
|
-
|
|
7256
|
-
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
|
|
7257
|
-
function stringReplaceAll2(string, substring, replacer) {
|
|
7258
|
-
let index = string.indexOf(substring);
|
|
7259
|
-
if (index === -1) {
|
|
7260
|
-
return string;
|
|
7261
|
-
}
|
|
7262
|
-
const substringLength = substring.length;
|
|
7263
|
-
let endIndex = 0;
|
|
7264
|
-
let returnValue = "";
|
|
7265
|
-
do {
|
|
7266
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
7267
|
-
endIndex = index + substringLength;
|
|
7268
|
-
index = string.indexOf(substring, endIndex);
|
|
7269
|
-
} while (index !== -1);
|
|
7270
|
-
returnValue += string.slice(endIndex);
|
|
7271
|
-
return returnValue;
|
|
7272
|
-
}
|
|
7273
|
-
function stringEncaseCRLFWithFirstIndex2(string, prefix, postfix, index) {
|
|
7274
|
-
let endIndex = 0;
|
|
7275
|
-
let returnValue = "";
|
|
7276
|
-
do {
|
|
7277
|
-
const gotCR = string[index - 1] === "\r";
|
|
7278
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
7279
|
-
endIndex = index + 1;
|
|
7280
|
-
index = string.indexOf("\n", endIndex);
|
|
7281
|
-
} while (index !== -1);
|
|
7282
|
-
returnValue += string.slice(endIndex);
|
|
7283
|
-
return returnValue;
|
|
7284
|
-
}
|
|
7285
|
-
|
|
7286
|
-
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
|
|
7287
|
-
var { stdout: stdoutColor2, stderr: stderrColor2 } = supports_color_default2;
|
|
7288
|
-
var GENERATOR2 = Symbol("GENERATOR");
|
|
7289
|
-
var STYLER2 = Symbol("STYLER");
|
|
7290
|
-
var IS_EMPTY2 = Symbol("IS_EMPTY");
|
|
7291
|
-
var levelMapping2 = [
|
|
7292
|
-
"ansi",
|
|
7293
|
-
"ansi",
|
|
7294
|
-
"ansi256",
|
|
7295
|
-
"ansi16m"
|
|
7296
|
-
];
|
|
7297
|
-
var styles4 = /* @__PURE__ */ Object.create(null);
|
|
7298
|
-
var applyOptions2 = (object, options = {}) => {
|
|
7299
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
7300
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
7301
|
-
}
|
|
7302
|
-
const colorLevel = stdoutColor2 ? stdoutColor2.level : 0;
|
|
7303
|
-
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
7304
|
-
};
|
|
7305
|
-
var chalkFactory2 = (options) => {
|
|
7306
|
-
const chalk3 = (...strings) => strings.join(" ");
|
|
7307
|
-
applyOptions2(chalk3, options);
|
|
7308
|
-
Object.setPrototypeOf(chalk3, createChalk2.prototype);
|
|
7309
|
-
return chalk3;
|
|
7310
|
-
};
|
|
7311
|
-
function createChalk2(options) {
|
|
7312
|
-
return chalkFactory2(options);
|
|
7313
|
-
}
|
|
7314
|
-
Object.setPrototypeOf(createChalk2.prototype, Function.prototype);
|
|
7315
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default2)) {
|
|
7316
|
-
styles4[styleName] = {
|
|
7317
|
-
get() {
|
|
7318
|
-
const builder = createBuilder2(this, createStyler2(style.open, style.close, this[STYLER2]), this[IS_EMPTY2]);
|
|
7319
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
7320
|
-
return builder;
|
|
7321
|
-
}
|
|
7322
|
-
};
|
|
7323
|
-
}
|
|
7324
|
-
styles4.visible = {
|
|
7325
|
-
get() {
|
|
7326
|
-
const builder = createBuilder2(this, this[STYLER2], true);
|
|
7327
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
7328
|
-
return builder;
|
|
7329
|
-
}
|
|
7330
|
-
};
|
|
7331
|
-
var getModelAnsi2 = (model, level, type, ...arguments_) => {
|
|
7332
|
-
if (model === "rgb") {
|
|
7333
|
-
if (level === "ansi16m") {
|
|
7334
|
-
return ansi_styles_default2[type].ansi16m(...arguments_);
|
|
7335
|
-
}
|
|
7336
|
-
if (level === "ansi256") {
|
|
7337
|
-
return ansi_styles_default2[type].ansi256(ansi_styles_default2.rgbToAnsi256(...arguments_));
|
|
7338
|
-
}
|
|
7339
|
-
return ansi_styles_default2[type].ansi(ansi_styles_default2.rgbToAnsi(...arguments_));
|
|
7340
|
-
}
|
|
7341
|
-
if (model === "hex") {
|
|
7342
|
-
return getModelAnsi2("rgb", level, type, ...ansi_styles_default2.hexToRgb(...arguments_));
|
|
7343
|
-
}
|
|
7344
|
-
return ansi_styles_default2[type][model](...arguments_);
|
|
7345
|
-
};
|
|
7346
|
-
var usedModels2 = ["rgb", "hex", "ansi256"];
|
|
7347
|
-
for (const model of usedModels2) {
|
|
7348
|
-
styles4[model] = {
|
|
7349
|
-
get() {
|
|
7350
|
-
const { level } = this;
|
|
7351
|
-
return function(...arguments_) {
|
|
7352
|
-
const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "color", ...arguments_), ansi_styles_default2.color.close, this[STYLER2]);
|
|
7353
|
-
return createBuilder2(this, styler, this[IS_EMPTY2]);
|
|
7354
|
-
};
|
|
7355
|
-
}
|
|
7356
|
-
};
|
|
7357
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
7358
|
-
styles4[bgModel] = {
|
|
7359
|
-
get() {
|
|
7360
|
-
const { level } = this;
|
|
7361
|
-
return function(...arguments_) {
|
|
7362
|
-
const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "bgColor", ...arguments_), ansi_styles_default2.bgColor.close, this[STYLER2]);
|
|
7363
|
-
return createBuilder2(this, styler, this[IS_EMPTY2]);
|
|
7364
|
-
};
|
|
7365
|
-
}
|
|
7366
|
-
};
|
|
7367
|
-
}
|
|
7368
|
-
var proto2 = Object.defineProperties(() => {
|
|
7369
|
-
}, {
|
|
7370
|
-
...styles4,
|
|
7371
|
-
level: {
|
|
7372
|
-
enumerable: true,
|
|
7373
|
-
get() {
|
|
7374
|
-
return this[GENERATOR2].level;
|
|
7375
|
-
},
|
|
7376
|
-
set(level) {
|
|
7377
|
-
this[GENERATOR2].level = level;
|
|
7378
|
-
}
|
|
7379
|
-
}
|
|
7380
|
-
});
|
|
7381
|
-
var createStyler2 = (open2, close, parent) => {
|
|
7382
|
-
let openAll;
|
|
7383
|
-
let closeAll;
|
|
7384
|
-
if (parent === void 0) {
|
|
7385
|
-
openAll = open2;
|
|
7386
|
-
closeAll = close;
|
|
7387
|
-
} else {
|
|
7388
|
-
openAll = parent.openAll + open2;
|
|
7389
|
-
closeAll = close + parent.closeAll;
|
|
7390
|
-
}
|
|
7391
|
-
return {
|
|
7392
|
-
open: open2,
|
|
7393
|
-
close,
|
|
7394
|
-
openAll,
|
|
7395
|
-
closeAll,
|
|
7396
|
-
parent
|
|
7397
|
-
};
|
|
7398
|
-
};
|
|
7399
|
-
var createBuilder2 = (self, _styler, _isEmpty) => {
|
|
7400
|
-
const builder = (...arguments_) => applyStyle2(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
7401
|
-
Object.setPrototypeOf(builder, proto2);
|
|
7402
|
-
builder[GENERATOR2] = self;
|
|
7403
|
-
builder[STYLER2] = _styler;
|
|
7404
|
-
builder[IS_EMPTY2] = _isEmpty;
|
|
7405
|
-
return builder;
|
|
7406
|
-
};
|
|
7407
|
-
var applyStyle2 = (self, string) => {
|
|
7408
|
-
if (self.level <= 0 || !string) {
|
|
7409
|
-
return self[IS_EMPTY2] ? "" : string;
|
|
7410
|
-
}
|
|
7411
|
-
let styler = self[STYLER2];
|
|
7412
|
-
if (styler === void 0) {
|
|
7413
|
-
return string;
|
|
7414
|
-
}
|
|
7415
|
-
const { openAll, closeAll } = styler;
|
|
7416
|
-
if (string.includes("\x1B")) {
|
|
7417
|
-
while (styler !== void 0) {
|
|
7418
|
-
string = stringReplaceAll2(string, styler.close, styler.open);
|
|
7419
|
-
styler = styler.parent;
|
|
7420
|
-
}
|
|
7421
|
-
}
|
|
7422
|
-
const lfIndex = string.indexOf("\n");
|
|
7423
|
-
if (lfIndex !== -1) {
|
|
7424
|
-
string = stringEncaseCRLFWithFirstIndex2(string, closeAll, openAll, lfIndex);
|
|
7425
|
-
}
|
|
7426
|
-
return openAll + string + closeAll;
|
|
7427
|
-
};
|
|
7428
|
-
Object.defineProperties(createChalk2.prototype, styles4);
|
|
7429
|
-
var chalk2 = createChalk2();
|
|
7430
|
-
var chalkStderr2 = createChalk2({ level: stderrColor2 ? stderrColor2.level : 0 });
|
|
7431
|
-
var source_default2 = chalk2;
|
|
7432
|
-
|
|
7433
6929
|
// src/lib/config.ts
|
|
7434
6930
|
import { existsSync, mkdirSync, readFileSync, writeFileSync, unlinkSync } from "node:fs";
|
|
7435
6931
|
import { homedir } from "node:os";
|
|
@@ -7512,10 +7008,10 @@ async function loginCommand() {
|
|
|
7512
7008
|
}
|
|
7513
7009
|
const deviceCode = await res.json();
|
|
7514
7010
|
spinner.stop();
|
|
7515
|
-
console.log(
|
|
7011
|
+
console.log(source_default.bold("\n Your code: ") + source_default.cyan.bold(deviceCode.user_code));
|
|
7516
7012
|
console.log(`
|
|
7517
|
-
Opening ${
|
|
7518
|
-
console.log(
|
|
7013
|
+
Opening ${source_default.underline(deviceCode.verification_uri)}`);
|
|
7014
|
+
console.log(source_default.dim(" If browser doesn't open, visit the URL above.\n"));
|
|
7519
7015
|
try {
|
|
7520
7016
|
await open_default(deviceCode.verification_uri);
|
|
7521
7017
|
} catch {
|
|
@@ -7545,7 +7041,7 @@ async function loginCommand() {
|
|
|
7545
7041
|
api_url: getApiUrl(),
|
|
7546
7042
|
email: token.email
|
|
7547
7043
|
});
|
|
7548
|
-
pollSpinner.succeed(
|
|
7044
|
+
pollSpinner.succeed(source_default.green(`Logged in as ${source_default.bold(token.email)}`));
|
|
7549
7045
|
return;
|
|
7550
7046
|
}
|
|
7551
7047
|
pollSpinner.fail("Unexpected error during login");
|
|
@@ -7555,7 +7051,7 @@ async function loginCommand() {
|
|
|
7555
7051
|
process.exit(1);
|
|
7556
7052
|
}
|
|
7557
7053
|
function sleep(ms) {
|
|
7558
|
-
return new Promise((
|
|
7054
|
+
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
7559
7055
|
}
|
|
7560
7056
|
|
|
7561
7057
|
// src/lib/display.ts
|
|
@@ -7566,15 +7062,15 @@ function printVisibility(domain, data) {
|
|
|
7566
7062
|
const sentiment = dashboard.avgSentiment?.value ?? 0;
|
|
7567
7063
|
const mentions = dashboard.mentionCount?.value ?? 0;
|
|
7568
7064
|
console.log();
|
|
7569
|
-
console.log(
|
|
7570
|
-
console.log(
|
|
7571
|
-
console.log(` ${
|
|
7572
|
-
console.log(` ${
|
|
7573
|
-
console.log(` ${
|
|
7574
|
-
console.log(` ${
|
|
7065
|
+
console.log(source_default.bold(` AI Visibility \u2014 ${domain}`));
|
|
7066
|
+
console.log(source_default.dim(` ${"\u2500".repeat(40)}`));
|
|
7067
|
+
console.log(` ${source_default.bold("Score")} ${scoreColor(score)(source_default.bold(String(Math.round(score))))} / 100`);
|
|
7068
|
+
console.log(` ${source_default.bold("Share of Voice")} ${source_default.white(Math.round(sov * 100) + "%")}`);
|
|
7069
|
+
console.log(` ${source_default.bold("Mentions")} ${source_default.white(String(mentions))}`);
|
|
7070
|
+
console.log(` ${source_default.bold("Sentiment")} ${sentimentLabel(sentiment)}`);
|
|
7575
7071
|
if (dashboard.engineVisibility?.length) {
|
|
7576
7072
|
console.log();
|
|
7577
|
-
console.log(
|
|
7073
|
+
console.log(source_default.bold(" Engine Breakdown"));
|
|
7578
7074
|
for (const eng of dashboard.engineVisibility) {
|
|
7579
7075
|
const barLen = Math.round((eng.score ?? 0) / 10);
|
|
7580
7076
|
const bar = "\u2588".repeat(barLen);
|
|
@@ -7584,15 +7080,15 @@ function printVisibility(domain, data) {
|
|
|
7584
7080
|
}
|
|
7585
7081
|
if (competitors?.length) {
|
|
7586
7082
|
console.log();
|
|
7587
|
-
console.log(
|
|
7083
|
+
console.log(source_default.bold(" Competitors"));
|
|
7588
7084
|
for (const comp of competitors) {
|
|
7589
|
-
const marker = comp.isPrimary ?
|
|
7085
|
+
const marker = comp.isPrimary ? source_default.cyan(" \u2190 you") : "";
|
|
7590
7086
|
console.log(` ${comp.name.padEnd(20)} ${Math.round(comp.sov * 100)}% SoV${marker}`);
|
|
7591
7087
|
}
|
|
7592
7088
|
}
|
|
7593
7089
|
if (citations?.length) {
|
|
7594
7090
|
console.log();
|
|
7595
|
-
console.log(
|
|
7091
|
+
console.log(source_default.bold(" Citations"));
|
|
7596
7092
|
for (const cit of citations.slice(0, 5)) {
|
|
7597
7093
|
console.log(` ${cit.url.padEnd(35)} ${cit.count}x`);
|
|
7598
7094
|
}
|
|
@@ -7600,22 +7096,22 @@ function printVisibility(domain, data) {
|
|
|
7600
7096
|
console.log();
|
|
7601
7097
|
}
|
|
7602
7098
|
function scoreColor(score) {
|
|
7603
|
-
if (score >= 85) return
|
|
7604
|
-
if (score >= 70) return
|
|
7605
|
-
if (score >= 50) return
|
|
7606
|
-
if (score >= 30) return
|
|
7607
|
-
return
|
|
7099
|
+
if (score >= 85) return source_default.green;
|
|
7100
|
+
if (score >= 70) return source_default.greenBright;
|
|
7101
|
+
if (score >= 50) return source_default.yellow;
|
|
7102
|
+
if (score >= 30) return source_default.hex("#FF8800");
|
|
7103
|
+
return source_default.red;
|
|
7608
7104
|
}
|
|
7609
7105
|
function sentimentLabel(score) {
|
|
7610
|
-
if (score > 0.3) return
|
|
7611
|
-
if (score > -0.3) return
|
|
7612
|
-
return
|
|
7106
|
+
if (score > 0.3) return source_default.green("Positive");
|
|
7107
|
+
if (score > -0.3) return source_default.yellow("Neutral");
|
|
7108
|
+
return source_default.red("Negative");
|
|
7613
7109
|
}
|
|
7614
7110
|
|
|
7615
7111
|
// src/commands/check.ts
|
|
7616
7112
|
var STEPS = ["Setting up workspace", "Generating prompts", "Querying AI engines", "Analyzing responses"];
|
|
7617
7113
|
async function checkCommand(domain, opts) {
|
|
7618
|
-
let spinner = ora(`Checking AI visibility for ${
|
|
7114
|
+
let spinner = ora(`Checking AI visibility for ${source_default.bold(domain)}...`).start();
|
|
7619
7115
|
let res;
|
|
7620
7116
|
try {
|
|
7621
7117
|
res = await apiRequest("POST", "/api/cli/check", { domain });
|
|
@@ -7637,7 +7133,7 @@ async function checkCommand(domain, opts) {
|
|
|
7637
7133
|
console.log(JSON.stringify(result, null, 2));
|
|
7638
7134
|
} else {
|
|
7639
7135
|
printVisibility(domain, result.data);
|
|
7640
|
-
console.log(
|
|
7136
|
+
console.log(source_default.dim(` Dashboard: https://dashboard.anymorph.ai/w/${result.workspaceId}/overview
|
|
7641
7137
|
`));
|
|
7642
7138
|
}
|
|
7643
7139
|
return;
|
|
@@ -7660,7 +7156,7 @@ async function checkCommand(domain, opts) {
|
|
|
7660
7156
|
console.log(JSON.stringify(status, null, 2));
|
|
7661
7157
|
} else {
|
|
7662
7158
|
printVisibility(domain, status.data);
|
|
7663
|
-
console.log(
|
|
7159
|
+
console.log(source_default.dim(` Dashboard: https://dashboard.anymorph.ai/w/${status.workspaceId}/overview
|
|
7664
7160
|
`));
|
|
7665
7161
|
}
|
|
7666
7162
|
return;
|
|
@@ -7685,25 +7181,25 @@ async function checkCommand(domain, opts) {
|
|
|
7685
7181
|
process.exit(1);
|
|
7686
7182
|
}
|
|
7687
7183
|
function sleep2(ms) {
|
|
7688
|
-
return new Promise((
|
|
7184
|
+
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
7689
7185
|
}
|
|
7690
7186
|
|
|
7691
7187
|
// src/commands/status.ts
|
|
7692
7188
|
async function statusCommand() {
|
|
7693
7189
|
const creds = readCredentials();
|
|
7694
7190
|
if (!creds) {
|
|
7695
|
-
console.log(
|
|
7191
|
+
console.log(source_default.yellow("\n Not logged in. Run `anymorph login` to get started.\n"));
|
|
7696
7192
|
return;
|
|
7697
7193
|
}
|
|
7698
7194
|
console.log(`
|
|
7699
|
-
${
|
|
7700
|
-
console.log(` ${
|
|
7195
|
+
${source_default.bold("Email:")} ${creds.email}`);
|
|
7196
|
+
console.log(` ${source_default.bold("API:")} ${creds.api_url}`);
|
|
7701
7197
|
const expiresIn = creds.expires_at - Math.floor(Date.now() / 1e3);
|
|
7702
7198
|
if (expiresIn > 0) {
|
|
7703
7199
|
const hours = Math.floor(expiresIn / 3600);
|
|
7704
|
-
console.log(` ${
|
|
7200
|
+
console.log(` ${source_default.bold("Token:")} valid (${hours}h remaining)`);
|
|
7705
7201
|
} else {
|
|
7706
|
-
console.log(` ${
|
|
7202
|
+
console.log(` ${source_default.bold("Token:")} ${source_default.yellow("expired (will auto-refresh)")}`);
|
|
7707
7203
|
}
|
|
7708
7204
|
try {
|
|
7709
7205
|
const res = await apiRequest("GET", "/api/cli/status");
|
|
@@ -7711,9 +7207,9 @@ async function statusCommand() {
|
|
|
7711
7207
|
const data = await res.json();
|
|
7712
7208
|
if (data.workspaces?.length) {
|
|
7713
7209
|
console.log(`
|
|
7714
|
-
${
|
|
7210
|
+
${source_default.bold("Workspaces:")}`);
|
|
7715
7211
|
for (const ws of data.workspaces) {
|
|
7716
|
-
console.log(` ${ws.domain} ${
|
|
7212
|
+
console.log(` ${ws.domain} ${source_default.dim(`(${ws.name})`)}`);
|
|
7717
7213
|
}
|
|
7718
7214
|
}
|
|
7719
7215
|
}
|
|
@@ -7725,14 +7221,376 @@ async function statusCommand() {
|
|
|
7725
7221
|
// src/commands/logout.ts
|
|
7726
7222
|
function logoutCommand() {
|
|
7727
7223
|
clearCredentials();
|
|
7728
|
-
console.log(
|
|
7224
|
+
console.log(source_default.green("\n Logged out.\n"));
|
|
7225
|
+
}
|
|
7226
|
+
|
|
7227
|
+
// src/commands/workspaces.ts
|
|
7228
|
+
async function workspacesCommand(opts) {
|
|
7229
|
+
const res = await apiRequest("GET", "/api/cli/status");
|
|
7230
|
+
if (!res.ok) {
|
|
7231
|
+
console.error(source_default.red("Couldn't fetch workspaces. Run `anymorph login` first."));
|
|
7232
|
+
process.exit(1);
|
|
7233
|
+
}
|
|
7234
|
+
const data = await res.json();
|
|
7235
|
+
if (opts.json) {
|
|
7236
|
+
console.log(JSON.stringify(data.workspaces ?? [], null, 2));
|
|
7237
|
+
return;
|
|
7238
|
+
}
|
|
7239
|
+
console.log();
|
|
7240
|
+
console.log(source_default.bold(" Workspaces"));
|
|
7241
|
+
for (const workspace of data.workspaces ?? []) {
|
|
7242
|
+
console.log(` ${workspace.domain}`);
|
|
7243
|
+
console.log(source_default.dim(` id: ${workspace.id}`));
|
|
7244
|
+
console.log(source_default.dim(` name: ${workspace.name}`));
|
|
7245
|
+
}
|
|
7246
|
+
console.log();
|
|
7247
|
+
}
|
|
7248
|
+
|
|
7249
|
+
// src/geo/package-writer.ts
|
|
7250
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
7251
|
+
import { join as join2 } from "node:path";
|
|
7252
|
+
async function writeGeoRunPackage(input) {
|
|
7253
|
+
const runDir = join2(input.repoPath, "agent", "runs", input.package.runId);
|
|
7254
|
+
await mkdir(runDir, { recursive: true });
|
|
7255
|
+
await writeJson(join2(runDir, "manifest.json"), input.package.manifest);
|
|
7256
|
+
await writeJson(join2(runDir, "context.json"), {
|
|
7257
|
+
runId: input.package.runId,
|
|
7258
|
+
workspaceId: input.package.workspaceId,
|
|
7259
|
+
workspaceDomain: input.package.workspaceDomain,
|
|
7260
|
+
tenantRepo: input.package.tenantRepo,
|
|
7261
|
+
branch: input.package.branch,
|
|
7262
|
+
execution: input.package.execution,
|
|
7263
|
+
mode: input.package.mode,
|
|
7264
|
+
signals: input.package.signals,
|
|
7265
|
+
systemContext: input.package.systemContext,
|
|
7266
|
+
schemaCatalog: input.package.schemaCatalog
|
|
7267
|
+
});
|
|
7268
|
+
await writeJson(join2(runDir, "status.json"), {
|
|
7269
|
+
status: "pending",
|
|
7270
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
7271
|
+
});
|
|
7272
|
+
return { runDir };
|
|
7273
|
+
}
|
|
7274
|
+
async function writeJson(path2, value) {
|
|
7275
|
+
await writeFile(path2, `${JSON.stringify(value, null, 2)}
|
|
7276
|
+
`);
|
|
7277
|
+
}
|
|
7278
|
+
|
|
7279
|
+
// src/geo/repo.ts
|
|
7280
|
+
import { execFile as execFile6 } from "node:child_process";
|
|
7281
|
+
import { mkdir as mkdir2, readdir, stat } from "node:fs/promises";
|
|
7282
|
+
import { homedir as homedir2 } from "node:os";
|
|
7283
|
+
import { join as join3, resolve } from "node:path";
|
|
7284
|
+
import { promisify as promisify6 } from "node:util";
|
|
7285
|
+
var execFileAsync5 = promisify6(execFile6);
|
|
7286
|
+
function managedRepoPath(domain) {
|
|
7287
|
+
return join3(homedir2(), ".anymorph", "repos", domain);
|
|
7288
|
+
}
|
|
7289
|
+
async function prepareTenantRepo(input) {
|
|
7290
|
+
const repoPath = input.repo ? resolve(input.repo) : managedRepoPath(input.package.workspaceDomain);
|
|
7291
|
+
if (input.repo) {
|
|
7292
|
+
await ensureDirectory(repoPath);
|
|
7293
|
+
await syncRepo(repoPath, input.package.branch);
|
|
7294
|
+
return repoPath;
|
|
7295
|
+
}
|
|
7296
|
+
await mkdir2(join3(homedir2(), ".anymorph", "repos"), { recursive: true, mode: 448 });
|
|
7297
|
+
try {
|
|
7298
|
+
await ensureDirectory(repoPath);
|
|
7299
|
+
await syncRepo(repoPath, input.package.branch);
|
|
7300
|
+
} catch {
|
|
7301
|
+
await cloneRepo(input.package.tenantRepo, repoPath, input.package.branch);
|
|
7302
|
+
}
|
|
7303
|
+
return repoPath;
|
|
7304
|
+
}
|
|
7305
|
+
async function findRepoForRun(runId) {
|
|
7306
|
+
const root = join3(homedir2(), ".anymorph", "repos");
|
|
7307
|
+
let entries;
|
|
7308
|
+
try {
|
|
7309
|
+
entries = await readdir(root);
|
|
7310
|
+
} catch {
|
|
7311
|
+
return null;
|
|
7312
|
+
}
|
|
7313
|
+
for (const entry of entries) {
|
|
7314
|
+
const repoPath = join3(root, entry);
|
|
7315
|
+
try {
|
|
7316
|
+
await stat(join3(repoPath, "agent", "runs", runId, "manifest.json"));
|
|
7317
|
+
return repoPath;
|
|
7318
|
+
} catch {
|
|
7319
|
+
continue;
|
|
7320
|
+
}
|
|
7321
|
+
}
|
|
7322
|
+
return null;
|
|
7323
|
+
}
|
|
7324
|
+
async function gitInfo(repoPath) {
|
|
7325
|
+
return {
|
|
7326
|
+
branch: await gitOutput(repoPath, ["branch", "--show-current"]),
|
|
7327
|
+
origin: await gitOutput(repoPath, ["remote", "get-url", "origin"]),
|
|
7328
|
+
headSha: await gitOutput(repoPath, ["rev-parse", "HEAD"])
|
|
7329
|
+
};
|
|
7330
|
+
}
|
|
7331
|
+
async function cloneRepo(repo, repoPath, branch) {
|
|
7332
|
+
await execFileAsync5("git", [
|
|
7333
|
+
"clone",
|
|
7334
|
+
"--branch",
|
|
7335
|
+
branch,
|
|
7336
|
+
`https://github.com/${repo.owner}/${repo.repo}.git`,
|
|
7337
|
+
repoPath
|
|
7338
|
+
]);
|
|
7339
|
+
}
|
|
7340
|
+
async function syncRepo(repoPath, branch) {
|
|
7341
|
+
await execFileAsync5("git", ["fetch", "origin"], { cwd: repoPath });
|
|
7342
|
+
try {
|
|
7343
|
+
await execFileAsync5("git", ["checkout", branch], { cwd: repoPath });
|
|
7344
|
+
} catch {
|
|
7345
|
+
await execFileAsync5("git", ["checkout", "-B", branch, `origin/${branch}`], {
|
|
7346
|
+
cwd: repoPath
|
|
7347
|
+
});
|
|
7348
|
+
}
|
|
7349
|
+
await execFileAsync5("git", ["pull", "--ff-only", "origin", branch], { cwd: repoPath });
|
|
7350
|
+
}
|
|
7351
|
+
async function ensureDirectory(path2) {
|
|
7352
|
+
const s = await stat(path2);
|
|
7353
|
+
if (!s.isDirectory()) throw new Error(`${path2} is not a directory`);
|
|
7354
|
+
}
|
|
7355
|
+
async function gitOutput(repoPath, args) {
|
|
7356
|
+
try {
|
|
7357
|
+
const { stdout } = await execFileAsync5("git", args, { cwd: repoPath });
|
|
7358
|
+
return stdout.trim() || null;
|
|
7359
|
+
} catch {
|
|
7360
|
+
return null;
|
|
7361
|
+
}
|
|
7362
|
+
}
|
|
7363
|
+
|
|
7364
|
+
// src/geo/validate.ts
|
|
7365
|
+
import { access, readFile } from "node:fs/promises";
|
|
7366
|
+
import { join as join4 } from "node:path";
|
|
7367
|
+
async function validateGeoRunArtifacts(input) {
|
|
7368
|
+
const runDir = join4(input.repoPath, "agent", "runs", input.runId);
|
|
7369
|
+
const errors = [];
|
|
7370
|
+
const warnings = [];
|
|
7371
|
+
const manifest = await readJson(join4(runDir, "manifest.json"), errors);
|
|
7372
|
+
const actions = await readJson(join4(runDir, "actions.json"), errors);
|
|
7373
|
+
const status = await readJson(join4(runDir, "status.json"), errors);
|
|
7374
|
+
const skillUsage = await readJson(join4(runDir, "skill-usage.json"), errors);
|
|
7375
|
+
await requireFile(join4(runDir, "rationale.md"), errors);
|
|
7376
|
+
if (manifest) validateManifest(manifest, input.runId, errors);
|
|
7377
|
+
if (actions) validateActions(actions, input.runId, errors);
|
|
7378
|
+
if (status) validateStatus(status, errors);
|
|
7379
|
+
if (skillUsage) validateSkillUsage(skillUsage, errors);
|
|
7380
|
+
return {
|
|
7381
|
+
ok: errors.length === 0,
|
|
7382
|
+
errors,
|
|
7383
|
+
warnings,
|
|
7384
|
+
runDir
|
|
7385
|
+
};
|
|
7386
|
+
}
|
|
7387
|
+
async function requireFile(path2, errors) {
|
|
7388
|
+
try {
|
|
7389
|
+
await access(path2);
|
|
7390
|
+
} catch {
|
|
7391
|
+
errors.push(`Missing ${shortPath(path2)}`);
|
|
7392
|
+
}
|
|
7393
|
+
}
|
|
7394
|
+
async function readJson(path2, errors) {
|
|
7395
|
+
try {
|
|
7396
|
+
const raw = await readFile(path2, "utf8");
|
|
7397
|
+
return JSON.parse(raw);
|
|
7398
|
+
} catch (err) {
|
|
7399
|
+
const message = err instanceof SyntaxError ? "Invalid JSON" : "Missing";
|
|
7400
|
+
errors.push(`${message} ${shortPath(path2)}`);
|
|
7401
|
+
return null;
|
|
7402
|
+
}
|
|
7403
|
+
}
|
|
7404
|
+
function validateManifest(value, runId, errors) {
|
|
7405
|
+
if (!isRecord(value)) {
|
|
7406
|
+
errors.push("manifest.json must be an object");
|
|
7407
|
+
return;
|
|
7408
|
+
}
|
|
7409
|
+
if (value.schemaVersion !== 1) errors.push("manifest.json schemaVersion must be 1");
|
|
7410
|
+
if (value.runId !== runId) errors.push(`manifest.json runId must be ${runId}`);
|
|
7411
|
+
if (typeof value.workspaceId !== "string") errors.push("manifest.json workspaceId is required");
|
|
7412
|
+
if (typeof value.workspaceDomain !== "string") {
|
|
7413
|
+
errors.push("manifest.json workspaceDomain is required");
|
|
7414
|
+
}
|
|
7415
|
+
if (value.execution !== "local") errors.push('manifest.json execution must be "local"');
|
|
7416
|
+
if (value.mode !== "bootstrap" && value.mode !== "normal") {
|
|
7417
|
+
errors.push('manifest.json mode must be "bootstrap" or "normal"');
|
|
7418
|
+
}
|
|
7419
|
+
if (typeof value.signature !== "string" || !value.signature.startsWith("sha256=")) {
|
|
7420
|
+
errors.push("manifest.json signature must start with sha256=");
|
|
7421
|
+
}
|
|
7422
|
+
if (!isRecord(value.tenantRepo)) {
|
|
7423
|
+
errors.push("manifest.json tenantRepo is required");
|
|
7424
|
+
return;
|
|
7425
|
+
}
|
|
7426
|
+
for (const key of ["owner", "repo", "branch"]) {
|
|
7427
|
+
if (typeof value.tenantRepo[key] !== "string") {
|
|
7428
|
+
errors.push(`manifest.json tenantRepo.${key} is required`);
|
|
7429
|
+
}
|
|
7430
|
+
}
|
|
7431
|
+
}
|
|
7432
|
+
function validateActions(value, runId, errors) {
|
|
7433
|
+
if (!isRecord(value)) {
|
|
7434
|
+
errors.push("actions.json must be an object");
|
|
7435
|
+
return;
|
|
7436
|
+
}
|
|
7437
|
+
if (value.runId !== runId) errors.push(`actions.json runId must be ${runId}`);
|
|
7438
|
+
if (!Array.isArray(value.actions)) errors.push("actions.json actions must be an array");
|
|
7439
|
+
if (!Array.isArray(value.artifactPaths)) {
|
|
7440
|
+
errors.push("actions.json artifactPaths must be an array");
|
|
7441
|
+
return;
|
|
7442
|
+
}
|
|
7443
|
+
for (const path2 of value.artifactPaths) {
|
|
7444
|
+
if (typeof path2 !== "string") {
|
|
7445
|
+
errors.push("actions.json artifactPaths must contain strings only");
|
|
7446
|
+
continue;
|
|
7447
|
+
}
|
|
7448
|
+
if (!path2.startsWith(`agent/runs/${runId}/`) && !path2.startsWith("agent/archive/")) {
|
|
7449
|
+
errors.push(`actions.json artifact path is outside allowed GEO paths: ${path2}`);
|
|
7450
|
+
}
|
|
7451
|
+
}
|
|
7452
|
+
}
|
|
7453
|
+
function validateStatus(value, errors) {
|
|
7454
|
+
if (!isRecord(value)) {
|
|
7455
|
+
errors.push("status.json must be an object");
|
|
7456
|
+
return;
|
|
7457
|
+
}
|
|
7458
|
+
if (value.status !== "proposed") errors.push('status.json status must be "proposed"');
|
|
7459
|
+
}
|
|
7460
|
+
function validateSkillUsage(value, errors) {
|
|
7461
|
+
if (!isRecord(value)) {
|
|
7462
|
+
errors.push("skill-usage.json must be an object");
|
|
7463
|
+
return;
|
|
7464
|
+
}
|
|
7465
|
+
if (!Array.isArray(value.skills)) errors.push("skill-usage.json skills must be an array");
|
|
7466
|
+
}
|
|
7467
|
+
function isRecord(value) {
|
|
7468
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
7469
|
+
}
|
|
7470
|
+
function shortPath(path2) {
|
|
7471
|
+
const marker = `${String.raw`agent/runs`}/`;
|
|
7472
|
+
const index = path2.indexOf(marker);
|
|
7473
|
+
return index >= 0 ? path2.slice(index) : path2;
|
|
7474
|
+
}
|
|
7475
|
+
|
|
7476
|
+
// src/commands/geo.ts
|
|
7477
|
+
function buildGeoCommand() {
|
|
7478
|
+
const geo = new Command("geo").description("Prepare and validate local GEO strategy runs");
|
|
7479
|
+
geo.command("prepare <workspace>").description("Prepare a local GEO strategy run package").option("--repo <path>", "Use an explicit tenant repo path").option("--days <days>", "Signal lookback window in days", parsePositiveInt).option("--json", "Output as JSON").action(geoPrepareCommand);
|
|
7480
|
+
geo.command("validate <runId>").description("Validate local GEO strategy run artifacts before pushing").option("--repo <path>", "Use an explicit tenant repo path").option("--json", "Output as JSON").action(geoValidateCommand);
|
|
7481
|
+
geo.command("status <runId>").description("Show backend sync status for a GEO strategy run").option("--json", "Output as JSON").action(geoStatusCommand);
|
|
7482
|
+
return geo;
|
|
7483
|
+
}
|
|
7484
|
+
async function geoPrepareCommand(workspace, opts) {
|
|
7485
|
+
const res = await apiRequest("POST", "/api/cli/geo-strategy/prepare", {
|
|
7486
|
+
workspace,
|
|
7487
|
+
days: opts.days
|
|
7488
|
+
});
|
|
7489
|
+
if (!res.ok) {
|
|
7490
|
+
await printApiFailure(res, "Couldn't prepare GEO strategy package");
|
|
7491
|
+
process.exit(1);
|
|
7492
|
+
}
|
|
7493
|
+
const pkg = await res.json();
|
|
7494
|
+
let repoPath;
|
|
7495
|
+
let runDir;
|
|
7496
|
+
try {
|
|
7497
|
+
repoPath = await prepareTenantRepo({ package: pkg, repo: opts.repo });
|
|
7498
|
+
({ runDir } = await writeGeoRunPackage({ repoPath, package: pkg }));
|
|
7499
|
+
} catch (err) {
|
|
7500
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
7501
|
+
console.error(source_default.red(`Couldn't initialize local tenant repo: ${message}`));
|
|
7502
|
+
process.exit(1);
|
|
7503
|
+
}
|
|
7504
|
+
const output = {
|
|
7505
|
+
runId: pkg.runId,
|
|
7506
|
+
workspaceId: pkg.workspaceId,
|
|
7507
|
+
workspaceDomain: pkg.workspaceDomain,
|
|
7508
|
+
repoPath,
|
|
7509
|
+
runDir
|
|
7510
|
+
};
|
|
7511
|
+
if (opts.json) {
|
|
7512
|
+
console.log(JSON.stringify(output, null, 2));
|
|
7513
|
+
return;
|
|
7514
|
+
}
|
|
7515
|
+
console.log();
|
|
7516
|
+
console.log(source_default.green.bold(" Prepared GEO package"));
|
|
7517
|
+
console.log(` ${source_default.bold("Workspace:")} ${pkg.workspaceDomain}`);
|
|
7518
|
+
console.log(` ${source_default.bold("Run ID:")} ${pkg.runId}`);
|
|
7519
|
+
console.log(` ${source_default.bold("Repo:")} ${repoPath}`);
|
|
7520
|
+
console.log(` ${source_default.bold("Path:")} agent/runs/${pkg.runId}`);
|
|
7521
|
+
console.log();
|
|
7522
|
+
console.log(source_default.bold(" Next:"));
|
|
7523
|
+
console.log(source_default.dim(` cd ${repoPath}`));
|
|
7524
|
+
console.log(source_default.dim(" codex"));
|
|
7525
|
+
console.log(source_default.dim(` anymorph geo validate ${pkg.runId} --repo .`));
|
|
7526
|
+
console.log(source_default.dim(" git push origin main"));
|
|
7527
|
+
console.log();
|
|
7528
|
+
}
|
|
7529
|
+
async function geoValidateCommand(runId, opts) {
|
|
7530
|
+
const repoPath = opts.repo ?? await findRepoForRun(runId);
|
|
7531
|
+
if (!repoPath) {
|
|
7532
|
+
console.error(source_default.red(`Could not find local repo for run ${runId}. Pass --repo <path>.`));
|
|
7533
|
+
process.exit(1);
|
|
7534
|
+
}
|
|
7535
|
+
const result = await validateGeoRunArtifacts({ repoPath, runId });
|
|
7536
|
+
const git = await gitInfo(repoPath);
|
|
7537
|
+
const errors = [...result.errors];
|
|
7538
|
+
if (git.branch && git.branch !== "main") {
|
|
7539
|
+
errors.push(`Current branch is ${git.branch}, expected main`);
|
|
7540
|
+
}
|
|
7541
|
+
const ok = result.ok && errors.length === 0;
|
|
7542
|
+
if (opts.json) {
|
|
7543
|
+
console.log(JSON.stringify({ ...result, ok, errors, git, repoPath }, null, 2));
|
|
7544
|
+
process.exit(ok ? 0 : 1);
|
|
7545
|
+
}
|
|
7546
|
+
if (ok) {
|
|
7547
|
+
console.log(source_default.green(`
|
|
7548
|
+
GEO run ${runId} is valid for push.
|
|
7549
|
+
`));
|
|
7550
|
+
return;
|
|
7551
|
+
}
|
|
7552
|
+
console.error(source_default.red("\n Validation failed\n"));
|
|
7553
|
+
for (const error of errors) console.error(` - ${error}`);
|
|
7554
|
+
console.error();
|
|
7555
|
+
process.exit(1);
|
|
7556
|
+
}
|
|
7557
|
+
async function geoStatusCommand(runId, opts) {
|
|
7558
|
+
const res = await apiRequest("GET", `/api/cli/geo-strategy/runs/${encodeURIComponent(runId)}`);
|
|
7559
|
+
if (!res.ok) {
|
|
7560
|
+
await printApiFailure(res, "Couldn't fetch GEO strategy run status");
|
|
7561
|
+
process.exit(1);
|
|
7562
|
+
}
|
|
7563
|
+
const payload = await res.json();
|
|
7564
|
+
if (opts.json) {
|
|
7565
|
+
console.log(JSON.stringify(payload, null, 2));
|
|
7566
|
+
return;
|
|
7567
|
+
}
|
|
7568
|
+
console.log();
|
|
7569
|
+
console.log(source_default.bold(` GEO run ${runId}`));
|
|
7570
|
+
console.log(` ${source_default.bold("Status:")} ${payload.status ?? "unknown"}`);
|
|
7571
|
+
const commitSha = payload.commitSha;
|
|
7572
|
+
if (commitSha) console.log(` ${source_default.bold("Commit:")} ${commitSha}`);
|
|
7573
|
+
console.log();
|
|
7574
|
+
}
|
|
7575
|
+
function parsePositiveInt(value) {
|
|
7576
|
+
const parsed = Number(value);
|
|
7577
|
+
if (!Number.isInteger(parsed) || parsed <= 0) {
|
|
7578
|
+
throw new Error(`Expected a positive integer, got ${value}`);
|
|
7579
|
+
}
|
|
7580
|
+
return parsed;
|
|
7581
|
+
}
|
|
7582
|
+
async function printApiFailure(res, fallback2) {
|
|
7583
|
+
const body = await res.json().catch(() => null);
|
|
7584
|
+
console.error(source_default.red(body?.message ?? body?.error ?? fallback2));
|
|
7729
7585
|
}
|
|
7730
7586
|
|
|
7731
7587
|
// src/index.ts
|
|
7732
7588
|
var program2 = new Command();
|
|
7733
|
-
program2.name("anymorph").description("Check your brand's AI visibility \u2014 powered by Anymorph").version("0.
|
|
7589
|
+
program2.name("anymorph").description("Check your brand's AI visibility \u2014 powered by Anymorph").version("0.2.0");
|
|
7734
7590
|
program2.command("login").description("Sign in to your Anymorph account").action(loginCommand);
|
|
7735
7591
|
program2.command("check <domain>").description("Check AI visibility for a domain").option("--json", "Output as JSON").action(checkCommand);
|
|
7736
7592
|
program2.command("status").description("Show current auth status").action(statusCommand);
|
|
7593
|
+
program2.command("workspaces").description("List workspaces available to the current account").option("--json", "Output as JSON").action(workspacesCommand);
|
|
7737
7594
|
program2.command("logout").description("Sign out and clear credentials").action(logoutCommand);
|
|
7595
|
+
program2.addCommand(buildGeoCommand());
|
|
7738
7596
|
program2.parse();
|