@verdaccio/ui-components 3.0.0-next-7.6 → 3.0.0-next-7.8

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 (302) hide show
  1. package/.eslintrc +1 -1
  2. package/CHANGELOG.md +12 -0
  3. package/build/Theme/theme.js +3 -3
  4. package/build/components/ActionBar/ActionBar.js +3 -1
  5. package/build/components/ActionBar/ActionBarAction.js +7 -6
  6. package/build/components/Author/Author.js +13 -42
  7. package/build/components/CopyClipboard/utils.js +3 -12
  8. package/build/components/Dependencies/Dependencies.js +27 -18
  9. package/build/components/Dependencies/DependencyBlock.js +34 -19
  10. package/build/components/Developers/DeveloperType.js +12 -0
  11. package/build/components/Developers/Developers.js +20 -22
  12. package/build/components/Developers/Title.js +5 -9
  13. package/build/components/Developers/index.js +4 -4
  14. package/build/components/Distribution/Dist.js +1 -1
  15. package/build/components/Distribution/styles.js +10 -23
  16. package/build/components/Engines/Engines.js +7 -1
  17. package/build/components/Engines/styles.js +6 -6
  18. package/build/components/FundButton/FundButton.js +7 -8
  19. package/build/components/HeaderInfoDialog/HeaderInfoDialog.js +2 -1
  20. package/build/components/Icons/DevsIcons/CommonJS.js +1 -12
  21. package/build/components/Icons/DevsIcons/ES6Module.js +2 -13
  22. package/build/components/Icons/DevsIcons/Git.js +1 -12
  23. package/build/components/Icons/DevsIcons/NodeJS.js +1 -12
  24. package/build/components/Icons/DevsIcons/TypeScript.js +1 -12
  25. package/build/components/Icons/FileBinary.js +11 -5
  26. package/build/components/Icons/Law.js +12 -6
  27. package/build/components/Icons/Managers/Npm.js +1 -12
  28. package/build/components/Icons/Managers/Pnpm.js +1 -12
  29. package/build/components/Icons/Managers/Yarn.js +1 -12
  30. package/build/components/Install/Install.js +23 -18
  31. package/build/components/Install/InstallListItem.js +19 -18
  32. package/build/components/Keywords/KeywordListItems.js +34 -0
  33. package/build/components/Keywords/Keywords.js +39 -0
  34. package/build/{sections/Header/RegistryInfoDialog → components/Keywords}/index.js +2 -2
  35. package/build/components/Link/Link.js +4 -16
  36. package/build/components/Link/index.js +1 -1
  37. package/build/components/LinkExternal/LinkExternal.js +32 -0
  38. package/build/components/LinkExternal/index.js +14 -0
  39. package/build/components/Loading/styles.js +3 -2
  40. package/build/components/LoginDialog/LoginDialog.js +12 -1
  41. package/build/components/LoginDialog/LoginDialogCloseButton.js +3 -2
  42. package/build/components/LoginDialog/LoginDialogForm.js +2 -14
  43. package/build/components/LoginDialog/LoginDialogFormError.js +3 -2
  44. package/build/components/Logo/Logo.js +13 -6
  45. package/build/components/Package/Package.js +43 -34
  46. package/build/components/Package/styles.js +46 -58
  47. package/build/components/Person/Person.js +48 -0
  48. package/build/components/Person/PersonTooltip.js +22 -0
  49. package/build/components/{Package/Tag → Person}/index.js +2 -2
  50. package/build/components/Person/utils.js +17 -0
  51. package/build/components/RawViewer/RawViewer.js +11 -5
  52. package/build/components/Readme/Readme.js +15 -6
  53. package/build/components/Readme/Readme.js.map +1 -1
  54. package/build/components/Readme/Readme.spec.js +19 -0
  55. package/build/components/Readme/Readme.spec.js.map +1 -1
  56. package/build/components/Readme/utils.js +2 -5
  57. package/build/components/RegistryInfoDialog/styles.js +9 -10
  58. package/build/components/Repository/Repository.js +19 -31
  59. package/build/components/Search/AutoComplete/styles.js +4 -41
  60. package/build/components/Search/Search.js +4 -2
  61. package/build/components/Search/SearchItem.js +51 -38
  62. package/build/components/Search/utils.js +23 -0
  63. package/build/components/SettingsMenu/SettingsMenu.js +35 -9
  64. package/build/components/SideBarTitle/SideBarTitle.js +16 -6
  65. package/build/components/UpLinks/UpLinks.js +35 -6
  66. package/build/components/UpLinks/UplinkLink.js +22 -0
  67. package/build/components/UpLinks/styles.js +5 -4
  68. package/build/components/Versions/HistoryList.js +8 -5
  69. package/build/components/Versions/TagList.js +8 -4
  70. package/build/components/Versions/Versions.js +30 -7
  71. package/build/index.js +27 -3
  72. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js +1 -0
  73. package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js +1 -0
  74. package/build/sections/Detail/Detail.js +6 -2
  75. package/build/sections/Detail/Tabs.js +4 -3
  76. package/build/sections/Footer/Footer.js +17 -8
  77. package/build/sections/Footer/styles.js +13 -10
  78. package/build/sections/Header/HeaderLeft.js +14 -17
  79. package/build/sections/Header/HeaderMenu.js +1 -1
  80. package/build/sections/Header/HeaderRight.js +12 -3
  81. package/build/sections/Header/HeaderSettingsDialog.js +2 -2
  82. package/build/sections/Header/styles.js +43 -82
  83. package/build/sections/SideBar/Sidebar.js +10 -15
  84. package/build/src/Theme/ThemeProvider.test.d.ts +1 -0
  85. package/build/src/components/Author/Author.d.ts +0 -5
  86. package/build/src/components/CopyClipboard/CopyToClipBoard.test.d.ts +1 -0
  87. package/build/src/components/Dependencies/Dependencies.d.ts +0 -1
  88. package/build/src/components/Developers/DeveloperType.d.ts +4 -0
  89. package/build/src/components/Developers/Developers.d.ts +1 -4
  90. package/build/src/components/Developers/Title.d.ts +1 -4
  91. package/build/src/components/Developers/index.d.ts +2 -1
  92. package/build/src/components/Distribution/styles.d.ts +0 -1
  93. package/build/src/components/ErrorBoundary/ErrorBoundary.test.d.ts +1 -0
  94. package/build/src/components/HeaderInfoDialog/HeaderInfoDialog.test.d.ts +1 -0
  95. package/build/src/components/Heading/Heading.test.d.ts +1 -0
  96. package/build/src/components/Icons/Icons.test.d.ts +1 -0
  97. package/build/src/components/Install/InstallListItem.d.ts +1 -1
  98. package/build/src/components/Keywords/KeywordListItems.d.ts +5 -0
  99. package/build/src/components/Keywords/Keywords.d.ts +6 -0
  100. package/build/src/components/Keywords/Keywords.stories.d.ts +5 -0
  101. package/build/src/components/Keywords/Keywords.test.d.ts +1 -0
  102. package/build/src/components/Keywords/index.d.ts +1 -0
  103. package/build/src/components/Link/Link.d.ts +0 -3
  104. package/build/src/components/Link/Link.test.d.ts +1 -0
  105. package/build/src/components/Link/index.d.ts +1 -1
  106. package/build/src/components/LinkExternal/LinkExternal.d.ts +3 -0
  107. package/build/src/components/LinkExternal/LinkExternal.test.d.ts +1 -0
  108. package/build/src/components/LinkExternal/index.d.ts +1 -0
  109. package/build/src/components/Logo/Logo.d.ts +1 -0
  110. package/build/src/components/Logo/Logo.stories.d.ts +5 -0
  111. package/build/src/components/Package/Package.d.ts +1 -1
  112. package/build/src/components/Package/styles.d.ts +0 -8
  113. package/build/src/components/Person/Person.d.ts +9 -0
  114. package/build/src/components/Person/Person.test.d.ts +1 -0
  115. package/build/src/components/Person/PersonTooltip.d.ts +6 -0
  116. package/build/src/components/Person/index.d.ts +1 -0
  117. package/build/src/components/Person/utils.d.ts +3 -0
  118. package/build/src/components/Readme/Readme.d.ts +0 -1
  119. package/build/src/components/Search/AutoComplete/styles.d.ts +0 -8
  120. package/build/src/components/Search/utils.d.ts +1 -0
  121. package/build/src/components/SettingsMenu/SettingsMenu.d.ts +2 -2
  122. package/build/src/components/SettingsMenu/SettingsMenu.test.d.ts +1 -0
  123. package/build/src/components/UpLinks/UplinkLink.d.ts +6 -0
  124. package/build/src/components/Versions/Versions.d.ts +1 -0
  125. package/build/src/index.d.ts +4 -1
  126. package/build/src/sections/Detail/Tabs.d.ts +1 -0
  127. package/build/src/sections/Header/styles.d.ts +0 -7
  128. package/build/src/store/models/routes.d.ts +8 -0
  129. package/build/src/store/models/utils.d.ts +1 -0
  130. package/build/src/types/packageMeta.d.ts +7 -5
  131. package/build/src/utils/routes.d.ts +1 -0
  132. package/build/src/utils/utils.d.ts +1 -0
  133. package/build/store/models/configuration.js +2 -1
  134. package/build/store/models/login.js +4 -2
  135. package/build/store/models/manifest.js +5 -3
  136. package/build/store/models/packages.js +4 -2
  137. package/build/store/models/routes.js +18 -0
  138. package/build/store/models/search.js +4 -2
  139. package/build/store/models/utils.js +10 -0
  140. package/build/utils/routes.js +1 -0
  141. package/build/utils/utils.js +20 -1
  142. package/package.json +4 -4
  143. package/src/AppTest/AppRoute.test.tsx +65 -0
  144. package/src/Theme/ThemeProvider.test.tsx +27 -0
  145. package/src/Theme/theme.ts +3 -3
  146. package/src/components/ActionBar/ActionBar.test.tsx +36 -15
  147. package/src/components/ActionBar/ActionBar.tsx +1 -1
  148. package/src/components/ActionBar/ActionBarAction.tsx +8 -5
  149. package/src/components/Author/Author.test.tsx +7 -1
  150. package/src/components/Author/Author.tsx +3 -41
  151. package/src/components/CopyClipboard/CopyToClipBoard.test.tsx +23 -0
  152. package/src/components/CopyClipboard/utils.ts +2 -13
  153. package/src/components/Dependencies/Dependencies.stories.tsx +11 -11
  154. package/src/components/Dependencies/Dependencies.tsx +28 -25
  155. package/src/components/Dependencies/DependencyBlock.test.tsx +19 -6
  156. package/src/components/Dependencies/DependencyBlock.tsx +28 -14
  157. package/src/components/Developers/DeveloperType.tsx +4 -0
  158. package/src/components/Developers/Developers.test.tsx +37 -10
  159. package/src/components/Developers/Developers.tsx +13 -13
  160. package/src/components/Developers/Title.tsx +1 -5
  161. package/src/components/Developers/index.ts +2 -1
  162. package/src/components/Distribution/Dist.test.tsx +1 -1
  163. package/src/components/Distribution/Dist.tsx +2 -4
  164. package/src/components/Distribution/styles.ts +0 -6
  165. package/src/components/Engines/Engines.tsx +6 -2
  166. package/src/components/Engines/styles.ts +1 -1
  167. package/src/components/ErrorBoundary/ErrorBoundary.test.tsx +39 -0
  168. package/src/components/FundButton/FundButton.tsx +5 -5
  169. package/src/components/HeaderInfoDialog/HeaderInfoDialog.test.tsx +51 -0
  170. package/src/components/HeaderInfoDialog/HeaderInfoDialog.tsx +2 -2
  171. package/src/components/Heading/Heading.test.tsx +20 -0
  172. package/src/components/Icons/DevsIcons/CommonJS.tsx +1 -7
  173. package/src/components/Icons/DevsIcons/ES6Module.tsx +2 -8
  174. package/src/components/Icons/DevsIcons/Git.tsx +1 -7
  175. package/src/components/Icons/DevsIcons/NodeJS.tsx +1 -7
  176. package/src/components/Icons/DevsIcons/TypeScript.tsx +1 -7
  177. package/src/components/Icons/FileBinary.tsx +2 -1
  178. package/src/components/Icons/Icons.stories.tsx +21 -5
  179. package/src/components/Icons/Icons.test.tsx +70 -0
  180. package/src/components/Icons/Law.tsx +2 -1
  181. package/src/components/Icons/Managers/Npm.tsx +1 -7
  182. package/src/components/Icons/Managers/Pnpm.tsx +1 -7
  183. package/src/components/Icons/Managers/Yarn.tsx +1 -7
  184. package/src/components/Install/Install.test.tsx +54 -13
  185. package/src/components/Install/Install.tsx +12 -11
  186. package/src/components/Install/InstallListItem.tsx +12 -11
  187. package/src/components/Keywords/KeywordListItems.tsx +22 -0
  188. package/src/components/Keywords/Keywords.stories.tsx +19 -0
  189. package/src/components/Keywords/Keywords.test.tsx +57 -0
  190. package/src/components/Keywords/Keywords.tsx +35 -0
  191. package/src/components/Keywords/index.ts +1 -0
  192. package/src/components/Link/Link.test.tsx +25 -0
  193. package/src/components/Link/Link.tsx +4 -18
  194. package/src/components/Link/index.ts +1 -1
  195. package/src/components/LinkExternal/LinkExternal.test.tsx +18 -0
  196. package/src/components/LinkExternal/LinkExternal.tsx +22 -0
  197. package/src/components/LinkExternal/index.ts +1 -0
  198. package/src/components/Loading/Loading.test.tsx +8 -5
  199. package/src/components/Loading/styles.ts +1 -0
  200. package/src/components/LoginDialog/LoginDialog.test.tsx +1 -1
  201. package/src/components/LoginDialog/LoginDialog.tsx +10 -1
  202. package/src/components/LoginDialog/LoginDialogCloseButton.tsx +1 -0
  203. package/src/components/LoginDialog/LoginDialogForm.tsx +0 -2
  204. package/src/components/LoginDialog/LoginDialogFormError.tsx +1 -1
  205. package/src/components/Logo/Logo.stories.tsx +16 -0
  206. package/src/components/Logo/Logo.test.tsx +8 -1
  207. package/src/components/Logo/Logo.tsx +19 -3
  208. package/src/components/Package/Package.test.tsx +47 -14
  209. package/src/components/Package/Package.tsx +41 -44
  210. package/src/components/Package/styles.ts +7 -17
  211. package/src/components/PackageList/Packagelist.test.tsx +1 -0
  212. package/src/components/Person/Person.test.tsx +50 -0
  213. package/src/components/Person/Person.tsx +45 -0
  214. package/src/components/Person/PersonTooltip.tsx +26 -0
  215. package/src/components/Person/index.ts +1 -0
  216. package/src/components/Person/utils.ts +20 -0
  217. package/src/components/RawViewer/RawViewer.tsx +8 -4
  218. package/src/components/Readme/Readme.spec.tsx +17 -0
  219. package/src/components/Readme/Readme.tsx +10 -5
  220. package/src/components/Readme/utils.ts +2 -5
  221. package/src/components/RegistryInfoDialog/styles.ts +5 -4
  222. package/src/components/Repository/Repository.tsx +9 -14
  223. package/src/components/Search/AutoComplete/styles.ts +7 -0
  224. package/src/components/Search/Search.test.tsx +36 -9
  225. package/src/components/Search/Search.tsx +4 -2
  226. package/src/components/Search/SearchItem.tsx +19 -8
  227. package/src/components/Search/utils.ts +17 -0
  228. package/src/components/SettingsMenu/SettingsMenu.test.tsx +41 -0
  229. package/src/components/SettingsMenu/SettingsMenu.tsx +48 -10
  230. package/src/components/SideBarTitle/SideBarTitle.tsx +19 -3
  231. package/src/components/UpLinks/UpLinks.test.tsx +7 -0
  232. package/src/components/UpLinks/UpLinks.tsx +38 -15
  233. package/src/components/UpLinks/UplinkLink.tsx +20 -0
  234. package/src/components/UpLinks/styles.ts +1 -0
  235. package/src/components/Versions/HistoryList.tsx +9 -4
  236. package/src/components/Versions/TagList.tsx +4 -3
  237. package/src/components/Versions/Versions.test.tsx +2 -0
  238. package/src/components/Versions/Versions.tsx +57 -32
  239. package/src/index.ts +4 -1
  240. package/src/providers/AppConfigurationProvider/AppConfigurationProvider.tsx +1 -0
  241. package/src/providers/PersistenceSettingProvider/PersistenceSettingProvider.tsx +2 -0
  242. package/src/providers/VersionProvider/VersionProvider.test.tsx +3 -3
  243. package/src/sections/Detail/Detail.test.tsx +8 -1
  244. package/src/sections/Detail/Detail.tsx +11 -4
  245. package/src/sections/Detail/Tabs.tsx +5 -2
  246. package/src/sections/Footer/Footer.tsx +15 -4
  247. package/src/sections/Footer/styles.ts +4 -0
  248. package/src/sections/Header/Header.test.tsx +12 -10
  249. package/src/sections/Header/HeaderLeft.tsx +19 -11
  250. package/src/sections/Header/HeaderMenu.tsx +1 -1
  251. package/src/sections/Header/HeaderRight.tsx +14 -3
  252. package/src/sections/Header/HeaderSettingsDialog.tsx +1 -1
  253. package/src/sections/Header/RegistryInfoContent/RegistryInfoContent.test.tsx +1 -1
  254. package/src/sections/Header/styles.ts +4 -16
  255. package/src/sections/Home/Home.test.tsx +12 -4
  256. package/src/sections/SideBar/Sidebar.test.tsx +20 -13
  257. package/src/sections/SideBar/Sidebar.tsx +5 -9
  258. package/src/store/api.test.ts +16 -0
  259. package/src/store/models/configuration.ts +2 -1
  260. package/src/store/models/login.ts +10 -12
  261. package/src/store/models/manifest.ts +6 -5
  262. package/src/store/models/packages.ts +4 -5
  263. package/src/store/models/routes.ts +10 -0
  264. package/src/store/models/search.ts +4 -2
  265. package/src/store/models/utils.ts +3 -0
  266. package/src/types/packageMeta.ts +7 -5
  267. package/src/utils/routes.ts +1 -0
  268. package/src/utils/utils.test.ts +34 -0
  269. package/src/utils/utils.ts +20 -5
  270. package/tsconfig.json +1 -1
  271. package/build/components/Developers/styles.js +0 -65
  272. package/build/components/Distribution/utils.js +0 -25
  273. package/build/components/Distribution/utilts.spec.js +0 -18
  274. package/build/components/Package/Tag/Tag.js +0 -14
  275. package/build/components/Package/Tag/styles.js +0 -24
  276. package/build/sections/Header/RegistryInfoDialog/RegistryInfoDialog.js +0 -36
  277. package/build/sections/Header/RegistryInfoDialog/styles.js +0 -46
  278. package/build/sections/Header/RegistryInfoDialog/types.js +0 -6
  279. package/build/src/components/Developers/styles.d.ts +0 -11
  280. package/build/src/components/Distribution/utils.d.ts +0 -7
  281. package/build/src/components/Package/Tag/Tag.d.ts +0 -6
  282. package/build/src/components/Package/Tag/index.d.ts +0 -1
  283. package/build/src/components/Package/Tag/styles.d.ts +0 -5
  284. package/build/src/sections/Header/RegistryInfoDialog/RegistryInfoDialog.d.ts +0 -4
  285. package/build/src/sections/Header/RegistryInfoDialog/index.d.ts +0 -1
  286. package/build/src/sections/Header/RegistryInfoDialog/styles.d.ts +0 -13
  287. package/build/src/sections/Header/RegistryInfoDialog/types.d.ts +0 -7
  288. package/src/components/Developers/styles.ts +0 -31
  289. package/src/components/Distribution/utils.ts +0 -32
  290. package/src/components/Distribution/utilts.spec.ts +0 -17
  291. package/src/components/Package/Tag/Tag.test.tsx +0 -15
  292. package/src/components/Package/Tag/Tag.tsx +0 -11
  293. package/src/components/Package/Tag/index.ts +0 -1
  294. package/src/components/Package/Tag/styles.ts +0 -11
  295. package/src/components/Search/AutoComplete/styles.tsx +0 -42
  296. package/src/sections/Header/RegistryInfoDialog/RegistryInfoDialog.tsx +0 -31
  297. package/src/sections/Header/RegistryInfoDialog/index.ts +0 -1
  298. package/src/sections/Header/RegistryInfoDialog/styles.ts +0 -21
  299. package/src/sections/Header/RegistryInfoDialog/types.ts +0 -8
  300. /package/build/components/Icons/DevsIcons/{es6modules.svg → es6module.svg} +0 -0
  301. /package/build/src/{components/Package/Tag/Tag.test.d.ts → AppTest/AppRoute.test.d.ts} +0 -0
  302. /package/src/components/Icons/DevsIcons/{es6modules.svg → es6module.svg} +0 -0
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _base = _interopRequireDefault(require("@emotion/styled/base"));
8
7
  var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
