@strapi/strapi 4.13.0-alpha.0 → 4.13.0-alpha.2

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 (808) hide show
  1. package/package.json +15 -15
  2. package/dist/Strapi.d.ts +0 -124
  3. package/dist/Strapi.js +0 -524
  4. package/dist/Strapi.js.map +0 -1
  5. package/dist/commands/actions/admin/create-user/action.d.ts +0 -11
  6. package/dist/commands/actions/admin/create-user/action.js +0 -97
  7. package/dist/commands/actions/admin/create-user/action.js.map +0 -1
  8. package/dist/commands/actions/admin/create-user/command.d.ts +0 -6
  9. package/dist/commands/actions/admin/create-user/command.js +0 -19
  10. package/dist/commands/actions/admin/create-user/command.js.map +0 -1
  11. package/dist/commands/actions/admin/reset-user-password/action.d.ts +0 -9
  12. package/dist/commands/actions/admin/reset-user-password/action.js +0 -43
  13. package/dist/commands/actions/admin/reset-user-password/action.js.map +0 -1
  14. package/dist/commands/actions/admin/reset-user-password/command.d.ts +0 -6
  15. package/dist/commands/actions/admin/reset-user-password/command.js +0 -17
  16. package/dist/commands/actions/admin/reset-user-password/command.js.map +0 -1
  17. package/dist/commands/actions/build-command/action.d.ts +0 -9
  18. package/dist/commands/actions/build-command/action.js +0 -20
  19. package/dist/commands/actions/build-command/action.js.map +0 -1
  20. package/dist/commands/actions/build-command/command.d.ts +0 -6
  21. package/dist/commands/actions/build-command/command.js +0 -15
  22. package/dist/commands/actions/build-command/command.js.map +0 -1
  23. package/dist/commands/actions/components/list/action.d.ts +0 -2
  24. package/dist/commands/actions/components/list/action.js +0 -20
  25. package/dist/commands/actions/components/list/action.js.map +0 -1
  26. package/dist/commands/actions/components/list/command.d.ts +0 -6
  27. package/dist/commands/actions/components/list/command.js +0 -14
  28. package/dist/commands/actions/components/list/command.js.map +0 -1
  29. package/dist/commands/actions/configuration/dump/action.d.ts +0 -10
  30. package/dist/commands/actions/configuration/dump/action.js +0 -46
  31. package/dist/commands/actions/configuration/dump/action.js.map +0 -1
  32. package/dist/commands/actions/configuration/dump/command.d.ts +0 -6
  33. package/dist/commands/actions/configuration/dump/command.js +0 -17
  34. package/dist/commands/actions/configuration/dump/command.js.map +0 -1
  35. package/dist/commands/actions/configuration/restore/action.d.ts +0 -10
  36. package/dist/commands/actions/configuration/restore/action.js +0 -153
  37. package/dist/commands/actions/configuration/restore/action.js.map +0 -1
  38. package/dist/commands/actions/configuration/restore/command.d.ts +0 -6
  39. package/dist/commands/actions/configuration/restore/command.js +0 -17
  40. package/dist/commands/actions/configuration/restore/command.js.map +0 -1
  41. package/dist/commands/actions/console/action.d.ts +0 -5
  42. package/dist/commands/actions/console/action.js +0 -26
  43. package/dist/commands/actions/console/action.js.map +0 -1
  44. package/dist/commands/actions/console/command.d.ts +0 -6
  45. package/dist/commands/actions/console/command.js +0 -14
  46. package/dist/commands/actions/console/command.js.map +0 -1
  47. package/dist/commands/actions/content-types/list/action.d.ts +0 -2
  48. package/dist/commands/actions/content-types/list/action.js +0 -20
  49. package/dist/commands/actions/content-types/list/action.js.map +0 -1
  50. package/dist/commands/actions/content-types/list/command.d.ts +0 -6
  51. package/dist/commands/actions/content-types/list/command.js +0 -14
  52. package/dist/commands/actions/content-types/list/command.js.map +0 -1
  53. package/dist/commands/actions/controllers/list/action.d.ts +0 -2
  54. package/dist/commands/actions/controllers/list/action.js +0 -20
  55. package/dist/commands/actions/controllers/list/action.js.map +0 -1
  56. package/dist/commands/actions/controllers/list/command.d.ts +0 -6
  57. package/dist/commands/actions/controllers/list/command.js +0 -14
  58. package/dist/commands/actions/controllers/list/command.js.map +0 -1
  59. package/dist/commands/actions/develop/action.d.ts +0 -13
  60. package/dist/commands/actions/develop/action.js +0 -195
  61. package/dist/commands/actions/develop/action.js.map +0 -1
  62. package/dist/commands/actions/develop/command.d.ts +0 -6
  63. package/dist/commands/actions/develop/command.js +0 -19
  64. package/dist/commands/actions/develop/command.js.map +0 -1
  65. package/dist/commands/actions/export/action.d.ts +0 -20
  66. package/dist/commands/actions/export/action.js +0 -153
  67. package/dist/commands/actions/export/action.js.map +0 -1
  68. package/dist/commands/actions/export/command.d.ts +0 -6
  69. package/dist/commands/actions/export/command.js +0 -27
  70. package/dist/commands/actions/export/command.js.map +0 -1
  71. package/dist/commands/actions/generate/command.d.ts +0 -6
  72. package/dist/commands/actions/generate/command.js +0 -19
  73. package/dist/commands/actions/generate/command.js.map +0 -1
  74. package/dist/commands/actions/hooks/list/action.d.ts +0 -2
  75. package/dist/commands/actions/hooks/list/action.js +0 -20
  76. package/dist/commands/actions/hooks/list/action.js.map +0 -1
  77. package/dist/commands/actions/hooks/list/command.d.ts +0 -6
  78. package/dist/commands/actions/hooks/list/command.js +0 -14
  79. package/dist/commands/actions/hooks/list/command.js.map +0 -1
  80. package/dist/commands/actions/import/action.d.ts +0 -19
  81. package/dist/commands/actions/import/action.js +0 -135
  82. package/dist/commands/actions/import/action.js.map +0 -1
  83. package/dist/commands/actions/import/command.d.ts +0 -6
  84. package/dist/commands/actions/import/command.js +0 -74
  85. package/dist/commands/actions/import/command.js.map +0 -1
  86. package/dist/commands/actions/install/action.d.ts +0 -2
  87. package/dist/commands/actions/install/action.js +0 -49
  88. package/dist/commands/actions/install/action.js.map +0 -1
  89. package/dist/commands/actions/install/command.d.ts +0 -6
  90. package/dist/commands/actions/install/command.js +0 -14
  91. package/dist/commands/actions/install/command.js.map +0 -1
  92. package/dist/commands/actions/middlewares/list/action.d.ts +0 -2
  93. package/dist/commands/actions/middlewares/list/action.js +0 -20
  94. package/dist/commands/actions/middlewares/list/action.js.map +0 -1
  95. package/dist/commands/actions/middlewares/list/command.d.ts +0 -6
  96. package/dist/commands/actions/middlewares/list/command.js +0 -14
  97. package/dist/commands/actions/middlewares/list/command.js.map +0 -1
  98. package/dist/commands/actions/new/action.d.ts +0 -7
  99. package/dist/commands/actions/new/action.js +0 -12
  100. package/dist/commands/actions/new/action.js.map +0 -1
  101. package/dist/commands/actions/new/command.d.ts +0 -6
  102. package/dist/commands/actions/new/command.js +0 -35
  103. package/dist/commands/actions/new/command.js.map +0 -1
  104. package/dist/commands/actions/policies/list/action.d.ts +0 -2
  105. package/dist/commands/actions/policies/list/action.js +0 -20
  106. package/dist/commands/actions/policies/list/action.js.map +0 -1
  107. package/dist/commands/actions/policies/list/command.d.ts +0 -6
  108. package/dist/commands/actions/policies/list/command.js +0 -14
  109. package/dist/commands/actions/policies/list/command.js.map +0 -1
  110. package/dist/commands/actions/report/action.d.ts +0 -7
  111. package/dist/commands/actions/report/action.js +0 -32
  112. package/dist/commands/actions/report/action.js.map +0 -1
  113. package/dist/commands/actions/report/command.d.ts +0 -6
  114. package/dist/commands/actions/report/command.js +0 -17
  115. package/dist/commands/actions/report/command.js.map +0 -1
  116. package/dist/commands/actions/routes/list/action.d.ts +0 -2
  117. package/dist/commands/actions/routes/list/action.js +0 -26
  118. package/dist/commands/actions/routes/list/action.js.map +0 -1
  119. package/dist/commands/actions/routes/list/command.d.ts +0 -6
  120. package/dist/commands/actions/routes/list/command.js +0 -14
  121. package/dist/commands/actions/routes/list/command.js.map +0 -1
  122. package/dist/commands/actions/services/list/action.d.ts +0 -2
  123. package/dist/commands/actions/services/list/action.js +0 -20
  124. package/dist/commands/actions/services/list/action.js.map +0 -1
  125. package/dist/commands/actions/services/list/command.d.ts +0 -6
  126. package/dist/commands/actions/services/list/command.js +0 -14
  127. package/dist/commands/actions/services/list/command.js.map +0 -1
  128. package/dist/commands/actions/start/action.d.ts +0 -5
  129. package/dist/commands/actions/start/action.js +0 -22
  130. package/dist/commands/actions/start/action.js.map +0 -1
  131. package/dist/commands/actions/start/command.d.ts +0 -6
  132. package/dist/commands/actions/start/command.js +0 -14
  133. package/dist/commands/actions/start/command.js.map +0 -1
  134. package/dist/commands/actions/telemetry/disable/action.d.ts +0 -1
  135. package/dist/commands/actions/telemetry/disable/action.js +0 -83
  136. package/dist/commands/actions/telemetry/disable/action.js.map +0 -1
  137. package/dist/commands/actions/telemetry/disable/command.d.ts +0 -6
  138. package/dist/commands/actions/telemetry/disable/command.js +0 -14
  139. package/dist/commands/actions/telemetry/disable/command.js.map +0 -1
  140. package/dist/commands/actions/telemetry/enable/command.d.ts +0 -6
  141. package/dist/commands/actions/telemetry/enable/command.js +0 -14
  142. package/dist/commands/actions/telemetry/enable/command.js.map +0 -1
  143. package/dist/commands/actions/templates/generate/action.d.ts +0 -1
  144. package/dist/commands/actions/templates/generate/action.js +0 -85
  145. package/dist/commands/actions/templates/generate/action.js.map +0 -1
  146. package/dist/commands/actions/templates/generate/command.d.ts +0 -6
  147. package/dist/commands/actions/templates/generate/command.js +0 -14
  148. package/dist/commands/actions/templates/generate/command.js.map +0 -1
  149. package/dist/commands/actions/transfer/action.d.ts +0 -18
  150. package/dist/commands/actions/transfer/action.js +0 -159
  151. package/dist/commands/actions/transfer/action.js.map +0 -1
  152. package/dist/commands/actions/transfer/command.d.ts +0 -6
  153. package/dist/commands/actions/transfer/command.js +0 -68
  154. package/dist/commands/actions/transfer/command.js.map +0 -1
  155. package/dist/commands/actions/ts/generate-types/action.d.ts +0 -8
  156. package/dist/commands/actions/ts/generate-types/action.js +0 -28
  157. package/dist/commands/actions/ts/generate-types/action.js.map +0 -1
  158. package/dist/commands/actions/ts/generate-types/command.d.ts +0 -6
  159. package/dist/commands/actions/ts/generate-types/command.js +0 -18
  160. package/dist/commands/actions/ts/generate-types/command.js.map +0 -1
  161. package/dist/commands/actions/uninstall/action.d.ts +0 -5
  162. package/dist/commands/actions/uninstall/action.js +0 -67
  163. package/dist/commands/actions/uninstall/action.js.map +0 -1
  164. package/dist/commands/actions/uninstall/command.d.ts +0 -6
  165. package/dist/commands/actions/uninstall/command.js +0 -15
  166. package/dist/commands/actions/uninstall/command.js.map +0 -1
  167. package/dist/commands/actions/version/command.d.ts +0 -6
  168. package/dist/commands/actions/version/command.js +0 -19
  169. package/dist/commands/actions/version/command.js.map +0 -1
  170. package/dist/commands/actions/watch-admin/action.d.ts +0 -4
  171. package/dist/commands/actions/watch-admin/action.js +0 -36
  172. package/dist/commands/actions/watch-admin/action.js.map +0 -1
  173. package/dist/commands/actions/watch-admin/command.d.ts +0 -6
  174. package/dist/commands/actions/watch-admin/command.js +0 -15
  175. package/dist/commands/actions/watch-admin/command.js.map +0 -1
  176. package/dist/commands/builders/admin.d.ts +0 -8
  177. package/dist/commands/builders/admin.js +0 -52
  178. package/dist/commands/builders/admin.js.map +0 -1
  179. package/dist/commands/builders/index.d.ts +0 -3
  180. package/dist/commands/builders/index.js +0 -11
  181. package/dist/commands/builders/index.js.map +0 -1
  182. package/dist/commands/builders/typescript.d.ts +0 -6
  183. package/dist/commands/builders/typescript.js +0 -29
  184. package/dist/commands/builders/typescript.js.map +0 -1
  185. package/dist/commands/index.d.ts +0 -36
  186. package/dist/commands/index.js +0 -95
  187. package/dist/commands/index.js.map +0 -1
  188. package/dist/commands/types.d.ts +0 -5
  189. package/dist/commands/types.js +0 -3
  190. package/dist/commands/types.js.map +0 -1
  191. package/dist/commands/utils/commander.d.ts +0 -35
  192. package/dist/commands/utils/commander.js +0 -139
  193. package/dist/commands/utils/commander.js.map +0 -1
  194. package/dist/commands/utils/data-transfer.d.ts +0 -61
  195. package/dist/commands/utils/data-transfer.js +0 -336
  196. package/dist/commands/utils/data-transfer.js.map +0 -1
  197. package/dist/commands/utils/helpers.d.ts +0 -32
  198. package/dist/commands/utils/helpers.js +0 -122
  199. package/dist/commands/utils/helpers.js.map +0 -1
  200. package/dist/compile.d.ts +0 -4
  201. package/dist/compile.js +0 -21
  202. package/dist/compile.js.map +0 -1
  203. package/dist/container.d.ts +0 -7
  204. package/dist/container.js +0 -39
  205. package/dist/container.js.map +0 -1
  206. package/dist/core/app-configuration/config-loader.d.ts +0 -2
  207. package/dist/core/app-configuration/config-loader.js +0 -22
  208. package/dist/core/app-configuration/config-loader.js.map +0 -1
  209. package/dist/core/app-configuration/index.d.ts +0 -35
  210. package/dist/core/app-configuration/index.js +0 -54
  211. package/dist/core/app-configuration/index.js.map +0 -1
  212. package/dist/core/app-configuration/load-config-file.d.ts +0 -1
  213. package/dist/core/app-configuration/load-config-file.js +0 -49
  214. package/dist/core/app-configuration/load-config-file.js.map +0 -1
  215. package/dist/core/bootstrap.d.ts +0 -4
  216. package/dist/core/bootstrap.js +0 -27
  217. package/dist/core/bootstrap.js.map +0 -1
  218. package/dist/core/domain/content-type/index.d.ts +0 -8
  219. package/dist/core/domain/content-type/index.js +0 -116
  220. package/dist/core/domain/content-type/index.js.map +0 -1
  221. package/dist/core/domain/content-type/validator.d.ts +0 -21
  222. package/dist/core/domain/content-type/validator.js +0 -91
  223. package/dist/core/domain/content-type/validator.js.map +0 -1
  224. package/dist/core/domain/module/index.d.ts +0 -39
  225. package/dist/core/domain/module/index.js +0 -110
  226. package/dist/core/domain/module/index.js.map +0 -1
  227. package/dist/core/domain/module/validation.d.ts +0 -13
  228. package/dist/core/domain/module/validation.js +0 -29
  229. package/dist/core/domain/module/validation.js.map +0 -1
  230. package/dist/core/loaders/admin.d.ts +0 -2
  231. package/dist/core/loaders/admin.js +0 -18
  232. package/dist/core/loaders/admin.js.map +0 -1
  233. package/dist/core/loaders/apis.d.ts +0 -2
  234. package/dist/core/loaders/apis.js +0 -156
  235. package/dist/core/loaders/apis.js.map +0 -1
  236. package/dist/core/loaders/components.d.ts +0 -7
  237. package/dist/core/loaders/components.js +0 -37
  238. package/dist/core/loaders/components.js.map +0 -1
  239. package/dist/core/loaders/index.d.ts +0 -18
  240. package/dist/core/loaders/index.js +0 -26
  241. package/dist/core/loaders/index.js.map +0 -1
  242. package/dist/core/loaders/middlewares.d.ts +0 -2
  243. package/dist/core/loaders/middlewares.js +0 -34
  244. package/dist/core/loaders/middlewares.js.map +0 -1
  245. package/dist/core/loaders/plugins/get-enabled-plugins.d.ts +0 -4
  246. package/dist/core/loaders/plugins/get-enabled-plugins.js +0 -113
  247. package/dist/core/loaders/plugins/get-enabled-plugins.js.map +0 -1
  248. package/dist/core/loaders/plugins/get-user-plugins-config.d.ts +0 -6
  249. package/dist/core/loaders/plugins/get-user-plugins-config.js +0 -31
  250. package/dist/core/loaders/plugins/get-user-plugins-config.js.map +0 -1
  251. package/dist/core/loaders/plugins/index.d.ts +0 -2
  252. package/dist/core/loaders/plugins/index.js +0 -109
  253. package/dist/core/loaders/plugins/index.js.map +0 -1
  254. package/dist/core/loaders/policies.d.ts +0 -2
  255. package/dist/core/loaders/policies.js +0 -28
  256. package/dist/core/loaders/policies.js.map +0 -1
  257. package/dist/core/loaders/sanitizers.d.ts +0 -3
  258. package/dist/core/loaders/sanitizers.js +0 -6
  259. package/dist/core/loaders/sanitizers.js.map +0 -1
  260. package/dist/core/loaders/src-index.d.ts +0 -3
  261. package/dist/core/loaders/src-index.js +0 -37
  262. package/dist/core/loaders/src-index.js.map +0 -1
  263. package/dist/core/loaders/validators.d.ts +0 -3
  264. package/dist/core/loaders/validators.js +0 -6
  265. package/dist/core/loaders/validators.js.map +0 -1
  266. package/dist/core/registries/apis.d.ts +0 -7
  267. package/dist/core/registries/apis.js +0 -24
  268. package/dist/core/registries/apis.js.map +0 -1
  269. package/dist/core/registries/config.d.ts +0 -7
  270. package/dist/core/registries/config.js +0 -24
  271. package/dist/core/registries/config.js.map +0 -1
  272. package/dist/core/registries/content-types.d.ts +0 -32
  273. package/dist/core/registries/content-types.js +0 -70
  274. package/dist/core/registries/content-types.js.map +0 -1
  275. package/dist/core/registries/controllers.d.ts +0 -35
  276. package/dist/core/registries/controllers.js +0 -81
  277. package/dist/core/registries/controllers.js.map +0 -1
  278. package/dist/core/registries/custom-fields.d.ts +0 -8
  279. package/dist/core/registries/custom-fields.js +0 -74
  280. package/dist/core/registries/custom-fields.js.map +0 -1
  281. package/dist/core/registries/hooks.d.ts +0 -43
  282. package/dist/core/registries/hooks.js +0 -59
  283. package/dist/core/registries/hooks.js.map +0 -1
  284. package/dist/core/registries/middlewares.d.ts +0 -30
  285. package/dist/core/registries/middlewares.js +0 -62
  286. package/dist/core/registries/middlewares.js.map +0 -1
  287. package/dist/core/registries/modules.d.ts +0 -14
  288. package/dist/core/registries/modules.js +0 -40
  289. package/dist/core/registries/modules.js.map +0 -1
  290. package/dist/core/registries/plugins.d.ts +0 -9
  291. package/dist/core/registries/plugins.js +0 -24
  292. package/dist/core/registries/plugins.js.map +0 -1
  293. package/dist/core/registries/policies.d.ts +0 -33
  294. package/dist/core/registries/policies.js +0 -64
  295. package/dist/core/registries/policies.js.map +0 -1
  296. package/dist/core/registries/sanitizers.d.ts +0 -9
  297. package/dist/core/registries/sanitizers.js +0 -27
  298. package/dist/core/registries/sanitizers.js.map +0 -1
  299. package/dist/core/registries/services.d.ts +0 -35
  300. package/dist/core/registries/services.js +0 -82
  301. package/dist/core/registries/services.js.map +0 -1
  302. package/dist/core/registries/validators.d.ts +0 -9
  303. package/dist/core/registries/validators.js +0 -27
  304. package/dist/core/registries/validators.js.map +0 -1
  305. package/dist/core/utils.d.ts +0 -4
  306. package/dist/core/utils.js +0 -28
  307. package/dist/core/utils.js.map +0 -1
  308. package/dist/core-api/controller/collection-type.d.ts +0 -10
  309. package/dist/core-api/controller/collection-type.js +0 -95
  310. package/dist/core-api/controller/collection-type.js.map +0 -1
  311. package/dist/core-api/controller/index.d.ts +0 -5
  312. package/dist/core-api/controller/index.js +0 -50
  313. package/dist/core-api/controller/index.js.map +0 -1
  314. package/dist/core-api/controller/single-type.d.ts +0 -9
  315. package/dist/core-api/controller/single-type.js +0 -52
  316. package/dist/core-api/controller/single-type.js.map +0 -1
  317. package/dist/core-api/controller/transform.d.ts +0 -21
  318. package/dist/core-api/controller/transform.js +0 -88
  319. package/dist/core-api/controller/transform.js.map +0 -1
  320. package/dist/core-api/routes/index.d.ts +0 -23
  321. package/dist/core-api/routes/index.js +0 -68
  322. package/dist/core-api/routes/index.js.map +0 -1
  323. package/dist/core-api/service/collection-type.d.ts +0 -9
  324. package/dist/core-api/service/collection-type.js +0 -58
  325. package/dist/core-api/service/collection-type.js.map +0 -1
  326. package/dist/core-api/service/get-fetch-params.d.ts +0 -6
  327. package/dist/core-api/service/get-fetch-params.js +0 -16
  328. package/dist/core-api/service/get-fetch-params.js.map +0 -1
  329. package/dist/core-api/service/index.d.ts +0 -8
  330. package/dist/core-api/service/index.js +0 -18
  331. package/dist/core-api/service/index.js.map +0 -1
  332. package/dist/core-api/service/pagination.d.ts +0 -40
  333. package/dist/core-api/service/pagination.js +0 -96
  334. package/dist/core-api/service/pagination.js.map +0 -1
  335. package/dist/core-api/service/single-type.d.ts +0 -8
  336. package/dist/core-api/service/single-type.js +0 -56
  337. package/dist/core-api/service/single-type.js.map +0 -1
  338. package/dist/ee/index.d.ts +0 -19
  339. package/dist/ee/index.js +0 -185
  340. package/dist/ee/index.js.map +0 -1
  341. package/dist/ee/license.d.ts +0 -20
  342. package/dist/ee/license.js +0 -94
  343. package/dist/ee/license.js.map +0 -1
  344. package/dist/factories.d.ts +0 -13
  345. package/dist/factories.js +0 -70
  346. package/dist/factories.js.map +0 -1
  347. package/dist/index.d.ts +0 -3
  348. package/dist/index.js +0 -8
  349. package/dist/index.js.map +0 -1
  350. package/dist/load/filepath-to-prop-path.d.ts +0 -5
  351. package/dist/load/filepath-to-prop-path.js +0 -21
  352. package/dist/load/filepath-to-prop-path.js.map +0 -1
  353. package/dist/load/glob.d.ts +0 -6
  354. package/dist/load/glob.js +0 -20
  355. package/dist/load/glob.js.map +0 -1
  356. package/dist/load/index.d.ts +0 -2
  357. package/dist/load/index.js +0 -11
  358. package/dist/load/index.js.map +0 -1
  359. package/dist/load/load-files.d.ts +0 -9
  360. package/dist/load/load-files.js +0 -44
  361. package/dist/load/load-files.js.map +0 -1
  362. package/dist/load/package-path.d.ts +0 -5
  363. package/dist/load/package-path.js +0 -11
  364. package/dist/load/package-path.js.map +0 -1
  365. package/dist/middlewares/body.d.ts +0 -5
  366. package/dist/middlewares/body.js +0 -78
  367. package/dist/middlewares/body.js.map +0 -1
  368. package/dist/middlewares/compression.d.ts +0 -4
  369. package/dist/middlewares/compression.js +0 -10
  370. package/dist/middlewares/compression.js.map +0 -1
  371. package/dist/middlewares/cors.d.ts +0 -12
  372. package/dist/middlewares/cors.js +0 -54
  373. package/dist/middlewares/cors.js.map +0 -1
  374. package/dist/middlewares/errors.d.ts +0 -3
  375. package/dist/middlewares/errors.js +0 -35
  376. package/dist/middlewares/errors.js.map +0 -1
  377. package/dist/middlewares/favicon.d.ts +0 -4
  378. package/dist/middlewares/favicon.js +0 -30
  379. package/dist/middlewares/favicon.js.map +0 -1
  380. package/dist/middlewares/index.d.ts +0 -2
  381. package/dist/middlewares/index.js +0 -34
  382. package/dist/middlewares/index.js.map +0 -1
  383. package/dist/middlewares/ip.d.ts +0 -4
  384. package/dist/middlewares/ip.js +0 -10
  385. package/dist/middlewares/ip.js.map +0 -1
  386. package/dist/middlewares/logger.d.ts +0 -2
  387. package/dist/middlewares/logger.js +0 -13
  388. package/dist/middlewares/logger.js.map +0 -1
  389. package/dist/middlewares/powered-by.d.ts +0 -5
  390. package/dist/middlewares/powered-by.js +0 -15
  391. package/dist/middlewares/powered-by.js.map +0 -1
  392. package/dist/middlewares/public/index.d.ts +0 -2
  393. package/dist/middlewares/public/index.js +0 -112
  394. package/dist/middlewares/public/index.js.map +0 -1
  395. package/dist/middlewares/public/serve-static.d.ts +0 -3
  396. package/dist/middlewares/public/serve-static.js +0 -27
  397. package/dist/middlewares/public/serve-static.js.map +0 -1
  398. package/dist/middlewares/query.d.ts +0 -2
  399. package/dist/middlewares/query.js +0 -45
  400. package/dist/middlewares/query.js.map +0 -1
  401. package/dist/middlewares/response-time.d.ts +0 -2
  402. package/dist/middlewares/response-time.js +0 -13
  403. package/dist/middlewares/response-time.js.map +0 -1
  404. package/dist/middlewares/responses.d.ts +0 -5
  405. package/dist/middlewares/responses.js +0 -16
  406. package/dist/middlewares/responses.js.map +0 -1
  407. package/dist/middlewares/security.d.ts +0 -4
  408. package/dist/middlewares/security.js +0 -52
  409. package/dist/middlewares/security.js.map +0 -1
  410. package/dist/middlewares/session.d.ts +0 -3
  411. package/dist/middlewares/session.js +0 -30
  412. package/dist/middlewares/session.js.map +0 -1
  413. package/dist/migrations/draft-publish.d.ts +0 -8
  414. package/dist/migrations/draft-publish.js +0 -46
  415. package/dist/migrations/draft-publish.js.map +0 -1
  416. package/dist/services/auth/index.d.ts +0 -25
  417. package/dist/services/auth/index.js +0 -84
  418. package/dist/services/auth/index.js.map +0 -1
  419. package/dist/services/content-api/index.d.ts +0 -54
  420. package/dist/services/content-api/index.js +0 -62
  421. package/dist/services/content-api/index.js.map +0 -1
  422. package/dist/services/content-api/permissions/engine.d.ts +0 -4
  423. package/dist/services/content-api/permissions/engine.js +0 -8
  424. package/dist/services/content-api/permissions/engine.js.map +0 -1
  425. package/dist/services/content-api/permissions/index.d.ts +0 -51
  426. package/dist/services/content-api/permissions/index.js +0 -119
  427. package/dist/services/content-api/permissions/index.js.map +0 -1
  428. package/dist/services/content-api/permissions/providers/action.d.ts +0 -19
  429. package/dist/services/content-api/permissions/providers/action.js +0 -16
  430. package/dist/services/content-api/permissions/providers/action.js.map +0 -1
  431. package/dist/services/content-api/permissions/providers/condition.d.ts +0 -23
  432. package/dist/services/content-api/permissions/providers/condition.js +0 -16
  433. package/dist/services/content-api/permissions/providers/condition.js.map +0 -1
  434. package/dist/services/content-api/permissions/providers/index.d.ts +0 -2
  435. package/dist/services/content-api/permissions/providers/index.js +0 -11
  436. package/dist/services/content-api/permissions/providers/index.js.map +0 -1
  437. package/dist/services/core-store.d.ts +0 -52
  438. package/dist/services/core-store.js +0 -123
  439. package/dist/services/core-store.js.map +0 -1
  440. package/dist/services/cron.d.ts +0 -26
  441. package/dist/services/cron.js +0 -69
  442. package/dist/services/cron.js.map +0 -1
  443. package/dist/services/custom-fields.d.ts +0 -4
  444. package/dist/services/custom-fields.js +0 -11
  445. package/dist/services/custom-fields.js.map +0 -1
  446. package/dist/services/entity-service/attributes/index.d.ts +0 -5
  447. package/dist/services/entity-service/attributes/index.js +0 -25
  448. package/dist/services/entity-service/attributes/index.js.map +0 -1
  449. package/dist/services/entity-service/attributes/transforms.d.ts +0 -9
  450. package/dist/services/entity-service/attributes/transforms.js +0 -19
  451. package/dist/services/entity-service/attributes/transforms.js.map +0 -1
  452. package/dist/services/entity-service/components.d.ts +0 -18
  453. package/dist/services/entity-service/components.js +0 -373
  454. package/dist/services/entity-service/components.js.map +0 -1
  455. package/dist/services/entity-service/index.d.ts +0 -4
  456. package/dist/services/entity-service/index.js +0 -314
  457. package/dist/services/entity-service/index.js.map +0 -1
  458. package/dist/services/entity-service/params.d.ts +0 -2
  459. package/dist/services/entity-service/params.js +0 -7
  460. package/dist/services/entity-service/params.js.map +0 -1
  461. package/dist/services/entity-service/types/index.d.ts +0 -70
  462. package/dist/services/entity-service/types/index.js +0 -34
  463. package/dist/services/entity-service/types/index.js.map +0 -1
  464. package/dist/services/entity-service/types/params/attributes.d.ts +0 -72
  465. package/dist/services/entity-service/types/params/attributes.js +0 -3
  466. package/dist/services/entity-service/types/params/attributes.js.map +0 -1
  467. package/dist/services/entity-service/types/params/data.d.ts +0 -3
  468. package/dist/services/entity-service/types/params/data.js +0 -3
  469. package/dist/services/entity-service/types/params/data.js.map +0 -1
  470. package/dist/services/entity-service/types/params/fields.d.ts +0 -58
  471. package/dist/services/entity-service/types/params/fields.js +0 -3
  472. package/dist/services/entity-service/types/params/fields.js.map +0 -1
  473. package/dist/services/entity-service/types/params/filters/index.d.ts +0 -44
  474. package/dist/services/entity-service/types/params/filters/index.js +0 -3
  475. package/dist/services/entity-service/types/params/filters/index.js.map +0 -1
  476. package/dist/services/entity-service/types/params/filters/operators.d.ts +0 -8
  477. package/dist/services/entity-service/types/params/filters/operators.js +0 -3
  478. package/dist/services/entity-service/types/params/filters/operators.js.map +0 -1
  479. package/dist/services/entity-service/types/params/index.d.ts +0 -132
  480. package/dist/services/entity-service/types/params/index.js +0 -3
  481. package/dist/services/entity-service/types/params/index.js.map +0 -1
  482. package/dist/services/entity-service/types/params/pagination.d.ts +0 -10
  483. package/dist/services/entity-service/types/params/pagination.js +0 -3
  484. package/dist/services/entity-service/types/params/pagination.js.map +0 -1
  485. package/dist/services/entity-service/types/params/populate.d.ts +0 -68
  486. package/dist/services/entity-service/types/params/populate.js +0 -3
  487. package/dist/services/entity-service/types/params/populate.js.map +0 -1
  488. package/dist/services/entity-service/types/params/publication-state.d.ts +0 -15
  489. package/dist/services/entity-service/types/params/publication-state.js +0 -3
  490. package/dist/services/entity-service/types/params/publication-state.js.map +0 -1
  491. package/dist/services/entity-service/types/params/search.d.ts +0 -1
  492. package/dist/services/entity-service/types/params/search.js +0 -3
  493. package/dist/services/entity-service/types/params/search.js.map +0 -1
  494. package/dist/services/entity-service/types/params/sort.d.ts +0 -84
  495. package/dist/services/entity-service/types/params/sort.js +0 -3
  496. package/dist/services/entity-service/types/params/sort.js.map +0 -1
  497. package/dist/services/entity-service/types/plugin.d.ts +0 -7
  498. package/dist/services/entity-service/types/plugin.js +0 -3
  499. package/dist/services/entity-service/types/plugin.js.map +0 -1
  500. package/dist/services/entity-service/types/result.d.ts +0 -88
  501. package/dist/services/entity-service/types/result.js +0 -3
  502. package/dist/services/entity-service/types/result.js.map +0 -1
  503. package/dist/services/entity-validator/index.d.ts +0 -15
  504. package/dist/services/entity-validator/index.js +0 -347
  505. package/dist/services/entity-validator/index.js.map +0 -1
  506. package/dist/services/entity-validator/types.d.ts +0 -1
  507. package/dist/services/entity-validator/types.js +0 -3
  508. package/dist/services/entity-validator/types.js.map +0 -1
  509. package/dist/services/entity-validator/validators.d.ts +0 -36
  510. package/dist/services/entity-validator/validators.js +0 -146
  511. package/dist/services/entity-validator/validators.js.map +0 -1
  512. package/dist/services/errors.d.ts +0 -39
  513. package/dist/services/errors.js +0 -78
  514. package/dist/services/errors.js.map +0 -1
  515. package/dist/services/event-hub.d.ts +0 -18
  516. package/dist/services/event-hub.js +0 -77
  517. package/dist/services/event-hub.js.map +0 -1
  518. package/dist/services/fs.d.ts +0 -12
  519. package/dist/services/fs.js +0 -54
  520. package/dist/services/fs.js.map +0 -1
  521. package/dist/services/metrics/admin-user-hash.d.ts +0 -6
  522. package/dist/services/metrics/admin-user-hash.js +0 -19
  523. package/dist/services/metrics/admin-user-hash.js.map +0 -1
  524. package/dist/services/metrics/index.d.ts +0 -13
  525. package/dist/services/metrics/index.js +0 -53
  526. package/dist/services/metrics/index.js.map +0 -1
  527. package/dist/services/metrics/is-truthy.d.ts +0 -2
  528. package/dist/services/metrics/is-truthy.js +0 -11
  529. package/dist/services/metrics/is-truthy.js.map +0 -1
  530. package/dist/services/metrics/middleware.d.ts +0 -6
  531. package/dist/services/metrics/middleware.js +0 -28
  532. package/dist/services/metrics/middleware.js.map +0 -1
  533. package/dist/services/metrics/rate-limiter.d.ts +0 -6
  534. package/dist/services/metrics/rate-limiter.js +0 -21
  535. package/dist/services/metrics/rate-limiter.js.map +0 -1
  536. package/dist/services/metrics/sender.d.ts +0 -12
  537. package/dist/services/metrics/sender.js +0 -80
  538. package/dist/services/metrics/sender.js.map +0 -1
  539. package/dist/services/request-context.d.ts +0 -6
  540. package/dist/services/request-context.js +0 -14
  541. package/dist/services/request-context.js.map +0 -1
  542. package/dist/services/server/admin-api.d.ts +0 -10
  543. package/dist/services/server/admin-api.js +0 -13
  544. package/dist/services/server/admin-api.js.map +0 -1
  545. package/dist/services/server/api.d.ts +0 -15
  546. package/dist/services/server/api.js +0 -32
  547. package/dist/services/server/api.js.map +0 -1
  548. package/dist/services/server/compose-endpoint.d.ts +0 -7
  549. package/dist/services/server/compose-endpoint.js +0 -121
  550. package/dist/services/server/compose-endpoint.js.map +0 -1
  551. package/dist/services/server/content-api.d.ts +0 -10
  552. package/dist/services/server/content-api.js +0 -13
  553. package/dist/services/server/content-api.js.map +0 -1
  554. package/dist/services/server/http-server.d.ts +0 -9
  555. package/dist/services/server/http-server.js +0 -54
  556. package/dist/services/server/http-server.js.map +0 -1
  557. package/dist/services/server/index.d.ts +0 -33
  558. package/dist/services/server/index.js +0 -99
  559. package/dist/services/server/index.js.map +0 -1
  560. package/dist/services/server/koa.d.ts +0 -15
  561. package/dist/services/server/koa.js +0 -56
  562. package/dist/services/server/koa.js.map +0 -1
  563. package/dist/services/server/middleware.d.ts +0 -15
  564. package/dist/services/server/middleware.js +0 -103
  565. package/dist/services/server/middleware.js.map +0 -1
  566. package/dist/services/server/policy.d.ts +0 -3
  567. package/dist/services/server/policy.js +0 -21
  568. package/dist/services/server/policy.js.map +0 -1
  569. package/dist/services/server/register-middlewares.d.ts +0 -6
  570. package/dist/services/server/register-middlewares.js +0 -82
  571. package/dist/services/server/register-middlewares.js.map +0 -1
  572. package/dist/services/server/register-routes.d.ts +0 -6
  573. package/dist/services/server/register-routes.js +0 -94
  574. package/dist/services/server/register-routes.js.map +0 -1
  575. package/dist/services/server/routing.d.ts +0 -33
  576. package/dist/services/server/routing.js +0 -105
  577. package/dist/services/server/routing.js.map +0 -1
  578. package/dist/services/utils/dynamic-zones.d.ts +0 -2
  579. package/dist/services/utils/dynamic-zones.js +0 -13
  580. package/dist/services/utils/dynamic-zones.js.map +0 -1
  581. package/dist/services/utils/upload-files.d.ts +0 -8
  582. package/dist/services/utils/upload-files.js +0 -73
  583. package/dist/services/utils/upload-files.js.map +0 -1
  584. package/dist/services/webhook-runner.d.ts +0 -48
  585. package/dist/services/webhook-runner.js +0 -136
  586. package/dist/services/webhook-runner.js.map +0 -1
  587. package/dist/services/webhook-store.d.ts +0 -49
  588. package/dist/services/webhook-store.js +0 -106
  589. package/dist/services/webhook-store.js.map +0 -1
  590. package/dist/services/worker-queue.d.ts +0 -19
  591. package/dist/services/worker-queue.js +0 -59
  592. package/dist/services/worker-queue.js.map +0 -1
  593. package/dist/types/core/attributes/base.d.ts +0 -54
  594. package/dist/types/core/attributes/base.js +0 -3
  595. package/dist/types/core/attributes/base.js.map +0 -1
  596. package/dist/types/core/attributes/biginteger.d.ts +0 -4
  597. package/dist/types/core/attributes/biginteger.js +0 -3
  598. package/dist/types/core/attributes/biginteger.js.map +0 -1
  599. package/dist/types/core/attributes/boolean.d.ts +0 -6
  600. package/dist/types/core/attributes/boolean.js +0 -3
  601. package/dist/types/core/attributes/boolean.js.map +0 -1
  602. package/dist/types/core/attributes/common.d.ts +0 -58
  603. package/dist/types/core/attributes/common.js +0 -6
  604. package/dist/types/core/attributes/common.js.map +0 -1
  605. package/dist/types/core/attributes/component.d.ts +0 -10
  606. package/dist/types/core/attributes/component.js +0 -3
  607. package/dist/types/core/attributes/component.js.map +0 -1
  608. package/dist/types/core/attributes/date-time.d.ts +0 -4
  609. package/dist/types/core/attributes/date-time.js +0 -3
  610. package/dist/types/core/attributes/date-time.js.map +0 -1
  611. package/dist/types/core/attributes/date.d.ts +0 -4
  612. package/dist/types/core/attributes/date.js +0 -3
  613. package/dist/types/core/attributes/date.js.map +0 -1
  614. package/dist/types/core/attributes/decimal.d.ts +0 -4
  615. package/dist/types/core/attributes/decimal.js +0 -3
  616. package/dist/types/core/attributes/decimal.js.map +0 -1
  617. package/dist/types/core/attributes/dynamic-zone.d.ts +0 -12
  618. package/dist/types/core/attributes/dynamic-zone.js +0 -3
  619. package/dist/types/core/attributes/dynamic-zone.js.map +0 -1
  620. package/dist/types/core/attributes/email.d.ts +0 -4
  621. package/dist/types/core/attributes/email.js +0 -3
  622. package/dist/types/core/attributes/email.js.map +0 -1
  623. package/dist/types/core/attributes/enumeration.d.ts +0 -8
  624. package/dist/types/core/attributes/enumeration.js +0 -3
  625. package/dist/types/core/attributes/enumeration.js.map +0 -1
  626. package/dist/types/core/attributes/float.d.ts +0 -4
  627. package/dist/types/core/attributes/float.js +0 -3
  628. package/dist/types/core/attributes/float.js.map +0 -1
  629. package/dist/types/core/attributes/index.d.ts +0 -24
  630. package/dist/types/core/attributes/index.js +0 -41
  631. package/dist/types/core/attributes/index.js.map +0 -1
  632. package/dist/types/core/attributes/integer.d.ts +0 -4
  633. package/dist/types/core/attributes/integer.js +0 -3
  634. package/dist/types/core/attributes/integer.js.map +0 -1
  635. package/dist/types/core/attributes/json.d.ts +0 -4
  636. package/dist/types/core/attributes/json.js +0 -3
  637. package/dist/types/core/attributes/json.js.map +0 -1
  638. package/dist/types/core/attributes/media.d.ts +0 -12
  639. package/dist/types/core/attributes/media.js +0 -3
  640. package/dist/types/core/attributes/media.js.map +0 -1
  641. package/dist/types/core/attributes/password.d.ts +0 -4
  642. package/dist/types/core/attributes/password.js +0 -3
  643. package/dist/types/core/attributes/password.js.map +0 -1
  644. package/dist/types/core/attributes/relation.d.ts +0 -75
  645. package/dist/types/core/attributes/relation.js +0 -3
  646. package/dist/types/core/attributes/relation.js.map +0 -1
  647. package/dist/types/core/attributes/richtext.d.ts +0 -4
  648. package/dist/types/core/attributes/richtext.js +0 -3
  649. package/dist/types/core/attributes/richtext.js.map +0 -1
  650. package/dist/types/core/attributes/string.d.ts +0 -9
  651. package/dist/types/core/attributes/string.js +0 -3
  652. package/dist/types/core/attributes/string.js.map +0 -1
  653. package/dist/types/core/attributes/text.d.ts +0 -7
  654. package/dist/types/core/attributes/text.js +0 -3
  655. package/dist/types/core/attributes/text.js.map +0 -1
  656. package/dist/types/core/attributes/time.d.ts +0 -4
  657. package/dist/types/core/attributes/time.js +0 -3
  658. package/dist/types/core/attributes/time.js.map +0 -1
  659. package/dist/types/core/attributes/timestamp.d.ts +0 -4
  660. package/dist/types/core/attributes/timestamp.js +0 -3
  661. package/dist/types/core/attributes/timestamp.js.map +0 -1
  662. package/dist/types/core/attributes/uid.d.ts +0 -15
  663. package/dist/types/core/attributes/uid.js +0 -3
  664. package/dist/types/core/attributes/uid.js.map +0 -1
  665. package/dist/types/core/attributes/utils.d.ts +0 -27
  666. package/dist/types/core/attributes/utils.js +0 -3
  667. package/dist/types/core/attributes/utils.js.map +0 -1
  668. package/dist/types/core/commands/index.d.ts +0 -5
  669. package/dist/types/core/commands/index.js +0 -3
  670. package/dist/types/core/commands/index.js.map +0 -1
  671. package/dist/types/core/common/api.d.ts +0 -3
  672. package/dist/types/core/common/api.js +0 -3
  673. package/dist/types/core/common/api.js.map +0 -1
  674. package/dist/types/core/common/controller.d.ts +0 -3
  675. package/dist/types/core/common/controller.js +0 -3
  676. package/dist/types/core/common/controller.js.map +0 -1
  677. package/dist/types/core/common/index.d.ts +0 -18
  678. package/dist/types/core/common/index.js +0 -40
  679. package/dist/types/core/common/index.js.map +0 -1
  680. package/dist/types/core/common/middleware.d.ts +0 -7
  681. package/dist/types/core/common/middleware.js +0 -3
  682. package/dist/types/core/common/middleware.js.map +0 -1
  683. package/dist/types/core/common/module.d.ts +0 -24
  684. package/dist/types/core/common/module.js +0 -3
  685. package/dist/types/core/common/module.js.map +0 -1
  686. package/dist/types/core/common/plugin.d.ts +0 -5
  687. package/dist/types/core/common/plugin.js +0 -3
  688. package/dist/types/core/common/plugin.js.map +0 -1
  689. package/dist/types/core/common/policy.d.ts +0 -9
  690. package/dist/types/core/common/policy.js +0 -3
  691. package/dist/types/core/common/policy.js.map +0 -1
  692. package/dist/types/core/common/router.d.ts +0 -34
  693. package/dist/types/core/common/router.js +0 -3
  694. package/dist/types/core/common/router.js.map +0 -1
  695. package/dist/types/core/common/schema.d.ts +0 -2
  696. package/dist/types/core/common/schema.js +0 -3
  697. package/dist/types/core/common/schema.js.map +0 -1
  698. package/dist/types/core/common/service.d.ts +0 -3
  699. package/dist/types/core/common/service.js +0 -3
  700. package/dist/types/core/common/service.js.map +0 -1
  701. package/dist/types/core/common/uid.d.ts +0 -15
  702. package/dist/types/core/common/uid.js +0 -3
  703. package/dist/types/core/common/uid.js.map +0 -1
  704. package/dist/types/core/index.d.ts +0 -8
  705. package/dist/types/core/index.js +0 -38
  706. package/dist/types/core/index.js.map +0 -1
  707. package/dist/types/core/namespace.d.ts +0 -77
  708. package/dist/types/core/namespace.js +0 -3
  709. package/dist/types/core/namespace.js.map +0 -1
  710. package/dist/types/core/registry.d.ts +0 -57
  711. package/dist/types/core/registry.js +0 -3
  712. package/dist/types/core/registry.js.map +0 -1
  713. package/dist/types/core/schemas/index.d.ts +0 -122
  714. package/dist/types/core/schemas/index.js +0 -3
  715. package/dist/types/core/schemas/index.js.map +0 -1
  716. package/dist/types/core/uid.d.ts +0 -108
  717. package/dist/types/core/uid.js +0 -3
  718. package/dist/types/core/uid.js.map +0 -1
  719. package/dist/types/core-api/controller.d.ts +0 -44
  720. package/dist/types/core-api/controller.js +0 -3
  721. package/dist/types/core-api/controller.js.map +0 -1
  722. package/dist/types/core-api/index.d.ts +0 -3
  723. package/dist/types/core-api/index.js +0 -30
  724. package/dist/types/core-api/index.js.map +0 -1
  725. package/dist/types/core-api/router.d.ts +0 -62
  726. package/dist/types/core-api/router.js +0 -3
  727. package/dist/types/core-api/router.js.map +0 -1
  728. package/dist/types/core-api/service.d.ts +0 -64
  729. package/dist/types/core-api/service.js +0 -3
  730. package/dist/types/core-api/service.js.map +0 -1
  731. package/dist/types/index.d.ts +0 -5
  732. package/dist/types/index.js +0 -36
  733. package/dist/types/index.js.map +0 -1
  734. package/dist/types/shared/index.d.ts +0 -3
  735. package/dist/types/shared/index.js +0 -20
  736. package/dist/types/shared/index.js.map +0 -1
  737. package/dist/types/shared/registries.d.ts +0 -37
  738. package/dist/types/shared/registries.js +0 -3
  739. package/dist/types/shared/registries.js.map +0 -1
  740. package/dist/types/utils/array.d.ts +0 -15
  741. package/dist/types/utils/array.js +0 -3
  742. package/dist/types/utils/array.js.map +0 -1
  743. package/dist/types/utils/expression.d.ts +0 -42
  744. package/dist/types/utils/expression.js +0 -3
  745. package/dist/types/utils/expression.js.map +0 -1
  746. package/dist/types/utils/function.d.ts +0 -1
  747. package/dist/types/utils/function.js +0 -3
  748. package/dist/types/utils/function.js.map +0 -1
  749. package/dist/types/utils/guard.d.ts +0 -19
  750. package/dist/types/utils/guard.js +0 -3
  751. package/dist/types/utils/guard.js.map +0 -1
  752. package/dist/types/utils/index.d.ts +0 -25
  753. package/dist/types/utils/index.js +0 -34
  754. package/dist/types/utils/index.js.map +0 -1
  755. package/dist/types/utils/object.d.ts +0 -58
  756. package/dist/types/utils/object.js +0 -3
  757. package/dist/types/utils/object.js.map +0 -1
  758. package/dist/types/utils/string.d.ts +0 -37
  759. package/dist/types/utils/string.js +0 -3
  760. package/dist/types/utils/string.js.map +0 -1
  761. package/dist/types/utils/tuple.d.ts +0 -8
  762. package/dist/types/utils/tuple.js +0 -3
  763. package/dist/types/utils/tuple.js.map +0 -1
  764. package/dist/utils/addSlash.d.ts +0 -2
  765. package/dist/utils/addSlash.js +0 -15
  766. package/dist/utils/addSlash.js.map +0 -1
  767. package/dist/utils/convert-custom-field-type.d.ts +0 -3
  768. package/dist/utils/convert-custom-field-type.js +0 -20
  769. package/dist/utils/convert-custom-field-type.js.map +0 -1
  770. package/dist/utils/cron.d.ts +0 -7
  771. package/dist/utils/cron.js +0 -56
  772. package/dist/utils/cron.js.map +0 -1
  773. package/dist/utils/ee.d.ts +0 -2
  774. package/dist/utils/ee.js +0 -8
  775. package/dist/utils/ee.js.map +0 -1
  776. package/dist/utils/fetch.d.ts +0 -8
  777. package/dist/utils/fetch.js +0 -23
  778. package/dist/utils/fetch.js.map +0 -1
  779. package/dist/utils/get-dirs.d.ts +0 -10
  780. package/dist/utils/get-dirs.js +0 -30
  781. package/dist/utils/get-dirs.js.map +0 -1
  782. package/dist/utils/index.d.ts +0 -4
  783. package/dist/utils/index.js +0 -13
  784. package/dist/utils/index.js.map +0 -1
  785. package/dist/utils/is-initialized.d.ts +0 -5
  786. package/dist/utils/is-initialized.js +0 -21
  787. package/dist/utils/is-initialized.js.map +0 -1
  788. package/dist/utils/lifecycles.d.ts +0 -5
  789. package/dist/utils/lifecycles.js +0 -9
  790. package/dist/utils/lifecycles.js.map +0 -1
  791. package/dist/utils/machine-id.d.ts +0 -2
  792. package/dist/utils/machine-id.js +0 -15
  793. package/dist/utils/machine-id.js.map +0 -1
  794. package/dist/utils/open-browser.d.ts +0 -4
  795. package/dist/utils/open-browser.js +0 -13
  796. package/dist/utils/open-browser.js.map +0 -1
  797. package/dist/utils/signals.d.ts +0 -2
  798. package/dist/utils/signals.js +0 -20
  799. package/dist/utils/signals.js.map +0 -1
  800. package/dist/utils/startup-logger.d.ts +0 -10
  801. package/dist/utils/startup-logger.js +0 -68
  802. package/dist/utils/startup-logger.js.map +0 -1
  803. package/dist/utils/success.d.ts +0 -1
  804. package/dist/utils/success.js +0 -32
  805. package/dist/utils/success.js.map +0 -1
  806. package/dist/utils/update-notifier/index.d.ts +0 -8
  807. package/dist/utils/update-notifier/index.js +0 -85
  808. package/dist/utils/update-notifier/index.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/strapi",
