@hedia/recommendation-screen 2.1.20 → 2.1.21-alpha.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 (49) hide show
  1. package/.github/workflows/ci.yml +13 -5
  2. package/.github/workflows/on-open-pr-publish-alpha.yaml +112 -0
  3. package/.github/workflows/on-post-merge-publish-package.yaml +59 -0
  4. package/.github/workflows/on-push-commit-bump-and-publish-alpha.yaml +91 -0
  5. package/coverage/clover.xml +2 -2
  6. package/coverage/lcov-report/index.html +1 -1
  7. package/coverage/lcov-report/src/RecommendationScreen.tsx.html +1 -1
  8. package/coverage/lcov-report/src/__tests__/index.html +1 -1
  9. package/coverage/lcov-report/src/__tests__/utils.tsx.html +3 -3
  10. package/coverage/lcov-report/src/components/Header.tsx.html +1 -1
  11. package/coverage/lcov-report/src/components/InfoBars.tsx.html +1 -1
  12. package/coverage/lcov-report/src/components/InvisibleNumberInput.tsx.html +1 -1
  13. package/coverage/lcov-report/src/components/LimitationMessage.tsx.html +1 -1
  14. package/coverage/lcov-report/src/components/LineSeparator.tsx.html +1 -1
  15. package/coverage/lcov-report/src/components/RecentInsulin.tsx.html +1 -1
  16. package/coverage/lcov-report/src/components/RecommendationModal.tsx.html +1 -1
  17. package/coverage/lcov-report/src/components/RecommendedCarbs.tsx.html +1 -1
  18. package/coverage/lcov-report/src/components/RecommendedInsulin.tsx.html +1 -1
  19. package/coverage/lcov-report/src/components/Remeasure.tsx.html +1 -1
  20. package/coverage/lcov-report/src/components/TransferToLogbook.tsx.html +1 -1
  21. package/coverage/lcov-report/src/components/TwoOptionModal.tsx.html +1 -1
  22. package/coverage/lcov-report/src/components/activity/Activity.tsx.html +1 -1
  23. package/coverage/lcov-report/src/components/activity/ActivityIcon.tsx.html +1 -1
  24. package/coverage/lcov-report/src/components/activity/ActivityIntensity.tsx.html +1 -1
  25. package/coverage/lcov-report/src/components/activity/index.html +1 -1
  26. package/coverage/lcov-report/src/components/index.html +1 -1
  27. package/coverage/lcov-report/src/components/mood/Emotion.tsx.html +1 -1
  28. package/coverage/lcov-report/src/components/mood/MoodIcon.tsx.html +1 -1
  29. package/coverage/lcov-report/src/components/mood/index.html +1 -1
  30. package/coverage/lcov-report/src/index.html +1 -1
  31. package/coverage/lcov-report/src/locale/i18nUtils.ts.html +1 -1
  32. package/coverage/lcov-report/src/locale/index.html +1 -1
  33. package/coverage/lcov-report/src/utils/AttentionMessages.tsx.html +1 -1
  34. package/coverage/lcov-report/src/utils/Constants.ts.html +1 -1
  35. package/coverage/lcov-report/src/utils/RecommendationError.tsx.html +1 -1
  36. package/coverage/lcov-report/src/utils/RecommendationUtils.ts.html +1 -1
  37. package/coverage/lcov-report/src/utils/Translations.ts.html +1 -1
  38. package/coverage/lcov-report/src/utils/Utils.ts.html +1 -1
  39. package/coverage/lcov-report/src/utils/Validations.ts.html +1 -1
  40. package/coverage/lcov-report/src/utils/index.html +1 -1
  41. package/on-open-pr-bump-alpha-release.sh +8 -0
  42. package/on-push-commit-bump-alpha.sh +8 -0
  43. package/package.json +4 -4
  44. package/remove-alpha-tag.sh +19 -0
  45. package/src/__tests__/utils.js +2 -2
  46. package/.github/workflows/post-merge.yaml +0 -60
  47. package/.github/workflows/publish-alpha.yaml +0 -54
  48. package/alpha-release.sh +0 -11
  49. package/pre-release.sh +0 -5
@@ -1,7 +1,10 @@
1
1
  name: Node.js CI
2
2
 
3
3
  on:
4
- pull_request:
4
+ workflow_run:
5
+ workflows: ["NPM - Version Bump & Publish Alpha", "NPM Bumper - Bump alpha version"]
6
+ types:
7
+ - completed
5
8
 
6
9
  env:
7
10
  SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
@@ -9,28 +12,33 @@ env:
9
12
 
10
13
  jobs:
11
14
  build:
