github-action-readme-generator 1.9.1 → 1.9.3
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 +26 -0
- package/README.md +1 -1
- package/dist/bin/index.js +130 -53
- package/dist/mjs/Action.d.ts +15 -15
- package/dist/mjs/Action.js +11 -4
- package/dist/mjs/Action.js.map +1 -1
- package/dist/mjs/constants.js.map +1 -1
- package/dist/mjs/helpers.d.ts +4 -5
- package/dist/mjs/helpers.js +104 -30
- package/dist/mjs/helpers.js.map +1 -1
- package/dist/mjs/inputs.d.ts +3 -11
- package/dist/mjs/inputs.js +14 -14
- package/dist/mjs/inputs.js.map +1 -1
- package/dist/mjs/logtask/index.js +1 -1
- package/dist/mjs/logtask/index.js.map +1 -1
- package/dist/mjs/prettier.js +4 -3
- package/dist/mjs/prettier.js.map +1 -1
- package/dist/mjs/readme-editor.js.map +1 -1
- package/dist/mjs/readme-generator.d.ts +3 -3
- package/dist/mjs/readme-generator.js.map +1 -1
- package/dist/mjs/save.d.ts +2 -2
- package/dist/mjs/save.js.map +1 -1
- package/dist/mjs/sections/index.d.ts +1 -1
- package/dist/mjs/sections/index.js +8 -8
- package/dist/mjs/sections/index.js.map +1 -1
- package/dist/mjs/sections/update-badges.d.ts +1 -1
- package/dist/mjs/sections/update-badges.js.map +1 -1
- package/dist/mjs/sections/update-branding.d.ts +1 -1
- package/dist/mjs/sections/update-branding.js.map +1 -1
- package/dist/mjs/sections/update-contents.d.ts +1 -1
- package/dist/mjs/sections/update-contents.js.map +1 -1
- package/dist/mjs/sections/update-description.d.ts +1 -1
- package/dist/mjs/sections/update-description.js.map +1 -1
- package/dist/mjs/sections/update-inputs.d.ts +1 -1
- package/dist/mjs/sections/update-inputs.js.map +1 -1
- package/dist/mjs/sections/update-outputs.d.ts +1 -1
- package/dist/mjs/sections/update-outputs.js.map +1 -1
- package/dist/mjs/sections/update-title.d.ts +1 -1
- package/dist/mjs/sections/update-title.js.map +1 -1
- package/dist/mjs/sections/update-usage.d.ts +1 -1
- package/dist/mjs/sections/update-usage.js.map +1 -1
- package/dist/mjs/svg-editor.d.mts +2 -2
- package/dist/mjs/svg-editor.mjs +3 -3
- package/dist/mjs/svg-editor.mjs.map +1 -1
- package/dist/types/index.d.ts +109 -129
- package/package.json +17 -37
package/dist/types/index.d.ts
CHANGED
|
@@ -241,37 +241,37 @@ declare module "src/Action" {
|
|
|
241
241
|
* Defines the runs property for container actions.
|
|
242
242
|
*/
|
|
243
243
|
type RunsContainer = {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
using: ContainerAction;
|
|
245
|
+
image: string;
|
|
246
|
+
args?: string[];
|
|
247
247
|
'pre-entrypoint'?: string;
|
|
248
248
|
'post-entrypoint'?: string;
|
|
249
|
-
|
|
249
|
+
entrypoint?: string;
|
|
250
250
|
};
|
|
251
251
|
/**
|
|
252
252
|
* Defines the runs property for JavaScript actions.
|
|
253
253
|
*/
|
|
254
254
|
type RunsJavascript = {
|
|
255
255
|
/** The runner used to execute the action */
|
|
256
|
-
|
|
256
|
+
using: JavascriptAction;
|
|
257
257
|
/** The entrypoint file for the action */
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
main: string;
|
|
259
|
+
pre?: string;
|
|
260
260
|
'pre-if'?: string;
|
|
261
261
|
'post-if'?: string;
|
|
262
|
-
|
|
262
|
+
post?: string;
|
|
263
263
|
};
|
|
264
264
|
/**
|
|
265
265
|
* Defines the steps property for composite actions.
|
|
266
266
|
*/
|
|
267
267
|
type Steps = {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
268
|
+
shell?: string;
|
|
269
|
+
if?: string;
|
|
270
|
+
run?: string;
|
|
271
|
+
name?: string;
|
|
272
|
+
id?: string;
|
|
273
273
|
'working-directory'?: string;
|
|
274
|
-
|
|
274
|
+
env: {
|
|
275
275
|
[key: string]: string;
|
|
276
276
|
};
|
|
277
277
|
};
|
|
@@ -311,7 +311,7 @@ declare module "src/Action" {
|
|
|
311
311
|
* Parses and represents metadata from action.yml.
|
|
312
312
|
*/
|
|
313
313
|
export default class Action implements ActionYaml {
|
|
314
|
-
static validate(obj:
|
|
314
|
+
static validate(obj: unknown): obj is ActionType;
|
|
315
315
|
log: LogTask;
|
|
316
316
|
/** Name of the action */
|
|
317
317
|
name: string;
|
|
@@ -360,10 +360,7 @@ declare module "src/Action" {
|
|
|
360
360
|
stringify(): string;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
declare module "__tests__/action.test" {
|
|
364
|
-
export const __filename: string;
|
|
365
|
-
export const __dirname: string;
|
|
366
|
-
}
|
|
363
|
+
declare module "__tests__/action.test" { }
|
|
367
364
|
declare module "__tests__/constants.test" { }
|
|
368
365
|
declare module "__tests__/env.test" { }
|
|
369
366
|
declare module "src/prettier" {
|
|
@@ -440,20 +437,12 @@ declare module "src/readme-editor" {
|
|
|
440
437
|
declare module "src/inputs" {
|
|
441
438
|
import { Context } from '@actions/github/lib/context.js';
|
|
442
439
|
import nconf from 'nconf';
|
|
443
|
-
import Action, { Input } from "src/Action";
|
|
444
|
-
import { ReadmeSection } from "src/constants";
|
|
440
|
+
import Action, { type Input } from "src/Action";
|
|
441
|
+
import { type ReadmeSection } from "src/constants";
|
|
445
442
|
import LogTask from "src/logtask/index";
|
|
446
443
|
import ReadmeEditor from "src/readme-editor";
|
|
447
444
|
const Provider: typeof nconf.Provider;
|
|
448
445
|
type IOptions = nconf.IOptions;
|
|
449
|
-
/**
|
|
450
|
-
* Get the filename from the import.meta.url
|
|
451
|
-
*/
|
|
452
|
-
export const __filename: string;
|
|
453
|
-
/**
|
|
454
|
-
* Get the directory name from the filename
|
|
455
|
-
*/
|
|
456
|
-
export const __dirname: string;
|
|
457
446
|
/**
|
|
458
447
|
* Change working directory to output of workingDirectory()
|
|
459
448
|
*/
|
|
@@ -477,7 +466,7 @@ declare module "src/inputs" {
|
|
|
477
466
|
* Type alias for Provider instance
|
|
478
467
|
*/
|
|
479
468
|
type ProviderInstance = InstanceType<typeof Provider>;
|
|
480
|
-
export function transformGitHubInputsToArgv(log: LogTask,
|
|
469
|
+
export function transformGitHubInputsToArgv(log: LogTask, _config: ProviderInstance, obj: KVPairType): undefined | KVPairType;
|
|
481
470
|
/**
|
|
482
471
|
* Sets config value from action file default
|
|
483
472
|
*
|
|
@@ -604,9 +593,7 @@ declare module "src/helpers" {
|
|
|
604
593
|
import type { Context } from '@actions/github/lib/context.js';
|
|
605
594
|
import type Inputs from "src/inputs";
|
|
606
595
|
import LogTask from "src/logtask/index";
|
|
607
|
-
import { Nullable } from "src/util";
|
|
608
|
-
export const __filename: string;
|
|
609
|
-
export const __dirname: string;
|
|
596
|
+
import { type Nullable } from "src/util";
|
|
610
597
|
/**
|
|
611
598
|
* Returns the input value if it is not empty, otherwise returns undefined.
|
|
612
599
|
* @param value - The input value to check.
|
|
@@ -661,9 +648,10 @@ declare module "src/helpers" {
|
|
|
661
648
|
* Finds the repository information from the input, context, environment variables, or git configuration.
|
|
662
649
|
* @param inputRepo - The input repository string.
|
|
663
650
|
* @param context - The GitHub context object.
|
|
651
|
+
* @param baseDir - Optional base directory to look for .git/config (defaults to CWD).
|
|
664
652
|
* @returns The repository information (owner and repo) or null if not found.
|
|
665
653
|
*/
|
|
666
|
-
export function repositoryFinder(inputRepo: Nullable<string>, context: Nullable<Context
|
|
654
|
+
export function repositoryFinder(inputRepo: Nullable<string>, context: Nullable<Context>, baseDir?: string): Repo | null;
|
|
667
655
|
/**
|
|
668
656
|
* Returns the default branch of the git repository.
|
|
669
657
|
* @returns The default branch.
|
|
@@ -692,89 +680,17 @@ declare module "src/helpers" {
|
|
|
692
680
|
export function getCurrentVersionString(inputs: Inputs): string;
|
|
693
681
|
export function indexOfRegex(str: string, providedRegex: RegExp): number;
|
|
694
682
|
export function lastIndexOfRegex(str: string, providedRegex: RegExp): number;
|
|
695
|
-
export function isObject(value:
|
|
696
|
-
}
|
|
697
|
-
declare module "__tests__/helpers.test" {
|
|
698
|
-
export const __filename: string;
|
|
699
|
-
export const __dirname: string;
|
|
700
|
-
}
|
|
701
|
-
declare module "__tests__/inputs.test" {
|
|
702
|
-
export const __filename: string;
|
|
703
|
-
export const __dirname: string;
|
|
704
|
-
}
|
|
705
|
-
declare module "__tests__/integration-issue-335.test" { }
|
|
706
|
-
declare module "src/markdowner/index" {
|
|
707
|
-
/**
|
|
708
|
-
* Types representing a 2D array of strings for a Markdown table.
|
|
709
|
-
*/
|
|
710
|
-
export type MarkdownArrayRowType = string[][];
|
|
711
|
-
export type MarkdownArrayItemType = string;
|
|
712
|
-
/**
|
|
713
|
-
* Fills a string to a desired width by padding with spaces.
|
|
714
|
-
*
|
|
715
|
-
* @param text - The text to pad.
|
|
716
|
-
* @param width - The desired total width.
|
|
717
|
-
* @param paddingStart - Number of spaces to pad at the start.
|
|
718
|
-
* @returns The padded string.
|
|
719
|
-
*/
|
|
720
|
-
export function padString(text: string, width: number, paddingStart: number): string;
|
|
721
|
-
/**
|
|
722
|
-
* Escapes special Markdown characters in a string.
|
|
723
|
-
*
|
|
724
|
-
* @param text - The text to escape.
|
|
725
|
-
* @returns The escaped text.
|
|
726
|
-
*/
|
|
727
|
-
export function markdownEscapeTableCell(text: string): string;
|
|
728
|
-
/**
|
|
729
|
-
* Escapes inline code blocks in a Markdown string.
|
|
730
|
-
*
|
|
731
|
-
* @param content - Markdown string.
|
|
732
|
-
* @returns String with escaped inline code blocks.
|
|
733
|
-
*/
|
|
734
|
-
export function markdownEscapeInlineCode(content: string): string;
|
|
735
|
-
/**
|
|
736
|
-
* Clones a 2D array.
|
|
737
|
-
*
|
|
738
|
-
* @param arr - Array to clone.
|
|
739
|
-
* @returns Cloned array.
|
|
740
|
-
*/
|
|
741
|
-
export function cloneArray(arr: MarkdownArrayRowType): MarkdownArrayRowType;
|
|
742
|
-
/**
|
|
743
|
-
* Gets max and min column counts from 2D array.
|
|
744
|
-
*
|
|
745
|
-
* @param data - 2D string array.
|
|
746
|
-
* @returns Object with max and min cols.
|
|
747
|
-
*/
|
|
748
|
-
export function getColumnCounts(data: MarkdownArrayRowType): {
|
|
749
|
-
maxCols: number;
|
|
750
|
-
minCols: number;
|
|
751
|
-
};
|
|
752
|
-
/**
|
|
753
|
-
* Pads 2D array rows to equal length.
|
|
754
|
-
*
|
|
755
|
-
* @param data - 2D array to pad.
|
|
756
|
-
* @param maxCols - Number of columns to pad to.
|
|
757
|
-
* @returns Padded 2D array.
|
|
758
|
-
*/
|
|
759
|
-
export function padArrayRows(data: MarkdownArrayRowType, maxCols: number): MarkdownArrayRowType;
|
|
760
|
-
/**
|
|
761
|
-
* Converts a 2D array of strings to a Markdown table.
|
|
762
|
-
*
|
|
763
|
-
* @param data - 2D string array.
|
|
764
|
-
* @returns Markdown table string.
|
|
765
|
-
*/
|
|
766
|
-
export function ArrayOfArraysToMarkdownTable(providedTableContent: MarkdownArrayRowType): string;
|
|
767
|
-
export default ArrayOfArraysToMarkdownTable;
|
|
683
|
+
export function isObject(value: unknown): value is object;
|
|
768
684
|
}
|
|
769
|
-
declare module "__tests__/
|
|
770
|
-
declare module "__tests__/
|
|
685
|
+
declare module "__tests__/helpers.test" { }
|
|
686
|
+
declare module "__tests__/inputs.test" { }
|
|
771
687
|
declare module "src/sections/update-badges" {
|
|
772
688
|
/**
|
|
773
689
|
* This TypeScript code imports necessary modules and defines a function named 'updateBadges' which takes a sectionToken (ReadmeSection) and an instance of the 'Inputs' class as its parameters.
|
|
774
690
|
* The function is responsible for updating the badges section in the README.md file based on the provided inputs.
|
|
775
691
|
* It utilizes the 'LogTask' class for logging purposes.
|
|
776
692
|
*/
|
|
777
|
-
import { ReadmeSection } from "src/constants";
|
|
693
|
+
import type { ReadmeSection } from "src/constants";
|
|
778
694
|
import type Inputs from "src/inputs";
|
|
779
695
|
/**
|
|
780
696
|
* Interface for a badge.
|
|
@@ -804,7 +720,7 @@ declare module "src/svg-editor" {
|
|
|
804
720
|
/**
|
|
805
721
|
* Initializes the SVG window, document, and canvas if not already set up.
|
|
806
722
|
*/
|
|
807
|
-
initSVG():
|
|
723
|
+
initSVG(): void;
|
|
808
724
|
/**
|
|
809
725
|
* Generates a branded SVG image.
|
|
810
726
|
* @param {string | undefined} svgPath - Path to write the generated SVG file to.
|
|
@@ -812,7 +728,7 @@ declare module "src/svg-editor" {
|
|
|
812
728
|
* @param {Partial<BrandColors>} bgcolor - Background color for the image.
|
|
813
729
|
* @returns {Promise<void>} A promise that resolves when the image is generated.
|
|
814
730
|
*/
|
|
815
|
-
generateSvgImage(svgPath: string | undefined, icon?: Partial<FeatherIconNames>, bgcolor?: Partial<BrandColors>):
|
|
731
|
+
generateSvgImage(svgPath: string | undefined, icon?: Partial<FeatherIconNames>, bgcolor?: Partial<BrandColors>): void;
|
|
816
732
|
/**
|
|
817
733
|
* Writes the SVG xml to disk.
|
|
818
734
|
* @param {string} svgPath - File path to save the SVG to.
|
|
@@ -832,7 +748,7 @@ declare module "src/svg-editor" {
|
|
|
832
748
|
declare module "src/sections/update-branding" {
|
|
833
749
|
import type { FeatherIconNames } from 'feather-icons';
|
|
834
750
|
import type { BrandColors } from "src/constants";
|
|
835
|
-
import { ReadmeSection } from "src/constants";
|
|
751
|
+
import { type ReadmeSection } from "src/constants";
|
|
836
752
|
import type Inputs from "src/inputs";
|
|
837
753
|
export interface IBranding {
|
|
838
754
|
alt: string;
|
|
@@ -893,7 +809,7 @@ declare module "src/sections/update-contents" {
|
|
|
893
809
|
* @param {ReadmeSection} sectionToken - The sectionToken representing the section of the README to update.
|
|
894
810
|
* @param {Inputs} inputs - The Inputs class instance.
|
|
895
811
|
*/
|
|
896
|
-
import { ReadmeSection } from "src/constants";
|
|
812
|
+
import type { ReadmeSection } from "src/constants";
|
|
897
813
|
import type Inputs from "src/inputs";
|
|
898
814
|
export default function updateContents(sectionToken: ReadmeSection, inputs: Inputs): Record<string, string>;
|
|
899
815
|
}
|
|
@@ -905,10 +821,73 @@ declare module "src/sections/update-description" {
|
|
|
905
821
|
* @param {ReadmeSection} sectionToken - The sectionToken representing the section of the README to update.
|
|
906
822
|
* @param {Inputs} inputs - The Inputs class instance.
|
|
907
823
|
*/
|
|
908
|
-
import { ReadmeSection } from "src/constants";
|
|
824
|
+
import type { ReadmeSection } from "src/constants";
|
|
909
825
|
import type Inputs from "src/inputs";
|
|
910
826
|
export default function updateDescription(sectionToken: ReadmeSection, inputs: Inputs): Record<string, string>;
|
|
911
827
|
}
|
|
828
|
+
declare module "src/markdowner/index" {
|
|
829
|
+
/**
|
|
830
|
+
* Types representing a 2D array of strings for a Markdown table.
|
|
831
|
+
*/
|
|
832
|
+
export type MarkdownArrayRowType = string[][];
|
|
833
|
+
export type MarkdownArrayItemType = string;
|
|
834
|
+
/**
|
|
835
|
+
* Fills a string to a desired width by padding with spaces.
|
|
836
|
+
*
|
|
837
|
+
* @param text - The text to pad.
|
|
838
|
+
* @param width - The desired total width.
|
|
839
|
+
* @param paddingStart - Number of spaces to pad at the start.
|
|
840
|
+
* @returns The padded string.
|
|
841
|
+
*/
|
|
842
|
+
export function padString(text: string, width: number, paddingStart: number): string;
|
|
843
|
+
/**
|
|
844
|
+
* Escapes special Markdown characters in a string.
|
|
845
|
+
*
|
|
846
|
+
* @param text - The text to escape.
|
|
847
|
+
* @returns The escaped text.
|
|
848
|
+
*/
|
|
849
|
+
export function markdownEscapeTableCell(text: string): string;
|
|
850
|
+
/**
|
|
851
|
+
* Escapes inline code blocks in a Markdown string.
|
|
852
|
+
*
|
|
853
|
+
* @param content - Markdown string.
|
|
854
|
+
* @returns String with escaped inline code blocks.
|
|
855
|
+
*/
|
|
856
|
+
export function markdownEscapeInlineCode(content: string): string;
|
|
857
|
+
/**
|
|
858
|
+
* Clones a 2D array.
|
|
859
|
+
*
|
|
860
|
+
* @param arr - Array to clone.
|
|
861
|
+
* @returns Cloned array.
|
|
862
|
+
*/
|
|
863
|
+
export function cloneArray(arr: MarkdownArrayRowType): MarkdownArrayRowType;
|
|
864
|
+
/**
|
|
865
|
+
* Gets max and min column counts from 2D array.
|
|
866
|
+
*
|
|
867
|
+
* @param data - 2D string array.
|
|
868
|
+
* @returns Object with max and min cols.
|
|
869
|
+
*/
|
|
870
|
+
export function getColumnCounts(data: MarkdownArrayRowType): {
|
|
871
|
+
maxCols: number;
|
|
872
|
+
minCols: number;
|
|
873
|
+
};
|
|
874
|
+
/**
|
|
875
|
+
* Pads 2D array rows to equal length.
|
|
876
|
+
*
|
|
877
|
+
* @param data - 2D array to pad.
|
|
878
|
+
* @param maxCols - Number of columns to pad to.
|
|
879
|
+
* @returns Padded 2D array.
|
|
880
|
+
*/
|
|
881
|
+
export function padArrayRows(data: MarkdownArrayRowType, maxCols: number): MarkdownArrayRowType;
|
|
882
|
+
/**
|
|
883
|
+
* Converts a 2D array of strings to a Markdown table.
|
|
884
|
+
*
|
|
885
|
+
* @param data - 2D string array.
|
|
886
|
+
* @returns Markdown table string.
|
|
887
|
+
*/
|
|
888
|
+
export function ArrayOfArraysToMarkdownTable(providedTableContent: MarkdownArrayRowType): string;
|
|
889
|
+
export default ArrayOfArraysToMarkdownTable;
|
|
890
|
+
}
|
|
912
891
|
declare module "src/sections/update-inputs" {
|
|
913
892
|
/**
|
|
914
893
|
* This TypeScript code exports a function named 'updateInputs' which takes a sectionToken (ReadmeSection) and an instance of the 'Inputs' class as its parameters.
|
|
@@ -917,7 +896,7 @@ declare module "src/sections/update-inputs" {
|
|
|
917
896
|
* @param {ReadmeSection} sectionToken - The sectionToken representing the section of the README to update.
|
|
918
897
|
* @param {Inputs} inputs - The Inputs class instance.
|
|
919
898
|
*/
|
|
920
|
-
import { ReadmeSection } from "src/constants";
|
|
899
|
+
import type { ReadmeSection } from "src/constants";
|
|
921
900
|
import type Inputs from "src/inputs";
|
|
922
901
|
export default function updateInputs(sectionToken: ReadmeSection, inputs: Inputs): Record<string, string>;
|
|
923
902
|
}
|
|
@@ -930,7 +909,7 @@ declare module "src/sections/update-outputs" {
|
|
|
930
909
|
* @param {ReadmeSection} sectionToken - The sectionToken used for identifying the section.
|
|
931
910
|
* @param {Inputs} inputs - The Inputs class instance.
|
|
932
911
|
*/
|
|
933
|
-
import { ReadmeSection } from "src/constants";
|
|
912
|
+
import type { ReadmeSection } from "src/constants";
|
|
934
913
|
import type Inputs from "src/inputs";
|
|
935
914
|
export default function updateOutputs(sectionToken: ReadmeSection, inputs: Inputs): Record<string, string>;
|
|
936
915
|
}
|
|
@@ -942,12 +921,12 @@ declare module "src/sections/update-title" {
|
|
|
942
921
|
* @param {ReadmeSection} sectionToken - The sectionToken representing the section of the README to update.
|
|
943
922
|
* @param {Inputs} inputs - The Inputs class instance.
|
|
944
923
|
*/
|
|
945
|
-
import { ReadmeSection } from "src/constants";
|
|
924
|
+
import type { ReadmeSection } from "src/constants";
|
|
946
925
|
import type Inputs from "src/inputs";
|
|
947
926
|
export default function updateTitle(sectionToken: ReadmeSection, inputs: Inputs): Record<string, string>;
|
|
948
927
|
}
|
|
949
928
|
declare module "src/sections/update-usage" {
|
|
950
|
-
import { ReadmeSection } from "src/constants";
|
|
929
|
+
import type { ReadmeSection } from "src/constants";
|
|
951
930
|
import type Inputs from "src/inputs";
|
|
952
931
|
export default function updateUsage(sectionToken: ReadmeSection, inputs: Inputs): Promise<Record<string, string>>;
|
|
953
932
|
}
|
|
@@ -960,14 +939,14 @@ declare module "src/sections/index" {
|
|
|
960
939
|
* @param {Inputs} inputs - The Inputs class instance.
|
|
961
940
|
* @returns {Promise<void>} A promise that resolves once the section is updated.
|
|
962
941
|
*/
|
|
963
|
-
import { ReadmeSection } from "src/constants";
|
|
942
|
+
import type { ReadmeSection } from "src/constants";
|
|
964
943
|
import type Inputs from "src/inputs";
|
|
965
944
|
export default function updateSection(section: ReadmeSection, inputs: Inputs): Promise<Record<string, string>>;
|
|
966
945
|
}
|
|
967
946
|
declare module "src/readme-generator" {
|
|
968
|
-
import { ReadmeSection } from "src/constants";
|
|
969
|
-
import Inputs from "src/inputs";
|
|
970
|
-
import LogTask from "src/logtask/index";
|
|
947
|
+
import type { ReadmeSection } from "src/constants";
|
|
948
|
+
import type Inputs from "src/inputs";
|
|
949
|
+
import type LogTask from "src/logtask/index";
|
|
971
950
|
export type SectionKV = Record<string, string>;
|
|
972
951
|
/**
|
|
973
952
|
* Class for managing README generation.
|
|
@@ -1016,10 +995,11 @@ declare module "src/readme-generator" {
|
|
|
1016
995
|
generate(providedSections?: ReadmeSection[]): Promise<void>;
|
|
1017
996
|
}
|
|
1018
997
|
}
|
|
1019
|
-
declare module "__tests__/
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
}
|
|
998
|
+
declare module "__tests__/integration-external-repo.test" { }
|
|
999
|
+
declare module "__tests__/integration-issue-335.test" { }
|
|
1000
|
+
declare module "__tests__/markdowner.test" { }
|
|
1001
|
+
declare module "__tests__/prettier.test" { }
|
|
1002
|
+
declare module "__tests__/readme-generator.test" { }
|
|
1023
1003
|
declare module "__tests__/update-contents.test" { }
|
|
1024
1004
|
declare module "__tests__/logtask/index.test" { }
|
|
1025
1005
|
declare module "src/config" {
|
|
@@ -1066,8 +1046,8 @@ declare module "src/config" {
|
|
|
1066
1046
|
}
|
|
1067
1047
|
}
|
|
1068
1048
|
declare module "src/save" {
|
|
1069
|
-
import Inputs from "src/inputs";
|
|
1070
|
-
import LogTask from "src/logtask/index";
|
|
1049
|
+
import type Inputs from "src/inputs";
|
|
1050
|
+
import type LogTask from "src/logtask/index";
|
|
1071
1051
|
/**
|
|
1072
1052
|
* This script rebuilds the usage section in the README.md to be consistent with the action.yml
|
|
1073
1053
|
* @param {Inputs} inputs - the inputs class
|
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.9.
|
|
4
|
+
"version": "1.9.3",
|
|
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",
|
|
@@ -58,14 +58,18 @@
|
|
|
58
58
|
"commit": "git-cz",
|
|
59
59
|
"corepack": "corepack enable",
|
|
60
60
|
"current-version": "jq -r '.version' package.json",
|
|
61
|
-
"format": "
|
|
61
|
+
"format": "biome format --write ./src ./__tests__",
|
|
62
|
+
"format:check": "biome format ./src ./__tests__",
|
|
63
|
+
"format:prettier": "prettier --write . --config .prettierrc.cjs --ignore-unknown",
|
|
62
64
|
"generate-docs": "echo 'Generating docs';node dist/bin/index.js && git add README.md ./.github/ghadocs .ghadocs.json || true",
|
|
63
65
|
"postinstall": "echo '✨ Successfully Installed'",
|
|
64
66
|
"prelint": "npm run format && tsc --project tsconfig.json --noemit",
|
|
65
|
-
"lint": "npm run lint:
|
|
66
|
-
"lint:fix": "npm run lint:
|
|
67
|
-
"lint:
|
|
68
|
-
"lint:
|
|
67
|
+
"lint": "npm run lint:biome && npm run lint:markdown",
|
|
68
|
+
"lint:fix": "npm run lint:biome:fix && npm run lint:markdown:fix",
|
|
69
|
+
"lint:biome": "biome lint ./src/ ./__tests__/",
|
|
70
|
+
"lint:biome:fix": "biome lint --write ./src/ ./__tests__/",
|
|
71
|
+
"check": "biome check ./src/ ./__tests__/",
|
|
72
|
+
"check:fix": "biome check --write ./src/ ./__tests__/",
|
|
69
73
|
"markdownlint": "markdownlint",
|
|
70
74
|
"lint:markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore",
|
|
71
75
|
"lint:markdown:fix": "npm run lint:markdown -- --fix",
|
|
@@ -100,11 +104,9 @@
|
|
|
100
104
|
}
|
|
101
105
|
},
|
|
102
106
|
"lint-staged": {
|
|
103
|
-
"*.{md,
|
|
104
|
-
"{src,__tests__}/**/*.ts": "
|
|
105
|
-
"*.
|
|
106
|
-
"eslint --cache --fix"
|
|
107
|
-
]
|
|
107
|
+
"*.{md,yaml,yml,sh}": "prettier --write",
|
|
108
|
+
"{src,__tests__}/**/*.ts": "biome check --write",
|
|
109
|
+
"*.json": "biome format --write"
|
|
108
110
|
},
|
|
109
111
|
"config": {
|
|
110
112
|
"commitizen": {
|
|
@@ -156,45 +158,23 @@
|
|
|
156
158
|
"yaml": "^2.8.2"
|
|
157
159
|
},
|
|
158
160
|
"devDependencies": {
|
|
159
|
-
"@
|
|
160
|
-
"@babel/eslint-parser": "^7.28.5",
|
|
161
|
-
"@babel/plugin-proposal-decorators": "^7.28.0",
|
|
162
|
-
"@babel/preset-env": "^7.26.0",
|
|
161
|
+
"@biomejs/biome": "2.3.13",
|
|
163
162
|
"@commitlint/cli": "^20.3.1",
|
|
164
163
|
"@commitlint/config-conventional": "^20.3.1",
|
|
165
164
|
"@commitlint/prompt": "^20.3.1",
|
|
166
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
|
|
167
165
|
"@semantic-release/changelog": "^6.0.3",
|
|
168
166
|
"@semantic-release/exec": "^6.0.3",
|
|
169
167
|
"@semantic-release/git": "^10.0.1",
|
|
170
168
|
"@tsconfig/node20": "^20.1.2",
|
|
171
|
-
"@types/babel__preset-env": "^7",
|
|
172
|
-
"@types/esm": "^3",
|
|
173
169
|
"@types/nconf": "^0.10.5",
|
|
174
170
|
"@types/node": "^25.0.9",
|
|
175
|
-
"@
|
|
176
|
-
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
|
177
|
-
"@typescript-eslint/parser": "^8.53.0",
|
|
178
|
-
"@vitest/coverage-v8": "^4.0.6",
|
|
171
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
179
172
|
"commitizen": "^4.3.1",
|
|
180
173
|
"conventional-commits": "^1.6.0",
|
|
181
174
|
"cz-conventional-changelog": "^3.3.0",
|
|
182
175
|
"dotenv": "^16.3.1",
|
|
183
176
|
"esbuild": "^0.27.2",
|
|
184
177
|
"esbuild-node-externals": "^1.20.1",
|
|
185
|
-
"eslint": "^9.39.2",
|
|
186
|
-
"eslint-config-prettier": "^10.1.8",
|
|
187
|
-
"eslint-import-resolver-typescript": "^4.4.4",
|
|
188
|
-
"eslint-plugin-import": "^2.31.0",
|
|
189
|
-
"eslint-plugin-n": "^17.23.2",
|
|
190
|
-
"eslint-plugin-optimize-regex": "^1.2.1",
|
|
191
|
-
"eslint-plugin-prettier": "^5.5.5",
|
|
192
|
-
"eslint-plugin-promise": "^7.2.1",
|
|
193
|
-
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
194
|
-
"eslint-plugin-sonarjs": "^3.0.5",
|
|
195
|
-
"eslint-plugin-sort-class-members": "^1.21.0",
|
|
196
|
-
"eslint-plugin-unicorn": "^62.0.0",
|
|
197
|
-
"eslint-plugin-vitest": "^0.5.4",
|
|
198
178
|
"husky": "^9.1.7",
|
|
199
179
|
"is-ci": "^3.0.1",
|
|
200
180
|
"lint-staged": "^16.2.7",
|
|
@@ -205,10 +185,10 @@
|
|
|
205
185
|
"ts-node": "^10.9.1",
|
|
206
186
|
"types-package-json": "^2.0.39",
|
|
207
187
|
"typescript": "^5.7.3",
|
|
208
|
-
"vitest": "^4.0.
|
|
188
|
+
"vitest": "^4.0.18"
|
|
209
189
|
},
|
|
210
190
|
"engines": {
|
|
211
|
-
"node": ">=20.
|
|
191
|
+
"node": ">=20.11.0 <26.0.0",
|
|
212
192
|
"npm": ">=10.0.0"
|
|
213
193
|
},
|
|
214
194
|
"os": [
|