github-action-readme-generator 1.8.7 → 1.8.9
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 +16 -0
- package/README.md +1 -1
- package/dist/bin/index.js +1127 -369
- package/dist/mjs/Action.js.map +1 -1
- package/dist/mjs/config.js.map +1 -1
- package/dist/mjs/helpers.js.map +1 -1
- package/dist/mjs/inputs.js.map +1 -1
- package/dist/mjs/logtask/index.js.map +1 -1
- package/dist/mjs/markdowner/index.js.map +1 -1
- package/dist/mjs/prettier.js.map +1 -1
- package/dist/mjs/readme-editor.js.map +1 -1
- package/dist/mjs/readme-generator.js.map +1 -1
- package/dist/mjs/save.js.map +1 -1
- package/dist/mjs/sections/index.js.map +1 -1
- package/dist/mjs/sections/update-badges.js.map +1 -1
- package/dist/mjs/sections/update-branding.js.map +1 -1
- package/dist/mjs/sections/update-description.js.map +1 -1
- package/dist/mjs/sections/update-inputs.js.map +1 -1
- package/dist/mjs/sections/update-outputs.js.map +1 -1
- package/dist/mjs/sections/update-title.js.map +1 -1
- package/dist/mjs/sections/update-usage.js.map +1 -1
- package/dist/mjs/svg-editor.mjs.map +1 -1
- package/dist/types/index.d.ts +3 -5
- package/package.json +28 -33
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-badges.js","sourceRoot":"","sources":["../../../src/sections/update-badges.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAW1C;;;GAGG;AACH,SAAS,YAAY,CAAC,KAAa,EAAE,IAAY;IAC/C,MAAM,OAAO,GAAG,sBAAsB,KAAK,IAAI,IAAI,EAAE,CAAC;IACtD,OAAO;QACL;YACE,GAAG,EAAE,2CAA2C,KAAK,IAAI,IAAI,6DAA6D;YAC1H,GAAG,EAAE,gBAAgB;YACrB,GAAG,EAAE,GAAG,OAAO,kBAAkB;SAClC;QACD;YACE,GAAG,EAAE,8CAA8C,KAAK,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,MAAM,CAAC,GAAG,EAAE,CAAC;IAEnC,MAAM,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACnE,GAAG,CAAC,IAAI,CAAC,qBAAqB,gBAAgB,EAAE,CAAC,CAAC;IAElD,GAAG,CAAC,KAAK,EAAE,CAAC;IACZ,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,oBAAoB;IACpB,IAAI,gBAAgB,EAAE,CAAC;QACrB,MAAM,MAAM,GAAa,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QACjE,OAAO,GAAG,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC/C,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IACD,GAAG,CAAC,OAAO,EAAE,CAAC;IACd,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,GAAG,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC;IAC5B,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/**\n * 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.\n * The function is responsible for updating the badges section in the README.md file based on the provided inputs.\n * It utilizes the 'LogTask' class for logging purposes.\n */\n\nimport { ReadmeSection } from '../constants.js';\nimport type Inputs from '../inputs.js';\nimport LogTask from '../logtask/index.js';\n\n/**\n * Interface for a badge.\n */\nexport interface IBadge {\n alt: string;\n img: string;\n url?: string;\n}\n\n/**\n * Generate GitHub badges.\n * @returns {IBadge[]} - The array of GitHub badges.\n */\nfunction githubBadges(owner: string, repo: string): IBadge[] {\n const repoUrl = `https://github.com/${owner}/${repo}`;\n return [\n {\n img: `https://img.shields.io/github/v/release/${owner}/${repo}?display_name=tag&sort=semver&logo=github&style=flat-square`,\n alt: 'Release by tag',\n url: `${repoUrl}/releases/latest`,\n },\n {\n img: `https://img.shields.io/github/release-date/${owner}/${repo}?display_name=tag&sort=semver&logo=github&style=flat-square`,\n alt: 'Release by date',\n url: `${repoUrl}/releases/latest`,\n },\n {\n img: `https://img.shields.io/github/last-commit/${owner}/${repo}?logo=github&style=flat-square`,\n alt: 'Commit',\n },\n {\n img: `https://img.shields.io/github/issues/${owner}/${repo}?logo=github&style=flat-square`,\n alt: 'Open Issues',\n url: `${repoUrl}/issues`,\n },\n {\n img: `https://img.shields.io/github/downloads/${owner}/${repo}/total?logo=github&style=flat-square`,\n alt: 'Downloads',\n },\n ];\n}\n\n/**\n * Generates a badge HTML markup.\n * @param {IBadge} item - The badge object.\n * @returns {string} - The HTML markup for the badge.\n */\nfunction generateBadge(item: IBadge, log: LogTask): string {\n const badgeTemplate = `<img src=\"${item.img}\" alt=\"${encodeURIComponent(item.alt) || ''}\" />`;\n log.info(`Generating badge ${item.alt}`);\n if (item.url) {\n return `<a href=\"${encodeURIComponent(item.url)}\">${badgeTemplate}</a>`;\n }\n return badgeTemplate;\n}\n\n/**\n * Generates all badges HTML markup.\n * @param {IBadge} badges - The array of badge objects\n * @param log - A LogTask instance\n * @returns {string[]} - The array of HTML markup for all badges.\n */\nfunction generateBadges(badges: IBadge[], log: LogTask): string[] {\n const badgeArray: string[] = [];\n for (const b of badges) {\n badgeArray.push(generateBadge(b, log));\n }\n log.debug(`Total badges: ${badgeArray.length}`);\n return badgeArray;\n}\nexport default function updateBadges(\n sectionToken: ReadmeSection,\n inputs: Inputs,\n): Record<string, string> {\n const log = new LogTask(sectionToken);\n const config = inputs.config.get();\n\n const enableVersioning = config ? config.versioning?.badge : false;\n log.info(`Versioning badge: ${enableVersioning}`);\n\n log.start();\n let content = '';\n // Add GitHub badges\n if (enableVersioning) {\n const badges: IBadge[] = githubBadges(inputs.owner, inputs.repo);\n content = generateBadges(badges, log).join('');\n inputs.readmeEditor.updateSection(sectionToken, content);\n }\n log.success();\n const ret: Record<string, string> = {};\n ret[sectionToken] = content;\n return ret;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-branding.js","sourceRoot":"","sources":["../../../src/sections/update-branding.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,WAAW,EAAiB,MAAM,iBAAiB,CAAC;AAE3F,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAe1C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAe,EACf,IAA+B,EAC/B,OAA6B;IAE7B,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAClC,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AACrD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAgC;IAC/D,IAAI,CAAC,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"update-branding.js","sourceRoot":"","sources":["../../../src/sections/update-branding.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,WAAW,EAAiB,MAAM,iBAAiB,CAAC;AAE3F,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAe1C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAe,EACf,IAA+B,EAC/B,OAA6B;IAE7B,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAClC,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AACrD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAgC;IAC/D,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,qEAAqE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,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YACzC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC3C,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,GAAG,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAC;IACzF,OAAO,wCAAwC,MAAM,MAAM,CAAC;AAC9D,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,YAA2B,EAC3B,MAAc;IAEd,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IAEtC,GAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAErE,GAAG,CAAC,KAAK,EAAE,CAAC;IACZ,wDAAwD;IACxD,MAAM,UAAU,GAAG,KAAK,CAAC;IACzB,MAAM,OAAO,GAAG,iBAAiB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACtD,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACzD,IAAI,OAAO,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;QAC9B,GAAG,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;IACnD,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,GAAG,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC;IAC5B,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import type { FeatherIconNames } from 'feather-icons';\n\nimport type { BrandColors } from '../constants.js';\nimport { GITHUB_ACTIONS_OMITTED_ICONS, isValidIcon, ReadmeSection } from '../constants.js';\nimport type Inputs from '../inputs.js';\nimport LogTask from '../logtask/index.js';\nimport SVGEditor from '../svg-editor.mjs';\n/**\n * Wiith thanks to\n * https://github.com/haya14busa/github-action-brandings/blob/master/main.js\n * for the urls to the branding images.\n */\n\ntype Maybe<T> = T | undefined;\n\nexport interface IBranding {\n alt: string;\n img: string;\n url?: string;\n}\n\n/**\n * Generates a svg branding image.\n * example:\n * ```ts\n * generateSvgImage('/path/to/file.svg', 'home', 'red')\n * ```\n *\n * @param svgPath - The path to where the svg file will be saved\n * @param icon - The icon name from the feather-icons list\n * @param bgcolor - The background color of the circle behind the icon\n */\nexport function generateSvgImage(\n svgPath: string,\n icon: Partial<FeatherIconNames>,\n bgcolor: Partial<BrandColors>,\n): void {\n const svgEditor = new SVGEditor();\n svgEditor.generateSvgImage(svgPath, icon, bgcolor);\n}\n\n/**\n * This function returns a valid icon name based on the provided branding.\n * If the branding is undefined or not a valid icon name, an error is thrown.\n * It checks if the branding icon is present in the GITHUB_ACTIONS_BRANDING_ICONS set,\n * and if so, returns the corresponding feather icon key array.\n * If the branding icon is present in the GITHUB_ACTIONS_OMITTED_ICONS set,\n * an error is thrown specifying that the icon is part of the omitted icons list.\n * If the branding icon is not a valid icon from the feather-icons list, an error is thrown.\n * @param brand - The branding object\n * @returns The corresponding feather icon key array\n * @throws Error if the branding icon is undefined, not a valid icon name, or part of the omitted icons list\n */\nexport function getValidIconName(icon?: Partial<FeatherIconNames>): FeatherIconNames {\n if (!icon) {\n throw new Error(`No valid branding icon name found: action.yml branding is undefined`);\n }\n\n if (isValidIcon(icon)) {\n return icon;\n }\n\n if (GITHUB_ACTIONS_OMITTED_ICONS.has(icon)) {\n throw new Error(\n `No valid branding icon name found: ${icon} is part of the list of omitted icons. `,\n );\n }\n\n throw new Error(\n `No valid branding icon name found: ${icon} is not a valid icon from the feather-icons list`,\n );\n}\n\n/**\n * This function generates an HTML image markup with branding information.\n * It takes inputs and an optional width parameter.\n * If the branding_svg_path is provided, it generates an action.yml branding image for the specified icon and color.\n * Otherwise, it returns an error message.\n *\n * @param inputs - The inputs instance with data for the function.\n * @param width - The width of the image (default is '15%').\n * @returns The HTML image markup with branding information or an error message.\n */\nexport function generateImgMarkup(inputs: Inputs, width = '15%'): string {\n // Create a log task for debugging\n const log = new LogTask('generateImgMarkup');\n if (!inputs.action.branding) {\n log.info('No branding section');\n return '';\n }\n // Get the branding information from the inputs\n const { icon, color } = inputs.action.branding;\n const iconName = getValidIconName(icon);\n const svgPath = inputs.config.get('branding_svg_path') as Maybe<string>;\n const result = `<img src=\"${svgPath}\" width=\"${width}\" align=\"center\" alt=\"branding<icon:${iconName} color:${color}>\" />`;\n\n if (svgPath) {\n log.info(`Generating action.yml branding image for ${iconName}`);\n const svg = inputs.config.get('image_generated') as Maybe<string>;\n const hash = `${iconName}${color}`;\n if (svg && hash.localeCompare(svg) !== 0) {\n generateSvgImage(svgPath, iconName, color);\n inputs.config.set('image_generated', hash);\n }\n return result;\n }\n log.error(`No branding_svg_path provided or it is empty string, can't create the file!`);\n return `<!-- ERROR: no branding path found = ${result} -->`;\n}\n\n/**\n * This is a TypeScript function named \"updateBranding\" that takes in a sectionToken string and an object of inputs.\n * It exports the function as the default export.\n * The function logs the brand details from the inputs, starts a log task, generates image markup,\n * updates a section in the readme editor using the sectionToken and content, and logs success or failure messages.\n *\n * @param sectionToken - The sectionToken string that is used to identify the section in the readme editor.\n * @param inputs - The inputs object that contains data for the function.\n */\nexport default function updateBranding(\n sectionToken: ReadmeSection,\n inputs: Inputs,\n): Record<string, string> {\n const log = new LogTask(sectionToken);\n\n log.info(`Brand details: ${JSON.stringify(inputs.action.branding)}`);\n\n log.start();\n /** create <img /> markup with an image width of 15% */\n const imageWidth = '15%';\n const content = generateImgMarkup(inputs, imageWidth);\n inputs.readmeEditor.updateSection(sectionToken, content);\n if (content && content !== '') {\n log.success('branding svg successfully created');\n } else {\n log.fail('branding svg failed to be created');\n }\n\n const ret: Record<string, string> = {};\n ret[sectionToken] = content;\n return ret;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-description.js","sourceRoot":"","sources":["../../../src/sections/update-description.ts"],"names":[],"mappings":"AASA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,YAA2B,EAC3B,MAAc;IAEd,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IAEtC,uBAAuB;IACvB,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,oCAAoC;IACpC,IAAI,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"update-description.js","sourceRoot":"","sources":["../../../src/sections/update-description.ts"],"names":[],"mappings":"AASA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,YAA2B,EAC3B,MAAc;IAEd,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IAEtC,uBAAuB;IACvB,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,oCAAoC;IACpC,IAAI,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;QAChC,GAAG,CAAC,KAAK,EAAE,CAAC;QACZ,MAAM,IAAI,GAAW,MAAM,CAAC,MAAM,CAAC,WAAW;aAC3C,IAAI,EAAE;aACN,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,mBAAmB;aAC5C,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,4BAA4B;aACnD,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,mCAAmC;aAC3D,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,mCAAmC;QAEpE,GAAG,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,wCAAwC,CAAC,CAAC;QACzE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACzD,GAAG,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;IACD,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,GAAG,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/**\n * This TypeScript code exports a function named 'updateDescription' which takes a sectionToken (ReadmeSection) and an instance of the 'Inputs' class as its parameters.\n * The function is responsible for updating the description section in the README.md file based on the provided inputs.\n * It utilizes the 'LogTask' class for logging purposes.\n * @param {ReadmeSection} sectionToken - The sectionToken representing the section of the README to update.\n * @param {Inputs} inputs - The Inputs class instance.\n */\nimport { ReadmeSection } from '../constants.js';\nimport type Inputs from '../inputs.js';\nimport LogTask from '../logtask/index.js';\n\nexport default function updateDescription(\n sectionToken: ReadmeSection,\n inputs: Inputs,\n): Record<string, string> {\n const log = new LogTask(sectionToken);\n\n // Build the new README\n const content: string[] = [];\n\n // Build the new description section\n if (inputs?.action?.description) {\n log.start();\n const desc: string = inputs.action.description\n .trim()\n .replaceAll('\\r\\n', '\\n') // Convert CR to LF\n .replaceAll(/ +/g, ' ') // Squash consecutive spaces\n .replaceAll(' \\n', '\\n') // Squash space followed by newline\n .replaceAll('\\n\\n', '<br />'); // Convert double return to a break\n\n log.info(`Writing ${desc.length} characters to the description section`);\n content.push(desc);\n inputs.readmeEditor.updateSection(sectionToken, content);\n log.success();\n }\n const ret: Record<string, string> = {};\n ret[sectionToken] = content.join('\\n');\n return ret;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-inputs.js","sourceRoot":"","sources":["../../../src/sections/update-inputs.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,OAA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AU,YAAY,EAAE,CAAC,CAAC;QACnD,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACzD,GAAG,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,KAAK,CAAC,iBAAiB,YAAY,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,GAAG,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/**\n * This TypeScript code exports a function named 'updateInputs' which takes a sectionToken (ReadmeSection) and an instance of the 'Inputs' class as its parameters.\n * The function is responsible for updating the inputs section in the README.md file based on the provided inputs.\n * It utilizes the 'LogTask' class for logging purposes, 'columnHeader' and 'rowHeader' functions from '../helpers.js' for formatting table headers, and 'markdowner' function from '../markdowner/index.js' for generating markdown content.\n * @param {ReadmeSection} sectionToken - The sectionToken representing the section of the README to update.\n * @param {Inputs} inputs - The Inputs class instance.\n */\nimport { ReadmeSection } from '../constants.js';\nimport { columnHeader, rowHeader } from '../helpers.js';\nimport type Inputs from '../inputs.js';\nimport LogTask from '../logtask/index.js';\nimport markdowner from '../markdowner/index.js';\n\nexport default function updateInputs(\n sectionToken: ReadmeSection,\n inputs: Inputs,\n): Record<string, string> {\n const log = new LogTask(sectionToken);\n\n // Build the new README\n const content: string[] = [];\n const markdownArray: string[][] = [];\n const titleArray = ['Input', 'Description', 'Default', 'Required'];\n const titles: string[] = [];\n\n for (const t of titleArray) {\n titles.push(columnHeader(t));\n }\n\n markdownArray.push(titles);\n\n const vars = inputs.action.inputs;\n const tI = vars ? Object.keys(vars).length : 0;\n\n if (vars && tI > 0) {\n log.start();\n\n for (const key of Object.keys(vars)) {\n const values = vars[key];\n let description = values?.description ?? '';\n\n // Check if only the first line should be added (only subject without body)\n const matches = /(.*?)\\n\\n([Ss]*)/.exec(description);\n\n if (matches && matches.length >= 2) {\n description = matches[1] || description;\n }\n\n description = description.trim().replace('\\n', '<br />');\n\n const row: string[] = [\n rowHeader(key),\n description,\n values?.default ? `<code>${values.default}</code>` : '',\n values?.required ? '**true**' : '__false__',\n ];\n log.debug(JSON.stringify(row));\n markdownArray.push(row);\n }\n content.push(markdowner(markdownArray));\n log.info(`Action has ${tI} total ${sectionToken}`);\n inputs.readmeEditor.updateSection(sectionToken, content);\n log.success();\n } else {\n log.debug(`Action has no ${sectionToken}`);\n }\n const ret: Record<string, string> = {};\n ret[sectionToken] = content.join('\\n');\n return ret;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-outputs.js","sourceRoot":"","sources":["../../../src/sections/update-outputs.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,YAA2B,EAC3B,MAAc;IAEd,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IAEtC,uBAAuB;IACvB,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,MAAM,aAAa,GAAe,EAAE,CAAC;IACrC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;IACtD,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"update-outputs.js","sourceRoot":"","sources":["../../../src/sections/update-outputs.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEh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E,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YACzD,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACzD,MAAM,GAAG,GAAa,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;YAE3D,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/B,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;QACxC,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,YAAY,EAAE,CAAC,CAAC;QACnD,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACzD,GAAG,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,KAAK,CAAC,iBAAiB,YAAY,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,GAAG,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/**\n * This TypeScript code exports a function named 'updateOutputs' which takes a sectionToken (string) and an instance of the 'Inputs' class as its parameters.\n * The function is responsible for updating the outputs section in the README.md file based on the provided inputs.\n * It generates a table with three columns: Output name, Description, and Value (for composite actions).\n * It utilizes the 'LogTask' class for logging purposes, 'columnHeader' and 'rowHeader' functions from '../helpers.js' for formatting table headers, and 'markdowner' function from '../markdowner/index.js' for generating markdown content.\n * @param {ReadmeSection} sectionToken - The sectionToken used for identifying the section.\n * @param {Inputs} inputs - The Inputs class instance.\n */\nimport { ReadmeSection } from '../constants.js';\nimport { columnHeader, rowHeader } from '../helpers.js';\nimport type Inputs from '../inputs.js';\nimport LogTask from '../logtask/index.js';\nimport markdowner from '../markdowner/index.js';\n\nexport default function updateOutputs(\n sectionToken: ReadmeSection,\n inputs: Inputs,\n): Record<string, string> {\n const log = new LogTask(sectionToken);\n\n // Build the new README\n const content: string[] = [];\n\n const markdownArray: string[][] = [];\n const titleArray = ['Output', 'Description', 'Value'];\n const titles: string[] = [];\n for (const t of titleArray) {\n titles.push(columnHeader(t));\n }\n markdownArray.push(titles);\n const vars = inputs.action.outputs;\n const tI = vars ? Object.keys(vars).length : 0;\n if (vars && tI > 0) {\n log.start();\n for (const key of Object.keys(vars)) {\n const values = vars[key];\n\n let description = values?.description ?? '';\n\n // Check if only first line should be added (only subject without body)\n\n const matches = /(.*?)\\n\\n([Ss]*)/.exec(description);\n if (matches && matches.length >= 2) {\n description = matches[1] || description;\n }\n\n description = description.trim().replace('\\n', '<br />');\n const value = values?.value ? `\\`${values.value}\\`` : '';\n const row: string[] = [rowHeader(key), description, value];\n\n log.debug(JSON.stringify(row));\n markdownArray.push(row);\n }\n content.push(markdowner(markdownArray));\n log.info(`Action has ${tI} total ${sectionToken}`);\n inputs.readmeEditor.updateSection(sectionToken, content);\n log.success();\n } else {\n log.debug(`Action has no ${sectionToken}`);\n }\n const ret: Record<string, string> = {};\n ret[sectionToken] = content.join('\\n');\n return ret;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-title.js","sourceRoot":"","sources":["../../../src/sections/update-title.ts"],"names":[],"mappings":"AASA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,YAA2B,EAC3B,MAAc;IAEd,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IAEtC,uBAAuB;IAC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,CAAC,YAAY,CAAC,aAAa,CAAC,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QAE/D,GAAG,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;IACD,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,GAAG,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/**\n * This TypeScript code exports a function named 'updateTitle' which takes a sectionToken (ReadmeSection) and an instance of the 'Inputs' class as its parameters.\n * The function is responsible for updating the title section in the README.md file based on the provided inputs.\n * It utilizes the 'LogTask' class for logging purposes, the 'generateImgMarkup' function from './update-branding.js' for generating image markup.\n * @param {ReadmeSection} sectionToken - The sectionToken representing the section of the README to update.\n * @param {Inputs} inputs - The Inputs class instance.\n */\nimport { ReadmeSection } from '../constants.js';\nimport type Inputs from '../inputs.js';\nimport LogTask from '../logtask/index.js';\nimport { generateImgMarkup } from './update-branding.js';\n\nexport default function updateTitle(\n sectionToken: ReadmeSection,\n inputs: Inputs,\n): Record<string, string> {\n const log = new LogTask(sectionToken);\n\n // Build the new README\n const content: string[] = [];\n let name = '';\n let svgInline = '';\n\n if (inputs.action.name) {\n log.start();\n name = inputs.action.name;\n if (inputs.config.get('branding_as_title_prefix') as boolean) {\n svgInline = `${generateImgMarkup(inputs, '60px')} `;\n }\n log.info(`Writing ${name.length} characters to the title`);\n const title = `# ${svgInline}${inputs.config.get('title_prefix') as string}${\n inputs.action.name\n }`;\n log.info(`Title: ${title}`);\n // Build the new usage section\n content.push(title);\n inputs.readmeEditor.updateSection(sectionToken, content, true);\n\n log.success();\n }\n const ret: Record<string, string> = {};\n ret[sectionToken] = content.join('\\n');\n return ret;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-usage.js","sourceRoot":"","sources":["../../../src/sections/update-usage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAu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,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAEtB,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACzD,GAAG,CAAC,OAAO,EAAE,CAAC;IACd,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,GAAG,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { ReadmeSection } from '../constants.js';\nimport { getCurrentVersionString } from '../helpers.js';\nimport type Inputs from '../inputs.js';\nimport LogTask from '../logtask/index.js';\nimport { wrapDescription } from '../prettier.js';\n\ntype DescriptionType = Record<string, string[]>;\nexport default async function updateUsage(\n sectionToken: ReadmeSection,\n inputs: Inputs,\n): Promise<Record<string, string>> {\n const log = new LogTask(sectionToken);\n log.start();\n\n const actionName = `${inputs.owner}/${inputs.repo}`;\n log.info(`Action name: ${actionName}`);\n const versionString: string = getCurrentVersionString(inputs);\n\n log.info(`Version string: ${versionString}`);\n\n const actionReference = `${actionName}@${versionString}`;\n\n const indent = ' # ';\n // Build the new README\n const content: string[] = [];\n // Build the new usage section\n content.push('```yaml', `- uses: ${actionReference}`, ' with:');\n\n const inp = inputs.action.inputs;\n let firstInput = true;\n const descriptionPromises: Record<string, Promise<string[]>> = {};\n if (inp) {\n for (const key of Object.keys(inp)) {\n const input = inp[key];\n if (input !== undefined) {\n descriptionPromises[key] = wrapDescription(`Description: ${input.description}`, [], indent);\n }\n }\n\n const descriptions: DescriptionType = {};\n const kvArray = await Promise.all(\n Object.keys(descriptionPromises).map(async (key) => {\n return { key, value: await descriptionPromises[key] };\n }),\n );\n for (const e of kvArray) {\n descriptions[e.key] = e.value;\n log.debug(`${e.key}: ${descriptions[e.key].join('\\n')}`);\n }\n\n for (const key of Object.keys(inp)) {\n const input = inp[key];\n if (input !== undefined) {\n // Line break between inputs\n if (!firstInput) {\n content.push('');\n }\n\n // Constrain the width of the description, and append it\n content.push(...descriptions[key]);\n\n if (input.default !== undefined) {\n // Append blank line if description had paragraphs\n // if (input.description?.trimEnd().match(/\\n *\\r?\\n/)) {\n // content.push(' #');\n // }\n\n // Default\n content.push(`${indent}Default: ${input.default}`);\n }\n\n // Input name\n content.push(` ${key}: ''`);\n\n firstInput = false;\n }\n }\n }\n\n content.push('```\\n');\n\n inputs.readmeEditor.updateSection(sectionToken, content);\n log.success();\n const ret: Record<string, string> = {};\n ret[sectionToken] = content.join('\\n');\n return ret;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg-editor.mjs","sourceRoot":"","sources":["../../src/svg-editor.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAA0B,MAAM,QAAQ,CAAC,CAAC,oBAAoB;AAGtF,OAAO,EACL,gCAAgC,EAChC,mBAAmB,EACnB,kBAAkB,EAClB,8BAA8B,EAC9B,6BAA6B,EAC7B,YAAY,EACZ,WAAW,GACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAEzC;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,SAAS;IACpB,GAAG,CAAU;IAEb,MAAM,CAAa;IAEnB,MAAM,CAAa;IAEnB,QAAQ,CAAe;IAE/B;;OAEG;IACH;QACE,IAAI,CAAC,GAAG,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO;QACX,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,eAAe,EAAE,CAA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O,CAAC,wDAAwD,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,IAAI,CACxF,IAAI,CACL,CAAC;IACJ,CAAC;CACF","sourcesContent":["/**\n * This TypeScript code imports necessary modules and defines a class named 'SVGEditor' for generating SVG images.\n * The class has methods for initializing the SVG window, generating SVG content, and writing SVG files.\n * It utilizes various packages such as 'fs', 'path', '@svgdotjs/svg.js', 'feather-icons', and 'svgdom' for SVG manipulation and file operations.\n * The class also defines interfaces for badges and brand colors.\n */\n\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\n\nimport type { Container } from '@svgdotjs/svg.js';\nimport { registerWindow, SVG } from '@svgdotjs/svg.js';\nimport type { FeatherIconNames } from 'feather-icons';\nimport * as feather from 'feather-icons';\nimport { createSVGWindow, SVGDocument, SVGWindow } from 'svgdom'; /// main-module.js';\n\nimport type { BrandColors } from './constants.js';\nimport {\n brandingSquareEdgeLengthInPixels,\n DEFAULT_BRAND_COLOR,\n DEFAULT_BRAND_ICON,\n GITHUB_ACTIONS_BRANDING_COLORS,\n GITHUB_ACTIONS_BRANDING_ICONS,\n isValidColor,\n isValidIcon,\n} from './constants.js';\nimport LogTask from './logtask/index.js';\n\n/**\n * Utility class for generating SVG images.\n */\n\nexport default class SVGEditor {\n private log: LogTask;\n\n private window?: SVGWindow;\n\n private canvas?: Container;\n\n private document?: SVGDocument;\n\n /**\n * Initializes a new SVGEditor instance.\n */\n constructor() {\n this.log = new LogTask('SVGEditor');\n }\n\n /**\n * Initializes the SVG window, document, and canvas if not already set up.\n */\n async initSVG(): Promise<void> {\n if (!this.window) {\n this.window = createSVGWindow();\n const { document } = this.window;\n registerWindow(this.window, document);\n if (!this.canvas) {\n this.canvas = SVG(document.documentElement) as Container;\n }\n }\n }\n\n /**\n * Generates a branded SVG image.\n * @param {string | undefined} svgPath - Path to write the generated SVG file to.\n * @param {Partial<FeatherIconNames>} icon - Name of the icon to use.\n * @param {Partial<BrandColors>} bgcolor - Background color for the image.\n * @returns {Promise<void>} A promise that resolves when the image is generated.\n */\n async generateSvgImage(\n svgPath: string | undefined,\n icon: Partial<FeatherIconNames> = DEFAULT_BRAND_ICON,\n bgcolor: Partial<BrandColors> = DEFAULT_BRAND_COLOR\n ): Promise<void> {\n if (!svgPath || svgPath.length === 0) {\n this.log.debug('No svgPath provided');\n return;\n }\n\n if (!isValidIcon(icon)) {\n this.log.error(`Valid Branding Icon Names: ${GITHUB_ACTIONS_BRANDING_ICONS}`);\n this.log.fail(`Invalid icon name: ${icon}`);\n return;\n }\n if (!isValidColor(bgcolor)) {\n this.log.error(`Valid Branding Colors: ${GITHUB_ACTIONS_BRANDING_COLORS}`);\n this.log.fail('Invalid branding color');\n return;\n }\n this.log.info(`SVG to generate ${icon} at ${svgPath} with color ${bgcolor}.`);\n // Initialize SVG\n await this.initSVG();\n // Generate SVG content\n const svgContent = this.generateSVGContent(icon, bgcolor);\n\n // Write SVG file\n this.writeSVGFile(svgPath, svgContent);\n\n this.log.debug('SVG image generated successfully');\n }\n\n /**\n * Writes the SVG xml to disk.\n * @param {string} svgPath - File path to save the SVG to.\n * @param {string} svgContent - The XML for the SVG file.\n */\n writeSVGFile(svgPath: string, svgContent: string): void {\n fs.mkdirSync(path.dirname(svgPath), { recursive: true });\n this.log.debug(`Writing SVG file to ${svgPath}`);\n fs.writeFile(svgPath, svgContent, 'utf8', () => {\n return this.log.debug(`SVG image generated: ${svgPath}`);\n });\n }\n\n /**\n * Generates the SVG content for the branding image.\n * @param {FeatherIconNames} icon - Name of the icon to use.\n * @param {BrandColors} color - Background color for the image.\n * @param {number} outerViewBox - Size of the canvas for the image.\n * @returns {string} The generated SVG content.\n */\n generateSVGContent(icon: FeatherIconNames, color: BrandColors, outerViewBox = 100): string {\n const { canvas, log } = this;\n // Validate canvas\n if (!canvas) {\n log.fail('Canvas not initialized');\n return '';\n }\n\n const svgData = feather.icons[icon];\n log.debug(`SVG data to ingest: ${svgData.toSvg()}`);\n\n canvas.clear();\n\n // Create a canvas that is `outerViewBox` x `outerViewBox`\n canvas\n .size(brandingSquareEdgeLengthInPixels, brandingSquareEdgeLengthInPixels)\n .viewbox(`0 0 ${outerViewBox} ${outerViewBox}`)\n .fill('none');\n\n // Create a 'color' circle that touches the edges of the canvas\n const circleSize = outerViewBox / 2;\n canvas\n .circle('50%')\n .fill(color)\n .radius(circleSize)\n .cx(circleSize)\n .cy(circleSize)\n .stroke({ width: 0 });\n\n // Create an svg box that is half the size of the parent\n const iconsvgOuter = canvas.nested();\n iconsvgOuter.attr('overflow', 'visible').height('50%').width('50%').x('25%').y('25%');\n\n // create a nested svg and add the feather-icon paths to the svg\n const iconsvg = iconsvgOuter.nested();\n iconsvg.id('icon').svg(svgData.contents);\n\n // Append all of the attributes from the fether-icon\n for (const attr of Object.keys(svgData.attrs)) {\n iconsvg.attr(attr, svgData.attrs[attr]);\n }\n\n // invert the stroke color if it matches the background color\n iconsvg.stroke(color.startsWith('white') ? 'white' : 'black');\n\n // remove the edge clipping\n iconsvg.attr('overflow', 'visible');\n\n // Make the viewbox of the svg match the exact dimensions of the icon\n iconsvg.viewbox(iconsvg.bbox());\n\n // Make the svg icon center itself vertically and horozonally\n iconsvg.height('auto').width('auto');\n\n // return the xml file content\n return ['<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>', canvas.svg(), '\\n'].join(\n '\\n'\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"svg-editor.mjs","sourceRoot":"","sources":["../../src/svg-editor.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAA0B,MAAM,QAAQ,CAAC,CAAC,oBAAoB;AAGtF,OAAO,EAC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,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9C,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1C,CAAC;QAED,6DAA6D;QAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAE9D,2BAA2B;QAC3B,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAEpC,qEAAqE;QACrE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAEhC,6DAA6D;QAC7D,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAErC,8BAA8B;QAC9B,OAAO,CAAC,wDAAwD,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,IAAI,CACxF,IAAI,CACL,CAAC;IACJ,CAAC;CACF","sourcesContent":["/**\n * This TypeScript code imports necessary modules and defines a class named 'SVGEditor' for generating SVG images.\n * The class has methods for initializing the SVG window, generating SVG content, and writing SVG files.\n * It utilizes various packages such as 'fs', 'path', '@svgdotjs/svg.js', 'feather-icons', and 'svgdom' for SVG manipulation and file operations.\n * The class also defines interfaces for badges and brand colors.\n */\n\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\n\nimport type { Container } from '@svgdotjs/svg.js';\nimport { registerWindow, SVG } from '@svgdotjs/svg.js';\nimport type { FeatherIconNames } from 'feather-icons';\nimport * as feather from 'feather-icons';\nimport { createSVGWindow, SVGDocument, SVGWindow } from 'svgdom'; /// main-module.js';\n\nimport type { BrandColors } from './constants.js';\nimport {\n brandingSquareEdgeLengthInPixels,\n DEFAULT_BRAND_COLOR,\n DEFAULT_BRAND_ICON,\n GITHUB_ACTIONS_BRANDING_COLORS,\n GITHUB_ACTIONS_BRANDING_ICONS,\n isValidColor,\n isValidIcon,\n} from './constants.js';\nimport LogTask from './logtask/index.js';\n\n/**\n * Utility class for generating SVG images.\n */\n\nexport default class SVGEditor {\n private log: LogTask;\n\n private window?: SVGWindow;\n\n private canvas?: Container;\n\n private document?: SVGDocument;\n\n /**\n * Initializes a new SVGEditor instance.\n */\n constructor() {\n this.log = new LogTask('SVGEditor');\n }\n\n /**\n * Initializes the SVG window, document, and canvas if not already set up.\n */\n async initSVG(): Promise<void> {\n if (!this.window) {\n this.window = createSVGWindow();\n const { document } = this.window;\n registerWindow(this.window, document);\n if (!this.canvas) {\n this.canvas = SVG(document.documentElement) as Container;\n }\n }\n }\n\n /**\n * Generates a branded SVG image.\n * @param {string | undefined} svgPath - Path to write the generated SVG file to.\n * @param {Partial<FeatherIconNames>} icon - Name of the icon to use.\n * @param {Partial<BrandColors>} bgcolor - Background color for the image.\n * @returns {Promise<void>} A promise that resolves when the image is generated.\n */\n async generateSvgImage(\n svgPath: string | undefined,\n icon: Partial<FeatherIconNames> = DEFAULT_BRAND_ICON,\n bgcolor: Partial<BrandColors> = DEFAULT_BRAND_COLOR\n ): Promise<void> {\n if (!svgPath || svgPath.length === 0) {\n this.log.debug('No svgPath provided');\n return;\n }\n\n if (!isValidIcon(icon)) {\n this.log.error(`Valid Branding Icon Names: ${GITHUB_ACTIONS_BRANDING_ICONS}`);\n this.log.fail(`Invalid icon name: ${icon}`);\n return;\n }\n if (!isValidColor(bgcolor)) {\n this.log.error(`Valid Branding Colors: ${GITHUB_ACTIONS_BRANDING_COLORS}`);\n this.log.fail('Invalid branding color');\n return;\n }\n this.log.info(`SVG to generate ${icon} at ${svgPath} with color ${bgcolor}.`);\n // Initialize SVG\n await this.initSVG();\n // Generate SVG content\n const svgContent = this.generateSVGContent(icon, bgcolor);\n\n // Write SVG file\n this.writeSVGFile(svgPath, svgContent);\n\n this.log.debug('SVG image generated successfully');\n }\n\n /**\n * Writes the SVG xml to disk.\n * @param {string} svgPath - File path to save the SVG to.\n * @param {string} svgContent - The XML for the SVG file.\n */\n writeSVGFile(svgPath: string, svgContent: string): void {\n fs.mkdirSync(path.dirname(svgPath), { recursive: true });\n this.log.debug(`Writing SVG file to ${svgPath}`);\n fs.writeFile(svgPath, svgContent, 'utf8', () => {\n return this.log.debug(`SVG image generated: ${svgPath}`);\n });\n }\n\n /**\n * Generates the SVG content for the branding image.\n * @param {FeatherIconNames} icon - Name of the icon to use.\n * @param {BrandColors} color - Background color for the image.\n * @param {number} outerViewBox - Size of the canvas for the image.\n * @returns {string} The generated SVG content.\n */\n generateSVGContent(icon: FeatherIconNames, color: BrandColors, outerViewBox = 100): string {\n const { canvas, log } = this;\n // Validate canvas\n if (!canvas) {\n log.fail('Canvas not initialized');\n return '';\n }\n\n const svgData = feather.icons[icon];\n log.debug(`SVG data to ingest: ${svgData.toSvg()}`);\n\n canvas.clear();\n\n // Create a canvas that is `outerViewBox` x `outerViewBox`\n canvas\n .size(brandingSquareEdgeLengthInPixels, brandingSquareEdgeLengthInPixels)\n .viewbox(`0 0 ${outerViewBox} ${outerViewBox}`)\n .fill('none');\n\n // Create a 'color' circle that touches the edges of the canvas\n const circleSize = outerViewBox / 2;\n canvas\n .circle('50%')\n .fill(color)\n .radius(circleSize)\n .cx(circleSize)\n .cy(circleSize)\n .stroke({ width: 0 });\n\n // Create an svg box that is half the size of the parent\n const iconsvgOuter = canvas.nested();\n iconsvgOuter.attr('overflow', 'visible').height('50%').width('50%').x('25%').y('25%');\n\n // create a nested svg and add the feather-icon paths to the svg\n const iconsvg = iconsvgOuter.nested();\n iconsvg.id('icon').svg(svgData.contents);\n\n // Append all of the attributes from the fether-icon\n for (const attr of Object.keys(svgData.attrs)) {\n iconsvg.attr(attr, svgData.attrs[attr]);\n }\n\n // invert the stroke color if it matches the background color\n iconsvg.stroke(color.startsWith('white') ? 'white' : 'black');\n\n // remove the edge clipping\n iconsvg.attr('overflow', 'visible');\n\n // Make the viewbox of the svg match the exact dimensions of the icon\n iconsvg.viewbox(iconsvg.bbox());\n\n // Make the svg icon center itself vertically and horozonally\n iconsvg.height('auto').width('auto');\n\n // return the xml file content\n return ['<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>', canvas.svg(), '\\n'].join(\n '\\n'\n );\n }\n}\n"]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
1
|
declare module "vitest.config" {
|
|
4
2
|
const _default: import("vite").UserConfig;
|
|
5
3
|
export default _default;
|
|
@@ -14,9 +12,9 @@ declare module "__tests__/action.constants" {
|
|
|
14
12
|
declare module "__mocks__/node:fs" {
|
|
15
13
|
import type { BigIntStats, PathLike, PathOrFileDescriptor, Stats, StatSyncOptions } from 'node:fs';
|
|
16
14
|
export type { BigIntStats, PathLike, PathOrFileDescriptor, Stats, StatSyncOptions } from 'node:fs';
|
|
17
|
-
export const statSync: import("
|
|
18
|
-
export const existsSync: import("
|
|
19
|
-
export const readFileSync: import("
|
|
15
|
+
export const statSync: import("vitest").Mock<(path: PathLike, options?: StatSyncOptions | undefined) => Stats | BigIntStats | undefined>;
|
|
16
|
+
export const existsSync: import("vitest").Mock<(filename: PathLike) => boolean>;
|
|
17
|
+
export const readFileSync: import("vitest").Mock<(filename: PathOrFileDescriptor) => string | Buffer>;
|
|
20
18
|
}
|
|
21
19
|
declare module "src/util" {
|
|
22
20
|
export type Nullable<T> = T | null | undefined;
|
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.8.
|
|
4
|
+
"version": "1.8.9",
|
|
5
5
|
"description": "This is a CLI tool and GitHub Action that reads in the details from a \nGitHub Action's `action.yml` file and updates the `README.md` file\nwith the `name`, `description`, `usage`, `inputs`, `outputs`, and\nexamples of the action.\nConfiguration can be provided via a `.ghadocs.json` file stored in the\nroot directory of the Action's repository, via the command line when\nusing the cli, or via the `with:` section of this Action.\n\n\nThis tool uses markdown comments as delimiting tokens within the `README.md`\nfile to determine where to place the generated content.\n\n[`README.example.md`](README.example.md) example with all fields filled in, and no other free-form content.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"actions",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"prelint": "npm run format && tsc --project tsconfig.json --noemit",
|
|
62
62
|
"lint": "npm run lint:eslint && npm run lint:markdown",
|
|
63
63
|
"lint:fix": "npm run lint:eslint:fix && npm run lint:markdown:fix",
|
|
64
|
-
"lint:eslint": "eslint
|
|
65
|
-
"lint:eslint:fix": "eslint
|
|
64
|
+
"lint:eslint": "eslint --color ./src/ ./__tests__/",
|
|
65
|
+
"lint:eslint:fix": "eslint --color --fix ./src/ ./__tests__/",
|
|
66
66
|
"markdownlint": "markdownlint",
|
|
67
67
|
"lint:markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore",
|
|
68
68
|
"lint:markdown:fix": "npm run lint:markdown -- --fix",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"preset": "angular"
|
|
141
141
|
},
|
|
142
142
|
"dependencies": {
|
|
143
|
-
"@actions/core": "^
|
|
143
|
+
"@actions/core": "^2.0.1",
|
|
144
144
|
"@actions/github": "^6.0.1",
|
|
145
145
|
"@svgdotjs/svg.js": "^3.2.5",
|
|
146
146
|
"@types/feather-icons": "^4.29.4",
|
|
@@ -148,18 +148,18 @@
|
|
|
148
148
|
"chalk": "^5.6.2",
|
|
149
149
|
"feather-icons": "^4.29.2",
|
|
150
150
|
"nconf": "^0.13.0",
|
|
151
|
-
"prettier": "^3.
|
|
151
|
+
"prettier": "^3.7.4",
|
|
152
152
|
"svgdom": "^0.1.22",
|
|
153
|
-
"yaml": "^2.8.
|
|
153
|
+
"yaml": "^2.8.2"
|
|
154
154
|
},
|
|
155
155
|
"devDependencies": {
|
|
156
156
|
"@babel/core": "^7.28.5",
|
|
157
157
|
"@babel/eslint-parser": "^7.28.5",
|
|
158
|
-
"@babel/plugin-proposal-decorators": "^7.
|
|
159
|
-
"@babel/preset-env": "^7.
|
|
158
|
+
"@babel/plugin-proposal-decorators": "^7.28.0",
|
|
159
|
+
"@babel/preset-env": "^7.26.0",
|
|
160
160
|
"@commitlint/cli": "^20.1.0",
|
|
161
161
|
"@commitlint/config-conventional": "^20.0.0",
|
|
162
|
-
"@commitlint/prompt": "^20.1
|
|
162
|
+
"@commitlint/prompt": "^20.3.1",
|
|
163
163
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
|
|
164
164
|
"@semantic-release/changelog": "^6.0.3",
|
|
165
165
|
"@semantic-release/exec": "^6.0.3",
|
|
@@ -168,10 +168,10 @@
|
|
|
168
168
|
"@types/babel__preset-env": "^7",
|
|
169
169
|
"@types/esm": "^3",
|
|
170
170
|
"@types/nconf": "^0.10.5",
|
|
171
|
-
"@types/node": "^25.0.
|
|
171
|
+
"@types/node": "^25.0.6",
|
|
172
172
|
"@types/node-emoji": "^2.1.0",
|
|
173
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
174
|
-
"@typescript-eslint/parser": "^8.
|
|
173
|
+
"@typescript-eslint/eslint-plugin": "^8.53.0",
|
|
174
|
+
"@typescript-eslint/parser": "^8.53.0",
|
|
175
175
|
"@vitest/coverage-v8": "^4.0.6",
|
|
176
176
|
"commitizen": "^4.3.1",
|
|
177
177
|
"conventional-commits": "^1.6.0",
|
|
@@ -179,34 +179,29 @@
|
|
|
179
179
|
"dotenv": "^16.3.1",
|
|
180
180
|
"esbuild": "^0.27.2",
|
|
181
181
|
"esbuild-node-externals": "^1.20.1",
|
|
182
|
-
"eslint": "^
|
|
183
|
-
"eslint-config-
|
|
184
|
-
"eslint-
|
|
185
|
-
"eslint-import
|
|
186
|
-
"eslint-plugin-
|
|
187
|
-
"eslint-plugin-import": "^2.29.0",
|
|
188
|
-
"eslint-plugin-lodash": "^7.4.0",
|
|
189
|
-
"eslint-plugin-lodash-fp": "^2.2.0-a1",
|
|
190
|
-
"eslint-plugin-n": "^16.2.0",
|
|
191
|
-
"eslint-plugin-no-use-extend-native": "^0.5.0",
|
|
182
|
+
"eslint": "^9.39.2",
|
|
183
|
+
"eslint-config-prettier": "^10.1.8",
|
|
184
|
+
"eslint-import-resolver-typescript": "^3.7.0",
|
|
185
|
+
"eslint-plugin-import": "^2.31.0",
|
|
186
|
+
"eslint-plugin-n": "^17.18.0",
|
|
192
187
|
"eslint-plugin-optimize-regex": "^1.2.1",
|
|
193
|
-
"eslint-plugin-prettier": "^5.
|
|
194
|
-
"eslint-plugin-promise": "^
|
|
195
|
-
"eslint-plugin-simple-import-sort": "^
|
|
196
|
-
"eslint-plugin-sonarjs": "^0.
|
|
197
|
-
"eslint-plugin-sort-class-members": "^1.
|
|
198
|
-
"eslint-plugin-unicorn": "^
|
|
199
|
-
"eslint-plugin-vitest": "^0.
|
|
188
|
+
"eslint-plugin-prettier": "^5.2.2",
|
|
189
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
190
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
191
|
+
"eslint-plugin-sonarjs": "^3.0.5",
|
|
192
|
+
"eslint-plugin-sort-class-members": "^1.21.0",
|
|
193
|
+
"eslint-plugin-unicorn": "^62.0.0",
|
|
194
|
+
"eslint-plugin-vitest": "^0.5.4",
|
|
200
195
|
"husky": "^9.1.7",
|
|
201
196
|
"is-ci": "^3.0.1",
|
|
202
197
|
"lint-staged": "^16.2.7",
|
|
203
|
-
"markdownlint-cli": "^0.
|
|
204
|
-
"rimraf": "^
|
|
198
|
+
"markdownlint-cli": "^0.47.0",
|
|
199
|
+
"rimraf": "^6.1.2",
|
|
205
200
|
"run-script-os": "^1.1.6",
|
|
206
|
-
"semantic-release": "^
|
|
201
|
+
"semantic-release": "^25.0.2",
|
|
207
202
|
"ts-node": "^10.9.1",
|
|
208
203
|
"types-package-json": "^2.0.39",
|
|
209
|
-
"typescript": "^5.
|
|
204
|
+
"typescript": "^5.7.3",
|
|
210
205
|
"vitest": "^4.0.6"
|
|
211
206
|
},
|
|
212
207
|
"engines": {
|