@verdaccio/ui-theme 3.1.0 → 6.0.0-6-next.11

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 (381) hide show
  1. package/.babelrc +33 -0
  2. package/.eslintrc +115 -0
  3. package/.stylelintrc +40 -0
  4. package/CHANGELOG.md +152 -554
  5. package/LICENSE +1 -1
  6. package/README.md +22 -95
  7. package/config/env.js +9 -0
  8. package/jest/api/packages.json +42 -0
  9. package/jest/identity.js +29 -0
  10. package/jest/jest.config.js +39 -0
  11. package/jest/jestEnvironment.js +1 -0
  12. package/jest/server-handlers.ts +9 -0
  13. package/jest/server.ts +6 -0
  14. package/jest/setup-env.ts +15 -0
  15. package/jest/setup.ts +31 -0
  16. package/jest/unit/components/__mocks__/api.ts +47 -0
  17. package/jest/unit/components/__mocks__/token.ts +31 -0
  18. package/jest/unit/components/store/login.ts +23 -0
  19. package/jest/unit/components/store/logo.ts +7 -0
  20. package/jest/unit/components/store/package.ts +174 -0
  21. package/jest/unit/components/store/packageMeta.ts +592 -0
  22. package/jest/unit/empty.ts +1 -0
  23. package/lib/constants.ts +9 -0
  24. package/package.json +153 -228
  25. package/src/App/App.test.tsx +123 -0
  26. package/src/App/App.tsx +54 -0
  27. package/src/App/AppError.tsx +38 -0
  28. package/src/App/AppRoute.tsx +63 -0
  29. package/src/App/Footer/Footer.test.tsx +20 -0
  30. package/src/App/Footer/Footer.tsx +111 -0
  31. package/src/App/Footer/__snapshots__/Footer.test.tsx.snap +456 -0
  32. package/src/App/Footer/index.ts +1 -0
  33. package/src/App/Footer/styles.ts +44 -0
  34. package/src/App/Header/Header.test.tsx +152 -0
  35. package/src/App/Header/Header.tsx +74 -0
  36. package/src/App/Header/HeaderGreetings.tsx +22 -0
  37. package/src/App/Header/HeaderInfoDialog.tsx +19 -0
  38. package/src/App/Header/HeaderLeft.tsx +31 -0
  39. package/src/App/Header/HeaderMenu.tsx +65 -0
  40. package/src/App/Header/HeaderRight.tsx +118 -0
  41. package/src/App/Header/HeaderToolTip.tsx +19 -0
  42. package/src/App/Header/HeaderToolTipIcon.tsx +75 -0
  43. package/src/App/Header/LanguageSwitch.tsx +125 -0
  44. package/src/App/Header/LoginDialog/LoginDialog.test.tsx +112 -0
  45. package/src/App/Header/LoginDialog/LoginDialog.tsx +81 -0
  46. package/src/App/Header/LoginDialog/LoginDialogCloseButton.tsx +32 -0
  47. package/src/App/Header/LoginDialog/LoginDialogForm.tsx +97 -0
  48. package/src/App/Header/LoginDialog/LoginDialogFormError.tsx +43 -0
  49. package/src/App/Header/LoginDialog/LoginDialogHeader.tsx +48 -0
  50. package/src/App/Header/LoginDialog/__snapshots__/LoginDialog.test.tsx.snap +3 -0
  51. package/src/App/Header/LoginDialog/index.ts +1 -0
  52. package/src/App/Header/RegistryInfoContent/RegistryInfoContent.test.tsx +27 -0
  53. package/src/App/Header/RegistryInfoContent/RegistryInfoContent.tsx +155 -0
  54. package/src/App/Header/RegistryInfoContent/index.ts +1 -0
  55. package/src/App/Header/RegistryInfoDialog/RegistryInfoDialog.tsx +30 -0
  56. package/src/App/Header/RegistryInfoDialog/index.ts +1 -0
  57. package/src/App/Header/RegistryInfoDialog/styles.ts +16 -0
  58. package/src/App/Header/RegistryInfoDialog/types.ts +7 -0
  59. package/src/App/Header/Search/Search.test.tsx +168 -0
  60. package/src/App/Header/Search/Search.tsx +127 -0
  61. package/src/App/Header/Search/SearchAdornment.tsx +18 -0
  62. package/src/App/Header/Search/__snapshots__/Search.test.tsx.snap +101 -0
  63. package/src/App/Header/Search/index.ts +1 -0
  64. package/src/App/Header/index.ts +1 -0
  65. package/src/App/Header/styles.ts +89 -0
  66. package/src/App/index.ts +1 -0
  67. package/src/App/utils/loadable.tsx +10 -0
  68. package/src/components/.eslintrc +7 -0
  69. package/src/components/ActionBar/ActionBar.test.tsx +91 -0
  70. package/src/components/ActionBar/ActionBar.tsx +45 -0
  71. package/src/components/ActionBar/ActionBarAction.tsx +75 -0
  72. package/src/components/ActionBar/__snapshots__/ActionBar.test.tsx.snap +122 -0
  73. package/src/components/ActionBar/index.ts +1 -0
  74. package/src/components/AppBar.tsx +10 -0
  75. package/src/components/Author/Author.test.tsx +75 -0
  76. package/src/components/Author/Author.tsx +47 -0
  77. package/src/components/Author/__snapshots__/Author.test.tsx.snap +353 -0
  78. package/src/components/Author/index.ts +1 -0
  79. package/src/components/Author/styles.ts +23 -0
  80. package/src/components/AutoComplete/AutoComplete.tsx +179 -0
  81. package/src/components/AutoComplete/AutoCompleteV2.tsx +296 -0
  82. package/src/components/AutoComplete/index.ts +1 -0
  83. package/src/components/AutoComplete/styles.tsx +58 -0
  84. package/src/components/AutoComplete/useAutoComplete.tsx +61 -0
  85. package/src/components/Avatar.tsx +3 -0
  86. package/src/components/Box.tsx +8 -0
  87. package/src/components/Button.tsx +10 -0
  88. package/src/components/Card.tsx +10 -0
  89. package/src/components/CardActions.tsx +13 -0
  90. package/src/components/CardContent.tsx +10 -0
  91. package/src/components/Chip.tsx +10 -0
  92. package/src/components/CircularProgress.tsx +15 -0
  93. package/src/components/CopyToClipBoard.tsx +45 -0
  94. package/src/components/Dialog.tsx +10 -0
  95. package/src/components/DialogActions.tsx +16 -0
  96. package/src/components/DialogContent.tsx +16 -0
  97. package/src/components/DialogTitle.tsx +10 -0
  98. package/src/components/Divider.tsx +10 -0
  99. package/src/components/FloatingActionButton.tsx +12 -0
  100. package/src/components/FormControl.tsx +10 -0
  101. package/src/components/FormHelperText.tsx +16 -0
  102. package/src/components/Grid.tsx +10 -0
  103. package/src/components/Heading.tsx +15 -0
  104. package/src/components/IconButton.tsx +10 -0
  105. package/src/components/Icons/.eslintrc +5 -0
  106. package/src/components/Icons/Earth.tsx +36 -0
  107. package/src/components/Icons/FileBinary.tsx +20 -0
  108. package/src/components/Icons/Law.tsx +20 -0
  109. package/src/components/Icons/License.tsx +18 -0
  110. package/src/components/Icons/Time.tsx +19 -0
  111. package/src/components/Icons/Version.tsx +20 -0
  112. package/src/components/Icons/index.ts +5 -0
  113. package/src/components/Input.tsx +10 -0
  114. package/src/components/InputAdornment/InputAdornment.tsx +16 -0
  115. package/src/components/InputAdornment/index.ts +1 -0
  116. package/src/components/InputLabel.tsx +10 -0
  117. package/src/components/Label/Label.test.tsx +15 -0
  118. package/src/components/Label/Label.tsx +35 -0
  119. package/src/components/Label/__snapshots__/Label.test.tsx.snap +14 -0
  120. package/src/components/Label/index.ts +1 -0
  121. package/src/components/Link.tsx +39 -0
  122. package/src/components/List.tsx +10 -0
  123. package/src/components/ListItem.tsx +23 -0
  124. package/src/components/ListItemText.tsx +16 -0
  125. package/src/components/Loading/Loading.test.tsx +12 -0
  126. package/src/components/Loading/Loading.tsx +17 -0
  127. package/src/components/Loading/Spinner/Spinner.test.tsx +14 -0
  128. package/src/components/Loading/Spinner/Spinner.tsx +35 -0
  129. package/src/components/Loading/Spinner/__snapshots__/Spinner.test.tsx.snap +148 -0
  130. package/src/components/Loading/Spinner/index.tsx +1 -0
  131. package/src/components/Loading/__snapshots__/Loading.test.tsx.snap +86 -0
  132. package/src/components/Loading/index.ts +1 -0
  133. package/src/components/Loading/styles.ts +17 -0
  134. package/src/components/Logo/Logo.test.tsx +12 -0
  135. package/src/components/Logo/Logo.tsx +55 -0
  136. package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +19 -0
  137. package/src/components/Logo/img/logo-black-and-white.svg +1 -0
  138. package/src/components/Logo/img/logo.svg +1 -0
  139. package/src/components/Logo/index.ts +1 -0
  140. package/src/components/Menu.tsx +10 -0
  141. package/src/components/MenuItem.tsx +25 -0
  142. package/src/components/NotFound/NotFound.tsx +52 -0
  143. package/src/components/NotFound/Notfound.test.tsx +37 -0
  144. package/src/components/NotFound/__snapshots__/Notfound.test.tsx.snap +44 -0
  145. package/src/components/NotFound/img/package.svg +1 -0
  146. package/src/components/NotFound/index.ts +1 -0
  147. package/src/components/NotFound/styles.ts +40 -0
  148. package/src/components/Paper.tsx +10 -0
  149. package/src/components/SnackbarContent.tsx +15 -0
  150. package/src/components/SvgIcon.tsx +38 -0
  151. package/src/components/Tab.tsx +10 -0
  152. package/src/components/Tabs.tsx +14 -0
  153. package/src/components/Text/Text.tsx +17 -0
  154. package/src/components/Text/TextConfig.ts +7 -0
  155. package/src/components/Text/index.ts +2 -0
  156. package/src/components/TextField/TextField.test.tsx +16 -0
  157. package/src/components/TextField/TextField.tsx +23 -0
  158. package/src/components/TextField/__snapshots__/TextField.test.tsx.snap +19 -0
  159. package/src/components/TextField/index.ts +1 -0
  160. package/src/components/Toolbar.tsx +10 -0
  161. package/src/components/Tooltip.tsx +25 -0
  162. package/src/design-tokens/ResetStyles.tsx +44 -0
  163. package/src/design-tokens/StyleBaseline.tsx +14 -0
  164. package/src/design-tokens/ThemeContext.ts +13 -0
  165. package/src/design-tokens/ThemeProvider.tsx +44 -0
  166. package/src/design-tokens/emotion.ts +5 -0
  167. package/src/design-tokens/load-dayjs-locale.ts +98 -0
  168. package/src/design-tokens/theme.ts +159 -0
  169. package/src/design-tokens/useLocalStorage.ts +40 -0
  170. package/src/design-tokens/useOnClickOutside.ts +28 -0
  171. package/src/design-tokens/useTheme.ts +7 -0
  172. package/src/i18n/ABOUT_TRANSLATIONS.md +13 -0
  173. package/src/i18n/config.ts +52 -0
  174. package/src/i18n/crowdin/ui.json +170 -0
  175. package/src/i18n/deprecated_translations_dont_use/cs-CZ.json +168 -0
  176. package/src/i18n/deprecated_translations_dont_use/de-DE.json +168 -0
  177. package/src/i18n/deprecated_translations_dont_use/en-US.json +170 -0
  178. package/src/i18n/deprecated_translations_dont_use/es-ES.json +168 -0
  179. package/src/i18n/deprecated_translations_dont_use/fr-FR.json +168 -0
  180. package/src/i18n/deprecated_translations_dont_use/ja-JP.json +168 -0
  181. package/src/i18n/deprecated_translations_dont_use/km-KH.json +168 -0
  182. package/src/i18n/deprecated_translations_dont_use/pt-BR.json +168 -0
  183. package/src/i18n/deprecated_translations_dont_use/ru-RU.json +168 -0
  184. package/src/i18n/deprecated_translations_dont_use/tr-TR.json +168 -0
  185. package/src/i18n/deprecated_translations_dont_use/uk-UA.json +168 -0
  186. package/src/i18n/deprecated_translations_dont_use/zh-CN.json +168 -0
  187. package/src/i18n/deprecated_translations_dont_use/zh-TW.json +165 -0
  188. package/src/i18n/enabledLanguages.ts +35 -0
  189. package/src/index.tsx +36 -0
  190. package/src/lib/constants.ts +9 -0
  191. package/src/pages/Version/DetailContainer/Dependencies/Dependencies.test.tsx +93 -0
  192. package/src/pages/Version/DetailContainer/Dependencies/Dependencies.tsx +100 -0
  193. package/src/pages/Version/DetailContainer/Dependencies/index.ts +1 -0
  194. package/src/pages/Version/DetailContainer/Dependencies/styles.ts +26 -0
  195. package/src/pages/Version/DetailContainer/Dependencies/types.ts +7 -0
  196. package/src/pages/Version/DetailContainer/Deprecated/Deprecated.test.tsx +34 -0
  197. package/src/pages/Version/DetailContainer/Deprecated/Deprecated.tsx +31 -0
  198. package/src/pages/Version/DetailContainer/Deprecated/index.ts +1 -0
  199. package/src/pages/Version/DetailContainer/DetailContainer.test.tsx +13 -0
  200. package/src/pages/Version/DetailContainer/DetailContainer.tsx +37 -0
  201. package/src/pages/Version/DetailContainer/DetailContainerContent.tsx +41 -0
  202. package/src/pages/Version/DetailContainer/DetailContainerContentReadme.tsx +19 -0
  203. package/src/pages/Version/DetailContainer/DetailContainerTabs.tsx +36 -0
  204. package/src/pages/Version/DetailContainer/NoItems/NoItems.tsx +16 -0
  205. package/src/pages/Version/DetailContainer/NoItems/Noitems.test.tsx +16 -0
  206. package/src/pages/Version/DetailContainer/NoItems/__snapshots__/Noitems.test.tsx.snap +9 -0
  207. package/src/pages/Version/DetailContainer/NoItems/index.ts +1 -0
  208. package/src/pages/Version/DetailContainer/Readme/Readme.spec.tsx +19 -0
  209. package/src/pages/Version/DetailContainer/Readme/Readme.tsx +22 -0
  210. package/src/pages/Version/DetailContainer/Readme/__snapshots__/Readme.spec.tsx.snap +94 -0
  211. package/src/pages/Version/DetailContainer/Readme/index.ts +1 -0
  212. package/src/pages/Version/DetailContainer/Readme/types.ts +3 -0
  213. package/src/pages/Version/DetailContainer/UpLinks/UpLinks.test.tsx +58 -0
  214. package/src/pages/Version/DetailContainer/UpLinks/UpLinks.tsx +45 -0
  215. package/src/pages/Version/DetailContainer/UpLinks/__snapshots__/UpLinks.test.tsx.snap +247 -0
  216. package/src/pages/Version/DetailContainer/UpLinks/index.ts +1 -0
  217. package/src/pages/Version/DetailContainer/UpLinks/styles.ts +24 -0
  218. package/src/pages/Version/DetailContainer/Versions/Versions.test.tsx +60 -0
  219. package/src/pages/Version/DetailContainer/Versions/Versions.tsx +41 -0
  220. package/src/pages/Version/DetailContainer/Versions/VersionsHistoryList.tsx +40 -0
  221. package/src/pages/Version/DetailContainer/Versions/VersionsTagList.tsx +28 -0
  222. package/src/pages/Version/DetailContainer/Versions/__partials__/data.json +5984 -0
  223. package/src/pages/Version/DetailContainer/Versions/__snapshots__/Versions.test.tsx.snap +3 -0
  224. package/src/pages/Version/DetailContainer/Versions/index.ts +1 -0
  225. package/src/pages/Version/DetailContainer/Versions/styles.ts +30 -0
  226. package/src/pages/Version/DetailContainer/__snapshots__/DetailContainer.test.tsx.snap +103 -0
  227. package/src/pages/Version/DetailContainer/index.ts +1 -0
  228. package/src/pages/Version/DetailSidebar/DetailSidebar.tsx +55 -0
  229. package/src/pages/Version/DetailSidebar/DetailSidebarFundButton.test.tsx +111 -0
  230. package/src/pages/Version/DetailSidebar/DetailSidebarFundButton.tsx +53 -0
  231. package/src/pages/Version/DetailSidebar/DetailSidebarTitle.tsx +40 -0
  232. package/src/pages/Version/DetailSidebar/Developers/Developers.test.tsx +117 -0
  233. package/src/pages/Version/DetailSidebar/Developers/Developers.tsx +90 -0
  234. package/src/pages/Version/DetailSidebar/Developers/DevelopersTitle.tsx +32 -0
  235. package/src/pages/Version/DetailSidebar/Developers/__snapshots__/Developers.test.tsx.snap +380 -0
  236. package/src/pages/Version/DetailSidebar/Developers/get-unique-developer-values.ts +16 -0
  237. package/src/pages/Version/DetailSidebar/Developers/index.ts +1 -0
  238. package/src/pages/Version/DetailSidebar/Developers/styles.ts +31 -0
  239. package/src/pages/Version/DetailSidebar/Dist/Dist.test.tsx +78 -0
  240. package/src/pages/Version/DetailSidebar/Dist/Dist.tsx +49 -0
  241. package/src/pages/Version/DetailSidebar/Dist/__snapshots__/Dist.test.tsx.snap +602 -0
  242. package/src/pages/Version/DetailSidebar/Dist/index.ts +1 -0
  243. package/src/pages/Version/DetailSidebar/Dist/styles.ts +27 -0
  244. package/src/pages/Version/DetailSidebar/Engines/Engines.test.tsx +71 -0
  245. package/src/pages/Version/DetailSidebar/Engines/Engines.tsx +58 -0
  246. package/src/pages/Version/DetailSidebar/Engines/img/node.png +0 -0
  247. package/src/pages/Version/DetailSidebar/Engines/index.ts +1 -0
  248. package/src/pages/Version/DetailSidebar/Engines/styles.ts +14 -0
  249. package/src/pages/Version/DetailSidebar/Install/Install.test.tsx +64 -0
  250. package/src/pages/Version/DetailSidebar/Install/Install.tsx +52 -0
  251. package/src/pages/Version/DetailSidebar/Install/InstallListItem.tsx +97 -0
  252. package/src/pages/Version/DetailSidebar/Install/__partials__/data.json +5984 -0
  253. package/src/pages/Version/DetailSidebar/Install/img/npm.svg +15 -0
  254. package/src/pages/Version/DetailSidebar/Install/img/pnpm.svg +1 -0
  255. package/src/pages/Version/DetailSidebar/Install/img/yarn.svg +1 -0
  256. package/src/pages/Version/DetailSidebar/Install/index.ts +1 -0
  257. package/src/pages/Version/DetailSidebar/Repository/Repository.test.tsx +78 -0
  258. package/src/pages/Version/DetailSidebar/Repository/Repository.tsx +93 -0
  259. package/src/pages/Version/DetailSidebar/Repository/__partials__/data.json +5984 -0
  260. package/src/pages/Version/DetailSidebar/Repository/__snapshots__/Repository.test.tsx.snap +3 -0
  261. package/src/pages/Version/DetailSidebar/Repository/img/git.png +0 -0
  262. package/src/pages/Version/DetailSidebar/Repository/index.ts +1 -0
  263. package/src/pages/Version/DetailSidebar/index.ts +1 -0
  264. package/src/pages/Version/Version.test.tsx +68 -0
  265. package/src/pages/Version/Version.tsx +41 -0
  266. package/src/pages/Version/VersionContextProvider.tsx +43 -0
  267. package/src/pages/Version/VersionLayout.tsx +20 -0
  268. package/src/pages/Version/__partials__/data.json +5984 -0
  269. package/src/pages/Version/context.ts +10 -0
  270. package/src/pages/Version/get-route-package-name.ts +9 -0
  271. package/src/pages/Version/index.ts +4 -0
  272. package/src/pages/Version/version-config.ts +19 -0
  273. package/src/pages/home/Home.tsx +25 -0
  274. package/src/pages/home/PackageList/Help/Help.test.tsx +12 -0
  275. package/src/pages/home/PackageList/Help/Help.tsx +56 -0
  276. package/src/pages/home/PackageList/Help/__snapshots__/Help.test.tsx.snap +159 -0
  277. package/src/pages/home/PackageList/Help/index.ts +1 -0
  278. package/src/pages/home/PackageList/Help/styles.ts +13 -0
  279. package/src/pages/home/PackageList/Package/Package.test.tsx +56 -0
  280. package/src/pages/home/PackageList/Package/Package.tsx +253 -0
  281. package/src/pages/home/PackageList/Package/Tag/Tag.test.tsx +16 -0
  282. package/src/pages/home/PackageList/Package/Tag/Tag.tsx +11 -0
  283. package/src/pages/home/PackageList/Package/Tag/__snapshots__/Tag.test.tsx.snap +21 -0
  284. package/src/pages/home/PackageList/Package/Tag/index.ts +1 -0
  285. package/src/pages/home/PackageList/Package/Tag/styles.ts +11 -0
  286. package/src/pages/home/PackageList/Package/index.ts +1 -0
  287. package/src/pages/home/PackageList/Package/styles.ts +112 -0
  288. package/src/pages/home/PackageList/PackageList.tsx +81 -0
  289. package/src/pages/home/PackageList/Packagelist.test.tsx +60 -0
  290. package/src/pages/home/PackageList/index.ts +1 -0
  291. package/src/pages/home/index.ts +1 -0
  292. package/src/providers/API/api.test.ts +136 -0
  293. package/src/providers/API/api.ts +73 -0
  294. package/src/providers/API/storage.ts +12 -0
  295. package/src/providers/config/AppConfigurationProvider.tsx +57 -0
  296. package/src/providers/config/index.ts +1 -0
  297. package/src/store/index.ts +1 -0
  298. package/src/store/models/configuration.ts +42 -0
  299. package/src/store/models/download.ts +31 -0
  300. package/src/store/models/index.ts +17 -0
  301. package/src/store/models/login.ts +90 -0
  302. package/src/store/models/manifest.ts +91 -0
  303. package/src/store/models/packages.ts +36 -0
  304. package/src/store/models/search.ts +81 -0
  305. package/src/store/store.ts +15 -0
  306. package/src/template/favicon.ico +0 -0
  307. package/src/template/index.html +21 -0
  308. package/src/utils/.eslintrc +5 -0
  309. package/src/utils/cli-utils.test.ts +66 -0
  310. package/src/utils/cli-utils.ts +38 -0
  311. package/src/utils/colors.ts +1 -0
  312. package/src/utils/constants.ts +5 -0
  313. package/src/utils/file-size.ts +13 -0
  314. package/src/utils/i18nForTests.ts +25 -0
  315. package/src/utils/login.test.ts +71 -0
  316. package/src/utils/login.ts +44 -0
  317. package/src/utils/package.test.ts +101 -0
  318. package/src/utils/package.ts +105 -0
  319. package/src/utils/sec-utils.ts +15 -0
  320. package/src/utils/storage.ts +12 -0
  321. package/src/utils/test-react-testing-library.tsx +38 -0
  322. package/src/utils/url.test.ts +28 -0
  323. package/src/utils/url.ts +58 -0
  324. package/src/utils/windows.ts +3 -0
  325. package/static/favicon.ico +0 -0
  326. package/static/index.html +21 -0
  327. package/static/main.c57129036f278d0c7acf.js +2 -0
  328. package/static/main.c57129036f278d0c7acf.js.LICENSE.txt +1456 -0
  329. package/static/manifest.json +5 -17
  330. package/static/runtime.c57129036f278d0c7acf.js +2 -0
  331. package/static/{runtime.f6e570dfe38870a45bf5.js.LICENSE.txt → runtime.c57129036f278d0c7acf.js.LICENSE.txt} +2 -2
  332. package/static/vendors.c57129036f278d0c7acf.js +2 -0
  333. package/static/vendors.c57129036f278d0c7acf.js.LICENSE.txt +2932 -0
  334. package/tools/.eslintrc +14 -0
  335. package/tools/_verdaccio.config.yaml +59 -0
  336. package/tools/dev.server.js +48 -0
  337. package/tools/getPackageJson.js +25 -0
  338. package/tools/verdaccio.js +31 -0
  339. package/tools/webpack.config.js +82 -0
  340. package/tools/webpack.dev.config.babel.js +60 -0
  341. package/tools/webpack.prod.config.babel.js +81 -0
  342. package/tsconfig.build.json +24 -0
  343. package/tsconfig.json +27 -0
  344. package/types/custom.d.ts +9 -0
  345. package/types/files.d.ts +9 -0
  346. package/types/index.ts +12 -0
  347. package/types/jest-dom.d.ts +1 -0
  348. package/types/packageMeta.ts +82 -0
  349. package/static/238.f6e570dfe38870a45bf5.js +0 -2
  350. package/static/238.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  351. package/static/718.f6e570dfe38870a45bf5.js +0 -2
  352. package/static/718.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  353. package/static/73.f6e570dfe38870a45bf5.js +0 -2
  354. package/static/73.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  355. package/static/Dependencies.f6e570dfe38870a45bf5.js +0 -2
  356. package/static/Dependencies.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  357. package/static/Dist.f6e570dfe38870a45bf5.js +0 -2
  358. package/static/Dist.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  359. package/static/Engines.f6e570dfe38870a45bf5.js +0 -2
  360. package/static/Engines.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  361. package/static/Home.f6e570dfe38870a45bf5.js +0 -2
  362. package/static/Home.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  363. package/static/Install.f6e570dfe38870a45bf5.js +0 -2
  364. package/static/Install.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  365. package/static/NotFound.f6e570dfe38870a45bf5.js +0 -2
  366. package/static/NotFound.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  367. package/static/Provider.f6e570dfe38870a45bf5.js +0 -2
  368. package/static/Provider.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  369. package/static/Repository.f6e570dfe38870a45bf5.js +0 -2
  370. package/static/Repository.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  371. package/static/UpLinks.f6e570dfe38870a45bf5.js +0 -2
  372. package/static/UpLinks.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  373. package/static/Version.f6e570dfe38870a45bf5.js +0 -2
  374. package/static/Version.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  375. package/static/Versions.f6e570dfe38870a45bf5.js +0 -2
  376. package/static/Versions.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  377. package/static/main.f6e570dfe38870a45bf5.js +0 -2
  378. package/static/main.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
  379. package/static/runtime.f6e570dfe38870a45bf5.js +0 -2
  380. package/static/vendors.f6e570dfe38870a45bf5.js +0 -2
  381. package/static/vendors.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -98
