@hedia/recommendation-screen 2.1.21-alpha.8 → 2.1.21

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 (53) hide show
  1. package/.github/workflows/on-open-pr-publish-alpha.yaml +11 -72
  2. package/.github/workflows/on-post-merge-publish-package.yaml +7 -29
  3. package/.github/workflows/on-push-commit-bump-and-publish-alpha.yaml +11 -84
  4. package/package.json +1 -2
  5. package/.github/workflows/ci.yml +0 -32
  6. package/coverage/clover.xml +0 -716
  7. package/coverage/coverage-final.json +0 -28
  8. package/coverage/lcov-report/base.css +0 -224
  9. package/coverage/lcov-report/block-navigation.js +0 -79
  10. package/coverage/lcov-report/favicon.png +0 -0
  11. package/coverage/lcov-report/index.html +0 -201
  12. package/coverage/lcov-report/prettify.css +0 -1
  13. package/coverage/lcov-report/prettify.js +0 -2
  14. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  15. package/coverage/lcov-report/sorter.js +0 -170
  16. package/coverage/lcov-report/src/RecommendationScreen.tsx.html +0 -2483
  17. package/coverage/lcov-report/src/__tests__/index.html +0 -111
  18. package/coverage/lcov-report/src/__tests__/utils.tsx.html +0 -533
  19. package/coverage/lcov-report/src/components/Header.tsx.html +0 -356
  20. package/coverage/lcov-report/src/components/InfoBars.tsx.html +0 -518
  21. package/coverage/lcov-report/src/components/InvisibleNumberInput.tsx.html +0 -566
  22. package/coverage/lcov-report/src/components/LimitationMessage.tsx.html +0 -209
  23. package/coverage/lcov-report/src/components/LineSeparator.tsx.html +0 -161
  24. package/coverage/lcov-report/src/components/RecentInsulin.tsx.html +0 -410
  25. package/coverage/lcov-report/src/components/RecommendationModal.tsx.html +0 -923
  26. package/coverage/lcov-report/src/components/RecommendedCarbs.tsx.html +0 -1061
  27. package/coverage/lcov-report/src/components/RecommendedInsulin.tsx.html +0 -779
  28. package/coverage/lcov-report/src/components/Remeasure.tsx.html +0 -551
  29. package/coverage/lcov-report/src/components/TransferToLogbook.tsx.html +0 -443
  30. package/coverage/lcov-report/src/components/TwoOptionModal.tsx.html +0 -665
  31. package/coverage/lcov-report/src/components/activity/Activity.tsx.html +0 -371
  32. package/coverage/lcov-report/src/components/activity/ActivityIcon.tsx.html +0 -281
  33. package/coverage/lcov-report/src/components/activity/ActivityIntensity.tsx.html +0 -281
  34. package/coverage/lcov-report/src/components/activity/index.html +0 -141
  35. package/coverage/lcov-report/src/components/index.html +0 -276
  36. package/coverage/lcov-report/src/components/mood/Emotion.tsx.html +0 -353
  37. package/coverage/lcov-report/src/components/mood/MoodIcon.tsx.html +0 -335
  38. package/coverage/lcov-report/src/components/mood/index.html +0 -126
  39. package/coverage/lcov-report/src/index.html +0 -111
  40. package/coverage/lcov-report/src/locale/i18nUtils.ts.html +0 -206
  41. package/coverage/lcov-report/src/locale/index.html +0 -111
  42. package/coverage/lcov-report/src/utils/AttentionMessages.tsx.html +0 -554
  43. package/coverage/lcov-report/src/utils/Constants.ts.html +0 -248
  44. package/coverage/lcov-report/src/utils/RecommendationError.tsx.html +0 -620
  45. package/coverage/lcov-report/src/utils/RecommendationUtils.ts.html +0 -764
  46. package/coverage/lcov-report/src/utils/Translations.ts.html +0 -131
  47. package/coverage/lcov-report/src/utils/Utils.ts.html +0 -545
  48. package/coverage/lcov-report/src/utils/Validations.ts.html +0 -1544
  49. package/coverage/lcov-report/src/utils/index.html +0 -201
  50. package/coverage/lcov.info +0 -1611
  51. package/on-open-pr-bump-alpha-release.sh +0 -8
  52. package/on-push-commit-bump-alpha.sh +0 -8
  53. package/remove-alpha-tag.sh +0 -19
@@ -39,82 +39,21 @@ jobs:
39
39
  with:
40
40
  node-version: ${{ matrix.node-version }}
41
41
 
42
- - name: Register NPM access token
43
- run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
44
- env:
45
- NPM_TOKEN: ${{ env.NPM_TOKEN }}
46
-
47
- - name: ci
48
- run: npm ci --ignore-scripts
49
-
50
- - name: lint
51
- run: npm run lint
52
-
53
- - name: lint-pkg
54
- run: npm run lint-pkg
55
-
56
- - name: prettier
57
- run: npm run prettier
58
-
59
- - name: test
60
- run: npm run test-coverage
61
-
62
- - name: tsc
63
- run: npm run tsc
64
-
65
42
  - name: Set identity
