@strapi/plugin-documentation 5.0.0-beta.0 → 5.0.0-beta.10

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 (332) hide show
  1. package/README.md +0 -1
  2. package/dist/_chunks/{index-D1KkfApT.js → App-Cmiagsr-.js} +93 -53
  3. package/dist/_chunks/App-Cmiagsr-.js.map +1 -0
  4. package/dist/_chunks/{index-7xstUX8_.mjs → App-pk6g9tYL.mjs} +69 -46
  5. package/dist/_chunks/App-pk6g9tYL.mjs.map +1 -0
  6. package/dist/_chunks/Settings-CqLmbMfv.mjs +223 -0
  7. package/dist/_chunks/Settings-CqLmbMfv.mjs.map +1 -0
  8. package/dist/_chunks/Settings-MmkmHoxg.js +243 -0
  9. package/dist/_chunks/Settings-MmkmHoxg.js.map +1 -0
  10. package/dist/_chunks/{ar-4yWQcJB-.js → ar-CkqTE6jh.js} +1 -1
  11. package/dist/_chunks/ar-CkqTE6jh.js.map +1 -0
  12. package/dist/_chunks/{ar-dlnabvQE.mjs → ar-ckp9T43y.mjs} +1 -1
  13. package/dist/_chunks/ar-ckp9T43y.mjs.map +1 -0
  14. package/dist/_chunks/{cs-knLCHelx.js → cs-BbyKo6Hc.js} +1 -1
  15. package/dist/_chunks/cs-BbyKo6Hc.js.map +1 -0
  16. package/dist/_chunks/{cs-x2Pr-Y38.mjs → cs-ciLYCxgd.mjs} +1 -1
  17. package/dist/_chunks/cs-ciLYCxgd.mjs.map +1 -0
  18. package/dist/_chunks/{de-D0HJjv1r.js → de-CHwC0A85.js} +1 -1
  19. package/dist/_chunks/de-CHwC0A85.js.map +1 -0
  20. package/dist/_chunks/{de-10J3uf4y.mjs → de-DqkAUMvP.mjs} +1 -1
  21. package/dist/_chunks/de-DqkAUMvP.mjs.map +1 -0
  22. package/dist/_chunks/{dk-_8JEfZdj.mjs → dk-DgCq8mF-.mjs} +1 -1
  23. package/dist/_chunks/dk-DgCq8mF-.mjs.map +1 -0
  24. package/dist/_chunks/{dk-OGCIxZ4f.js → dk-qlI2J6S0.js} +1 -1
  25. package/dist/_chunks/dk-qlI2J6S0.js.map +1 -0
  26. package/dist/_chunks/{en-YgFnjikD.js → en-Cfq2Inmo.js} +1 -1
  27. package/dist/_chunks/en-Cfq2Inmo.js.map +1 -0
  28. package/dist/_chunks/{en-V4ac9UMW.mjs → en-DfCC9sZn.mjs} +1 -1
  29. package/dist/_chunks/en-DfCC9sZn.mjs.map +1 -0
  30. package/dist/_chunks/{es-f_rfLY5r.mjs → es-CEiXVnsb.mjs} +1 -1
  31. package/dist/_chunks/es-CEiXVnsb.mjs.map +1 -0
  32. package/dist/_chunks/{es-5fRDaTSK.js → es-DH1GVZe7.js} +1 -1
  33. package/dist/_chunks/es-DH1GVZe7.js.map +1 -0
  34. package/dist/_chunks/{fr-qviymkcR.js → fr-B1x-Nj5w.js} +1 -1
  35. package/dist/_chunks/fr-B1x-Nj5w.js.map +1 -0
  36. package/dist/_chunks/{fr-L2xRpd2l.mjs → fr-BlX-v4UF.mjs} +1 -1
  37. package/dist/_chunks/fr-BlX-v4UF.mjs.map +1 -0
  38. package/dist/_chunks/getTrad-AjYeGjZg.mjs +51 -0
  39. package/dist/_chunks/getTrad-AjYeGjZg.mjs.map +1 -0
  40. package/dist/_chunks/getTrad-CPA7x4Cg.js +50 -0
  41. package/dist/_chunks/getTrad-CPA7x4Cg.js.map +1 -0
  42. package/dist/_chunks/{id-l-r-lPDE.mjs → id-CPOl6_EU.mjs} +1 -1
  43. package/dist/_chunks/id-CPOl6_EU.mjs.map +1 -0
  44. package/dist/_chunks/{id-caKGgafZ.js → id-D3yFE72d.js} +1 -1
  45. package/dist/_chunks/id-D3yFE72d.js.map +1 -0
  46. package/{server/public/index.html → dist/_chunks/index-BTFWrNiz.mjs} +9 -4
  47. package/dist/_chunks/index-BTFWrNiz.mjs.map +1 -0
  48. package/dist/_chunks/index-Bjeq6z8p.js +100 -0
  49. package/dist/_chunks/index-Bjeq6z8p.js.map +1 -0
  50. package/dist/_chunks/index-CEoG11hQ.mjs +101 -0
  51. package/dist/_chunks/index-CEoG11hQ.mjs.map +1 -0
  52. package/dist/_chunks/index-CYcTK1eg.js +75 -0
  53. package/dist/_chunks/index-CYcTK1eg.js.map +1 -0
  54. package/dist/_chunks/{it-nCSZoaet.mjs → it-DWJI563z.mjs} +1 -1
  55. package/dist/_chunks/it-DWJI563z.mjs.map +1 -0
  56. package/dist/_chunks/{it-e3T319Va.js → it-WuNBIqG8.js} +1 -1
  57. package/dist/_chunks/it-WuNBIqG8.js.map +1 -0
  58. package/dist/_chunks/{ko-pUwRxmfG.mjs → ko-CFzSHayG.mjs} +1 -1
  59. package/dist/_chunks/ko-CFzSHayG.mjs.map +1 -0
  60. package/dist/_chunks/{ko-nWCOH-TF.js → ko-De5iYa_O.js} +1 -1
  61. package/dist/_chunks/ko-De5iYa_O.js.map +1 -0
  62. package/dist/_chunks/login-EQSKn2h7.js +150 -0
  63. package/dist/_chunks/login-EQSKn2h7.js.map +1 -0
  64. package/{server/public/login.html → dist/_chunks/login-KS59cQ6U.mjs} +6 -1
  65. package/dist/_chunks/login-KS59cQ6U.mjs.map +1 -0
  66. package/dist/_chunks/{ms-8e8SEhhY.mjs → ms-CUgPFo4U.mjs} +1 -1
  67. package/dist/_chunks/ms-CUgPFo4U.mjs.map +1 -0
  68. package/dist/_chunks/{ms-CSGAOmvV.js → ms-DQfa3FDx.js} +1 -1
  69. package/dist/_chunks/ms-DQfa3FDx.js.map +1 -0
  70. package/dist/_chunks/{nl-82NK6g7v.js → nl-BZHlqphk.js} +1 -1
  71. package/dist/_chunks/nl-BZHlqphk.js.map +1 -0
  72. package/dist/_chunks/{nl-RjdbZWuM.mjs → nl-B_7CHwVD.mjs} +1 -1
  73. package/dist/_chunks/nl-B_7CHwVD.mjs.map +1 -0
  74. package/dist/_chunks/{pl-UMuW3iDh.js → pl-DDl5i_mP.js} +1 -1
  75. package/dist/_chunks/pl-DDl5i_mP.js.map +1 -0
  76. package/dist/_chunks/{pl-sh4sAKA8.mjs → pl-DwLr8sw9.mjs} +1 -1
  77. package/dist/_chunks/pl-DwLr8sw9.mjs.map +1 -0
  78. package/dist/_chunks/{pt-2sEtQifY.js → pt-4GQ8ermL.js} +1 -1
  79. package/dist/_chunks/pt-4GQ8ermL.js.map +1 -0
  80. package/dist/_chunks/{pt-BR-G0-nWgFV.js → pt-BR-D24CJ0qp.js} +1 -1
  81. package/dist/_chunks/pt-BR-D24CJ0qp.js.map +1 -0
  82. package/dist/_chunks/{pt-BR-uX3O_t0X.mjs → pt-BR-MVXc6V9P.mjs} +1 -1
  83. package/dist/_chunks/pt-BR-MVXc6V9P.mjs.map +1 -0
  84. package/dist/_chunks/{pt-GqKRRnNe.mjs → pt-C2N9fdeh.mjs} +1 -1
  85. package/dist/_chunks/pt-C2N9fdeh.mjs.map +1 -0
  86. package/dist/_chunks/{ru-dQr7xFOb.mjs → ru-BddeNlU0.mjs} +1 -1
  87. package/dist/_chunks/ru-BddeNlU0.mjs.map +1 -0
  88. package/dist/_chunks/{ru-wJyWus4I.js → ru-QwZYcU6K.js} +1 -1
  89. package/dist/_chunks/ru-QwZYcU6K.js.map +1 -0
  90. package/dist/_chunks/{sk-nreoyD6V.mjs → sk-BmT4uZTG.mjs} +1 -1
  91. package/dist/_chunks/sk-BmT4uZTG.mjs.map +1 -0
  92. package/dist/_chunks/{sk-mcEz1PMW.js → sk-DgAXilB1.js} +1 -1
  93. package/dist/_chunks/sk-DgAXilB1.js.map +1 -0
  94. package/dist/_chunks/{sv-V86KaP9y.js → sv-CCLcAo3U.js} +1 -1
  95. package/dist/_chunks/sv-CCLcAo3U.js.map +1 -0
  96. package/dist/_chunks/{sv-kIUD_46v.mjs → sv-D_-KBtcw.mjs} +1 -1
  97. package/dist/_chunks/sv-D_-KBtcw.mjs.map +1 -0
  98. package/dist/_chunks/{th-pZN4HdUY.js → th-BhgV1BbW.js} +1 -1
  99. package/dist/_chunks/th-BhgV1BbW.js.map +1 -0
  100. package/dist/_chunks/{th-IcmZ0Yif.mjs → th-DkuoSGii.mjs} +1 -1
  101. package/dist/_chunks/th-DkuoSGii.mjs.map +1 -0
  102. package/dist/_chunks/{tr-fCijT6nA.js → tr-BysnAErC.js} +1 -1
  103. package/dist/_chunks/tr-BysnAErC.js.map +1 -0
  104. package/dist/_chunks/{tr-CkXew0gQ.mjs → tr-l-xxK4Yk.mjs} +1 -1
  105. package/dist/_chunks/tr-l-xxK4Yk.mjs.map +1 -0
  106. package/dist/_chunks/{uk-TEHpQuls.js → uk-CNlbntFx.js} +1 -1
  107. package/dist/_chunks/uk-CNlbntFx.js.map +1 -0
  108. package/dist/_chunks/{uk-E8Js7gDb.mjs → uk-Cpmsxyku.mjs} +1 -1
  109. package/dist/_chunks/uk-Cpmsxyku.mjs.map +1 -0
  110. package/dist/_chunks/{vi-k1R3Y3mS.mjs → vi-ClWGrFm9.mjs} +1 -1
  111. package/dist/_chunks/vi-ClWGrFm9.mjs.map +1 -0
  112. package/dist/_chunks/{vi-Nxtm0xZz.js → vi-_ib0GmNl.js} +1 -1
  113. package/dist/_chunks/vi-_ib0GmNl.js.map +1 -0
  114. package/dist/_chunks/{zh-Vd3mfBR-.mjs → zh-Glkg1L2g.mjs} +1 -1
  115. package/dist/_chunks/zh-Glkg1L2g.mjs.map +1 -0
  116. package/dist/_chunks/{zh-Hans-tFSnVett.js → zh-Hans-L_5U2KqC.js} +1 -1
  117. package/dist/_chunks/zh-Hans-L_5U2KqC.js.map +1 -0
  118. package/dist/_chunks/{zh-Hans-FdUTcggu.mjs → zh-Hans-XLMwjASk.mjs} +1 -1
  119. package/dist/_chunks/zh-Hans-XLMwjASk.mjs.map +1 -0
  120. package/dist/_chunks/{zh-bgauBZz8.js → zh-aEZZdkOu.js} +1 -1
  121. package/dist/_chunks/zh-aEZZdkOu.js.map +1 -0
  122. package/dist/admin/index.js +1 -1
  123. package/dist/admin/index.mjs +1 -1
  124. package/dist/admin/src/components/SettingsForm.d.ts +8 -0
  125. package/dist/admin/src/constants.d.ts +18 -0
  126. package/dist/admin/src/index.d.ts +14 -0
  127. package/dist/admin/src/pages/App.d.ts +2 -0
  128. package/dist/admin/src/pages/Settings.d.ts +2 -0
  129. package/dist/admin/src/pluginId.d.ts +1 -0
  130. package/dist/admin/src/services/api.d.ts +13 -0
  131. package/dist/admin/src/types.d.ts +16 -0
  132. package/dist/admin/src/utils/baseQuery.d.ts +5 -0
  133. package/dist/admin/src/utils/getTrad.d.ts +1 -0
  134. package/dist/admin/src/utils/index.d.ts +2 -0
  135. package/dist/admin/src/utils/prefixPluginTranslations.d.ts +2 -0
  136. package/dist/server/index.js +1263 -0
  137. package/dist/server/index.js.map +1 -0
  138. package/dist/server/index.mjs +1238 -0
  139. package/dist/server/index.mjs.map +1 -0
  140. package/dist/server/src/bootstrap.d.ts +5 -0
  141. package/dist/server/src/bootstrap.d.ts.map +1 -0
  142. package/dist/server/src/config/default-plugin-config.d.ts +3 -0
  143. package/dist/server/src/config/default-plugin-config.d.ts.map +1 -0
  144. package/dist/server/src/config/index.d.ts +4 -0
  145. package/dist/server/src/config/index.d.ts.map +1 -0
  146. package/dist/server/src/controllers/documentation.d.ts +12 -0
  147. package/dist/server/src/controllers/documentation.d.ts.map +1 -0
  148. package/dist/server/src/controllers/index.d.ts +14 -0
  149. package/dist/server/src/controllers/index.d.ts.map +1 -0
  150. package/dist/server/src/index.d.ts +91 -0
  151. package/dist/server/src/index.d.ts.map +1 -0
  152. package/dist/server/src/middlewares/documentation.d.ts +5 -0
  153. package/dist/server/src/middlewares/documentation.d.ts.map +1 -0
  154. package/dist/server/src/middlewares/restrict-access.d.ts +4 -0
  155. package/dist/server/src/middlewares/restrict-access.d.ts.map +1 -0
  156. package/dist/server/src/register.d.ts +5 -0
  157. package/dist/server/src/register.d.ts.map +1 -0
  158. package/dist/server/src/routes/index.d.ts +36 -0
  159. package/dist/server/src/routes/index.d.ts.map +1 -0
  160. package/dist/server/src/services/__mocks__/mock-content-types.d.ts +449 -0
  161. package/dist/server/src/services/__mocks__/mock-content-types.d.ts.map +1 -0
  162. package/dist/server/src/services/__mocks__/mock-strapi-data.d.ts +592 -0
  163. package/dist/server/src/services/__mocks__/mock-strapi-data.d.ts.map +1 -0
  164. package/dist/server/src/services/documentation.d.ts +36 -0
  165. package/dist/server/src/services/documentation.d.ts.map +1 -0
  166. package/dist/server/src/services/helpers/build-api-endpoint-path.d.ts +7 -0
  167. package/dist/server/src/services/helpers/build-api-endpoint-path.d.ts.map +1 -0
  168. package/dist/server/src/services/helpers/build-component-schema.d.ts +4 -0
  169. package/dist/server/src/services/helpers/build-component-schema.d.ts.map +1 -0
  170. package/dist/server/src/services/helpers/index.d.ts +4 -0
  171. package/dist/server/src/services/helpers/index.d.ts.map +1 -0
  172. package/dist/server/src/services/helpers/utils/clean-schema-attributes.d.ts +15 -0
  173. package/dist/server/src/services/helpers/utils/clean-schema-attributes.d.ts.map +1 -0
  174. package/dist/server/src/services/helpers/utils/get-api-responses.d.ts +15 -0
  175. package/dist/server/src/services/helpers/utils/get-api-responses.d.ts.map +1 -0
  176. package/dist/server/src/services/helpers/utils/get-schema-data.d.ts +12 -0
  177. package/dist/server/src/services/helpers/utils/get-schema-data.d.ts.map +1 -0
  178. package/dist/server/src/services/helpers/utils/loop-content-type-names.d.ts +7 -0
  179. package/dist/server/src/services/helpers/utils/loop-content-type-names.d.ts.map +1 -0
  180. package/dist/server/src/services/helpers/utils/pascal-case.d.ts +3 -0
  181. package/dist/server/src/services/helpers/utils/pascal-case.d.ts.map +1 -0
  182. package/dist/server/src/services/helpers/utils/query-params.d.ts +4 -0
  183. package/dist/server/src/services/helpers/utils/query-params.d.ts.map +1 -0
  184. package/dist/server/src/services/helpers/utils/routes.d.ts +3 -0
  185. package/dist/server/src/services/helpers/utils/routes.d.ts.map +1 -0
  186. package/dist/server/src/services/index.d.ts +43 -0
  187. package/dist/server/src/services/index.d.ts.map +1 -0
  188. package/dist/server/src/services/override.d.ts +21 -0
  189. package/dist/server/src/services/override.d.ts.map +1 -0
  190. package/dist/server/src/services/utils/get-plugins-that-need-documentation.d.ts +4 -0
  191. package/dist/server/src/services/utils/get-plugins-that-need-documentation.d.ts.map +1 -0
  192. package/dist/server/src/types.d.ts +28 -0
  193. package/dist/server/src/types.d.ts.map +1 -0
  194. package/dist/server/src/utils.d.ts +12 -0
  195. package/dist/server/src/utils.d.ts.map +1 -0
  196. package/package.json +45 -25
  197. package/strapi-server.js +1 -1
  198. package/.eslintignore +0 -1
  199. package/.eslintrc +0 -17
  200. package/admin/src/constants.js +0 -17
  201. package/admin/src/hooks/useDocumentation.js +0 -81
  202. package/admin/src/index.js +0 -62
  203. package/admin/src/pages/PluginPage/index.jsx +0 -212
  204. package/admin/src/pages/PluginPage/tests/index.test.jsx +0 -160
  205. package/admin/src/pages/SettingsPage/index.jsx +0 -202
  206. package/admin/src/pages/SettingsPage/tests/index.test.jsx +0 -72
  207. package/admin/src/pluginId.js +0 -5
  208. package/admin/src/translations/ar.json +0 -20
  209. package/admin/src/translations/cs.json +0 -21
  210. package/admin/src/translations/de.json +0 -26
  211. package/admin/src/translations/dk.json +0 -39
  212. package/admin/src/translations/en.json +0 -39
  213. package/admin/src/translations/es.json +0 -39
  214. package/admin/src/translations/fr.json +0 -26
  215. package/admin/src/translations/id.json +0 -24
  216. package/admin/src/translations/it.json +0 -26
  217. package/admin/src/translations/ko.json +0 -39
  218. package/admin/src/translations/ms.json +0 -23
  219. package/admin/src/translations/nl.json +0 -21
  220. package/admin/src/translations/pl.json +0 -39
  221. package/admin/src/translations/pt-BR.json +0 -21
  222. package/admin/src/translations/pt.json +0 -21
  223. package/admin/src/translations/ru.json +0 -39
  224. package/admin/src/translations/sk.json +0 -24
  225. package/admin/src/translations/sv.json +0 -39
  226. package/admin/src/translations/th.json +0 -24
  227. package/admin/src/translations/tr.json +0 -39
  228. package/admin/src/translations/uk.json +0 -23
  229. package/admin/src/translations/vi.json +0 -24
  230. package/admin/src/translations/zh-Hans.json +0 -28
  231. package/admin/src/translations/zh.json +0 -39
  232. package/admin/src/utils/getTrad.js +0 -5
  233. package/admin/src/utils/index.js +0 -2
  234. package/admin/src/utils/prefixPluginTranslations.js +0 -13
  235. package/dist/_chunks/ar-4yWQcJB-.js.map +0 -1
  236. package/dist/_chunks/ar-dlnabvQE.mjs.map +0 -1
  237. package/dist/_chunks/cs-knLCHelx.js.map +0 -1
  238. package/dist/_chunks/cs-x2Pr-Y38.mjs.map +0 -1
  239. package/dist/_chunks/de-10J3uf4y.mjs.map +0 -1
  240. package/dist/_chunks/de-D0HJjv1r.js.map +0 -1
  241. package/dist/_chunks/dk-OGCIxZ4f.js.map +0 -1
  242. package/dist/_chunks/dk-_8JEfZdj.mjs.map +0 -1
  243. package/dist/_chunks/en-V4ac9UMW.mjs.map +0 -1
  244. package/dist/_chunks/en-YgFnjikD.js.map +0 -1
  245. package/dist/_chunks/es-5fRDaTSK.js.map +0 -1
  246. package/dist/_chunks/es-f_rfLY5r.mjs.map +0 -1
  247. package/dist/_chunks/fr-L2xRpd2l.mjs.map +0 -1
  248. package/dist/_chunks/fr-qviymkcR.js.map +0 -1
  249. package/dist/_chunks/id-caKGgafZ.js.map +0 -1
  250. package/dist/_chunks/id-l-r-lPDE.mjs.map +0 -1
  251. package/dist/_chunks/index-7xstUX8_.mjs.map +0 -1
  252. package/dist/_chunks/index-D1KkfApT.js.map +0 -1
  253. package/dist/_chunks/index-NbPCucJl.js +0 -195
  254. package/dist/_chunks/index-NbPCucJl.js.map +0 -1
  255. package/dist/_chunks/index-NvJ4m2q5.mjs +0 -201
  256. package/dist/_chunks/index-NvJ4m2q5.mjs.map +0 -1
  257. package/dist/_chunks/index-VpLAJXMs.mjs +0 -174
  258. package/dist/_chunks/index-VpLAJXMs.mjs.map +0 -1
  259. package/dist/_chunks/index-r7HsQTou.js +0 -200
  260. package/dist/_chunks/index-r7HsQTou.js.map +0 -1
  261. package/dist/_chunks/it-e3T319Va.js.map +0 -1
  262. package/dist/_chunks/it-nCSZoaet.mjs.map +0 -1
  263. package/dist/_chunks/ko-nWCOH-TF.js.map +0 -1
  264. package/dist/_chunks/ko-pUwRxmfG.mjs.map +0 -1
  265. package/dist/_chunks/ms-8e8SEhhY.mjs.map +0 -1
  266. package/dist/_chunks/ms-CSGAOmvV.js.map +0 -1
  267. package/dist/_chunks/nl-82NK6g7v.js.map +0 -1
  268. package/dist/_chunks/nl-RjdbZWuM.mjs.map +0 -1
  269. package/dist/_chunks/pl-UMuW3iDh.js.map +0 -1
  270. package/dist/_chunks/pl-sh4sAKA8.mjs.map +0 -1
  271. package/dist/_chunks/pt-2sEtQifY.js.map +0 -1
  272. package/dist/_chunks/pt-BR-G0-nWgFV.js.map +0 -1
  273. package/dist/_chunks/pt-BR-uX3O_t0X.mjs.map +0 -1
  274. package/dist/_chunks/pt-GqKRRnNe.mjs.map +0 -1
  275. package/dist/_chunks/ru-dQr7xFOb.mjs.map +0 -1
  276. package/dist/_chunks/ru-wJyWus4I.js.map +0 -1
  277. package/dist/_chunks/sk-mcEz1PMW.js.map +0 -1
  278. package/dist/_chunks/sk-nreoyD6V.mjs.map +0 -1
  279. package/dist/_chunks/sv-V86KaP9y.js.map +0 -1
  280. package/dist/_chunks/sv-kIUD_46v.mjs.map +0 -1
  281. package/dist/_chunks/th-IcmZ0Yif.mjs.map +0 -1
  282. package/dist/_chunks/th-pZN4HdUY.js.map +0 -1
  283. package/dist/_chunks/tr-CkXew0gQ.mjs.map +0 -1
  284. package/dist/_chunks/tr-fCijT6nA.js.map +0 -1
  285. package/dist/_chunks/uk-E8Js7gDb.mjs.map +0 -1
  286. package/dist/_chunks/uk-TEHpQuls.js.map +0 -1
  287. package/dist/_chunks/useDocumentation-6Ks-_Ms6.mjs +0 -68
  288. package/dist/_chunks/useDocumentation-6Ks-_Ms6.mjs.map +0 -1
  289. package/dist/_chunks/useDocumentation-S0e4mU-U.js +0 -67
  290. package/dist/_chunks/useDocumentation-S0e4mU-U.js.map +0 -1
  291. package/dist/_chunks/vi-Nxtm0xZz.js.map +0 -1
  292. package/dist/_chunks/vi-k1R3Y3mS.mjs.map +0 -1
  293. package/dist/_chunks/zh-Hans-FdUTcggu.mjs.map +0 -1
  294. package/dist/_chunks/zh-Hans-tFSnVett.js.map +0 -1
  295. package/dist/_chunks/zh-Vd3mfBR-.mjs.map +0 -1
  296. package/dist/_chunks/zh-bgauBZz8.js.map +0 -1
  297. package/jest.config.front.js +0 -7
  298. package/jest.config.js +0 -6
  299. package/packup.config.ts +0 -22
  300. package/server/bootstrap.js +0 -54
  301. package/server/config/default-plugin-config.js +0 -35
  302. package/server/config/index.js +0 -7
  303. package/server/controllers/documentation.js +0 -241
  304. package/server/controllers/index.js +0 -7
  305. package/server/index.js +0 -17
  306. package/server/middlewares/documentation.js +0 -25
  307. package/server/middlewares/index.js +0 -7
  308. package/server/middlewares/restrict-access.js +0 -24
  309. package/server/register.js +0 -11
  310. package/server/routes/index.js +0 -84
  311. package/server/services/__mocks__/mock-content-types.js +0 -264
  312. package/server/services/__mocks__/mock-strapi-data.js +0 -183
  313. package/server/services/__tests__/build-component-schema.test.js +0 -761
  314. package/server/services/__tests__/documentation.test.js +0 -481
  315. package/server/services/__tests__/override.test.js +0 -85
  316. package/server/services/documentation.js +0 -246
  317. package/server/services/helpers/build-api-endpoint-path.js +0 -186
  318. package/server/services/helpers/build-component-schema.js +0 -254
  319. package/server/services/helpers/index.js +0 -9
  320. package/server/services/helpers/utils/clean-schema-attributes.js +0 -246
  321. package/server/services/helpers/utils/get-api-responses.js +0 -105
  322. package/server/services/helpers/utils/get-schema-data.js +0 -32
  323. package/server/services/helpers/utils/loop-content-type-names.js +0 -55
  324. package/server/services/helpers/utils/pascal-case.js +0 -9
  325. package/server/services/helpers/utils/query-params.js +0 -105
  326. package/server/services/helpers/utils/routes.js +0 -10
  327. package/server/services/index.js +0 -9
  328. package/server/services/override.js +0 -52
  329. package/server/services/utils/default-openapi-components.js +0 -40
  330. package/server/services/utils/get-plugins-that-need-documentation.js +0 -24
  331. package/tests/server.js +0 -37
  332. package/tests/setup.js +0 -15
