maxsimcli 1.0.10 → 1.0.11
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/dist/assets/CHANGELOG.md +13 -0
- package/dist/assets/templates/commands/maxsim/roadmap.md +19 -0
- package/dist/assets/templates/workflows/discuss-phase.md +6 -0
- package/dist/assets/templates/workflows/execute-phase.md +6 -0
- package/dist/assets/templates/workflows/plan-phase.md +6 -0
- package/dist/assets/templates/workflows/progress.md +1 -1
- package/dist/assets/templates/workflows/quick.md +6 -0
- package/dist/assets/templates/workflows/roadmap.md +81 -0
- package/dist/assets/templates/workflows/verify-phase.md +6 -0
- package/dist/cli.cjs +487 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/install.cjs +1 -1
- package/package.json +3 -3
package/dist/cli.cjs
CHANGED
|
@@ -6,7 +6,21 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
9
10
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
11
|
+
var __exportAll = (all, no_symbols) => {
|
|
12
|
+
let target = {};
|
|
13
|
+
for (var name in all) {
|
|
14
|
+
__defProp(target, name, {
|
|
15
|
+
get: all[name],
|
|
16
|
+
enumerable: true
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
if (!no_symbols) {
|
|
20
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
21
|
+
}
|
|
22
|
+
return target;
|
|
23
|
+
};
|
|
10
24
|
var __copyProps = (to, from, except, desc) => {
|
|
11
25
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
26
|
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
@@ -25,12 +39,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
39
|
value: mod,
|
|
26
40
|
enumerable: true
|
|
27
41
|
}) : target, mod));
|
|
42
|
+
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
43
|
|
|
29
44
|
//#endregion
|
|
30
45
|
let node_fs = require("node:fs");
|
|
31
46
|
node_fs = __toESM(node_fs);
|
|
32
47
|
let node_path = require("node:path");
|
|
33
48
|
node_path = __toESM(node_path);
|
|
49
|
+
let node_os = require("node:os");
|
|
50
|
+
node_os = __toESM(node_os);
|
|
51
|
+
let node_process = require("node:process");
|
|
52
|
+
node_process = __toESM(node_process);
|
|
53
|
+
let node_tty = require("node:tty");
|
|
54
|
+
node_tty = __toESM(node_tty);
|
|
34
55
|
|
|
35
56
|
//#region ../core/dist/types.js
|
|
36
57
|
var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -1806,6 +1827,445 @@ var require_milestone = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1806
1827
|
}
|
|
1807
1828
|
}));
|
|
1808
1829
|
|
|
1830
|
+
//#endregion
|
|
1831
|
+
//#region ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
1832
|
+
function assembleStyles() {
|
|
1833
|
+
const codes = /* @__PURE__ */ new Map();
|
|
1834
|
+
for (const [groupName, group] of Object.entries(styles$1)) {
|
|
1835
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
1836
|
+
styles$1[styleName] = {
|
|
1837
|
+
open: `\u001B[${style[0]}m`,
|
|
1838
|
+
close: `\u001B[${style[1]}m`
|
|
1839
|
+
};
|
|
1840
|
+
group[styleName] = styles$1[styleName];
|
|
1841
|
+
codes.set(style[0], style[1]);
|
|
1842
|
+
}
|
|
1843
|
+
Object.defineProperty(styles$1, groupName, {
|
|
1844
|
+
value: group,
|
|
1845
|
+
enumerable: false
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
Object.defineProperty(styles$1, "codes", {
|
|
1849
|
+
value: codes,
|
|
1850
|
+
enumerable: false
|
|
1851
|
+
});
|
|
1852
|
+
styles$1.color.close = "\x1B[39m";
|
|
1853
|
+
styles$1.bgColor.close = "\x1B[49m";
|
|
1854
|
+
styles$1.color.ansi = wrapAnsi16();
|
|
1855
|
+
styles$1.color.ansi256 = wrapAnsi256();
|
|
1856
|
+
styles$1.color.ansi16m = wrapAnsi16m();
|
|
1857
|
+
styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
1858
|
+
styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
1859
|
+
styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
1860
|
+
Object.defineProperties(styles$1, {
|
|
1861
|
+
rgbToAnsi256: {
|
|
1862
|
+
value(red, green, blue) {
|
|
1863
|
+
if (red === green && green === blue) {
|
|
1864
|
+
if (red < 8) return 16;
|
|
1865
|
+
if (red > 248) return 231;
|
|
1866
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
1867
|
+
}
|
|
1868
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
1869
|
+
},
|
|
1870
|
+
enumerable: false
|
|
1871
|
+
},
|
|
1872
|
+
hexToRgb: {
|
|
1873
|
+
value(hex) {
|
|
1874
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
1875
|
+
if (!matches) return [
|
|
1876
|
+
0,
|
|
1877
|
+
0,
|
|
1878
|
+
0
|
|
1879
|
+
];
|
|
1880
|
+
let [colorString] = matches;
|
|
1881
|
+
if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
|
|
1882
|
+
const integer = Number.parseInt(colorString, 16);
|
|
1883
|
+
return [
|
|
1884
|
+
integer >> 16 & 255,
|
|
1885
|
+
integer >> 8 & 255,
|
|
1886
|
+
integer & 255
|
|
1887
|
+
];
|
|
1888
|
+
},
|
|
1889
|
+
enumerable: false
|
|
1890
|
+
},
|
|
1891
|
+
hexToAnsi256: {
|
|
1892
|
+
value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
|
|
1893
|
+
enumerable: false
|
|
1894
|
+
},
|
|
1895
|
+
ansi256ToAnsi: {
|
|
1896
|
+
value(code) {
|
|
1897
|
+
if (code < 8) return 30 + code;
|
|
1898
|
+
if (code < 16) return 90 + (code - 8);
|
|
1899
|
+
let red;
|
|
1900
|
+
let green;
|
|
1901
|
+
let blue;
|
|
1902
|
+
if (code >= 232) {
|
|
1903
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
1904
|
+
green = red;
|
|
1905
|
+
blue = red;
|
|
1906
|
+
} else {
|
|
1907
|
+
code -= 16;
|
|
1908
|
+
const remainder = code % 36;
|
|
1909
|
+
red = Math.floor(code / 36) / 5;
|
|
1910
|
+
green = Math.floor(remainder / 6) / 5;
|
|
1911
|
+
blue = remainder % 6 / 5;
|
|
1912
|
+
}
|
|
1913
|
+
const value = Math.max(red, green, blue) * 2;
|
|
1914
|
+
if (value === 0) return 30;
|
|
1915
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
1916
|
+
if (value === 2) result += 60;
|
|
1917
|
+
return result;
|
|
1918
|
+
},
|
|
1919
|
+
enumerable: false
|
|
1920
|
+
},
|
|
1921
|
+
rgbToAnsi: {
|
|
1922
|
+
value: (red, green, blue) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red, green, blue)),
|
|
1923
|
+
enumerable: false
|
|
1924
|
+
},
|
|
1925
|
+
hexToAnsi: {
|
|
1926
|
+
value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
|
|
1927
|
+
enumerable: false
|
|
1928
|
+
}
|
|
1929
|
+
});
|
|
1930
|
+
return styles$1;
|
|
1931
|
+
}
|
|
1932
|
+
var ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles$1, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles;
|
|
1933
|
+
var init_ansi_styles = __esmMin((() => {
|
|
1934
|
+
ANSI_BACKGROUND_OFFSET = 10;
|
|
1935
|
+
wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
|
|
1936
|
+
wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
|
|
1937
|
+
wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
|
|
1938
|
+
styles$1 = {
|
|
1939
|
+
modifier: {
|
|
1940
|
+
reset: [0, 0],
|
|
1941
|
+
bold: [1, 22],
|
|
1942
|
+
dim: [2, 22],
|
|
1943
|
+
italic: [3, 23],
|
|
1944
|
+
underline: [4, 24],
|
|
1945
|
+
overline: [53, 55],
|
|
1946
|
+
inverse: [7, 27],
|
|
1947
|
+
hidden: [8, 28],
|
|
1948
|
+
strikethrough: [9, 29]
|
|
1949
|
+
},
|
|
1950
|
+
color: {
|
|
1951
|
+
black: [30, 39],
|
|
1952
|
+
red: [31, 39],
|
|
1953
|
+
green: [32, 39],
|
|
1954
|
+
yellow: [33, 39],
|
|
1955
|
+
blue: [34, 39],
|
|
1956
|
+
magenta: [35, 39],
|
|
1957
|
+
cyan: [36, 39],
|
|
1958
|
+
white: [37, 39],
|
|
1959
|
+
blackBright: [90, 39],
|
|
1960
|
+
gray: [90, 39],
|
|
1961
|
+
grey: [90, 39],
|
|
1962
|
+
redBright: [91, 39],
|
|
1963
|
+
greenBright: [92, 39],
|
|
1964
|
+
yellowBright: [93, 39],
|
|
1965
|
+
blueBright: [94, 39],
|
|
1966
|
+
magentaBright: [95, 39],
|
|
1967
|
+
cyanBright: [96, 39],
|
|
1968
|
+
whiteBright: [97, 39]
|
|
1969
|
+
},
|
|
1970
|
+
bgColor: {
|
|
1971
|
+
bgBlack: [40, 49],
|
|
1972
|
+
bgRed: [41, 49],
|
|
1973
|
+
bgGreen: [42, 49],
|
|
1974
|
+
bgYellow: [43, 49],
|
|
1975
|
+
bgBlue: [44, 49],
|
|
1976
|
+
bgMagenta: [45, 49],
|
|
1977
|
+
bgCyan: [46, 49],
|
|
1978
|
+
bgWhite: [47, 49],
|
|
1979
|
+
bgBlackBright: [100, 49],
|
|
1980
|
+
bgGray: [100, 49],
|
|
1981
|
+
bgGrey: [100, 49],
|
|
1982
|
+
bgRedBright: [101, 49],
|
|
1983
|
+
bgGreenBright: [102, 49],
|
|
1984
|
+
bgYellowBright: [103, 49],
|
|
1985
|
+
bgBlueBright: [104, 49],
|
|
1986
|
+
bgMagentaBright: [105, 49],
|
|
1987
|
+
bgCyanBright: [106, 49],
|
|
1988
|
+
bgWhiteBright: [107, 49]
|
|
1989
|
+
}
|
|
1990
|
+
};
|
|
1991
|
+
modifierNames = Object.keys(styles$1.modifier);
|
|
1992
|
+
foregroundColorNames = Object.keys(styles$1.color);
|
|
1993
|
+
backgroundColorNames = Object.keys(styles$1.bgColor);
|
|
1994
|
+
colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
1995
|
+
ansiStyles = assembleStyles();
|
|
1996
|
+
}));
|
|
1997
|
+
|
|
1998
|
+
//#endregion
|
|
1999
|
+
//#region ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
2000
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : node_process.default.argv) {
|
|
2001
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
2002
|
+
const position = argv.indexOf(prefix + flag);
|
|
2003
|
+
const terminatorPosition = argv.indexOf("--");
|
|
2004
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
2005
|
+
}
|
|
2006
|
+
function envForceColor() {
|
|
2007
|
+
if ("FORCE_COLOR" in env) {
|
|
2008
|
+
if (env.FORCE_COLOR === "true") return 1;
|
|
2009
|
+
if (env.FORCE_COLOR === "false") return 0;
|
|
2010
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
function translateLevel(level) {
|
|
2014
|
+
if (level === 0) return false;
|
|
2015
|
+
return {
|
|
2016
|
+
level,
|
|
2017
|
+
hasBasic: true,
|
|
2018
|
+
has256: level >= 2,
|
|
2019
|
+
has16m: level >= 3
|
|
2020
|
+
};
|
|
2021
|
+
}
|
|
2022
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
2023
|
+
const noFlagForceColor = envForceColor();
|
|
2024
|
+
if (noFlagForceColor !== void 0) flagForceColor = noFlagForceColor;
|
|
2025
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
2026
|
+
if (forceColor === 0) return 0;
|
|
2027
|
+
if (sniffFlags) {
|
|
2028
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
|
|
2029
|
+
if (hasFlag("color=256")) return 2;
|
|
2030
|
+
}
|
|
2031
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) return 1;
|
|
2032
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
2033
|
+
const min = forceColor || 0;
|
|
2034
|
+
if (env.TERM === "dumb") return min;
|
|
2035
|
+
if (node_process.default.platform === "win32") {
|
|
2036
|
+
const osRelease = node_os.default.release().split(".");
|
|
2037
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
2038
|
+
return 1;
|
|
2039
|
+
}
|
|
2040
|
+
if ("CI" in env) {
|
|
2041
|
+
if ([
|
|
2042
|
+
"GITHUB_ACTIONS",
|
|
2043
|
+
"GITEA_ACTIONS",
|
|
2044
|
+
"CIRCLECI"
|
|
2045
|
+
].some((key) => key in env)) return 3;
|
|
2046
|
+
if ([
|
|
2047
|
+
"TRAVIS",
|
|
2048
|
+
"APPVEYOR",
|
|
2049
|
+
"GITLAB_CI",
|
|
2050
|
+
"BUILDKITE",
|
|
2051
|
+
"DRONE"
|
|
2052
|
+
].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
|
|
2053
|
+
return min;
|
|
2054
|
+
}
|
|
2055
|
+
if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
2056
|
+
if (env.COLORTERM === "truecolor") return 3;
|
|
2057
|
+
if (env.TERM === "xterm-kitty") return 3;
|
|
2058
|
+
if (env.TERM === "xterm-ghostty") return 3;
|
|
2059
|
+
if (env.TERM === "wezterm") return 3;
|
|
2060
|
+
if ("TERM_PROGRAM" in env) {
|
|
2061
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
2062
|
+
switch (env.TERM_PROGRAM) {
|
|
2063
|
+
case "iTerm.app": return version >= 3 ? 3 : 2;
|
|
2064
|
+
case "Apple_Terminal": return 2;
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
if (/-256(color)?$/i.test(env.TERM)) return 2;
|
|
2068
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
|
|
2069
|
+
if ("COLORTERM" in env) return 1;
|
|
2070
|
+
return min;
|
|
2071
|
+
}
|
|
2072
|
+
function createSupportsColor(stream, options = {}) {
|
|
2073
|
+
return translateLevel(_supportsColor(stream, {
|
|
2074
|
+
streamIsTTY: stream && stream.isTTY,
|
|
2075
|
+
...options
|
|
2076
|
+
}));
|
|
2077
|
+
}
|
|
2078
|
+
var env, flagForceColor, supportsColor;
|
|
2079
|
+
var init_supports_color = __esmMin((() => {
|
|
2080
|
+
({env} = node_process.default);
|
|
2081
|
+
;
|
|
2082
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
2083
|
+
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
2084
|
+
supportsColor = {
|
|
2085
|
+
stdout: createSupportsColor({ isTTY: node_tty.default.isatty(1) }),
|
|
2086
|
+
stderr: createSupportsColor({ isTTY: node_tty.default.isatty(2) })
|
|
2087
|
+
};
|
|
2088
|
+
}));
|
|
2089
|
+
|
|
2090
|
+
//#endregion
|
|
2091
|
+
//#region ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
|
|
2092
|
+
function stringReplaceAll(string, substring, replacer) {
|
|
2093
|
+
let index = string.indexOf(substring);
|
|
2094
|
+
if (index === -1) return string;
|
|
2095
|
+
const substringLength = substring.length;
|
|
2096
|
+
let endIndex = 0;
|
|
2097
|
+
let returnValue = "";
|
|
2098
|
+
do {
|
|
2099
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
2100
|
+
endIndex = index + substringLength;
|
|
2101
|
+
index = string.indexOf(substring, endIndex);
|
|
2102
|
+
} while (index !== -1);
|
|
2103
|
+
returnValue += string.slice(endIndex);
|
|
2104
|
+
return returnValue;
|
|
2105
|
+
}
|
|
2106
|
+
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
2107
|
+
let endIndex = 0;
|
|
2108
|
+
let returnValue = "";
|
|
2109
|
+
do {
|
|
2110
|
+
const gotCR = string[index - 1] === "\r";
|
|
2111
|
+
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
2112
|
+
endIndex = index + 1;
|
|
2113
|
+
index = string.indexOf("\n", endIndex);
|
|
2114
|
+
} while (index !== -1);
|
|
2115
|
+
returnValue += string.slice(endIndex);
|
|
2116
|
+
return returnValue;
|
|
2117
|
+
}
|
|
2118
|
+
var init_utilities = __esmMin((() => {}));
|
|
2119
|
+
|
|
2120
|
+
//#endregion
|
|
2121
|
+
//#region ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
|
|
2122
|
+
var source_exports = /* @__PURE__ */ __exportAll({
|
|
2123
|
+
Chalk: () => Chalk,
|
|
2124
|
+
backgroundColorNames: () => backgroundColorNames,
|
|
2125
|
+
backgroundColors: () => backgroundColorNames,
|
|
2126
|
+
chalkStderr: () => chalkStderr,
|
|
2127
|
+
colorNames: () => colorNames,
|
|
2128
|
+
colors: () => colorNames,
|
|
2129
|
+
default: () => chalk,
|
|
2130
|
+
foregroundColorNames: () => foregroundColorNames,
|
|
2131
|
+
foregroundColors: () => foregroundColorNames,
|
|
2132
|
+
modifierNames: () => modifierNames,
|
|
2133
|
+
modifiers: () => modifierNames,
|
|
2134
|
+
supportsColor: () => stdoutColor,
|
|
2135
|
+
supportsColorStderr: () => stderrColor
|
|
2136
|
+
});
|
|
2137
|
+
function createChalk(options) {
|
|
2138
|
+
return chalkFactory(options);
|
|
2139
|
+
}
|
|
2140
|
+
var stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles, applyOptions, Chalk, chalkFactory, getModelAnsi, proto, createStyler, createBuilder, applyStyle, chalk, chalkStderr;
|
|
2141
|
+
var init_source = __esmMin((() => {
|
|
2142
|
+
init_ansi_styles();
|
|
2143
|
+
init_supports_color();
|
|
2144
|
+
init_utilities();
|
|
2145
|
+
({stdout: stdoutColor, stderr: stderrColor} = supportsColor);
|
|
2146
|
+
GENERATOR = Symbol("GENERATOR");
|
|
2147
|
+
STYLER = Symbol("STYLER");
|
|
2148
|
+
IS_EMPTY = Symbol("IS_EMPTY");
|
|
2149
|
+
levelMapping = [
|
|
2150
|
+
"ansi",
|
|
2151
|
+
"ansi",
|
|
2152
|
+
"ansi256",
|
|
2153
|
+
"ansi16m"
|
|
2154
|
+
];
|
|
2155
|
+
styles = Object.create(null);
|
|
2156
|
+
applyOptions = (object, options = {}) => {
|
|
2157
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
|
|
2158
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
2159
|
+
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
2160
|
+
};
|
|
2161
|
+
Chalk = class {
|
|
2162
|
+
constructor(options) {
|
|
2163
|
+
return chalkFactory(options);
|
|
2164
|
+
}
|
|
2165
|
+
};
|
|
2166
|
+
chalkFactory = (options) => {
|
|
2167
|
+
const chalk = (...strings) => strings.join(" ");
|
|
2168
|
+
applyOptions(chalk, options);
|
|
2169
|
+
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
2170
|
+
return chalk;
|
|
2171
|
+
};
|
|
2172
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
2173
|
+
for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
|
|
2174
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
2175
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
2176
|
+
return builder;
|
|
2177
|
+
} };
|
|
2178
|
+
styles.visible = { get() {
|
|
2179
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
2180
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
2181
|
+
return builder;
|
|
2182
|
+
} };
|
|
2183
|
+
getModelAnsi = (model, level, type, ...arguments_) => {
|
|
2184
|
+
if (model === "rgb") {
|
|
2185
|
+
if (level === "ansi16m") return ansiStyles[type].ansi16m(...arguments_);
|
|
2186
|
+
if (level === "ansi256") return ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));
|
|
2187
|
+
return ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));
|
|
2188
|
+
}
|
|
2189
|
+
if (model === "hex") return getModelAnsi("rgb", level, type, ...ansiStyles.hexToRgb(...arguments_));
|
|
2190
|
+
return ansiStyles[type][model](...arguments_);
|
|
2191
|
+
};
|
|
2192
|
+
for (const model of [
|
|
2193
|
+
"rgb",
|
|
2194
|
+
"hex",
|
|
2195
|
+
"ansi256"
|
|
2196
|
+
]) {
|
|
2197
|
+
styles[model] = { get() {
|
|
2198
|
+
const { level } = this;
|
|
2199
|
+
return function(...arguments_) {
|
|
2200
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansiStyles.color.close, this[STYLER]);
|
|
2201
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
2202
|
+
};
|
|
2203
|
+
} };
|
|
2204
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
2205
|
+
styles[bgModel] = { get() {
|
|
2206
|
+
const { level } = this;
|
|
2207
|
+
return function(...arguments_) {
|
|
2208
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansiStyles.bgColor.close, this[STYLER]);
|
|
2209
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
2210
|
+
};
|
|
2211
|
+
} };
|
|
2212
|
+
}
|
|
2213
|
+
proto = Object.defineProperties(() => {}, {
|
|
2214
|
+
...styles,
|
|
2215
|
+
level: {
|
|
2216
|
+
enumerable: true,
|
|
2217
|
+
get() {
|
|
2218
|
+
return this[GENERATOR].level;
|
|
2219
|
+
},
|
|
2220
|
+
set(level) {
|
|
2221
|
+
this[GENERATOR].level = level;
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
});
|
|
2225
|
+
createStyler = (open, close, parent) => {
|
|
2226
|
+
let openAll;
|
|
2227
|
+
let closeAll;
|
|
2228
|
+
if (parent === void 0) {
|
|
2229
|
+
openAll = open;
|
|
2230
|
+
closeAll = close;
|
|
2231
|
+
} else {
|
|
2232
|
+
openAll = parent.openAll + open;
|
|
2233
|
+
closeAll = close + parent.closeAll;
|
|
2234
|
+
}
|
|
2235
|
+
return {
|
|
2236
|
+
open,
|
|
2237
|
+
close,
|
|
2238
|
+
openAll,
|
|
2239
|
+
closeAll,
|
|
2240
|
+
parent
|
|
2241
|
+
};
|
|
2242
|
+
};
|
|
2243
|
+
createBuilder = (self, _styler, _isEmpty) => {
|
|
2244
|
+
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
2245
|
+
Object.setPrototypeOf(builder, proto);
|
|
2246
|
+
builder[GENERATOR] = self;
|
|
2247
|
+
builder[STYLER] = _styler;
|
|
2248
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
2249
|
+
return builder;
|
|
2250
|
+
};
|
|
2251
|
+
applyStyle = (self, string) => {
|
|
2252
|
+
if (self.level <= 0 || !string) return self[IS_EMPTY] ? "" : string;
|
|
2253
|
+
let styler = self[STYLER];
|
|
2254
|
+
if (styler === void 0) return string;
|
|
2255
|
+
const { openAll, closeAll } = styler;
|
|
2256
|
+
if (string.includes("\x1B")) while (styler !== void 0) {
|
|
2257
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
2258
|
+
styler = styler.parent;
|
|
2259
|
+
}
|
|
2260
|
+
const lfIndex = string.indexOf("\n");
|
|
2261
|
+
if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
2262
|
+
return openAll + string + closeAll;
|
|
2263
|
+
};
|
|
2264
|
+
Object.defineProperties(createChalk.prototype, styles);
|
|
2265
|
+
chalk = createChalk();
|
|
2266
|
+
chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
2267
|
+
}));
|
|
2268
|
+
|
|
1809
2269
|
//#endregion
|
|
1810
2270
|
//#region ../core/dist/commands.js
|
|
1811
2271
|
var require_commands = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -1832,6 +2292,7 @@ var require_commands = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1832
2292
|
exports.cmdScaffold = cmdScaffold;
|
|
1833
2293
|
const node_fs_1$4 = __importDefault(require("node:fs"));
|
|
1834
2294
|
const node_path_1$4 = __importDefault(require("node:path"));
|
|
2295
|
+
const chalk_1 = __importDefault((init_source(), __toCommonJS(source_exports)));
|
|
1835
2296
|
const core_js_1 = require_core();
|
|
1836
2297
|
const frontmatter_js_1 = require_frontmatter();
|
|
1837
2298
|
function cmdGenerateSlug(text, raw) {
|
|
@@ -2221,6 +2682,32 @@ var require_commands = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2221
2682
|
completed: totalSummaries,
|
|
2222
2683
|
total: totalPlans
|
|
2223
2684
|
}, raw, text);
|
|
2685
|
+
} else if (format === "phase-bars") {
|
|
2686
|
+
const doneCount = phases.filter((p) => p.status === "Complete").length;
|
|
2687
|
+
const inProgressCount = phases.filter((p) => p.status === "In Progress").length;
|
|
2688
|
+
const totalCount = phases.length;
|
|
2689
|
+
const lines = [chalk_1.default.bold(`Milestone: ${milestone.name} — ${doneCount}/${totalCount} phases complete (${percent}%)`), ""];
|
|
2690
|
+
for (const p of phases) {
|
|
2691
|
+
const pPercent = p.plans > 0 ? Math.min(100, Math.round(p.summaries / p.plans * 100)) : 0;
|
|
2692
|
+
const barWidth = 10;
|
|
2693
|
+
const filled = Math.round(pPercent / 100 * barWidth);
|
|
2694
|
+
const bar = "█".repeat(filled) + "░".repeat(barWidth - filled);
|
|
2695
|
+
const phaseLabel = `Phase ${p.number.padStart(2, "0")}`;
|
|
2696
|
+
const statusLabel = p.status === "Complete" ? "DONE" : p.status === "In Progress" ? "IN PROGRESS" : "PLANNED";
|
|
2697
|
+
let line = `${phaseLabel} [${bar}] ${String(pPercent).padStart(3, " ")}% — ${statusLabel}`;
|
|
2698
|
+
if (p.status === "Complete") line = chalk_1.default.green(line);
|
|
2699
|
+
else if (p.status === "In Progress") line = chalk_1.default.yellow(line);
|
|
2700
|
+
else line = chalk_1.default.dim(line);
|
|
2701
|
+
lines.push(line);
|
|
2702
|
+
}
|
|
2703
|
+
const rendered = lines.join("\n");
|
|
2704
|
+
(0, core_js_1.output)({
|
|
2705
|
+
rendered,
|
|
2706
|
+
done: doneCount,
|
|
2707
|
+
in_progress: inProgressCount,
|
|
2708
|
+
total: totalCount,
|
|
2709
|
+
percent
|
|
2710
|
+
}, raw, rendered);
|
|
2224
2711
|
} else (0, core_js_1.output)({
|
|
2225
2712
|
milestone_version: milestone.version,
|
|
2226
2713
|
milestone_name: milestone.name,
|