@@ -0,0 +1,602 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`<Dist /> component should render the component in default state 1`] = `
4
+ Object {
5
+ "asFragment": [Function],
6
+ "baseElement": .emotion-0 {
7
+ font-weight: 700;
8
+ text-transform: capitalize;
9
+ }
10
+
11
+ .emotion-2 {
12
+ padding-left: 0;
13
+ padding-right: 0;
14
+ }
15
+
16
+ .emotion-4 {
17
+ margin-right: 5px;
18
+ text-transform: capitalize;
19
+ }
20
+
21
+ <body>
22
+ <div>
23
+ <ul
24
+ class="MuiList-root MuiList-padding MuiList-subheader"
25
+ >
26
+ <span
27
+ class="MuiTypography-root emotion-0 emotion-1 MuiTypography-subtitle1"
28
+ >
29
+ Latest Distribution
30
+ </span>
31
+ <div
32
+ aria-disabled="false"
33
+ class="MuiButtonBase-root MuiListItem-root emotion-2 emotion-3 MuiListItem-gutters MuiListItem-button"
34
+ role="button"
35
+ tabindex="0"
36
+ >
37
+ <div
38
+ class="MuiChip-root emotion-4 emotion-5"
39
+ >
40
+ <span
41
+ class="MuiChip-label"
42
+ >
43
+ <b>
44
+ file count
45
+ </b>
46
+ :
47
+ 7
48
+ </span>
49
+ </div>
50
+ <div
51
+ class="MuiChip-root emotion-4 emotion-5"
52
+ >
53
+ <span
54
+ class="MuiChip-label"
55
+ >
56
+ <b>
57
+ Size
58
+ </b>
59
+ :
60
+ 10.00 Bytes
61
+ </span>
62
+ </div>
63
+ <span
64
+ class="MuiTouchRipple-root"
65
+ />
66
+ </div>
67
+ </ul>
68
+ </div>
69
+ </body>,
70
+ "container": .emotion-0 {
71
+ font-weight: 700;
72
+ text-transform: capitalize;
73
+ }
74
+
75
+ .emotion-2 {
76
+ padding-left: 0;
77
+ padding-right: 0;
78
+ }
79
+
80
+ .emotion-4 {
81
+ margin-right: 5px;
82
+ text-transform: capitalize;
83
+ }
84
+
85
+ <div>
86
+ <ul
87
+ class="MuiList-root MuiList-padding MuiList-subheader"
88
+ >
89
+ <span
90
+ class="MuiTypography-root emotion-0 emotion-1 MuiTypography-subtitle1"
91
+ >
92
+ Latest Distribution
93
+ </span>
94
+ <div
95
+ aria-disabled="false"
96
+ class="MuiButtonBase-root MuiListItem-root emotion-2 emotion-3 MuiListItem-gutters MuiListItem-button"
97
+ role="button"
98
+ tabindex="0"
99
+ >
100
+ <div
101
+ class="MuiChip-root emotion-4 emotion-5"
102
+ >
103
+ <span
104
+ class="MuiChip-label"
105
+ >
106
+ <b>
107
+ file count
108
+ </b>
109
+ :
110
+ 7
111
+ </span>
112
+ </div>
113
+ <div
114
+ class="MuiChip-root emotion-4 emotion-5"
115
+ >
116
+ <span
117
+ class="MuiChip-label"
118
+ >
119
+ <b>
120
+ Size
121
+ </b>
122
+ :
123
+ 10.00 Bytes
124
+ </span>
125
+ </div>
126
+ <span
127
+ class="MuiTouchRipple-root"
128
+ />
129
+ </div>
130
+ </ul>
131
+ </div>,
132
+ "debug": [Function],
133
+ "findAllByAltText": [Function],
134
+ "findAllByDisplayValue": [Function],
135
+ "findAllByLabelText": [Function],
136
+ "findAllByPlaceholderText": [Function],
137
+ "findAllByRole": [Function],
138
+ "findAllByTestId": [Function],
139
+ "findAllByText": [Function],
140
+ "findAllByTitle": [Function],
141
+ "findByAltText": [Function],
142
+ "findByDisplayValue": [Function],
143
+ "findByLabelText": [Function],
144
+ "findByPlaceholderText": [Function],
145
+ "findByRole": [Function],
146
+ "findByTestId": [Function],
147
+ "findByText": [Function],
148
+ "findByTitle": [Function],
149
+ "getAllByAltText": [Function],
150
+ "getAllByDisplayValue": [Function],
151
+ "getAllByLabelText": [Function],
152
+ "getAllByPlaceholderText": [Function],
153
+ "getAllByRole": [Function],
154
+ "getAllByTestId": [Function],
155
+ "getAllByText": [Function],
156
+ "getAllByTitle": [Function],
157
+ "getByAltText": [Function],
158
+ "getByDisplayValue": [Function],
159
+ "getByLabelText": [Function],
160
+ "getByPlaceholderText": [Function],
161
+ "getByRole": [Function],
162
+ "getByTestId": [Function],
163
+ "getByText": [Function],
164
+ "getByTitle": [Function],
165
+ "queryAllByAltText": [Function],
166
+ "queryAllByDisplayValue": [Function],
167
+ "queryAllByLabelText": [Function],
168
+ "queryAllByPlaceholderText": [Function],
169
+ "queryAllByRole": [Function],
170
+ "queryAllByTestId": [Function],
171
+ "queryAllByText": [Function],
172
+ "queryAllByTitle": [Function],
173
+ "queryByAltText": [Function],
174
+ "queryByDisplayValue": [Function],
175
+ "queryByLabelText": [Function],
176
+ "queryByPlaceholderText": [Function],
177
+ "queryByRole": [Function],
178
+ "queryByTestId": [Function],
179
+ "queryByText": [Function],
180
+ "queryByTitle": [Function],
181
+ "rerender": [Function],
182
+ "unmount": [Function],
183
+ }
184
+ `;
185
+
186
+ exports[`<Dist /> component should render the component with license as object 1`] = `
187
+ Object {
188
+ "asFragment": [Function],
189
+ "baseElement": .emotion-0 {
190
+ font-weight: 700;
191
+ text-transform: capitalize;
192
+ }
193
+
194
+ .emotion-2 {
195
+ padding-left: 0;
196
+ padding-right: 0;
197
+ }
198
+
199
+ .emotion-4 {
200
+ margin-right: 5px;
201
+ text-transform: capitalize;
202
+ }
203
+
204
+ <body>
205
+ <div>
206
+ <ul
207
+ class="MuiList-root MuiList-padding MuiList-subheader"
208
+ >
209
+ <span
210
+ class="MuiTypography-root emotion-0 emotion-1 MuiTypography-subtitle1"
211
+ >
212
+ Latest Distribution
213
+ </span>
214
+ <div
215
+ aria-disabled="false"
216
+ class="MuiButtonBase-root MuiListItem-root emotion-2 emotion-3 MuiListItem-gutters MuiListItem-button"
217
+ role="button"
218
+ tabindex="0"
219
+ >
220
+ <div
221
+ class="MuiChip-root emotion-4 emotion-5"
222
+ >
223
+ <span
224
+ class="MuiChip-label"
225
+ >
226
+ <b>
227
+ file count
228
+ </b>
229
+ :
230
+ 7
231
+ </span>
232
+ </div>
233
+ <div
234
+ class="MuiChip-root emotion-4 emotion-5"
235
+ >
236
+ <span
237
+ class="MuiChip-label"
238
+ >
239
+ <b>
240
+ Size
241
+ </b>
242
+ :
243
+ 10.00 Bytes
244
+ </span>
245
+ </div>
246
+ <div
247
+ class="MuiChip-root emotion-4 emotion-5"
248
+ >
249
+ <span
250
+ class="MuiChip-label"
251
+ >
252
+ <b>
253
+ License
254
+ </b>
255
+ :
256
+ MIT
257
+ </span>
258
+ </div>
259
+ <span
260
+ class="MuiTouchRipple-root"
261
+ />
262
+ </div>
263
+ </ul>
264
+ </div>
265
+ </body>,
266
+ "container": .emotion-0 {
267
+ font-weight: 700;
268
+ text-transform: capitalize;
269
+ }
270
+
271
+ .emotion-2 {
272
+ padding-left: 0;
273
+ padding-right: 0;
274
+ }
275
+
276
+ .emotion-4 {
277
+ margin-right: 5px;
278
+ text-transform: capitalize;
279
+ }
280
+
281
+ <div>
282
+ <ul
283
+ class="MuiList-root MuiList-padding MuiList-subheader"
284
+ >
285
+ <span
286
+ class="MuiTypography-root emotion-0 emotion-1 MuiTypography-subtitle1"
287
+ >
288
+ Latest Distribution
289
+ </span>
290
+ <div
291
+ aria-disabled="false"
292
+ class="MuiButtonBase-root MuiListItem-root emotion-2 emotion-3 MuiListItem-gutters MuiListItem-button"
293
+ role="button"
294
+ tabindex="0"
295
+ >
296
+ <div
297
+ class="MuiChip-root emotion-4 emotion-5"
298
+ >
299
+ <span
300
+ class="MuiChip-label"
301
+ >
302
+ <b>
303
+ file count
304
+ </b>
305
+ :
306
+ 7
307
+ </span>
308
+ </div>
309
+ <div
310
+ class="MuiChip-root emotion-4 emotion-5"
311
+ >
312
+ <span
313
+ class="MuiChip-label"
314
+ >
315
+ <b>
316
+ Size
317
+ </b>
318
+ :
319
+ 10.00 Bytes
320
+ </span>
321
+ </div>
322
+ <div
323
+ class="MuiChip-root emotion-4 emotion-5"
324
+ >
325
+ <span
326
+ class="MuiChip-label"
327
+ >
328
+ <b>
329
+ License
330
+ </b>
331
+ :
332
+ MIT
333
+ </span>
334
+ </div>
335
+ <span
336
+ class="MuiTouchRipple-root"
337
+ />
338
+ </div>
339
+ </ul>
340
+ </div>,
341
+ "debug": [Function],
342
+ "findAllByAltText": [Function],
343
+ "findAllByDisplayValue": [Function],
344
+ "findAllByLabelText": [Function],
345
+ "findAllByPlaceholderText": [Function],
346
+ "findAllByRole": [Function],
347
+ "findAllByTestId": [Function],
348
+ "findAllByText": [Function],
349
+ "findAllByTitle": [Function],
350
+ "findByAltText": [Function],
351
+ "findByDisplayValue": [Function],
352
+ "findByLabelText": [Function],
353
+ "findByPlaceholderText": [Function],
354
+ "findByRole": [Function],
355
+ "findByTestId": [Function],
356
+ "findByText": [Function],
357
+ "findByTitle": [Function],
358
+ "getAllByAltText": [Function],
359
+ "getAllByDisplayValue": [Function],
360
+ "getAllByLabelText": [Function],
361
+ "getAllByPlaceholderText": [Function],
362
+ "getAllByRole": [Function],
363
+ "getAllByTestId": [Function],
364
+ "getAllByText": [Function],
365
+ "getAllByTitle": [Function],
366
+ "getByAltText": [Function],
367
+ "getByDisplayValue": [Function],
368
+ "getByLabelText": [Function],
369
+ "getByPlaceholderText": [Function],
370
+ "getByRole": [Function],
371
+ "getByTestId": [Function],
372
+ "getByText": [Function],
373
+ "getByTitle": [Function],
374
+ "queryAllByAltText": [Function],
375
+ "queryAllByDisplayValue": [Function],
376
+ "queryAllByLabelText": [Function],
377
+ "queryAllByPlaceholderText": [Function],
378
+ "queryAllByRole": [Function],
379
+ "queryAllByTestId": [Function],
380
+ "queryAllByText": [Function],
381
+ "queryAllByTitle": [Function],
382
+ "queryByAltText": [Function],
383
+ "queryByDisplayValue": [Function],
384
+ "queryByLabelText": [Function],
385
+ "queryByPlaceholderText": [Function],
386
+ "queryByRole": [Function],
387
+ "queryByTestId": [Function],
388
+ "queryByText": [Function],
389
+ "queryByTitle": [Function],
390
+ "rerender": [Function],
391
+ "unmount": [Function],
392
+ }
393
+ `;
394
+
395
+ exports[`<Dist /> component should render the component with license as string 1`] = `
396
+ Object {
397
+ "asFragment": [Function],
398
+ "baseElement": .emotion-0 {
399
+ font-weight: 700;
400
+ text-transform: capitalize;
401
+ }
402
+
403
+ .emotion-2 {
404
+ padding-left: 0;
405
+ padding-right: 0;
406
+ }
407
+
408
+ .emotion-4 {
409
+ margin-right: 5px;
410
+ text-transform: capitalize;
411
+ }
412
+
413
+ <body>
414
+ <div>
415
+ <ul
416
+ class="MuiList-root MuiList-padding MuiList-subheader"
417
+ >
418
+ <span
419
+ class="MuiTypography-root emotion-0 emotion-1 MuiTypography-subtitle1"
420
+ >
421
+ Latest Distribution
422
+ </span>
423
+ <div
424
+ aria-disabled="false"
425
+ class="MuiButtonBase-root MuiListItem-root emotion-2 emotion-3 MuiListItem-gutters MuiListItem-button"
426
+ role="button"
427
+ tabindex="0"
428
+ >
429
+ <div
430
+ class="MuiChip-root emotion-4 emotion-5"
431
+ >
432
+ <span
433
+ class="MuiChip-label"
434
+ >
435
+ <b>
436
+ file count
437
+ </b>
438
+ :
439
+ 7
440
+ </span>
441
+ </div>
442
+ <div
443
+ class="MuiChip-root emotion-4 emotion-5"
444
+ >
445
+ <span
446
+ class="MuiChip-label"
447
+ >
448
+ <b>
449
+ Size
450
+ </b>
451
+ :
452
+ 10.00 Bytes
453
+ </span>
454
+ </div>
455
+ <div
456
+ class="MuiChip-root emotion-4 emotion-5"
457
+ >
458
+ <span
459
+ class="MuiChip-label"
460
+ >
461
+ <b>
462
+ License
463
+ </b>
464
+ :
465
+ MIT
466
+ </span>
467
+ </div>
468
+ <span
469
+ class="MuiTouchRipple-root"
470
+ />
471
+ </div>
472
+ </ul>
473
+ </div>
474
+ </body>,
475
+ "container": .emotion-0 {
476
+ font-weight: 700;
477
+ text-transform: capitalize;
478
+ }
479
+
480
+ .emotion-2 {
481
+ padding-left: 0;
482
+ padding-right: 0;
483
+ }
484
+
485
+ .emotion-4 {
486
+ margin-right: 5px;
487
+ text-transform: capitalize;
488
+ }
489
+
490
+ <div>
491
+ <ul
492
+ class="MuiList-root MuiList-padding MuiList-subheader"
493
+ >
494
+ <span
495
+ class="MuiTypography-root emotion-0 emotion-1 MuiTypography-subtitle1"
496
+ >
497
+ Latest Distribution
498
+ </span>
499
+ <div
500
+ aria-disabled="false"
501
+ class="MuiButtonBase-root MuiListItem-root emotion-2 emotion-3 MuiListItem-gutters MuiListItem-button"
502
+ role="button"
503
+ tabindex="0"
504
+ >
505
+ <div
506
+ class="MuiChip-root emotion-4 emotion-5"
507
+ >
508
+ <span
509
+ class="MuiChip-label"
510
+ >
511
+ <b>
512
+ file count
513
+ </b>
514
+ :
515
+ 7
516
+ </span>
517
+ </div>
518
+ <div
519
+ class="MuiChip-root emotion-4 emotion-5"
520
+ >
521
+ <span
522
+ class="MuiChip-label"
523
+ >
524
+ <b>
525
+ Size
526
+ </b>
527
+ :
528
+ 10.00 Bytes
529
+ </span>
530
+ </div>
531
+ <div
532
+ class="MuiChip-root emotion-4 emotion-5"
533
+ >
534
+ <span
535
+ class="MuiChip-label"
536
+ >
537
+ <b>
538
+ License
539
+ </b>
540
+ :
541
+ MIT
542
+ </span>
543
+ </div>
544
+ <span
545
+ class="MuiTouchRipple-root"
546
+ />
547
+ </div>
548
+ </ul>
549
+ </div>,
550
+ "debug": [Function],
551
+ "findAllByAltText": [Function],
552
+ "findAllByDisplayValue": [Function],
553
+ "findAllByLabelText": [Function],
554
+ "findAllByPlaceholderText": [Function],
555
+ "findAllByRole": [Function],
556
+ "findAllByTestId": [Function],
557
+ "findAllByText": [Function],
558
+ "findAllByTitle": [Function],
559
+ "findByAltText": [Function],
560
+ "findByDisplayValue": [Function],
561
+ "findByLabelText": [Function],
562
+ "findByPlaceholderText": [Function],
563
+ "findByRole": [Function],
564
+ "findByTestId": [Function],
565
+ "findByText": [Function],
566
+ "findByTitle": [Function],
567
+ "getAllByAltText": [Function],
568
+ "getAllByDisplayValue": [Function],
569
+ "getAllByLabelText": [Function],
570
+ "getAllByPlaceholderText": [Function],
571
+ "getAllByRole": [Function],
572
+ "getAllByTestId": [Function],
573
+ "getAllByText": [Function],
574
+ "getAllByTitle": [Function],
575
+ "getByAltText": [Function],
576
+ "getByDisplayValue": [Function],
577
+ "getByLabelText": [Function],
578
+ "getByPlaceholderText": [Function],
579
+ "getByRole": [Function],
580
+ "getByTestId": [Function],
581
+ "getByText": [Function],
582
+ "getByTitle": [Function],
583
+ "queryAllByAltText": [Function],
584
+ "queryAllByDisplayValue": [Function],
585
+ "queryAllByLabelText": [Function],
586
+ "queryAllByPlaceholderText": [Function],
587
+ "queryAllByRole": [Function],
588
+ "queryAllByTestId": [Function],
589
+ "queryAllByText": [Function],
590
+ "queryAllByTitle": [Function],
591
+ "queryByAltText": [Function],
592
+ "queryByDisplayValue": [Function],
593
+ "queryByLabelText": [Function],
594
+ "queryByPlaceholderText": [Function],
595
+ "queryByRole": [Function],
596
+ "queryByTestId": [Function],
597
+ "queryByText": [Function],
598
+ "queryByTitle": [Function],
599
+ "rerender": [Function],
600
+ "unmount": [Function],
601
+ }
602
+ `;
@@ -0,0 +1 @@
1
+ export { default } from './Dist';
@@ -0,0 +1,27 @@
1
+ import styled from '@emotion/styled';
2
+
3
+ import Chip from 'verdaccio-ui/components/Chip';
4
+ import FloatingActionButton from 'verdaccio-ui/components/FloatingActionButton';
5
+ import ListItem from 'verdaccio-ui/components/ListItem';
6
+ import Text from 'verdaccio-ui/components/Text';
7
+ import { Theme } from 'verdaccio-ui/design-tokens/theme';
8
+
9
+ export const StyledText = styled(Text)<{ theme?: Theme }>((props) => ({
10
+ fontWeight: props.theme && props.theme.fontWeight.bold,
11
+ textTransform: 'capitalize',
12
+ }));
13
+
14
+ export const DistListItem = styled(ListItem)({
15
+ paddingLeft: 0,
16
+ paddingRight: 0,
17
+ });
18
+
19
+ export const DistChips = styled(Chip)({
20
+ marginRight: 5,
21
+ textTransform: 'capitalize',
22
+ });
23
+
24
+ export const DownloadButton = styled(FloatingActionButton)<{ theme?: Theme }>((props) => ({
25
+ backgroundColor: props.theme && props.theme.palette.primary.main,
26
+ color: props.theme && props.theme.palette.white,
27
+ }));
@@ -0,0 +1,71 @@
1
+ import React from 'react';
2
+
3
+ import { render, cleanup } from 'verdaccio-ui/utils/test-react-testing-library';
4
+
5
+ import { PackageMetaInterface } from '../../../../../types/packageMeta';
6
+ import { DetailContext } from '../../context';
7
+
8
+ import Engine from './Engines';
9
+
10
+ jest.mock('./img/node.png', () => '');
11
+ jest.mock('../Install/img/npm.svg', () => '');
12
+
13
+ const mockPackageMeta = (
14
+ engines?: PackageMetaInterface['latest']['engines']
15
+ ): PackageMetaInterface => ({
16
+ latest: {
17
+ name: 'verdaccio',
18
+ version: '0.0.0',
19
+ dist: {
20
+ fileCount: 1,
21
+ unpackedSize: 1,
22
+ },
23
+ ...(engines && { engines }),
24
+ },
25
+ _uplinks: {},
26
+ });
27
+
28
+ describe('<Engines /> component', () => {
29
+ afterEach(() => {
30
+ cleanup();
31
+ });
32
+ const htmlRender = 'NPM Version';
33
+
34
+ test('should render the component in default state', () => {
35
+ const packageMeta = mockPackageMeta({
36
+ node: '>= 0.1.98',
37
+ npm: '>3',
38
+ });
39
+
40
+ const wrapper = render(
41
+ <DetailContext.Provider value={{ packageMeta }}>
42
+ <Engine />
43
+ </DetailContext.Provider>
44
+ );
45
+
46
+ expect(wrapper.getByText(htmlRender)).toBeInTheDocument();
47
+ });
48
+
49
+ test('should render the component when there is no engine key in package meta', () => {
50
+ const packageMeta = mockPackageMeta();
51
+ const wrapper = render(
52
+ <DetailContext.Provider value={{ packageMeta }}>
53
+ <Engine />
54
+ </DetailContext.Provider>
55
+ );
56
+
57
+ expect(wrapper.queryByText(htmlRender)).not.toBeInTheDocument();
58
+ });
59
+
60
+ test('should render the component when there is no keys in engine in package meta', () => {
61
+ const packageMeta = mockPackageMeta({});
62
+
63
+ const wrapper = render(
64
+ <DetailContext.Provider value={{ packageMeta }}>
65
+ <Engine />
66
+ </DetailContext.Provider>
67
+ );
68
+
69
+ expect(wrapper.queryByText(htmlRender)).not.toBeInTheDocument();
70
+ });
71
+ });