@hedia/recommendation-screen 2.1.21-alpha.9 → 2.1.22-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 (41) hide show
  1. package/.github/workflows/on-post-merge-publish-package.yaml +1 -0
  2. package/coverage/clover.xml +2 -2
  3. package/coverage/lcov-report/index.html +1 -1
  4. package/coverage/lcov-report/src/RecommendationScreen.tsx.html +1 -1
  5. package/coverage/lcov-report/src/__tests__/index.html +1 -1
  6. package/coverage/lcov-report/src/__tests__/utils.tsx.html +3 -3
  7. package/coverage/lcov-report/src/components/Header.tsx.html +1 -1
  8. package/coverage/lcov-report/src/components/InfoBars.tsx.html +1 -1
  9. package/coverage/lcov-report/src/components/InvisibleNumberInput.tsx.html +1 -1
  10. package/coverage/lcov-report/src/components/LimitationMessage.tsx.html +1 -1
  11. package/coverage/lcov-report/src/components/LineSeparator.tsx.html +1 -1
  12. package/coverage/lcov-report/src/components/RecentInsulin.tsx.html +1 -1
  13. package/coverage/lcov-report/src/components/RecommendationModal.tsx.html +1 -1
  14. package/coverage/lcov-report/src/components/RecommendedCarbs.tsx.html +1 -1
  15. package/coverage/lcov-report/src/components/RecommendedInsulin.tsx.html +1 -1
  16. package/coverage/lcov-report/src/components/Remeasure.tsx.html +1 -1
  17. package/coverage/lcov-report/src/components/TransferToLogbook.tsx.html +1 -1
  18. package/coverage/lcov-report/src/components/TwoOptionModal.tsx.html +1 -1
  19. package/coverage/lcov-report/src/components/activity/Activity.tsx.html +1 -1
  20. package/coverage/lcov-report/src/components/activity/ActivityIcon.tsx.html +1 -1
  21. package/coverage/lcov-report/src/components/activity/ActivityIntensity.tsx.html +1 -1
  22. package/coverage/lcov-report/src/components/activity/index.html +1 -1
  23. package/coverage/lcov-report/src/components/index.html +1 -1
  24. package/coverage/lcov-report/src/components/mood/Emotion.tsx.html +1 -1
  25. package/coverage/lcov-report/src/components/mood/MoodIcon.tsx.html +1 -1
  26. package/coverage/lcov-report/src/components/mood/index.html +1 -1
  27. package/coverage/lcov-report/src/index.html +1 -1
  28. package/coverage/lcov-report/src/locale/i18nUtils.ts.html +1 -1
  29. package/coverage/lcov-report/src/locale/index.html +1 -1
  30. package/coverage/lcov-report/src/utils/AttentionMessages.tsx.html +1 -1
  31. package/coverage/lcov-report/src/utils/Constants.ts.html +1 -1
  32. package/coverage/lcov-report/src/utils/RecommendationError.tsx.html +1 -1
  33. package/coverage/lcov-report/src/utils/RecommendationUtils.ts.html +1 -1
  34. package/coverage/lcov-report/src/utils/Translations.ts.html +1 -1
  35. package/coverage/lcov-report/src/utils/Utils.ts.html +1 -1
  36. package/coverage/lcov-report/src/utils/Validations.ts.html +1 -1
  37. package/coverage/lcov-report/src/utils/index.html +1 -1
  38. package/package.json +2 -2
  39. package/src/__tests__/utils.js +2 -2
  40. package/bump-package-version.sh +0 -80
  41. package/remove-alpha-tag.sh +0 -15
@@ -32,4 +32,5 @@ jobs:
32
32
  issue-number: ${{ github.event.number }}
33
33
  github-token: ${{ secrets.GITHUB_TOKEN }}
34
34
  is-post-merge: true
35
+ run-ci: true
35
36
  run-tsc: true
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1631706511741" clover="3.2.0">
3
- <project timestamp="1631706511741" name="All files">
2
+ <coverage generated="1632390437947" clover="3.2.0">
3
+ <project timestamp="1632390437947" 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
188
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
2470
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
98
+ at Thu Sep 23 2021 09:47:17 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: `25`,
456
+ client_timestamp: new Date(),
457
457
  client_version: `25`,
458
- entry_timestamp: `25`,
458
+ entry_timestamp: new Date(),
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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
520
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
343
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
505
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
553
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
196
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
148
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
397
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
910
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
1048
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
766
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
538
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
430
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
652
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
358
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
268
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
268
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
128
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
263
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
340
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
322
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
113
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
98
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
193
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
98
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
541
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
235
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
607
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
751
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
118
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
532
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
1531
+ at Thu Sep 23 2021 09:47:17 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 Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
188
+ at Thu Sep 23 2021 09:47:17 GMT+0000 (Coordinated Universal Time)
189
189
  </div>
190
190
  </div>
191
191
  <script src="../../prettify.js"></script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/recommendation-screen",
3
- "version": "2.1.21-alpha.9",
3
+ "version": "2.1.22-alpha.0",
4
4
  "description": "Hedia Recommendation Screen for Bolus and Carbohydrates",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -69,7 +69,7 @@
69
69
  "typescript": "4.1.5"
70
70
  },
