@hexonet/semantic-release-whmcs 4.0.3 → 5.0.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 (44) hide show
  1. package/.github/dependabot.yml +7 -7
  2. package/.github/workflows/release.yml +29 -0
  3. package/.github/workflows/{pull-request.yml → test.yml} +13 -16
  4. package/.releaserc.json +1 -5
  5. package/CONTRIBUTING.md +1 -1
  6. package/HISTORY.md +81 -62
  7. package/README.md +5 -5
  8. package/index.js +36 -30
  9. package/lib/definitions/errors.js +26 -13
  10. package/lib/delete-marketplace-version.js +48 -48
  11. package/lib/get-error.js +6 -6
  12. package/lib/get-github-releases.js +17 -18
  13. package/lib/publish.js +10 -13
  14. package/lib/puppet.js +73 -74
  15. package/lib/resolve-config.js +5 -6
  16. package/lib/scrape-marketplace-versions.js +30 -28
  17. package/lib/set-compatible-versions.js +42 -41
  18. package/lib/verify.js +14 -11
  19. package/package.json +35 -31
  20. package/whmcs.js +81 -53
  21. package/.eslintignore +0 -3
  22. package/.eslintrc.js +0 -14
  23. package/.github/workflows/push.yml +0 -79
  24. package/coverage/base.css +0 -224
  25. package/coverage/block-navigation.js +0 -87
  26. package/coverage/coverage-final.json +0 -11
  27. package/coverage/favicon.png +0 -0
  28. package/coverage/index.html +0 -131
  29. package/coverage/lib/definitions/errors.js.html +0 -136
  30. package/coverage/lib/definitions/index.html +0 -116
  31. package/coverage/lib/delete-marketplace-version.js.html +0 -343
  32. package/coverage/lib/get-error.js.html +0 -106
  33. package/coverage/lib/get-github-releases.js.html +0 -184
  34. package/coverage/lib/index.html +0 -236
  35. package/coverage/lib/publish.js.html +0 -370
  36. package/coverage/lib/puppet.js.html +0 -424
  37. package/coverage/lib/resolve-config.js.html +0 -118
  38. package/coverage/lib/scrape-marketplace-versions.js.html +0 -220
  39. package/coverage/lib/set-compatible-versions.js.html +0 -298
  40. package/coverage/lib/verify.js.html +0 -148
  41. package/coverage/prettify.css +0 -1
  42. package/coverage/prettify.js +0 -2
  43. package/coverage/sort-arrow-sprite.png +0 -0
  44. package/coverage/sorter.js +0 -196
@@ -1,9 +1,9 @@
1
1
  version: 2
2
2
  updates:
