github-action-readme-generator 1.6.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.example.md +2 -0
  3. package/README.md +55 -47
  4. package/dist/bin/index.js +321306 -0
  5. package/dist/mjs/Action.d.ts +33 -0
  6. package/dist/mjs/Action.js +51 -0
  7. package/dist/mjs/Action.js.map +1 -0
  8. package/dist/mjs/config.d.ts +30 -0
  9. package/dist/mjs/config.js +56 -0
  10. package/dist/mjs/config.js.map +1 -0
  11. package/dist/mjs/generate-docs.d.ts +3 -0
  12. package/dist/mjs/generate-docs.js +21 -0
  13. package/dist/mjs/generate-docs.js.map +1 -0
  14. package/dist/mjs/helpers.d.ts +17 -0
  15. package/dist/mjs/helpers.js +187 -0
  16. package/dist/mjs/helpers.js.map +1 -0
  17. package/dist/mjs/index.d.ts +2 -0
  18. package/dist/mjs/index.js +4 -0
  19. package/dist/mjs/index.js.map +1 -0
  20. package/dist/mjs/inputs.d.ts +18 -0
  21. package/dist/mjs/inputs.js +252 -0
  22. package/dist/mjs/inputs.js.map +1 -0
  23. package/dist/mjs/inputs.test.d.ts +2 -0
  24. package/dist/mjs/inputs.test.js +8 -0
  25. package/dist/mjs/inputs.test.js.map +1 -0
  26. package/dist/mjs/logtask/index.d.ts +20 -0
  27. package/dist/mjs/logtask/index.js +181 -0
  28. package/dist/mjs/logtask/index.js.map +1 -0
  29. package/dist/mjs/markdowner/index.d.ts +17 -0
  30. package/dist/mjs/markdowner/index.js +104 -0
  31. package/dist/mjs/markdowner/index.js.map +1 -0
  32. package/dist/mjs/package.json +3 -0
  33. package/dist/mjs/prettier.d.ts +3 -0
  34. package/dist/mjs/prettier.js +32 -0
  35. package/dist/mjs/prettier.js.map +1 -0
  36. package/dist/mjs/readme-editor.d.ts +10 -0
  37. package/dist/mjs/readme-editor.js +42 -0
  38. package/dist/mjs/readme-editor.js.map +1 -0
  39. package/dist/mjs/save.d.ts +2 -0
  40. package/dist/mjs/save.js +10 -0
  41. package/dist/mjs/save.js.map +1 -0
  42. package/dist/mjs/sections/index.d.ts +2 -0
  43. package/dist/mjs/sections/index.js +48 -0
  44. package/dist/mjs/sections/index.js.map +1 -0
  45. package/dist/mjs/sections/update-badges.d.ts +7 -0
  46. package/dist/mjs/sections/update-badges.js +71 -0
  47. package/dist/mjs/sections/update-badges.js.map +1 -0
  48. package/dist/mjs/sections/update-branding.d.ts +7 -0
  49. package/dist/mjs/sections/update-branding.js +46 -0
  50. package/dist/mjs/sections/update-branding.js.map +1 -0
  51. package/dist/mjs/sections/update-description.d.ts +2 -0
  52. package/dist/mjs/sections/update-description.js +21 -0
  53. package/dist/mjs/sections/update-description.js.map +1 -0
  54. package/dist/mjs/sections/update-inputs.d.ts +2 -0
  55. package/dist/mjs/sections/update-inputs.js +47 -0
  56. package/dist/mjs/sections/update-inputs.js.map +1 -0
  57. package/dist/mjs/sections/update-outputs.d.ts +2 -0
  58. package/dist/mjs/sections/update-outputs.js +42 -0
  59. package/dist/mjs/sections/update-outputs.js.map +1 -0
  60. package/dist/mjs/sections/update-title.d.ts +2 -0
  61. package/dist/mjs/sections/update-title.js +19 -0
  62. package/dist/mjs/sections/update-title.js.map +1 -0
  63. package/dist/mjs/sections/update-usage.d.ts +2 -0
  64. package/dist/mjs/sections/update-usage.js +49 -0
  65. package/dist/mjs/sections/update-usage.js.map +1 -0
  66. package/dist/mjs/svg-editor.d.mts +22 -0
  67. package/dist/mjs/svg-editor.mjs +138 -0
  68. package/dist/mjs/svg-editor.mjs.map +1 -0
  69. package/dist/mjs/working-directory.d.ts +2 -0
  70. package/dist/mjs/working-directory.js +5 -0
  71. package/dist/mjs/working-directory.js.map +1 -0
  72. package/dist/{index.d.ts → types/index.d.ts} +44 -10
  73. package/package.json +117 -135
  74. package/dist/index.js +0 -16
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ ## [1.7.1](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.7.0...v1.7.1) (2023-10-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **nconf:** nconf released a fix for dynamic imports ([2e5c3c3](https://github.com/bitflight-devops/github-action-readme-generator/commit/2e5c3c3e4ed53905c8da13f0511c673b1ef83815))
7
+
8
+ # [1.7.0](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.6.0...v1.7.0) (2023-10-22)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **readme:** newlines missing around content sections in readme ([0ca9980](https://github.com/bitflight-devops/github-action-readme-generator/commit/0ca99809b643d5e82958dda81c6db5d7bdb1c423))
14
+
15
+
16
+ ### Features
17
+
18
+ * **branding:** icons now correctly centered on circle ([2c26d93](https://github.com/bitflight-devops/github-action-readme-generator/commit/2c26d93f8452d77bf8516260f6fcfd45196e9590))
19
+ * **branding:** new segment for readme generates action.yml branding svg ([07c3bbe](https://github.com/bitflight-devops/github-action-readme-generator/commit/07c3bbecc903787613d3ffcae016673785b1016d))
20
+ * **engines:** update node engines to be >= 18, from 14 ([35b5d08](https://github.com/bitflight-devops/github-action-readme-generator/commit/35b5d089a2cb83cdf6bfe88a2bc45cf6aba90a12))
21
+ * improve devx ([9f34cf8](https://github.com/bitflight-devops/github-action-readme-generator/commit/9f34cf8926303b84d2040ddb072ebe6bb6f9820d))
22
+
1
23
  # [1.6.0](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.5.1...v1.6.0) (2023-10-16)
2
24
 
3
25
 
package/README.example.md CHANGED
@@ -1,5 +1,7 @@
1
1
  <!-- start title -->
2
2
  <!-- end title -->
3
+ <!-- start branding -->
4
+ <!-- end branding -->
3
5
  <!-- start description -->
4
6
  <!-- end description -->
5
7
  <!-- start contents -->
package/README.md CHANGED
@@ -1,8 +1,16 @@
1
- <!-- start title --># GitHub Action: 📓 GitHub Action's Readme Generator<!-- end title -->
2
- <!-- start badges --><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" /></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" /></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" /><!-- end badges -->
3
- <!-- start description -->Keep the README.md `usage`, `inputs` and `outputs` in sync with the `action.yml` file.
4
-
5
- Additionally the Action's usage example is updated to match the Action's current release.<!-- end description -->
1
+ <!-- start branding -->
2
+ <img src=".github/ghadocs/branding.svg" alt="book-open" />
3
+ <!-- end branding -->
4
+ <!-- start title -->
5
+ # GitHub Action: 📓 GitHub Action's Readme Generator
6
+ <!-- end title -->
7
+ <!-- start badges -->
8
+ <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" /></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" /></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" />
9
+ <!-- end badges -->
10
+ <!-- start description -->
11
+ Keep the README.md `usage`, `inputs` and `outputs` in sync with the `action.yml` file.
12
+ Additionally the Action's usage example is updated to match the Action's current release.
13
+ <!-- end description -->
6
14
 
7
15
  This is a CLI tool and GitHub Action that reads the details from a GitHub Action's `action.yml` file. It updates the `README.md` file with the `name`, `description`, `usage`, `inputs`, `outputs`, and examples of the action. Configuration can be provided through a `.ghadocs.json` file stored in the root directory of the Action's repository, via the command line when using the CLI, or through the `with:` section of this Action.
8
16
 
@@ -92,69 +100,69 @@ You can modify the script below to include any extra variables you like or use n
92
100
 
93
101
  ## Usage
94
102
 
95
- <!-- start usage -->```yaml
103
+ <!-- start usage -->
96
104
 
97
- - uses: bitflight-devops/github-action-readme-generator@v1.5.1
105
+ ```yaml
106
+ - uses: bitflight-devops/github-action-readme-generator@v1.7.0
98
107
  with:
108
+ # Default: action.yml
109
+ action: ''
99
110
 
100
- # Default: action.yml
101
-
102
- action: ''
103
-
104
- # Default: README.md
105
-
106
- readme: ''
107
-
108
- owner: ''
109
-
110
- repo: ''
111
+ # Default: README.md
112
+ readme: ''
111
113
 
112
- save: ''
114
+ owner: ''
113
115
 
114
- pretty: ''
116
+ repo: ''
115
117
 
116
- versioning_enabled: ''
118
+ save: ''
117
119
 
118
- version_override: ''
120
+ pretty: ''
119
121
 
120
- # Default: v
122
+ versioning_enabled: ''
121
123
 
122
- version_prefix: ''
124
+ version_override: ''
123
125
 
124
- # Default: main
126
+ # Default: v
127
+ version_prefix: ''
125
128
 
126
- versioning_default_branch: ''
129
+ # Default: main
130
+ versioning_default_branch: ''
127
131
 
128
- # Default: GitHub Action:
132
+ # Default: GitHub Action:
133
+ title_prefix: ''
129
134
 
130
- title_prefix: ''
131
-
132
- # Default: true
133
-
134
- include_github_version_badge: ''
135
+ # Default: true
136
+ include_github_version_badge: ''
135
137
 
138
+ # Default: .github/ghadocs/branding.svg
139
+ branding_svg_path: ''
136
140
  ```
141
+
137
142
  <!-- end usage -->
138
143
 
139
144
  ## Inputs
140
145
 
141
- <!-- start inputs -->| ****Input**** | ****Description**** | ****Default**** | ****Required**** |
142
- |---|---|---|---|
143
- | `**action**` | The absolute or relative path to the `action.yml` file to read in from. | `action.yml` | __false__ |
144
- | `**readme**` | The absolute or relative path to the markdown output file that contains the formatting tokens within it. | `README.md` | __false__ |
145
- | `**owner**` | The GitHub Action repository owner. i.e: `bitflight-devops`\|`your-gh-username` | | __false__ |
146
- | `**repo**` | The GitHub Action repository name. i.e: `github-action-readme-generator` | | __false__ |
147
- | `**save**` | Save the provided values in a `.ghadocs.json` file. This will update any existing `.ghadocs.json` file that is in place. | | __false__ |
148
- | `**pretty**` | Use `prettier` to pretty print the new README.md file | | __false__ |
149
- | `**versioning_enabled**` | Enable the update of the usage version to match the latest version in the `package.json` file | | __false__ |
150
- | `**version_override**` | Set a specific version to display in the README.md | | __false__ |
151
- | `**version_prefix**` | Prefix the version with this value (if it isn't already prefixed) | `v` | __false__ |
152
- | `**versioning_default_branch**` | If versioning is disabled show this branch instead | `main` | __false__ |
153
- | `**title_prefix**` | Add a prefix to the README title | `GitHub Action: ` | __false__ |
154
- | `**include_github_version_badge**` | Include additional badge showing latest tag | `true` | __false__ |
146
+ <!-- start inputs -->
147
+
148
+ | \***\*Input\*\*** | \***\*Description\*\*** | \***\*Default\*\*** | \***\*Required\*\*** |
149
+ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------ | -------------------- |
150
+ | `**action**` | The absolute or relative path to the `action.yml` file to read in from. | `action.yml` | **false** |
151
+ | `**readme**` | The absolute or relative path to the markdown output file that contains the formatting tokens within it. | `README.md` | **false** |
152
+ | `**owner**` | The GitHub Action repository owner. i.e: `bitflight-devops`\|`your-gh-username` | | **false** |
153
+ | `**repo**` | The GitHub Action repository name. i.e: `github-action-readme-generator` | | **false** |
154
+ | `**save**` | Save the provided values in a `.ghadocs.json` file. This will update any existing `.ghadocs.json` file that is in place. | | **false** |
155
+ | `**pretty**` | Use `prettier` to pretty print the new README.md file | | **false** |
156
+ | `**versioning_enabled**` | Enable the update of the usage version to match the latest version in the `package.json` file | | **false** |
157
+ | `**version_override**` | Set a specific version to display in the README.md | | **false** |
158
+ | `**version_prefix**` | Prefix the version with this value (if it isn't already prefixed) | `v` | **false** |
159
+ | `**versioning_default_branch**` | If versioning is disabled show this branch instead | `main` | **false** |
160
+ | `**title_prefix**` | Add a prefix to the README title | `GitHub Action: ` | **false** |
161
+ | `**include_github_version_badge**` | Include additional badge showing latest tag | `true` | **false** |
162
+ | `**branding_svg_path**` | Save and load the branding svg image in the README from this path | `.github/ghadocs/branding.svg` | **false** |
163
+
155
164
  <!-- end inputs -->
156
165
  <!-- start outputs -->
157
166
  <!-- end outputs -->
158
167
  <!-- start [.github/ghadocs/examples/] -->
159
168
  <!-- end [.github/ghadocs/examples/] -->
160
- ```