github-action-readme-generator 1.5.1 → 1.7.0

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 +27 -0
  2. package/README.example.md +2 -0
  3. package/README.md +24 -38
  4. package/dist/bin/index.js +320846 -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} +104 -49
  73. package/package.json +115 -134
  74. package/dist/index.js +0 -16
package/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ # [1.7.0](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.6.0...v1.7.0) (2023-10-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **readme:** newlines missing around content sections in readme ([0ca9980](https://github.com/bitflight-devops/github-action-readme-generator/commit/0ca99809b643d5e82958dda81c6db5d7bdb1c423))
7
+
8
+
9
+ ### Features
10
+
11
+ * **branding:** icons now correctly centered on circle ([2c26d93](https://github.com/bitflight-devops/github-action-readme-generator/commit/2c26d93f8452d77bf8516260f6fcfd45196e9590))
12
+ * **branding:** new segment for readme generates action.yml branding svg ([07c3bbe](https://github.com/bitflight-devops/github-action-readme-generator/commit/07c3bbecc903787613d3ffcae016673785b1016d))
13
+ * **engines:** update node engines to be >= 18, from 14 ([35b5d08](https://github.com/bitflight-devops/github-action-readme-generator/commit/35b5d089a2cb83cdf6bfe88a2bc45cf6aba90a12))
14
+ * improve devx ([9f34cf8](https://github.com/bitflight-devops/github-action-readme-generator/commit/9f34cf8926303b84d2040ddb072ebe6bb6f9820d))
15
+
16
+ # [1.6.0](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.5.1...v1.6.0) (2023-10-16)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **test:** inputs test was failing due to node20 bundling error ([7b5cac4](https://github.com/bitflight-devops/github-action-readme-generator/commit/7b5cac4d69c8fad291e374b3140a230dcf8ba358))
22
+
23
+
24
+ ### Features
25
+
26
+ * **refactor:** make the readme sections update in memory before writing it out once ([a4468c1](https://github.com/bitflight-devops/github-action-readme-generator/commit/a4468c1bc0bf7c744402a4904baa87f2eec9f36e))
27
+
1
28
  ## [1.5.1](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.5.0...v1.5.1) (2023-10-14)
2
29
 
3
30
 
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,17 +1,15 @@
1
+ <!-- start branding -->
2
+ <img src=".github/ghadocs/branding.svg" alt="book-open" />
3
+ <!-- end branding -->
1
4
  <!-- start title -->
2
-
3
5
  # GitHub Action: 📓 GitHub Action's Readme Generator
4
-
5
6
  <!-- end title -->
6
7
  <!-- start badges -->
7
-
8
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
-
10
9
  <!-- end badges -->
11
10
  <!-- start description -->
12
-
13
- Maintain a current README.md with content from the action.yml file
14
-
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.
15
13
  <!-- end description -->
16
14
 
17
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.
@@ -38,7 +36,6 @@ This is a CLI tool and GitHub Action that reads the details from a GitHub Action
38
36
  ### Stand Alone Usage - if you have a Docker Action
39
37
 
40
38
  ```sh
41
- sh
42
39
  npx --yes github-action-readme-generator@latest
43
40
  ```
44
41
 
@@ -106,52 +103,40 @@ You can modify the script below to include any extra variables you like or use n
106
103
  <!-- start usage -->
107
104
 
108
105
  ```yaml
109
- - uses: bitflight-devops/github-action-readme-generator@v1.3.15--canary.8238c73.0
106
+ - uses: bitflight-devops/github-action-readme-generator@v1.6.0
110
107
  with:
111
- # The absolute or relative path to the `action.yml` file to read in from.
112
108
  # Default: action.yml
113
109
  action: ''
114
110
 
115
- # The absolute or relative path to the markdown output file that contains the
116
- # formatting tokens within it.
117
111
  # Default: README.md
118
112
  readme: ''
119
113
 
120
- # The GitHub Action repository owner. i.e: `bitflight-devops`|`your-gh-username`
121
114
  owner: ''
122
115
 
123
- # The GitHub Action repository name. i.e: `github-action-readme-generator`
124
116
  repo: ''
125
117
 
126
- # Save the provided values in a `.ghadocs.json` file. This will update any
127
- # existing `.ghadocs.json` file that is in place.
128
118
  save: ''
129
119
 
130
- # Use `prettier` to pretty print the new README.md file
131
120
  pretty: ''
132
121
 
133
- # Enable the update of the usage version to match the latest version in the
134
- # `package.json` file
135
122
  versioning_enabled: ''
136
123
 
137
- # Set a specific version to display in the README.md
138
124
  version_override: ''
139
125
 
140
- # Prefix the version with this value (if it isn't already prefixed)
141
126
  # Default: v
142
127
  version_prefix: ''
143
128
 
144
- # If versioning is disabled show this branch instead
145
129
  # Default: main
146
130
  versioning_default_branch: ''
147
131
 
148
- # Add a prefix to the README title
149
132
  # Default: GitHub Action:
150
133
  title_prefix: ''
151
134
 
152
- # Include additional badge showing latest tag
153
135
  # Default: true
154
136
  include_github_version_badge: ''
137
+
138
+ # Default: .github/ghadocs/branding.svg
139
+ branding_svg_path: ''
155
140
  ```
156
141
 
157
142
  <!-- end usage -->
@@ -160,20 +145,21 @@ You can modify the script below to include any extra variables you like or use n
160
145
 
161
146
  <!-- start inputs -->
162
147
 
163
- | \***\*Input\*\*** | \***\*Description\*\*** | \***\*Default\*\*** | \***\*Required\*\*** |
164
- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | -------------------- |
165
- | <code>**action**</code> | The absolute or relative path to the <code>action.yml</code> file to read in from. | <code>action.yml</code> | **false** |
166
- | <code>**readme**</code> | The absolute or relative path to the markdown output file that contains the formatting tokens within it. | <code>README.md</code> | **false** |
167
- | <code>**owner**</code> | The GitHub Action repository owner. i.e: `bitflight-devops`\|`your-gh-username` | | **false** |
168
- | <code>**repo**</code> | The GitHub Action repository name. i.e: <code>github-action-readme-generator</code> | | **false** |
169
- | <code>**save**</code> | Save the provided values in a <code>.ghadocs.json</code> file. This will update any existing <code>.ghadocs.json</code> file that is in place. | | **false** |
170
- | <code>**pretty**</code> | Use <code>prettier</code> to pretty print the new README.md file | | **false** |
171
- | <code>**versioning_enabled**</code> | Enable the update of the usage version to match the latest version in the <code>package.json</code> file | | **false** |
172
- | <code>**version_override**</code> | Set a specific version to display in the README.md | | **false** |
173
- | <code>**version_prefix**</code> | Prefix the version with this value (if it isn't already prefixed) | <code>v</code> | **false** |
174
- | <code>**versioning_default_branch**</code> | If versioning is disabled show this branch instead | <code>main</code> | **false** |
175
- | <code>**title_prefix**</code> | Add a prefix to the README title | <code>GitHub Action: </code> | **false** |
176
- | <code>**include_github_version_badge**</code> | Include additional badge showing latest tag | <code>true</code> | **false** |
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** |
177
163
 
178
164
  <!-- end inputs -->
179
165
  <!-- start outputs -->