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/package.json CHANGED
@@ -1,22 +1,8 @@
1
1
  {
2
2
  "name": "github-action-readme-generator",
3
- "version": "1.6.0",
4
- "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.",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "bin": "dist/index.js",
8
3
  "displayName": "bitflight-devops/github-action-readme-generator",
9
- "publishConfig": {
10
- "access": "public",
11
- "registry": "https://registry.npmjs.org/"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "https://github.com/bitflight-devops/github-action-readme-generator"
16
- },
17
- "bugs": {
18
- "url": "https://github.com/bitflight-devops/github-action-readme-generator/issues"
19
- },
4
+ "version": "1.7.1",
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.",
20
6
  "keywords": [
21
7
  "actions",
22
8
  "github",
@@ -27,53 +13,59 @@
27
13
  "generator",
28
14
  "readme-generator"
29
15
  ],
30
- "author": "Jamie Nelson <jamie@bitflight.io>",
16
+ "bugs": {
17
+ "url": "https://github.com/bitflight-devops/github-action-readme-generator/issues"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/bitflight-devops/github-action-readme-generator"
22
+ },
31
23
  "license": "APACHE",
24
+ "author": "Jamie Nelson <jamie@bitflight.io>",
25
+ "type": "module",
26
+ "exports": {
27
+ "import": "./dist/mjs/index.js",
28
+ "require": "./dist/cjs/index.js"
29
+ },
30
+ "main": "dist/cjs/index.js",
31
+ "module": "dist/mjs/index.js",
32
+ "types": "dist/types/index.d.ts",
33
+ "bin": "dist/bin/index.js",
34
+ "files": [
35
+ "package.json",
36
+ "README.md",
37
+ "LICENSE",
38
+ "CHANGELOG.md",
39
+ "/dist"
40
+ ],
32
41
  "scripts": {
33
42
  "all": "npm run build && npm run format && npm run lint && npm run test",
34
- "auto": "auto",
35
- "auto:canary": "[ -d dist ] && git add -f dist",
36
- "auto:next": "[ -d dist ] && git add -f dist",
37
- "auto:publish": "[ -d dist ] && git add -f dist",
38
- "auto:version": "npm run generate-docs",
39
- "build": "rimraf dist out;node ./scripts/esbuild.mjs && chmod +x dist/index.js",
43
+ "prebuild": "tsc --project tsconfig.json --noemit",
44
+ "build": "rimraf dist out;node ./scripts/esbuild.mjs && chmod +x dist/bin/index.js",
45
+ "postbuild": "tsc --project tsconfig.json --emitDeclarationOnly --declaration --outFile dist/types/index.d.ts && tsc -p tsconfig-mjs.json && ./scripts/set_package_type.sh",
40
46
  "build:docker": "run-script-os",
41
47
  "build:docker:default": "docker run --rm -t -v $(pwd):/work -w /work node:20-alpine sh -c 'npm run build'",
42
48
  "build:docker:win32": "docker run --rm -t -v \"%cd%\":/work -w /work node:20-alpine sh -c \"npm run build\"",
43
- "build:inputs": "esbuild --bundle src/testInputs.ts --out-extension:.js=.cjs --color=true --sourcemap=inline --platform=node --outdir=dist --packages=external --target=node20 && chmod -R +x dist/ && node ./dist/testInputs.cjs",
44
- "bump": "npm version -i patch && npm run release",
45
- "bump:minor": "version -i minor && npm run release",
49
+ "build:inputs": "node scripts/esbuild-inputs-test.mjs && node ./out/inputs.test.js;rm -f ./out/inputs.test.js",
46
50
  "clean": "rimraf dist",
47
51
  "commit": "git-cz",
48
52
  "corepack": "corepack enable",
49
53
  "current-version": "jq -r '.version' package.json",
50
- "generate-docs": "echo 'Generating docs';node dist/index.js && git add README.md",
51
54
  "format": "prettier --write . --config .prettierrc.cjs --ignore-unknown",
52
- "lint": "eslint -c .eslintrc.cjs --color ./src/ ./__tests__/",
55
+ "generate-docs": "echo 'Generating docs';node dist/bin/index.js && git add README.md ./.github/ghadocs .ghadocs.json",
56
+ "postinstall": "echo '✨ Successfully Installed'",
53
57
  "prelint": "npm run format && tsc --project tsconfig.json --noemit",
54
- "lint:fix": "npm run lint --fix",
58
+ "lint": "eslint -c .eslintrc.cjs --color ./src/ ./__tests__/",
59
+ "lint:fix": "npm run lint -- --fix",
55
60
  "lint:markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore",
56
- "lint:markdown:fix": "npm run lint:markdown --fix",
57
- "prebuild": "tsc --project tsconfig.json --noemit",
58
- "postbuild": "tsc --project tsconfig.json --emitDeclarationOnly --declaration --outFile dist/index.d.ts",
59
- "postinstall": "echo '✨ Successfully Installed'",
60
- "postpublish:manual": "git push --follow-tags --set-upstream origin $branch && auto release",
61
- "postversion:manual": "git push --tags origin && git push origin",
61
+ "lint:markdown:fix": "npm run lint:markdown -- --fix",
62
62
  "pre-commit": "npm run build && git add dist && npm run generate-docs && lint-staged",
63
63
  "prepare": "[ -n ${GITHUB_ACTIONS:-} ] || husky install",
64
- "release:post": "npm publish --access public --tag v${npm_package_version} --tag latest",
64
+ "semantic-release": "semantic-release",
65
65
  "test": "NODE_ENV=testing jest --runInBand",
66
66
  "test-ci": "NODE_ENV=testing jest --ci --reporters=default --reporters=jest-junit",
67
67
  "version:manual": "echo 'Run versioning commands';echo \"::set-output name=tag::v${npm_package_version}\"",
68
- "semantic-release": "semantic-release"
69
- },
70
- "config": {
71
- "commitizen": {
72
- "path": "./node_modules/cz-conventional-changelog"
73
- },
74
- "ghadocs": {
75
- "outpath": ".github/tools/generate-docs"
76
- }
68
+ "postversion:manual": "git push --tags origin && git push origin"
77
69
  },
78
70
  "commitlint": {
79
71
  "extends": [
@@ -97,70 +89,93 @@
97
89
  ]
98
90
  }
99
91
  },