15
+ if: ${{ github.event.workflow_run.conclusion == 'success' }}
12
16
 
13
17
  runs-on: ubuntu-latest
14
18
 
15
19
  strategy:
16
20
  matrix:
17
- node-version: [14.15] #[8.x, 10.x, 12.x]
21
+ node-version: [14.15]
18
22
 
19
23
  steps:
20
24
  - uses: actions/checkout@v2
25
+
21
26
  - name: Use Node.js ${{ matrix.node-version }}
22
- uses: actions/setup-node@v1.4.4
27
+ uses: actions/setup-node@v2
23
28
  with:
24
29
  node-version: ${{ matrix.node-version }}
30
+
25
31
  - name: Register ssh keys
26
- uses: webfactory/ssh-agent@v0.4.1
32
+ uses: webfactory/ssh-agent@v0.5.3
27
33
  with:
28
34
  ssh-private-key: |
29
35
  ${{ env.SSH_PRIVATE_KEY }}
36
+
30
37
  - name: Register NPM access token
31
38
  run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
32
39
  env:
33
40
  NPM_TOKEN: ${{ env.NPM_TOKEN }}
41
+
34
42
  - run: npm ci
35
43
  env:
36
- CI: true
44
+ CI: true
@@ -0,0 +1,112 @@
1
+ name: NPM - Version Bump & Publish Alpha
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - master
7
+ types: [opened]
8
+
9
+ env:
10
+ SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
11
+ NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
12
+
13
+ jobs:
14
+ on-open-pr-publish-alpha:
15
+ runs-on: ubuntu-latest
16
+
17
+ strategy:
18
+ matrix:
19
+ node-version: [14.15]
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ with:
24
+ ref: ${{ github.event.pull_request.head.ref }}
25
+
26
+ - name: Use Node.js ${{ matrix.node-version }}
27
+ uses: actions/setup-node@v2
28
+ with:
29
+ node-version: ${{ matrix.node-version }}
30
+
31
+ - name: Register ssh keys
32
+ uses: webfactory/ssh-agent@v0.5.3
33
+ with:
34
+ ssh-private-key: |
35
+ ${{ env.SSH_PRIVATE_KEY }}
36
+
37
+ - name: Register NPM access token
38
+ run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
39
+ env:
40
+ NPM_TOKEN: ${{ env.NPM_TOKEN }}
41
+
42
+ - name: Validate PR labels
43
+ uses: docker://agilepathway/pull-request-label-checker:v1.0.102
44
+ with:
45
+ one_of: major,minor,patch
46
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
47
+
48
+ - run: npm ci --ignore-scripts
49
+ - run: npm run tsc -- --noEmit
50
+ - run: npm run lint
51
+ - run: npm run prettier
52
+ - run: npm run lint-pkg
53
+ - run: npm run test
54
+
55
+ - name: Set identity
56
+ run: |
57
+ git config --global user.email "ci@hedia.co"
58
+ git config --global user.name "Hedia CI Bot"
59
+
60
+ - name: Amend [major] to Latest Commit
61
+ if: "contains(github.event.pull_request.labels.*.name, 'Major')"
62
+ run: |
63
+ npm version premajor --preid alpha
64
+
65
+ - name: Amend [minor] to Latest Commit
66
+ if: "!contains(github.event.pull_request.labels.*.name, 'Major') && contains(github.event.pull_request.labels.*.name, 'Minor')"
67
+ run: |
68
+ npm version preminor --preid alpha
69
+
70
+ - name: Amend [patch] to Latest Commit
71
+ if: "!contains(github.event.pull_request.labels.*.name, 'Major') && !contains(github.event.pull_request.labels.*.name, 'Minor')"
72
+ run: |
73
+ npm version prepatch --preid alpha
74
+
75
+ - name: Bump alpha version
76
+ run: |
77
+ chmod +x ./on-open-pr-bump-alpha-release.sh && ./on-open-pr-bump-alpha-release.sh
78
+
79
+ - name: Publish alpha version
80
+ id: publish-alpha
81
+ uses: JS-DevTools/npm-publish@v1
82
+ with:
83
+ token: ${{ env.NPM_TOKEN }}
84
+ tag: alpha
85
+
86
+ - name: Check if version exists
87
+ if: steps.publish-alpha.outputs.type == 'none'
88
+ run: |
89
+ echo "Package JSON version is already published, please bump the version!"
90
+ exit 1
91
+
92
+ - name: Remove alpha tag
93
+ run: |
94
+ chmod +x ./remove-alpha-tag.sh && ./remove-alpha-tag.sh
95
+ git push
96
+
97
+ - name: Remove old comment from PR
98
+ if: steps.publish-alpha.outputs.type != 'none'
99
+ uses: izhangzhihao/delete-comment@master
100
+ with:
101
+ github_token: ${{ secrets.GITHUB_TOKEN }}
102
+ delete_user_name: github-actions[bot]
103
+ issue_number: ${{ github.event.number }} # remove comments from the current PR
104
+
105
+ - name: Write comment on PR
106
+ if: steps.publish-alpha.outputs.type != 'none'
107
+ uses: peter-evans/create-or-update-comment@v1
108
+ with:
109
+ issue-number: ${{ github.event.number }}
110
+ body: |
111
+ 🎉 Successfully released alpha version 🎉
112
+ ✅ ${{ steps.publish-alpha.outputs.version }}
@@ -0,0 +1,59 @@
1
+ name: NPM Publish Bot - Publish package
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - master
7
+ types: [closed]
8
+
9
+ env:
10
+ SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
11
+ NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
12
+
13
+ jobs:
14
+ on-post-merge-publish-package:
15
+ if: github.event.pull_request.merged == true
16
+
17
+ runs-on: ubuntu-latest
18
+
19
+ strategy:
20
+ matrix:
21
+ node-version: [14.15]
22
+
23
+ steps:
24
+ - uses: actions/checkout@v2
25
+ - uses: actions/setup-node@v2
26
+ with:
27
+ node-version: ${{ matrix.node-version }}
28
+
29
+ - name: Register NPM access token
30
+ run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
31
+
32
+ - name: Publish package
33
+ id: publish-package
34
+ uses: JS-DevTools/npm-publish@v1
35
+ with:
36
+ token: ${{ env.NPM_TOKEN }}
37
+
38
+ - name: Check if version exists
39
+ if: steps.publish-package.outputs.type == 'none'
40
+ run: |
41
+ echo "Package JSON version is already published, please bump the version!"
42
+ exit 1
43
+
44
+ - name: Remove old comment from PR
45
+ if: steps.publish-package.outputs.type != 'none'
46
+ uses: izhangzhihao/delete-comment@master
47
+ with:
48
+ github_token: ${{ secrets.GITHUB_TOKEN }}
49
+ delete_user_name: github-actions[bot]
50
+ issue_number: ${{ github.event.number }} # remove comments from the current PR
51
+
52
+ - name: Write comment on PR
53
+ if: steps.publish-package.outputs.type != 'none'
54
+ uses: peter-evans/create-or-update-comment@v1
55
+ with:
56
+ issue-number: ${{ github.event.number }}
57
+ body: |
58
+ 🎉 Successfully released package 🎉
59
+ ✅ ${{ steps.publish-package.outputs.version }}
@@ -0,0 +1,91 @@
1
+ name: NPM Bumper - Bump alpha version
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - master
7
+ types: [synchronize]
8
+
9
+ env:
10
+ SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
11
+ NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
12
+
13
+ jobs:
14
+ on-push-commit-bump-and-publish-alpha:
15
+ runs-on: ubuntu-latest
16
+
17
+ strategy:
18
+ matrix:
19
+ node-version: [14.15]
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ with:
24
+ ref: ${{ github.event.pull_request.head.ref }}
25
+
26
+ - name: Use Node.js ${{ matrix.node-version }}
27
+ uses: actions/setup-node@v2
28
+ with:
29
+ node-version: ${{ matrix.node-version }}
30
+
31
+ - name: Register ssh keys
32
+ uses: webfactory/ssh-agent@v0.5.3
33
+ with:
34
+ ssh-private-key: |
35
+ ${{ env.SSH_PRIVATE_KEY }}
36
+
37
+ - name: Register NPM access token
38
+ run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
39
+ env:
40
+ NPM_TOKEN: ${{ env.NPM_TOKEN }}
41
+
42
+ - run: npm ci --ignore-scripts
43
+ - run: npm run tsc -- --noEmit
44
+ - run: npm run lint
45
+ - run: npm run prettier
46
+ - run: npm run lint-pkg
47
+ - run: npm run test
48
+
49
+ - name: Set identity
50
+ run: |
51
+ git config --global user.email "ci@hedia.co"
52
+ git config --global user.name "Hedia CI Bot"
53
+
54
+ - name: Bump alpha version
55
+ run: |
56
+ chmod +x ./on-push-commit-bump-alpha.sh && ./on-push-commit-bump-alpha.sh
57
+
58
+ - name: Publish alpha version
59
+ id: publish-alpha
60
+ uses: JS-DevTools/npm-publish@v1
61
+ with:
62
+ token: ${{ env.NPM_TOKEN }}
63
+ tag: alpha
64
+
65
+ - name: Check if version exists
66
+ if: steps.publish-alpha.outputs.type == 'none'
67
+ run: |
68
+ echo "Package JSON version is already published, please bump the version!"
69
+ exit 1
70
+
71
+ - name: Remove alpha tag
72
+ run: |
73
+ chmod +x ./remove-alpha-tag.sh && ./remove-alpha-tag.sh
74
+ git push
75
+
76
+ - name: Remove old comment from PR
77
+ if: steps.publish-alpha.outputs.type != 'none'
78
+ uses: izhangzhihao/delete-comment@master
79
+ with:
80
+ github_token: ${{ secrets.GITHUB_TOKEN }}
81
+ delete_user_name: github-actions[bot]
82
+ issue_number: ${{ github.event.number }} # remove comments from the current PR
83
+
84
+ - name: Write comment on PR
85
+ if: steps.publish-alpha.outputs.type != 'none'
86
+ uses: peter-evans/create-or-update-comment@v1
87
+ with:
88
+ issue-number: ${{ github.event.number }}
89
+ body: |
90
+ 🎉 Successfully released alpha version 🎉
91
+ ✅ ${{ steps.publish-alpha.outputs.version }}
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1631010564929" clover="3.2.0">
3
- <project timestamp="1631010564930" name="All files">
2
+ <coverage generated="1630424277114" clover="3.2.0">
3
+ <project timestamp="1630424277114" name="All files">
4
4
  <metrics statements="608" coveredstatements="608" conditionals="366" coveredconditionals="366" methods="197" coveredmethods="197" elements="1171" coveredelements="1171" complexity="0" loc="608" ncloc="608" packages="7" files="27" classes="27"/>
