@secondlayer/cli 14.1.0 → 14.1.1
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 +1 -1
- package/dist/cli.js +597 -602
- package/dist/cli.js.map +9 -9
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -2850,496 +2850,6 @@ var init_output = __esm(() => {
|
|
|
2850
2850
|
ANSI_ESCAPE_PATTERN = new RegExp(`${String.fromCharCode(27)}\\[[0-9;]*m`, "g");
|
|
2851
2851
|
});
|
|
2852
2852
|
|
|
2853
|
-
// ../../node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
2854
|
-
function assembleStyles() {
|
|
2855
|
-
const codes = new Map;
|
|
2856
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
2857
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
2858
|
-
styles[styleName] = {
|
|
2859
|
-
open: `\x1B[${style[0]}m`,
|
|
2860
|
-
close: `\x1B[${style[1]}m`
|
|
2861
|
-
};
|
|
2862
|
-
group[styleName] = styles[styleName];
|
|
2863
|
-
codes.set(style[0], style[1]);
|
|
2864
|
-
}
|
|
2865
|
-
Object.defineProperty(styles, groupName, {
|
|
2866
|
-
value: group,
|
|
2867
|
-
enumerable: false
|
|
2868
|
-
});
|
|
2869
|
-
}
|
|
2870
|
-
Object.defineProperty(styles, "codes", {
|
|
2871
|
-
value: codes,
|
|
2872
|
-
enumerable: false
|
|
2873
|
-
});
|
|
2874
|
-
styles.color.close = "\x1B[39m";
|
|
2875
|
-
styles.bgColor.close = "\x1B[49m";
|
|
2876
|
-
styles.color.ansi = wrapAnsi16();
|
|
2877
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
2878
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
2879
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
2880
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
2881
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
2882
|
-
Object.defineProperties(styles, {
|
|
2883
|
-
rgbToAnsi256: {
|
|
2884
|
-
value(red2, green2, blue2) {
|
|
2885
|
-
if (red2 === green2 && green2 === blue2) {
|
|
2886
|
-
if (red2 < 8) {
|
|
2887
|
-
return 16;
|
|
2888
|
-
}
|
|
2889
|
-
if (red2 > 248) {
|
|
2890
|
-
return 231;
|
|
2891
|
-
}
|
|
2892
|
-
return Math.round((red2 - 8) / 247 * 24) + 232;
|
|
2893
|
-
}
|
|
2894
|
-
return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(blue2 / 255 * 5);
|
|
2895
|
-
},
|
|
2896
|
-
enumerable: false
|
|
2897
|
-
},
|
|
2898
|
-
hexToRgb: {
|
|
2899
|
-
value(hex) {
|
|
2900
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
2901
|
-
if (!matches) {
|
|
2902
|
-
return [0, 0, 0];
|
|
2903
|
-
}
|
|
2904
|
-
let [colorString] = matches;
|
|
2905
|
-
if (colorString.length === 3) {
|
|
2906
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
2907
|
-
}
|
|
2908
|
-
const integer = Number.parseInt(colorString, 16);
|
|
2909
|
-
return [
|
|
2910
|
-
integer >> 16 & 255,
|
|
2911
|
-
integer >> 8 & 255,
|
|
2912
|
-
integer & 255
|
|
2913
|
-
];
|
|
2914
|
-
},
|
|
2915
|
-
enumerable: false
|
|
2916
|
-
},
|
|
2917
|
-
hexToAnsi256: {
|
|
2918
|
-
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
2919
|
-
enumerable: false
|
|
2920
|
-
},
|
|
2921
|
-
ansi256ToAnsi: {
|
|
2922
|
-
value(code) {
|
|
2923
|
-
if (code < 8) {
|
|
2924
|
-
return 30 + code;
|
|
2925
|
-
}
|
|
2926
|
-
if (code < 16) {
|
|
2927
|
-
return 90 + (code - 8);
|
|
2928
|
-
}
|
|
2929
|
-
let red2;
|
|
2930
|
-
let green2;
|
|
2931
|
-
let blue2;
|
|
2932
|
-
if (code >= 232) {
|
|
2933
|
-
red2 = ((code - 232) * 10 + 8) / 255;
|
|
2934
|
-
green2 = red2;
|
|
2935
|
-
blue2 = red2;
|
|
2936
|
-
} else {
|
|
2937
|
-
code -= 16;
|
|
2938
|
-
const remainder = code % 36;
|
|
2939
|
-
red2 = Math.floor(code / 36) / 5;
|
|
2940
|
-
green2 = Math.floor(remainder / 6) / 5;
|
|
2941
|
-
blue2 = remainder % 6 / 5;
|
|
2942
|
-
}
|
|
2943
|
-
const value = Math.max(red2, green2, blue2) * 2;
|
|
2944
|
-
if (value === 0) {
|
|
2945
|
-
return 30;
|
|
2946
|
-
}
|
|
2947
|
-
let result = 30 + (Math.round(blue2) << 2 | Math.round(green2) << 1 | Math.round(red2));
|
|
2948
|
-
if (value === 2) {
|
|
2949
|
-
result += 60;
|
|
2950
|
-
}
|
|
2951
|
-
return result;
|
|
2952
|
-
},
|
|
2953
|
-
enumerable: false
|
|
2954
|
-
},
|
|
2955
|
-
rgbToAnsi: {
|
|
2956
|
-
value: (red2, green2, blue2) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red2, green2, blue2)),
|
|
2957
|
-
enumerable: false
|
|
2958
|
-
},
|
|
2959
|
-
hexToAnsi: {
|
|
2960
|
-
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
2961
|
-
enumerable: false
|
|
2962
|
-
}
|
|
2963
|
-
});
|
|
2964
|
-
return styles;
|
|
2965
|
-
}
|
|
2966
|
-
var ANSI_BACKGROUND_OFFSET = 10, wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m = (offset = 0) => (red2, green2, blue2) => `\x1B[${38 + offset};2;${red2};${green2};${blue2}m`, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
|
|
2967
|
-
var init_ansi_styles = __esm(() => {
|
|
2968
|
-
styles = {
|
|
2969
|
-
modifier: {
|
|
2970
|
-
reset: [0, 0],
|
|
2971
|
-
bold: [1, 22],
|
|
2972
|
-
dim: [2, 22],
|
|
2973
|
-
italic: [3, 23],
|
|
2974
|
-
underline: [4, 24],
|
|
2975
|
-
overline: [53, 55],
|
|
2976
|
-
inverse: [7, 27],
|
|
2977
|
-
hidden: [8, 28],
|
|
2978
|
-
strikethrough: [9, 29]
|
|
2979
|
-
},
|
|
2980
|
-
color: {
|
|
2981
|
-
black: [30, 39],
|
|
2982
|
-
red: [31, 39],
|
|
2983
|
-
green: [32, 39],
|
|
2984
|
-
yellow: [33, 39],
|
|
2985
|
-
blue: [34, 39],
|
|
2986
|
-
magenta: [35, 39],
|
|
2987
|
-
cyan: [36, 39],
|
|
2988
|
-
white: [37, 39],
|
|
2989
|
-
blackBright: [90, 39],
|
|
2990
|
-
gray: [90, 39],
|
|
2991
|
-
grey: [90, 39],
|
|
2992
|
-
redBright: [91, 39],
|
|
2993
|
-
greenBright: [92, 39],
|
|
2994
|
-
yellowBright: [93, 39],
|
|
2995
|
-
blueBright: [94, 39],
|
|
2996
|
-
magentaBright: [95, 39],
|
|
2997
|
-
cyanBright: [96, 39],
|
|
2998
|
-
whiteBright: [97, 39]
|
|
2999
|
-
},
|
|
3000
|
-
bgColor: {
|
|
3001
|
-
bgBlack: [40, 49],
|
|
3002
|
-
bgRed: [41, 49],
|
|
3003
|
-
bgGreen: [42, 49],
|
|
3004
|
-
bgYellow: [43, 49],
|
|
3005
|
-
bgBlue: [44, 49],
|
|
3006
|
-
bgMagenta: [45, 49],
|
|
3007
|
-
bgCyan: [46, 49],
|
|
3008
|
-
bgWhite: [47, 49],
|
|
3009
|
-
bgBlackBright: [100, 49],
|
|
3010
|
-
bgGray: [100, 49],
|
|
3011
|
-
bgGrey: [100, 49],
|
|
3012
|
-
bgRedBright: [101, 49],
|
|
3013
|
-
bgGreenBright: [102, 49],
|
|
3014
|
-
bgYellowBright: [103, 49],
|
|
3015
|
-
bgBlueBright: [104, 49],
|
|
3016
|
-
bgMagentaBright: [105, 49],
|
|
3017
|
-
bgCyanBright: [106, 49],
|
|
3018
|
-
bgWhiteBright: [107, 49]
|
|
3019
|
-
}
|
|
3020
|
-
};
|
|
3021
|
-
modifierNames = Object.keys(styles.modifier);
|
|
3022
|
-
foregroundColorNames = Object.keys(styles.color);
|
|
3023
|
-
backgroundColorNames = Object.keys(styles.bgColor);
|
|
3024
|
-
colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
3025
|
-
ansiStyles = assembleStyles();
|
|
3026
|
-
ansi_styles_default = ansiStyles;
|
|
3027
|
-
});
|
|
3028
|
-
|
|
3029
|
-
// ../../node_modules/chalk/source/vendor/supports-color/index.js
|
|
3030
|
-
import process2 from "node:process";
|
|
3031
|
-
import os from "node:os";
|
|
3032
|
-
import tty from "node:tty";
|
|
3033
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
|
|
3034
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
3035
|
-
const position = argv.indexOf(prefix + flag);
|
|
3036
|
-
const terminatorPosition = argv.indexOf("--");
|
|
3037
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
3038
|
-
}
|
|
3039
|
-
function envForceColor() {
|
|
3040
|
-
if ("FORCE_COLOR" in env) {
|
|
3041
|
-
if (env.FORCE_COLOR === "true") {
|
|
3042
|
-
return 1;
|
|
3043
|
-
}
|
|
3044
|
-
if (env.FORCE_COLOR === "false") {
|
|
3045
|
-
return 0;
|
|
3046
|
-
}
|
|
3047
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
3048
|
-
}
|
|
3049
|
-
}
|
|
3050
|
-
function translateLevel(level) {
|
|
3051
|
-
if (level === 0) {
|
|
3052
|
-
return false;
|
|
3053
|
-
}
|
|
3054
|
-
return {
|
|
3055
|
-
level,
|
|
3056
|
-
hasBasic: true,
|
|
3057
|
-
has256: level >= 2,
|
|
3058
|
-
has16m: level >= 3
|
|
3059
|
-
};
|
|
3060
|
-
}
|
|
3061
|
-
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
3062
|
-
const noFlagForceColor = envForceColor();
|
|
3063
|
-
if (noFlagForceColor !== undefined) {
|
|
3064
|
-
flagForceColor = noFlagForceColor;
|
|
3065
|
-
}
|
|
3066
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
3067
|
-
if (forceColor === 0) {
|
|
3068
|
-
return 0;
|
|
3069
|
-
}
|
|
3070
|
-
if (sniffFlags) {
|
|
3071
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
3072
|
-
return 3;
|
|
3073
|
-
}
|
|
3074
|
-
if (hasFlag("color=256")) {
|
|
3075
|
-
return 2;
|
|
3076
|
-
}
|
|
3077
|
-
}
|
|
3078
|
-
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
3079
|
-
return 1;
|
|
3080
|
-
}
|
|
3081
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
3082
|
-
return 0;
|
|
3083
|
-
}
|
|
3084
|
-
const min = forceColor || 0;
|
|
3085
|
-
if (env.TERM === "dumb") {
|
|
3086
|
-
return min;
|
|
3087
|
-
}
|
|
3088
|
-
if (process2.platform === "win32") {
|
|
3089
|
-
const osRelease = os.release().split(".");
|
|
3090
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
3091
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
3092
|
-
}
|
|
3093
|
-
return 1;
|
|
3094
|
-
}
|
|
3095
|
-
if ("CI" in env) {
|
|
3096
|
-
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env))) {
|
|
3097
|
-
return 3;
|
|
3098
|
-
}
|
|
3099
|
-
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
3100
|
-
return 1;
|
|
3101
|
-
}
|
|
3102
|
-
return min;
|
|
3103
|
-
}
|
|
3104
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
3105
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
3106
|
-
}
|
|
3107
|
-
if (env.COLORTERM === "truecolor") {
|
|
3108
|
-
return 3;
|
|
3109
|
-
}
|
|
3110
|
-
if (env.TERM === "xterm-kitty") {
|
|
3111
|
-
return 3;
|
|
3112
|
-
}
|
|
3113
|
-
if (env.TERM === "xterm-ghostty") {
|
|
3114
|
-
return 3;
|
|
3115
|
-
}
|
|
3116
|
-
if (env.TERM === "wezterm") {
|
|
3117
|
-
return 3;
|
|
3118
|
-
}
|
|
3119
|
-
if ("TERM_PROGRAM" in env) {
|
|
3120
|
-
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
3121
|
-
switch (env.TERM_PROGRAM) {
|
|
3122
|
-
case "iTerm.app": {
|
|
3123
|
-
return version >= 3 ? 3 : 2;
|
|
3124
|
-
}
|
|
3125
|
-
case "Apple_Terminal": {
|
|
3126
|
-
return 2;
|
|
3127
|
-
}
|
|
3128
|
-
}
|
|
3129
|
-
}
|
|
3130
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
3131
|
-
return 2;
|
|
3132
|
-
}
|
|
3133
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
3134
|
-
return 1;
|
|
3135
|
-
}
|
|
3136
|
-
if ("COLORTERM" in env) {
|
|
3137
|
-
return 1;
|
|
3138
|
-
}
|
|
3139
|
-
return min;
|
|
3140
|
-
}
|
|
3141
|
-
function createSupportsColor(stream, options = {}) {
|
|
3142
|
-
const level = _supportsColor(stream, {
|
|
3143
|
-
streamIsTTY: stream && stream.isTTY,
|
|
3144
|
-
...options
|
|
3145
|
-
});
|
|
3146
|
-
return translateLevel(level);
|
|
3147
|
-
}
|
|
3148
|
-
var env, flagForceColor, supportsColor, supports_color_default;
|
|
3149
|
-
var init_supports_color = __esm(() => {
|
|
3150
|
-
({ env } = process2);
|
|
3151
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
3152
|
-
flagForceColor = 0;
|
|
3153
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
3154
|
-
flagForceColor = 1;
|
|
3155
|
-
}
|
|
3156
|
-
supportsColor = {
|
|
3157
|
-
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
3158
|
-
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
3159
|
-
};
|
|
3160
|
-
supports_color_default = supportsColor;
|
|
3161
|
-
});
|
|
3162
|
-
|
|
3163
|
-
// ../../node_modules/chalk/source/utilities.js
|
|
3164
|
-
function stringReplaceAll(string, substring, replacer) {
|
|
3165
|
-
let index = string.indexOf(substring);
|
|
3166
|
-
if (index === -1) {
|
|
3167
|
-
return string;
|
|
3168
|
-
}
|
|
3169
|
-
const substringLength = substring.length;
|
|
3170
|
-
let endIndex = 0;
|
|
3171
|
-
let returnValue = "";
|
|
3172
|
-
do {
|
|
3173
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
3174
|
-
endIndex = index + substringLength;
|
|
3175
|
-
index = string.indexOf(substring, endIndex);
|
|
3176
|
-
} while (index !== -1);
|
|
3177
|
-
returnValue += string.slice(endIndex);
|
|
3178
|
-
return returnValue;
|
|
3179
|
-
}
|
|
3180
|
-
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
3181
|
-
let endIndex = 0;
|
|
3182
|
-
let returnValue = "";
|
|
3183
|
-
do {
|
|
3184
|
-
const gotCR = string[index - 1] === "\r";
|
|
3185
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
|
|
3186
|
-
` : `
|
|
3187
|
-
`) + postfix;
|
|
3188
|
-
endIndex = index + 1;
|
|
3189
|
-
index = string.indexOf(`
|
|
3190
|
-
`, endIndex);
|
|
3191
|
-
} while (index !== -1);
|
|
3192
|
-
returnValue += string.slice(endIndex);
|
|
3193
|
-
return returnValue;
|
|
3194
|
-
}
|
|
3195
|
-
|
|
3196
|
-
// ../../node_modules/chalk/source/index.js
|
|
3197
|
-
function createChalk(options) {
|
|
3198
|
-
return chalkFactory(options);
|
|
3199
|
-
}
|
|
3200
|
-
var stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles2, applyOptions = (object, options = {}) => {
|
|
3201
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
3202
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
3203
|
-
}
|
|
3204
|
-
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
3205
|
-
object.level = options.level === undefined ? colorLevel : options.level;
|
|
3206
|
-
}, chalkFactory = (options) => {
|
|
3207
|
-
const chalk = (...strings) => strings.join(" ");
|
|
3208
|
-
applyOptions(chalk, options);
|
|
3209
|
-
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
3210
|
-
return chalk;
|
|
3211
|
-
}, getModelAnsi = (model, level, type, ...arguments_) => {
|
|
3212
|
-
if (model === "rgb") {
|
|
3213
|
-
if (level === "ansi16m") {
|
|
3214
|
-
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
3215
|
-
}
|
|
3216
|
-
if (level === "ansi256") {
|
|
3217
|
-
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
3218
|
-
}
|
|
3219
|
-
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
3220
|
-
}
|
|
3221
|
-
if (model === "hex") {
|
|
3222
|
-
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
3223
|
-
}
|
|
3224
|
-
return ansi_styles_default[type][model](...arguments_);
|
|
3225
|
-
}, usedModels, proto, createStyler = (open, close, parent) => {
|
|
3226
|
-
let openAll;
|
|
3227
|
-
let closeAll;
|
|
3228
|
-
if (parent === undefined) {
|
|
3229
|
-
openAll = open;
|
|
3230
|
-
closeAll = close;
|
|
3231
|
-
} else {
|
|
3232
|
-
openAll = parent.openAll + open;
|
|
3233
|
-
closeAll = close + parent.closeAll;
|
|
3234
|
-
}
|
|
3235
|
-
return {
|
|
3236
|
-
open,
|
|
3237
|
-
close,
|
|
3238
|
-
openAll,
|
|
3239
|
-
closeAll,
|
|
3240
|
-
parent
|
|
3241
|
-
};
|
|
3242
|
-
}, createBuilder = (self, _styler, _isEmpty) => {
|
|
3243
|
-
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
3244
|
-
Object.setPrototypeOf(builder, proto);
|
|
3245
|
-
builder[GENERATOR] = self;
|
|
3246
|
-
builder[STYLER] = _styler;
|
|
3247
|
-
builder[IS_EMPTY] = _isEmpty;
|
|
3248
|
-
return builder;
|
|
3249
|
-
}, applyStyle = (self, string) => {
|
|
3250
|
-
if (self.level <= 0 || !string) {
|
|
3251
|
-
return self[IS_EMPTY] ? "" : string;
|
|
3252
|
-
}
|
|
3253
|
-
let styler = self[STYLER];
|
|
3254
|
-
if (styler === undefined) {
|
|
3255
|
-
return string;
|
|
3256
|
-
}
|
|
3257
|
-
const { openAll, closeAll } = styler;
|
|
3258
|
-
if (string.includes("\x1B")) {
|
|
3259
|
-
while (styler !== undefined) {
|
|
3260
|
-
string = stringReplaceAll(string, styler.close, styler.open);
|
|
3261
|
-
styler = styler.parent;
|
|
3262
|
-
}
|
|
3263
|
-
}
|
|
3264
|
-
const lfIndex = string.indexOf(`
|
|
3265
|
-
`);
|
|
3266
|
-
if (lfIndex !== -1) {
|
|
3267
|
-
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
3268
|
-
}
|
|
3269
|
-
return openAll + string + closeAll;
|
|
3270
|
-
}, chalk, chalkStderr, source_default;
|
|
3271
|
-
var init_source = __esm(() => {
|
|
3272
|
-
init_ansi_styles();
|
|
3273
|
-
init_supports_color();
|
|
3274
|
-
init_ansi_styles();
|
|
3275
|
-
({ stdout: stdoutColor, stderr: stderrColor } = supports_color_default);
|
|
3276
|
-
GENERATOR = Symbol("GENERATOR");
|
|
3277
|
-
STYLER = Symbol("STYLER");
|
|
3278
|
-
IS_EMPTY = Symbol("IS_EMPTY");
|
|
3279
|
-
levelMapping = [
|
|
3280
|
-
"ansi",
|
|
3281
|
-
"ansi",
|
|
3282
|
-
"ansi256",
|
|
3283
|
-
"ansi16m"
|
|
3284
|
-
];
|
|
3285
|
-
styles2 = Object.create(null);
|
|
3286
|
-
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
3287
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
3288
|
-
styles2[styleName] = {
|
|
3289
|
-
get() {
|
|
3290
|
-
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
3291
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
3292
|
-
return builder;
|
|
3293
|
-
}
|
|
3294
|
-
};
|
|
3295
|
-
}
|
|
3296
|
-
styles2.visible = {
|
|
3297
|
-
get() {
|
|
3298
|
-
const builder = createBuilder(this, this[STYLER], true);
|
|
3299
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
3300
|
-
return builder;
|
|
3301
|
-
}
|
|
3302
|
-
};
|
|
3303
|
-
usedModels = ["rgb", "hex", "ansi256"];
|
|
3304
|
-
for (const model of usedModels) {
|
|
3305
|
-
styles2[model] = {
|
|
3306
|
-
get() {
|
|
3307
|
-
const { level } = this;
|
|
3308
|
-
return function(...arguments_) {
|
|
3309
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
3310
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
3311
|
-
};
|
|
3312
|
-
}
|
|
3313
|
-
};
|
|
3314
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
3315
|
-
styles2[bgModel] = {
|
|
3316
|
-
get() {
|
|
3317
|
-
const { level } = this;
|
|
3318
|
-
return function(...arguments_) {
|
|
3319
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
3320
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
3321
|
-
};
|
|
3322
|
-
}
|
|
3323
|
-
};
|
|
3324
|
-
}
|
|
3325
|
-
proto = Object.defineProperties(() => {}, {
|
|
3326
|
-
...styles2,
|
|
3327
|
-
level: {
|
|
3328
|
-
enumerable: true,
|
|
3329
|
-
get() {
|
|
3330
|
-
return this[GENERATOR].level;
|
|
3331
|
-
},
|
|
3332
|
-
set(level) {
|
|
3333
|
-
this[GENERATOR].level = level;
|
|
3334
|
-
}
|
|
3335
|
-
}
|
|
3336
|
-
});
|
|
3337
|
-
Object.defineProperties(createChalk.prototype, styles2);
|
|
3338
|
-
chalk = createChalk();
|
|
3339
|
-
chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
3340
|
-
source_default = chalk;
|
|
3341
|
-
});
|
|
3342
|
-
|
|
3343
2853
|
// ../../node_modules/fast-glob/out/utils/array.js
|
|
3344
2854
|
var require_array = __commonJS((exports) => {
|
|
3345
2855
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -3401,9 +2911,9 @@ var require_fs = __commonJS((exports) => {
|
|
|
3401
2911
|
var require_path = __commonJS((exports) => {
|
|
3402
2912
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3403
2913
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = undefined;
|
|
3404
|
-
var
|
|
2914
|
+
var os = __require("os");
|
|
3405
2915
|
var path2 = __require("path");
|
|
3406
|
-
var IS_WINDOWS_PLATFORM =
|
|
2916
|
+
var IS_WINDOWS_PLATFORM = os.platform() === "win32";
|
|
3407
2917
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
3408
2918
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
3409
2919
|
var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
@@ -8666,8 +8176,8 @@ var require_settings4 = __commonJS((exports) => {
|
|
|
8666
8176
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8667
8177
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = undefined;
|
|
8668
8178
|
var fs2 = __require("fs");
|
|
8669
|
-
var
|
|
8670
|
-
var CPU_COUNT = Math.max(
|
|
8179
|
+
var os = __require("os");
|
|
8180
|
+
var CPU_COUNT = Math.max(os.cpus().length, 1);
|
|
8671
8181
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
8672
8182
|
lstat: fs2.lstat,
|
|
8673
8183
|
lstatSync: fs2.lstatSync,
|
|
@@ -9952,10 +9462,10 @@ var import_defer_to_connect, timer = (request2) => {
|
|
|
9952
9462
|
response.prependOnceListener("aborted", onAbort);
|
|
9953
9463
|
});
|
|
9954
9464
|
return timings;
|
|
9955
|
-
},
|
|
9956
|
-
var
|
|
9465
|
+
}, source_default;
|
|
9466
|
+
var init_source = __esm(() => {
|
|
9957
9467
|
import_defer_to_connect = __toESM(require_source(), 1);
|
|
9958
|
-
|
|
9468
|
+
source_default = timer;
|
|
9959
9469
|
});
|
|
9960
9470
|
|
|
9961
9471
|
// ../../node_modules/normalize-url/index.js
|
|
@@ -12080,7 +11590,7 @@ import {
|
|
|
12080
11590
|
lookup as dnsLookup
|
|
12081
11591
|
} from "node:dns";
|
|
12082
11592
|
import { promisify as promisify2 } from "node:util";
|
|
12083
|
-
import
|
|
11593
|
+
import os from "node:os";
|
|
12084
11594
|
|
|
12085
11595
|
class CacheableLookup {
|
|
12086
11596
|
constructor({
|
|
@@ -12385,7 +11895,7 @@ var AsyncResolver, kCacheableLookupCreateConnection, kCacheableLookupInstance, k
|
|
|
12385
11895
|
}, getIfaceInfo = () => {
|
|
12386
11896
|
let has4 = false;
|
|
12387
11897
|
let has6 = false;
|
|
12388
|
-
for (const device of Object.values(
|
|
11898
|
+
for (const device of Object.values(os.networkInterfaces())) {
|
|
12389
11899
|
for (const iface of device) {
|
|
12390
11900
|
if (iface.internal) {
|
|
12391
11901
|
continue;
|
|
@@ -12411,7 +11921,7 @@ var AsyncResolver, kCacheableLookupCreateConnection, kCacheableLookupInstance, k
|
|
|
12411
11921
|
throw error2;
|
|
12412
11922
|
});
|
|
12413
11923
|
}, ttl, all, all4, all6;
|
|
12414
|
-
var
|
|
11924
|
+
var init_source2 = __esm(() => {
|
|
12415
11925
|
({ Resolver: AsyncResolver } = dnsPromises);
|
|
12416
11926
|
kCacheableLookupCreateConnection = Symbol("cacheableLookupCreateConnection");
|
|
12417
11927
|
kCacheableLookupInstance = Symbol("cacheableLookupInstance");
|
|
@@ -14284,7 +13794,7 @@ function parseLinkHeader(link) {
|
|
|
14284
13794
|
}
|
|
14285
13795
|
|
|
14286
13796
|
// ../../node_modules/got/dist/source/core/options.js
|
|
14287
|
-
import
|
|
13797
|
+
import process2 from "node:process";
|
|
14288
13798
|
import { promisify as promisify3, inspect } from "node:util";
|
|
14289
13799
|
import { checkServerIdentity } from "node:tls";
|
|
14290
13800
|
import http from "node:http";
|
|
@@ -14411,10 +13921,10 @@ var import_http2_wrapper, major, minor, globalCache, globalDnsCache, getGlobalDn
|
|
|
14411
13921
|
}, Options;
|
|
14412
13922
|
var init_options = __esm(() => {
|
|
14413
13923
|
init_dist();
|
|
14414
|
-
|
|
13924
|
+
init_source2();
|
|
14415
13925
|
init_lib();
|
|
14416
13926
|
import_http2_wrapper = __toESM(require_source2(), 1);
|
|
14417
|
-
[major, minor] =
|
|
13927
|
+
[major, minor] = process2.versions.node.split(".").map(Number);
|
|
14418
13928
|
globalCache = new Map;
|
|
14419
13929
|
defaultInternals = {
|
|
14420
13930
|
request: undefined,
|
|
@@ -15456,13 +14966,13 @@ function isUnixSocketURL(url) {
|
|
|
15456
14966
|
}
|
|
15457
14967
|
|
|
15458
14968
|
// ../../node_modules/got/dist/source/core/index.js
|
|
15459
|
-
import
|
|
14969
|
+
import process3 from "node:process";
|
|
15460
14970
|
import { Buffer as Buffer3 } from "node:buffer";
|
|
15461
14971
|
import { Duplex } from "node:stream";
|
|
15462
14972
|
import http2, { ServerResponse } from "node:http";
|
|
15463
14973
|
var import_decompress_response, import_get_stream2, getStreamAsBuffer, supportsBrotli, methodsWithoutBody, cacheableStore, redirectCodes, proxiedRequestEvents, noop2 = () => {}, Request;
|
|
15464
14974
|
var init_core = __esm(() => {
|
|
15465
|
-
|
|
14975
|
+
init_source();
|
|
15466
14976
|
init_dist2();
|
|
15467
14977
|
init_dist();
|
|
15468
14978
|
init_lib();
|
|
@@ -15478,7 +14988,7 @@ var init_core = __esm(() => {
|
|
|
15478
14988
|
import_decompress_response = __toESM(require_decompress_response(), 1);
|
|
15479
14989
|
import_get_stream2 = __toESM(require_get_stream2(), 1);
|
|
15480
14990
|
({ buffer: getStreamAsBuffer } = import_get_stream2.default);
|
|
15481
|
-
supportsBrotli = dist_default.string(
|
|
14991
|
+
supportsBrotli = dist_default.string(process3.versions.brotli);
|
|
15482
14992
|
methodsWithoutBody = new Set(["GET", "HEAD"]);
|
|
15483
14993
|
cacheableStore = new WeakableMap;
|
|
15484
14994
|
redirectCodes = new Set([300, 301, 302, 303, 304, 307, 308]);
|
|
@@ -15820,7 +15330,7 @@ var init_core = __esm(() => {
|
|
|
15820
15330
|
this.emit("retry", this.retryCount + 1, error2, (updatedOptions) => {
|
|
15821
15331
|
const request2 = new Request(options.url, updatedOptions, options);
|
|
15822
15332
|
request2.retryCount = this.retryCount + 1;
|
|
15823
|
-
|
|
15333
|
+
process3.nextTick(() => {
|
|
15824
15334
|
request2.flush();
|
|
15825
15335
|
});
|
|
15826
15336
|
return request2;
|
|
@@ -16153,7 +15663,7 @@ var init_core = __esm(() => {
|
|
|
16153
15663
|
_onRequest(request2) {
|
|
16154
15664
|
const { options } = this;
|
|
16155
15665
|
const { timeout, url } = options;
|
|
16156
|
-
|
|
15666
|
+
source_default(request2);
|
|
16157
15667
|
if (this.options.http2) {
|
|
16158
15668
|
request2.setTimeout(0);
|
|
16159
15669
|
}
|
|
@@ -16757,8 +16267,8 @@ var init_create = __esm(() => {
|
|
|
16757
16267
|
var init_types3 = () => {};
|
|
16758
16268
|
|
|
16759
16269
|
// ../../node_modules/got/dist/source/index.js
|
|
16760
|
-
var defaults, got,
|
|
16761
|
-
var
|
|
16270
|
+
var defaults, got, source_default2;
|
|
16271
|
+
var init_source3 = __esm(() => {
|
|
16762
16272
|
init_create();
|
|
16763
16273
|
init_options();
|
|
16764
16274
|
init_options();
|
|
@@ -16776,7 +16286,7 @@ var init_source4 = __esm(() => {
|
|
|
16776
16286
|
mutableDefaults: false
|
|
16777
16287
|
};
|
|
16778
16288
|
got = create_default(defaults);
|
|
16779
|
-
|
|
16289
|
+
source_default2 = got;
|
|
16780
16290
|
});
|
|
16781
16291
|
|
|
16782
16292
|
// src/utils/api.ts
|
|
@@ -16828,9 +16338,9 @@ class StacksApiClient {
|
|
|
16828
16338
|
}
|
|
16829
16339
|
var contractFetch;
|
|
16830
16340
|
var init_api = __esm(() => {
|
|
16831
|
-
|
|
16341
|
+
init_source3();
|
|
16832
16342
|
init_resolve_auth();
|
|
16833
|
-
contractFetch =
|
|
16343
|
+
contractFetch = source_default2.extend({
|
|
16834
16344
|
timeout: { request: 15000 },
|
|
16835
16345
|
retry: {
|
|
16836
16346
|
limit: 0,
|
|
@@ -17867,7 +17377,7 @@ import require$$2 from "events";
|
|
|
17867
17377
|
import fs4, { promises, existsSync } from "node:fs";
|
|
17868
17378
|
import require$$0$1 from "os";
|
|
17869
17379
|
import require$$1 from "tty";
|
|
17870
|
-
import
|
|
17380
|
+
import os2 from "node:os";
|
|
17871
17381
|
import require$$0$2 from "fs";
|
|
17872
17382
|
import require$$1$1 from "fs/promises";
|
|
17873
17383
|
import require$$1$2 from "path";
|
|
@@ -18381,13 +17891,13 @@ function requireStyle() {
|
|
|
18381
17891
|
hasRequiredStyle = 1;
|
|
18382
17892
|
const c2 = requireKleur();
|
|
18383
17893
|
const figures = requireFigures();
|
|
18384
|
-
const
|
|
17894
|
+
const styles = Object.freeze({
|
|
18385
17895
|
password: { scale: 1, render: (input) => "*".repeat(input.length) },
|
|
18386
17896
|
emoji: { scale: 2, render: (input) => "\uD83D\uDE03".repeat(input.length) },
|
|
18387
17897
|
invisible: { scale: 0, render: (input) => "" },
|
|
18388
17898
|
default: { scale: 1, render: (input) => `${input}` }
|
|
18389
17899
|
});
|
|
18390
|
-
const render = (type) =>
|
|
17900
|
+
const render = (type) => styles[type] || styles.default;
|
|
18391
17901
|
const symbols = Object.freeze({
|
|
18392
17902
|
aborted: c2.red(figures.cross),
|
|
18393
17903
|
done: c2.green(figures.tick),
|
|
@@ -18398,7 +17908,7 @@ function requireStyle() {
|
|
|
18398
17908
|
const delimiter = (completing) => c2.gray(completing ? figures.ellipsis : figures.pointerSmall);
|
|
18399
17909
|
const item = (expandable, expanded) => c2.gray(expandable ? expanded ? figures.pointerSmall : "+" : figures.line);
|
|
18400
17910
|
style = {
|
|
18401
|
-
styles
|
|
17911
|
+
styles,
|
|
18402
17912
|
render,
|
|
18403
17913
|
symbols,
|
|
18404
17914
|
symbol,
|
|
@@ -20486,40 +19996,40 @@ function requirePrompts() {
|
|
|
20486
19996
|
}
|
|
20487
19997
|
function requireHasFlag() {
|
|
20488
19998
|
if (hasRequiredHasFlag)
|
|
20489
|
-
return
|
|
19999
|
+
return hasFlag;
|
|
20490
20000
|
hasRequiredHasFlag = 1;
|
|
20491
|
-
|
|
20001
|
+
hasFlag = (flag, argv = process.argv) => {
|
|
20492
20002
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
20493
20003
|
const position = argv.indexOf(prefix + flag);
|
|
20494
20004
|
const terminatorPosition = argv.indexOf("--");
|
|
20495
20005
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
20496
20006
|
};
|
|
20497
|
-
return
|
|
20007
|
+
return hasFlag;
|
|
20498
20008
|
}
|
|
20499
20009
|
function requireSupportsColor() {
|
|
20500
20010
|
if (hasRequiredSupportsColor)
|
|
20501
20011
|
return supportsColor_1;
|
|
20502
20012
|
hasRequiredSupportsColor = 1;
|
|
20503
|
-
const
|
|
20504
|
-
const
|
|
20505
|
-
const
|
|
20506
|
-
const { env
|
|
20013
|
+
const os3 = require$$0$1;
|
|
20014
|
+
const tty = require$$1;
|
|
20015
|
+
const hasFlag2 = requireHasFlag();
|
|
20016
|
+
const { env } = process;
|
|
20507
20017
|
let forceColor;
|
|
20508
|
-
if (
|
|
20018
|
+
if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
|
|
20509
20019
|
forceColor = 0;
|
|
20510
|
-
} else if (
|
|
20020
|
+
} else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
|
|
20511
20021
|
forceColor = 1;
|
|
20512
20022
|
}
|
|
20513
|
-
if ("FORCE_COLOR" in
|
|
20514
|
-
if (
|
|
20023
|
+
if ("FORCE_COLOR" in env) {
|
|
20024
|
+
if (env.FORCE_COLOR === "true") {
|
|
20515
20025
|
forceColor = 1;
|
|
20516
|
-
} else if (
|
|
20026
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
20517
20027
|
forceColor = 0;
|
|
20518
20028
|
} else {
|
|
20519
|
-
forceColor =
|
|
20029
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
20520
20030
|
}
|
|
20521
20031
|
}
|
|
20522
|
-
function
|
|
20032
|
+
function translateLevel(level) {
|
|
20523
20033
|
if (level === 0) {
|
|
20524
20034
|
return false;
|
|
20525
20035
|
}
|
|
@@ -20530,70 +20040,70 @@ function requireSupportsColor() {
|
|
|
20530
20040
|
has16m: level >= 3
|
|
20531
20041
|
};
|
|
20532
20042
|
}
|
|
20533
|
-
function
|
|
20043
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
20534
20044
|
if (forceColor === 0) {
|
|
20535
20045
|
return 0;
|
|
20536
20046
|
}
|
|
20537
|
-
if (
|
|
20047
|
+
if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
|
|
20538
20048
|
return 3;
|
|
20539
20049
|
}
|
|
20540
|
-
if (
|
|
20050
|
+
if (hasFlag2("color=256")) {
|
|
20541
20051
|
return 2;
|
|
20542
20052
|
}
|
|
20543
20053
|
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
20544
20054
|
return 0;
|
|
20545
20055
|
}
|
|
20546
20056
|
const min = forceColor || 0;
|
|
20547
|
-
if (
|
|
20057
|
+
if (env.TERM === "dumb") {
|
|
20548
20058
|
return min;
|
|
20549
20059
|
}
|
|
20550
20060
|
if (process.platform === "win32") {
|
|
20551
|
-
const osRelease =
|
|
20061
|
+
const osRelease = os3.release().split(".");
|
|
20552
20062
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
20553
20063
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
20554
20064
|
}
|
|
20555
20065
|
return 1;
|
|
20556
20066
|
}
|
|
20557
|
-
if ("CI" in
|
|
20558
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => (sign in
|
|
20067
|
+
if ("CI" in env) {
|
|
20068
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
20559
20069
|
return 1;
|
|
20560
20070
|
}
|
|
20561
20071
|
return min;
|
|
20562
20072
|
}
|
|
20563
|
-
if ("TEAMCITY_VERSION" in
|
|
20564
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(
|
|
20073
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
20074
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
20565
20075
|
}
|
|
20566
|
-
if (
|
|
20076
|
+
if (env.COLORTERM === "truecolor") {
|
|
20567
20077
|
return 3;
|
|
20568
20078
|
}
|
|
20569
|
-
if ("TERM_PROGRAM" in
|
|
20570
|
-
const version = parseInt((
|
|
20571
|
-
switch (
|
|
20079
|
+
if ("TERM_PROGRAM" in env) {
|
|
20080
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
20081
|
+
switch (env.TERM_PROGRAM) {
|
|
20572
20082
|
case "iTerm.app":
|
|
20573
20083
|
return version >= 3 ? 3 : 2;
|
|
20574
20084
|
case "Apple_Terminal":
|
|
20575
20085
|
return 2;
|
|
20576
20086
|
}
|
|
20577
20087
|
}
|
|
20578
|
-
if (/-256(color)?$/i.test(
|
|
20088
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
20579
20089
|
return 2;
|
|
20580
20090
|
}
|
|
20581
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(
|
|
20091
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
20582
20092
|
return 1;
|
|
20583
20093
|
}
|
|
20584
|
-
if ("COLORTERM" in
|
|
20094
|
+
if ("COLORTERM" in env) {
|
|
20585
20095
|
return 1;
|
|
20586
20096
|
}
|
|
20587
20097
|
return min;
|
|
20588
20098
|
}
|
|
20589
20099
|
function getSupportLevel(stream2) {
|
|
20590
|
-
const level =
|
|
20591
|
-
return
|
|
20100
|
+
const level = supportsColor(stream2, stream2 && stream2.isTTY);
|
|
20101
|
+
return translateLevel(level);
|
|
20592
20102
|
}
|
|
20593
20103
|
supportsColor_1 = {
|
|
20594
20104
|
supportsColor: getSupportLevel,
|
|
20595
|
-
stdout:
|
|
20596
|
-
stderr:
|
|
20105
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
20106
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
20597
20107
|
};
|
|
20598
20108
|
return supportsColor_1;
|
|
20599
20109
|
}
|
|
@@ -20601,8 +20111,8 @@ function requireSupportsHyperlinks() {
|
|
|
20601
20111
|
if (hasRequiredSupportsHyperlinks)
|
|
20602
20112
|
return supportsHyperlinks$1;
|
|
20603
20113
|
hasRequiredSupportsHyperlinks = 1;
|
|
20604
|
-
const
|
|
20605
|
-
const
|
|
20114
|
+
const supportsColor = requireSupportsColor();
|
|
20115
|
+
const hasFlag2 = requireHasFlag();
|
|
20606
20116
|
function parseVersion(versionString) {
|
|
20607
20117
|
if (/^\d{3,4}$/.test(versionString)) {
|
|
20608
20118
|
const m2 = /(\d{1,2})(\d{2})/.exec(versionString) || [];
|
|
@@ -20633,16 +20143,16 @@ function requireSupportsHyperlinks() {
|
|
|
20633
20143
|
if (FORCE_HYPERLINK) {
|
|
20634
20144
|
return !(FORCE_HYPERLINK.length > 0 && parseInt(FORCE_HYPERLINK, 10) === 0);
|
|
20635
20145
|
}
|
|
20636
|
-
if (
|
|
20146
|
+
if (hasFlag2("no-hyperlink") || hasFlag2("no-hyperlinks") || hasFlag2("hyperlink=false") || hasFlag2("hyperlink=never")) {
|
|
20637
20147
|
return false;
|
|
20638
20148
|
}
|
|
20639
|
-
if (
|
|
20149
|
+
if (hasFlag2("hyperlink=true") || hasFlag2("hyperlink=always")) {
|
|
20640
20150
|
return true;
|
|
20641
20151
|
}
|
|
20642
20152
|
if (NETLIFY) {
|
|
20643
20153
|
return true;
|
|
20644
20154
|
}
|
|
20645
|
-
if (!
|
|
20155
|
+
if (!supportsColor.supportsColor(stream2)) {
|
|
20646
20156
|
return false;
|
|
20647
20157
|
}
|
|
20648
20158
|
if (stream2 && !stream2.isTTY) {
|
|
@@ -21011,7 +20521,7 @@ var ini$1, hasRequiredIni, iniExports, prompts$2, kleur, hasRequiredKleur, actio
|
|
|
21011
20521
|
SEP,
|
|
21012
20522
|
SEP,
|
|
21013
20523
|
BEL
|
|
21014
|
-
].join(""),
|
|
20524
|
+
].join(""), hasFlag, hasRequiredHasFlag, supportsColor_1, hasRequiredSupportsColor, supportsHyperlinks$1, hasRequiredSupportsHyperlinks, supportsHyperlinksExports, supportsHyperlinks, cjs, posix, hasRequiredPosix, win32, hasRequiredWin32, options2, hasRequiredOptions, hasRequiredCjs, lib, hasRequiredLib, libExports, which, CLI_TEMP_DIR, customRcPath, home, defaultRcPath;
|
|
21015
20525
|
var init_ni_B5qNAuoI = __esm(() => {
|
|
21016
20526
|
init_ansis();
|
|
21017
20527
|
init_dist3();
|
|
@@ -21051,7 +20561,7 @@ var init_ni_B5qNAuoI = __esm(() => {
|
|
|
21051
20561
|
options2 = {};
|
|
21052
20562
|
libExports = requireLib();
|
|
21053
20563
|
which = /* @__PURE__ */ getDefaultExportFromCjs(libExports);
|
|
21054
|
-
CLI_TEMP_DIR = join2(
|
|
20564
|
+
CLI_TEMP_DIR = join2(os2.tmpdir(), "antfu-ni");
|
|
21055
20565
|
customRcPath = process$1.env.NI_CONFIG_FILE;
|
|
21056
20566
|
home = process$1.platform === "win32" ? process$1.env.USERPROFILE : process$1.env.HOME;
|
|
21057
20567
|
defaultRcPath = path3.join(home || "~/", ".nirc");
|
|
@@ -21078,6 +20588,496 @@ var init_dist4 = __esm(() => {
|
|
|
21078
20588
|
init_constants();
|
|
21079
20589
|
});
|
|
21080
20590
|
|
|
20591
|
+
// ../../node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
20592
|
+
function assembleStyles() {
|
|
20593
|
+
const codes = new Map;
|
|
20594
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
20595
|
+
for (const [styleName, style2] of Object.entries(group)) {
|
|
20596
|
+
styles[styleName] = {
|
|
20597
|
+
open: `\x1B[${style2[0]}m`,
|
|
20598
|
+
close: `\x1B[${style2[1]}m`
|
|
20599
|
+
};
|
|
20600
|
+
group[styleName] = styles[styleName];
|
|
20601
|
+
codes.set(style2[0], style2[1]);
|
|
20602
|
+
}
|
|
20603
|
+
Object.defineProperty(styles, groupName, {
|
|
20604
|
+
value: group,
|
|
20605
|
+
enumerable: false
|
|
20606
|
+
});
|
|
20607
|
+
}
|
|
20608
|
+
Object.defineProperty(styles, "codes", {
|
|
20609
|
+
value: codes,
|
|
20610
|
+
enumerable: false
|
|
20611
|
+
});
|
|
20612
|
+
styles.color.close = "\x1B[39m";
|
|
20613
|
+
styles.bgColor.close = "\x1B[49m";
|
|
20614
|
+
styles.color.ansi = wrapAnsi16();
|
|
20615
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
20616
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
20617
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
20618
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
20619
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
20620
|
+
Object.defineProperties(styles, {
|
|
20621
|
+
rgbToAnsi256: {
|
|
20622
|
+
value(red2, green2, blue2) {
|
|
20623
|
+
if (red2 === green2 && green2 === blue2) {
|
|
20624
|
+
if (red2 < 8) {
|
|
20625
|
+
return 16;
|
|
20626
|
+
}
|
|
20627
|
+
if (red2 > 248) {
|
|
20628
|
+
return 231;
|
|
20629
|
+
}
|
|
20630
|
+
return Math.round((red2 - 8) / 247 * 24) + 232;
|
|
20631
|
+
}
|
|
20632
|
+
return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(blue2 / 255 * 5);
|
|
20633
|
+
},
|
|
20634
|
+
enumerable: false
|
|
20635
|
+
},
|
|
20636
|
+
hexToRgb: {
|
|
20637
|
+
value(hex) {
|
|
20638
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
20639
|
+
if (!matches) {
|
|
20640
|
+
return [0, 0, 0];
|
|
20641
|
+
}
|
|
20642
|
+
let [colorString] = matches;
|
|
20643
|
+
if (colorString.length === 3) {
|
|
20644
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
20645
|
+
}
|
|
20646
|
+
const integer = Number.parseInt(colorString, 16);
|
|
20647
|
+
return [
|
|
20648
|
+
integer >> 16 & 255,
|
|
20649
|
+
integer >> 8 & 255,
|
|
20650
|
+
integer & 255
|
|
20651
|
+
];
|
|
20652
|
+
},
|
|
20653
|
+
enumerable: false
|
|
20654
|
+
},
|
|
20655
|
+
hexToAnsi256: {
|
|
20656
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
20657
|
+
enumerable: false
|
|
20658
|
+
},
|
|
20659
|
+
ansi256ToAnsi: {
|
|
20660
|
+
value(code) {
|
|
20661
|
+
if (code < 8) {
|
|
20662
|
+
return 30 + code;
|
|
20663
|
+
}
|
|
20664
|
+
if (code < 16) {
|
|
20665
|
+
return 90 + (code - 8);
|
|
20666
|
+
}
|
|
20667
|
+
let red2;
|
|
20668
|
+
let green2;
|
|
20669
|
+
let blue2;
|
|
20670
|
+
if (code >= 232) {
|
|
20671
|
+
red2 = ((code - 232) * 10 + 8) / 255;
|
|
20672
|
+
green2 = red2;
|
|
20673
|
+
blue2 = red2;
|
|
20674
|
+
} else {
|
|
20675
|
+
code -= 16;
|
|
20676
|
+
const remainder = code % 36;
|
|
20677
|
+
red2 = Math.floor(code / 36) / 5;
|
|
20678
|
+
green2 = Math.floor(remainder / 6) / 5;
|
|
20679
|
+
blue2 = remainder % 6 / 5;
|
|
20680
|
+
}
|
|
20681
|
+
const value = Math.max(red2, green2, blue2) * 2;
|
|
20682
|
+
if (value === 0) {
|
|
20683
|
+
return 30;
|
|
20684
|
+
}
|
|
20685
|
+
let result = 30 + (Math.round(blue2) << 2 | Math.round(green2) << 1 | Math.round(red2));
|
|
20686
|
+
if (value === 2) {
|
|
20687
|
+
result += 60;
|
|
20688
|
+
}
|
|
20689
|
+
return result;
|
|
20690
|
+
},
|
|
20691
|
+
enumerable: false
|
|
20692
|
+
},
|
|
20693
|
+
rgbToAnsi: {
|
|
20694
|
+
value: (red2, green2, blue2) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red2, green2, blue2)),
|
|
20695
|
+
enumerable: false
|
|
20696
|
+
},
|
|
20697
|
+
hexToAnsi: {
|
|
20698
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
20699
|
+
enumerable: false
|
|
20700
|
+
}
|
|
20701
|
+
});
|
|
20702
|
+
return styles;
|
|
20703
|
+
}
|
|
20704
|
+
var ANSI_BACKGROUND_OFFSET = 10, wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m = (offset = 0) => (red2, green2, blue2) => `\x1B[${38 + offset};2;${red2};${green2};${blue2}m`, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
|
|
20705
|
+
var init_ansi_styles = __esm(() => {
|
|
20706
|
+
styles = {
|
|
20707
|
+
modifier: {
|
|
20708
|
+
reset: [0, 0],
|
|
20709
|
+
bold: [1, 22],
|
|
20710
|
+
dim: [2, 22],
|
|
20711
|
+
italic: [3, 23],
|
|
20712
|
+
underline: [4, 24],
|
|
20713
|
+
overline: [53, 55],
|
|
20714
|
+
inverse: [7, 27],
|
|
20715
|
+
hidden: [8, 28],
|
|
20716
|
+
strikethrough: [9, 29]
|
|
20717
|
+
},
|
|
20718
|
+
color: {
|
|
20719
|
+
black: [30, 39],
|
|
20720
|
+
red: [31, 39],
|
|
20721
|
+
green: [32, 39],
|
|
20722
|
+
yellow: [33, 39],
|
|
20723
|
+
blue: [34, 39],
|
|
20724
|
+
magenta: [35, 39],
|
|
20725
|
+
cyan: [36, 39],
|
|
20726
|
+
white: [37, 39],
|
|
20727
|
+
blackBright: [90, 39],
|
|
20728
|
+
gray: [90, 39],
|
|
20729
|
+
grey: [90, 39],
|
|
20730
|
+
redBright: [91, 39],
|
|
20731
|
+
greenBright: [92, 39],
|
|
20732
|
+
yellowBright: [93, 39],
|
|
20733
|
+
blueBright: [94, 39],
|
|
20734
|
+
magentaBright: [95, 39],
|
|
20735
|
+
cyanBright: [96, 39],
|
|
20736
|
+
whiteBright: [97, 39]
|
|
20737
|
+
},
|
|
20738
|
+
bgColor: {
|
|
20739
|
+
bgBlack: [40, 49],
|
|
20740
|
+
bgRed: [41, 49],
|
|
20741
|
+
bgGreen: [42, 49],
|
|
20742
|
+
bgYellow: [43, 49],
|
|
20743
|
+
bgBlue: [44, 49],
|
|
20744
|
+
bgMagenta: [45, 49],
|
|
20745
|
+
bgCyan: [46, 49],
|
|
20746
|
+
bgWhite: [47, 49],
|
|
20747
|
+
bgBlackBright: [100, 49],
|
|
20748
|
+
bgGray: [100, 49],
|
|
20749
|
+
bgGrey: [100, 49],
|
|
20750
|
+
bgRedBright: [101, 49],
|
|
20751
|
+
bgGreenBright: [102, 49],
|
|
20752
|
+
bgYellowBright: [103, 49],
|
|
20753
|
+
bgBlueBright: [104, 49],
|
|
20754
|
+
bgMagentaBright: [105, 49],
|
|
20755
|
+
bgCyanBright: [106, 49],
|
|
20756
|
+
bgWhiteBright: [107, 49]
|
|
20757
|
+
}
|
|
20758
|
+
};
|
|
20759
|
+
modifierNames = Object.keys(styles.modifier);
|
|
20760
|
+
foregroundColorNames = Object.keys(styles.color);
|
|
20761
|
+
backgroundColorNames = Object.keys(styles.bgColor);
|
|
20762
|
+
colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
20763
|
+
ansiStyles = assembleStyles();
|
|
20764
|
+
ansi_styles_default = ansiStyles;
|
|
20765
|
+
});
|
|
20766
|
+
|
|
20767
|
+
// ../../node_modules/chalk/source/vendor/supports-color/index.js
|
|
20768
|
+
import process4 from "node:process";
|
|
20769
|
+
import os3 from "node:os";
|
|
20770
|
+
import tty from "node:tty";
|
|
20771
|
+
function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process4.argv) {
|
|
20772
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
20773
|
+
const position = argv.indexOf(prefix + flag);
|
|
20774
|
+
const terminatorPosition = argv.indexOf("--");
|
|
20775
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
20776
|
+
}
|
|
20777
|
+
function envForceColor() {
|
|
20778
|
+
if ("FORCE_COLOR" in env) {
|
|
20779
|
+
if (env.FORCE_COLOR === "true") {
|
|
20780
|
+
return 1;
|
|
20781
|
+
}
|
|
20782
|
+
if (env.FORCE_COLOR === "false") {
|
|
20783
|
+
return 0;
|
|
20784
|
+
}
|
|
20785
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
20786
|
+
}
|
|
20787
|
+
}
|
|
20788
|
+
function translateLevel(level) {
|
|
20789
|
+
if (level === 0) {
|
|
20790
|
+
return false;
|
|
20791
|
+
}
|
|
20792
|
+
return {
|
|
20793
|
+
level,
|
|
20794
|
+
hasBasic: true,
|
|
20795
|
+
has256: level >= 2,
|
|
20796
|
+
has16m: level >= 3
|
|
20797
|
+
};
|
|
20798
|
+
}
|
|
20799
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
20800
|
+
const noFlagForceColor = envForceColor();
|
|
20801
|
+
if (noFlagForceColor !== undefined) {
|
|
20802
|
+
flagForceColor = noFlagForceColor;
|
|
20803
|
+
}
|
|
20804
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
20805
|
+
if (forceColor === 0) {
|
|
20806
|
+
return 0;
|
|
20807
|
+
}
|
|
20808
|
+
if (sniffFlags) {
|
|
20809
|
+
if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
|
|
20810
|
+
return 3;
|
|
20811
|
+
}
|
|
20812
|
+
if (hasFlag2("color=256")) {
|
|
20813
|
+
return 2;
|
|
20814
|
+
}
|
|
20815
|
+
}
|
|
20816
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
20817
|
+
return 1;
|
|
20818
|
+
}
|
|
20819
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
20820
|
+
return 0;
|
|
20821
|
+
}
|
|
20822
|
+
const min = forceColor || 0;
|
|
20823
|
+
if (env.TERM === "dumb") {
|
|
20824
|
+
return min;
|
|
20825
|
+
}
|
|
20826
|
+
if (process4.platform === "win32") {
|
|
20827
|
+
const osRelease = os3.release().split(".");
|
|
20828
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
20829
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
20830
|
+
}
|
|
20831
|
+
return 1;
|
|
20832
|
+
}
|
|
20833
|
+
if ("CI" in env) {
|
|
20834
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env))) {
|
|
20835
|
+
return 3;
|
|
20836
|
+
}
|
|
20837
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
20838
|
+
return 1;
|
|
20839
|
+
}
|
|
20840
|
+
return min;
|
|
20841
|
+
}
|
|
20842
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
20843
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
20844
|
+
}
|
|
20845
|
+
if (env.COLORTERM === "truecolor") {
|
|
20846
|
+
return 3;
|
|
20847
|
+
}
|
|
20848
|
+
if (env.TERM === "xterm-kitty") {
|
|
20849
|
+
return 3;
|
|
20850
|
+
}
|
|
20851
|
+
if (env.TERM === "xterm-ghostty") {
|
|
20852
|
+
return 3;
|
|
20853
|
+
}
|
|
20854
|
+
if (env.TERM === "wezterm") {
|
|
20855
|
+
return 3;
|
|
20856
|
+
}
|
|
20857
|
+
if ("TERM_PROGRAM" in env) {
|
|
20858
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
20859
|
+
switch (env.TERM_PROGRAM) {
|
|
20860
|
+
case "iTerm.app": {
|
|
20861
|
+
return version >= 3 ? 3 : 2;
|
|
20862
|
+
}
|
|
20863
|
+
case "Apple_Terminal": {
|
|
20864
|
+
return 2;
|
|
20865
|
+
}
|
|
20866
|
+
}
|
|
20867
|
+
}
|
|
20868
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
20869
|
+
return 2;
|
|
20870
|
+
}
|
|
20871
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
20872
|
+
return 1;
|
|
20873
|
+
}
|
|
20874
|
+
if ("COLORTERM" in env) {
|
|
20875
|
+
return 1;
|
|
20876
|
+
}
|
|
20877
|
+
return min;
|
|
20878
|
+
}
|
|
20879
|
+
function createSupportsColor(stream2, options3 = {}) {
|
|
20880
|
+
const level = _supportsColor(stream2, {
|
|
20881
|
+
streamIsTTY: stream2 && stream2.isTTY,
|
|
20882
|
+
...options3
|
|
20883
|
+
});
|
|
20884
|
+
return translateLevel(level);
|
|
20885
|
+
}
|
|
20886
|
+
var env, flagForceColor, supportsColor, supports_color_default;
|
|
20887
|
+
var init_supports_color = __esm(() => {
|
|
20888
|
+
({ env } = process4);
|
|
20889
|
+
if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
|
|
20890
|
+
flagForceColor = 0;
|
|
20891
|
+
} else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
|
|
20892
|
+
flagForceColor = 1;
|
|
20893
|
+
}
|
|
20894
|
+
supportsColor = {
|
|
20895
|
+
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
20896
|
+
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
20897
|
+
};
|
|
20898
|
+
supports_color_default = supportsColor;
|
|
20899
|
+
});
|
|
20900
|
+
|
|
20901
|
+
// ../../node_modules/chalk/source/utilities.js
|
|
20902
|
+
function stringReplaceAll(string, substring, replacer) {
|
|
20903
|
+
let index = string.indexOf(substring);
|
|
20904
|
+
if (index === -1) {
|
|
20905
|
+
return string;
|
|
20906
|
+
}
|
|
20907
|
+
const substringLength = substring.length;
|
|
20908
|
+
let endIndex = 0;
|
|
20909
|
+
let returnValue = "";
|
|
20910
|
+
do {
|
|
20911
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
20912
|
+
endIndex = index + substringLength;
|
|
20913
|
+
index = string.indexOf(substring, endIndex);
|
|
20914
|
+
} while (index !== -1);
|
|
20915
|
+
returnValue += string.slice(endIndex);
|
|
20916
|
+
return returnValue;
|
|
20917
|
+
}
|
|
20918
|
+
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
20919
|
+
let endIndex = 0;
|
|
20920
|
+
let returnValue = "";
|
|
20921
|
+
do {
|
|
20922
|
+
const gotCR = string[index - 1] === "\r";
|
|
20923
|
+
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
|
|
20924
|
+
` : `
|
|
20925
|
+
`) + postfix;
|
|
20926
|
+
endIndex = index + 1;
|
|
20927
|
+
index = string.indexOf(`
|
|
20928
|
+
`, endIndex);
|
|
20929
|
+
} while (index !== -1);
|
|
20930
|
+
returnValue += string.slice(endIndex);
|
|
20931
|
+
return returnValue;
|
|
20932
|
+
}
|
|
20933
|
+
|
|
20934
|
+
// ../../node_modules/chalk/source/index.js
|
|
20935
|
+
function createChalk(options3) {
|
|
20936
|
+
return chalkFactory(options3);
|
|
20937
|
+
}
|
|
20938
|
+
var stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles2, applyOptions = (object, options3 = {}) => {
|
|
20939
|
+
if (options3.level && !(Number.isInteger(options3.level) && options3.level >= 0 && options3.level <= 3)) {
|
|
20940
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
20941
|
+
}
|
|
20942
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
20943
|
+
object.level = options3.level === undefined ? colorLevel : options3.level;
|
|
20944
|
+
}, chalkFactory = (options3) => {
|
|
20945
|
+
const chalk = (...strings) => strings.join(" ");
|
|
20946
|
+
applyOptions(chalk, options3);
|
|
20947
|
+
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
20948
|
+
return chalk;
|
|
20949
|
+
}, getModelAnsi = (model, level, type, ...arguments_) => {
|
|
20950
|
+
if (model === "rgb") {
|
|
20951
|
+
if (level === "ansi16m") {
|
|
20952
|
+
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
20953
|
+
}
|
|
20954
|
+
if (level === "ansi256") {
|
|
20955
|
+
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
20956
|
+
}
|
|
20957
|
+
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
20958
|
+
}
|
|
20959
|
+
if (model === "hex") {
|
|
20960
|
+
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
20961
|
+
}
|
|
20962
|
+
return ansi_styles_default[type][model](...arguments_);
|
|
20963
|
+
}, usedModels, proto, createStyler = (open, close, parent) => {
|
|
20964
|
+
let openAll;
|
|
20965
|
+
let closeAll;
|
|
20966
|
+
if (parent === undefined) {
|
|
20967
|
+
openAll = open;
|
|
20968
|
+
closeAll = close;
|
|
20969
|
+
} else {
|
|
20970
|
+
openAll = parent.openAll + open;
|
|
20971
|
+
closeAll = close + parent.closeAll;
|
|
20972
|
+
}
|
|
20973
|
+
return {
|
|
20974
|
+
open,
|
|
20975
|
+
close,
|
|
20976
|
+
openAll,
|
|
20977
|
+
closeAll,
|
|
20978
|
+
parent
|
|
20979
|
+
};
|
|
20980
|
+
}, createBuilder = (self, _styler, _isEmpty) => {
|
|
20981
|
+
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
20982
|
+
Object.setPrototypeOf(builder, proto);
|
|
20983
|
+
builder[GENERATOR] = self;
|
|
20984
|
+
builder[STYLER] = _styler;
|
|
20985
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
20986
|
+
return builder;
|
|
20987
|
+
}, applyStyle = (self, string) => {
|
|
20988
|
+
if (self.level <= 0 || !string) {
|
|
20989
|
+
return self[IS_EMPTY] ? "" : string;
|
|
20990
|
+
}
|
|
20991
|
+
let styler = self[STYLER];
|
|
20992
|
+
if (styler === undefined) {
|
|
20993
|
+
return string;
|
|
20994
|
+
}
|
|
20995
|
+
const { openAll, closeAll } = styler;
|
|
20996
|
+
if (string.includes("\x1B")) {
|
|
20997
|
+
while (styler !== undefined) {
|
|
20998
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
20999
|
+
styler = styler.parent;
|
|
21000
|
+
}
|
|
21001
|
+
}
|
|
21002
|
+
const lfIndex = string.indexOf(`
|
|
21003
|
+
`);
|
|
21004
|
+
if (lfIndex !== -1) {
|
|
21005
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
21006
|
+
}
|
|
21007
|
+
return openAll + string + closeAll;
|
|
21008
|
+
}, chalk, chalkStderr, source_default3;
|
|
21009
|
+
var init_source4 = __esm(() => {
|
|
21010
|
+
init_ansi_styles();
|
|
21011
|
+
init_supports_color();
|
|
21012
|
+
init_ansi_styles();
|
|
21013
|
+
({ stdout: stdoutColor, stderr: stderrColor } = supports_color_default);
|
|
21014
|
+
GENERATOR = Symbol("GENERATOR");
|
|
21015
|
+
STYLER = Symbol("STYLER");
|
|
21016
|
+
IS_EMPTY = Symbol("IS_EMPTY");
|
|
21017
|
+
levelMapping = [
|
|
21018
|
+
"ansi",
|
|
21019
|
+
"ansi",
|
|
21020
|
+
"ansi256",
|
|
21021
|
+
"ansi16m"
|
|
21022
|
+
];
|
|
21023
|
+
styles2 = Object.create(null);
|
|
21024
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
21025
|
+
for (const [styleName, style2] of Object.entries(ansi_styles_default)) {
|
|
21026
|
+
styles2[styleName] = {
|
|
21027
|
+
get() {
|
|
21028
|
+
const builder = createBuilder(this, createStyler(style2.open, style2.close, this[STYLER]), this[IS_EMPTY]);
|
|
21029
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
21030
|
+
return builder;
|
|
21031
|
+
}
|
|
21032
|
+
};
|
|
21033
|
+
}
|
|
21034
|
+
styles2.visible = {
|
|
21035
|
+
get() {
|
|
21036
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
21037
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
21038
|
+
return builder;
|
|
21039
|
+
}
|
|
21040
|
+
};
|
|
21041
|
+
usedModels = ["rgb", "hex", "ansi256"];
|
|
21042
|
+
for (const model of usedModels) {
|
|
21043
|
+
styles2[model] = {
|
|
21044
|
+
get() {
|
|
21045
|
+
const { level } = this;
|
|
21046
|
+
return function(...arguments_) {
|
|
21047
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
21048
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
21049
|
+
};
|
|
21050
|
+
}
|
|
21051
|
+
};
|
|
21052
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
21053
|
+
styles2[bgModel] = {
|
|
21054
|
+
get() {
|
|
21055
|
+
const { level } = this;
|
|
21056
|
+
return function(...arguments_) {
|
|
21057
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
21058
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
21059
|
+
};
|
|
21060
|
+
}
|
|
21061
|
+
};
|
|
21062
|
+
}
|
|
21063
|
+
proto = Object.defineProperties(() => {}, {
|
|
21064
|
+
...styles2,
|
|
21065
|
+
level: {
|
|
21066
|
+
enumerable: true,
|
|
21067
|
+
get() {
|
|
21068
|
+
return this[GENERATOR].level;
|
|
21069
|
+
},
|
|
21070
|
+
set(level) {
|
|
21071
|
+
this[GENERATOR].level = level;
|
|
21072
|
+
}
|
|
21073
|
+
}
|
|
21074
|
+
});
|
|
21075
|
+
Object.defineProperties(createChalk.prototype, styles2);
|
|
21076
|
+
chalk = createChalk();
|
|
21077
|
+
chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
21078
|
+
source_default3 = chalk;
|
|
21079
|
+
});
|
|
21080
|
+
|
|
21081
21081
|
// ../../node_modules/is-plain-obj/index.js
|
|
21082
21082
|
function isPlainObject2(value) {
|
|
21083
21083
|
if (typeof value !== "object" || value === null) {
|
|
@@ -28054,20 +28054,20 @@ async function getMissingDependenciesFor(targetDir, requiredDeps) {
|
|
|
28054
28054
|
async function checkBaseDependencies(targetDir) {
|
|
28055
28055
|
const missing = await getMissingDependenciesFor(targetDir, BASE_DEPENDENCIES);
|
|
28056
28056
|
if (missing.dependencies.length > 0) {
|
|
28057
|
-
console.log(
|
|
28057
|
+
console.log(source_default3.yellow(`
|
|
28058
28058
|
⚠ Required peer dependency not found: @secondlayer/stacks`));
|
|
28059
|
-
console.log(
|
|
28060
|
-
console.log(
|
|
28059
|
+
console.log(source_default3.gray(" The generated code requires @secondlayer/stacks to work."));
|
|
28060
|
+
console.log(source_default3.gray(" Install it with:"));
|
|
28061
28061
|
const packageManager = await getPackageManager(targetDir);
|
|
28062
28062
|
const installCmd = packageManager === "npm" ? "install" : "add";
|
|
28063
|
-
console.log(
|
|
28063
|
+
console.log(source_default3.cyan(` ${packageManager} ${installCmd} @secondlayer/stacks
|
|
28064
28064
|
`));
|
|
28065
28065
|
}
|
|
28066
28066
|
}
|
|
28067
28067
|
var BASE_DEPENDENCIES;
|
|
28068
28068
|
var init_dependencies = __esm(() => {
|
|
28069
28069
|
init_dist4();
|
|
28070
|
-
|
|
28070
|
+
init_source4();
|
|
28071
28071
|
init_execa();
|
|
28072
28072
|
BASE_DEPENDENCIES = {
|
|
28073
28073
|
dependencies: ["@secondlayer/stacks"],
|
|
@@ -28127,16 +28127,14 @@ function deriveContractName(filePath) {
|
|
|
28127
28127
|
const basename = path10.basename(filePath, ".clar");
|
|
28128
28128
|
return basename.replace(/[-_](.)/g, (_2, char) => char.toUpperCase()).replace(/^(.)/, (_2, char) => char.toLowerCase()).replace(/^\d/, "_$&");
|
|
28129
28129
|
}
|
|
28130
|
-
async function buildConfigFromInputs(parsedInputs, outPath,
|
|
28130
|
+
async function buildConfigFromInputs(parsedInputs, outPath, defaultAddress) {
|
|
28131
28131
|
const contracts = [];
|
|
28132
28132
|
const deployer = defaultAddress || DEFAULT_DEVNET_ADDRESS;
|
|
28133
28133
|
if (parsedInputs.files.length > 0 && !defaultAddress) {
|
|
28134
|
-
|
|
28135
|
-
Generated contract addresses won't match deployed addresses.
|
|
28136
|
-
Set defaultAddress in config or use deployed contract addresses.`));
|
|
28134
|
+
warn(`Using placeholder address (${deployer}) for local contracts. Generated contract addresses won't match deployed addresses. Set defaultAddress in config or use deployed contract addresses.`);
|
|
28137
28135
|
}
|
|
28138
28136
|
if (parsedInputs.files.length > 0) {
|
|
28139
|
-
|
|
28137
|
+
warn("Return types can't be read from Clarity source and will be `any`. Use the clarinet() plugin or a deployed contract id for exact types.");
|
|
28140
28138
|
}
|
|
28141
28139
|
for (const file of parsedInputs.files) {
|
|
28142
28140
|
const abi = await parseClarityFile(file);
|
|
@@ -28152,7 +28150,7 @@ async function buildConfigFromInputs(parsedInputs, outPath, apiKey, defaultAddre
|
|
|
28152
28150
|
const { address, contractName } = parseContractId(contractId);
|
|
28153
28151
|
const network = inferNetwork(address) ?? "mainnet";
|
|
28154
28152
|
try {
|
|
28155
|
-
const apiClient = new StacksApiClient(network
|
|
28153
|
+
const apiClient = new StacksApiClient(network);
|
|
28156
28154
|
const contractInfo = await apiClient.getContractInfo(contractId);
|
|
28157
28155
|
const abi = parseApiResponse(contractInfo);
|
|
28158
28156
|
const name = toCamelCase2(contractName);
|
|
@@ -28185,25 +28183,26 @@ async function runGenerate(files, options3, { exitOnError }) {
|
|
|
28185
28183
|
let config;
|
|
28186
28184
|
if (files && files.length > 0) {
|
|
28187
28185
|
if (!options3.out) {
|
|
28188
|
-
|
|
28189
|
-
|
|
28190
|
-
|
|
28191
|
-
|
|
28192
|
-
|
|
28193
|
-
|
|
28194
|
-
|
|
28195
|
-
|
|
28186
|
+
printError("Output path required", {
|
|
28187
|
+
hint: "When using direct inputs, pass -o/--output."
|
|
28188
|
+
});
|
|
28189
|
+
note(" secondlayer codegen contracts ./contracts/*.clar -o ./src/generated.ts");
|
|
28190
|
+
note(" secondlayer codegen contracts SP2C2YFP12AJZB1M6DY7SF9A3PRHWKGYGVWQKW3.my-token -o ./src/generated.ts");
|
|
28191
|
+
if (exitOnError)
|
|
28192
|
+
process.exit(1);
|
|
28193
|
+
return;
|
|
28196
28194
|
}
|
|
28197
28195
|
const parsedInputs = await parseInputs(files);
|
|
28198
28196
|
const totalInputs = parsedInputs.files.length + parsedInputs.contractIds.length;
|
|
28199
28197
|
if (totalInputs === 0) {
|
|
28200
|
-
|
|
28201
|
-
|
|
28202
|
-
|
|
28203
|
-
|
|
28198
|
+
printError("No valid inputs found", {
|
|
28199
|
+
hint: "No .clar files or contract addresses matched the provided inputs."
|
|
28200
|
+
});
|
|
28201
|
+
if (exitOnError)
|
|
28202
|
+
process.exit(1);
|
|
28203
|
+
return;
|
|
28204
28204
|
}
|
|
28205
|
-
|
|
28206
|
-
config = await buildConfigFromInputs(parsedInputs, options3.out, apiKey);
|
|
28205
|
+
config = await buildConfigFromInputs(parsedInputs, options3.out);
|
|
28207
28206
|
} else {
|
|
28208
28207
|
config = await loadConfig(options3.config);
|
|
28209
28208
|
}
|
|
@@ -28228,11 +28227,9 @@ No .clar files or contract addresses matched the provided inputs`));
|
|
|
28228
28227
|
}));
|
|
28229
28228
|
const processedContracts = await pluginManager.transformContracts(contractConfigs, resolvedConfig);
|
|
28230
28229
|
if (processedContracts.length === 0) {
|
|
28231
|
-
|
|
28232
|
-
|
|
28233
|
-
|
|
28234
|
-
console.log(" • Add contracts to your config file, or");
|
|
28235
|
-
console.log(" • Use plugins like clarinet() for local contracts");
|
|
28230
|
+
warn("No contracts found to generate");
|
|
28231
|
+
note(" Add contracts to your config file, or");
|
|
28232
|
+
note(" Use plugins like clarinet() for local contracts");
|
|
28236
28233
|
return;
|
|
28237
28234
|
}
|
|
28238
28235
|
const outputs = await pluginManager.executeGeneration(processedContracts, resolvedConfig);
|
|
@@ -28249,11 +28246,9 @@ To get started:`);
|
|
|
28249
28246
|
await checkBaseDependencies(process.cwd());
|
|
28250
28247
|
const contractCount = processedContracts.length;
|
|
28251
28248
|
const contractWord = contractCount === 1 ? "contract" : "contracts";
|
|
28252
|
-
|
|
28249
|
+
success(`Generated \`${config.out}\` for ${contractCount} ${contractWord}`);
|
|
28253
28250
|
} catch (error2) {
|
|
28254
|
-
|
|
28255
|
-
console.error(source_default.red(`
|
|
28256
|
-
${getErrorMessage2(error2)}`));
|
|
28251
|
+
printError(`Generation failed: ${getErrorMessage2(error2)}`);
|
|
28257
28252
|
if (process.env.DEBUG && error2 instanceof Error) {
|
|
28258
28253
|
console.error(error2.stack);
|
|
28259
28254
|
}
|
|
@@ -28310,10 +28305,10 @@ async function watchAndRegenerate(files, options3) {
|
|
|
28310
28305
|
const { watch } = await import("node:fs");
|
|
28311
28306
|
const targets = await collectWatchTargets(files, options3);
|
|
28312
28307
|
if (targets.length === 0) {
|
|
28313
|
-
|
|
28308
|
+
warn("Nothing to watch — no local inputs were found");
|
|
28314
28309
|
return;
|
|
28315
28310
|
}
|
|
28316
|
-
|
|
28311
|
+
info(`Watching ${targets.length} ${targets.length === 1 ? "location" : "locations"} for changes — press Ctrl+C to stop`);
|
|
28317
28312
|
let timer2;
|
|
28318
28313
|
let running = false;
|
|
28319
28314
|
let rerunRequested = false;
|
|
@@ -28323,7 +28318,7 @@ async function watchAndRegenerate(files, options3) {
|
|
|
28323
28318
|
return;
|
|
28324
28319
|
}
|
|
28325
28320
|
running = true;
|
|
28326
|
-
|
|
28321
|
+
note(`${changed ? `${changed} changed` : "Change detected"} — regenerating...`);
|
|
28327
28322
|
await runGenerate(files, options3, { exitOnError: false });
|
|
28328
28323
|
running = false;
|
|
28329
28324
|
if (rerunRequested) {
|
|
@@ -28343,16 +28338,16 @@ async function watchAndRegenerate(files, options3) {
|
|
|
28343
28338
|
try {
|
|
28344
28339
|
watch(target.path, { recursive: target.recursive }, (_event, filename) => onEvent(filename));
|
|
28345
28340
|
} catch {
|
|
28346
|
-
|
|
28341
|
+
warn(`Could not watch ${target.path}`);
|
|
28347
28342
|
}
|
|
28348
28343
|
}
|
|
28349
28344
|
await new Promise(() => {});
|
|
28350
28345
|
}
|
|
28351
28346
|
var import_fast_glob, DEFAULT_DEVNET_ADDRESS = "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM";
|
|
28352
28347
|
var init_generate = __esm(() => {
|
|
28353
|
-
init_source();
|
|
28354
28348
|
init_plugin_manager();
|
|
28355
28349
|
init_contract();
|
|
28350
|
+
init_output();
|
|
28356
28351
|
init_clarity();
|
|
28357
28352
|
init_api();
|
|
28358
28353
|
init_config();
|
|
@@ -36797,7 +36792,7 @@ var {
|
|
|
36797
36792
|
// package.json
|
|
36798
36793
|
var package_default = {
|
|
36799
36794
|
name: "@secondlayer/cli",
|
|
36800
|
-
version: "14.1.
|
|
36795
|
+
version: "14.1.1",
|
|
36801
36796
|
description: "Run a Stacks index on your own hardware — set it up, restore verified history, and keep it current.",
|
|
36802
36797
|
repository: {
|
|
36803
36798
|
type: "git",
|
|
@@ -36842,10 +36837,10 @@ var package_default = {
|
|
|
36842
36837
|
"@opentui/react": "^0.5.3",
|
|
36843
36838
|
"@secondlayer/bundler": "^0.5.1",
|
|
36844
36839
|
"@secondlayer/scaffold": "^1.5.5",
|
|
36845
|
-
"@secondlayer/sdk": "^10.
|
|
36840
|
+
"@secondlayer/sdk": "^10.1.1",
|
|
36846
36841
|
"@secondlayer/shared": "^11.2.1",
|
|
36847
36842
|
"@secondlayer/stacks": "^5.1.0",
|
|
36848
|
-
"@secondlayer/subgraphs": "^4.1.
|
|
36843
|
+
"@secondlayer/subgraphs": "^4.1.5",
|
|
36849
36844
|
esbuild: "^0.27.4",
|
|
36850
36845
|
react: "^19.1.0",
|
|
36851
36846
|
"smol-toml": "^1.6.1",
|
|
@@ -36988,7 +36983,7 @@ async function runRefill(opts) {
|
|
|
36988
36983
|
// src/commands/codegen.ts
|
|
36989
36984
|
function registerCodegenCommand(program2) {
|
|
36990
36985
|
const codegen = program2.command("codegen").description("Generate typed code: contracts, subgraphs, Index, clients");
|
|
36991
|
-
codegen.command("contracts [files...]").description("Generate TypeScript interfaces from Clarity contracts").option("-c, --config <path>", "Path to config file").option("-o, --output <path>", "Output file path").option("-
|
|
36986
|
+
codegen.command("contracts [files...]").description("Generate TypeScript interfaces from Clarity contracts").option("-c, --config <path>", "Path to config file").option("-o, --output <path>", "Output file path").option("-w, --watch", "Watch for changes").action(async (files, options3) => {
|
|
36992
36987
|
const { generate: generate2 } = await Promise.resolve().then(() => (init_generate(), exports_generate));
|
|
36993
36988
|
await generate2(files, { ...options3, out: options3.output });
|
|
36994
36989
|
});
|
|
@@ -42774,5 +42769,5 @@ program.commandsGroup("Archive:");
|
|
|
42774
42769
|
registerCreditsCommand(program);
|
|
42775
42770
|
program.parse();
|
|
42776
42771
|
|
|
42777
|
-
//# debugId=
|
|
42772
|
+
//# debugId=A5FE446DEB77888264756E2164756E21
|
|
42778
42773
|
//# sourceMappingURL=cli.js.map
|