3
- "version": "4.13.0-alpha.0",
3
+ "version": "4.13.0-alpha.2",
4
4
  "description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite",
5
5
  "keywords": [
6
6
  "strapi",
@@ -81,19 +81,19 @@
81
81
  "dependencies": {
82
82
  "@koa/cors": "3.4.3",
83
83
  "@koa/router": "10.1.1",
84
- "@strapi/admin": "4.13.0-alpha.0",
85
- "@strapi/data-transfer": "4.13.0-alpha.0",
86
- "@strapi/database": "4.13.0-alpha.0",
87
- "@strapi/generate-new": "4.13.0-alpha.0",
88
- "@strapi/generators": "4.13.0-alpha.0",
89
- "@strapi/logger": "4.13.0-alpha.0",
90
- "@strapi/permissions": "4.13.0-alpha.0",
91
- "@strapi/plugin-content-manager": "4.13.0-alpha.0",
92
- "@strapi/plugin-content-type-builder": "4.13.0-alpha.0",
93
- "@strapi/plugin-email": "4.13.0-alpha.0",
94
- "@strapi/plugin-upload": "4.13.0-alpha.0",
95
- "@strapi/typescript-utils": "4.13.0-alpha.0",
96
- "@strapi/utils": "4.13.0-alpha.0",
84
+ "@strapi/admin": "4.13.0-alpha.2",
85
+ "@strapi/data-transfer": "4.13.0-alpha.2",
86
+ "@strapi/database": "4.13.0-alpha.2",
87
+ "@strapi/generate-new": "4.13.0-alpha.2",
88
+ "@strapi/generators": "4.13.0-alpha.2",
89
+ "@strapi/logger": "4.13.0-alpha.2",
90
+ "@strapi/permissions": "4.13.0-alpha.2",
91
+ "@strapi/plugin-content-manager": "4.13.0-alpha.2",
92
+ "@strapi/plugin-content-type-builder": "4.13.0-alpha.2",
93
+ "@strapi/plugin-email": "4.13.0-alpha.2",
94
+ "@strapi/plugin-upload": "4.13.0-alpha.2",
95
+ "@strapi/typescript-utils": "4.13.0-alpha.2",
96
+ "@strapi/utils": "4.13.0-alpha.2",
97
97
  "bcryptjs": "2.4.3",
98
98
  "boxen": "5.1.2",
99
99
  "chalk": "4.1.2",
@@ -143,5 +143,5 @@
143
143
  "node": ">=16.0.0 <=20.x.x",
144
144
  "npm": ">=6.0.0"
145
145
  },
146
- "gitHead": "41844c2867621a1f47dd6ae6ac83283aa54b22f8"
146
+ "gitHead": "2cb056a9343bc202f28ab01aa899715783138f03"
147
147
  }