100
- "engines": {
101
- "node": ">=14.0.0"
92
+ "lint-staged": {
93
+ "*.{md,json,yaml,yml,sh}": "prettier --write",
94
+ "{src,__tests__}/**/*.js": "eslint --cache --fix",
95
+ "*.{ts,mts}": [
96
+ "eslint --cache --fix"
97
+ ]
98
+ },
99
+ "config": {
100
+ "commitizen": {
101
+ "path": "./node_modules/cz-conventional-changelog"
102
+ },
103
+ "ghadocs": {
104
+ "outpath": ".github/tools/generate-docs"
105
+ }
106
+ },
107
+ "release": {
108
+ "branches": [
109
+ "main",
110
+ "next",
111
+ {
112
+ "name": "alpha",
113
+ "prerelease": true
114
+ }
115
+ ],
116
+ "plugins": [
117
+ "@semantic-release/commit-analyzer",
118
+ "@semantic-release/release-notes-generator",
119
+ "@semantic-release/changelog",
120
+ "@semantic-release/npm",
121
+ [
122
+ "@semantic-release/github",
123
+ {
124
+ "assets": [
125
+ "dist/**",
126
+ "action.yml",
127
+ "package.json"
128
+ ]
129
+ }
130
+ ],
131
+ "@semantic-release/git"
132
+ ],
133
+ "preset": "angular"
134
+ },
135
+ "jest-junit": {
136
+ "classNameTemplate": "{classname}",
137
+ "suiteNameTemplate": "{filepath}",
138
+ "titleTemplate": "{title}"
102
139
  },
103
- "files": [
104
- "package.json",
105
- "README.md",
106
- "LICENSE",
107
- "CHANGELOG.md",
108
- "/dist"
109
- ],
110
- "os": [
111
- "!win32"
112
- ],
113
140
  "dependencies": {
114
141
  "@actions/core": "^1.10.1",
115
- "@actions/github": "^5.1.1",
116
- "async": "^3.2.4",
117
- "chalk": "^4",
118
- "js-yaml": "^4.1.0",
119
- "nconf": "^0.12.0",
142
+ "@actions/github": "^6.0.0",
143
+ "@svgdotjs/svg.js": "^3.2.0",
144
+ "@types/feather-icons": "^4.29.3",
145
+ "@types/svgdom": "^0.1.1",
146
+ "chalk": "^5",
147
+ "feather-icons": "^4.29.1",
148
+ "nconf": "^0.12.1",
120
149
  "node-emoji": "^2.1.0",
121
150
  "prettier": "^3.0.3",
122
- "tslib": "^2.6.2"
151
+ "svgdom": "^0.1.18",
152
+ "yaml": "^2.3.3"
123
153
  },
124
154
  "devDependencies": {
125
- "@auto-it/all-contributors": "^11.0.4",
126
- "@auto-it/conventional-commits": "^11.0.4",
127
- "@auto-it/exec": "^11.0.4",
128
- "@auto-it/first-time-contributor": "^11.0.4",
129
- "@auto-it/git-tag": "^11.0.4",
130
- "@auto-it/npm": "^11.0.4",
131
- "@auto-it/omit-commits": "^11.0.4",
132
- "@auto-it/released": "^11.0.4",
133
- "@auto-it/upload-assets": "^11.0.4",
134
- "@babel/core": "^7.23.0",
155
+ "@babel/core": "^7.23.2",
135
156
  "@babel/eslint-parser": "^7.22.15",
136
- "@babel/plugin-proposal-decorators": "^7.23.0",
137
- "@babel/preset-env": "^7.22.20",
138
- "@commitlint/cli": "^17.7.2",
139
- "@commitlint/config-conventional": "^17.7.0",
140
- "@commitlint/prompt": "^17.7.2",
157
+ "@babel/plugin-proposal-decorators": "^7.23.2",
158
+ "@babel/preset-env": "^7.23.2",
159
+ "@commitlint/cli": "^18.0.0",
160
+ "@commitlint/config-conventional": "^18.0.0",
161
+ "@commitlint/prompt": "^18.0.0",
141
162
  "@jest/types": "^29.6.3",
142
- "@prettier/plugin-ruby": "^4.0.2",
143
- "@prettier/plugin-xml": "^3.2.1",
144
163
  "@semantic-release/changelog": "^6.0.3",
145
164
  "@semantic-release/git": "^10.0.1",
146
- "@trunkio/launcher": "^1.2.7",
147
165
  "@tsconfig/node20": "^20.1.2",
148
166
  "@types/babel__preset-env": "^7",
149
167
  "@types/esm": "^3",
150
- "@types/jest": "^29.5.5",
151
- "@types/js-yaml": "^4.0.6",
152
- "@types/nconf": "^0.10.4",
153
- "@types/node": "^20.8.3",
154
- "@types/node-emoji": "^1.8.2",
155
- "@typescript-eslint/eslint-plugin": "^6.7.4",
156
- "@typescript-eslint/parser": "^6.7.4",
157
- "@typescript-eslint/typescript-estree": "^6.7.4",
168
+ "@types/jest": "^29.5.6",
169
+ "@types/nconf": "^0.10.5",
170
+ "@types/node": "^20.8.7",
171
+ "@types/node-emoji": "^2.1.0",
172
+ "@typescript-eslint/eslint-plugin": "^6.8.0",
173
+ "@typescript-eslint/parser": "^6.8.0",
158
174
  "commitizen": "^4.3.0",
159
175
  "conventional-commits": "^1.6.0",
160
176
  "cz-conventional-changelog": "^3.3.0",
161
- "date-format": "^4.0.14",
162
177
  "dotenv": "^16.3.1",
163
- "esbuild": "^0.19.4",
178
+ "esbuild": "^0.19.5",
164
179
  "esbuild-node-externals": "^1.9.0",
165
180
  "eslint": "^8.51.0",
166
181
  "eslint-config-airbnb-base": "^15.0.0",
@@ -175,7 +190,7 @@
175
190
  "eslint-plugin-lodash-fp": "^2.2.0-a1",
176
191
  "eslint-plugin-no-use-extend-native": "^0.5.0",
177
192
  "eslint-plugin-optimize-regex": "^1.2.1",
178
- "eslint-plugin-prettier": "^5.0.0",
193
+ "eslint-plugin-prettier": "^5.0.1",
179
194
  "eslint-plugin-promise": "^6.1.1",
180
195
  "eslint-plugin-simple-import-sort": "^10.0.0",
181
196
  "eslint-plugin-sonarjs": "^0.21.0",
@@ -186,57 +201,24 @@
186
201
  "jest": "^29.7.0",
187
202
  "jest-circus": "^29.7.0",
188
203
  "jest-junit": "^16.0.0",
189
- "lint-staged": "^14.0.1",
204
+ "lint-staged": "^15.0.2",
190
205
  "markdownlint-cli": "^0.37.0",
191
- "prettier-eslint": "^15.0.1",
192
- "prettier-plugin-properties": "^0.2.0",
193
206
  "rimraf": "^5.0.5",
194
207
  "run-script-os": "^1.1.6",
195
208
  "semantic-release": "^22.0.5",
196
209
  "ts-jest": "^29.1.1",
197
210
  "ts-node": "^10.9.1",
198
211
  "types-package-json": "^2.0.39",
199
- "typescript": "^5.2.2",
200
- "yaml": "^2.3.2"
212
+ "typescript": "^5.2.2"
201
213
  },
202
- "jest-junit": {
203
- "suiteNameTemplate": "{filepath}",
204
- "classNameTemplate": "{classname}",
205
- "titleTemplate": "{title}"
206
- },
207
- "lint-staged": {
208
- "*.{md,json,yaml,yml,sh}": "prettier --write",
209
- "{src,__tests__}/**/*.js": "eslint --cache --fix",
210
- "*.ts": [
211
- "eslint --cache --fix"
212
- ]
214
+ "engines": {
215
+ "node": ">= 18"
213
216
  },
214
- "release": {
215
- "preset": "angular",
216
- "branches": [
217
- "main",
218
- "next",
219
- {
220
- "name": "alpha",
221
- "prerelease": true
222
- }
223
- ],
224
- "plugins": [
225
- "@semantic-release/commit-analyzer",
226
- "@semantic-release/release-notes-generator",
227
- "@semantic-release/changelog",
228
- "@semantic-release/npm",
229
- [
230
- "@semantic-release/github",
231
- {
232
- "assets": [
233
- "dist/**",
234
- "action.yml",
235
- "package.json"
236
- ]
237
- }
238
- ],
239
- "@semantic-release/git"
240
- ]
217
+ "os": [
218
+ "!win32"
219
+ ],
220
+ "publishConfig": {
221
+ "access": "public",
222
+ "registry": "https://registry.npmjs.org/"
241
223
  }
242
224
  }