66
43
  run: |
67
44
  git config --global user.email "ci@hedia.co"
68
45
  git config --global user.name "Hedia CI Bot"
69
46
 
70
- - name: Amend [major] to Latest Commit
71
- if: "contains(github.event.pull_request.labels.*.name, 'Major')"
72
- run: |
73
- npm version premajor --preid alpha
74
-
75
- - name: Amend [minor] to Latest Commit
76
- if: "!contains(github.event.pull_request.labels.*.name, 'Major') && contains(github.event.pull_request.labels.*.name, 'Minor')"
77
- run: |
78
- npm version preminor --preid alpha
79
-
80
- - name: Amend [patch] to Latest Commit
81
- if: "!contains(github.event.pull_request.labels.*.name, 'Major') && !contains(github.event.pull_request.labels.*.name, 'Minor')"
82
- run: |
83
- npm version prepatch --preid alpha
84
-
85
- - name: Bump alpha version
86
- run: |
87
- chmod +x ./on-open-pr-bump-alpha-release.sh && ./on-open-pr-bump-alpha-release.sh
88
-
89
- - name: Publish alpha version
90
- id: publish-alpha
91
- uses: JS-DevTools/npm-publish@v1
92
- with:
93
- token: ${{ env.NPM_TOKEN }}
94
- tag: alpha
95
-
96
- - name: Check if version exists
97
- if: steps.publish-alpha.outputs.type == 'none'
98
- run: |
99
- echo "Package JSON version is already published, please bump the version!"
100
- exit 1
101
-
102
- - name: Remove alpha tag
103
- run: |
104
- chmod +x ./remove-alpha-tag.sh && ./remove-alpha-tag.sh
105
- git push
106
-
107
- - name: Remove old comment from PR
108
- uses: izhangzhihao/delete-comment@master
109
- with:
110
- github_token: ${{ secrets.GITHUB_TOKEN }}
111
- delete_user_name: github-actions[bot]
112
- issue_number: ${{ github.event.number }} # remove comments from the current PR
113
-
114
- - name: Write comment on PR
115
- uses: peter-evans/create-or-update-comment@v1
47
+ - name: Autobump & Publish
48
+ uses: hedia-team/autobump-and-publish@master
116
49
  with:
50
+ label: ${{ toJson(github.event.pull_request.labels.*.name) }}
51
+ npm-token: ${{ env.NPM_TOKEN }}
117
52
  issue-number: ${{ github.event.number }}
118
- body: |
119
- 🎉 Successfully released alpha version 🎉
120
- ✅ ${{ steps.publish-alpha.outputs.version }}
53
+ github-token: ${{ secrets.GITHUB_TOKEN }}
54
+ run-ci: true
55
+ run-lint: true
56
+ run-lint-pkg: true
57
+ run-prettier: true
58
+ run-test-coverage: true
59
+ run-tsc: true
@@ -25,34 +25,12 @@ jobs:
25
25
  with:
26
26
  node-version: ${{ matrix.node-version }}
27
27
 
28
- - name: tsc
29
- run: npm run tsc
30
-
31
- - name: Publish package
32
- id: publish-package
33
- uses: JS-DevTools/npm-publish@v1
34
- with:
35
- token: ${{ env.NPM_TOKEN }}
36
-
37
- - name: Check if version exists
38
- if: steps.publish-package.outputs.type == 'none'
39
- run: |
40
- echo "Package JSON version is already published, please bump the version!"
41
- exit 1
42
-
43
- - name: Remove old comment from PR
44
- if: steps.publish-package.outputs.type != 'none'
45
- uses: izhangzhihao/delete-comment@master
46
- with:
47
- github_token: ${{ secrets.GITHUB_TOKEN }}
48
- delete_user_name: github-actions[bot]
49
- issue_number: ${{ github.event.number }} # remove comments from the current PR
50
-
51
- - name: Write comment on PR
52
- if: steps.publish-package.outputs.type != 'none'
53
- uses: peter-evans/create-or-update-comment@v1
28
+ - name: Publish
29
+ uses: hedia-team/autobump-and-publish@master
54
30
  with:
31
+ npm-token: ${{ env.NPM_TOKEN }}
55
32
  issue-number: ${{ github.event.number }}
56
- body: |
57
- 🎉 Successfully released package 🎉
58
- ✅ ${{ steps.publish-package.outputs.version }}
33
+ github-token: ${{ secrets.GITHUB_TOKEN }}
34
+ is-post-merge: true
35
+ run-ci: true
36
+ run-tsc: true
@@ -13,11 +13,6 @@ jobs:
13
13
  on-push-commit-bump-and-publish-alpha:
14
14
  runs-on: ubuntu-latest
15
15
 
16
- outputs:
17
- type: ${{ steps.publish-alpha.outputs.type }}
18
- version: ${{ steps.publish-alpha.outputs.version }}
19
- skip: ${{ env.CI_SKIP }}
20
-
21
16
  strategy:
22
17
  matrix:
23
18
  node-version: [14.15]
@@ -38,91 +33,23 @@ jobs:
38
33
  with:
