dana-cli 0.0.0-stage → 0.0.26

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 (288) hide show
  1. package/.github/dependabot.yml +43 -0
  2. package/.github/labeler.yml +30 -0
  3. package/.github/workflows/bump.yml +51 -0
  4. package/.github/workflows/ci-cd.yml +110 -0
  5. package/.github/workflows/dependabot-automerge-call.yml +13 -0
  6. package/.nvmrc +1 -0
  7. package/.prettierignore +4 -0
  8. package/.prettierrc +4 -0
  9. package/CODEOWNERS +5 -0
  10. package/README.md +50 -2
  11. package/bin/bump.js +48 -0
  12. package/eslint.config.mjs +12 -0
  13. package/images/vodScreen1.png +0 -0
  14. package/package.json +53 -5
  15. package/sonar-project.properties +20 -0
  16. package/tools/cli/README.md +51 -0
  17. package/tools/cli/__mocks__/fs/promises.cjs +4 -0
  18. package/tools/cli/bin/dana.js +3 -0
  19. package/tools/cli/dana_completion.sh +156 -0
  20. package/tools/cli/eslint.config.mjs +14 -0
  21. package/tools/cli/package.json +67 -0
  22. package/tools/cli/rollup.config.mjs +26 -0
  23. package/tools/cli/src/commands/addComponent/addMenu/add-menu.ts +65 -0
  24. package/tools/cli/src/commands/addComponent/addMenu/addMenuDefinition.ts +21 -0
  25. package/tools/cli/src/commands/addComponent/addRail/add-rail.ts +59 -0
  26. package/tools/cli/src/commands/addComponent/addRail/addRailDefinition.ts +34 -0
  27. package/tools/cli/src/commands/addComponent/addScreen/add-screen.ts +42 -0
  28. package/tools/cli/src/commands/addComponent/addScreen/addScreenDefinition.ts +17 -0
  29. package/tools/cli/src/commands/addComponent/addScrollView/add-scrollView.ts +48 -0
  30. package/tools/cli/src/commands/addComponent/addScrollView/addScrollViewDefinition.ts +16 -0
  31. package/tools/cli/src/commands/addComponent/config/ComponentConfig.ts +169 -0
  32. package/tools/cli/src/commands/addComponent/config/componentTypes.ts +38 -0
  33. package/tools/cli/src/commands/addComponent/const/componentConst.ts +20 -0
  34. package/tools/cli/src/commands/addComponent/const/defaultConfig.ts +28 -0
  35. package/tools/cli/src/commands/addComponent/const/navigationConst.ts +36 -0
  36. package/tools/cli/src/commands/addComponent/createComponent.ts +45 -0
  37. package/tools/cli/src/commands/addComponent/helper/ComponentHelper.ts +98 -0
  38. package/tools/cli/src/commands/addDevice/add-device.ts +106 -0
  39. package/tools/cli/src/commands/addDevice/addDeviceDefinition.ts +13 -0
  40. package/tools/cli/src/commands/addDevice/deviceConfig/androidtvConfig.ts +142 -0
  41. package/tools/cli/src/commands/addDevice/deviceConfig/configTypes.ts +44 -0
  42. package/tools/cli/src/commands/addDevice/deviceConfig/deviceConfig.ts +38 -0
  43. package/tools/cli/src/commands/addDevice/deviceConfig/titanosConfig.ts +17 -0
  44. package/tools/cli/src/commands/addDevice/deviceConfig/tizenConfig.ts +64 -0
  45. package/tools/cli/src/commands/addDevice/deviceConfig/tvosConfig.ts +50 -0
  46. package/tools/cli/src/commands/addDevice/deviceConfig/vidaaConfig.ts +17 -0
  47. package/tools/cli/src/commands/addDevice/deviceConfig/webosConfig.ts +64 -0
  48. package/tools/cli/src/commands/addDevice/helper/addDeviceHelper.ts +121 -0
  49. package/tools/cli/src/commands/addDianaSkills/add-dianaSkills.ts +55 -0
  50. package/tools/cli/src/commands/addDianaSkills/addDianaSkillsDefinition.ts +13 -0
  51. package/tools/cli/src/commands/addDianaSkills/dianaDependencies.ts +15 -0
  52. package/tools/cli/src/commands/addModule/add-module.ts +46 -0
  53. package/tools/cli/src/commands/addModule/addModuleDefinition.ts +17 -0
  54. package/tools/cli/src/commands/addModule/moduleConst.ts +18 -0
  55. package/tools/cli/src/commands/authentication/AuthenticationManager.ts +255 -0
  56. package/tools/cli/src/commands/authentication/authDefinition.ts +51 -0
  57. package/tools/cli/src/commands/authentication/authHook.ts +50 -0
  58. package/tools/cli/src/commands/authentication/authentConst.ts +6 -0
  59. package/tools/cli/src/commands/authentication/commands/get-packages-token.ts +40 -0
  60. package/tools/cli/src/commands/authentication/commands/login.ts +63 -0
  61. package/tools/cli/src/commands/authentication/commands/logout.ts +26 -0
  62. package/tools/cli/src/commands/authentication/commands/status.ts +47 -0
  63. package/tools/cli/src/commands/authentication/helper/CodeArtifactHelper.ts +66 -0
  64. package/tools/cli/src/commands/authentication/helper/CommandHelper.ts +9 -0
  65. package/tools/cli/src/commands/authentication/helper/CredentialsHelper.ts +176 -0
  66. package/tools/cli/src/commands/authentication/helper/SPM.ts +95 -0
  67. package/tools/cli/src/commands/authentication/tokenHook.ts +30 -0
  68. package/tools/cli/src/commands/commandHelp/customHelp.ts +31 -0
  69. package/tools/cli/src/commands/completion/completion.ts +53 -0
  70. package/tools/cli/src/commands/completion/completionDefinition.ts +16 -0
  71. package/tools/cli/src/commands/createApp/const/createAppTasks.ts +133 -0
  72. package/tools/cli/src/commands/createApp/const/setupConst.ts +16 -0
  73. package/tools/cli/src/commands/createApp/const/templateConst.ts +10 -0
  74. package/tools/cli/src/commands/createApp/createApp.ts +60 -0
  75. package/tools/cli/src/commands/createApp/createAppDefinition.ts +26 -0
  76. package/tools/cli/src/commands/createApp/helpers/CreateAppHelper.ts +167 -0
  77. package/tools/cli/src/commands/createApp/helpers/SetupChecker.ts +98 -0
  78. package/tools/cli/src/commands/hooks/checkDanaProjectHook.ts +30 -0
  79. package/tools/cli/src/commands/zip/zip.ts +26 -0
  80. package/tools/cli/src/commands/zip/zipDefinition.ts +13 -0
  81. package/tools/cli/src/common/commonConst.ts +1 -0
  82. package/tools/cli/src/common/const/deviceConst.ts +110 -0
  83. package/tools/cli/src/common/const/exitCodeConst.ts +12 -0
  84. package/tools/cli/src/common/helpers/CreateArchiveHelper.ts +55 -0
  85. package/tools/cli/src/common/helpers/CreateFileHelper.ts +199 -0
  86. package/tools/cli/src/common/helpers/InputValidator.ts +58 -0
  87. package/tools/cli/src/common/helpers/InstallHelper.ts +202 -0
  88. package/tools/cli/src/common/helpers/UpdateFileHelper.ts +239 -0
  89. package/tools/cli/src/common/helpers/UserInputGetter.ts +145 -0
  90. package/tools/cli/src/common/helpers/handlebarsHelper.ts +31 -0
  91. package/tools/cli/src/common/helpers/stringHelper.ts +25 -0
  92. package/tools/cli/src/common/translation/en.json +87 -0
  93. package/tools/cli/src/common/translation/translation.ts +6 -0
  94. package/tools/cli/src/common/types/helperTypes.ts +79 -0
  95. package/tools/cli/src/index.ts +16 -0
  96. package/tools/cli/src/program.ts +59 -0
  97. package/tools/cli/tests/commands/addComponent/addMenu/add-menu.test.ts +96 -0
  98. package/tools/cli/tests/commands/addComponent/addRail/add-rail.test.ts +57 -0
  99. package/tools/cli/tests/commands/addComponent/addScreen/add-screen.test.ts +55 -0
  100. package/tools/cli/tests/commands/addComponent/addScrollView/add-scrollView.test.ts +89 -0
  101. package/tools/cli/tests/commands/addComponent/config/ComponentConfig.test.ts +261 -0
  102. package/tools/cli/tests/commands/addComponent/createComponent.test.ts +87 -0
  103. package/tools/cli/tests/commands/addComponent/helper/ComponentHelper.test.ts +110 -0
  104. package/tools/cli/tests/commands/addDevice/add-device.test.ts +117 -0
  105. package/tools/cli/tests/commands/addDevice/deviceConfig/androidtvConfig.test.ts +184 -0
  106. package/tools/cli/tests/commands/addDevice/deviceConfig/deviceConfig.test.ts +30 -0
  107. package/tools/cli/tests/commands/addDevice/deviceConfig/titanosConfig.test.ts +20 -0
  108. package/tools/cli/tests/commands/addDevice/deviceConfig/tizenConfig.test.ts +63 -0
  109. package/tools/cli/tests/commands/addDevice/deviceConfig/tvosConfig.test.ts +47 -0
  110. package/tools/cli/tests/commands/addDevice/deviceConfig/vidaaConfig.test.ts +20 -0
  111. package/tools/cli/tests/commands/addDevice/deviceConfig/webosConfig.test.ts +74 -0
  112. package/tools/cli/tests/commands/addDevice/helper/addDeviceHelper.test.ts +144 -0
  113. package/tools/cli/tests/commands/addDianaSkills/add-dianaSkills.test.ts +72 -0
  114. package/tools/cli/tests/commands/addModule/add-module.test.ts +108 -0
  115. package/tools/cli/tests/commands/authentication/AuthenticationManager.test.ts +756 -0
  116. package/tools/cli/tests/commands/authentication/commands/authDefinition.test.ts +53 -0
  117. package/tools/cli/tests/commands/authentication/commands/authHook.test.ts +94 -0
  118. package/tools/cli/tests/commands/authentication/commands/get-packages-token.test.ts +69 -0
  119. package/tools/cli/tests/commands/authentication/commands/login.test.ts +170 -0
  120. package/tools/cli/tests/commands/authentication/commands/logout.test.ts +77 -0
  121. package/tools/cli/tests/commands/authentication/commands/status.test.ts +73 -0
  122. package/tools/cli/tests/commands/authentication/helper/CredentialsHelper.test.ts +352 -0
  123. package/tools/cli/tests/commands/authentication/helper/SPM.test.ts +229 -0
  124. package/tools/cli/tests/commands/cliHelp/customHelp.test.ts +24 -0
  125. package/tools/cli/tests/commands/completion/completion.test.ts +76 -0
  126. package/tools/cli/tests/commands/createApp/const/createAppTasks.test.ts +70 -0
  127. package/tools/cli/tests/commands/createApp/createApp.test.ts +116 -0
  128. package/tools/cli/tests/commands/createApp/helpers/CreateAppHelper.test.ts +197 -0
  129. package/tools/cli/tests/commands/createApp/helpers/SetupChecker.test.ts +152 -0
  130. package/tools/cli/tests/commands/createApp/helpers/fixtures/myApp/scripts/app/ui/screens/SplashScreen.js +70 -0
  131. package/tools/cli/tests/commands/hooks/checkDanaProjectHook.test.ts +55 -0
  132. package/tools/cli/tests/commands/zip/zip.test.ts +51 -0
  133. package/tools/cli/tests/common/helpers/CreateArchiveHelper.test.ts +69 -0
  134. package/tools/cli/tests/common/helpers/CreateFileHelper.test.ts +359 -0
  135. package/tools/cli/tests/common/helpers/InputValidator.test.ts +93 -0
  136. package/tools/cli/tests/common/helpers/InstallHelper.test.ts +262 -0
  137. package/tools/cli/tests/common/helpers/UpdateFileHelper.test.ts +288 -0
  138. package/tools/cli/tests/common/helpers/UserInputGetter.test.ts +182 -0
  139. package/tools/cli/tests/common/helpers/handlebarsHelper.test.ts +87 -0
  140. package/tools/cli/tests/common/helpers/stringHelper.test.ts +35 -0
  141. package/tools/cli/tests/program.test.ts +215 -0
  142. package/tools/cli/tsconfig.json +19 -0
  143. package/tools/cli/tsconfig.test.json +4 -0
  144. package/tools/cli/vitest.config.ts +4 -0
  145. package/tools/templates/app-template/.dana/.gitkeep +0 -0
  146. package/tools/templates/app-template/Gruntfile.js +31 -0
  147. package/tools/templates/app-template/README.md +17 -0
  148. package/tools/templates/app-template/app.config.json +56 -0
  149. package/tools/templates/app-template/editorconfigTemplate.hbs +18 -0
  150. package/tools/templates/app-template/eslintrc.jsonTemplate.hbs +5 -0
  151. package/tools/templates/app-template/gitignoreTemplate.hbs +27 -0
  152. package/tools/templates/app-template/i18n/LocaleStringEnUS.json +7 -0
  153. package/tools/templates/app-template/i18n/README.md +32 -0
  154. package/tools/templates/app-template/images/dana.png +0 -0
  155. package/tools/templates/app-template/images/dana_logo.png +0 -0
  156. package/tools/templates/app-template/images/dana_logo_light.png +0 -0
  157. package/tools/templates/app-template/images/loading.png +0 -0
  158. package/tools/templates/app-template/nvmrcTemplate.hbs +1 -0
  159. package/tools/templates/app-template/package.json +33 -0
  160. package/tools/templates/app-template/profiles/app.config.browser-css.json +16 -0
  161. package/tools/templates/app-template/profiles/app.config.browser-lightning.json +16 -0
  162. package/tools/templates/app-template/scripts/app/README.md +6 -0
  163. package/tools/templates/app-template/scripts/app/TemplateAppRoutes.js.hbs +18 -0
  164. package/tools/templates/app-template/scripts/app/app.js.hbs +17 -0
  165. package/tools/templates/app-template/scripts/app/theme/AppTheme.js +57 -0
  166. package/tools/templates/app-template/scripts/app/ui/screens/AppScreen.js +106 -0
  167. package/tools/templates/app-template/scripts/app/ui/screens/SplashScreen.js +70 -0
  168. package/tools/templates/app-template/scripts/app/ui/views/LoaderView.js +31 -0
  169. package/tools/templates/app-template/styles/fonts/Roboto-Bold.ttf +0 -0
  170. package/tools/templates/app-template/styles/fonts/Roboto-Regular.ttf +0 -0
  171. package/tools/templates/app-template/tests/README.md +70 -0
  172. package/tools/templates/app-template/tests/automation/features/splash.feature +5 -0
  173. package/tools/templates/app-template/tests/automation/init.js +20 -0
  174. package/tools/templates/app-template/tests/automation/steps-definitions/dictionary.js +31 -0
  175. package/tools/templates/app-template/tests/automation/steps-definitions/helpers.js +9 -0
  176. package/tools/templates/app-template/tests/unit/README.md +7 -0
  177. package/tools/templates/app-template/tests/unit/app/TemplateAppRoutes.js.hbs +24 -0
  178. package/tools/templates/assets/fonts/fa-solid-900.ttf +0 -0
  179. package/tools/templates/components/ButtonItemView.js.hbs +69 -0
  180. package/tools/templates/components/ButtonView.js.hbs +65 -0
  181. package/tools/templates/components/ScrollItemView.js.hbs +53 -0
  182. package/tools/templates/components/ScrollView.js.hbs +43 -0
  183. package/tools/templates/components/TileView.js.hbs +55 -0
  184. package/tools/templates/components/screen.js.hbs +74 -0
  185. package/tools/templates/components/settings.js.hbs +74 -0
  186. package/tools/templates/components/vod.js.hbs +104 -0
  187. package/tools/templates/components/wtvMenuListView.js.hbs +38 -0
  188. package/tools/templates/components/wtvRailListView.js.hbs +44 -0
  189. package/tools/templates/index.ts +3 -0
  190. package/tools/templates/mocks/menuMock.json +29 -0
  191. package/tools/templates/mocks/railMock.json +101 -0
  192. package/tools/templates/mocks/scrollViewMock.json +165 -0
  193. package/tools/templates/modules/fip/images/12.png +0 -0
  194. package/tools/templates/modules/fip/images/audioD.png +0 -0
  195. package/tools/templates/modules/fip/package.json +5 -0
  196. package/tools/templates/modules/fip/scripts/FipModule.js +19 -0
  197. package/tools/templates/modules/fip/scripts/FipRoutes.js +19 -0
  198. package/tools/templates/modules/fip/scripts/services/mock/fipMock.json +12 -0
  199. package/tools/templates/modules/fip/scripts/ui/screens/FipScreen.js +169 -0
  200. package/tools/templates/modules/fip/scripts/ui/views/FipContentInfoView.js +77 -0
  201. package/tools/templates/modules/fip/scripts/ui/views/InfoDetailImageView.js +35 -0
  202. package/tools/templates/modules/fip/scripts/ui/views/InfoDetailTextView.js +39 -0
  203. package/tools/templates/modules/fip/scripts/ui/views/InfoListView.js +57 -0
  204. package/tools/templates/modules/fip/scripts/ui/views/PlayButtonView.js +63 -0
  205. package/tools/templates/modules/home/package.json +5 -0
  206. package/tools/templates/modules/home/scripts/HomeModule.js +19 -0
  207. package/tools/templates/modules/home/scripts/HomeRoutes.js +19 -0
  208. package/tools/templates/modules/home/scripts/services/mock/highlightMock.json +40 -0
  209. package/tools/templates/modules/home/scripts/services/mock/homeScrollViewMock.json +170 -0
  210. package/tools/templates/modules/home/scripts/ui/screens/HomeScreen.js +258 -0
  211. package/tools/templates/modules/home/scripts/ui/views/highlight/DotsListItemView.js +37 -0
  212. package/tools/templates/modules/home/scripts/ui/views/highlight/DotsListView.js +22 -0
  213. package/tools/templates/modules/home/scripts/ui/views/highlight/HighlightContentDescriptionView.js +99 -0
  214. package/tools/templates/modules/home/scripts/ui/views/highlight/HighlightPlayButtonView.js +63 -0
  215. package/tools/templates/modules/home/scripts/ui/views/highlight/HighlightRailItemView.js +186 -0
  216. package/tools/templates/modules/home/scripts/ui/views/scrollview/HomeMockTileView.js +67 -0
  217. package/tools/templates/modules/home/scripts/ui/views/scrollview/HomeRailScrollView.js +53 -0
  218. package/tools/templates/modules/home/scripts/ui/views/scrollview/HomeScrollView.js +22 -0
  219. package/tools/templates/modules/menu/images/profile.png +0 -0
  220. package/tools/templates/modules/menu/package.json +5 -0
  221. package/tools/templates/modules/menu/scripts/MenuModule.js +18 -0
  222. package/tools/templates/modules/menu/scripts/MenuRoutes.js +14 -0
  223. package/tools/templates/modules/menu/scripts/services/menuMock.json +24 -0
  224. package/tools/templates/modules/menu/scripts/ui/const/MenuIcons.js +16 -0
  225. package/tools/templates/modules/menu/scripts/ui/views/MenuButtonView.js +101 -0
  226. package/tools/templates/modules/menu/scripts/ui/views/MenuListView.js +60 -0
  227. package/tools/templates/modules/menu/scripts/ui/views/MenuView.js +87 -0
  228. package/tools/templates/modules/menu/scripts/ui/views/ProfileImageView.js +30 -0
  229. package/tools/templates/modules/player/package.json +5 -0
  230. package/tools/templates/modules/player/scripts/PlayerModule.js +19 -0
  231. package/tools/templates/modules/player/scripts/PlayerRoutes.js +19 -0
  232. package/tools/templates/modules/player/scripts/ui/const/PlayerIcons.js +19 -0
  233. package/tools/templates/modules/player/scripts/ui/screens/PlayerScreen.js +361 -0
  234. package/tools/templates/modules/player/scripts/ui/views/PlayerControlButtonView.js +69 -0
  235. package/tools/templates/modules/player/scripts/ui/views/PlayerControlsView.js +173 -0
  236. package/tools/templates/modules/player/scripts/ui/views/ProgressBarView.js +53 -0
  237. package/tools/templates/modules/search/package.json +5 -0
  238. package/tools/templates/modules/search/scripts/SearchModule.js +18 -0
  239. package/tools/templates/modules/search/scripts/SearchRoutes.js +16 -0
  240. package/tools/templates/modules/search/scripts/ui/const/EnglishKeyboardData.js +31 -0
  241. package/tools/templates/modules/search/scripts/ui/const/SearchIcons.js +14 -0
  242. package/tools/templates/modules/search/scripts/ui/const/SearchKeyboardLayout.js +19 -0
  243. package/tools/templates/modules/search/scripts/ui/primitives/SearchTextPrimitive.js +36 -0
  244. package/tools/templates/modules/search/scripts/ui/screens/SearchScreen.js +234 -0
  245. package/tools/templates/modules/search/scripts/ui/services/MockSearchService.js +39 -0
  246. package/tools/templates/modules/search/scripts/ui/services/SearchVirtualKeyboardService.js +33 -0
  247. package/tools/templates/modules/search/scripts/ui/services/mock/searchMock.json +172 -0
  248. package/tools/templates/modules/search/scripts/ui/views/SearchView.js +62 -0
  249. package/tools/templates/modules/search/scripts/ui/views/keyboard/SearchKeyboardRowItemView.js +92 -0
  250. package/tools/templates/modules/search/scripts/ui/views/keyboard/SearchKeyboardRowListView.js +33 -0
  251. package/tools/templates/modules/search/scripts/ui/views/keyboard/SearchKeyboardView.js +63 -0
  252. package/tools/templates/modules/search/scripts/ui/views/rail/SearchScrollRailView.js +53 -0
  253. package/tools/templates/modules/search/scripts/ui/views/rail/SearchScrollView.js +22 -0
  254. package/tools/templates/modules/search/scripts/ui/views/rail/SearchTileView.js +68 -0
  255. package/tools/templates/modules/search/styles/styles/fonts/fa-solid-900.ttf +0 -0
  256. package/tools/templates/modules/settings/package.json +5 -0
  257. package/tools/templates/modules/settings/scripts/SettingsModule.js +19 -0
  258. package/tools/templates/modules/settings/scripts/SettingsRoutes.js +19 -0
  259. package/tools/templates/modules/settings/scripts/ui/screens/SettingsScreen.js +200 -0
  260. package/tools/templates/modules/settings/scripts/ui/views/SettingsListItemView.js +85 -0
  261. package/tools/templates/modules/settings/scripts/ui/views/SettingsListView.js +56 -0
  262. package/tools/templates/modules/vod/package.json +5 -0
  263. package/tools/templates/modules/vod/scripts/VodModule.js +19 -0
  264. package/tools/templates/modules/vod/scripts/VodRoutes.js +19 -0
  265. package/tools/templates/modules/vod/scripts/services/mock/scrollViewMock.json +172 -0
  266. package/tools/templates/modules/vod/scripts/ui/screens/VodScreen.js +204 -0
  267. package/tools/templates/modules/vod/scripts/ui/views/MockTileView.js +69 -0
  268. package/tools/templates/modules/vod/scripts/ui/views/RailScrollItemView.js +53 -0
  269. package/tools/templates/modules/vod/scripts/ui/views/VodScrollView.js +22 -0
  270. package/tools/templates/package.json +14 -0
  271. package/tools/templates/profiles/app.config.androidtv.json +17 -0
  272. package/tools/templates/profiles/app.config.titanos.json +24 -0
  273. package/tools/templates/profiles/app.config.tizen.json +52 -0
  274. package/tools/templates/profiles/app.config.tvos.json +18 -0
  275. package/tools/templates/profiles/app.config.vidaa.json +24 -0
  276. package/tools/templates/profiles/app.config.webos.json +21 -0
  277. package/tools/templates/tutorial/modules/fip/package.json +4 -0
  278. package/tools/templates/tutorial/modules/fip/scripts/FipModule.js +18 -0
  279. package/tools/templates/tutorial/modules/fip/scripts/FipRoutes.js +19 -0
  280. package/tools/templates/tutorial/modules/fip/scripts/ui/screens/FipContentScreen.js +146 -0
  281. package/tools/templates/tutorial/modules/fip/scripts/ui/views/ElevatorView.js +66 -0
  282. package/tools/templates/tutorial/modules/fip/scripts/ui/views/FipContentInfoView.js +90 -0
  283. package/tools/templates/tutorial/modules/fip/scripts/ui/views/PlayButtonView.js +58 -0
  284. package/tools/templates/tutorial/vendors/customBE/package.json +5 -0
  285. package/tools/templates/tutorial/vendors/customBE/scripts/datas/contents.json +749 -0
  286. package/tools/templates/tutorial/vendors/customBE/scripts/services/CustomBEVodService.js +70 -0
  287. package/tsconfig.json +8 -0
  288. package/vitest.config.ts +19 -0
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": [
3
+ "@dana"
4
+ ]
5
+ }
@@ -0,0 +1,27 @@
1
+ # Warning: the following excludes are applied to all directories !
2
+ node_modules
3
+ generated
4
+ dist
5
+ *.log
6
+ .idea
7
+ .agents
8
+ agents
9
+ .project
10
+ .tmp
11
+ *.bak
12
+ *.lock
13
+ app.config.env.json
14
+ systemjs.node.config.json
15
+ .transpileCache
16
+ doc/reports
17
+ .dana-env
18
+ archive*.zip
19
+
20
+ # nyc temp files
21
+ .nyc_output
22
+
23
+ systemjs.*config.js*
24
+ *.storage.json
25
+
26
+ # For OS X !
27
+ .DS_Store
@@ -0,0 +1,7 @@
1
+ {
2
+ "id": "en-US",
3
+ "strings": {
4
+ "splash.loading": "loading...",
5
+ "splash.loaded": "welcome !"
6
+ }
7
+ }
@@ -0,0 +1,32 @@
1
+ # Internationalization Bundles
2
+
3
+ All application interface texts should be referenced by a text key in the application code / templates
4
+
5
+ The target text must be defined in the `LocaleStringXXX.json` file contained in this folder
6
+
7
+ ## Format
8
+
9
+ This will then be visible and easily editable in EXCEL as:
10
+
11
+ ```json
12
+ {
13
+ "id": "fr-FR",
14
+ "strings": {
15
+ "home.welcome": "welcome"
16
+ }
17
+ }
18
+ ```
19
+
20
+ ## Configuration
21
+
22
+ You **MUST** configure the locales used for your application. You can have different locales depending on the profile, but each profile must at least declare one locale.
23
+
24
+ In `app.config.json`:
25
+
26
+ ```json
27
+ {
28
+ "default": {
29
+ "locales": ["en-GB", "fr-FR"]
30
+ }
31
+ }
32
+ ```
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "application",
3
+ "version": "0.1.0",
4
+ "description": "Application build by DANA",
5
+ "main": "Gruntfile.js",
6
+ "keywords": [
7
+ "JavaScript",
8
+ "wiztivi",
9
+ "DANA"
10
+ ],
11
+ "devDependencies": {
12
+ "pre-commit": "1.2.2"
13
+ },
14
+ "engineStrict": true,
15
+ "engines": {
16
+ "node": ">=12.22.1",
17
+ "npm": ">=6.14.4"
18
+ },
19
+ "pre-commit": [
20
+ "lintdiff"
21
+ ],
22
+ "scripts": {
23
+ "start": "grunt serve --profile=template-css",
24
+ "lint": "wtv lint",
25
+ "lintdiff": "wtv lintdiff",
26
+ "test:unit": "wtv test:unit:project",
27
+ "coverage:unit": "wtv clean:unit:coverage && wtv test:unit:coverage:project",
28
+ "test:cucumber": "grunt dev-node --profile=testCucumber && wtv test:cucumber",
29
+ "coverage:cucumber": "wtv clean:cucumber:coverage && grunt dev-node --profile=testCucumber && wtv test:cucumber:coverage",
30
+ "test:cucumber:debug": "node --inspect --debug-brk node_modules/.bin/cucumber-js -f node_modules/wtv-cucumber-steps/src/formatters/PrettyFormatter.js --require ./node_modules/@dana/core/scripts/wiztivi/tests/cucumber/initCucumber.js --require ./tests/automation/init.js ./tests/automation/features/**/*.feature --publish-quiet --exit",
31
+ "ci": "npm run lint && npm run coverage:unit && npm run coverage:cucumber"
32
+ }
33
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "base-css": {
3
+ "base": {
4
+ "name": "Css",
5
+ "vendors": [
6
+ "@dana/renderer-css"
7
+ ]
8
+ }
9
+ },
10
+ "template-css": {
11
+ "mixins": [
12
+ "default",
13
+ "base-css"
14
+ ]
15
+ }
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "base-lightning": {
3
+ "base": {
4
+ "name": "Lightning HTML5",
5
+ "vendors": [
6
+ "@dana/renderer-lightning-html5"
7
+ ]
8
+ }
9
+ },
10
+ "template-lightning": {
11
+ "mixins": [
12
+ "default",
13
+ "base-lightning"
14
+ ]
15
+ }
16
+ }
@@ -0,0 +1,6 @@
1
+ # App
2
+
3
+ Main Wiztivi Application Folder.
4
+
5
+ `Screens`/`Views` must be created into the `ui` folder.
6
+
@@ -0,0 +1,18 @@
1
+ import $AbstractAppRoutes from "@AbstractAppRoutes";
2
+ import $SplashScreen from "@SplashScreen";
3
+
4
+ /**
5
+ *
6
+ * @name {{appName}}AppRoutes
7
+ * @class
8
+ * @extends AbstractAppRoutes
9
+ * @implementation
10
+ * @routes splash
11
+ */
12
+ export default $AbstractAppRoutes.declare("{{appName}}AppRoutes", {
13
+ methods: /** @lends {{appName}}AppRoutes.prototype */ {
14
+ splash: function (data) {
15
+ return $SplashScreen.display(data);
16
+ }
17
+ }
18
+ });
@@ -0,0 +1,17 @@
1
+ // App definition
2
+ import $Application from "@Application";
3
+
4
+ /**
5
+ * {{appName}}App
6
+ *
7
+ * @name {{appName}}App
8
+ * @extends Application
9
+ * @class
10
+ *
11
+ * @property {string} name - Application name
12
+ */
13
+ export default $Application.declare("{{appName}}App", {
14
+ properties: /** @lends {{appName}}App.prototype */ {
15
+ name: "{{appName}}"
16
+ }
17
+ });
@@ -0,0 +1,57 @@
1
+ import $AbstractTheme from "@AbstractTheme";
2
+
3
+ /**
4
+ * The Theme groups all the common properties for the ui style
5
+ *
6
+ * @name AppTheme
7
+ * @class
8
+ * @extends AbstractTheme
9
+ *
10
+ * @implementation
11
+ */
12
+ export default $AbstractTheme.declare("AppTheme", {
13
+ statics: /** @lends AppTheme */ {
14
+ FULL_SCREEN_WIDTH: 1920,
15
+ FULL_SCREEN_HEIGHT: 1080,
16
+ SCREEN_TOP_MARGIN: 60,
17
+ SCREEN_LEFT_MARGIN: 108,
18
+ APP_LOGO_URL: "dana_logo_light",
19
+
20
+ ///////////////////////////////////////////////////////////////////////
21
+ // FONTS
22
+ ///////////////////////////////////////////////////////////////////////
23
+ RobotoRegular: "RobotoRegular",
24
+ RobotoBold: "RobotoBold",
25
+ MockIcons: "",
26
+
27
+ H1_SIZE: 48,
28
+ H2_SIZE: 30,
29
+
30
+ ///////////////////////////////////////////////////////////////////////
31
+ // COLORS
32
+ ///////////////////////////////////////////////////////////////////////
33
+ COLOR_BACKGROUND: "#17191C",
34
+ COLOR_BACKGROUND_LIGHT: "#22262A",
35
+ COLOR_ACCENT: "#A070FF",
36
+ COLOR_MUTED: "#575757",
37
+ COLOR_TEXT: "#FFFFFF"
38
+ },
39
+
40
+ properties: /** @lends AppTheme.prototype */{},
41
+
42
+ methods: {
43
+ /**
44
+ * Return the image path
45
+ *
46
+ * @param {string} name the name of the image
47
+ * @param {string} extension extension of the image, default is "png"
48
+ * @returns {string}
49
+ */
50
+ getImageUrl: function (name, extension) {
51
+ extension = extension || "png";
52
+ const base = this.baseUrl || this.profile.basePath || "";
53
+
54
+ return base + "images/" + name + "." + extension + (this.profile.flags.remoteBundle === true ? "?v=" + this.profile.version : "");
55
+ }
56
+ }
57
+ });
@@ -0,0 +1,106 @@
1
+ import $Screen from "@Screen";
2
+ import $ScreenEvents from "@ScreenEvents";
3
+ import $MNavigation from "@MNavigation";
4
+
5
+ /**
6
+ * All screens **MUST** inherit from this screen.
7
+ *
8
+ * @name AppScreen
9
+ * @class
10
+ * @extends Screen
11
+ *
12
+ * @property {boolean} overflow true by default
13
+ */
14
+ export default $Screen.declare("AppScreen", {
15
+ traits: [$MNavigation],
16
+
17
+ properties: {
18
+ overflow: true
19
+ },
20
+
21
+ listen: [
22
+ $ScreenEvents.ready
23
+ ],
24
+
25
+ inputs: ["keypress.UP", "keypress.DOWN", "keypress.LEFT", "keypress.RIGHT", "keypress.OK", "keypress.BACK"],
26
+
27
+ methods: /** @lends AppScreen.prototype */ {
28
+ //////////////////////////////////////////////////////////////////////////////////////////
29
+ // EVENT CALLBACKS
30
+ //////////////////////////////////////////////////////////////////////////////////////////
31
+ /**
32
+ * Called when a screen is ready
33
+ * The data have been retrieved, the children are shown
34
+ */
35
+ onScreenReady: function () {},
36
+
37
+ onKeypressLEFT: function (key) {
38
+ return this.left(key);
39
+ },
40
+
41
+ onKeypressRIGHT: function (key) {
42
+ return this.right(key);
43
+ },
44
+
45
+ onKeypressUP: function (key) {
46
+ return this.up(key);
47
+ },
48
+
49
+ onKeypressDOWN: function (key) {
50
+ return this.down(key);
51
+ },
52
+
53
+ onKeypressOK: function (key) {
54
+ return this.ok(key);
55
+ },
56
+
57
+ onKeypressBACK: function (key) {
58
+ return this.back(key);
59
+ },
60
+
61
+ //////////////////////////////////////////////////////////////////////////////////////////
62
+ // NAVIGATION
63
+ //////////////////////////////////////////////////////////////////////////////////////////
64
+ /**
65
+ * @override
66
+ */
67
+ left: function (key) {
68
+ return this.focusedChild.hasNavigation ? this.focusedChild.left(key) : false;
69
+ },
70
+ /**
71
+ * @override
72
+ */
73
+
74
+ right: function (key) {
75
+ return this.focusedChild.hasNavigation ? this.focusedChild.right(key) : false;
76
+ },
77
+
78
+ /**
79
+ * @override
80
+ */
81
+ up: function (key) {
82
+ return this.focusedChild.hasNavigation ? this.focusedChild.up(key) : false;
83
+ },
84
+
85
+ /**
86
+ * @override
87
+ */
88
+ down: function (key) {
89
+ return this.focusedChild.hasNavigation ? this.focusedChild.down(key) : false;
90
+ },
91
+
92
+ /**
93
+ * @override
94
+ */
95
+ ok: function (key) {
96
+ throw new Error("You must implement ok !");
97
+ },
98
+
99
+ /**
100
+ * @override
101
+ */
102
+ back: function (key) {
103
+ return this.routeToPrevious();
104
+ }
105
+ }
106
+ });
@@ -0,0 +1,70 @@
1
+ import $AppScreen from "@AppScreen";
2
+ import $LoaderView from "@LoaderView";
3
+ import $TimerManager from "@TimerManager";
4
+ import $RectanglePrimitive from "@RectanglePrimitive";
5
+ import $Theme from "@Theme";
6
+
7
+ /**
8
+ * The first screen that is shown, use to show a boot splash
9
+ *
10
+ * @name SplashScreen
11
+ * @class
12
+ * @extends AppScreen
13
+ *
14
+ * @property {TimerManager} timerManager - Instance of TimerManager
15
+ * @property {number} splashDuration - Duration in ms to display splash screen
16
+ *
17
+ * @screen
18
+ */
19
+ export default $AppScreen.declare("SplashScreen", {
20
+ statics: {
21
+ HIDE_SPLASH_SCREEN_TIMER_ID: "SplashScreen:Hide"
22
+ },
23
+ properties: {
24
+ timerManager: {class: $TimerManager},
25
+ splashDuration: 2000
26
+ },
27
+ children: /** @lends SplashScreen.prototype */ {
28
+ background: {class: $RectanglePrimitive},
29
+ loader: {class: $LoaderView}
30
+ },
31
+ methods: /** @lends SplashScreen.prototype */ {
32
+ /**
33
+ * Called before the screen is shown
34
+ * The flow is interrupted until the promise has been resolved/rejected
35
+ *
36
+ * @param {Object} [context] The context shared by the screens during display
37
+ */
38
+ beforeShow: function (context) {
39
+ this.timerManager.setTimeout(
40
+ () => {
41
+ console.warn("FIXME: route to home !");
42
+ },
43
+ this.splashDuration,
44
+ this.statics.HIDE_SPLASH_SCREEN_TIMER_ID
45
+ );
46
+ },
47
+
48
+ /**
49
+ * Called before the screen is hidden
50
+ * The flow is interrupted until the promise has been resolved/rejected
51
+ *
52
+ * @param {Object} [context] The context shared by the screens during display
53
+ */
54
+ beforeHide: function (context) {
55
+ this.timerManager.stop(this.statics.HIDE_SPLASH_SCREEN_TIMER_ID);
56
+ }
57
+ },
58
+
59
+ style: {
60
+ background: {
61
+ width: $Theme.FULL_SCREEN_WIDTH,
62
+ height: $Theme.FULL_SCREEN_HEIGHT,
63
+ fillColor: $Theme.COLOR_BACKGROUND
64
+ },
65
+ loader: {
66
+ x: ({parent}) => (parent.width - parent.loader.width) / 2,
67
+ y: ({parent}) => (parent.height - parent.loader.height) / 2
68
+ }
69
+ }
70
+ });
@@ -0,0 +1,31 @@
1
+ import $View from "@View";
2
+ import $Theme from "@Theme";
3
+ import $ImagePrimitive from "@ImagePrimitive";
4
+
5
+ /**
6
+ * A loader
7
+ *
8
+ * @name LoaderView
9
+ * @class
10
+ * @extends View
11
+ *
12
+ */
13
+ export default $View.declare("LoaderView", {
14
+ children: {
15
+ image: {
16
+ class: $ImagePrimitive,
17
+ url: ({theme}) => theme.getImageUrl($Theme.APP_LOGO_URL)
18
+ }
19
+ },
20
+
21
+ style: {
22
+ width: $Theme.FULL_SCREEN_WIDTH,
23
+ height: $Theme.FULL_SCREEN_HEIGHT,
24
+ image: {
25
+ width: 323,
26
+ height: 140,
27
+ x: ({width}) => ($Theme.FULL_SCREEN_WIDTH - width) / 2,
28
+ y: ({height}) => ($Theme.FULL_SCREEN_HEIGHT - height) / 2
29
+ }
30
+ }
31
+ });
@@ -0,0 +1,70 @@
1
+ # Tests
2
+
3
+ Application tests can be categorized in 2 categories:
4
+
5
+ 1. Behavior Tests, as in [BDD](https://en.wikipedia.org/wiki/Behavior-driven_development)
6
+ 2. Unit Tests, as in [TDD](https://en.wikipedia.org/wiki/Test-driven_development)
7
+
8
+ ## Documentation
9
+
10
+ To help writing tests, Dana provides:
11
+
12
+ * an [Overview](https://dana-framework.com/docs/tests/overview/) documentation with code examples
13
+ * some helpers global functions (only accessible from test files)
14
+ * a [Chai WTV module](https://dana-framework.com/docs/tests/ft/dana-steps/)
15
+
16
+ ## Behavior Tests
17
+
18
+ They are meant to validate the implementations of the specifications given by the project owner
19
+
20
+ ### Features
21
+
22
+ The specifications should first be written in [GherkinSyntax](http://docs.behat.org/en/v2.5/guides/1.gherkin.html) in
23
+ the `"features"` folder:
24
+
25
+ * Each **feature** should be described in its own `"{featureName}.feature"` file
26
+ * Features might be grouped by topic folders (often more or less matching main screens)
27
+ * Feature files contain a list of **Scenarios** (mostly matching with **user stories**)
28
+
29
+ ### Specifications Tests
30
+
31
+ Executable specification test file are created in the `"spec"` folder for each existing `".feature"` file. They follow
32
+ the same topic folder hierarchy.
33
+
34
+ #### Note
35
+
36
+ A template can initially be created from the `".feature"` files using the command `grunt gherkin_mocha` (requires first
37
+ to be installed via `npm install grunt-gherkin-mocha`)
38
+
39
+ ### BDD (Behavior Driven Development)
40
+
41
+ The BDD approach is to, feature by feature:
42
+
43
+ 1. first get user stories and write behavior tests from them (they should all fail).
44
+ 2. then start implementing the feature
45
+ 3. then check its validity until all user stories (scenarios) succeed
46
+
47
+ ## Unit Tests
48
+
49
+ These are more low level tests that expect to unitary confirm that a function you created will always work as expected.
50
+ **They are very useful to identify regressions origin** (ex: when modifying a function break another one that was using it).
51
+
52
+ Such test files are meant to be written in the `"unit"` folder.
53
+
54
+ ### TDD
55
+
56
+ The TDD approach is to, JS file by JS file:
57
+
58
+ 1. first write a matching unit test file with one unit test per expected function implementation (they should all fail).
59
+ 2. then start implementing the functions in the original JS file
60
+ 3. then check JS function implementations validity until all unit tests succeed
61
+
62
+ ## Bug Tests
63
+
64
+ Each time a bug is identified by a project owner, it should be described to the developer team via user stories they can
65
+ follow to reproduce it.
66
+
67
+ A dedicated test should be written from this scenario:
68
+
69
+ * to be sure the issue is fixed
70
+ * to prevent from any further regression.
@@ -0,0 +1,5 @@
1
+ Feature: Splash
2
+
3
+ Scenario: Show splash
4
+ Given i start on "[SPLASH]" screen
5
+ And "welcome message" is focused
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Copyright (c) 2014-2020 Wiztivi - contact@wiztivi.com
3
+ * All Rights Reserved
4
+ *
5
+ * All information contained herein is proprietary and confidential.
6
+ * Dissemination of this information or reproduction of this file or material, via any medium is strictly forbidden unless
7
+ * prior written permission is obtained from Wiztivi.
8
+ * No warranty, explicit or implicit, provided.
9
+ * This software MAY NOT be used, modified or rewritten without prior written permission from Wiztivi.
10
+ *
11
+ */
12
+
13
+ /**
14
+ * Created by avannier on 27/04/2021
15
+ */
16
+
17
+ require("./steps-definitions/helpers");
18
+ const dictionary = require("./steps-definitions/dictionary");
19
+
20
+ require("@dana/cucumber-steps")(dictionary);
@@ -0,0 +1,31 @@
1
+ module.exports = {
2
+
3
+ initialRoute: "[SPLASH]",
4
+
5
+ screens: {
6
+
7
+ //////////////////////////////////
8
+ // INITIAL ROUTE
9
+ //////////////////////////////////
10
+
11
+ "[SPLASH]": {
12
+ route: "splash",
13
+ screenName: "splashScreen",
14
+ options: {
15
+ // Define options for deeplink
16
+ }
17
+ }
18
+ },
19
+
20
+ views: {
21
+ "welcome message": "loader"
22
+ },
23
+
24
+ data: {},
25
+
26
+ singletonToReset: {},
27
+
28
+ events: {
29
+ "screen ready": "screen.ready"
30
+ }
31
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * You can define here getter/setter for cucumber tests
3
+ */
4
+ ////////////////////////////////////////////////////////////////////////
5
+ // GETTERS
6
+ ////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////
8
+ // SETTERS
9
+ ////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,7 @@
1
+ # Unit tests
2
+
3
+ This folder is mandatory to run `grunt test` even if there is only "Behavior tests"
4
+
5
+ ## Documentation
6
+
7
+ More information in the [documentation test overview](https://doc.public.dana-framework.com/docs/tests/overview/)
@@ -0,0 +1,24 @@
1
+ describe("{{appName}}AppRoutes", function () {
2
+ let {{appName}}AppRoutes;
3
+
4
+ /**
5
+ * Load the Trait needed for the tests, initialize global variables
6
+ */
7
+ before(function () {
8
+ return $UnitTest.getTrait("@{{appName}}AppRoutes")
9
+ .then(function (loadedClasses) {
10
+ {{appName}}AppRoutes = loadedClasses.trait;
11
+ });
12
+ });
13
+
14
+ /**
15
+ * Destroy the Trait, cleanup
16
+ */
17
+ after(function () {
18
+ return $UnitTest.destroyClass({{appName}}AppRoutes);
19
+ });
20
+
21
+ it("should exist a '{{appName}}AppRoutes' trait", function () {
22
+ expect({{appName}}AppRoutes).to.exist;
23
+ });
24
+ });