71
71
  "dependencies": {
72
- "@hedia/types": "2.1.21",
72
+ "@hedia/types": "2.1.41",
73
73
  "@lingui/babel-preset-react": "2.9.1",
74
74
  "@lingui/cli": "2.9.1",
75
75
  "@lingui/macro": "2.9.1",
@@ -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: `25`,
77
+ client_timestamp: new Date(),
78
78
  client_version: `25`,
79
- entry_timestamp: `25`,
79
+ entry_timestamp: new Date(),
80
80
  event_uuid: null,
81
81
  insulin_entered_units: 25,
82
82
  insulin_suggested_units: 25,
@@ -1,80 +0,0 @@
1
- # @latest on npm
2
- latestVersionNPM=$(npm show ./ dist-tags.latest --json)
3
- echo "Latest dist-tag version on npm: $latestVersionNPM"
4
-
5
- # Initial package.json version
6
- packageJSONVersion=$(sed -nE 's/^\s*"version": "([0-9]+.[0-9]+.[0-9]+).*?",$/\1/p' package.json)
7
- echo "Initial package.json version: $packageJSONVersion"
8
-
9
- npmV=`echo $latestVersionNPM | sed 's/\.//g' | bc`
10
- pkgV=`echo $packageJSONVersion | sed 's/\.//g' | bc`
11
-
12
- # Check if the packageJSONVersion is up to date.
13
- # Otherwise, bump the package.json version, accordingly to the label.
14
- if [[ $npmV -lt $pkgV ]]; then
15
- echo "package.json version is up to date"
16
- else
17
- # Set package.json to latest NPM version prior to bump version
18
- sed -i 's/\("version": \)\("[0-9]\+.[0-9]\+.[0-9]\+\)\(\"\)/\1\'$latestVersionNPM'/' package.json
19
- case "$1" in
20
- *"major"*)
21
- echo "Bumping pre-major version"
22
- echo "$(npm version --no-git-tag-version premajor --preid alpha)"
23
- ;;
24
- *"minor"*)
25
- echo "Bumping pre-minor version"
26
- echo $(npm version --no-git-tag-version preminor --preid alpha)
27
- ;;
28
- *"patch"*)
29
- echo "Bumping pre-patch version"
30
- echo "$(npm version --no-git-tag-version prepatch --preid alpha)"
31
- ;;
32
- *)
33
- echo "No [major, minor, patch] label has been set"
34
- ;;
35
- esac
36
- fi
37
-
38
- # Get all published versions on npm.
39
- allVersionsArray=$(npm show ./ versions)
40
- # Get the current version from the package.json
41
- upToDatePackageJSON=$(sed -nE 's/^\s*"version": "([0-9]+.[0-9]+.[0-9]+).*?",$/\1/p' package.json)
42
-
43
- # Identify the latest published alpha (if any) on npm, of the upToDatePackageJSON.
44
- for i in ${allVersionsArray[@]}
45
- do
46
- if [[ $i == *$upToDatePackageJSON* ]]; then
47
- latestAlphaVersion=$(echo $i)
48
- fi
49
- done
50
-
51
- # Get the alpha counter value of the latest alpha version (for the upToDatePackageJSON version).
52
- alphaVersionCounter="$(echo "$latestAlphaVersion" | grep -oP '(?:-alpha.)\K\d+')"
53
-
54
- # Bumping the alphaVersionCounter by 1.
55
- if [[ "$alphaVersionCounter" != "" ]];
56
- then
57
- alphaVersionCounter="$((alphaVersionCounter+1))"
58
- else
59
- alphaVersionCounter="0"
60
- fi
61
-
62
- # Get the current packageVersion and check if -alpha.X tag has been set (in case of package.json version bump (Open PR))
63
- packageVersion=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' package.json)
64
- if [[ "$packageVersion" == *"-alpha"* ]];
65
- then
66
- # On open PR
67
- # Set alpha tag to the correspondent version
68
- echo "Setting alpha version to $alphaVersionCounter"
69
- sed -i 's/\("version": "[0-9]\+.[0-9]\+.[0-9]\+\)\(-alpha.\)\([0-9]\)/\1\'-alpha.$alphaVersionCounter'/' package.json
70
- bumpedPackageVersion=$(sed -nE 's/^\s*"version": "([0-9]+.[0-9]+.[0-9]+).*?",$/\1/p' package.json)
71
- # Commit changes
72
- git add package.json
73
- git commit -m "autobump $bumpedPackageVersion"
74
- else
75
- echo "on push"
76
- # On push commit
77
- # Set alpha tag to the correspondent version
78
- echo "Setting alpha version to $alphaVersionCounter"
79
- sed -i 's/\("version": "\)\([0-9]\+\.[0-9]\+\.[0-9]\+\)\("\)/\1\2\-alpha.'$alphaVersionCounter'\3/' package.json
80
- fi
@@ -1,15 +0,0 @@
1
- alphaNumber="$(sed -n 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)\(,\)/\2/p' package.json)"
2
-
3
- previousCommit="$(git log -1 --pretty=%B)"
4
-
5
- if [ "$alphaNumber" != "" ];
6
- then
7
- sed -i 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\)\(-alpha\.\)\([0-9]\+\)\("\)/\1\4/' package.json
8
- fi
9
-
10
- if [[ "$previousCommit" == *"autobump"* ]];
11
- then
12
- git add package.json
13
- git commit --amend --no-edit
14
- git push
15
- fi