39
34
  node-version: ${{ matrix.node-version }}
40
35
 
41
- - name: Register NPM access token
42
- run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
43
- env:
44
- NPM_TOKEN: ${{ env.NPM_TOKEN }}
45
-
46
- - name: ci
47
- if: ${{ env.CI_SKIP == 'false' }}
48
- run: npm ci --ignore-scripts
49
-
50
- - name: lint
51
- if: ${{ env.CI_SKIP == 'false' }}
52
- run: npm run lint
53
-
54
- - name: lint-pkg
55
- if: ${{ env.CI_SKIP == 'false' }}
56
- run: npm run lint-pkg
57
-
58
- - name: prettier
59
- if: ${{ env.CI_SKIP == 'false' }}
60
- run: npm run prettier
61
-
62
- - name: test
63
- if: ${{ env.CI_SKIP == 'false' }}
64
- run: npm run test-coverage
65
-
66
- - name: tsc
67
- if: ${{ env.CI_SKIP == 'false' }}
68
- run: npm run tsc
69
-
70
36
  - name: Set identity
71
37
  if: ${{ env.CI_SKIP == 'false' }}
72
38
  run: |
73
39
  git config --global user.email "ci@hedia.co"
74
40
  git config --global user.name "Hedia CI Bot"
75
41
 
76
- - name: Bump alpha version
42
+ - name: Autobump & Publish
77
43
  if: ${{ env.CI_SKIP == 'false' }}
78
- run: |
79
- chmod +x ./on-push-commit-bump-alpha.sh && ./on-push-commit-bump-alpha.sh
80
-
81
- - name: Publish alpha version
82
- if: ${{ env.CI_SKIP == 'false' }}
83
- id: publish-alpha
84
- uses: JS-DevTools/npm-publish@v1
85
- with:
86
- token: ${{ env.NPM_TOKEN }}
87
- tag: alpha
88
-
89
- - name: Check if version exists
90
- if: steps.publish-alpha.outputs.type == 'none'
91
- run: |
92
- echo "Package JSON version is already published, please bump the version!"
93
- exit 1
94
-
95
- - name: Remove alpha tag
96
- if: ${{ env.CI_SKIP == 'false' }}
97
- run: |
98
- chmod +x ./remove-alpha-tag.sh && ./remove-alpha-tag.sh
99
- git push
100
-
101
- after-publish:
102
- runs-on: ubuntu-latest
103
- needs: [on-push-commit-bump-and-publish-alpha]
104
- if: needs.on-push-commit-bump-and-publish-alpha.outputs.skip == 'false'
105
-
106
- strategy:
107
- matrix:
108
- node-version: [14.15]
109
-
110
- steps:
111
- - uses: actions/checkout@v2
112
- with:
113
- ref: ${{ github.event.pull_request.head.ref }}
114
-
115
- - name: Remove old comment from PR
116
- uses: izhangzhihao/delete-comment@master
117
- with:
118
- github_token: ${{ secrets.GITHUB_TOKEN }}
119
- delete_user_name: github-actions[bot]
120
- issue_number: ${{ github.event.number }} # remove comments from the current PR
121
-
122
- - name: Write comment on PR
123
- uses: peter-evans/create-or-update-comment@v1
44
+ uses: hedia-team/autobump-and-publish@master
124
45
  with:
46
+ label: ${{ toJson(github.event.pull_request.labels.*.name) }}
47
+ npm-token: ${{ env.NPM_TOKEN }}
125
48
  issue-number: ${{ github.event.number }}
126
- body: |
127
- 🎉 Successfully released alpha version 🎉
128
- ✅ ${{ needs.on-push-commit-bump-and-publish-alpha.outputs.version }}
49
+ github-token: ${{ secrets.GITHUB_TOKEN }}
50
+ run-ci: true
51
+ run-lint: true
52
+ run-lint-pkg: true
53
+ run-prettier: true
54
+ run-test-coverage: true
55
+ run-tsc: true
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/recommendation-screen",
3
- "version": "2.1.21-alpha.8",
4
- "alphaVersionCounter": "8",
3
+ "version": "2.1.21",
5
4
  "description": "Hedia Recommendation Screen for Bolus and Carbohydrates",
6
5
  "main": "index.js",
7
6
  "scripts": {
@@ -1,32 +0,0 @@
1
- name: Node.js CI
2
-
3
- on:
4
- pull_request:
5
-
6
- env:
7
- NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
8
-
9
- jobs:
10
- build:
11
- runs-on: ubuntu-latest
12
-
13
- strategy:
14
- matrix:
15
- node-version: [14.15]
16
-
17
- steps:
18
- - uses: actions/checkout@v2
19
-
20
- - name: Use Node.js ${{ matrix.node-version }}
21
- uses: actions/setup-node@v2
22
- with:
23
- node-version: ${{ matrix.node-version }}
24
-
25
- - name: Register NPM access token
26
- run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
27
- env:
28
- NPM_TOKEN: ${{ env.NPM_TOKEN }}
29
-
30
- - run: npm ci
31
- env:
32
- CI: true