@24i/bigscreen-sdk 1.0.54-alpha.2836 → 2.1.1-alpha.2133

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 (278) hide show
  1. package/README.md +3 -2
  2. package/package.json +34 -53
  3. package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +9 -9
  4. package/packages/async-image/src/AsyncImage.tsx +10 -15
  5. package/packages/developer-tools/PlayerDebugWindow/README.md +1 -1
  6. package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +0 -11
  7. package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +5 -5
  8. package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +0 -15
  9. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +1 -2
  10. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +5 -57
  11. package/packages/developer-tools/src/TechnicalInfo/__mocks__/Device.ts +0 -12
  12. package/packages/developer-tools/src/TechnicalInfo/translations.ts +0 -8
  13. package/packages/device/src/getKeyDigit.ts +2 -2
  14. package/packages/device/src/resolver/resolver.ts +5 -18
  15. package/packages/digital-clock/src/DigitalClock.tsx +4 -15
  16. package/packages/driver-androidtv/src/DeviceAndroidTV.ts +9 -92
  17. package/packages/driver-androidtv/src/__mocks__/javaScriptBridge.ts +5 -38
  18. package/packages/driver-androidtv/src/index.ts +0 -1
  19. package/packages/driver-androidtv/src/keymap.ts +0 -18
  20. package/packages/driver-androidtv/src/types.ts +16 -144
  21. package/packages/driver-base/src/DeviceBase.ts +2 -80
  22. package/packages/driver-base/src/KeyMap/Key.ts +1 -8
  23. package/packages/driver-base/src/KeyMap/KeyMap.ts +0 -4
  24. package/packages/driver-base/src/KeyMap/interface.ts +0 -1
  25. package/packages/driver-base/src/KeyMap/overrideValues.ts +1 -2
  26. package/packages/driver-base/src/__mocks__/DeviceBase.ts +0 -24
  27. package/packages/driver-base/src/__mocks__/keyMap.ts +0 -1
  28. package/packages/driver-base/src/index.ts +0 -3
  29. package/packages/driver-base/src/types/DeviceEvent.ts +0 -2
  30. package/packages/driver-base/src/types/KeycodeKeyMap.ts +0 -1
  31. package/packages/driver-browser/src/DeviceBrowser.ts +0 -26
  32. package/packages/driver-browser/src/keymap.ts +0 -8
  33. package/packages/driver-entone/src/DeviceEntone.ts +1 -31
  34. package/packages/driver-entone/src/keymap.ts +0 -1
  35. package/packages/driver-hbbtv/src/DeviceHbbTV.ts +0 -26
  36. package/packages/driver-kreatv/src/DeviceKreaTV.ts +0 -26
  37. package/packages/driver-saphi/src/DeviceSaphi.ts +0 -26
  38. package/packages/driver-tizen/src/DeviceTizen.ts +7 -126
  39. package/packages/driver-tizen/src/ITizen.ts +202 -15116
  40. package/packages/driver-tizen/src/IWebapis.ts +87 -8643
  41. package/packages/driver-tizen/src/TizenKeys.ts +2 -4
  42. package/packages/driver-tizen/src/__mocks__/tizen.ts +8 -7
  43. package/packages/driver-tizen/src/constants.ts +195 -1
  44. package/packages/driver-tizen/src/types.ts +14 -0
  45. package/packages/driver-vidaa/src/DeviceVidaa.ts +2 -29
  46. package/packages/driver-vidaa/src/__mocks__/vidaa.ts +1 -1
  47. package/packages/driver-vidaa/src/keymap.ts +0 -2
  48. package/packages/driver-webos/src/DeviceWebos.ts +0 -55
  49. package/packages/driver-webos/src/__mocks__/webos.ts +0 -33
  50. package/packages/driver-webos/src/constants.ts +0 -1
  51. package/packages/driver-webos/src/keymap.ts +1 -2
  52. package/packages/driver-webos/src/types.ts +0 -30
  53. package/packages/driver-xbox/src/DeviceXbox.ts +1 -30
  54. package/packages/driver-xbox/src/keymap.ts +1 -1
  55. package/packages/epg/README.md +1 -3
  56. package/packages/epg/src/v2/Cell.tsx +2 -16
  57. package/packages/epg/src/v2/DataManager.ts +41 -112
  58. package/packages/epg/src/v2/DatePicker.tsx +3 -9
  59. package/packages/epg/src/v2/DateToast/DateToast.tsx +9 -12
  60. package/packages/epg/src/v2/Day.tsx +3 -6
  61. package/packages/epg/src/v2/Epg.tsx +5 -5
  62. package/packages/epg/src/v2/MockGenerator/generator.ts +2 -3
  63. package/packages/epg/src/v2/ProgramInfo/utils.ts +3 -4
  64. package/packages/epg/src/v2/Row.tsx +1 -3
  65. package/packages/epg/src/v2/TimelineSection.tsx +1 -4
  66. package/packages/epg/src/v2/basic/CellsManager.tsx +2 -7
  67. package/packages/epg/src/v2/basic/RowsManager.tsx +1 -3
  68. package/packages/epg/src/v2/interface.ts +0 -13
  69. package/packages/events-manager/src/EventsManager.ts +56 -1
  70. package/packages/focus/README.md +0 -33
  71. package/packages/focus/src/IFocusable.ts +0 -1
  72. package/packages/focus/src/Layout/Base.tsx +6 -41
  73. package/packages/focus/src/Layout/Matrix.tsx +19 -51
  74. package/packages/focus/src/Layout/__test__/Base.spec.ts +180 -0
  75. package/packages/focus/src/Layout/__test__/Horizontal.spec.ts +94 -0
  76. package/packages/focus/src/Layout/__test__/Matrix.spec.ts +261 -0
  77. package/packages/focus/src/Layout/__test__/Vertical.spec.ts +46 -0
  78. package/packages/focus/src/Layout/__test__/isRtl.spec.ts +23 -0
  79. package/packages/focus/src/Layout/__test__/shared.ts +19 -0
  80. package/packages/focus/src/focusFirstExisting.ts +1 -7
  81. package/packages/focus/src/index.ts +1 -2
  82. package/packages/gallup/src/Gallup.ts +3 -3
  83. package/packages/grid/src/Base/Base.tsx +10 -15
  84. package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +2 -4
  85. package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +6 -6
  86. package/packages/icon/src/Icon.tsx +5 -27
  87. package/packages/input/README.md +1 -1
  88. package/packages/input/src/Input.tsx +10 -16
  89. package/packages/interactable/README.md +1 -2
  90. package/packages/interactable/src/Interactable.tsx +3 -9
  91. package/packages/interactable/src/interface.ts +0 -1
  92. package/packages/jsx/src/index.ts +1 -1
  93. package/packages/jsx/src/test-utils/index.ts +0 -1
  94. package/packages/keyboard/src/Backdrop/Backdrop.scss +0 -2
  95. package/packages/keyboard/src/KeyboardBase.tsx +4 -16
  96. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +0 -4
  97. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +20 -28
  98. package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +0 -1
  99. package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +0 -1
  100. package/packages/keyboard/src/WhitelabelKeyboard/layouts/index.ts +0 -12
  101. package/packages/keyboard/src/WhitelabelKeyboard/types.ts +0 -1
  102. package/packages/keyboard/src/utils/caret.ts +8 -5
  103. package/packages/keyboard/src/utils/input.ts +6 -5
  104. package/packages/l10n/README.md +0 -18
  105. package/packages/l10n/src/date/common.ts +6 -18
  106. package/packages/l10n/src/date/cs.ts +8 -2
  107. package/packages/l10n/src/date/en-001.ts +3 -3
  108. package/packages/l10n/src/date/en-common.ts +4 -5
  109. package/packages/l10n/src/date/en-us.ts +3 -3
  110. package/packages/l10n/src/date/iso.ts +13 -12
  111. package/packages/l10n/src/date/types.ts +0 -9
  112. package/packages/l10n/src/l10n.ts +3 -61
  113. package/packages/list/src/Base/Base.tsx +9 -19
  114. package/packages/list/src/Base/interface.ts +2 -2
  115. package/packages/list/src/BasicList/BasicList.tsx +7 -7
  116. package/packages/list/src/CenteredList/CenteredList.tsx +2 -2
  117. package/packages/list/src/CenteredList/controller.ts +1 -0
  118. package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +10 -10
  119. package/packages/list/src/FirstOnlyList/FirstOnlyList.tsx +2 -2
  120. package/packages/list/src/FirstOnlyVariedList/FirstOnlyVariedList.tsx +2 -2
  121. package/packages/list/src/FixedToEndList/FixedToEndList.tsx +2 -2
  122. package/packages/list/src/UnifiedListController/UnifiedListController.ts +2 -6
  123. package/packages/list/src/interface.ts +2 -2
  124. package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +1 -7
  125. package/packages/logger/src/loggers/SentryLogger/Sentry.ts +0 -1
  126. package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +3 -5
  127. package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +3 -31
  128. package/packages/menu/src/MenuAndContentContainer/interface.ts +0 -8
  129. package/packages/modal-service/README.md +1 -4
  130. package/packages/modal-service/src/ModalService.tsx +5 -29
  131. package/packages/perf-utils/README.md +120 -1
  132. package/packages/perf-utils/src/array/filter.ts +54 -1
  133. package/packages/perf-utils/src/array/find.ts +43 -1
  134. package/packages/perf-utils/src/array/findIndex.ts +43 -1
  135. package/packages/perf-utils/src/array/forEach.ts +48 -1
  136. package/packages/perf-utils/src/array/includes.ts +41 -1
  137. package/packages/perf-utils/src/array/includesNaN.ts +32 -1
  138. package/packages/perf-utils/src/array/index.ts +7 -1
  139. package/packages/perf-utils/src/array/map.ts +52 -1
  140. package/packages/player-ui/README.md +1 -1
  141. package/packages/player-ui/src/CurrentTime.tsx +2 -2
  142. package/packages/player-ui/src/Duration.tsx +2 -2
  143. package/packages/player-ui/src/PauseButton.tsx +0 -8
  144. package/packages/player-ui/src/PlayerInteractable.tsx +0 -1
  145. package/packages/player-ui/src/PlayerTime.tsx +1 -3
  146. package/packages/player-ui/src/PlayerUI.tsx +35 -68
  147. package/packages/player-ui/src/RemainingTime.tsx +2 -2
  148. package/packages/player-ui/src/Seekbar.tsx +18 -110
  149. package/packages/player-ui/src/Seeking.ts +16 -57
  150. package/packages/player-ui/src/Subtitles.tsx +2 -2
  151. package/packages/player-ui/src/index.ts +0 -1
  152. package/packages/player-ui/src/mocks.ts +8 -32
  153. package/packages/player-ui/src/timeUtils.ts +3 -3
  154. package/packages/player-ui/src/types.ts +3 -9
  155. package/packages/router/README.md +0 -1
  156. package/packages/router/src/Route.tsx +27 -61
  157. package/packages/router/src/Router.tsx +14 -63
  158. package/packages/router/src/history.ts +1 -8
  159. package/packages/router/src/index.ts +1 -1
  160. package/packages/router/src/utils.ts +4 -9
  161. package/packages/sass-utils/src/linear-gradient.scss +4 -9
  162. package/packages/sass-utils/src/scale.1080.scss +1 -3
  163. package/packages/sass-utils/src/scale.720.scss +1 -1
  164. package/packages/time/README.md +1 -4
  165. package/packages/time/src/Time.ts +13 -35
  166. package/packages/time/src/constants.ts +0 -1
  167. package/packages/toast/src/ToastService.tsx +5 -16
  168. package/packages/types-bigscreen-jsx/README.md +4 -5
  169. package/packages/types-bigscreen-jsx/index.d.ts +67 -72
  170. package/packages/utils/README.md +0 -27
  171. package/packages/utils/src/elementUtils.ts +0 -25
  172. package/packages/utils/src/index.ts +0 -8
  173. package/packages/utils/src/scaledImage.ts +3 -6
  174. package/packages/utils/src/textUtils.ts +14 -46
  175. package/packages/utils/src/wait.ts +1 -3
  176. package/packages/utils/src/xhr/xhrSend.ts +1 -3
  177. package/packages/utils/src/xhr/xhrSendRetry.ts +1 -3
  178. package/packages/zapping/src/ChannelZapping.ts +0 -9
  179. package/packages/zapping/src/Zapping.tsx +0 -10
  180. package/ci/is_ci_job_skippable.sh +0 -153
  181. package/packages/analytics/README.md +0 -8
  182. package/packages/analytics/src/A.ts +0 -1
  183. package/packages/analytics/src/Analytics.ts +0 -1
  184. package/packages/analytics/src/analyticsOnScroll.ts +0 -1
  185. package/packages/analytics/src/clients/ConsoleAnalytics/ConsoleAnalytics.ts +0 -1
  186. package/packages/analytics/src/clients/ConsoleAnalytics/index.ts +0 -1
  187. package/packages/analytics/src/clients/GoogleAnalytics/GoogleAnalytics.ts +0 -196
  188. package/packages/analytics/src/clients/GoogleAnalytics/constants.ts +0 -126
  189. package/packages/analytics/src/clients/GoogleAnalytics/getUrl.ts +0 -17
  190. package/packages/analytics/src/clients/GoogleAnalytics/index.ts +0 -2
  191. package/packages/analytics/src/clients/GoogleAnalytics/interface.ts +0 -82
  192. package/packages/analytics/src/clients/GoogleAnalytics/mapPayload.ts +0 -51
  193. package/packages/analytics/src/clients/GoogleAnalytics/prepareBody.ts +0 -14
  194. package/packages/analytics/src/clients/TealiumAnalytics/TealiumAnalytics.ts +0 -181
  195. package/packages/analytics/src/clients/TealiumAnalytics/constants.ts +0 -106
  196. package/packages/analytics/src/clients/TealiumAnalytics/findForLanguage.ts +0 -9
  197. package/packages/analytics/src/clients/TealiumAnalytics/index.ts +0 -4
  198. package/packages/analytics/src/clients/TealiumAnalytics/interface.ts +0 -35
  199. package/packages/analytics/src/clients/TealiumAnalytics/mappers/__mocks__/mediaPayload.ts +0 -72
  200. package/packages/analytics/src/clients/TealiumAnalytics/mappers/helper.ts +0 -36
  201. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppError.ts +0 -13
  202. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppOpen.ts +0 -13
  203. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteAdd.ts +0 -11
  204. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteRemove.ts +0 -11
  205. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerClose.ts +0 -15
  206. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerOpen.ts +0 -15
  207. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSceneView.ts +0 -18
  208. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearch.ts +0 -18
  209. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchFailed.ts +0 -8
  210. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchSuccess.ts +0 -8
  211. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoPause.ts +0 -15
  212. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoProgress.ts +0 -18
  213. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoResume.ts +0 -15
  214. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStart.ts +0 -15
  215. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStop.ts +0 -15
  216. package/packages/analytics/src/clients/TealiumAnalytics/types.ts +0 -161
  217. package/packages/analytics/src/clients/TwentyFourIQ/TwentyFourIQClient.ts +0 -107
  218. package/packages/analytics/src/clients/TwentyFourIQ/constants.ts +0 -111
  219. package/packages/analytics/src/clients/TwentyFourIQ/helper.ts +0 -34
  220. package/packages/analytics/src/clients/TwentyFourIQ/index.ts +0 -2
  221. package/packages/analytics/src/clients/TwentyFourIQ/interface.ts +0 -34
  222. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdEvent.ts +0 -20
  223. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBase.ts +0 -24
  224. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBuffering.ts +0 -15
  225. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerClose.ts +0 -25
  226. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerOpen.ts +0 -17
  227. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapSceneView.ts +0 -15
  228. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapScroll.ts +0 -17
  229. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoComplete.ts +0 -22
  230. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoPause.ts +0 -25
  231. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoProgress.ts +0 -25
  232. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStart.ts +0 -34
  233. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStop.ts +0 -32
  234. package/packages/analytics/src/clients/TwentyFourIQ/types.ts +0 -132
  235. package/packages/analytics/src/constants.ts +0 -1
  236. package/packages/analytics/src/index.ts +0 -3
  237. package/packages/analytics/src/interface.ts +0 -1
  238. package/packages/analytics/src/utils/generateSessionId.ts +0 -8
  239. package/packages/device/src/driver/index.firetv.ts +0 -1
  240. package/packages/device/src/driver/index.smartcast.tv.ts +0 -1
  241. package/packages/driver-base/src/types/AdInfo.ts +0 -5
  242. package/packages/driver-base/src/types/InAppPurchase.ts +0 -25
  243. package/packages/driver-firetv/src/DeviceFireTV.ts +0 -91
  244. package/packages/driver-firetv/src/__mocks__/javaScriptBridge.ts +0 -45
  245. package/packages/driver-firetv/src/index.ts +0 -1
  246. package/packages/driver-firetv/src/types.ts +0 -1
  247. package/packages/driver-smartcast/src/DeviceSmartCast.ts +0 -394
  248. package/packages/driver-smartcast/src/__mocks__/api.ts +0 -79
  249. package/packages/driver-smartcast/src/index.ts +0 -1
  250. package/packages/driver-smartcast/src/keymap.ts +0 -9
  251. package/packages/driver-smartcast/src/types.ts +0 -111
  252. package/packages/focus/src/hasFocus.ts +0 -36
  253. package/packages/jsx/src/test-utils/keyup.ts +0 -27
  254. package/packages/keyboard/src/WhitelabelKeyboard/layouts/arabic.ts +0 -27
  255. package/packages/keyboard/src/WhitelabelKeyboard/layouts/burmese.ts +0 -27
  256. package/packages/keyboard/src/WhitelabelKeyboard/layouts/dari.ts +0 -28
  257. package/packages/keyboard/src/WhitelabelKeyboard/layouts/korean.ts +0 -26
  258. package/packages/keyboard/src/WhitelabelKeyboard/layouts/pashto.ts +0 -27
  259. package/packages/keyboard/src/WhitelabelKeyboard/layouts/persian.ts +0 -27
  260. package/packages/keyboard/src/WhitelabelKeyboard/layouts/russian.ts +0 -27
  261. package/packages/keyboard/src/WhitelabelKeyboard/layouts/spanish.ts +0 -26
  262. package/packages/keyboard/src/WhitelabelKeyboard/layouts/tibetan.ts +0 -26
  263. package/packages/keyboard/src/WhitelabelKeyboard/layouts/turkish.ts +0 -26
  264. package/packages/keyboard/src/WhitelabelKeyboard/layouts/ukrainian.ts +0 -27
  265. package/packages/keyboard/src/WhitelabelKeyboard/layouts/urdu.ts +0 -26
  266. package/packages/keyboard/src/utils/setInputSelectionRange.ts +0 -10
  267. package/packages/l10n/src/date/de.ts +0 -97
  268. package/packages/l10n/src/date/es.ts +0 -71
  269. package/packages/l10n/src/date/fr.ts +0 -94
  270. package/packages/l10n/src/date/he.ts +0 -101
  271. package/packages/time/src/adapters/24iMediaTimeApi.ts +0 -47
  272. package/packages/time/src/services/24iMediaTimeApi/24iMediaTimeApi.ts +0 -43
  273. package/packages/time/src/services/24iMediaTimeApi/index.ts +0 -6
  274. package/packages/utils/src/forceReflow.ts +0 -14
  275. package/packages/utils/src/keyPress/index.ts +0 -6
  276. package/packages/utils/src/keyPress/keyPressSimulator.ts +0 -74
  277. package/packages/utils/src/keyPress/simulateKeyPress.ts +0 -25
  278. package/utils/release/release.ts +0 -156