5
5
  <package name="src">
6
6
  <metrics statements="105" coveredstatements="105" conditionals="47" coveredconditionals="47" methods="35" coveredmethods="35"/>
@@ -185,7 +185,7 @@
185
185
  <div class='footer quiet pad2 space-top1 center small'>
186
186
  Code coverage generated by
187
187
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
188
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
188
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
189
189
  </div>
190
190
  </div>
191
191
  <script src="prettify.js"></script>
@@ -2467,7 +2467,7 @@ const containerStyles = StyleSheet.create({
2467
2467
  <div class='footer quiet pad2 space-top1 center small'>
2468
2468
  Code coverage generated by
2469
2469
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
2470
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
2470
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
2471
2471
  </div>
2472
2472
  </div>
2473
2473
  <script src="../prettify.js"></script>
@@ -95,7 +95,7 @@
95
95
  <div class='footer quiet pad2 space-top1 center small'>
96
96
  Code coverage generated by
97
97
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
98
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
98
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
99
99
  </div>
100
100
  </div>
101
101
  <script src="../../prettify.js"></script>
@@ -453,9 +453,9 @@ export function generateDefaultLogbook(): Logbook.Types.ILogbookEntry {
453
453
  blood_glucose_millimolar: 6,
454
454
  carbohydrates_entered_grams: 25,
455
455
  carbohydrates_suggested_grams: 25,
456
- client_timestamp: new Date(`25`),
456
+ client_timestamp: `25`,
457
457
  client_version: `25`,
458
- entry_timestamp: new Date(`25`),
458
+ entry_timestamp: `25`,
459
459
  event_uuid: null,
460
460
  insulin_entered_units: 25,
461
461
  insulin_suggested_units: 25,
@@ -517,7 +517,7 @@ export function getIcon(wrapper: RenderAPI, name: string, active: boolean): Reac
517
517
  <div class='footer quiet pad2 space-top1 center small'>
518
518
  Code coverage generated by
519
519
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
520
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
520
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
521
521
  </div>
522
522
  </div>
523
523
  <script src="../../prettify.js"></script>
@@ -340,7 +340,7 @@ const headerStyles = StyleSheet.create({
340
340
  <div class='footer quiet pad2 space-top1 center small'>
341
341
  Code coverage generated by
342
342
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
343
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
343
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
344
344
  </div>
345
345
  </div>
346
346
  <script src="../../prettify.js"></script>
@@ -502,7 +502,7 @@ export const infoStyles = StyleSheet.create({
502
502
  <div class='footer quiet pad2 space-top1 center small'>
503
503
  Code coverage generated by
504
504
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
505
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
505
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
506
506
  </div>
507
507
  </div>
508
508
  <script src="../../prettify.js"></script>
@@ -550,7 +550,7 @@ const inputStyles = StyleSheet.create({
550
550
  <div class='footer quiet pad2 space-top1 center small'>
551
551
  Code coverage generated by
552
552
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
553
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
553
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
554
554
  </div>
555
555
  </div>
556
556
  <script src="../../prettify.js"></script>
@@ -193,7 +193,7 @@ export default class LimitationMessage extends React.Component&lt;ILimitationMes
193
193
  <div class='footer quiet pad2 space-top1 center small'>
194
194
  Code coverage generated by
195
195
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
196
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
196
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
197
197
  </div>
198
198
  </div>
199
199
  <script src="../../prettify.js"></script>
@@ -145,7 +145,7 @@ const lineSeparatorStyles = StyleSheet.create({
145
145
  <div class='footer quiet pad2 space-top1 center small'>
146
146
  Code coverage generated by
147
147
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
148
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
148
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
149
149
  </div>
150
150
  </div>
151
151
  <script src="../../prettify.js"></script>
@@ -394,7 +394,7 @@ const recentInsulinStyles = StyleSheet.create({
394
394
  <div class='footer quiet pad2 space-top1 center small'>
395
395
  Code coverage generated by
396
396
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
397
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
397
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
398
398
  </div>
399
399
  </div>
400
400
  <script src="../../prettify.js"></script>
@@ -907,7 +907,7 @@ export const stylesModal = StyleSheet.create({
907
907
  <div class='footer quiet pad2 space-top1 center small'>
908
908
  Code coverage generated by
909
909
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
910
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
910
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
911
911
  </div>
912
912
  </div>
913
913
  <script src="../../prettify.js"></script>
@@ -1045,7 +1045,7 @@ const calculationStyles = StyleSheet.create({
1045
1045
  <div class='footer quiet pad2 space-top1 center small'>
1046
1046
  Code coverage generated by
1047
1047
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
1048
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
1048
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
1049
1049
  </div>
1050
1050
  </div>
1051
1051
  <script src="../../prettify.js"></script>
@@ -763,7 +763,7 @@ const recommendedInsulinStyles = StyleSheet.create({
763
763
  <div class='footer quiet pad2 space-top1 center small'>
764
764
  Code coverage generated by
765
765
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
766
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
766
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
767
767
  </div>
768
768
  </div>
769
769
  <script src="../../prettify.js"></script>
@@ -535,7 +535,7 @@ const variantStyles = StyleSheet.create({
535
535
  <div class='footer quiet pad2 space-top1 center small'>
536
536
  Code coverage generated by
537
537
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
538
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
538
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
539
539
  </div>
540
540
  </div>
541
541
  <script src="../../prettify.js"></script>
@@ -427,7 +427,7 @@ const addToLogbookStyles = StyleSheet.create({
427
427
  <div class='footer quiet pad2 space-top1 center small'>
428
428
  Code coverage generated by
429
429
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
430
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
430
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
431
431
  </div>
432
432
  </div>
433
433
  <script src="../../prettify.js"></script>
@@ -649,7 +649,7 @@ export const modalStyle = StyleSheet.create({
649
649
  <div class='footer quiet pad2 space-top1 center small'>
650
650
  Code coverage generated by
651
651
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
652
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
652
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
653
653
  </div>
654
654
  </div>
655
655
  <script src="../../prettify.js"></script>
@@ -355,7 +355,7 @@ const activityStyles = StyleSheet.create({
355
355
  <div class='footer quiet pad2 space-top1 center small'>
356
356
  Code coverage generated by
357
357
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
358
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
358
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
359
359
  </div>
360
360
  </div>
361
361
  <script src="../../../prettify.js"></script>
@@ -265,7 +265,7 @@ const activityIconStyles = StyleSheet.create({
265
265
  <div class='footer quiet pad2 space-top1 center small'>
266
266
  Code coverage generated by
267
267
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
268
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
268
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
269
269
  </div>
270
270
  </div>
271
271
  <script src="../../../prettify.js"></script>
@@ -265,7 +265,7 @@ const activityIntensityStyles = StyleSheet.create({
265
265
  <div class='footer quiet pad2 space-top1 center small'>
266
266
  Code coverage generated by
267
267
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
268
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
268
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
269
269
  </div>
270
270
  </div>
271
271
  <script src="../../../prettify.js"></script>
@@ -125,7 +125,7 @@
125
125
  <div class='footer quiet pad2 space-top1 center small'>
126
126
  Code coverage generated by
127
127
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
128
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
128
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
129
129
  </div>
130
130
  </div>
131
131
  <script src="../../../prettify.js"></script>
@@ -260,7 +260,7 @@
260
260
  <div class='footer quiet pad2 space-top1 center small'>
261
261
  Code coverage generated by
262
262
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
263
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
263
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
264
264
  </div>
265
265
  </div>
266
266
  <script src="../../prettify.js"></script>
@@ -337,7 +337,7 @@ const emotionStyles = StyleSheet.create({
337
337
  <div class='footer quiet pad2 space-top1 center small'>
338
338
  Code coverage generated by
339
339
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
340
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
340
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
341
341
  </div>
342
342
  </div>
343
343
  <script src="../../../prettify.js"></script>
@@ -319,7 +319,7 @@ const moodIconStyles = StyleSheet.create({
319
319
  <div class='footer quiet pad2 space-top1 center small'>
320
320
  Code coverage generated by
321
321
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
322
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
322
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
323
323
  </div>
324
324
  </div>
325
325
  <script src="../../../prettify.js"></script>
@@ -110,7 +110,7 @@
110
110
  <div class='footer quiet pad2 space-top1 center small'>
111
111
  Code coverage generated by
112
112
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
113
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
113
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
114
114
  </div>
115
115
  </div>
116
116
  <script src="../../../prettify.js"></script>
@@ -95,7 +95,7 @@
95
95
  <div class='footer quiet pad2 space-top1 center small'>
96
96
  Code coverage generated by
97
97
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
98
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
98
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
99
99
  </div>
100
100
  </div>
101
101
  <script src="../prettify.js"></script>
@@ -190,7 +190,7 @@ export function changeLanguage(language: Languages): I18n {
190
190
  <div class='footer quiet pad2 space-top1 center small'>
191
191
  Code coverage generated by
192
192
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
193
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
193
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
194
194
  </div>
195
195
  </div>
196
196
  <script src="../../prettify.js"></script>
@@ -95,7 +95,7 @@
95
95
  <div class='footer quiet pad2 space-top1 center small'>
96
96
  Code coverage generated by
97
97
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
98
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
98
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
99
99
  </div>
100
100
  </div>
101
101
  <script src="../../prettify.js"></script>
@@ -538,7 +538,7 @@ export class Messages {
538
538
  <div class='footer quiet pad2 space-top1 center small'>
539
539
  Code coverage generated by
540
540
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
541
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
541
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
542
542
  </div>
543
543
  </div>
544
544
  <script src="../../prettify.js"></script>
@@ -232,7 +232,7 @@ export const ACTIVITY_SETTINGS_INTERVAL_LIMITS: IInterval = { min: 0, max: 1 };
232
232
  <div class='footer quiet pad2 space-top1 center small'>
233
233
  Code coverage generated by
234
234
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
235
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
235
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
236
236
  </div>
237
237
  </div>
238
238
  <script src="../../prettify.js"></script>
@@ -604,7 +604,7 @@ export const BloodKetonePropsError = (): RecommendationError =&gt;
604
604
  <div class='footer quiet pad2 space-top1 center small'>
605
605
  Code coverage generated by
606
606
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
607
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
607
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
608
608
  </div>
609
609
  </div>
610
610
  <script src="../../prettify.js"></script>
@@ -748,7 +748,7 @@ export function getLimitationMessage(wasLimited: boolean, activityReduction: num
748
748
  <div class='footer quiet pad2 space-top1 center small'>
749
749
  Code coverage generated by
750
750
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
751
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
751
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
752
752
  </div>
753
753
  </div>
754
754
  <script src="../../prettify.js"></script>
@@ -115,7 +115,7 @@ export const ActivityIntensityTranslations: Record&lt;Activity.Enums.ActivityInt
115
115
  <div class='footer quiet pad2 space-top1 center small'>
116
116
  Code coverage generated by
117
117
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
118
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
118
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
119
119
  </div>
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
@@ -529,7 +529,7 @@ export class Utils {
529
529
  <div class='footer quiet pad2 space-top1 center small'>
530
530
  Code coverage generated by
531
531
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
532
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
532
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
533
533
  </div>
534
534
  </div>
535
535
  <script src="../../prettify.js"></script>
@@ -1528,7 +1528,7 @@ export function checkCarbohydrates(carbohydrates: number): void {
1528
1528
  <div class='footer quiet pad2 space-top1 center small'>
1529
1529
  Code coverage generated by
1530
1530
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
1531
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
1531
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
1532
1532
  </div>
1533
1533
  </div>
1534
1534
  <script src="../../prettify.js"></script>
@@ -185,7 +185,7 @@
185
185
  <div class='footer quiet pad2 space-top1 center small'>
186
186
  Code coverage generated by
187
187
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
188
- at Tue Sep 07 2021 10:29:24 GMT+0000 (Coordinated Universal Time)
188
+ at Tue Aug 31 2021 15:37:57 GMT+0000 (Coordinated Universal Time)
189
189
  </div>
190
190
  </div>
191
191
  <script src="../../prettify.js"></script>
@@ -0,0 +1,8 @@
1
+ alphaNumber="$(sed -n 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)\(,\)/\2/p' package.json)"
2
+ bumpedAlphaNumber="$((alphaNumber+1))"
3
+
4
+ alphaVersion="$(sed -nE 's/^\s*"alphaVersionCounter": "(.*?)",$/\1/p' package.json)"
5
+ bumpedAlphaVersion="$((alphaVersion+1))"
6
+
7
+ sed -i 's/\("alphaVersionCounter": "\)\([0-9]\+\)\("\)/\1'0'\3/' package.json
8
+ sed -i 's/\("version": "\)\([0-9]\+\.[0-9]\+\.[0-9]\+\)\("\)/\1\2\-alpha.'0'\3/' package.json
@@ -0,0 +1,8 @@
1
+ alphaNumber="$(sed -n 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)\(,\)/\2/p' package.json)"
2
+ bumpedAlphaNumber="$((alphaNumber+1))"
3
+
4
+ alphaVersion="$(sed -nE 's/^\s*"alphaVersionCounter": "(.*?)",$/\1/p' package.json)"
5
+ bumpedAlphaVersion="$((alphaVersion+1))"
6
+
7
+ sed -i 's/\("version": "\)\([0-9]\+\.[0-9]\+\.[0-9]\+\)\("\)/\1\2\-alpha.'$bumpedAlphaVersion'\3/' package.json
8
+ sed -i 's/\("alphaVersionCounter": "\)\([0-9]\+\)\("\)/\1'$bumpedAlphaVersion'\3/' package.json
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@hedia/recommendation-screen",
3
- "version": "2.1.20",
3
+ "version": "2.1.21-alpha.0",
4
+ "alphaVersionCounter": "0",
4
5
  "description": "Hedia Recommendation Screen for Bolus and Carbohydrates",
5
6
  "main": "index.js",
6
7
  "scripts": {
@@ -20,8 +21,7 @@
20
21
  "extract": "lingui extract",
21
22
  "extract-clean": "lingui extract --clean",
22
23
  "compile": "npm run cleanLanguage && lingui compile",
23
- "cleanLanguage": "node ./src/locale/CleanLanguage.ts",
24
- "bump-alpha": "chmod +x ./alpha-release.sh && ./alpha-release.sh"
24
+ "cleanLanguage": "node ./src/locale/CleanLanguage.ts"
25
25
  },
26
26
  "keywords": [
27
27
  "Hedia",
@@ -71,7 +71,7 @@
71
71
  "typescript": "4.1.5"
72
72
  },
73
73
  "dependencies": {
74
- "@hedia/types": "2.1.38-alpha.0",
74
+ "@hedia/types": "2.1.21",
75
75
  "@lingui/babel-preset-react": "2.9.1",
76
76
  "@lingui/cli": "2.9.1",
77
77
  "@lingui/macro": "2.9.1",
@@ -0,0 +1,19 @@
1
+ versionNumber=$(sed -nE 's/^\s*"version": "([0-9].[0-9].[0-9]).*?",$/\1/p' package.json)
2
+ alphaNumber="$(sed -n 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)\(,\)/\2/p' package.json)"
3
+ alphaVersion="$(sed -nE 's/^\s*"alphaVersionCounter": "(.*?)",$/\1/p' package.json)"
4
+
5
+
6
+ if [ "$alphaNumber" != "" ];
7
+ then
8
+ sed -i 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\)\(-alpha\.\)\([0-9]\+\)\("\)/\1\4/' package.json
9
+ fi
10
+
11
+ git add package.json
12
+
13
+ if [ "$alphaVersion" = "" ] || [ $alphaVersion = "0" ];
14
+ then
15
+ git commit --amend -m "bump ${versionNumber}-alpha.${alphaVersion}"
16
+ else
17
+ git commit -m "bump ${versionNumber}-alpha.${alphaVersion}"
18
+ fi
19
+
@@ -74,9 +74,9 @@ export function generateDefaultLogbook() {
74
74
  blood_glucose_millimolar: 6,
75
75
  carbohydrates_entered_grams: 25,
76
76
  carbohydrates_suggested_grams: 25,
77
- client_timestamp: new Date(`25`),
77
+ client_timestamp: `25`,
78
78
  client_version: `25`,
79
- entry_timestamp: new Date(`25`),
79
+ entry_timestamp: `25`,
80
80
  event_uuid: null,
81
81
  insulin_entered_units: 25,
82
82
  insulin_suggested_units: 25,
@@ -1,60 +0,0 @@
1
- name: Post-merge - Publish & Update package version
2
-
3
- on:
4
- pull_request:
5
- branches:
6
- - master
7
- types: [closed]
8
-
9
- env:
10
- SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
11
- NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
12
-
13
- jobs:
14
- publish-package-push-master:
15
- if: github.event.pull_request.merged == true
16
-
17
- runs-on: ubuntu-latest
18
-
19
- strategy:
20
- matrix:
21
- node-version: [14.15]
22
-
23
- steps:
24
- - uses: actions/checkout@v2
25
-
26
- - name: Use Node.js ${{ matrix.node-version }}
27
- uses: actions/setup-node@v2
28
- with:
29
- node-version: ${{ matrix.node-version }}
30
-
31
- - name: Register ssh keys
32
- uses: webfactory/ssh-agent@v0.5.3
33
- with:
34
- ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
35
-
36
- - name: Register NPM access token
37
- run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
38
-
39
- - name: Removing alpha tag from package json
40
- run: chmod +x ./pre-release.sh && ./pre-release.sh
41
-
42
- - name: Installing dependencies
43
- run: npm ci
44
-
45
- - id: publish
46
- uses: JS-DevTools/npm-publish@v1
47
- with:
48
- token: ${{ env.NPM_TOKEN }}
49
-
50
- - if: steps.publish.outputs.type == 'none'
51
- run: |
52
- echo "Failed to publish on npm, version already exists"
53
- exit 1
54
-
55
- - name: Commit & Push changes
56
- uses: actions-js/push@master
57
- with:
58
- github_token: ${{ secrets.GITHUB_TOKEN }}
59
- branch: 'master'
60
- message: 'Post-publish master package version update'
@@ -1,54 +0,0 @@
1
- name: NPM Alpha Publish Bot
2
-
3
- on:
4
- pull_request:
5
-
6
- env:
7
- SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
8
- NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
9
-
10
- jobs:
11
- publish-alpha-npm-package:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v2
15
- - uses: actions/setup-node@v2
16
- with:
17
- node-version: ${{ matrix.node-version }}
18
-
19
- - name: Register ssh keys
20
- uses: webfactory/ssh-agent@v0.5.3
21
- with:
22
- ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
23
-
24
- - name: Register NPM access token
25
- run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
26
-
27
- - name: Installing dependencies
28
- run: npm ci
29
-
30
- - id: publish-alpha
31
- uses: JS-DevTools/npm-publish@v1
32
- with:
33
- token: ${{ env.NPM_TOKEN }}
34
- tag: alpha
35
-
36
- - if: steps.publish-alpha.outputs.type == 'none'
37
- run: |
38
- echo "Package JSON version is already published, please bump the version!"
39
- exit 1
40
-
41
- - if: steps.publish-alpha.outputs.type != 'none'
42
- uses: izhangzhihao/delete-comment@master
43
- with:
44
- github_token: ${{ secrets.GITHUB_TOKEN }}
45
- delete_user_name: github-actions[bot]
46
- issue_number: ${{ github.event.number }} # remove comments from the current PR
47
-
48
- - if: steps.publish-alpha.outputs.type != 'none'
49
- uses: peter-evans/create-or-update-comment@v1
50
- with:
51
- issue-number: ${{ github.event.pull_request.number }}
52
- body: |
53
- 🎉 Successfully released alpha version 🎉
54
- ✅ ${{ steps.publish-alpha.outputs.version }}
package/alpha-release.sh DELETED
@@ -1,11 +0,0 @@
1
- alphaNumber="$(sed -n 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)\(,\)/\2/p' package.json)"
2
- bumped="$((alphaNumber+1))"
3
- if [ "$alphaNumber" = "" ];
4
- then
5
- sed -i 's/\("version": "\)\([0-9]\+\.[0-9]\+\.[0-9]\+\)\("\)/\1\2\-alpha.1\3/' package.json
6
- else
7
- echo $bumped
8
- sed -i 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)/\1'$bumped'\3/' package.json
9
- fi
10
-
11
- git commit package.json -m "bump alpha release to ${bumped}"
package/pre-release.sh DELETED
@@ -1,5 +0,0 @@
1
- alphaNumber="$(sed -n 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)\(,\)/\2/p' package.json)"
2
- if [ "$alphaNumber" != "" ];
3
- then
4
- sed -i 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\)\(-alpha\.\)\([0-9]\+\)\("\)/\1\4/' package.json
5
- fi