3
- - package-ecosystem: npm
4
- directory: "/"
5
- schedule:
6
- interval: daily
7
- open-pull-requests-limit: 10
8
- commit-message:
9
- prefix: chore
3
+ - package-ecosystem: npm
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 10
8
+ commit-message:
9
+ prefix: chore
@@ -0,0 +1,29 @@
1
+ name: Release
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+
7
+ jobs:
8
+ release:
9
+ name: Release @ NodeJS LTS - x86 - ubuntu-latest
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout
13
+ uses: actions/checkout@v3
14
+ with:
15
+ fetch-depth: 0
16
+ persist-credentials: false
17
+ - name: Setup NodeJS LTS
18
+ uses: actions/setup-node@v3
19
+ with:
20
+ node-version: lts/*
21
+ cache: npm
22
+ - name: Install dependencies
23
+ run: npm ci
24
+ - name: Release
25
+ env:
26
+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
27
+ GITHUB_REPO: ${{ secrets.GH_REPO }}
28
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
29
+ run: npx semantic-release
@@ -1,24 +1,21 @@
1
- # This workflow handle pull requests
2
- name: Receive pull_request
3
- on: [pull_request_target]
1
+ name: Lint codebase & Execute tests
2
+ on:
3
+ push:
4
+ branches:
5
+ - dependabot/** #branches are generated by https://github.com/dependabot
6
+
7
+ pull_request:
8
+ types:
9
+ - opened
10
+ - synchronize
11
+
4
12
  jobs:
5
- approve: # to approve a workflow run(through github environment)
6
- name: Approve Job
7
- runs-on: ubuntu-latest
8
- steps:
9
- - name: Approve
10
- run: |
11
- echo For security reasons, all pull requests need to be approved first before running any automated CI.
12
- echo Thank you for your patience.
13
13
  test:
14
14
  name: Test @ NodeJS - x86 - ubuntu-latest
15
15
  runs-on: ubuntu-latest
16
- needs: [approve]
17
16
  strategy:
18
17
  matrix:
19
18
  node-version: [lts/*]
20
- environment:
21
- name: pr-reviews
22
19
  steps:
23
20
  - name: Checkout
24
21
  uses: actions/checkout@v3
@@ -26,7 +23,7 @@ jobs:
26
23
  uses: actions/setup-node@v3
27
24
  with:
28
25
  node-version: ${{ matrix.node-version }}
29
- check-latest: true
26
+ cache: npm
30
27
  - name: Install dependencies
31
28
  run: npm ci
32
29
  - name: Linting
@@ -40,7 +37,7 @@ jobs:
40
37
  WHMCSMP_PRODUCTID: ${{ secrets.WHMCSMP_PRODUCTID }}
41
38
  WHMCSMP_MINVERSION: ${{ secrets.WHMCSMP_MINVERSION }}
42
39
  DEBUG: ${{ secrets.DEBUG }}
43
- run: npm run coverage
40
+ run: npm run test
44
41
  - name: Initialize CodeQL
45
42
  uses: github/codeql-action/init@v2
46
43
  with:
package/.releaserc.json CHANGED
@@ -12,11 +12,7 @@
12
12
  [
13
13
  "@semantic-release/git",
14
14
  {
15
- "assets": [
16
- "HISTORY.md",
17
- "package?(-lock).json",
18
- "coverage"
19
- ],
15
+ "assets": ["HISTORY.md", "package?(-lock).json"],
20
16
  "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
21
17
  }
22
18
  ],
package/CONTRIBUTING.md CHANGED
@@ -7,7 +7,7 @@ Please note we have a code of conduct, please follow it in all your interactions
7
7
 
8
8
  ## Pull Request Process
9
9
 
10
- Read [here](https://github.com/hexonet/semantic-release-whmcs/wiki/Development-Guide#pull-request-pr-procedure).
10
+ Read [here](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/wiki/Development-Guide#pull-request-pr-procedure).
11
11
 
12
12
  ## Code of Conduct
13
13
 
package/HISTORY.md CHANGED
@@ -1,31 +1,50 @@
1
- ## [4.0.3](https://github.com/hexonet/semantic-release-whmcs/compare/v4.0.2...v4.0.3) (2022-08-09)
1
+ # [5.0.0](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v4.0.4...v5.0.0) (2023-01-18)
2
+
3
+
4
+ ### chore
5
+
6
+ * **node:** Refactored SemanticRelease to make it compatible with ESM ([f5a3640](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/f5a36404e978d072f60497787074301d34255633))
7
+
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ * **node:** Ported to ESM
12
+
13
+ ## [4.0.4](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v4.0.3...v4.0.4) (2023-01-04)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **conditions:** verifies required env variables before publish step ([5ed84c9](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/5ed84c9b84dcb031d0784f1e0b786b2fefcb87e8))
19
+
20
+ ## [4.0.3](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v4.0.2...v4.0.3) (2022-08-09)
2
21
 
3
22
 
4
23
  ### Bug Fixes
5
24
 
6
- * **with_head:** env var renamed to PUPPETEER_HEADLESS, code reviewed/patched ([5278c61](https://github.com/hexonet/semantic-release-whmcs/commit/5278c618ec6e515651319f235e4a78d6dbd2597c))
25
+ * **with_head:** env var renamed to PUPPETEER_HEADLESS, code reviewed/patched ([5278c61](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/5278c618ec6e515651319f235e4a78d6dbd2597c))
7
26
 
8
- ## [4.0.2](https://github.com/hexonet/semantic-release-whmcs/compare/v4.0.1...v4.0.2) (2022-06-29)
27
+ ## [4.0.2](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v4.0.1...v4.0.2) (2022-06-29)
9
28
 
10
29
 
11
30
  ### Bug Fixes
12
31
 
13
- * **ci:** introduce WITH_HEAD env parameter ([7f28751](https://github.com/hexonet/semantic-release-whmcs/commit/7f287516e2b7e518ab467a5ef4cf0e0bba1482ba))
14
- * **ci:** run tests with debug ([94e9a0e](https://github.com/hexonet/semantic-release-whmcs/commit/94e9a0e1efee3fda9baa030e85ffbf6fc15bcecf))
32
+ * **ci:** introduce WITH_HEAD env parameter ([7f28751](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/7f287516e2b7e518ab467a5ef4cf0e0bba1482ba))
33
+ * **ci:** run tests with debug ([94e9a0e](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/94e9a0e1efee3fda9baa030e85ffbf6fc15bcecf))
15
34
 
16
- ## [4.0.1](https://github.com/hexonet/semantic-release-whmcs/compare/v4.0.0...v4.0.1) (2022-06-14)
35
+ ## [4.0.1](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v4.0.0...v4.0.1) (2022-06-14)
17
36
 
18
37
 
19
38
  ### Bug Fixes
20
39
 
21
- * **semantic-release:** include package-lock.json in version commit ([3adb404](https://github.com/hexonet/semantic-release-whmcs/commit/3adb4047fb0b0691124a2f11ed2931adffd6f1bf))
40
+ * **semantic-release:** include package-lock.json in version commit ([3adb404](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/3adb4047fb0b0691124a2f11ed2931adffd6f1bf))
22
41
 
23
- # [4.0.0](https://github.com/hexonet/semantic-release-whmcs/compare/v3.1.3...v4.0.0) (2022-06-08)
42
+ # [4.0.0](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v3.1.3...v4.0.0) (2022-06-08)
24
43
 
25
44
 
26
45
  ### chore
27
46
 
28
- * bump semantic-release from 18.0.1 to 19.0.2 ([cd94520](https://github.com/hexonet/semantic-release-whmcs/commit/cd94520c1bf99e92f762b1521137b0bd4c57d9e7))
47
+ * bump semantic-release from 18.0.1 to 19.0.2 ([cd94520](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/cd94520c1bf99e92f762b1521137b0bd4c57d9e7))
29
48
 
30
49
 
31
50
  ### BREAKING CHANGES
@@ -36,180 +55,180 @@ Bumps [semantic-release](https://github.com/semantic-release/semantic-release) f
36
55
  - [Release notes](https://github.com/semantic-release/semantic-release/releases)
37
56
  - [Commits](https://github.com/semantic-release/semantic-release/compare/v18.0.1...v19.0.2)
38
57
 
39
- ## [3.1.3](https://github.com/hexonet/semantic-release-whmcs/compare/v3.1.2...v3.1.3) (2022-06-08)
58
+ ## [3.1.3](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v3.1.2...v3.1.3) (2022-06-08)
40
59
 
41
60
 
42
61
  ### Bug Fixes
43
62
 
44
- * **regexp:** fixing redos possibility ([53060bd](https://github.com/hexonet/semantic-release-whmcs/commit/53060bd2bb0df52dfd80aa5cd938d69a3d5f6d42))
63
+ * **regexp:** fixing redos possibility ([53060bd](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/53060bd2bb0df52dfd80aa5cd938d69a3d5f6d42))
45
64
 
46
- ## [3.1.2](https://github.com/hexonet/semantic-release-whmcs/compare/v3.1.1...v3.1.2) (2022-06-08)
65
+ ## [3.1.2](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v3.1.1...v3.1.2) (2022-06-08)
47
66
 
48
67
 
49
68
  ### Bug Fixes
50
69
 
51
- * **regex:** polygonal regular expression used on uncontrolled data ([bcaf404](https://github.com/hexonet/semantic-release-whmcs/commit/bcaf40466a59baaf4a1fe8f55c819ef3ff325064))
52
- * **regular expression:** fixed unnecessary escape character ([5613eba](https://github.com/hexonet/semantic-release-whmcs/commit/5613eba3684060fd33c47db1dc4a82f2eb262c77))
70
+ * **regex:** polygonal regular expression used on uncontrolled data ([bcaf404](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/bcaf40466a59baaf4a1fe8f55c819ef3ff325064))
71
+ * **regular expression:** fixed unnecessary escape character ([5613eba](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/5613eba3684060fd33c47db1dc4a82f2eb262c77))
53
72
 
54
- ## [3.1.1](https://github.com/hexonet/semantic-release-whmcs/compare/v3.1.0...v3.1.1) (2021-11-09)
73
+ ## [3.1.1](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v3.1.0...v3.1.1) (2021-11-09)
55
74
 
56
75
 
57
76
  ### Performance Improvements
58
77
 
59
- * **dep bumps:** upgraded dependencies ([f54620f](https://github.com/hexonet/semantic-release-whmcs/commit/f54620f1fcdd54f62b6d43f15ef0a6e4b0e70292))
78
+ * **dep bumps:** upgraded dependencies ([f54620f](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/f54620f1fcdd54f62b6d43f15ef0a6e4b0e70292))
60
79
 
61
- # [3.1.0](https://github.com/hexonet/semantic-release-whmcs/compare/v3.0.2...v3.1.0) (2021-05-19)
80
+ # [3.1.0](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v3.0.2...v3.1.0) (2021-05-19)
62
81
 
63
82
 
64
83
  ### Bug Fixes
65
84
 
66
- * **coverage:** fixed coverage report by ignoring puppeteer browser-side code ([612403d](https://github.com/hexonet/semantic-release-whmcs/commit/612403d25f211766118ce96016967d554e976c98))
67
- * **gh_repo:** fix implementation of GH_REPO and syncVersions ([cf33e36](https://github.com/hexonet/semantic-release-whmcs/commit/cf33e36d8d26d4396642d33791bb774382c9fc28))
68
- * **gh_repo:** fix implementation of GH_REPO and syncVersions ([c4f8165](https://github.com/hexonet/semantic-release-whmcs/commit/c4f8165d0d2d1fcf3ea83680d895b35eea3abc5a))
69
- * **puppeteer:** ensure to hover to selector before clicking ([aad85a6](https://github.com/hexonet/semantic-release-whmcs/commit/aad85a60c42d226342d72b19ef7cf86d2ad2ca20))
85
+ * **coverage:** fixed coverage report by ignoring puppeteer browser-side code ([612403d](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/612403d25f211766118ce96016967d554e976c98))
86
+ * **gh_repo:** fix implementation of GH_REPO and syncVersions ([cf33e36](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/cf33e36d8d26d4396642d33791bb774382c9fc28))
87
+ * **gh_repo:** fix implementation of GH_REPO and syncVersions ([c4f8165](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/c4f8165d0d2d1fcf3ea83680d895b35eea3abc5a))
88
+ * **puppeteer:** ensure to hover to selector before clicking ([aad85a6](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/aad85a60c42d226342d72b19ef7cf86d2ad2ca20))
70
89
 
71
90
 
72
91
  ### Features
73
92
 
74
- * **log:** improve logging ([5573b6a](https://github.com/hexonet/semantic-release-whmcs/commit/5573b6a255ef755e67fcacbe33fdeacc232e4b15))
93
+ * **log:** improve logging ([5573b6a](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/5573b6a255ef755e67fcacbe33fdeacc232e4b15))
75
94
 
76
- ## [3.0.2](https://github.com/hexonet/semantic-release-whmcs/compare/v3.0.1...v3.0.2) (2021-04-28)
95
+ ## [3.0.2](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v3.0.1...v3.0.2) (2021-04-28)
77
96
 
78
97
 
79
98
  ### Bug Fixes
80
99
 
81
- * bump puppeteer from 8.0.0 to 9.0.0 ([577a3fc](https://github.com/hexonet/semantic-release-whmcs/commit/577a3fc1b264eb0da5b24a083bb086fbc74ce023))
100
+ * bump puppeteer from 8.0.0 to 9.0.0 ([577a3fc](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/577a3fc1b264eb0da5b24a083bb086fbc74ce023))
82
101
 
83
- ## [3.0.1](https://github.com/hexonet/semantic-release-whmcs/compare/v3.0.0...v3.0.1) (2021-03-01)
102
+ ## [3.0.1](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v3.0.0...v3.0.1) (2021-03-01)
84
103
 
85
104
 
86
105
  ### Bug Fixes
87
106
 
88
- * bump puppeteer from 7.1.0 to 8.0.0 ([ea82a37](https://github.com/hexonet/semantic-release-whmcs/commit/ea82a3766996d42a56b7e332b7e29a19d2198380))
107
+ * bump puppeteer from 7.1.0 to 8.0.0 ([ea82a37](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/ea82a3766996d42a56b7e332b7e29a19d2198380))
89
108
 
90
- # [3.0.0](https://github.com/hexonet/semantic-release-whmcs/compare/v2.0.2...v3.0.0) (2021-02-19)
109
+ # [3.0.0](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v2.0.2...v3.0.0) (2021-02-19)
91
110
 
92
111
 
93
112
  ### Features
94
113
 
95
- * **compatibility:** implement setting compatible whmcs versions ([905b61a](https://github.com/hexonet/semantic-release-whmcs/commit/905b61a984f718b2a490c21e99550b3a8a307859))
96
- * **versions:** implement adding missing github versions in whmcs marketplace ([4308538](https://github.com/hexonet/semantic-release-whmcs/commit/43085387daf6db5c5266ded8df5c2b4df1d9e7c1))
97
- * **versions:** implement deleting specific versions from whmcs marketplace ([b73d3f5](https://github.com/hexonet/semantic-release-whmcs/commit/b73d3f59c2d1feb7a877de06a1259298f48ea7ae))
114
+ * **compatibility:** implement setting compatible whmcs versions ([905b61a](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/905b61a984f718b2a490c21e99550b3a8a307859))
115
+ * **versions:** implement adding missing github versions in whmcs marketplace ([4308538](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/43085387daf6db5c5266ded8df5c2b4df1d9e7c1))
116
+ * **versions:** implement deleting specific versions from whmcs marketplace ([b73d3f5](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/b73d3f59c2d1feb7a877de06a1259298f48ea7ae))
98
117
 
99
118
 
100
119
  ### BREAKING CHANGES
101
120
 
102
121
  * **versions:** introduced new environment variables
103
122
 
104
- ## [2.0.2](https://github.com/hexonet/semantic-release-whmcs/compare/v2.0.1...v2.0.2) (2021-01-19)
123
+ ## [2.0.2](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v2.0.1...v2.0.2) (2021-01-19)
105
124
 
106
125
 
107
126
  ### Bug Fixes
108
127
 
109
- * **ci:** extend logging; exclude coverage from tests ([40b0a70](https://github.com/hexonet/semantic-release-whmcs/commit/40b0a702e271c9420cfc9faef59f39aa9d7d441f))
128
+ * **ci:** extend logging; exclude coverage from tests ([40b0a70](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/40b0a702e271c9420cfc9faef59f39aa9d7d441f))
110
129
 
111
- ## [2.0.1](https://github.com/hexonet/semantic-release-whmcs/compare/v2.0.0...v2.0.1) (2021-01-19)
130
+ ## [2.0.1](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v2.0.0...v2.0.1) (2021-01-19)
112
131
 
113
132
 
114
133
  ### Bug Fixes
115
134
 
116
- * **github actions:** add missing env vars ([efcac00](https://github.com/hexonet/semantic-release-whmcs/commit/efcac00abb76d8a89ed513036c5cd3396de7ddd7))
117
- * **github actions:** add missing env vars from secrets ([01b7543](https://github.com/hexonet/semantic-release-whmcs/commit/01b7543c6db00ec443d68dda6a50957f3924d667))
118
- * **github actions:** migrate from Travis CI ([0d579eb](https://github.com/hexonet/semantic-release-whmcs/commit/0d579eb9145b76f08cf0364bdce3a110a55fafb4))
135
+ * **github actions:** add missing env vars ([efcac00](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/efcac00abb76d8a89ed513036c5cd3396de7ddd7))
136
+ * **github actions:** add missing env vars from secrets ([01b7543](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/01b7543c6db00ec443d68dda6a50957f3924d667))
137
+ * **github actions:** migrate from Travis CI ([0d579eb](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/0d579eb9145b76f08cf0364bdce3a110a55fafb4))
119
138
 
120
- # [2.0.0](https://github.com/hexonet/semantic-release-whmcs/compare/v1.0.11...v2.0.0) (2021-01-13)
139
+ # [2.0.0](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v1.0.11...v2.0.0) (2021-01-13)
121
140
 
122
141
 
123
142
  ### Features
124
143
 
125
- * **adding new version:** automation fixed. tests reviewed/fixed. performance highly improved ([4b75872](https://github.com/hexonet/semantic-release-whmcs/commit/4b75872fa0c7df7185375fceabb5fc9ee238111f))
144
+ * **adding new version:** automation fixed. tests reviewed/fixed. performance highly improved ([4b75872](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/4b75872fa0c7df7185375fceabb5fc9ee238111f))
126
145
 
127
146
 
128
147
  ### BREAKING CHANGES
129
148
 
130
149
  * **adding new version:** markdown links are automatically stripped.
131
150
 
132
- ## [1.0.11](https://github.com/hexonet/semantic-release-whmcs/compare/v1.0.10...v1.0.11) (2020-10-28)
151
+ ## [1.0.11](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v1.0.10...v1.0.11) (2020-10-28)
133
152
 
134
153
 
135
154
  ### Bug Fixes
136
155
 
137
- * **dep-bump:** upgrade dependencies and review package.json ([c984270](https://github.com/hexonet/semantic-release-whmcs/commit/c984270ac9618f9637f9f3517a58a8f99412a463))
156
+ * **dep-bump:** upgrade dependencies and review package.json ([c984270](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/c984270ac9618f9637f9f3517a58a8f99412a463))
138
157
 
139
- ## [1.0.10](https://github.com/hexonet/semantic-release-whmcs/compare/v1.0.9...v1.0.10) (2020-10-28)
158
+ ## [1.0.10](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v1.0.9...v1.0.10) (2020-10-28)
140
159
 
141
160
 
142
161
  ### Bug Fixes
143
162
 
144
- * **dep-bump:** bump dependency versions (eslint-config-standard) and reviewed code ([c1967d7](https://github.com/hexonet/semantic-release-whmcs/commit/c1967d779c1a723bbf2b3cc83375694ba9a2e097))
163
+ * **dep-bump:** bump dependency versions (eslint-config-standard) and reviewed code ([c1967d7](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/c1967d779c1a723bbf2b3cc83375694ba9a2e097))
145
164
 
146
- ## [1.0.9](https://github.com/hexonet/semantic-release-whmcs/compare/v1.0.8...v1.0.9) (2020-01-20)
165
+ ## [1.0.9](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v1.0.8...v1.0.9) (2020-01-20)
147
166
 
148
167
 
149
168
  ### Bug Fixes
150
169
 
151
- * **ava:** use of esm module to support es modules ([bb17269](https://github.com/hexonet/semantic-release-whmcs/commit/bb172697c466aabf948af05305feaf112a4ecbdc))
170
+ * **ava:** use of esm module to support es modules ([bb17269](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/bb172697c466aabf948af05305feaf112a4ecbdc))
152
171
 
153
- ## [1.0.8](https://github.com/hexonet/semantic-release-whmcs/compare/v1.0.7...v1.0.8) (2019-09-17)
172
+ ## [1.0.8](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v1.0.7...v1.0.8) (2019-09-17)
154
173
 
155
174
 
156
175
  ### Bug Fixes
157
176
 
158
- * **npm:** remove dependencies already included in semantic-release itself ([e0d5735](https://github.com/hexonet/semantic-release-whmcs/commit/e0d5735))
177
+ * **npm:** remove dependencies already included in semantic-release itself ([e0d5735](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/e0d5735))
159
178
 
160
- ## [1.0.7](https://github.com/hexonet/semantic-release-whmcs/compare/v1.0.6...v1.0.7) (2019-09-17)
179
+ ## [1.0.7](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v1.0.6...v1.0.7) (2019-09-17)
161
180
 
162
181
 
163
182
  ### Bug Fixes
164
183
 
165
- * **publish:** use nextRelease.version instead of nextRelease.gitTag ([c14b843](https://github.com/hexonet/semantic-release-whmcs/commit/c14b843))
184
+ * **publish:** use nextRelease.version instead of nextRelease.gitTag ([c14b843](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/c14b843))
166
185
 
167
- ## [1.0.6](https://github.com/hexonet/semantic-release-whmcs/compare/v1.0.5...v1.0.6) (2019-09-17)
186
+ ## [1.0.6](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v1.0.5...v1.0.6) (2019-09-17)
168
187
 
169
188
 
170
189
  ### Bug Fixes
171
190
 
172
- * **package.json:** configure publishConfig ([bbb71d3](https://github.com/hexonet/semantic-release-whmcs/commit/bbb71d3))
173
- * **release process:** review semantic-release configuration ([d03ff7c](https://github.com/hexonet/semantic-release-whmcs/commit/d03ff7c))
191
+ * **package.json:** configure publishConfig ([bbb71d3](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/bbb71d3))
192
+ * **release process:** review semantic-release configuration ([d03ff7c](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/d03ff7c))
174
193
 
175
- ## [1.0.5](https://github.com/hexonet/semantic-release-whmcs/compare/v1.0.4...v1.0.5) (2019-09-17)
194
+ ## [1.0.5](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v1.0.4...v1.0.5) (2019-09-17)
176
195
 
177
196
 
178
197
  ### Bug Fixes
179
198
 
180
- * **package name:** changed at the npm registry ([265f2c6](https://github.com/hexonet/semantic-release-whmcs/commit/265f2c6))
199
+ * **package name:** changed at the npm registry ([265f2c6](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/265f2c6))
181
200
 
182
- ## [1.0.4](https://github.com/hexonet/semantic-release-whmcs/compare/v1.0.3...v1.0.4) (2019-09-13)
201
+ ## [1.0.4](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v1.0.3...v1.0.4) (2019-09-13)
183
202
 
184
203
 
185
204
  ### Bug Fixes
186
205
 
187
- * **publish:** fix version number, review return value ([9bfe9ad](https://github.com/hexonet/semantic-release-whmcs/commit/9bfe9ad))
206
+ * **publish:** fix version number, review return value ([9bfe9ad](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/9bfe9ad))
188
207
 
189
- ## [1.0.3](https://github.com/hexonet/semantic-release-whmcs/compare/v1.0.2...v1.0.3) (2019-09-12)
208
+ ## [1.0.3](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v1.0.2...v1.0.3) (2019-09-12)
190
209
 
191
210
 
192
211
  ### Bug Fixes
193
212
 
194
- * **publish:** review step to return false in error case ([360f787](https://github.com/hexonet/semantic-release-whmcs/commit/360f787))
213
+ * **publish:** review step to return false in error case ([360f787](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/360f787))
195
214
 
196
- ## [1.0.2](https://github.com/hexonet/semantic-release-whmcs/compare/v1.0.1...v1.0.2) (2019-09-12)
215
+ ## [1.0.2](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v1.0.1...v1.0.2) (2019-09-12)
197
216
 
198
217
 
199
218
  ### Bug Fixes
200
219
 
201
- * **publish:** review publish step to return an object ([8f193d4](https://github.com/hexonet/semantic-release-whmcs/commit/8f193d4))
220
+ * **publish:** review publish step to return an object ([8f193d4](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/8f193d4))
202
221
 
203
- ## [1.0.1](https://github.com/hexonet/semantic-release-whmcs/compare/v1.0.0...v1.0.1) (2019-09-12)
222
+ ## [1.0.1](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v1.0.0...v1.0.1) (2019-09-12)
204
223
 
205
224
 
206
225
  ### Bug Fixes
207
226
 
208
- * **npm:** add missing puppeteer dependency ([ea8b648](https://github.com/hexonet/semantic-release-whmcs/commit/ea8b648))
227
+ * **npm:** add missing puppeteer dependency ([ea8b648](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/ea8b648))
209
228
 
210
229
  # 1.0.0 (2019-09-12)
211
230
 
212
231
 
213
232
  ### Features
214
233
 
215
- * **pkg:** initial version ([89ce53c](https://github.com/hexonet/semantic-release-whmcs/commit/89ce53c))
234
+ * **pkg:** initial version ([89ce53c](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/89ce53c))
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm version](https://img.shields.io/npm/v/semantic-release-whmcs.svg?style=flat)](https://www.npmjs.com/package/semantic-release-whmcs)
4
4
  [![node](https://img.shields.io/node/v/semantic-release-whmcs.svg)](https://www.npmjs.com/package/semantic-release-whmcs)
5
5
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
6
- [![Build Status](https://github.com/hexonet/semantic-release-whmcs/workflows/Release/badge.svg?branch=master)](https://github.com/hexonet/semantic-release-whmcs/workflows/Release/badge.svg?branch=master)
6
+ [![Build Status](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/workflows/Release/badge.svg?branch=master)](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/workflows/Release/badge.svg?branch=master)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
8
8
  [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/hexonet/node-sdk/blob/master/CONTRIBUTING.md)
9
9
 
@@ -17,8 +17,8 @@
17
17
  ## Resources
18
18
 
19
19
  * [Usage Guide](#usage-guide)
20
- * [Release Notes](https://github.com/hexonet/semantic-release-whmcs/releases)
21
- * [Development Guide](https://github.com/hexonet/semantic-release-whmcs/wiki/Development-Guide)
20
+ * [Release Notes](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/releases)
21
+ * [Development Guide](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/wiki/Development-Guide)
22
22
 
23
23
  ## Usage Guide
24
24
 
@@ -85,7 +85,7 @@ Type `./whmcs.js --help` for command reference
85
85
 
86
86
  ## Contributing
87
87
 
88
- Please read [Contribution Guide Lines](https://github.com/hexonet/semantic-release-whmcs/blob/master/CONTRIBUTING.md) for details on our code of conduct, then address a PR to us.
88
+ Please read [Contribution Guide Lines](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/blob/master/CONTRIBUTING.md) for details on our code of conduct, then address a PR to us.
89
89
  Contributors are highly welcome.
90
90
 
91
91
  ## Authors
@@ -95,6 +95,6 @@ Contributors are highly welcome.
95
95
 
96
96
  ## License
97
97
 
98
- This project is licensed under the MIT License - see the [LICENSE](https://github.com/hexonet/semantic-release-whmcs/blob/master/LICENSE) file for details.
98
+ This project is licensed under the MIT License - see the [LICENSE](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/blob/master/LICENSE) file for details.
99
99
 
100
100
  [HEXONET GmbH](https://hexonet.net)
package/index.js CHANGED
@@ -1,21 +1,21 @@
1
- const verifyWHMCS = require('./lib/verify')
2
- const publishWHMCS = require('./lib/publish')
3
- const deleteVersion = require('./lib/delete-marketplace-version')
4
- const setCompatibleVersions = require('./lib/set-compatible-versions')
5
- const githubReleases = require('./lib/get-github-releases.js')
6
- const marketplaceVersions = require('./lib/scrape-marketplace-versions.js')
1
+ import verifyWHMCS from "./lib/verify.js";
2
+ import publishWHMCS from "./lib/publish.js";
3
+ import deleteVersion from "./lib/delete-marketplace-version.js";
4
+ import setCompatibleVersions from "./lib/set-compatible-versions.js";
5
+ import githubReleases from "./lib/get-github-releases.js";
6
+ import marketplaceVersions from "./lib/scrape-marketplace-versions.js";
7
7
 
8
- let verified
8
+ let verified;
9
9
 
10
10
  /**
11
11
  * Called by semantic-release during the verify step
12
12
  * @param {*} pluginConfig The semantic-release plugin config
13
13
  * @param {*} context The context provided by semantic-release
14
14
  */