@@ -1,71 +0,0 @@
1
- import { processYear, dateFormatter, toNumericLocaleTimeString } from './common';
2
- import { processWeekday } from './en-common';
3
- import { DateTimeFormatOptions, Day, Month } from './types';
4
-
5
- const ES_MONTHS = {
6
- narrow: [
7
- 'E', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D',
8
- ],
9
- // https://web.library.yale.edu/cataloging/months
10
- short: [
11
- 'ene', 'feb', 'mar', 'abr', 'mayo', 'jun', 'jul', 'ago', 'set', 'oct', 'nov', 'dic',
12
- ],
13
- long: [
14
- 'enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre',
15
- 'octubre', 'noviembre', 'diciembre',
16
- ],
17
- };
18
-
19
- const ES_WEEKDAYS = {
20
- // https://letsspeakspanish.com/blog/days-of-week-months-seasons-in-spanish/
21
- narrow: [
22
- 'D', 'L', 'M', 'X', 'J', 'V', 'S',
23
- ],
24
- short: [
25
- 'dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb',
26
- ],
27
- long: [
28
- 'domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado',
29
- ],
30
- };
31
-
32
- const processDay = (dateParts: string[], day: Day | undefined, date: Date) => {
33
- if (typeof day === 'undefined') return;
34
- const strDate = date.getDate().toString();
35
- dateParts.push(strDate);
36
- };
37
-
38
- const processMonth = (
39
- dateParts: string[],
40
- month: Month | undefined,
41
- date: Date,
42
- ) => {
43
- if (typeof month === 'undefined') return;
44
- if (month === '2-digit' || month === 'numeric') {
45
- const strMonth = (date.getMonth() + 1).toString();
46
- dateParts.push(strMonth);
47
- } else {
48
- const finalMonth = ES_MONTHS[month][date.getMonth()];
49
- dateParts.push(finalMonth);
50
- }
51
- };
52
-
53
- const toLocaleDateString = (date: Date) => (
54
- { weekday, year, month, day }: DateTimeFormatOptions = {
55
- year: 'numeric', month: '2-digit', day: '2-digit',
56
- },
57
- ) => {
58
- const dateStringParts: string[] = [];
59
- processWeekday(dateStringParts, year, month, day, weekday, date, ES_WEEKDAYS);
60
- const dateConnection = month === '2-digit' || month === 'numeric' ? '/' : ' ';
61
- const dateParts: string[] = [];
62
- processDay(dateParts, day, date);
63
- if (month === 'long' && day != null) dateParts.push('de');
64
- processMonth(dateParts, month, date);
65
- if (month === 'long') dateParts.push('de');
66
- processYear(dateParts, year, date);
67
- dateStringParts.push(dateParts.join(dateConnection));
68
- return dateStringParts.join(' ');
69
- };
70
-
71
- export const esDateFormatter = dateFormatter(toNumericLocaleTimeString, toLocaleDateString);
@@ -1,94 +0,0 @@
1
- import { dateFormatter, processYear, toTwoDigitLocaleTimeString } from './common';
2
- import { DateTimeFormatOptions, Day, Month, Weekday, Year } from './types';
3
-
4
- // https://web.library.yale.edu/cataloging/months
5
- const FR_MONTHS = {
6
- narrow: [
7
- 'J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D',
8
- ],
9
- short: [
10
- 'janv', 'févr', 'mars', 'avril', 'mai', 'juin', 'juil', 'août', 'sept', 'oct', 'nov', 'déc',
11
- ],
12
- long: [
13
- 'janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre',
14
- 'octobre', 'novembre', 'décembre',
15
- ],
16
- };
17
-
18
- const FR_WEEKDAYS = {
19
- narrow: [
20
- 'D', 'L', 'M', 'M', 'J', 'V', 'S',
21
- ],
22
- short: [
23
- 'dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam',
24
- ],
25
- long: [
26
- 'dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi',
27
- ],
28
- };
29
-
30
- const processWeekday = (
31
- dateStringParts: string[],
32
- year: Year | undefined,
33
- month: Month | undefined,
34
- day: Day | undefined,
35
- weekday: Weekday | undefined,
36
- date: Date,
37
- ) => {
38
- if (typeof weekday === 'undefined') return;
39
- let weekdayString = FR_WEEKDAYS[weekday][date.getDay()];
40
- if (
41
- (typeof year !== 'undefined'
42
- || typeof month !== 'undefined'
43
- || typeof day !== 'undefined') && weekday !== 'long'
44
- ) {
45
- weekdayString += '.';
46
- }
47
- dateStringParts.push(weekdayString);
48
- };
49
-
50
- const processDay = (
51
- dateParts: string[], day: Day | undefined, month: Month | undefined, date: Date,
52
- ) => {
53
- if (typeof day === 'undefined') return;
54
- const strDate = date.getDate().toString();
55
- dateParts.push(
56
- strDate.length === 1 && month !== 'short' && month !== 'long' ? `0${strDate}` : strDate,
57
- );
58
- };
59
-
60
- const processMonth = (
61
- dateParts: string[],
62
- month: Month | undefined,
63
- date: Date,
64
- ) => {
65
- if (typeof month === 'undefined') return;
66
- if (month === '2-digit' || month === 'numeric') {
67
- const strMonth = (date.getMonth() + 1).toString();
68
- dateParts.push(
69
- strMonth.length === 1 ? `0${strMonth}` : strMonth,
70
- );
71
- } else {
72
- const finalMonth = FR_MONTHS[month][date.getMonth()];
73
- if (month === 'short') dateParts.push(`${finalMonth}.`);
74
- else dateParts.push(finalMonth);
75
- }
76
- };
77
-
78
- const toLocaleDateString = (date: Date) => (
79
- { weekday, year, month, day }: DateTimeFormatOptions = {
80
- year: 'numeric', month: '2-digit', day: '2-digit',
81
- },
82
- ) => {
83
- const dateStringParts: string[] = [];
84
- processWeekday(dateStringParts, year, month, day, weekday, date);
85
- const dateConnection = month === '2-digit' || month === 'numeric' ? '/' : ' ';
86
- const dateParts: string[] = [];
87
- processDay(dateParts, day, month, date);
88
- processMonth(dateParts, month, date);
89
- processYear(dateParts, year, date);
90
- dateStringParts.push(dateParts.join(dateConnection));
91
- return dateStringParts.join(' ');
92
- };
93
-
94
- export const frDateFormatter = dateFormatter(toTwoDigitLocaleTimeString, toLocaleDateString, ' ');
@@ -1,101 +0,0 @@
1
- import { processYear, dateFormatter, toNumericLocaleTimeString } from './common';
2
- import { DateTimeFormatOptions, Day, Month, Weekday } from './types';
3
-
4
- const HE_MONTHS = {
5
- narrow: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
6
- short: [
7
- 'ינו׳',
8
- 'פבר׳',
9
- 'מרץ',
10
- 'אפר׳',
11
- 'מאי',
12
- 'יוני',
13
- 'יולי',
14
- 'אוג׳',
15
- 'ספט׳',
16
- 'אוק׳',
17
- 'נוב׳',
18
- 'דצמ׳',
19
- ],
20
- long: [
21
- 'ינואר',
22
- 'פברואר',
23
- 'מרץ',
24
- 'אפריל',
25
- 'מאי',
26
- 'יוני',
27
- 'יולי',
28
- 'אוגוסט',
29
- 'ספטמבר',
30
- 'אוקטובר',
31
- 'נובמבר',
32
- 'דצמבר',
33
- ],
34
- };
35
-
36
- const HE_WEEKDAYS = {
37
- narrow: ['א׳', 'ב׳', 'ג׳', 'ד׳', 'ה׳', 'ו׳', 'ש׳'],
38
- short: ['יום א׳', 'יום ב׳', 'יום ג׳', 'יום ד׳', 'יום ה׳', 'יום ו׳', 'שבת'],
39
- long: ['יום ראשון', 'יום שני', 'יום שלישי', 'יום רביעי', 'יום חמישי', 'יום שישי', 'יום שבת'],
40
- };
41
-
42
- const processWeekday = (
43
- dateStringParts: string[],
44
- weekday: Weekday | undefined,
45
- date: Date,
46
- ) => {
47
- if (typeof weekday === 'undefined') return;
48
- const weekdayString = HE_WEEKDAYS[weekday][date.getDay()];
49
- dateStringParts.push(`${weekdayString},`);
50
- };
51
-
52
- const processDay = (dateParts: string[], day: Day | undefined, date: Date) => {
53
- if (typeof day === 'undefined') return;
54
- const strDate = date.getDate().toString();
55
- dateParts.push(strDate);
56
- };
57
-
58
- const processMonth = (
59
- dateParts: string[],
60
- day:Day | undefined,
61
- month: Month | undefined,
62
- date: Date,
63
- ) => {
64
- if (typeof month === 'undefined') return;
65
- if (month === '2-digit' || month === 'numeric') {
66
- const strMonth = (date.getMonth() + 1).toString();
67
- dateParts.push(strMonth);
68
- return;
69
- }
70
- const finalMonth = HE_MONTHS[month][date.getMonth()];
71
- if (day != null) {
72
- dateParts.push(`ב${finalMonth}`);
73
- return;
74
- }
75
- dateParts.push(finalMonth);
76
- };
77
-
78
- const toLocaleDateString = (date: Date) => (
79
- { weekday, year, month, day }: DateTimeFormatOptions = {
80
- year: 'numeric', month: '2-digit', day: '2-digit',
81
- },
82
- ) => {
83
- const dateStringParts: string[] = [];
84
- processWeekday(dateStringParts, weekday, date);
85
- const dateConnection = month === 'numeric' || month === '2-digit' ? '.' : '';
86
- const dateParts: string[] = [];
87
- processDay(dateParts, day, date);
88
- if ((month === 'narrow'
89
- || month === 'short'
90
- || month === 'long')
91
- && day != null
92
- ) {
93
- dateParts.push(' ');
94
- }
95
- processMonth(dateParts, day, month, date);
96
- if (month === 'long') dateParts.push(' ');
97
- processYear(dateParts, year, date);
98
- dateStringParts.push(dateParts.join(dateConnection));
99
- return dateStringParts.join(' ');
100
- };
101
- export const heDateFormatter = dateFormatter(toNumericLocaleTimeString, toLocaleDateString);
@@ -1,47 +0,0 @@
1
- import { HOUR_IN_MS, MINUTE_IN_MS } from '@24i/bigscreen-sdk/utils';
2
- import * as TwentyFourIMediaTimeApi from '../services/24iMediaTimeApi';
3
-
4
- type ParamOptions = TwentyFourIMediaTimeApi.ParamOptions;
5
-
6
- const defaultOptions: ParamOptions = {
7
- timeoutInMs: 30000,
8
- retryConfig: {
9
- retry: 2,
10
- },
11
- };
12
-
13
- /**
14
- * Returns a tring in ISO format followed by +/-hh:mm suffix for timezone offset.
15
- * @param resp Time api response.
16
- * @returns ISO string with timezone data.
17
- */
18
- const getIsoDateString = (resp: TwentyFourIMediaTimeApi.ServiceDataResponse): string => {
19
- let datetime = new Date(resp.timestamp + resp.timezone_offset).toISOString();
20
- const offset = resp.timezone_offset / HOUR_IN_MS;
21
- if (offset) {
22
- const sign = offset > 0 ? '+' : '-';
23
- const hours = Math.abs(offset);
24
- const minutes = Math.floor((resp.timezone_offset % HOUR_IN_MS) / MINUTE_IN_MS);
25
- // eslint-disable-next-line no-magic-numbers, sonarjs/no-nested-template-literals
26
- const timeString = `${sign + `0${hours}`.slice(-2)}:${`0${minutes}`.slice(-2)}`;
27
- datetime = datetime.replace('Z', timeString);
28
- }
29
- return datetime;
30
- };
31
-
32
- /**
33
- * Wrapper over "TwentyFourIMediaTimeApi.getTime" method requesting the current time
34
- * from timekeeping server. Transforms the result to ISO string with timezone offset data
35
- * included.
36
- *
37
- * @param options Options object
38
- */
39
- export const getTime = async (options: ParamOptions = {}) => {
40
- const opts = { ...defaultOptions, ...options };
41
- const resp = await TwentyFourIMediaTimeApi.getTime(opts);
42
-
43
- if ('timestamp' in resp && 'timezone_offset' in resp && 'in_dst' in resp) {
44
- return { datetime: getIsoDateString(resp) };
45
- }
46
- return null;
47
- };
@@ -1,43 +0,0 @@
1
- /**
2
- * Package "24iMediaTimeApi" provides a single function to obtain the current time
3
- * adjusted by local timezone and daylight savings time for use in time package,
4
- * from 24i time API at https://time.24imedia.tv/
5
- */
6
- import {
7
- xhrSendRetry, type RetryConfig, type XhrResponse,
8
- } from '@24i/bigscreen-sdk/utils/xhr';
9
-
10
- const API_URL = 'https://time.24imedia.tv/';
11
-
12
- export type Options = {
13
- /** The request timeout in milliseconds. The value 0 for no timeout */
14
- timeoutInMs: number,
15
- /** Retry configuration */
16
- retryConfig: RetryConfig,
17
- };
18
- export type ParamOptions = Partial<Options>;
19
-
20
- export type ServiceDataResponse = {
21
- /** Is dailight savings time */
22
- in_dst: boolean,
23
- /** Current time in GMT, in milliseconds */
24
- timestamp: number,
25
- /** Timezeone offset in milliseconds */
26
- timezone_offset: number,
27
- };
28
-
29
- /**
30
- * Request the current time based on public IP of request.
31
- *
32
- * @param options Options object
33
- */
34
- export async function getTime(options?: ParamOptions): Promise<ServiceDataResponse> {
35
- try {
36
- const resp = (await xhrSendRetry(API_URL, options)) as XhrResponse;
37
- const data: any = resp.dataJson || {};
38
- return data as ServiceDataResponse;
39
- } catch (e) {
40
- console.error('[24iMediaTimeApi] Failed to get time', e);
41
- throw e;
42
- }
43
- }
@@ -1,6 +0,0 @@
1
- export {
2
- Options,
3
- ParamOptions,
4
- ServiceDataResponse,
5
- getTime,
6
- } from './24iMediaTimeApi';
@@ -1,14 +0,0 @@
1
- import { Reference, unwrapReference } from '@24i/bigscreen-sdk/jsx';
2
-
3
- /**
4
- * To force a DOM reflow on given DOM element. It can be needed for transitions
5
- * or other purposes.
6
- * @param elementOrReference DOM element or reference to element on which reflow is called.
7
- */
8
- export const forceReflow = (
9
- elementOrReference: HTMLElement | Reference<HTMLElement>,
10
- ) => {
11
- const element = unwrapReference(elementOrReference);
12
- if (!element) return;
13
- void element.offsetHeight; // eslint-disable-line no-void
14
- };
@@ -1,6 +0,0 @@
1
- export {
2
- registerKeyPressSimulator,
3
- unregisterKeyPressSimulator,
4
- dispatchKeyboardEvent,
5
- } from './keyPressSimulator';
6
- export { simulateKeyPress } from './simulateKeyPress';
@@ -1,74 +0,0 @@
1
- import { Key } from '@24i/bigscreen-sdk/driver-base/keymap';
2
- import { stopEvent } from '@24i/bigscreen-sdk/utils';
3
-
4
- let keysPressed: Record<number, boolean>;
5
-
6
- interface CustomKeyboardEvent extends KeyboardEvent {
7
- skipKeyPressSimulation: boolean;
8
- }
9
-
10
- const shouldSkipEvent = (e: KeyboardEvent) => (
11
- Boolean((e as CustomKeyboardEvent).skipKeyPressSimulation)
12
- );
13
-
14
- const onKeyDown = (e: KeyboardEvent) => {
15
- if (shouldSkipEvent(e)) return;
16
- const { keyCode } = e;
17
- if (keysPressed[keyCode] === true) {
18
- console.warn(`Key ${e.code} (${e.keyCode}) is skipped by the key press simulator`);
19
- stopEvent(e);
20
- } else if (typeof keysPressed[keyCode] !== 'undefined') {
21
- keysPressed[keyCode] = true;
22
- }
23
- };
24
-
25
- const onKeyUp = (e: KeyboardEvent) => {
26
- const { keyCode } = e;
27
- if (keysPressed[keyCode] === true) keysPressed[keyCode] = false;
28
- };
29
-
30
- /**
31
- * Modifies `keydown` event behavior to similar to `keypress` and causes
32
- * triggering `keydown` event only once before the key is released. This is
33
- * because `keypress` event is deprecated and it is not implemented with the same
34
- * behavior on all platforms. This functionality is applied across the board for
35
- * all provided keys globally. To use in one specific handler only
36
- * use `simulateKeyPress` util.
37
- * @param keys array with keys to behave as keypress
38
- */
39
- export const registerKeyPressSimulator = (keys: Key[]) => {
40
- keysPressed = {};
41
- keys.forEach((key) => {
42
- keysPressed[key.keyCode] = false;
43
- });
44
- window.document.addEventListener('keydown', onKeyDown, true);
45
- window.document.addEventListener('keyup', onKeyUp, true);
46
- };
47
-
48
- /**
49
- * Unregister key press simulator events, turn off the functionality.
50
- */
51
- export const unregisterKeyPressSimulator = () => {
52
- window.document.removeEventListener('keydown', onKeyDown, true);
53
- window.document.removeEventListener('keyup', onKeyUp, true);
54
- };
55
-
56
- /**
57
- * This should be the main method for manually dispatching keyboard events when the
58
- * key press simulator is registered in the app. When parameter `skipKeyPressSimulation`
59
- * is `true`, those event's won't be caught by the key press simulator and
60
- * are no longer under it's influence. Key press simulator should work only with events
61
- * generated from input device.
62
- * @param target element target to dispatch event
63
- * @param event dispatching event
64
- * @param skipKeyPressSimulation default value is `true`, when false, the event
65
- * will be caught by the simulator and other dispatched events will be stopped.
66
- */
67
- export const dispatchKeyboardEvent = (
68
- target: HTMLElement,
69
- event: KeyboardEvent,
70
- skipKeyPressSimulation = true,
71
- ) => {
72
- (event as CustomKeyboardEvent).skipKeyPressSimulation = skipKeyPressSimulation;
73
- target.dispatchEvent(event);
74
- };
@@ -1,25 +0,0 @@
1
- const NO_KEY = -1;
2
-
3
- /**
4
- * Returns a new `keydown` handler wrapped with the simulated key press functionality.
5
- * Modifies `keydown` event behavior to similar to `keypress` and causes triggering keydown
6
- * event only once before the key is released. This is because `keypress` event is deprecated
7
- * and it is not implemented with the same behavior on all platforms. Apply this globally for
8
- * the specific keys by using `keyPressSimulator` util.
9
- * @param onKeyDown original handler for keydown event
10
- * @returns decorated handler with key press functionality
11
- */
12
- export const simulateKeyPress = (onKeyDown: (e: KeyboardEvent) => void) => {
13
- let keyPressed = NO_KEY;
14
- const onKeyUp = (e: KeyboardEvent) => {
15
- if (e.keyCode !== keyPressed) return;
16
- window.document.removeEventListener('keyup', onKeyUp);
17
- keyPressed = NO_KEY;
18
- };
19
- return (e: KeyboardEvent) => {
20
- if (keyPressed !== NO_KEY) return;
21
- keyPressed = e.keyCode;
22
- window.document.addEventListener('keyup', onKeyUp);
23
- onKeyDown(e);
24
- };
25
- };
@@ -1,156 +0,0 @@
1
- import { ok } from 'assert';
2
- import { execSync, ExecSyncOptions } from 'child_process';
3
-
4
- const NO_VERIFY_PARAM = '--no-verify';
5
- const branchNames = {
6
- dev: 'development',
7
- main: 'master',
8
- release: 'release',
9
- };
10
-
11
- const cmdSync = (command: string, options?: ExecSyncOptions) => execSync(command, options);
12
- const cmdSyncInheritOut = (command: string) => cmdSync(command, { stdio: 'inherit' });
13
- const cmdSyncPipeOut = (command: string) => cmdSync(command, { stdio: 'pipe' });
14
- const cmdSyncTrimOut = (command: string) => cmdSync(command).toString().trim();
15
-
16
- const splitByNewLine = (string = '') => string.split(/\r?\n/);
17
-
18
- const statusList = () => {
19
- const gitCmd = 'git status --porcelain';
20
- const outputString = cmdSyncTrimOut(gitCmd);
21
-
22
- if (!outputString) return [];
23
- const handleMultipleWhitespaces = (rowString: string) => {
24
- const spaceChar = ' ';
25
- const parts = rowString.split(spaceChar);
26
- return parts.filter(Boolean).join(spaceChar);
27
- };
28
-
29
- return splitByNewLine(outputString).map(handleMultipleWhitespaces);
30
- };
31
- const createBranch = (branchName: string) => cmdSyncPipeOut(`git branch ${branchName}`);
32
- const checkout = (branchName: string) => cmdSyncPipeOut(`git checkout ${branchName}`);
33
- const addAll = () => cmdSyncPipeOut('git add --all');
34
-
35
- const commit = (commitMessage: string, noVerify = false) => {
36
- const maybeNoVerifyParam = noVerify ? NO_VERIFY_PARAM : '';
37
- return cmdSyncPipeOut(`git commit -m "${commitMessage}" ${maybeNoVerifyParam}`.trimEnd());
38
- };
39
-
40
- const push = (branchName: string, noVerify = false) => {
41
- const maybeNoVerifyParam = noVerify ? NO_VERIFY_PARAM : '';
42
- const cmd = `git push --set-upstream origin ${branchName} ${maybeNoVerifyParam}`.trimEnd();
43
- return cmdSyncPipeOut(cmd);
44
- };
45
-
46
- const pushTag = (version: string, noVerify = false) => {
47
- const maybeNoVerifyParam = noVerify ? NO_VERIFY_PARAM : '';
48
- const cmd = `git push origin v${version} ${maybeNoVerifyParam}`.trimEnd();
49
- return cmdSyncPipeOut(cmd);
50
- };
51
-
52
- const assertEmptyStatusList = () => {
53
- ok(statusList().length === 0, 'An empty GIT stage is expected!');
54
- };
55
-
56
- const getCurrentBranchName = () => cmdSyncTrimOut('git branch --show-current');
57
-
58
- const remoteBranchExists = (expectedBranchName: string) => {
59
- const gitCmd = `git ls-remote --heads origin ${expectedBranchName}`;
60
- const output = cmdSyncTrimOut(gitCmd);
61
- return Boolean(output);
62
- };
63
-
64
- // only for GitHub
65
- const pullRequest = (fromBranch: string, toBranch: string, prTitle: string) => {
66
- const cmdTool = 'hub';
67
- const installDocUrl = 'https://github.com/github/hub#installation';
68
- const errorMsg = `${cmdTool} is not installed! See ${installDocUrl}\n`;
69
-
70
- try {
71
- const toolPath = cmdSyncTrimOut(`${cmdTool} --version`);
72
- ok(toolPath, errorMsg);
73
- } catch (error) {
74
- throw new Error(errorMsg);
75
- }
76
-
77
- const cmd = `${cmdTool} pull-request -m "${prTitle}" --head ${fromBranch} --base ${toBranch}`;
78
- cmdSyncInheritOut(cmd);
79
- };
80
-
81
- const assertCurrentBranch = (expectedBranchName: string) => {
82
- const currentGitBranchName = getCurrentBranchName();
83
- // eslint-disable-next-line max-len
84
- const errorMsg = `The ${expectedBranchName} branch is expected to be active, not "${currentGitBranchName}"`;
85
- ok(currentGitBranchName === expectedBranchName, errorMsg);
86
- };
87
-
88
- const bumpVersion = (version: string | 'major' | 'minor' | 'patch') => {
89
- // it bumps version, creates commit and GIT tag
90
- execSync(`npm version ${version}`, { stdio: 'inherit' });
91
- };
92
-
93
- const getNewReleaseBranchName = () => {
94
- const date = new Date();
95
- const yyyy = date.getFullYear();
96
- const mm = String(date.getMonth() + 1).padStart(2, '0');
97
- const dd = String(date.getDate()).padStart(2, '0');
98
- let bod = 0;
99
- const dateString = `${yyyy}-${mm}-${dd}`;
100
- while (true) {
101
- bod += 1;
102
- const bodString = String(bod).padStart(2, '0');
103
- const branchName = `${branchNames.release}/${dateString}-${bodString}`;
104
- if (!remoteBranchExists(branchName)) {
105
- return branchName;
106
- }
107
- }
108
- };
109
-
110
- /**
111
- * Release process.
112
- * @param versionType Version type one of 'major', 'minor', 'patch' or specific
113
- * version like '0.0.2'.
114
- */
115
- const release = (versionType: string | 'major' | 'minor' | 'patch') => {
116
- console.log(`Start release with version: ${versionType}`);
117
- assertCurrentBranch(branchNames.dev);
118
- assertEmptyStatusList();
119
- const newReleaseBranchName = getNewReleaseBranchName();
120
-
121
- console.log(`Creating "${newReleaseBranchName}" branch ...`);
122
- createBranch(newReleaseBranchName);
123
- checkout(newReleaseBranchName);
124
-
125
- console.log(`Bumping version with "${versionType}" ...`);
126
- bumpVersion(versionType);
127
- const version = cmdSyncTrimOut('npm pkg get version').replace(/"/g, '');
128
- ok(version, 'Oops, cannot get current version from package.json');
129
-
130
- console.log(`Publishing package version: ${version} ...`);
131
- cmdSyncInheritOut('npm publish');
132
-
133
- console.log(`Generating changelog: ${version} ...`);
134
- cmdSyncInheritOut('npm run generate-changelog');
135
- addAll(); // add version changes (changelog) into a git stage
136
-
137
- console.log('Creating commit with changed version and changelog ...');
138
- commit('chore(CHANGELOG): generated changelog', true);
139
-
140
- console.log(`Pushing ${newReleaseBranchName} branch ...`);
141
- push(newReleaseBranchName, true);
142
-
143
- console.log(`Pushing ${version} tag ...`);
144
- pushTag(version, true);
145
-
146
- const prTitle = `Release: ${newReleaseBranchName.split('/')[1]}`;
147
- // eslint-disable-next-line max-len
148
- console.log(`Creating Pull Request from ${newReleaseBranchName} branch to ${branchNames.main} branch...`);
149
- console.log(`Applied PR title: "${prTitle}"`);
150
- pullRequest(newReleaseBranchName, branchNames.main, prTitle);
151
-
152
- console.log('Done!');
153
- };
154
-
155
- const version = process.argv[2] || 'patch'; // 'major' | 'minor' | 'patch'
156
- release(version);