github-action-readme-generator 1.12.0 → 1.12.2
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/CHANGELOG.md +14 -0
- package/README.md +2 -2
- package/dist/bin/index.js +162 -79
- package/dist/mjs/index.js +13 -3
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.12.2](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.12.1...v1.12.2) (2026-08-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **versioning:** default disabled usage ref to main ([#662](https://github.com/bitflight-devops/github-action-readme-generator/issues/662)) ([93a624e](https://github.com/bitflight-devops/github-action-readme-generator/commit/93a624eb8f5071843dc1d82abd36ec18e586ed33)), closes [#637](https://github.com/bitflight-devops/github-action-readme-generator/issues/637)
|
|
7
|
+
|
|
8
|
+
## [1.12.1](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.12.0...v1.12.1) (2026-08-15)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **badges:** preserve links and readable alt text ([#661](https://github.com/bitflight-devops/github-action-readme-generator/issues/661)) ([089cd7c](https://github.com/bitflight-devops/github-action-readme-generator/commit/089cd7c561f11a46c0fabad26a3bf33ebfc76105)), closes [#636](https://github.com/bitflight-devops/github-action-readme-generator/issues/636)
|
|
14
|
+
|
|
1
15
|
# [1.12.0](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.11.0...v1.12.0) (2026-08-09)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<!-- end title -->
|
|
13
13
|
<!-- start badges -->
|
|
14
14
|
|
|
15
|
-
<a href="https
|
|
15
|
+
<a href="https://github.com/bitflight-devops/github-action-readme-generator/releases/latest"><img src="https://img.shields.io/github/v/release/bitflight-devops/github-action-readme-generator?display_name=tag&sort=semver&logo=github&style=flat-square" alt="Release by tag" /></a><a href="https://github.com/bitflight-devops/github-action-readme-generator/releases/latest"><img src="https://img.shields.io/github/release-date/bitflight-devops/github-action-readme-generator?display_name=tag&sort=semver&logo=github&style=flat-square" alt="Release by date" /></a><img src="https://img.shields.io/github/last-commit/bitflight-devops/github-action-readme-generator?logo=github&style=flat-square" alt="Commit" /><a href="https://github.com/bitflight-devops/github-action-readme-generator/issues"><img src="https://img.shields.io/github/issues/bitflight-devops/github-action-readme-generator?logo=github&style=flat-square" alt="Open Issues" /></a><img src="https://img.shields.io/github/downloads/bitflight-devops/github-action-readme-generator/total?logo=github&style=flat-square" alt="Downloads" />
|
|
16
16
|
|
|
17
17
|
<!-- end badges -->
|
|
18
18
|
<br />
|
|
@@ -177,7 +177,7 @@ This configuration will automatically regenerate your README whenever `action.ym
|
|
|
177
177
|
<!-- start usage -->
|
|
178
178
|
|
|
179
179
|
```yaml
|
|
180
|
-
- uses: bitflight-devops/github-action-readme-generator@v1.
|
|
180
|
+
- uses: bitflight-devops/github-action-readme-generator@v1.12.1
|
|
181
181
|
with:
|
|
182
182
|
# Description: The absolute or relative path to the `action.yml` file to read in
|
|
183
183
|
# from.
|
package/dist/bin/index.js
CHANGED
|
@@ -41817,11 +41817,41 @@ function isValidColor(color) {
|
|
|
41817
41817
|
return GITHUB_ACTIONS_BRANDING_COLORS.includes(color);
|
|
41818
41818
|
}
|
|
41819
41819
|
//#endregion
|
|
41820
|
+
//#region node_modules/chalk/source/utilities.js
|
|
41821
|
+
function stringReplaceAll$2(string, substring, postfix) {
|
|
41822
|
+
let index = string.indexOf(substring);
|
|
41823
|
+
if (index === -1) return string;
|
|
41824
|
+
const substringLength = substring.length;
|
|
41825
|
+
let endIndex = 0;
|
|
41826
|
+
let returnValue = "";
|
|
41827
|
+
do {
|
|
41828
|
+
returnValue += string.slice(endIndex, index) + substring + postfix;
|
|
41829
|
+
endIndex = index + substringLength;
|
|
41830
|
+
index = string.indexOf(substring, endIndex);
|
|
41831
|
+
} while (index !== -1);
|
|
41832
|
+
returnValue += string.slice(endIndex);
|
|
41833
|
+
return returnValue;
|
|
41834
|
+
}
|
|
41835
|
+
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
41836
|
+
let endIndex = 0;
|
|
41837
|
+
let returnValue = "";
|
|
41838
|
+
do {
|
|
41839
|
+
const isGotCR = string[index - 1] === "\r";
|
|
41840
|
+
returnValue += string.slice(endIndex, isGotCR ? index - 1 : index) + prefix + (isGotCR ? "\r\n" : "\n") + postfix;
|
|
41841
|
+
endIndex = index + 1;
|
|
41842
|
+
index = string.indexOf("\n", endIndex);
|
|
41843
|
+
} while (index !== -1);
|
|
41844
|
+
returnValue += string.slice(endIndex);
|
|
41845
|
+
return returnValue;
|
|
41846
|
+
}
|
|
41847
|
+
//#endregion
|
|
41820
41848
|
//#region node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
41821
41849
|
const ANSI_BACKGROUND_OFFSET = 10;
|
|
41822
|
-
const
|
|
41823
|
-
const
|
|
41824
|
-
const
|
|
41850
|
+
const ANSI_UNDERLINE_OFFSET = 20;
|
|
41851
|
+
const wrapAnsi16 = (offset = 0) => (code) => `\u{1B}[${code + offset}m`;
|
|
41852
|
+
const wrapAnsi256 = (offset = 0) => (code) => `\u{1B}[${38 + offset};5;${code}m`;
|
|
41853
|
+
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u{1B}[${38 + offset};2;${red};${green};${blue}m`;
|
|
41854
|
+
const wrapUnderlineAnsi = (code) => `\u{1B}[58;5;${code < 90 ? code - 30 : code - 90 + 8}m`;
|
|
41825
41855
|
const styles$1 = {
|
|
41826
41856
|
modifier: {
|
|
41827
41857
|
reset: [0, 0],
|
|
@@ -41829,6 +41859,10 @@ const styles$1 = {
|
|
|
41829
41859
|
dim: [2, 22],
|
|
41830
41860
|
italic: [3, 23],
|
|
41831
41861
|
underline: [4, 24],
|
|
41862
|
+
underlineDouble: ["4:2", 24],
|
|
41863
|
+
underlineCurly: ["4:3", 24],
|
|
41864
|
+
underlineDotted: ["4:4", 24],
|
|
41865
|
+
underlineDashed: ["4:5", 24],
|
|
41832
41866
|
overline: [53, 55],
|
|
41833
41867
|
inverse: [7, 27],
|
|
41834
41868
|
hidden: [8, 28],
|
|
@@ -41873,22 +41907,43 @@ const styles$1 = {
|
|
|
41873
41907
|
bgMagentaBright: [105, 49],
|
|
41874
41908
|
bgCyanBright: [106, 49],
|
|
41875
41909
|
bgWhiteBright: [107, 49]
|
|
41910
|
+
},
|
|
41911
|
+
underlineColor: {
|
|
41912
|
+
underlineBlack: ["58;5;0", 59],
|
|
41913
|
+
underlineRed: ["58;5;1", 59],
|
|
41914
|
+
underlineGreen: ["58;5;2", 59],
|
|
41915
|
+
underlineYellow: ["58;5;3", 59],
|
|
41916
|
+
underlineBlue: ["58;5;4", 59],
|
|
41917
|
+
underlineMagenta: ["58;5;5", 59],
|
|
41918
|
+
underlineCyan: ["58;5;6", 59],
|
|
41919
|
+
underlineWhite: ["58;5;7", 59],
|
|
41920
|
+
underlineBlackBright: ["58;5;8", 59],
|
|
41921
|
+
underlineGray: ["58;5;8", 59],
|
|
41922
|
+
underlineGrey: ["58;5;8", 59],
|
|
41923
|
+
underlineRedBright: ["58;5;9", 59],
|
|
41924
|
+
underlineGreenBright: ["58;5;10", 59],
|
|
41925
|
+
underlineYellowBright: ["58;5;11", 59],
|
|
41926
|
+
underlineBlueBright: ["58;5;12", 59],
|
|
41927
|
+
underlineMagentaBright: ["58;5;13", 59],
|
|
41928
|
+
underlineCyanBright: ["58;5;14", 59],
|
|
41929
|
+
underlineWhiteBright: ["58;5;15", 59]
|
|
41876
41930
|
}
|
|
41877
41931
|
};
|
|
41878
41932
|
const modifierNames = Object.keys(styles$1.modifier);
|
|
41879
41933
|
const foregroundColorNames = Object.keys(styles$1.color);
|
|
41880
41934
|
const backgroundColorNames = Object.keys(styles$1.bgColor);
|
|
41935
|
+
const underlineColorNames = Object.keys(styles$1.underlineColor);
|
|
41881
41936
|
const colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
41882
41937
|
function assembleStyles() {
|
|
41883
41938
|
const codes = /* @__PURE__ */ new Map();
|
|
41884
41939
|
for (const [groupName, group] of Object.entries(styles$1)) {
|
|
41885
41940
|
for (const [styleName, style] of Object.entries(group)) {
|
|
41886
41941
|
styles$1[styleName] = {
|
|
41887
|
-
open: `\
|
|
41888
|
-
close: `\
|
|
41942
|
+
open: `\u{1B}[${style[0]}m`,
|
|
41943
|
+
close: `\u{1B}[${style[1]}m`
|
|
41889
41944
|
};
|
|
41890
41945
|
group[styleName] = styles$1[styleName];
|
|
41891
|
-
codes.set(style[0], style[1]);
|
|
41946
|
+
codes.set(Number.parseInt(style[0], 10), style[1]);
|
|
41892
41947
|
}
|
|
41893
41948
|
Object.defineProperty(styles$1, groupName, {
|
|
41894
41949
|
value: group,
|
|
@@ -41901,12 +41956,16 @@ function assembleStyles() {
|
|
|
41901
41956
|
});
|
|
41902
41957
|
styles$1.color.close = "\x1B[39m";
|
|
41903
41958
|
styles$1.bgColor.close = "\x1B[49m";
|
|
41959
|
+
styles$1.underlineColor.close = "\x1B[59m";
|
|
41904
41960
|
styles$1.color.ansi = wrapAnsi16();
|
|
41905
41961
|
styles$1.color.ansi256 = wrapAnsi256();
|
|
41906
41962
|
styles$1.color.ansi16m = wrapAnsi16m();
|
|
41907
41963
|
styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
41908
41964
|
styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
41909
41965
|
styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
41966
|
+
styles$1.underlineColor.ansi = wrapUnderlineAnsi;
|
|
41967
|
+
styles$1.underlineColor.ansi256 = wrapAnsi256(ANSI_UNDERLINE_OFFSET);
|
|
41968
|
+
styles$1.underlineColor.ansi16m = wrapAnsi16m(ANSI_UNDERLINE_OFFSET);
|
|
41910
41969
|
Object.defineProperties(styles$1, {
|
|
41911
41970
|
rgbToAnsi256: {
|
|
41912
41971
|
value(red, green, blue) {
|
|
@@ -41921,7 +41980,7 @@ function assembleStyles() {
|
|
|
41921
41980
|
},
|
|
41922
41981
|
hexToRgb: {
|
|
41923
41982
|
value(hex) {
|
|
41924
|
-
const matches = /[
|
|
41983
|
+
const matches = /[\da-f]{6}|[\da-f]{3}/i.exec(hex.toString(16));
|
|
41925
41984
|
if (!matches) return [
|
|
41926
41985
|
0,
|
|
41927
41986
|
0,
|
|
@@ -41992,12 +42051,15 @@ const { env } = process$1;
|
|
|
41992
42051
|
let flagForceColor;
|
|
41993
42052
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
41994
42053
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
42054
|
+
function hasNumericForceColor() {
|
|
42055
|
+
return /^\d+$/.test(env.FORCE_COLOR);
|
|
42056
|
+
}
|
|
41995
42057
|
function envForceColor() {
|
|
41996
|
-
if ("FORCE_COLOR" in env)
|
|
41997
|
-
|
|
41998
|
-
|
|
41999
|
-
|
|
42000
|
-
|
|
42058
|
+
if (!("FORCE_COLOR" in env)) return;
|
|
42059
|
+
if (env.FORCE_COLOR === "false") return 0;
|
|
42060
|
+
if (env.FORCE_COLOR === "true" || env.FORCE_COLOR.length === 0) return 1;
|
|
42061
|
+
if (!hasNumericForceColor()) return;
|
|
42062
|
+
return Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
42001
42063
|
}
|
|
42002
42064
|
function translateLevel(level) {
|
|
42003
42065
|
if (level === 0) return false;
|
|
@@ -42017,6 +42079,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
42017
42079
|
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
|
|
42018
42080
|
if (hasFlag("color=256")) return 2;
|
|
42019
42081
|
}
|
|
42082
|
+
if (forceColor !== void 0 && hasNumericForceColor()) return forceColor;
|
|
42020
42083
|
if ("TF_BUILD" in env && "AGENT_NAME" in env) return 1;
|
|
42021
42084
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
42022
42085
|
const min = forceColor || 0;
|
|
@@ -42041,19 +42104,19 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
42041
42104
|
].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
|
|
42042
42105
|
return min;
|
|
42043
42106
|
}
|
|
42044
|
-
if ("TEAMCITY_VERSION" in env) return /^(9\.
|
|
42107
|
+
if ("TEAMCITY_VERSION" in env) return /^(?:9\.0*[1-9]\d*\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
42045
42108
|
if (env.COLORTERM === "truecolor") return 3;
|
|
42046
42109
|
if (env.TERM === "xterm-kitty") return 3;
|
|
42047
42110
|
if (env.TERM === "xterm-ghostty") return 3;
|
|
42048
42111
|
if (env.TERM === "wezterm") return 3;
|
|
42049
42112
|
if ("TERM_PROGRAM" in env) {
|
|
42050
|
-
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
42113
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".", 1)[0], 10);
|
|
42051
42114
|
switch (env.TERM_PROGRAM) {
|
|
42052
42115
|
case "iTerm.app": return version >= 3 ? 3 : 2;
|
|
42053
42116
|
case "Apple_Terminal": return 2;
|
|
42054
42117
|
}
|
|
42055
42118
|
}
|
|
42056
|
-
if (/-256(color)?$/i.test(env.TERM)) return 2;
|
|
42119
|
+
if (/-256(?:color)?$/i.test(env.TERM)) return 2;
|
|
42057
42120
|
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
|
|
42058
42121
|
if ("COLORTERM" in env) return 1;
|
|
42059
42122
|
return min;
|
|
@@ -42069,50 +42132,30 @@ const supportsColor = {
|
|
|
42069
42132
|
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
42070
42133
|
};
|
|
42071
42134
|
//#endregion
|
|
42072
|
-
//#region node_modules/chalk/source/utilities.js
|
|
42073
|
-
function stringReplaceAll$2(string, substring, replacer) {
|
|
42074
|
-
let index = string.indexOf(substring);
|
|
42075
|
-
if (index === -1) return string;
|
|
42076
|
-
const substringLength = substring.length;
|
|
42077
|
-
let endIndex = 0;
|
|
42078
|
-
let returnValue = "";
|
|
42079
|
-
do {
|
|
42080
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
42081
|
-
endIndex = index + substringLength;
|
|
42082
|
-
index = string.indexOf(substring, endIndex);
|
|
42083
|
-
} while (index !== -1);
|
|
42084
|
-
returnValue += string.slice(endIndex);
|
|
42085
|
-
return returnValue;
|
|
42086
|
-
}
|
|
42087
|
-
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
42088
|
-
let endIndex = 0;
|
|
42089
|
-
let returnValue = "";
|
|
42090
|
-
do {
|
|
42091
|
-
const gotCR = string[index - 1] === "\r";
|
|
42092
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
42093
|
-
endIndex = index + 1;
|
|
42094
|
-
index = string.indexOf("\n", endIndex);
|
|
42095
|
-
} while (index !== -1);
|
|
42096
|
-
returnValue += string.slice(endIndex);
|
|
42097
|
-
return returnValue;
|
|
42098
|
-
}
|
|
42099
|
-
//#endregion
|
|
42100
42135
|
//#region node_modules/chalk/source/index.js
|
|
42101
42136
|
const { stdout: stdoutColor, stderr: stderrColor } = supportsColor;
|
|
42102
42137
|
const GENERATOR = Symbol("GENERATOR");
|
|
42103
42138
|
const STYLER = Symbol("STYLER");
|
|
42104
42139
|
const IS_EMPTY = Symbol("IS_EMPTY");
|
|
42105
|
-
const
|
|
42106
|
-
"ansi",
|
|
42107
|
-
"ansi",
|
|
42108
|
-
"ansi256",
|
|
42109
|
-
"ansi16m"
|
|
42110
|
-
];
|
|
42140
|
+
const LEVEL = Symbol("LEVEL");
|
|
42111
42141
|
const styles = Object.create(null);
|
|
42142
|
+
const assertValidLevel = (level) => {
|
|
42143
|
+
if (!Number.isSafeInteger(level) || level < 0 || level > 3) throw new Error("The `level` should be an integer from 0 to 3");
|
|
42144
|
+
};
|
|
42145
|
+
const levelDescriptor = {
|
|
42146
|
+
enumerable: true,
|
|
42147
|
+
get() {
|
|
42148
|
+
return this[LEVEL];
|
|
42149
|
+
},
|
|
42150
|
+
set(level) {
|
|
42151
|
+
assertValidLevel(level);
|
|
42152
|
+
this[LEVEL] = level;
|
|
42153
|
+
}
|
|
42154
|
+
};
|
|
42112
42155
|
const applyOptions = (object, options = {}) => {
|
|
42113
|
-
if (options.level
|
|
42156
|
+
if (options.level !== void 0) assertValidLevel(options.level);
|
|
42114
42157
|
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
42115
|
-
object
|
|
42158
|
+
object[LEVEL] = options.level === void 0 ? colorLevel : options.level;
|
|
42116
42159
|
};
|
|
42117
42160
|
const chalkFactory = (options) => {
|
|
42118
42161
|
const chalk = (...strings) => strings.join(" ");
|
|
@@ -42134,35 +42177,58 @@ styles.visible = { get() {
|
|
|
42134
42177
|
Object.defineProperty(this, "visible", { value: builder });
|
|
42135
42178
|
return builder;
|
|
42136
42179
|
} };
|
|
42137
|
-
const
|
|
42180
|
+
const createModelConverters = (model, type) => {
|
|
42181
|
+
const style = ansiStyles[type];
|
|
42138
42182
|
if (model === "rgb") {
|
|
42139
|
-
|
|
42140
|
-
|
|
42141
|
-
return
|
|
42183
|
+
const ansi = (red, green, blue) => style.ansi(ansiStyles.rgbToAnsi(red, green, blue));
|
|
42184
|
+
const ansi256 = (red, green, blue) => style.ansi256(ansiStyles.rgbToAnsi256(red, green, blue));
|
|
42185
|
+
return [
|
|
42186
|
+
ansi,
|
|
42187
|
+
ansi,
|
|
42188
|
+
ansi256,
|
|
42189
|
+
style.ansi16m
|
|
42190
|
+
];
|
|
42142
42191
|
}
|
|
42143
|
-
if (model === "hex")
|
|
42144
|
-
|
|
42192
|
+
if (model === "hex") {
|
|
42193
|
+
const ansi = (hex) => style.ansi(ansiStyles.hexToAnsi(hex));
|
|
42194
|
+
const ansi256 = (hex) => style.ansi256(ansiStyles.hexToAnsi256(hex));
|
|
42195
|
+
return [
|
|
42196
|
+
ansi,
|
|
42197
|
+
ansi,
|
|
42198
|
+
ansi256,
|
|
42199
|
+
(hex) => style.ansi16m(...ansiStyles.hexToRgb(hex))
|
|
42200
|
+
];
|
|
42201
|
+
}
|
|
42202
|
+
const ansi = (code) => style.ansi(ansiStyles.ansi256ToAnsi(code));
|
|
42203
|
+
return [
|
|
42204
|
+
ansi,
|
|
42205
|
+
ansi,
|
|
42206
|
+
style.ansi256,
|
|
42207
|
+
style.ansi256
|
|
42208
|
+
];
|
|
42145
42209
|
};
|
|
42146
42210
|
for (const model of [
|
|
42147
42211
|
"rgb",
|
|
42148
42212
|
"hex",
|
|
42149
42213
|
"ansi256"
|
|
42150
42214
|
]) {
|
|
42151
|
-
|
|
42152
|
-
|
|
42153
|
-
|
|
42154
|
-
|
|
42155
|
-
|
|
42156
|
-
|
|
42157
|
-
|
|
42158
|
-
|
|
42159
|
-
|
|
42160
|
-
|
|
42161
|
-
|
|
42162
|
-
|
|
42163
|
-
|
|
42164
|
-
|
|
42165
|
-
|
|
42215
|
+
const capitalizedModel = model[0].toUpperCase() + model.slice(1);
|
|
42216
|
+
for (const [styleName, type] of [
|
|
42217
|
+
[model, "color"],
|
|
42218
|
+
["bg" + capitalizedModel, "bgColor"],
|
|
42219
|
+
["underline" + capitalizedModel, "underlineColor"]
|
|
42220
|
+
]) {
|
|
42221
|
+
const { close } = ansiStyles[type];
|
|
42222
|
+
const converters = createModelConverters(model, type);
|
|
42223
|
+
styles[styleName] = { get() {
|
|
42224
|
+
const styleFunction = function(first, second, third) {
|
|
42225
|
+
const open = converters[this.level](first, second, third);
|
|
42226
|
+
return createBuilder(this, createStyler(open, close, this[STYLER]), this[IS_EMPTY]);
|
|
42227
|
+
};
|
|
42228
|
+
Object.defineProperty(this, styleName, { value: styleFunction });
|
|
42229
|
+
return styleFunction;
|
|
42230
|
+
} };
|
|
42231
|
+
}
|
|
42166
42232
|
}
|
|
42167
42233
|
const proto = Object.defineProperties(() => {}, {
|
|
42168
42234
|
...styles,
|
|
@@ -42195,15 +42261,19 @@ const createStyler = (open, close, parent) => {
|
|
|
42195
42261
|
};
|
|
42196
42262
|
};
|
|
42197
42263
|
const createBuilder = (self, _styler, _isEmpty) => {
|
|
42198
|
-
const builder = (...arguments_) =>
|
|
42264
|
+
const builder = (...arguments_) => {
|
|
42265
|
+
if (arguments_.length === 1) return applyStyle(builder, "" + arguments_[0]);
|
|
42266
|
+
if (arguments_.length === 2) return applyStyle(builder, arguments_[0] + " " + arguments_[1]);
|
|
42267
|
+
return applyStyle(builder, arguments_.join(" "));
|
|
42268
|
+
};
|
|
42199
42269
|
Object.setPrototypeOf(builder, proto);
|
|
42200
|
-
builder[GENERATOR] = self;
|
|
42270
|
+
builder[GENERATOR] = self[GENERATOR] ?? self;
|
|
42201
42271
|
builder[STYLER] = _styler;
|
|
42202
42272
|
builder[IS_EMPTY] = _isEmpty;
|
|
42203
42273
|
return builder;
|
|
42204
42274
|
};
|
|
42205
42275
|
const applyStyle = (self, string) => {
|
|
42206
|
-
if (self
|
|
42276
|
+
if (self[GENERATOR][LEVEL] <= 0 || !string) return self[IS_EMPTY] ? "" : string;
|
|
42207
42277
|
let styler = self[STYLER];
|
|
42208
42278
|
if (styler === void 0) return string;
|
|
42209
42279
|
const { openAll, closeAll } = styler;
|
|
@@ -42215,7 +42285,10 @@ const applyStyle = (self, string) => {
|
|
|
42215
42285
|
if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
42216
42286
|
return openAll + string + closeAll;
|
|
42217
42287
|
};
|
|
42218
|
-
Object.defineProperties(createChalk.prototype,
|
|
42288
|
+
Object.defineProperties(createChalk.prototype, {
|
|
42289
|
+
...styles,
|
|
42290
|
+
level: levelDescriptor
|
|
42291
|
+
});
|
|
42219
42292
|
const chalk = createChalk();
|
|
42220
42293
|
const chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
42221
42294
|
//#endregion
|
|
@@ -42540,6 +42613,15 @@ const unicodeWordMatch = /(?:[\dA-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00
|
|
|
42540
42613
|
//#endregion
|
|
42541
42614
|
//#region src/helpers.ts
|
|
42542
42615
|
/**
|
|
42616
|
+
* Returns the input value if it is not empty, otherwise returns undefined.
|
|
42617
|
+
* @param value - The input value to check.
|
|
42618
|
+
* @returns The input value if it is not empty, otherwise undefined.
|
|
42619
|
+
*/
|
|
42620
|
+
function undefinedOnEmpty(value) {
|
|
42621
|
+
if (!value || value === "") return;
|
|
42622
|
+
return value;
|
|
42623
|
+
}
|
|
42624
|
+
/**
|
|
42543
42625
|
* Converts the given text to title case.
|
|
42544
42626
|
* @param text - The text to convert.
|
|
42545
42627
|
* @returns The text converted to title case.
|
|
@@ -42829,7 +42911,7 @@ function getCurrentVersionString(inputs) {
|
|
|
42829
42911
|
versionString = detectedVersion ?? "0.0.0";
|
|
42830
42912
|
const prefix = inputs.config.get("versioning:prefix") ?? "v";
|
|
42831
42913
|
if (versionSource !== "git-branch" && versionSource !== "git-sha" && versionString && !versionString.startsWith(prefix)) versionString = `${prefix}${versionString}`;
|
|
42832
|
-
} else versionString = inputs.config.get("versioning:branch");
|
|
42914
|
+
} else versionString = undefinedOnEmpty(inputs.config.get("versioning:branch")) ?? "main";
|
|
42833
42915
|
log.debug(`version to use in generated example is ${versionString}`);
|
|
42834
42916
|
return versionString;
|
|
42835
42917
|
}
|
|
@@ -171852,9 +171934,10 @@ function githubBadges(owner, repo) {
|
|
|
171852
171934
|
* @returns {string} - The HTML markup for the badge.
|
|
171853
171935
|
*/
|
|
171854
171936
|
function generateBadge(item, log) {
|
|
171855
|
-
const
|
|
171937
|
+
const escapeAttribute = (value) => value.replaceAll("&", "&").replaceAll("\"", """).replaceAll("<", "<").replaceAll(">", ">");
|
|
171938
|
+
const badgeTemplate = `<img src="${escapeAttribute(item.img)}" alt="${escapeAttribute(item.alt)}" />`;
|
|
171856
171939
|
log.info(`Generating badge ${item.alt}`);
|
|
171857
|
-
if (item.url) return `<a href="${
|
|
171940
|
+
if (item.url) return `<a href="${escapeAttribute(item.url)}">${badgeTemplate}</a>`;
|
|
171858
171941
|
return badgeTemplate;
|
|
171859
171942
|
}
|
|
171860
171943
|
/**
|
package/dist/mjs/index.js
CHANGED
|
@@ -422,6 +422,15 @@ const unicodeWordMatch = /(?:[\dA-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00
|
|
|
422
422
|
//#endregion
|
|
423
423
|
//#region src/helpers.ts
|
|
424
424
|
/**
|
|
425
|
+
* Returns the input value if it is not empty, otherwise returns undefined.
|
|
426
|
+
* @param value - The input value to check.
|
|
427
|
+
* @returns The input value if it is not empty, otherwise undefined.
|
|
428
|
+
*/
|
|
429
|
+
function undefinedOnEmpty(value) {
|
|
430
|
+
if (!value || value === "") return;
|
|
431
|
+
return value;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
425
434
|
* Converts the given text to title case.
|
|
426
435
|
* @param text - The text to convert.
|
|
427
436
|
* @returns The text converted to title case.
|
|
@@ -711,7 +720,7 @@ function getCurrentVersionString(inputs) {
|
|
|
711
720
|
versionString = detectedVersion ?? "0.0.0";
|
|
712
721
|
const prefix = inputs.config.get("versioning:prefix") ?? "v";
|
|
713
722
|
if (versionSource !== "git-branch" && versionSource !== "git-sha" && versionString && !versionString.startsWith(prefix)) versionString = `${prefix}${versionString}`;
|
|
714
|
-
} else versionString = inputs.config.get("versioning:branch");
|
|
723
|
+
} else versionString = undefinedOnEmpty(inputs.config.get("versioning:branch")) ?? "main";
|
|
715
724
|
log.debug(`version to use in generated example is ${versionString}`);
|
|
716
725
|
return versionString;
|
|
717
726
|
}
|
|
@@ -1377,9 +1386,10 @@ function githubBadges(owner, repo) {
|
|
|
1377
1386
|
* @returns {string} - The HTML markup for the badge.
|
|
1378
1387
|
*/
|
|
1379
1388
|
function generateBadge(item, log) {
|
|
1380
|
-
const
|
|
1389
|
+
const escapeAttribute = (value) => value.replaceAll("&", "&").replaceAll("\"", """).replaceAll("<", "<").replaceAll(">", ">");
|
|
1390
|
+
const badgeTemplate = `<img src="${escapeAttribute(item.img)}" alt="${escapeAttribute(item.alt)}" />`;
|
|
1381
1391
|
log.info(`Generating badge ${item.alt}`);
|
|
1382
|
-
if (item.url) return `<a href="${
|
|
1392
|
+
if (item.url) return `<a href="${escapeAttribute(item.url)}">${badgeTemplate}</a>`;
|
|
1383
1393
|
return badgeTemplate;
|
|
1384
1394
|
}
|
|
1385
1395
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-action-readme-generator",
|
|
3
3
|
"displayName": "bitflight-devops/github-action-readme-generator",
|
|
4
|
-
"version": "1.12.
|
|
4
|
+
"version": "1.12.2",
|
|
5
5
|
"description": "The docs generator for GitHub Actions. Auto-syncs action.yml to README.md with 8 sections: inputs, outputs, usage, badges, branding & more. Works as CLI or GitHub Action.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"github-actions",
|
|
@@ -64,16 +64,13 @@
|
|
|
64
64
|
"lint:fix": "vp lint --type-aware --type-check --fix ./src/ ./__tests__/ && npm run lint:markdown:fix",
|
|
65
65
|
"check": "vp check ./src/ ./__tests__/",
|
|
66
66
|
"check:fix": "vp check --fix ./src/ ./__tests__/",
|
|
67
|
-
"markdownlint": "markdownlint",
|
|
68
67
|
"lint:markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore",
|
|
69
68
|
"lint:markdown:fix": "npm run lint:markdown -- --fix",
|
|
70
69
|
"pre-commit": "vp staged && npm run build && npm run generate-docs && npm run lint:markdown",
|
|
71
70
|
"prepare": "[ -n \"${GITHUB_ACTIONS:-}\" ] || { husky install; command -v vp >/dev/null 2>&1 || curl -fsSL https://viteplus.dev/install.sh | VP_NODE_MANAGER=no bash; }",
|
|
72
71
|
"semantic-release": "semantic-release",
|
|
73
72
|
"test": "vp test",
|
|
74
|
-
"coverage": "vp test --coverage"
|
|
75
|
-
"version:manual": "echo 'Run versioning commands';echo \"::set-output name=tag::v${npm_package_version}\"",
|
|
76
|
-
"postversion:manual": "git push --tags origin && git push origin"
|
|
73
|
+
"coverage": "vp test --coverage"
|
|
77
74
|
},
|
|
78
75
|
"commitlint": {
|
|
79
76
|
"extends": [
|
|
@@ -139,7 +136,7 @@
|
|
|
139
136
|
"@svgdotjs/svg.js": "^3.2.5",
|
|
140
137
|
"@types/feather-icons": "^4.29.4",
|
|
141
138
|
"@types/svgdom": "^0.1.2",
|
|
142
|
-
"chalk": "^
|
|
139
|
+
"chalk": "^6.0.0",
|
|
143
140
|
"feather-icons": "^4.29.2",
|
|
144
141
|
"nconf": "^0.13.0",
|
|
145
142
|
"prettier": "^3.8.1",
|
|
@@ -150,10 +147,10 @@
|
|
|
150
147
|
"@commitlint/cli": "^21.0.1",
|
|
151
148
|
"@commitlint/config-conventional": "^21.0.2",
|
|
152
149
|
"@commitlint/prompt": "^21.0.1",
|
|
153
|
-
"@semantic-release/changelog": "^
|
|
150
|
+
"@semantic-release/changelog": "^7.0.0",
|
|
154
151
|
"@semantic-release/exec": "^7.1.0",
|
|
155
152
|
"@semantic-release/git": "^10.0.1",
|
|
156
|
-
"@tsconfig/
|
|
153
|
+
"@tsconfig/node24": "^24.0.4",
|
|
157
154
|
"@types/nconf": "^0.10.5",
|
|
158
155
|
"@types/node": "^26.1.1",
|
|
159
156
|
"@vitest/coverage-v8": "4.1.10",
|