@@ -1,25 +0,0 @@
1
- 'use strict';
2
-
3
- const path = require('path');
4
- const koaStatic = require('koa-static');
5
- const swaggerUi = require('swagger-ui-dist');
6
-
7
- module.exports = async ({ strapi }) => {
8
- strapi.server.routes([
9
- {
10
- method: 'GET',
11
- path: '/plugins/documentation/(.*)',
12
- async handler(ctx, next) {
13
- ctx.url = path.basename(ctx.url);
14
-
15
- return koaStatic(swaggerUi.getAbsoluteFSPath(), {
16
- maxage: 86400000,
17
- defer: true,
18
- })(ctx, next);
19
- },
20
- config: {
21
- auth: false,
22
- },
23
- },
24
- ]);
25
- };
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- const documentation = require('./documentation');
4
-
5
- module.exports = {
6
- documentation,
7
- };
@@ -1,24 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = async (ctx, next) => {
4
- const pluginStore = strapi.store({ type: 'plugin', name: 'documentation' });
5
-
6
- const config = await pluginStore.get({ key: 'config' });
7
-
8
- if (!config.restrictedAccess) {
9
- return next();
10
- }
11
-
12
- if (!ctx.session.documentation || !ctx.session.documentation.logged) {
13
- const querystring = ctx.querystring ? `?${ctx.querystring}` : '';
14
-
15
- return ctx.redirect(
16
- `${strapi.config.server.url}${
17
- strapi.config.get('plugin::documentation.x-strapi-config').path
18
- }/login${querystring}`
19
- );
20
- }
21
-
22
- // Execute the action.
23
- return next();
24
- };
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- const registerDocumentationMiddleWare = require('./middlewares/documentation');
4
-
5
- /**
6
- * Register upload plugin
7
- * @param {{ strapi: import('@strapi/strapi').Strapi }}
8
- */
9
- module.exports = async ({ strapi }) => {
10
- await registerDocumentationMiddleWare({ strapi });
11
- };
@@ -1,84 +0,0 @@
1
- 'use strict';
2
-
3
- const restrictAccess = require('../middlewares/restrict-access');
4
-
5
- module.exports = [
6
- {
7
- method: 'GET',
8
- path: '/',
9
- handler: 'documentation.index',
10
- config: {
11
- auth: false,
12
- middlewares: [restrictAccess],
13
- },
14
- },
15
- {
16
- method: 'GET',
17
- path: '/v:major(\\d+).:minor(\\d+).:patch(\\d+)',
18
- handler: 'documentation.index',
19
- config: {
20
- auth: false,
21
- middlewares: [restrictAccess],
22
- },
23
- },
24
- {
25
- method: 'GET',
26
- path: '/login',
27
- handler: 'documentation.loginView',
28
- config: {
29
- auth: false,
30
- },
31
- },
32
- {
33
- method: 'POST',
34
- path: '/login',
35
- handler: 'documentation.login',
36
- config: {
37
- auth: false,
38
- },
39
- },
40
- {
41
- method: 'GET',
42
- path: '/getInfos',
43
- handler: 'documentation.getInfos',
44
- config: {
45
- policies: [
46
- { name: 'admin::hasPermissions', config: { actions: ['plugin::documentation.read'] } },
47
- ],
48
- },
49
- },
50
- {
51
- method: 'POST',
52
- path: '/regenerateDoc',
53
- handler: 'documentation.regenerateDoc',
54
- config: {
55
- policies: [
56
- {
57
- name: 'admin::hasPermissions',
58
- config: { actions: ['plugin::documentation.settings.regenerate'] },
59
- },
60
- ],
61
- },
62
- },
63
- {
64
- method: 'PUT',
65
- path: '/updateSettings',
66
- handler: 'documentation.updateSettings',
67
- config: {
68
- policies: [
69
- {
70
- name: 'admin::hasPermissions',
71
- config: { actions: ['plugin::documentation.settings.update'] },
72
- },
73
- ],
74
- },
75
- },
76
- {
77
- method: 'DELETE',
78
- path: '/deleteDoc/:version',
79
- handler: 'documentation.deleteDoc',
80
- config: {
81
- policies: [],
82
- },
83
- },
84
- ];
@@ -1,264 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- 'plugin::upload.file': {
5
- collectionName: 'files',
6
- info: { singularName: 'file', pluralName: 'files', displayName: 'File', description: '' },
7
- options: {},
8
- pluginOptions: {
9
- 'content-manager': { visible: false },
10
- 'content-type-builder': { visible: false },
11
- },
12
- attributes: {
13
- name: { type: 'string', configurable: false, required: true },
14
- alternativeText: { type: 'string', configurable: false },
15
- caption: { type: 'string', configurable: false },
16
- width: { type: 'integer', configurable: false },
17
- height: { type: 'integer', configurable: false },
18
- formats: { type: 'json', configurable: false },
19
- hash: { type: 'string', configurable: false, required: true },
20
- ext: { type: 'string', configurable: false },
21
- mime: { type: 'string', configurable: false, required: true },
22
- size: { type: 'decimal', configurable: false, required: true },
23
- url: { type: 'string', configurable: false, required: true },
24
- previewUrl: { type: 'string', configurable: false },
25
- provider: { type: 'string', configurable: false, required: true },
26
- provider_metadata: { type: 'json', configurable: false },
27
- related: { type: 'relation', relation: 'morphToMany', configurable: false },
28
- folder: {
29
- type: 'relation',
30
- relation: 'manyToOne',
31
- target: 'plugin::upload.folder',
32
- inversedBy: 'files',
33
- private: true,
34
- },
35
- folderPath: { type: 'string', min: 1, required: true, private: true },
36
- createdAt: { type: 'datetime' },
37
- updatedAt: { type: 'datetime' },
38
- createdBy: {
39
- type: 'relation',
40
- relation: 'oneToOne',
41
- target: 'admin::user',
42
- configurable: false,
43
- writable: false,
44
- visible: false,
45
- useJoinTable: false,
46
- private: true,
47
- },
48
- updatedBy: {
49
- type: 'relation',
50
- relation: 'oneToOne',
51
- target: 'admin::user',
52
- configurable: false,
53
- writable: false,
54
- visible: false,
55
- useJoinTable: false,
56
- private: true,
57
- },
58
- },
59
- indexes: [
60
- { name: 'upload_files_folder_path_index', columns: ['folder_path'], type: null },
61
- { name: 'upload_files_created_at_index', columns: ['created_at'], type: null },
62
- { name: 'upload_files_updated_at_index', columns: ['updated_at'], type: null },
63
- { name: 'upload_files_name_index', columns: ['name'], type: null },
64
- { name: 'upload_files_size_index', columns: ['size'], type: null },
65
- { name: 'upload_files_ext_index', columns: ['ext'], type: null },
66
- ],
67
- kind: 'collectionType',
68
- modelType: 'contentType',
69
- modelName: 'file',
70
- uid: 'plugin::upload.file',
71
- plugin: 'upload',
72
- globalId: 'UploadFile',
73
- },
74
- 'plugin::upload.folder': {
75
- collectionName: 'upload_folders',
76
- info: { singularName: 'folder', pluralName: 'folders', displayName: 'Folder' },
77
- options: {},
78
- pluginOptions: {
79
- 'content-manager': { visible: false },
80
- 'content-type-builder': { visible: false },
81
- },
82
- attributes: {
83
- name: { type: 'string', min: 1, required: true },
84
- pathId: { type: 'integer', unique: true, required: true },
85
- parent: {
86
- type: 'relation',
87
- relation: 'manyToOne',
88
- target: 'plugin::upload.folder',
89
- inversedBy: 'children',
90
- },
91
- children: {
92
- type: 'relation',
93
- relation: 'oneToMany',
94
- target: 'plugin::upload.folder',
95
- mappedBy: 'parent',
96
- },
97
- files: {
98
- type: 'relation',
99
- relation: 'oneToMany',
100
- target: 'plugin::upload.file',
101
- mappedBy: 'folder',
102
- },
103
- path: { type: 'string', min: 1, required: true },
104
- createdAt: { type: 'datetime' },
105
- updatedAt: { type: 'datetime' },
106
- createdBy: {
107
- type: 'relation',
108
- relation: 'oneToOne',
109
- target: 'admin::user',
110
- configurable: false,
111
- writable: false,
112
- visible: false,
113
- useJoinTable: false,
114
- private: true,
115
- },
116
- updatedBy: {
117
- type: 'relation',
118
- relation: 'oneToOne',
119
- target: 'admin::user',
120
- configurable: false,
121
- writable: false,
122
- visible: false,
123
- useJoinTable: false,
124
- private: true,
125
- },
126
- },
127
- indexes: [
128
- { name: 'upload_folders_path_id_index', columns: ['path_id'], type: 'unique' },
129
- { name: 'upload_folders_path_index', columns: ['path'], type: 'unique' },
130
- ],
131
- kind: 'collectionType',
132
- modelType: 'contentType',
133
- modelName: 'folder',
134
- uid: 'plugin::upload.folder',
135
- plugin: 'upload',
136
- globalId: 'UploadFolder',
137
- },
138
- 'api::kitchensink.kitchensink': {
139
- kind: 'collectionType',
140
- collectionName: 'kitchensinks',
141
- info: {
142
- displayName: 'Kitchen Sink',
143
- singularName: 'kitchensink',
144
- pluralName: 'kitchensinks',
145
- description: '',
146
- name: 'Kitchen Sink',
147
- },
148
- pluginOptions: {},
149
- attributes: {
150
- short_text: { type: 'string' },
151
- long_text: { type: 'text' },
152
- rich_text: { type: 'richtext' },
153
- integer: { type: 'integer' },
154
- biginteger: { type: 'biginteger' },
155
- decimal: { type: 'decimal' },
156
- float: { type: 'float' },
157
- date: { type: 'date' },
158
- datetime: { type: 'datetime' },
159
- time: { type: 'time' },
160
- timestamp: { type: 'timestamp' },
161
- boolean: { type: 'boolean' },
162
- email: { type: 'email' },
163
- password: { type: 'password' },
164
- enumeration: { type: 'enumeration', enum: ['A', 'B', 'C', 'D', 'E'] },
165
- single_media: {
166
- type: 'media',
167
- multiple: false,
168
- required: false,
169
- allowedTypes: ['images', 'files', 'videos'],
170
- },
171
- multiple_media: {
172
- type: 'media',
173
- multiple: true,
174
- required: false,
175
- allowedTypes: ['images', 'files', 'videos'],
176
- },
177
- json: { type: 'json' },
178
- single_compo: { type: 'component', repeatable: false, component: 'basic.simple' },
179
- repeatable_compo: { type: 'component', repeatable: true, component: 'basic.simple' },
180
- dynamiczone: { type: 'dynamiczone', components: ['basic.simple', 'blog.test-como'] },
181
- one_way_tag: { type: 'relation', relation: 'oneToOne', target: 'api::tag.tag' },
182
- one_to_one_tag: {
183
- type: 'relation',
184
- relation: 'oneToOne',
185
- target: 'api::tag.tag',
186
- private: true,
187
- inversedBy: 'one_to_one_kitchensink',
188
- },
189
- one_to_many_tags: {
190
- type: 'relation',
191
- relation: 'oneToMany',
192
- target: 'api::tag.tag',
193
- mappedBy: 'many_to_one_kitchensink',
194
- },
195
- many_to_one_tag: {
196
- type: 'relation',
197
- relation: 'manyToOne',
198
- target: 'api::tag.tag',
199
- inversedBy: 'one_to_many_kitchensinks',
200
- },
201
- many_to_many_tags: {
202
- type: 'relation',
203
- relation: 'manyToMany',
204
- target: 'api::tag.tag',
205
- inversedBy: 'many_to_many_kitchensinks',
206
- },
207
- many_way_tags: { type: 'relation', relation: 'oneToMany', target: 'api::tag.tag' },
208
- morph_to_one: { type: 'relation', relation: 'morphToOne' },
209
- morph_to_many: { type: 'relation', relation: 'morphToMany' },
210
- custom_field: { type: 'string', customField: 'plugin::color-picker.color' },
211
- custom_field_with_default_options: {
212
- type: 'string',
213
- regex: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$',
214
- customField: 'plugin::color-picker.color',
215
- },
216
- cats: { type: 'dynamiczone', components: ['basic.relation', 'basic.simple'] },
217
- createdAt: { type: 'datetime' },
218
- updatedAt: { type: 'datetime' },
219
- publishedAt: { type: 'datetime', configurable: false, writable: true, visible: false },
220
- createdBy: {
221
- type: 'relation',
222
- relation: 'oneToOne',
223
- target: 'admin::user',
224
- configurable: false,
225
- writable: false,
226
- visible: false,
227
- useJoinTable: false,
228
- private: true,
229
- },
230
- updatedBy: {
231
- type: 'relation',
232
- relation: 'oneToOne',
233
- target: 'admin::user',
234
- configurable: false,
235
- writable: false,
236
- visible: false,
237
- useJoinTable: false,
238
- private: true,
239
- },
240
- },
241
- modelType: 'contentType',
242
- modelName: 'kitchensink',
243
- uid: 'api::kitchensink.kitchensink',
244
- apiName: 'kitchensink',
245
- globalId: 'Kitchensink',
246
- actions: {},
247
- lifecycles: {},
248
- },
249
- 'api::homepage.homepage': {
250
- kind: 'singleType',
251
- collectionName: 'homepages',
252
- info: { displayName: 'Homepage', singularName: 'homepage', pluralName: 'homepages' },
253
- pluginOptions: { i18n: { localized: true } },
254
- attributes: {
255
- title: { type: 'string', required: true, pluginOptions: { i18n: { localized: true } } },
256
- slug: {
257
- type: 'uid',
258
- targetField: 'title',
259
- required: true,
260
- pluginOptions: { i18n: { localized: true } },
261
- },
262
- },
263
- },
264
- };
@@ -1,183 +0,0 @@
1
- 'use strict';
2
-
3
- const contentTypes = require('./mock-content-types');
4
-
5
- module.exports = {
6
- contentTypes,
7
- components: {
8
- 'basic.simple': {
9
- collectionName: 'components_basic_simples',
10
- info: { displayName: 'simple', icon: 'ambulance', description: '' },
11
- options: {},
12
- attributes: { name: { type: 'string', required: true }, test: { type: 'string' } },
13
- uid: 'basic.simple',
14
- category: 'basic',
15
- modelType: 'component',
16
- modelName: 'simple',
17
- globalId: 'ComponentBasicSimple',
18
- },
19
- 'blog.test-como': {
20
- collectionName: 'components_blog_test_comos',
21
- info: { displayName: 'test comp', icon: 'air-freshener', description: '' },
22
- options: {},
23
- attributes: { name: { type: 'string', default: 'toto' } },
24
- uid: 'blog.test-como',
25
- category: 'blog',
26
- modelType: 'component',
27
- modelName: 'test-como',
28
- globalId: 'ComponentBlogTestComo',
29
- },
30
- 'basic.relation': {
31
- collectionName: 'components_basic_relations',
32
- info: { displayName: 'Relation' },
33
- options: {},
34
- attributes: {
35
- categories: { type: 'relation', relation: 'oneToMany', target: 'api::category.category' },
36
- },
37
- uid: 'basic.relation',
38
- category: 'basic',
39
- modelType: 'component',
40
- modelName: 'relation',
41
- globalId: 'ComponentBasicRelation',
42
- },
43
- },
44
- plugins: {
45
- upload: {
46
- contentTypes: {
47
- file: contentTypes['plugin::upload.file'],
48
- folder: contentTypes['plugin::upload.folder'],
49
- },
50
- routes: {
51
- 'content-api': {
52
- type: 'content-api',
53
- routes: [
54
- {
55
- method: 'POST',
56
- path: '/',
57
- handler: 'content-api.upload',
58
- config: { auth: { scope: ['plugin::upload.content-api.upload'] } },
59
- info: { pluginName: 'upload', type: 'content-api' },
60
- },
61
- {
62
- method: 'GET',
63
- path: '/files',
64
- handler: 'content-api.find',
65
- config: { auth: { scope: ['plugin::upload.content-api.find'] } },
66
- info: { pluginName: 'upload', type: 'content-api' },
67
- },
68
- {
69
- method: 'GET',
70
- path: '/files/:id',
71
- handler: 'content-api.findOne',
72
- config: { auth: { scope: ['plugin::upload.content-api.findOne'] } },
73
- info: { pluginName: 'upload', type: 'content-api' },
74
- },
75
- {
76
- method: 'DELETE',
77
- path: '/files/:id',
78
- handler: 'content-api.destroy',
79
- config: { auth: { scope: ['plugin::upload.content-api.destroy'] } },
80
- info: { pluginName: 'upload', type: 'content-api' },
81
- },
82
- ],
83
- prefix: '/upload',
84
- },
85
- },
86
- },
87
- email: {
88
- contentTypes: {},
89
- },
90
- 'users-permissions': {
91
- contentTypes: {},
92
- },
93
- },
94
- api: {
95
- homepage: {
96
- contentTypes: {
97
- homepage: contentTypes['api::homepage.homepage'],
98
- },
99
- routes: {
100
- homepage: {
101
- type: 'content-api',
102
- routes: [
103
- {
104
- method: 'GET',
105
- path: '/homepage',
106
- handler: 'api::homepage.homepage.find',
107
- config: { auth: { scope: ['api::homepage.homepage.find'] } },
108
- info: { apiName: 'homepage', type: 'content-api' },
109
- },
110
- {
111
- method: 'PUT',
112
- path: '/homepage',
113
- handler: 'api::homepage.homepage.update',
114
- config: { auth: { scope: ['api::homepage.homepage.update'] } },
115
- info: { apiName: 'homepage', type: 'content-api' },
116
- },
117
- {
118
- method: 'DELETE',
119
- path: '/homepage',
120
- handler: 'api::homepage.homepage.delete',
121
- config: { auth: { scope: ['api::homepage.homepage.delete'] } },
122
- info: { apiName: 'homepage', type: 'content-api' },
123
- },
124
- {
125
- method: 'POST',
126
- path: '/homepage',
127
- handler: 'api::homepage.homepage.create',
128
- config: { auth: { scope: ['api::homepage.homepage.create'] } },
129
- info: { apiName: 'homepage', type: 'content-api' },
130
- },
131
- ],
132
- },
133
- },
134
- },
135
- kitchensink: {
136
- contentTypes: {
137
- kitchensink: contentTypes['api::kitchensink.kitchensink'],
138
- },
139
- routes: {
140
- kitchensink: {
141
- routes: [
142
- {
143
- method: 'GET',
144
- path: '/kitchensinks',
145
- handler: 'api::kitchensink.kitchensink.find',
146
- config: { auth: { scope: ['api::kitchensink.kitchensink.find'] } },
147
- info: { apiName: 'kitchensink', type: 'content-api' },
148
- },
149
- {
150
- method: 'GET',
151
- path: '/kitchensinks/:id',
152
- handler: 'api::kitchensink.kitchensink.findOne',
153
- config: { auth: { scope: ['api::kitchensink.kitchensink.findOne'] } },
154
- info: { apiName: 'kitchensink', type: 'content-api' },
155
- },
156
- {
157
- method: 'POST',
158
- path: '/kitchensinks',
159
- handler: 'api::kitchensink.kitchensink.create',
160
- config: { auth: { scope: ['api::kitchensink.kitchensink.create'] } },
161
- info: { apiName: 'kitchensink', type: 'content-api' },
162
- },
163
- {
164
- method: 'PUT',
165
- path: '/kitchensinks/:id',
166
- handler: 'api::kitchensink.kitchensink.update',
167
- config: { auth: { scope: ['api::kitchensink.kitchensink.update'] } },
168
- info: { apiName: 'kitchensink', type: 'content-api' },
169
- },
170
- {
171
- method: 'DELETE',
172
- path: '/kitchensinks/:id',
173
- handler: 'api::kitchensink.kitchensink.delete',
174
- config: { auth: { scope: ['api::kitchensink.kitchensink.delete'] } },
175
- info: { apiName: 'kitchensink', type: 'content-api' },
176
- },
177
- ],
178
- type: 'content-api',
179
- },
180
- },
181
- },
182
- },
183
- };