package/dist/Strapi.d.ts DELETED
@@ -1,124 +0,0 @@
1
- import { Logger } from '@strapi/logger';
2
- import { Database } from '@strapi/database';
3
- import * as factories from './factories';
4
- import compile from './compile';
5
- import * as utils from './utils';
6
- import { Container } from './container';
7
- import createStrapiFs from './services/fs';
8
- import { EventHub } from './services/event-hub';
9
- import { createServer } from './services/server';
10
- import { WebhookRunner } from './services/webhook-runner';
11
- import { createWebhookStore } from './services/webhook-store';
12
- import { createCoreStore } from './services/core-store';
13
- import { EntityService } from './services/entity-service';
14
- import createCronService from './services/cron';
15
- import { EntityValidator } from './services/entity-validator';
16
- import createTelemetry from './services/metrics';
17
- import requestContext from './services/request-context';
18
- import createCustomFields from './services/custom-fields';
19
- import createStartupLogger from './utils/startup-logger';
20
- import { createStrapiFetch } from './utils/fetch';
21
- import type { Common, Shared } from './types';
22
- declare const reloader: (strapi: Strapi) => {
23
- (): void;
24
- isReloading: boolean;
25
- isWatching: boolean;
26
- };
27
- /** @implements {import('@strapi/strapi').Strapi} */
28
- export type LoadedStrapi = Required<Strapi>;
29
- declare class Strapi {
30
- server: ReturnType<typeof createServer>;
31
- container: Container;
32
- log: Logger;
33
- fs: ReturnType<typeof createStrapiFs>;
34
- eventHub: EventHub;
35
- startupLogger: ReturnType<typeof createStartupLogger>;
36
- cron: ReturnType<typeof createCronService>;
37
- webhookRunner?: WebhookRunner;
38
- webhookStore?: ReturnType<typeof createWebhookStore>;
39
- store?: ReturnType<typeof createCoreStore>;
40
- entityValidator?: EntityValidator;
41
- entityService?: EntityService;
42
- telemetry: ReturnType<typeof createTelemetry>;
43
- requestContext: typeof requestContext;
44
- customFields: ReturnType<typeof createCustomFields>;
45
- fetch: ReturnType<typeof createStrapiFetch>;
46
- dirs: ReturnType<typeof utils.getDirs>;
47
- admin?: Common.Module;
48
- isLoaded: boolean;
49
- db?: Database;
50
- app: any;
51
- EE?: boolean;
52
- components: Shared.Components;
53
- reload: ReturnType<typeof reloader>;
54
- constructor(opts?: StrapiOptions);
55
- get config(): any;
56
- get services(): any;
57
- service(uid: Common.UID.Service): any;
58
- get controllers(): any;
59
- controller(uid: Common.UID.Controller): any;
60
- get contentTypes(): Shared.ContentTypes;
61
- contentType(name: Common.UID.ContentType): any;
62
- get policies(): any;
63
- policy(name: string): any;
64
- get middlewares(): any;
65
- middleware(name: string): any;
66
- get plugins(): Record<string, Common.Plugin>;
67
- plugin(name: string): Common.Plugin;
68
- get hooks(): any;
69
- hook(name: string): any;
70
- get api(): Record<string, Common.Module>;
71
- get auth(): any;
72
- get contentAPI(): any;
73
- get sanitizers(): any;
74
- get validators(): any;
75
- start(): Promise<this>;
76
- destroy(): Promise<void>;
77
- sendStartupTelemetry(): void;
78
- openAdmin({ isInitialized }: {
79
- isInitialized: boolean;
80
- }): Promise<void>;
81
- postListen(): Promise<void>;
82
- /**
83
- * Add behaviors to the server
84
- */
85
- listen(): Promise<void>;
86
- stopWithError(err: unknown, customMessage?: string): never;
87
- stop(exitCode?: number): never;
88
- loadAdmin(): Promise<void>;
89
- loadPlugins(): Promise<void>;
90
- loadPolicies(): Promise<void>;
91
- loadAPIs(): Promise<void>;
92
- loadComponents(): Promise<void>;
93
- loadMiddlewares(): Promise<void>;
94
- loadApp(): Promise<void>;
95
- loadSanitizers(): Promise<void>;
96
- loadValidators(): Promise<void>;
97
- registerInternalHooks(): void;
98
- register(): Promise<this>;
99
- bootstrap(): Promise<this>;
100
- load(): Promise<this & Required<Strapi>>;
101
- startWebhooks(): Promise<void>;
102
- runLifecyclesFunctions(lifecycleName: 'register' | 'bootstrap' | 'destroy'): Promise<void>;
103
- getModel(uid: string): import("./types/core/schemas").ContentType;
104
- assertIsLoaded(): asserts this is LoadedStrapi;
105
- /**
106
- * Binds queries with a specific model
107
- * @param {string} uid
108
- */
109
- query(uid: Common.UID.Schema): import("@strapi/database").QueryFromContentType<Common.UID.Schema>;
110
- }
111
- interface StrapiOptions {
112
- appDir?: string;
113
- distDir?: string;
114
- autoReload?: boolean;
115
- serveAdminPanel?: boolean;
116
- }
117
- interface Init {
118
- (options?: StrapiOptions): Strapi;
119
- factories: typeof factories;
120
- compile: typeof compile;
121
- }
122
- declare const init: Init;
123
- export default init;
124
- export { Strapi };
package/dist/Strapi.js DELETED
@@ -1,524 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Strapi = void 0;
30
- const path_1 = __importDefault(require("path"));
31
- const lodash_1 = __importDefault(require("lodash"));
32
- const fp_1 = require("lodash/fp");
33
- const logger_1 = require("@strapi/logger");
34
- const database_1 = require("@strapi/database");
35
- const utils_1 = require("@strapi/utils");
36
- const app_configuration_1 = __importDefault(require("./core/app-configuration"));
37
- const factories = __importStar(require("./factories"));
38
- const compile_1 = __importDefault(require("./compile"));
39
- const utils = __importStar(require("./utils"));
40
- const container_1 = require("./container");
41
- const fs_1 = __importDefault(require("./services/fs"));
42
- const event_hub_1 = __importDefault(require("./services/event-hub"));
43
- const server_1 = require("./services/server");
44
- const webhook_runner_1 = __importDefault(require("./services/webhook-runner"));
45
- const webhook_store_1 = require("./services/webhook-store");
46
- const core_store_1 = require("./services/core-store");
47
- const entity_service_1 = __importDefault(require("./services/entity-service"));
48
- const cron_1 = __importDefault(require("./services/cron"));
49
- const entity_validator_1 = __importDefault(require("./services/entity-validator"));
50
- const metrics_1 = __importDefault(require("./services/metrics"));
51
- const request_context_1 = __importDefault(require("./services/request-context"));
52
- const auth_1 = __importDefault(require("./services/auth"));
53
- const custom_fields_1 = __importDefault(require("./services/custom-fields"));
54
- const content_api_1 = __importDefault(require("./services/content-api"));
55
- const update_notifier_1 = __importDefault(require("./utils/update-notifier"));
56
- const startup_logger_1 = __importDefault(require("./utils/startup-logger"));
57
- const fetch_1 = require("./utils/fetch");
58
- const lifecycles_1 = require("./utils/lifecycles");
59
- const ee_1 = __importDefault(require("./utils/ee"));
60
- const content_types_1 = __importDefault(require("./core/registries/content-types"));
61
- const services_1 = __importDefault(require("./core/registries/services"));
62
- const policies_1 = __importDefault(require("./core/registries/policies"));
63
- const middlewares_1 = __importDefault(require("./core/registries/middlewares"));
64
- const hooks_1 = __importDefault(require("./core/registries/hooks"));
65
- const controllers_1 = __importDefault(require("./core/registries/controllers"));
66
- const modules_1 = __importDefault(require("./core/registries/modules"));
67
- const plugins_1 = __importDefault(require("./core/registries/plugins"));
68
- const custom_fields_2 = __importDefault(require("./core/registries/custom-fields"));
69
- const config_1 = __importDefault(require("./core/registries/config"));
70
- const apis_1 = __importDefault(require("./core/registries/apis"));
71
- const bootstrap_1 = __importDefault(require("./core/bootstrap"));
72
- const loaders_1 = __importDefault(require("./core/loaders"));
73
- const signals_1 = require("./utils/signals");
74
- const dynamic_zones_1 = __importDefault(require("./services/utils/dynamic-zones"));
75
- const sanitizers_1 = __importDefault(require("./core/registries/sanitizers"));
76
- const validators_1 = __importDefault(require("./core/registries/validators"));
77
- const convert_custom_field_type_1 = __importDefault(require("./utils/convert-custom-field-type"));
78
- // TODO: move somewhere else
79
- const draftAndPublishSync = __importStar(require("./migrations/draft-publish"));
80
- /**
81
- * Resolve the working directories based on the instance options.
82
- *
83
- * Behavior:
84
- * - `appDir` is the directory where Strapi will write every file (schemas, generated APIs, controllers or services)
85
- * - `distDir` is the directory where Strapi will read configurations, schemas and any compiled code
86
- *
87
- * Default values:
88
- * - If `appDir` is `undefined`, it'll be set to `process.cwd()`
89
- * - If `distDir` is `undefined`, it'll be set to `appDir`
90
- */
91
- const resolveWorkingDirectories = (opts) => {
92
- const cwd = process.cwd();
93
- const appDir = opts.appDir ? path_1.default.resolve(cwd, opts.appDir) : cwd;
94
- const distDir = opts.distDir ? path_1.default.resolve(cwd, opts.distDir) : appDir;
95
- return { app: appDir, dist: distDir };
96
- };
97
- const reloader = (strapi) => {
98
- const state = {
99
- shouldReload: 0,
100
- isWatching: true,
101
- };
102
- function reload() {
103
- if (state.shouldReload > 0) {
104
- // Reset the reloading state
105
- state.shouldReload -= 1;
106
- reload.isReloading = false;
107
- return;
108
- }
109
- if (strapi.config.get('autoReload')) {
110
- process.send?.('reload');
111
- }
112
- }
113
- Object.defineProperty(reload, 'isWatching', {
114
- configurable: true,
115
- enumerable: true,
116
- set(value) {
117
- // Special state when the reloader is disabled temporarly (see GraphQL plugin example).
118
- if (state.isWatching === false && value === true) {
119
- state.shouldReload += 1;
120
- }
121
- state.isWatching = value;
122
- },
123
- get() {
124
- return state.isWatching;
125
- },
126
- });
127
- reload.isReloading = false;
128
- reload.isWatching = true;
129
- return reload;
130
- };
131
- class Strapi {
132
- constructor(opts = {}) {
133
- (0, signals_1.destroyOnSignal)(this);
134
- const rootDirs = resolveWorkingDirectories(opts);
135
- // Load the app configuration from the dist directory
136
- const appConfig = (0, app_configuration_1.default)(rootDirs, opts);
137
- // Instantiate the Strapi container
138
- this.container = (0, container_1.createContainer)(this)
139
- .register('config', (0, config_1.default)(appConfig))
140
- .register('content-types', (0, content_types_1.default)())
141
- .register('services', (0, services_1.default)(this))
142
- .register('policies', (0, policies_1.default)())
143
- .register('middlewares', (0, middlewares_1.default)())
144
- .register('hooks', (0, hooks_1.default)())
145
- .register('controllers', (0, controllers_1.default)(this))
146
- .register('modules', (0, modules_1.default)(this))
147
- .register('plugins', (0, plugins_1.default)(this))
148
- .register('custom-fields', (0, custom_fields_2.default)(this))
149
- .register('apis', (0, apis_1.default)(this))
150
- .register('auth', (0, auth_1.default)())
151
- .register('content-api', (0, content_api_1.default)(this))
152
- .register('sanitizers', (0, sanitizers_1.default)())
153
- .register('validators', (0, validators_1.default)());
154
- this.components = {};
155
- // Create a mapping of every useful directory (for the app, dist and static directories)
156
- this.dirs = utils.getDirs(rootDirs, { strapi: this });
157
- // Strapi state management variables
158
- this.isLoaded = false;
159
- this.reload = reloader(this);
160
- // Instantiate the Koa app & the HTTP server
161
- this.server = (0, server_1.createServer)(this);
162
- // Strapi utils instantiation
163
- this.fs = (0, fs_1.default)(this);
164
- this.eventHub = (0, event_hub_1.default)();
165
- this.startupLogger = (0, startup_logger_1.default)(this);
166
- this.log = (0, logger_1.createLogger)(this.config.get('logger', {}));
167
- this.cron = (0, cron_1.default)();
168
- this.telemetry = (0, metrics_1.default)(this);
169
- this.requestContext = request_context_1.default;
170
- this.customFields = (0, custom_fields_1.default)(this);
171
- this.fetch = (0, fetch_1.createStrapiFetch)(this);
172
- (0, update_notifier_1.default)(this).notify();
173
- Object.defineProperty(this, 'EE', {
174
- get: () => {
175
- ee_1.default.init(this.dirs.app.root, this.log);
176
- return ee_1.default.isEE;
177
- },
178
- configurable: false,
179
- });
180
- }
181
- get config() {
182
- return this.container.get('config');
183
- }
184
- get services() {
185
- return this.container.get('services').getAll();
186
- }
187
- service(uid) {
188
- return this.container.get('services').get(uid);
189
- }
190
- get controllers() {
191
- return this.container.get('controllers').getAll();
192
- }
193
- controller(uid) {
194
- return this.container.get('controllers').get(uid);
195
- }
196
- get contentTypes() {
197
- return this.container.get('content-types').getAll();
198
- }
199
- contentType(name) {
200
- return this.container.get('content-types').get(name);
201
- }
202
- get policies() {
203
- return this.container.get('policies').getAll();
204
- }
205
- policy(name) {
206
- return this.container.get('policies').get(name);
207
- }
208
- get middlewares() {
209
- return this.container.get('middlewares').getAll();
210
- }
211
- middleware(name) {
212
- return this.container.get('middlewares').get(name);
213
- }
214
- get plugins() {
215
- return this.container.get('plugins').getAll();
216
- }
217
- plugin(name) {
218
- return this.container.get('plugins').get(name);
219
- }
220
- get hooks() {
221
- return this.container.get('hooks').getAll();
222
- }
223
- hook(name) {
224
- return this.container.get('hooks').get(name);
225
- }
226
- // api(name) {
227
- // return this.container.get('apis').get(name);
228
- // }
229
- get api() {
230
- return this.container.get('apis').getAll();
231
- }
232
- get auth() {
233
- return this.container.get('auth');
234
- }
235
- get contentAPI() {
236
- return this.container.get('content-api');
237
- }
238
- get sanitizers() {
239
- return this.container.get('sanitizers');
240
- }
241
- get validators() {
242
- return this.container.get('validators');
243
- }
244
- async start() {
245
- try {
246
- if (!this.isLoaded) {
247
- await this.load();
248
- }
249
- await this.listen();
250
- return this;
251
- }
252
- catch (error) {
253
- return this.stopWithError(error);
254
- }
255
- }
256
- async destroy() {
257
- this.assertIsLoaded();
258
- await this.server.destroy();
259
- await this.runLifecyclesFunctions(lifecycles_1.LIFECYCLES.DESTROY);
260
- this.eventHub.destroy();
261
- if (lodash_1.default.has(this, 'db')) {
262
- await this.db.destroy();
263
- }
264
- this.telemetry.destroy();
265
- this.cron.destroy();
266
- process.removeAllListeners();
267
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
268
- // @ts-ignore
269
- delete global.strapi;
270
- }
271
- sendStartupTelemetry() {
272
- // Emit started event.
273
- // do not await to avoid slower startup
274
- // This event is anonymous
275
- this.telemetry.send('didStartServer', {
276
- groupProperties: {
277
- database: this.config.get('database.connection.client'),
278
- plugins: Object.keys(this.plugins),
279
- numberOfAllContentTypes: lodash_1.default.size(this.contentTypes),
280
- numberOfComponents: lodash_1.default.size(this.components),
281
- numberOfDynamicZones: (0, dynamic_zones_1.default)(),
282
- environment: this.config.environment,
283
- // TODO: to add back
284
- // providers: this.config.installedProviders,
285
- },
286
- });
287
- }
288
- async openAdmin({ isInitialized }) {
289
- const shouldOpenAdmin = this.config.get('environment') === 'development' &&
290
- this.config.get('admin.autoOpen', true) !== false;
291
- if (shouldOpenAdmin && !isInitialized) {
292
- try {
293
- await utils.openBrowser(this.config);
294
- this.telemetry.send('didOpenTab');
295
- }
296
- catch (e) {
297
- this.telemetry.send('didNotOpenTab');
298
- }
299
- }
300
- }
301
- async postListen() {
302
- const isInitialized = await utils.isInitialized(this);
303
- this.startupLogger.logStartupMessage({ isInitialized });
304
- this.sendStartupTelemetry();
305
- this.openAdmin({ isInitialized });
306
- }
307
- /**
308
- * Add behaviors to the server
309
- */
310
- async listen() {
311
- return new Promise((resolve, reject) => {
312
- const onListen = async () => {
313
- try {
314
- await this.postListen();
315
- resolve();
316
- }
317
- catch (error) {
318
- reject(error);
319
- }
320
- };
321
- const listenSocket = this.config.get('server.socket');
322
- if (listenSocket) {
323
- this.server.listen(listenSocket, onListen);
324
- }
325
- else {
326
- const { host, port } = this.config.get('server');
327
- this.server.listen(port, host, onListen);
328
- }
329
- });
330
- }
331
- stopWithError(err, customMessage) {
332
- this.log.debug(`⛔️ Server wasn't able to start properly.`);
333
- if (customMessage) {
334
- this.log.error(customMessage);
335
- }
336
- this.log.error(err);
337
- return this.stop();
338
- }
339
- stop(exitCode = 1) {
340
- this.destroy();
341
- if (this.config.get('autoReload')) {
342
- process.send?.('stop');
343
- }
344
- // Kill process
345
- process.exit(exitCode);
346
- }
347
- async loadAdmin() {
348
- await loaders_1.default.loadAdmin(this);
349
- }
350
- async loadPlugins() {
351
- await loaders_1.default.loadPlugins(this);
352
- }
353
- async loadPolicies() {
354
- await loaders_1.default.loadPolicies(this);
355
- }
356
- async loadAPIs() {
357
- await loaders_1.default.loadAPIs(this);
358
- }
359
- async loadComponents() {
360
- this.components = await loaders_1.default.loadComponents(this);
361
- }
362
- async loadMiddlewares() {
363
- await loaders_1.default.loadMiddlewares(this);
364
- }
365
- async loadApp() {
366
- this.app = await loaders_1.default.loadSrcIndex(this);
367
- }
368
- async loadSanitizers() {
369
- await loaders_1.default.loadSanitizers(this);
370
- }
371
- async loadValidators() {
372
- await loaders_1.default.loadValidators(this);
373
- }
374
- registerInternalHooks() {
375
- this.container
376
- .get('hooks')
377
- .set('strapi::content-types.beforeSync', utils_1.hooks.createAsyncParallelHook());
378
- this.container
379
- .get('hooks')
380
- .set('strapi::content-types.afterSync', utils_1.hooks.createAsyncParallelHook());
381
- this.hook('strapi::content-types.beforeSync').register(draftAndPublishSync.disable);
382
- this.hook('strapi::content-types.afterSync').register(draftAndPublishSync.enable);
383
- }
384
- async register() {
385
- await Promise.all([
386
- this.loadApp(),
387
- this.loadSanitizers(),
388
- this.loadValidators(),
389
- this.loadPlugins(),
390
- this.loadAdmin(),
391
- this.loadAPIs(),
392
- this.loadComponents(),
393
- this.loadMiddlewares(),
394
- this.loadPolicies(),
395
- ]);
396
- await (0, bootstrap_1.default)({ strapi: this });
397
- // init webhook runner
398
- this.webhookRunner = (0, webhook_runner_1.default)({
399
- eventHub: this.eventHub,
400
- logger: this.log,
401
- configuration: this.config.get('server.webhooks', {}),
402
- fetch: this.fetch,
403
- });
404
- this.registerInternalHooks();
405
- this.telemetry.register();
406
- await this.runLifecyclesFunctions(lifecycles_1.LIFECYCLES.REGISTER);
407
- // NOTE: Swap type customField for underlying data type
408
- (0, convert_custom_field_type_1.default)(this);
409
- return this;
410
- }
411
- async bootstrap() {
412
- const contentTypes = [
413
- core_store_1.coreStoreModel,
414
- webhook_store_1.webhookModel,
415
- ...Object.values(this.contentTypes),
416
- ...Object.values(this.components),
417
- ];
418
- this.db = await database_1.Database.init({
419
- ...this.config.get('database'),
420
- models: database_1.Database.transformContentTypes(contentTypes),
421
- });
422
- this.store = (0, core_store_1.createCoreStore)({ db: this.db });
423
- this.webhookStore = (0, webhook_store_1.createWebhookStore)({ db: this.db });
424
- this.entityValidator = entity_validator_1.default;
425
- this.entityService = (0, entity_service_1.default)({
426
- strapi: this,
427
- db: this.db,
428
- eventHub: this.eventHub,
429
- entityValidator: this.entityValidator,
430
- });
431
- if (this.config.get('server.cron.enabled', true)) {
432
- const cronTasks = this.config.get('server.cron.tasks', {});
433
- this.cron.add(cronTasks);
434
- }
435
- this.telemetry.bootstrap();
436
- let oldContentTypes;
437
- if (await this.db.getSchemaConnection().hasTable(core_store_1.coreStoreModel.collectionName)) {
438
- oldContentTypes = await this.store.get({
439
- type: 'strapi',
440
- name: 'content_types',
441
- key: 'schema',
442
- });
443
- }
444
- await this.hook('strapi::content-types.beforeSync').call({
445
- oldContentTypes,
446
- contentTypes: this.contentTypes,
447
- });
448
- await this.db.schema.sync();
449
- if (this.EE) {
450
- await ee_1.default.checkLicense({ strapi: this });
451
- }
452
- await this.hook('strapi::content-types.afterSync').call({
453
- oldContentTypes,
454
- contentTypes: this.contentTypes,
455
- });
456
- await this.store.set({
457
- type: 'strapi',
458
- name: 'content_types',
459
- key: 'schema',
460
- value: this.contentTypes,
461
- });
462
- await this.startWebhooks();
463
- await this.server.initMiddlewares();
464
- this.server.initRouting();
465
- await this.contentAPI.permissions.registerActions();
466
- await this.runLifecyclesFunctions(lifecycles_1.LIFECYCLES.BOOTSTRAP);
467
- this.cron.start();
468
- return this;
469
- }
470
- async load() {
471
- await this.register();
472
- await this.bootstrap();
473
- this.isLoaded = true;
474
- return this;
475
- }
476
- async startWebhooks() {
477
- this.assertIsLoaded();
478
- const webhooks = await this.webhookStore.findWebhooks();
479
- for (const webhook of webhooks) {
480
- this.webhookRunner.add(webhook);
481
- }
482
- }
483
- async runLifecyclesFunctions(lifecycleName) {
484
- this.assertIsLoaded();
485
- // plugins
486
- await this.container.get('modules')[lifecycleName]();
487
- // admin
488
- const adminLifecycleFunction = this.admin[lifecycleName];
489
- if ((0, fp_1.isFunction)(adminLifecycleFunction)) {
490
- await adminLifecycleFunction({ strapi: this });
491
- }
492
- // user
493
- const userLifecycleFunction = this.app[lifecycleName];
494
- if ((0, fp_1.isFunction)(userLifecycleFunction)) {
495
- await userLifecycleFunction({ strapi: this });
496
- }
497
- }
498
- getModel(uid) {
499
- return (this.contentTypes[uid] ||
500
- this.components[uid]);
501
- }
502
- assertIsLoaded() {
503
- if (!this.isLoaded) {
504
- throw new Error('Strapi is not loaded');
505
- }
506
- }
507
- /**
508
- * Binds queries with a specific model
509
- * @param {string} uid
510
- */
511
- query(uid) {
512
- this.assertIsLoaded();
513
- return this.db.query(uid);
514
- }
515
- }
516
- exports.Strapi = Strapi;
517
- const initFn = (options = {}) => {
518
- const strapi = new Strapi(options);
519
- global.strapi = strapi;
520
- return strapi;
521
- };
522
- const init = Object.assign(initFn, { factories, compile: compile_1.default });
523
- exports.default = init;
524
- //# sourceMappingURL=Strapi.js.map