15
- async function verifyConditions (pluginConfig, context) {
15
+ async function verifyConditions(pluginConfig, context) {
16
16
  if (!verified) {
17
- await verifyWHMCS(pluginConfig, context)
18
- verified = true
17
+ await verifyWHMCS(pluginConfig, context);
18
+ verified = true;
19
19
  }
20
20
  }
21
21
 
@@ -24,46 +24,52 @@ async function verifyConditions (pluginConfig, context) {
24
24
  * @param {*} pluginConfig The semantic-release plugin config
25
25
  * @param {*} context The context provided by semantic-release
26
26
  */
27
- async function publish (pluginConfig, context) {
28
- await verifyConditions(pluginConfig, context)
29
- return publishWHMCS(pluginConfig, context)
27
+ async function publish(pluginConfig, context) {
28
+ await verifyConditions(pluginConfig, context);
29
+ return publishWHMCS(pluginConfig, context);
30
30
  }
31
31
 
32
- async function syncVersions (pluginConfig, context) {
33
- await verifyConditions(pluginConfig, context)
34
- const releases = await githubReleases(pluginConfig, context)
32
+ async function syncVersions(pluginConfig, context) {
33
+ await verifyConditions(pluginConfig, context);
34
+ const releases = await githubReleases(pluginConfig, context);
35
35
 
36
36
  if (releases && releases.length) {
37
- const versions = await marketplaceVersions(pluginConfig, context)
37
+ const versions = await marketplaceVersions(pluginConfig, context);
38
38
  for (const release of releases) {
39
39
  if (!versions.includes(release.name.substring(1))) {
40
40
  context.nextRelease = {
41
41
  version: release.name.substring(1),
42
42
  notes: release.body,
43
- releaseDate: release.published_at
44
- }
45
- console.log(`Adding missing version ${context.nextRelease.version}`)
46
- await publish(pluginConfig, context)
43
+ releaseDate: release.published_at,
44
+ };
45
+ console.log(`Adding missing version ${context.nextRelease.version}`);
46
+ await publish(pluginConfig, context);
47
47
  }
48
48
  }
49
49
  }
50
50
  }
51
51
 
52
- async function delVersion (pluginConfig, context) {
53
- await verifyConditions(pluginConfig, context)
54
- await deleteVersion(pluginConfig, context)
52
+ async function delVersion(pluginConfig, context) {
53
+ await verifyConditions(pluginConfig, context);
54
+ await deleteVersion(pluginConfig, context);
55
55
  }
56
56
 
57
- async function updateCompatibility (pluginConfig, context) {
58
- await verifyConditions(pluginConfig, context)
59
- await setCompatibleVersions(pluginConfig, context)
57
+ async function updateCompatibility(pluginConfig, context) {
58
+ await verifyConditions(pluginConfig, context);
59
+ await setCompatibleVersions(pluginConfig, context);
60
60
  }
61
61
 
62
- module.exports = {
62
+ async function fail(pluginConfig, context) {
63
+ await verifyConditions(pluginConfig, context);
64
+ }
65
+
66
+ export default {
67
+ verifyConditions,
63
68
  publish,
69
+ fail,
64
70
  syncVersions,
65
71
  delVersion,
66
72
  githubReleases,
67
73
  marketplaceVersions,
68
- updateCompatibility
69
- }
74
+ updateCompatibility,
75
+ };
@@ -1,17 +1,30 @@
1
- module.exports = {
2
- EWHMCSNOCREDENTIALS: () => ({
3
- message: 'No WHMCS Marketplace credentials specified.',
1
+ export function ENOGHTOKEN() {
2
+ return {
3
+ message: "No Github Token specified.",
4
+ details: "Please create a `GH_TOKEN` in repository secrets.",
5
+ };
6
+ }
7
+
8
+ export function EWHMCSNOCREDENTIALS() {
9
+ return {
10
+ message: "No WHMCS Marketplace credentials specified.",
4
11
  details:
5
- 'WHMCS Marketplace credentails have to be set in the `WHMCS_LOGIN` and `WHMCS_PASSWORD` environment variables on your CI environment.'
6
- }),
7
- EWHMCSNOPRODUCTID: () => ({
8
- message: 'No WHMCS Marketplace Product ID specified.',
12
+ "WHMCS Marketplace credentails have to be set in the `WHMCS_LOGIN` and `WHMCS_PASSWORD` environment variables on your CI environment.",
13
+ };
14
+ }
15
+
16
+ export function EWHMCSNOPRODUCTID() {
17
+ return {
18
+ message: "No WHMCS Marketplace Product ID specified.",
9
19
  details:
10
- "The product id of your listed product at the WHMCS Marketplace has to be set in the `WHMCS_PRODUCTID` environment variable on your CI environment. You'll find that number in url when visiting the product page in WHMCS Marketplace."
11
- }),
12
- EWHMCSINVALIDPRODUCTID: () => ({
13
- message: 'Invalid WHMCS Marketplace Product ID specified.',
20
+ "The product id of your listed product at the WHMCS Marketplace has to be set in the `WHMCS_PRODUCTID` environment variable on your CI environment. You'll find that number in url when visiting the product page in WHMCS Marketplace.",
21
+ };
22
+ }
23
+
24
+ export function EWHMCSINVALIDPRODUCTID() {
25
+ return {
26
+ message: "Invalid WHMCS Marketplace Product ID specified.",
14
27
  details:
15
- "The product id of your listed product at the WHMCS Marketplace has to be set in the `WHMCS_PRODUCTID` environment variable on your CI environment. You'll find that number in url when visiting the product page in WHMCS Marketplace."
16
- })
28
+ "The product id of your listed product at the WHMCS Marketplace has to be set in the `WHMCS_PRODUCTID` environment variable on your CI environment. You'll find that number in url when visiting the product page in WHMCS Marketplace.",
29
+ };
17
30
  }