9
8
  var _react = _interopRequireDefault(require("react"));
10
9
  var _ActionBar = _interopRequireDefault(require("../../components/ActionBar"));
@@ -14,6 +13,7 @@ var _Distribution = _interopRequireDefault(require("../../components/Distributio
14
13
  var _Engines = _interopRequireDefault(require("../../components/Engines"));
15
14
  var _FundButton = _interopRequireDefault(require("../../components/FundButton"));
16
15
  var _Install = _interopRequireDefault(require("../../components/Install"));
16
+ var _Keywords = _interopRequireDefault(require("../../components/Keywords"));
17
17
  var _Repository = _interopRequireDefault(require("../../components/Repository"));
18
18
  var _SideBarTitle = _interopRequireDefault(require("../../components/SideBarTitle"));
19
19
  var _providers = require("../../providers");
@@ -43,10 +43,13 @@ const DetailSidebar = () => {
43
43
  if (!packageMeta || !packageName) {
44
44
  return null;
45
45
  }
46
- return /*#__PURE__*/_react.default.createElement(StyledPaper, {
46
+ return /*#__PURE__*/_react.default.createElement(_Paper.default, {
47
+ "data-testid": "sidebar",
47
48
  sx: {
48
49
  position: 'sticky',
49
- top: 0
50
+ top: 0,
51
+ p: 2,
52
+ ml: 2
50
53
  }
51
54
  }, /*#__PURE__*/_react.default.createElement(_SideBarTitle.default, {
52
55
  description: (_packageMeta$latest = packageMeta.latest) === null || _packageMeta$latest === void 0 ? void 0 : _packageMeta$latest.description,
@@ -60,18 +63,20 @@ const DetailSidebar = () => {
60
63
  packageMeta: packageMeta,
61
64
  showDownloadTarball: configOptions.showDownloadTarball,
62
65
  showRaw: configOptions.showRaw
66
+ }), /*#__PURE__*/_react.default.createElement(_FundButton.default, {
67
+ packageMeta: packageMeta
63
68
  }), /*#__PURE__*/_react.default.createElement(_Install.default, {
64
69
  configOptions: configOptions,
65
70
  packageMeta: packageMeta,
66
71
  packageName: packageName
67
- }), /*#__PURE__*/_react.default.createElement(_FundButton.default, {
68
- packageMeta: packageMeta
69
72
  }), /*#__PURE__*/_react.default.createElement(_Repository.default, {
70
73
  packageMeta: packageMeta
71
74
  }), /*#__PURE__*/_react.default.createElement(_Engines.default, {
72
75
  packageMeta: packageMeta
73
76
  }), /*#__PURE__*/_react.default.createElement(_Distribution.default, {
74
77
  packageMeta: packageMeta
78
+ }), /*#__PURE__*/_react.default.createElement(_Keywords.default, {
79
+ packageMeta: packageMeta
75
80
  }), /*#__PURE__*/_react.default.createElement(_Author.default, {
76
81
  packageMeta: packageMeta
77
82
  }), /*#__PURE__*/_react.default.createElement(_Developers.default, {
@@ -83,14 +88,4 @@ const DetailSidebar = () => {
83
88
  }));
84
89
  };
85
90
  var _default = exports.default = DetailSidebar;
86
- const StyledPaper = /*#__PURE__*/(0, _base.default)(_Paper.default, process.env.NODE_ENV === "production" ? {
87
- target: "e1jyvx6i0"
88
- } : {
89
- target: "e1jyvx6i0",
90
- label: "StyledPaper"
91
- })(({
92
- theme
93
- }) => ({
94
- padding: theme === null || theme === void 0 ? void 0 : theme.spacing(3, 2)
95
- }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zZWN0aW9ucy9TaWRlQmFyL1NpZGViYXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtFb0IiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL3NlY3Rpb25zL1NpZGVCYXIvU2lkZWJhci50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgUGFwZXIgZnJvbSAnQG11aS9tYXRlcmlhbC9QYXBlcic7XG5pbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuXG5pbXBvcnQgeyBUaGVtZSB9IGZyb20gJy4uLy4uL1RoZW1lJztcbmltcG9ydCBBY3Rpb25CYXIgZnJvbSAnLi4vLi4vY29tcG9uZW50cy9BY3Rpb25CYXInO1xuaW1wb3J0IEF1dGhvciBmcm9tICcuLi8uLi9jb21wb25lbnRzL0F1dGhvcic7XG5pbXBvcnQgRGV2ZWxvcGVycywgeyBEZXZlbG9wZXJUeXBlIH0gZnJvbSAnLi4vLi4vY29tcG9uZW50cy9EZXZlbG9wZXJzJztcbmltcG9ydCBEaXN0IGZyb20gJy4uLy4uL2NvbXBvbmVudHMvRGlzdHJpYnV0aW9uJztcbmltcG9ydCBFbmdpbmVzIGZyb20gJy4uLy4uL2NvbXBvbmVudHMvRW5naW5lcyc7XG5pbXBvcnQgRnVuZEJ1dHRvbiBmcm9tICcuLi8uLi9jb21wb25lbnRzL0Z1bmRCdXR0b24nO1xuaW1wb3J0IEluc3RhbGwgZnJvbSAnLi4vLi4vY29tcG9uZW50cy9JbnN0YWxsJztcbmltcG9ydCBSZXBvc2l0b3J5IGZyb20gJy4uLy4uL2NvbXBvbmVudHMvUmVwb3NpdG9yeSc7XG5pbXBvcnQgU2lkZUJhclRpdGxlIGZyb20gJy4uLy4uL2NvbXBvbmVudHMvU2lkZUJhclRpdGxlJztcbmltcG9ydCB7IHVzZUNvbmZpZyB9IGZyb20gJy4uLy4uL3Byb3ZpZGVycyc7XG5pbXBvcnQgeyB1c2VWZXJzaW9uIH0gZnJvbSAnLi4vLi4vcHJvdmlkZXJzJztcbmltcG9ydCB7IFBhY2thZ2VNZXRhSW50ZXJmYWNlIH0gZnJvbSAnLi4vLi4vdHlwZXMvcGFja2FnZU1ldGEnO1xuXG5jb25zdCBnZXRNb2R1bGVUeXBlID0gKG1hbmlmZXN0OiBQYWNrYWdlTWV0YUludGVyZmFjZSkgPT4ge1xuICBpZiAobWFuaWZlc3QubGF0ZXN0Lm1haW4pIHtcbiAgICByZXR1cm4gJ2NvbW1vbmpzJztcbiAgfSBlbHNlIGlmIChtYW5pZmVzdC5sYXRlc3QudHlwZSkge1xuICAgIHJldHVybiBtYW5pZmVzdC5sYXRlc3QudHlwZTtcbiAgfVxuICByZXR1cm47XG59O1xuXG5jb25zdCBEZXRhaWxTaWRlYmFyOiBSZWFjdC5GQyA9ICgpID0+IHtcbiAgY29uc3QgeyBwYWNrYWdlTWV0YSwgcGFja2FnZU5hbWUsIHBhY2thZ2VWZXJzaW9uIH0gPSB1c2VWZXJzaW9uKCk7XG4gIGNvbnN0IHsgY29uZmlnT3B0aW9ucyB9ID0gdXNlQ29uZmlnKCk7XG4gIGNvbnN0IHZlcnNpb24gPSBwYWNrYWdlVmVyc2lvbiB8fCBwYWNrYWdlTWV0YT8ubGF0ZXN0LnZlcnNpb24gfHwgJyc7XG4gIGNvbnN0IHRpbWUgPSBwYWNrYWdlTWV0YT8udGltZSA/IHBhY2thZ2VNZXRhLnRpbWVbdmVyc2lvbl0gOiAnJztcbiAgaWYgKCFwYWNrYWdlTWV0YSB8fCAhcGFja2FnZU5hbWUpIHtcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuXG4gIHJldHVybiAoXG4gICAgPFN0eWxlZFBhcGVyIHN4PXt7IHBvc2l0aW9uOiAnc3RpY2t5JywgdG9wOiAwIH19PlxuICAgICAgPFNpZGVCYXJUaXRsZVxuICAgICAgICBkZXNjcmlwdGlvbj17cGFja2FnZU1ldGEubGF0ZXN0Py5kZXNjcmlwdGlvbn1cbiAgICAgICAgaGFzVHlwZXM9e3R5cGVvZiBwYWNrYWdlTWV0YS5sYXRlc3Q/LnR5cGVzID09PSAnc3RyaW5nJ31cbiAgICAgICAgaXNMYXRlc3Q9e3R5cGVvZiBwYWNrYWdlVmVyc2lvbiA9PT0gJ3VuZGVmaW5lZCd9XG4gICAgICAgIG1vZHVsZVR5cGU9e2dldE1vZHVsZVR5cGUocGFja2FnZU1ldGEpfVxuICAgICAgICBwYWNrYWdlTmFtZT17cGFja2FnZU5hbWV9XG4gICAgICAgIHRpbWU9e3RpbWV9XG4gICAgICAgIHZlcnNpb249e3ZlcnNpb259XG4gICAgICAvPlxuICAgICAgPEFjdGlvbkJhclxuICAgICAgICBwYWNrYWdlTWV0YT17cGFja2FnZU1ldGF9XG4gICAgICAgIHNob3dEb3dubG9hZFRhcmJhbGw9e2NvbmZpZ09wdGlvbnMuc2hvd0Rvd25sb2FkVGFyYmFsbH1cbiAgICAgICAgc2hvd1Jhdz17Y29uZmlnT3B0aW9ucy5zaG93UmF3fVxuICAgICAgLz5cbiAgICAgIDxJbnN0YWxsIGNvbmZpZ09wdGlvbnM9e2NvbmZpZ09wdGlvbnN9IHBhY2thZ2VNZXRhPXtwYWNrYWdlTWV0YX0gcGFja2FnZU5hbWU9e3BhY2thZ2VOYW1lfSAvPlxuICAgICAgPEZ1bmRCdXR0b24gcGFja2FnZU1ldGE9e3BhY2thZ2VNZXRhfSAvPlxuICAgICAgPFJlcG9zaXRvcnkgcGFja2FnZU1ldGE9e3BhY2thZ2VNZXRhfSAvPlxuICAgICAgPEVuZ2luZXMgcGFja2FnZU1ldGE9e3BhY2thZ2VNZXRhfSAvPlxuICAgICAgPERpc3QgcGFja2FnZU1ldGE9e3BhY2thZ2VNZXRhfSAvPlxuICAgICAgPEF1dGhvciBwYWNrYWdlTWV0YT17cGFja2FnZU1ldGF9IC8+XG4gICAgICA8RGV2ZWxvcGVycyBwYWNrYWdlTWV0YT17cGFja2FnZU1ldGF9IHR5cGU9e0RldmVsb3BlclR5cGUuTUFJTlRBSU5FUlN9IC8+XG4gICAgICA8RGV2ZWxvcGVycyBwYWNrYWdlTWV0YT17cGFja2FnZU1ldGF9IHR5cGU9e0RldmVsb3BlclR5cGUuQ09OVFJJQlVUT1JTfSAvPlxuICAgIDwvU3R5bGVkUGFwZXI+XG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBEZXRhaWxTaWRlYmFyO1xuXG5jb25zdCBTdHlsZWRQYXBlciA9IHN0eWxlZChQYXBlcik8eyB0aGVtZT86IFRoZW1lIH0+KCh7IHRoZW1lIH0pID0+ICh7XG4gIHBhZGRpbmc6IHRoZW1lPy5zcGFjaW5nKDMsIDIpLFxufSkpO1xuIl19 */");
96
91
  //# sourceMappingURL=Sidebar.js.map
@@ -0,0 +1 @@
1
+ export {};
@@ -1,9 +1,4 @@
1
1
  import { FC } from 'react';
2
- export declare function getAuthorName(authorName?: string): string;
3
- /**
4
- * @param param0
5
- * @returns
6
- */
7
2
  declare const Author: FC<{
8
3
  packageMeta: any;
9
4
  }>;
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- export declare const CardWrap: import("@emotion/styled").StyledComponent<any, {}, {}>;
3
2
  declare const Dependencies: React.FC<{
4
3
  packageMeta: any;
5
4
  }>;
@@ -0,0 +1,4 @@
1
+ export declare enum DeveloperType {
2
+ CONTRIBUTORS = "contributors",
3
+ MAINTAINERS = "maintainers"
4
+ }
@@ -1,8 +1,5 @@
1
1
  import React from 'react';
2
- export declare enum DeveloperType {
3
- CONTRIBUTORS = "contributors",
4
- MAINTAINERS = "maintainers"
5
- }
2
+ import { DeveloperType } from './DeveloperType';
6
3
  export declare const Fab: import("@emotion/styled").StyledComponent<any, {}, {}>;
7
4
  interface Props {
8
5
  type: DeveloperType;
@@ -1,8 +1,5 @@
1
1
  import React from 'react';
2
- export declare enum DeveloperType {
3
- CONTRIBUTORS = "contributors",
4
- MAINTAINERS = "maintainers"
5
- }
2
+ import { DeveloperType } from './';
6
3
  interface Props {
7
4
  type: DeveloperType;
8
5
  }
@@ -1 +1,2 @@
1
- export { default, DeveloperType } from './Developers';
1
+ export { default } from './Developers';
2
+ export { DeveloperType } from './DeveloperType';
@@ -1,4 +1,3 @@
1
1
  export declare const StyledText: import("@emotion/styled").StyledComponent<any, {}, {}>;
2
2
  export declare const DistListItem: import("@emotion/styled").StyledComponent<any, {}, {}>;
3
3
  export declare const DistChips: import("@emotion/styled").StyledComponent<any, {}, {}>;
4
- export declare const DownloadButton: import("@emotion/styled").StyledComponent<any, {}, {}>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -9,6 +9,6 @@ interface Interface {
9
9
  dependencyManager: DependencyManager;
10
10
  packageVersion?: string;
11
11
  }
12
- export declare function getGlobalInstall(isGlobal: any, packageVersion: any, packageName: any, isYarn?: boolean): any;
12
+ export declare function getGlobalInstall(isLatest: any, isGlobal: any, packageVersion: any, packageName: any, isYarn?: boolean): any;
13
13
  declare const InstallListItem: React.FC<Interface>;
14
14
  export default InstallListItem;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const KeywordListItems: React.FC<{
3
+ keywords: undefined | string | string[];
4
+ }>;
5
+ export default KeywordListItems;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { PackageMetaInterface } from '../../types/packageMeta';
3
+ declare const Keywords: React.FC<{
4
+ packageMeta: PackageMetaInterface;
5
+ }>;
6
+ export default Keywords;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const AllProperties: any;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { default } from './Keywords';
@@ -1,6 +1,3 @@
1
1
  import React from 'react';
2
- export declare const CustomRouterLink: import("@emotion/styled").StyledComponent<import("react-router-dom").LinkProps<unknown> & React.RefAttributes<HTMLAnchorElement> & {
3
- theme?: import("@emotion/react").Theme | undefined;
4
- }, {}, {}>;
5
2
  declare const Link: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
6
3
  export default Link;
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1 @@
1
- export { default as Link } from './Link';
1
+ export { default } from './Link';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const LinkExternal: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
3
+ export default LinkExternal;
@@ -0,0 +1 @@
1
+ export { default } from './LinkExternal';
@@ -9,6 +9,7 @@ interface Props {
9
9
  onClick?: () => void;
10
10
  className?: string;
11
11
  isDefault?: boolean;
12
+ title?: string;
12
13
  }
13
14
  declare const Logo: React.FC<Props>;
14
15
  export default Logo;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const Icons: any;
@@ -13,7 +13,7 @@ export interface PackageInterface {
13
13
  time?: number | string;
14
14
  author: PackageAuthor;
15
15
  description?: string;
16
- keywords?: string[];
16
+ keywords?: PackageMetaInterface['latest']['keywords'];
17
17
  license?: PackageMetaInterface['latest']['license'];
18
18
  homepage?: string;
19
19
  bugs?: Bugs;
@@ -8,8 +8,6 @@ export declare const OverviewItem: import("@emotion/styled").StyledComponent<{
8
8
  export declare const Published: import("@emotion/styled").StyledComponent<{
9
9
  theme?: import("@emotion/react").Theme | undefined;
10
10
  as?: import("react").ElementType<any> | undefined;
11
- } & {
12
- theme?: import("@mui/material").Theme | undefined;
13
11
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
14
12
  export declare const Details: import("@emotion/styled").StyledComponent<{
15
13
  theme?: import("@emotion/react").Theme | undefined;
@@ -32,12 +30,6 @@ export declare const PackageTitle: import("@emotion/styled").StyledComponent<{
32
30
  export declare const GridRightAligned: import("@emotion/styled").StyledComponent<any, {}, {}>;
33
31
  export declare const Wrapper: import("@emotion/styled").StyledComponent<any, {}, {}>;
34
32
  export declare const IconButton: import("@emotion/styled").StyledComponent<any, {}, {}>;
35
- export declare const TagContainer: import("@emotion/styled").StyledComponent<{
36
- theme?: import("@emotion/react").Theme | undefined;
37
- as?: import("react").ElementType<any> | undefined;
38
- } & {
39
- theme?: import("@mui/material").Theme | undefined;
40
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
41
33
  export declare const PackageListItemText: import("@emotion/styled").StyledComponent<import("@mui/material/ListItemText").ListItemTextProps<import("react").ElementType<any>, import("react").ElementType<any>> & {
42
34
  theme?: import("@emotion/react").Theme | undefined;
43
35
  }, {}, {}>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { Developer } from '../../types/packageMeta';
3
+ declare const Person: React.FC<{
4
+ person: Developer;
5
+ packageName: string;
6
+ version: string;
7
+ withText?: boolean;
8
+ }>;
9
+ export default Person;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { Developer } from '../../types/packageMeta';
3
+ declare const PersonTooltip: React.FC<{
4
+ person: Developer;
5
+ }>;
6
+ export default PersonTooltip;
@@ -0,0 +1 @@
1
+ export { default } from './Person';
@@ -0,0 +1,3 @@
1
+ import { Developer } from '../../types/packageMeta';
2
+ export declare function getLink(person: Developer, packageName: string, version: string): string;
3
+ export declare function getName(name?: string): string;
@@ -1,4 +1,3 @@
1
- import 'highlight.js/styles/default.css';
2
1
  import React from 'react';
3
2
  import './github-markdown.css';
4
3
  import { Props } from './types';
@@ -1,13 +1,5 @@
1
1
  /// <reference types="react" />
2
- export interface InputFieldProps {
3
- color: string;
4
- }
5
2
  export declare const Wrapper: import("@emotion/styled").StyledComponent<{
6
3
  theme?: import("@emotion/react").Theme | undefined;
7
4
  as?: import("react").ElementType<any> | undefined;
8
5
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
- export declare const StyledTextField: import("@emotion/styled").StyledComponent<(((Omit<import("@mui/material").OutlinedTextFieldProps, "ref"> | Omit<import("@mui/material").FilledTextFieldProps, "ref"> | Omit<import("@mui/material").StandardTextFieldProps, "ref">) & import("react").RefAttributes<HTMLDivElement>) & {
10
- theme?: import("@emotion/react").Theme | undefined;
11
- }) & {
12
- theme?: import("@mui/material").Theme | undefined;
13
- }, {}, {}>;
@@ -0,0 +1 @@
1
+ export declare function cleanDescription(description: string): string;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  interface Props {
3
3
  packageName: string;
4
4
  }
5
- declare const InstallListItem: React.FC<Props>;
6
- export default InstallListItem;
5
+ declare const SettingsMenu: React.FC<Props>;
6
+ export default SettingsMenu;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const UpLinkLink: React.FC<{
3
+ packageName: string;
4
+ uplinkName: string;
5
+ }>;
6
+ export default UpLinkLink;
@@ -3,5 +3,6 @@ export type Props = {
3
3
  packageMeta: any;
4
4
  packageName: string;
5
5
  };
6
+ export declare const StyledText: import("@emotion/styled").StyledComponent<any, {}, {}>;
6
7
  declare const Versions: React.FC<Props>;
7
8
  export default Versions;
@@ -1,6 +1,5 @@
1
1
  export { default as CopyClipboard, copyToClipBoardUtility } from './components/CopyClipboard';
2
2
  export * from './components/CopyClipboard';
3
- export { Link } from './components/Link';
4
3
  export { default as ActionBar } from './components/ActionBar';
5
4
  export { default as Author } from './components/Author';
6
5
  export { default as Dependencies } from './components/Dependencies';
@@ -12,7 +11,11 @@ export { default as FundButton } from './components/FundButton';
12
11
  export { default as Heading } from './components/Heading';
13
12
  export * as Icons from './components/Icons';
14
13
  export { default as Install } from './components/Install';
14
+ export { default as Keywords } from './components/Keywords';
15
+ export { default as Link } from './components/Link';
16
+ export { default as LinkExternal } from './components/LinkExternal';
15
17
  export { default as RawViewer } from './components/RawViewer';
18
+ export { default as Person } from './components/Person';
16
19
  export { default as Readme } from './components/Readme';
17
20
  export { default as SideBarTitle } from './components/SideBarTitle';
18
21
  export { default as UpLinks } from './components/UpLinks';
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  interface Props {
3
3
  onChange: (event: React.ChangeEvent<{}>, newValue: number) => void;
4
4
  tabPosition: number;
5
+ showUplinks?: boolean;
5
6
  }
6
7
  declare const DetailContainerTabs: React.FC<Props>;
7
8
  export default DetailContainerTabs;
@@ -4,8 +4,6 @@ export declare const Greetings: import("@emotion/styled").StyledComponent<{
4
4
  theme?: import("@emotion/react").Theme | undefined;
5
5
  as?: import("react").ElementType<any> | undefined;
6
6
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
7
- export declare const RightSide: import("@emotion/styled").StyledComponent<any, {}, {}>;
8
- export declare const LeftSide: import("@emotion/styled").StyledComponent<any, {}, {}>;
9
7
  export declare const MobileNavBar: import("@emotion/styled").StyledComponent<{
10
8
  theme?: import("@emotion/react").Theme | undefined;
11
9
  as?: import("react").ElementType<any> | undefined;
@@ -27,8 +25,3 @@ export declare const SearchWrapper: import("@emotion/styled").StyledComponent<{
27
25
  as?: import("react").ElementType<any> | undefined;
28
26
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
29
27
  export declare const NavBar: import("@emotion/styled").StyledComponent<any, {}, {}>;
30
- export declare const StyledLink: import("@emotion/styled").StyledComponent<Omit<any, "ref"> & import("react").RefAttributes<HTMLAnchorElement> & {
31
- theme?: import("@emotion/react").Theme | undefined;
32
- } & {
33
- theme?: import("@mui/material").Theme | undefined;
34
- }, {}, {}>;
@@ -0,0 +1,8 @@
1
+ export declare enum APIRoute {
2
+ LOGIN = "/-/verdaccio/sec/login",
3
+ CONFIG = "/-/verdaccio/packages",
4
+ PACKAGES = "/-/verdaccio/data/packages",
5
+ SEARCH = "/-/verdaccio/data/search/",
6
+ SIDEBAR = "/-/verdaccio/data/sidebar/",
7
+ README = "/-/verdaccio/data/package/readme/"
8
+ }
@@ -0,0 +1 @@
1
+ export declare function stripTrailingSlash(url: string): string;
@@ -1,6 +1,6 @@
1
1
  export type ModuleType = 'commonjs' | 'module';
2
2
  export type Latest = {
3
- author?: Author;
3
+ author?: string | Author;
4
4
  deprecated?: string;
5
5
  name: string;
6
6
  dist?: {
@@ -14,7 +14,7 @@ export type Latest = {
14
14
  pnpm?: string;
15
15
  yarn?: string;
16
16
  };
17
- license?: undefined | LicenseInterface | string;
17
+ license?: string | LicenseInterface;
18
18
  version: string;
19
19
  homepage?: string;
20
20
  bugs?: {
@@ -31,6 +31,7 @@ export type Latest = {
31
31
  funding?: Funding;
32
32
  maintainers?: Developer[];
33
33
  contributors?: Developer[];
34
+ keywords?: string | string[];
34
35
  };
35
36
  export interface PackageMetaInterface {
36
37
  versions?: Versions;
@@ -43,8 +44,9 @@ export interface PackageMetaInterface {
43
44
  }
44
45
  export interface Developer {
45
46
  name: string;
46
- email: string;
47
- avatar: string;
47
+ email?: string;
48
+ url?: string;
49
+ avatar?: string;
48
50
  }
49
51
  interface Funding {
50
52
  type?: string;
@@ -68,7 +70,7 @@ export interface Version {
68
70
  version: string;
69
71
  author?: string | Author;
70
72
  description?: string;
71
- license?: string;
73
+ license?: string | LicenseInterface;
72
74
  main?: string;
73
75
  keywords?: string[];
74
76
  deprecated?: string;
@@ -1,5 +1,6 @@
1
1
  export declare enum Route {
2
2
  ROOT = "/",
3
+ DETAIL = "/-/web/detail/",
3
4
  SCOPE_PACKAGE = "/-/web/detail/@:scope/:package",
4
5
  SCOPE_PACKAGE_VERSION = "/-/web/detail/@:scope/:package/v/:version",
5
6
  PACKAGE = "/-/web/detail/:package",
@@ -29,4 +29,5 @@ export declare function getLastUpdatedPackageTime(uplinks?: UpLinks): string;
29
29
  */
30
30
  export declare function getRecentReleases(time?: Time): Time[];
31
31
  export declare function getAuthorName(authorName?: string): string;
32
+ export declare function getUplink(upLinkName: string, packageName: string): string | null;
32
33
  export declare function fileSizeSI(a: number, b?: typeof Math, c?: (p: number) => number, d?: number, e?: number): string;
@@ -9,6 +9,7 @@ var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
9
9
  var _isNil = _interopRequireDefault(require("lodash/isNil"));
10
10
  var _Theme = require("../../Theme");
11
11
  var _api = _interopRequireDefault(require("../api"));
12
+ var _routes = require("./routes");
12
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
14
  const defaultValues = {
14
15
  primaryColor: _Theme.colors.PRIMARY_COLOR,
@@ -40,7 +41,7 @@ const configuration = exports.configuration = (0, _core.createModel)()({
40
41
  },
41
42
  effects: dispatch => ({
42
43
  async getPackages() {
43
- const payload = await _api.default.request(`/-/verdaccio/packages`, 'GET');
44
+ const payload = await _api.default.request(_routes.APIRoute.CONFIG, 'GET');
44
45
  dispatch.packages.savePackages(payload);
45
46
  }
46
47
  })
@@ -11,6 +11,8 @@ var _i18next = _interopRequireDefault(require("i18next"));
11
11
  var _utils = require("../../utils");
12
12
  var _api = _interopRequireDefault(require("../api"));
13
13
  var _storage = _interopRequireDefault(require("../storage"));
14
+ var _routes = require("./routes");
15
+ var _utils2 = require("./utils");
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
17
  const HEADERS = exports.HEADERS = {
16
18
  JSON: 'application/json'
@@ -76,9 +78,9 @@ const login = exports.login = (0, _core.createModel)()({
76
78
  username,
77
79
  password
78
80
  }, state) {
79
- const basePath = state.configuration.config.base;
81
+ const basePath = (0, _utils2.stripTrailingSlash)(state.configuration.config.base);
80
82
  try {
81
- const payload = await _api.default.request(`${basePath}-/verdaccio/sec/login`, 'POST', {
83
+ const payload = await _api.default.request(`${basePath}${_routes.APIRoute.LOGIN}`, 'POST', {
82
84
  body: JSON.stringify({
83
85
  username,
84
86
  password
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.manifest = void 0;
7
7
  var _core = require("@rematch/core");
8
8
  var _api = _interopRequireDefault(require("../api"));
9
+ var _routes = require("./routes");
10
+ var _utils = require("./utils");
9
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
12
  function isPackageVersionValid(packageMeta, packageVersion) {
11
13
  if (!packageVersion || typeof packageVersion === 'undefined') {
@@ -87,16 +89,16 @@ const manifest = exports.manifest = (0, _core.createModel)()({
87
89
  packageName,
88
90
  packageVersion
89
91
  }, state) {
90
- const basePath = state.configuration.config.base;
92
+ const basePath = (0, _utils.stripTrailingSlash)(state.configuration.config.base);
91
93
  try {
92
- const manifest = await _api.default.request(`${basePath}-/verdaccio/data/sidebar/${packageName}${packageVersion ? `?v=${packageVersion}` : ''}`);
94
+ const manifest = await _api.default.request(`${basePath}${_routes.APIRoute.SIDEBAR}${packageName}${packageVersion ? `?v=${packageVersion}` : ''}`);
93
95
 
94
96
  // FIXME: update types accordingly
95
97
  // @ts-ignore
96
98
  if (!isPackageVersionValid(manifest, packageVersion)) {
97
99
  throw new Error('not found');
98
100
  }
99
- const readme = await _api.default.request(`${basePath}-/verdaccio/data/package/readme/${packageName}${packageVersion ? `?v=${packageVersion}` : ''}`, 'GET');
101
+ const readme = await _api.default.request(`${basePath}${_routes.APIRoute.README}${packageName}${packageVersion ? `?v=${packageVersion}` : ''}`);
100
102
  dispatch.manifest.saveManifest({
101
103
  packageName,
102
104
  packageVersion,
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.packages = void 0;
7
7
  var _core = require("@rematch/core");
8
8
  var _api = _interopRequireDefault(require("../api"));
9
+ var _routes = require("./routes");
10
+ var _utils = require("./utils");
9
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
12
  /**
11
13
  *
@@ -25,9 +27,9 @@ const packages = exports.packages = (0, _core.createModel)()({
25
27
  },
26
28
  effects: dispatch => ({
27
29
  async getPackages(_payload, state) {
28
- const basePath = state.configuration.config.base;
30
+ const basePath = (0, _utils.stripTrailingSlash)(state.configuration.config.base);
29
31
  try {
30
- const payload = await _api.default.request(`${basePath}-/verdaccio/data/packages`, 'GET');
32
+ const payload = await _api.default.request(`${basePath}${_routes.APIRoute.PACKAGES}`);
31
33
  dispatch.packages.savePackages(payload);
32
34
  } catch (error) {
33
35
  // eslint-disable-next-line no-console
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.APIRoute = void 0;
7
+ // Example API request:
8
+ // http://localhost:8000/-/verdaccio/data/package/readme/jquery
9
+ let APIRoute = exports.APIRoute = /*#__PURE__*/function (APIRoute) {
10
+ APIRoute["LOGIN"] = "/-/verdaccio/sec/login";
11
+ APIRoute["CONFIG"] = "/-/verdaccio/packages";
12
+ APIRoute["PACKAGES"] = "/-/verdaccio/data/packages";
13
+ APIRoute["SEARCH"] = "/-/verdaccio/data/search/";
14
+ APIRoute["SIDEBAR"] = "/-/verdaccio/data/sidebar/";
15
+ APIRoute["README"] = "/-/verdaccio/data/package/readme/";
16
+ return APIRoute;
17
+ }({}); // :packageName?v=version
18
+ //# sourceMappingURL=routes.js.map
@@ -7,6 +7,8 @@ exports.search = void 0;
7
7
  var _core = require("@rematch/core");
8
8
  var _orderBy = _interopRequireDefault(require("lodash/orderBy"));
9
9
  var _api = _interopRequireDefault(require("../api"));
10
+ var _routes = require("./routes");
11
+ var _utils = require("./utils");
10
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
13
  const CONSTANTS = {
12
14
  API_DELAY: 300,
@@ -57,7 +59,7 @@ const search = exports.search = (0, _core.createModel)()({
57
59
  async getSuggestions({
58
60
  value
59
61
  }, state) {
60
- const basePath = state.configuration.config.base;
62
+ const basePath = (0, _utils.stripTrailingSlash)(state.configuration.config.base);
61
63
  try {
62
64
  const controller = new window.AbortController();
63
65
  dispatch.search.addControllerToQueue({
@@ -66,7 +68,7 @@ const search = exports.search = (0, _core.createModel)()({
66
68
  const signal = controller.signal;
67
69
  // https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility
68
70
  // FUTURE: signal is not well supported for IE and Samsung Browser
69
- const suggestions = await _api.default.request(`${basePath}-/verdaccio/data/search/${encodeURIComponent(value)}`, 'GET', {
71
+ const suggestions = await _api.default.request(`${basePath}${_routes.APIRoute.SEARCH}${encodeURIComponent(value)}`, 'GET', {
70
72
  signal,
71
73
  headers: {}
72
74
  });
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.stripTrailingSlash = stripTrailingSlash;
7
+ function stripTrailingSlash(url) {
8
+ return url.replace(/\/$/, '');
9
+ }
10
+ //# sourceMappingURL=utils.js.map