@paroicms/server 0.150.0 → 0.151.0

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 (570) hide show
  1. package/README.md +10 -7
  2. package/package.json +17 -8
  3. package/dist/cli.d.ts +0 -2
  4. package/dist/cli.js +0 -5
  5. package/dist/cli.js.map +0 -1
  6. package/dist/common/child-ordering-query.d.ts +0 -13
  7. package/dist/common/child-ordering-query.js +0 -107
  8. package/dist/common/child-ordering-query.js.map +0 -1
  9. package/dist/common/data-format.d.ts +0 -19
  10. package/dist/common/data-format.js +0 -86
  11. package/dist/common/data-format.js.map +0 -1
  12. package/dist/common/mail/html-helpers.d.ts +0 -7
  13. package/dist/common/mail/html-helpers.js +0 -46
  14. package/dist/common/mail/html-helpers.js.map +0 -1
  15. package/dist/common/mail/sendMail.helpers.d.ts +0 -14
  16. package/dist/common/mail/sendMail.helpers.js +0 -51
  17. package/dist/common/mail/sendMail.helpers.js.map +0 -1
  18. package/dist/common/media-handles.helpers.d.ts +0 -19
  19. package/dist/common/media-handles.helpers.js +0 -52
  20. package/dist/common/media-handles.helpers.js.map +0 -1
  21. package/dist/common/serve-html-or.d.ts +0 -16
  22. package/dist/common/serve-html-or.js +0 -72
  23. package/dist/common/serve-html-or.js.map +0 -1
  24. package/dist/common/text-cache.d.ts +0 -57
  25. package/dist/common/text-cache.js +0 -87
  26. package/dist/common/text-cache.js.map +0 -1
  27. package/dist/common/tracker-report.d.ts +0 -2
  28. package/dist/common/tracker-report.js +0 -27
  29. package/dist/common/tracker-report.js.map +0 -1
  30. package/dist/context.d.ts +0 -29
  31. package/dist/context.js +0 -60
  32. package/dist/context.js.map +0 -1
  33. package/dist/express/http-helpers.d.ts +0 -16
  34. package/dist/express/http-helpers.js +0 -44
  35. package/dist/express/http-helpers.js.map +0 -1
  36. package/dist/express/static-middlewares.d.ts +0 -3
  37. package/dist/express/static-middlewares.js +0 -114
  38. package/dist/express/static-middlewares.js.map +0 -1
  39. package/dist/helpers/configuration.helpers.d.ts +0 -2
  40. package/dist/helpers/configuration.helpers.js +0 -8
  41. package/dist/helpers/configuration.helpers.js.map +0 -1
  42. package/dist/helpers/excerpt.helpers.d.ts +0 -2
  43. package/dist/helpers/excerpt.helpers.js +0 -31
  44. package/dist/helpers/excerpt.helpers.js.map +0 -1
  45. package/dist/helpers/jwt-secret.helpers.d.ts +0 -2
  46. package/dist/helpers/jwt-secret.helpers.js +0 -30
  47. package/dist/helpers/jwt-secret.helpers.js.map +0 -1
  48. package/dist/helpers/label-translator.helper.d.ts +0 -9
  49. package/dist/helpers/label-translator.helper.js +0 -14
  50. package/dist/helpers/label-translator.helper.js.map +0 -1
  51. package/dist/helpers/passwordEncrypt-helper.d.ts +0 -2
  52. package/dist/helpers/passwordEncrypt-helper.js +0 -37
  53. package/dist/helpers/passwordEncrypt-helper.js.map +0 -1
  54. package/dist/helpers/relative-id-helper.d.ts +0 -10
  55. package/dist/helpers/relative-id-helper.js +0 -37
  56. package/dist/helpers/relative-id-helper.js.map +0 -1
  57. package/dist/helpers/simple-i18n.d.ts +0 -14
  58. package/dist/helpers/simple-i18n.js +0 -82
  59. package/dist/helpers/simple-i18n.js.map +0 -1
  60. package/dist/helpers/special-account.helpers.d.ts +0 -9
  61. package/dist/helpers/special-account.helpers.js +0 -43
  62. package/dist/helpers/special-account.helpers.js.map +0 -1
  63. package/dist/helpers/url.helpers.d.ts +0 -2
  64. package/dist/helpers/url.helpers.js +0 -12
  65. package/dist/helpers/url.helpers.js.map +0 -1
  66. package/dist/helpers/utils-helper.d.ts +0 -4
  67. package/dist/helpers/utils-helper.js +0 -32
  68. package/dist/helpers/utils-helper.js.map +0 -1
  69. package/dist/index.d.ts +0 -7
  70. package/dist/index.js +0 -69
  71. package/dist/index.js.map +0 -1
  72. package/dist/liquidjs-tools/liquidjs-drop.d.ts +0 -31
  73. package/dist/liquidjs-tools/liquidjs-drop.js +0 -45
  74. package/dist/liquidjs-tools/liquidjs-drop.js.map +0 -1
  75. package/dist/liquidjs-tools/liquidjs-filter.d.ts +0 -10
  76. package/dist/liquidjs-tools/liquidjs-filter.js +0 -23
  77. package/dist/liquidjs-tools/liquidjs-filter.js.map +0 -1
  78. package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.d.ts +0 -6
  79. package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.js +0 -40
  80. package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.js.map +0 -1
  81. package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.d.ts +0 -25
  82. package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.js +0 -35
  83. package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.js.map +0 -1
  84. package/dist/liquidjs-tools/liquidjs-utils.d.ts +0 -5
  85. package/dist/liquidjs-tools/liquidjs-utils.js +0 -22
  86. package/dist/liquidjs-tools/liquidjs-utils.js.map +0 -1
  87. package/dist/liquidjs-tools/render-clone/collection.d.ts +0 -1
  88. package/dist/liquidjs-tools/render-clone/collection.js +0 -18
  89. package/dist/liquidjs-tools/render-clone/collection.js.map +0 -1
  90. package/dist/liquidjs-tools/render-clone/forloop-drop.d.ts +0 -15
  91. package/dist/liquidjs-tools/render-clone/forloop-drop.js +0 -40
  92. package/dist/liquidjs-tools/render-clone/forloop-drop.js.map +0 -1
  93. package/dist/liquidjs-tools/render-clone/render.d.ts +0 -13
  94. package/dist/liquidjs-tools/render-clone/render.js +0 -108
  95. package/dist/liquidjs-tools/render-clone/render.js.map +0 -1
  96. package/dist/maintenance/maintenance-task.d.ts +0 -4
  97. package/dist/maintenance/maintenance-task.js +0 -27
  98. package/dist/maintenance/maintenance-task.js.map +0 -1
  99. package/dist/maintenance/shutdown.d.ts +0 -7
  100. package/dist/maintenance/shutdown.js +0 -51
  101. package/dist/maintenance/shutdown.js.map +0 -1
  102. package/dist/modules/app.controller.d.ts +0 -5
  103. package/dist/modules/app.controller.js +0 -89
  104. package/dist/modules/app.controller.js.map +0 -1
  105. package/dist/modules/app.module.d.ts +0 -2
  106. package/dist/modules/app.module.js +0 -48
  107. package/dist/modules/app.module.js.map +0 -1
  108. package/dist/modules/core/account/account.model.d.ts +0 -18
  109. package/dist/modules/core/account/account.model.js +0 -59
  110. package/dist/modules/core/account/account.model.js.map +0 -1
  111. package/dist/modules/core/account/account.module.d.ts +0 -2
  112. package/dist/modules/core/account/account.module.js +0 -20
  113. package/dist/modules/core/account/account.module.js.map +0 -1
  114. package/dist/modules/core/account/account.queries.d.ts +0 -18
  115. package/dist/modules/core/account/account.queries.js +0 -150
  116. package/dist/modules/core/account/account.queries.js.map +0 -1
  117. package/dist/modules/core/account/account.resolver.d.ts +0 -11
  118. package/dist/modules/core/account/account.resolver.js +0 -107
  119. package/dist/modules/core/account/account.resolver.js.map +0 -1
  120. package/dist/modules/core/account/account.schema.d.ts +0 -24
  121. package/dist/modules/core/account/account.schema.js +0 -114
  122. package/dist/modules/core/account/account.schema.js.map +0 -1
  123. package/dist/modules/core/account-auth/account-auth.module.d.ts +0 -2
  124. package/dist/modules/core/account-auth/account-auth.module.js +0 -24
  125. package/dist/modules/core/account-auth/account-auth.module.js.map +0 -1
  126. package/dist/modules/core/account-auth/account-auth.service.d.ts +0 -5
  127. package/dist/modules/core/account-auth/account-auth.service.js +0 -41
  128. package/dist/modules/core/account-auth/account-auth.service.js.map +0 -1
  129. package/dist/modules/core/account-auth/account-auth.strategy.d.ts +0 -10
  130. package/dist/modules/core/account-auth/account-auth.strategy.js +0 -49
  131. package/dist/modules/core/account-auth/account-auth.strategy.js.map +0 -1
  132. package/dist/modules/core/auth/auth.module.d.ts +0 -2
  133. package/dist/modules/core/auth/auth.module.js +0 -35
  134. package/dist/modules/core/auth/auth.module.js.map +0 -1
  135. package/dist/modules/core/auth/auth.service.d.ts +0 -11
  136. package/dist/modules/core/auth/auth.service.js +0 -164
  137. package/dist/modules/core/auth/auth.service.js.map +0 -1
  138. package/dist/modules/core/auth/auth.types.d.ts +0 -27
  139. package/dist/modules/core/auth/auth.types.js +0 -3
  140. package/dist/modules/core/auth/auth.types.js.map +0 -1
  141. package/dist/modules/core/auth/jwt.auth.guard.d.ts +0 -6
  142. package/dist/modules/core/auth/jwt.auth.guard.js +0 -23
  143. package/dist/modules/core/auth/jwt.auth.guard.js.map +0 -1
  144. package/dist/modules/core/auth/jwt.strategy.d.ts +0 -10
  145. package/dist/modules/core/auth/jwt.strategy.js +0 -35
  146. package/dist/modules/core/auth/jwt.strategy.js.map +0 -1
  147. package/dist/modules/core/backup/backup.controller.d.ts +0 -7
  148. package/dist/modules/core/backup/backup.controller.js +0 -61
  149. package/dist/modules/core/backup/backup.controller.js.map +0 -1
  150. package/dist/modules/core/backup/backup.module.d.ts +0 -2
  151. package/dist/modules/core/backup/backup.module.js +0 -22
  152. package/dist/modules/core/backup/backup.module.js.map +0 -1
  153. package/dist/modules/core/backup/backup.resolver.d.ts +0 -8
  154. package/dist/modules/core/backup/backup.resolver.js +0 -54
  155. package/dist/modules/core/backup/backup.resolver.js.map +0 -1
  156. package/dist/modules/core/backup/backup.shema.d.ts +0 -4
  157. package/dist/modules/core/backup/backup.shema.js +0 -30
  158. package/dist/modules/core/backup/backup.shema.js.map +0 -1
  159. package/dist/modules/core/core.module.d.ts +0 -2
  160. package/dist/modules/core/core.module.js +0 -50
  161. package/dist/modules/core/core.module.js.map +0 -1
  162. package/dist/modules/core/document/document.helper.d.ts +0 -2
  163. package/dist/modules/core/document/document.helper.js +0 -10
  164. package/dist/modules/core/document/document.helper.js.map +0 -1
  165. package/dist/modules/core/document/document.model.d.ts +0 -9
  166. package/dist/modules/core/document/document.model.js +0 -59
  167. package/dist/modules/core/document/document.model.js.map +0 -1
  168. package/dist/modules/core/document/document.module.d.ts +0 -2
  169. package/dist/modules/core/document/document.module.js +0 -25
  170. package/dist/modules/core/document/document.module.js.map +0 -1
  171. package/dist/modules/core/document/document.resolver.d.ts +0 -12
  172. package/dist/modules/core/document/document.resolver.extend.d.ts +0 -10
  173. package/dist/modules/core/document/document.resolver.extend.js +0 -69
  174. package/dist/modules/core/document/document.resolver.extend.js.map +0 -1
  175. package/dist/modules/core/document/document.resolver.js +0 -154
  176. package/dist/modules/core/document/document.resolver.js.map +0 -1
  177. package/dist/modules/core/document/document.schema.d.ts +0 -39
  178. package/dist/modules/core/document/document.schema.js +0 -181
  179. package/dist/modules/core/document/document.schema.js.map +0 -1
  180. package/dist/modules/core/document/load-documents.queries.d.ts +0 -17
  181. package/dist/modules/core/document/load-documents.queries.js +0 -119
  182. package/dist/modules/core/document/load-documents.queries.js.map +0 -1
  183. package/dist/modules/core/document/save-documents.queries.d.ts +0 -18
  184. package/dist/modules/core/document/save-documents.queries.js +0 -199
  185. package/dist/modules/core/document/save-documents.queries.js.map +0 -1
  186. package/dist/modules/core/fields/_fields.helpers.d.ts +0 -2
  187. package/dist/modules/core/fields/_fields.helpers.js +0 -12
  188. package/dist/modules/core/fields/_fields.helpers.js.map +0 -1
  189. package/dist/modules/core/fields/fields.model.d.ts +0 -17
  190. package/dist/modules/core/fields/fields.model.js +0 -99
  191. package/dist/modules/core/fields/fields.model.js.map +0 -1
  192. package/dist/modules/core/fields/fields.module.d.ts +0 -2
  193. package/dist/modules/core/fields/fields.module.js +0 -20
  194. package/dist/modules/core/fields/fields.module.js.map +0 -1
  195. package/dist/modules/core/fields/fields.resolver.d.ts +0 -14
  196. package/dist/modules/core/fields/fields.resolver.js +0 -165
  197. package/dist/modules/core/fields/fields.resolver.js.map +0 -1
  198. package/dist/modules/core/fields/load-fields.queries.d.ts +0 -20
  199. package/dist/modules/core/fields/load-fields.queries.js +0 -233
  200. package/dist/modules/core/fields/load-fields.queries.js.map +0 -1
  201. package/dist/modules/core/fields/quill-delta.d.ts +0 -1
  202. package/dist/modules/core/fields/quill-delta.js +0 -40
  203. package/dist/modules/core/fields/quill-delta.js.map +0 -1
  204. package/dist/modules/core/fields/save-fields.queries.d.ts +0 -9
  205. package/dist/modules/core/fields/save-fields.queries.js +0 -135
  206. package/dist/modules/core/fields/save-fields.queries.js.map +0 -1
  207. package/dist/modules/core/leaf/leaf.model.d.ts +0 -9
  208. package/dist/modules/core/leaf/leaf.model.js +0 -61
  209. package/dist/modules/core/leaf/leaf.model.js.map +0 -1
  210. package/dist/modules/core/leaf/leaf.module.d.ts +0 -2
  211. package/dist/modules/core/leaf/leaf.module.js +0 -21
  212. package/dist/modules/core/leaf/leaf.module.js.map +0 -1
  213. package/dist/modules/core/leaf/leaf.queries.d.ts +0 -21
  214. package/dist/modules/core/leaf/leaf.queries.js +0 -159
  215. package/dist/modules/core/leaf/leaf.queries.js.map +0 -1
  216. package/dist/modules/core/leaf/leaf.resolver.d.ts +0 -9
  217. package/dist/modules/core/leaf/leaf.resolver.extend.d.ts +0 -6
  218. package/dist/modules/core/leaf/leaf.resolver.extend.js +0 -42
  219. package/dist/modules/core/leaf/leaf.resolver.extend.js.map +0 -1
  220. package/dist/modules/core/leaf/leaf.resolver.js +0 -84
  221. package/dist/modules/core/leaf/leaf.resolver.js.map +0 -1
  222. package/dist/modules/core/leaf/leaf.schema.d.ts +0 -7
  223. package/dist/modules/core/leaf/leaf.schema.js +0 -45
  224. package/dist/modules/core/leaf/leaf.schema.js.map +0 -1
  225. package/dist/modules/core/leaf-item/leaf-item.model.d.ts +0 -6
  226. package/dist/modules/core/leaf-item/leaf-item.model.js +0 -44
  227. package/dist/modules/core/leaf-item/leaf-item.model.js.map +0 -1
  228. package/dist/modules/core/leaf-item/leaf-item.queries.d.ts +0 -9
  229. package/dist/modules/core/leaf-item/leaf-item.queries.js +0 -120
  230. package/dist/modules/core/leaf-item/leaf-item.queries.js.map +0 -1
  231. package/dist/modules/core/login/login.controller.d.ts +0 -8
  232. package/dist/modules/core/login/login.controller.js +0 -54
  233. package/dist/modules/core/login/login.controller.js.map +0 -1
  234. package/dist/modules/core/login/login.module.d.ts +0 -2
  235. package/dist/modules/core/login/login.module.js +0 -22
  236. package/dist/modules/core/login/login.module.js.map +0 -1
  237. package/dist/modules/core/media/media-upload.controller.d.ts +0 -21
  238. package/dist/modules/core/media/media-upload.controller.js +0 -160
  239. package/dist/modules/core/media/media-upload.controller.js.map +0 -1
  240. package/dist/modules/core/media/media.d.ts +0 -22
  241. package/dist/modules/core/media/media.js +0 -53
  242. package/dist/modules/core/media/media.js.map +0 -1
  243. package/dist/modules/core/media/media.module.d.ts +0 -2
  244. package/dist/modules/core/media/media.module.js +0 -22
  245. package/dist/modules/core/media/media.module.js.map +0 -1
  246. package/dist/modules/core/media/media.resolver.d.ts +0 -14
  247. package/dist/modules/core/media/media.resolver.js +0 -199
  248. package/dist/modules/core/media/media.resolver.js.map +0 -1
  249. package/dist/modules/core/media/media.schema.d.ts +0 -30
  250. package/dist/modules/core/media/media.schema.js +0 -144
  251. package/dist/modules/core/media/media.schema.js.map +0 -1
  252. package/dist/modules/core/part/part.module.d.ts +0 -2
  253. package/dist/modules/core/part/part.module.js +0 -21
  254. package/dist/modules/core/part/part.module.js.map +0 -1
  255. package/dist/modules/core/part/part.queries.d.ts +0 -22
  256. package/dist/modules/core/part/part.queries.js +0 -167
  257. package/dist/modules/core/part/part.queries.js.map +0 -1
  258. package/dist/modules/core/part/part.resolver.d.ts +0 -14
  259. package/dist/modules/core/part/part.resolver.extend.d.ts +0 -5
  260. package/dist/modules/core/part/part.resolver.extend.js +0 -49
  261. package/dist/modules/core/part/part.resolver.extend.js.map +0 -1
  262. package/dist/modules/core/part/part.resolver.js +0 -135
  263. package/dist/modules/core/part/part.resolver.js.map +0 -1
  264. package/dist/modules/core/part/part.schema.d.ts +0 -12
  265. package/dist/modules/core/part/part.schema.js +0 -66
  266. package/dist/modules/core/part/part.schema.js.map +0 -1
  267. package/dist/modules/core/section/section-wrap.resolver.d.ts +0 -11
  268. package/dist/modules/core/section/section-wrap.resolver.js +0 -168
  269. package/dist/modules/core/section/section-wrap.resolver.js.map +0 -1
  270. package/dist/modules/core/section/section.model.d.ts +0 -6
  271. package/dist/modules/core/section/section.model.js +0 -44
  272. package/dist/modules/core/section/section.model.js.map +0 -1
  273. package/dist/modules/core/section/section.module.d.ts +0 -2
  274. package/dist/modules/core/section/section.module.js +0 -21
  275. package/dist/modules/core/section/section.module.js.map +0 -1
  276. package/dist/modules/core/section/section.queries.d.ts +0 -51
  277. package/dist/modules/core/section/section.queries.js +0 -228
  278. package/dist/modules/core/section/section.queries.js.map +0 -1
  279. package/dist/modules/core/section/section.resolver.d.ts +0 -7
  280. package/dist/modules/core/section/section.resolver.js +0 -78
  281. package/dist/modules/core/section/section.resolver.js.map +0 -1
  282. package/dist/modules/core/section/section.schema.d.ts +0 -27
  283. package/dist/modules/core/section/section.schema.js +0 -129
  284. package/dist/modules/core/section/section.schema.js.map +0 -1
  285. package/dist/modules/core/site-info/site-info.module.d.ts +0 -2
  286. package/dist/modules/core/site-info/site-info.module.js +0 -20
  287. package/dist/modules/core/site-info/site-info.module.js.map +0 -1
  288. package/dist/modules/core/site-info/site-info.resolver.d.ts +0 -5
  289. package/dist/modules/core/site-info/site-info.resolver.js +0 -44
  290. package/dist/modules/core/site-info/site-info.resolver.js.map +0 -1
  291. package/dist/modules/core/site-info/site-info.schema.d.ts +0 -6
  292. package/dist/modules/core/site-info/site-info.schema.js +0 -36
  293. package/dist/modules/core/site-info/site-info.schema.js.map +0 -1
  294. package/dist/modules/core/site-schema/site-schema.module.d.ts +0 -2
  295. package/dist/modules/core/site-schema/site-schema.module.js +0 -20
  296. package/dist/modules/core/site-schema/site-schema.module.js.map +0 -1
  297. package/dist/modules/core/site-schema/site-schema.resolver.d.ts +0 -4
  298. package/dist/modules/core/site-schema/site-schema.resolver.js +0 -35
  299. package/dist/modules/core/site-schema/site-schema.resolver.js.map +0 -1
  300. package/dist/modules/core/term-flag/term-flag.model.d.ts +0 -6
  301. package/dist/modules/core/term-flag/term-flag.model.js +0 -45
  302. package/dist/modules/core/term-flag/term-flag.model.js.map +0 -1
  303. package/dist/modules/core/term-flag/term-flag.module.d.ts +0 -2
  304. package/dist/modules/core/term-flag/term-flag.module.js +0 -20
  305. package/dist/modules/core/term-flag/term-flag.module.js.map +0 -1
  306. package/dist/modules/core/term-flag/term-flag.queries.d.ts +0 -7
  307. package/dist/modules/core/term-flag/term-flag.queries.js +0 -44
  308. package/dist/modules/core/term-flag/term-flag.queries.js.map +0 -1
  309. package/dist/modules/core/term-flag/term-flag.resolver.d.ts +0 -5
  310. package/dist/modules/core/term-flag/term-flag.resolver.js +0 -47
  311. package/dist/modules/core/term-flag/term-flag.resolver.js.map +0 -1
  312. package/dist/modules/core/term-flag/term-flag.schema.d.ts +0 -9
  313. package/dist/modules/core/term-flag/term-flag.schema.js +0 -51
  314. package/dist/modules/core/term-flag/term-flag.schema.js.map +0 -1
  315. package/dist/modules/core/unprotected/unprotected.module.d.ts +0 -2
  316. package/dist/modules/core/unprotected/unprotected.module.js +0 -20
  317. package/dist/modules/core/unprotected/unprotected.module.js.map +0 -1
  318. package/dist/modules/core/unprotected/unprotected.resolver.d.ts +0 -8
  319. package/dist/modules/core/unprotected/unprotected.resolver.js +0 -106
  320. package/dist/modules/core/unprotected/unprotected.resolver.js.map +0 -1
  321. package/dist/modules/core/unprotected/unprotected.schema.d.ts +0 -19
  322. package/dist/modules/core/unprotected/unprotected.schema.js +0 -93
  323. package/dist/modules/core/unprotected/unprotected.schema.js.map +0 -1
  324. package/dist/modules/graphql.types.d.ts +0 -6
  325. package/dist/modules/graphql.types.js +0 -3
  326. package/dist/modules/graphql.types.js.map +0 -1
  327. package/dist/modules/private-api.module.d.ts +0 -2
  328. package/dist/modules/private-api.module.js +0 -50
  329. package/dist/modules/private-api.module.js.map +0 -1
  330. package/dist/modules/public-api/class-validator-options.d.ts +0 -7
  331. package/dist/modules/public-api/class-validator-options.js +0 -11
  332. package/dist/modules/public-api/class-validator-options.js.map +0 -1
  333. package/dist/modules/public-api/mail/contact-form-mail.d.ts +0 -8
  334. package/dist/modules/public-api/mail/contact-form-mail.js +0 -96
  335. package/dist/modules/public-api/mail/contact-form-mail.js.map +0 -1
  336. package/dist/modules/public-api/mail/mail.dto.d.ts +0 -8
  337. package/dist/modules/public-api/mail/mail.dto.js +0 -56
  338. package/dist/modules/public-api/mail/mail.dto.js.map +0 -1
  339. package/dist/modules/public-api/partials/partials-params.dto.d.ts +0 -6
  340. package/dist/modules/public-api/partials/partials-params.dto.js +0 -45
  341. package/dist/modules/public-api/partials/partials-params.dto.js.map +0 -1
  342. package/dist/modules/public-api/password-reset/password-reset.controller.d.ts +0 -11
  343. package/dist/modules/public-api/password-reset/password-reset.controller.js +0 -59
  344. package/dist/modules/public-api/password-reset/password-reset.controller.js.map +0 -1
  345. package/dist/modules/public-api/password-reset/password-reset.dto.d.ts +0 -9
  346. package/dist/modules/public-api/password-reset/password-reset.dto.js +0 -55
  347. package/dist/modules/public-api/password-reset/password-reset.dto.js.map +0 -1
  348. package/dist/modules/public-api/password-reset/password-reset.module.d.ts +0 -2
  349. package/dist/modules/public-api/password-reset/password-reset.module.js +0 -22
  350. package/dist/modules/public-api/password-reset/password-reset.module.js.map +0 -1
  351. package/dist/modules/public-api/password-reset/password-reset.service.d.ts +0 -14
  352. package/dist/modules/public-api/password-reset/password-reset.service.js +0 -56
  353. package/dist/modules/public-api/password-reset/password-reset.service.js.map +0 -1
  354. package/dist/modules/public-api/public-api-controller.d.ts +0 -32
  355. package/dist/modules/public-api/public-api-controller.js +0 -198
  356. package/dist/modules/public-api/public-api-controller.js.map +0 -1
  357. package/dist/modules/public-api/public-api.module.d.ts +0 -2
  358. package/dist/modules/public-api/public-api.module.js +0 -22
  359. package/dist/modules/public-api/public-api.module.js.map +0 -1
  360. package/dist/modules/public-api/search-text/search-text.dto.d.ts +0 -7
  361. package/dist/modules/public-api/search-text/search-text.dto.js +0 -50
  362. package/dist/modules/public-api/search-text/search-text.dto.js.map +0 -1
  363. package/dist/modules/public-api/search-text/search-text.queries.d.ts +0 -14
  364. package/dist/modules/public-api/search-text/search-text.queries.js +0 -58
  365. package/dist/modules/public-api/search-text/search-text.queries.js.map +0 -1
  366. package/dist/modules/public-site/app-exception-filter.d.ts +0 -4
  367. package/dist/modules/public-site/app-exception-filter.js +0 -41
  368. package/dist/modules/public-site/app-exception-filter.js.map +0 -1
  369. package/dist/modules/public-site/helpers/format-date.helper.d.ts +0 -4
  370. package/dist/modules/public-site/helpers/format-date.helper.js +0 -35
  371. package/dist/modules/public-site/helpers/format-date.helper.js.map +0 -1
  372. package/dist/modules/public-site/helpers/medias.helpers.d.ts +0 -3
  373. package/dist/modules/public-site/helpers/medias.helpers.js +0 -16
  374. package/dist/modules/public-site/helpers/medias.helpers.js.map +0 -1
  375. package/dist/modules/public-site/helpers/obfuscate.helper.d.ts +0 -2
  376. package/dist/modules/public-site/helpers/obfuscate.helper.js +0 -27
  377. package/dist/modules/public-site/helpers/obfuscate.helper.js.map +0 -1
  378. package/dist/modules/public-site/liquidjs-filters/format-date.d.ts +0 -7
  379. package/dist/modules/public-site/liquidjs-filters/format-date.js +0 -15
  380. package/dist/modules/public-site/liquidjs-filters/format-date.js.map +0 -1
  381. package/dist/modules/public-site/liquidjs-filters/format-number.d.ts +0 -6
  382. package/dist/modules/public-site/liquidjs-filters/format-number.js +0 -17
  383. package/dist/modules/public-site/liquidjs-filters/format-number.js.map +0 -1
  384. package/dist/modules/public-site/liquidjs-filters/info-filter.d.ts +0 -1
  385. package/dist/modules/public-site/liquidjs-filters/info-filter.js +0 -144
  386. package/dist/modules/public-site/liquidjs-filters/info-filter.js.map +0 -1
  387. package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.d.ts +0 -1
  388. package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js +0 -40
  389. package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js.map +0 -1
  390. package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.d.ts +0 -6
  391. package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js +0 -25
  392. package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js.map +0 -1
  393. package/dist/modules/public-site/liquidjs-filters/make-excerpt.d.ts +0 -3
  394. package/dist/modules/public-site/liquidjs-filters/make-excerpt.js +0 -10
  395. package/dist/modules/public-site/liquidjs-filters/make-excerpt.js.map +0 -1
  396. package/dist/modules/public-site/liquidjs-filters/obfuscate.d.ts +0 -2
  397. package/dist/modules/public-site/liquidjs-filters/obfuscate.js +0 -18
  398. package/dist/modules/public-site/liquidjs-filters/obfuscate.js.map +0 -1
  399. package/dist/modules/public-site/liquidjs-filters/open-graph-filter.d.ts +0 -6
  400. package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js +0 -41
  401. package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js.map +0 -1
  402. package/dist/modules/public-site/liquidjs-filters/translate-filter.d.ts +0 -7
  403. package/dist/modules/public-site/liquidjs-filters/translate-filter.js +0 -23
  404. package/dist/modules/public-site/liquidjs-filters/translate-filter.js.map +0 -1
  405. package/dist/modules/public-site/liquidjs-tags/get-page-tag.d.ts +0 -13
  406. package/dist/modules/public-site/liquidjs-tags/get-page-tag.js +0 -69
  407. package/dist/modules/public-site/liquidjs-tags/get-page-tag.js.map +0 -1
  408. package/dist/modules/public-site/liquidjs-tags/get-pages-tag.d.ts +0 -13
  409. package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js +0 -95
  410. package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js.map +0 -1
  411. package/dist/modules/public-site/liquidjs-tags/use-image-tag.d.ts +0 -13
  412. package/dist/modules/public-site/liquidjs-tags/use-image-tag.js +0 -54
  413. package/dist/modules/public-site/liquidjs-tags/use-image-tag.js.map +0 -1
  414. package/dist/modules/public-site/media-serve/_media-serve-helpers.d.ts +0 -11
  415. package/dist/modules/public-site/media-serve/_media-serve-helpers.js +0 -26
  416. package/dist/modules/public-site/media-serve/_media-serve-helpers.js.map +0 -1
  417. package/dist/modules/public-site/media-serve/media-serve.controller.d.ts +0 -4
  418. package/dist/modules/public-site/media-serve/media-serve.controller.js +0 -140
  419. package/dist/modules/public-site/media-serve/media-serve.controller.js.map +0 -1
  420. package/dist/modules/public-site/media-serve/media-serve.module.d.ts +0 -2
  421. package/dist/modules/public-site/media-serve/media-serve.module.js +0 -20
  422. package/dist/modules/public-site/media-serve/media-serve.module.js.map +0 -1
  423. package/dist/modules/public-site/oauth2-client.controller.d.ts +0 -10
  424. package/dist/modules/public-site/oauth2-client.controller.js +0 -144
  425. package/dist/modules/public-site/oauth2-client.controller.js.map +0 -1
  426. package/dist/modules/public-site/public-route/make-url.d.ts +0 -11
  427. package/dist/modules/public-site/public-route/make-url.js +0 -150
  428. package/dist/modules/public-site/public-route/make-url.js.map +0 -1
  429. package/dist/modules/public-site/public-route/public-route-parser.d.ts +0 -16
  430. package/dist/modules/public-site/public-route/public-route-parser.js +0 -154
  431. package/dist/modules/public-site/public-route/public-route-parser.js.map +0 -1
  432. package/dist/modules/public-site/public-route/raw-document-payload.d.ts +0 -8
  433. package/dist/modules/public-site/public-route/raw-document-payload.js +0 -86
  434. package/dist/modules/public-site/public-route/raw-document-payload.js.map +0 -1
  435. package/dist/modules/public-site/public-site.controller.d.ts +0 -7
  436. package/dist/modules/public-site/public-site.controller.js +0 -58
  437. package/dist/modules/public-site/public-site.controller.js.map +0 -1
  438. package/dist/modules/public-site/public-site.middleware.d.ts +0 -5
  439. package/dist/modules/public-site/public-site.middleware.js +0 -67
  440. package/dist/modules/public-site/public-site.middleware.js.map +0 -1
  441. package/dist/modules/public-site/public-site.module.d.ts +0 -4
  442. package/dist/modules/public-site/public-site.module.js +0 -27
  443. package/dist/modules/public-site/public-site.module.js.map +0 -1
  444. package/dist/modules/public-site/serve-document/serve-document.d.ts +0 -20
  445. package/dist/modules/public-site/serve-document/serve-document.js +0 -60
  446. package/dist/modules/public-site/serve-document/serve-document.js.map +0 -1
  447. package/dist/modules/security/app-throttler-guard.d.ts +0 -8
  448. package/dist/modules/security/app-throttler-guard.js +0 -18
  449. package/dist/modules/security/app-throttler-guard.js.map +0 -1
  450. package/dist/modules/security/complexity-plugin.d.ts +0 -8
  451. package/dist/modules/security/complexity-plugin.js +0 -46
  452. package/dist/modules/security/complexity-plugin.js.map +0 -1
  453. package/dist/nest-custom-logger.d.ts +0 -8
  454. package/dist/nest-custom-logger.js +0 -23
  455. package/dist/nest-custom-logger.js.map +0 -1
  456. package/dist/public-payload/breadcrumb.queries.d.ts +0 -5
  457. package/dist/public-payload/breadcrumb.queries.js +0 -26
  458. package/dist/public-payload/breadcrumb.queries.js.map +0 -1
  459. package/dist/public-payload/create-page-drop.d.ts +0 -11
  460. package/dist/public-payload/create-page-drop.js +0 -160
  461. package/dist/public-payload/create-page-drop.js.map +0 -1
  462. package/dist/public-payload/create-page-part-drop.d.ts +0 -7
  463. package/dist/public-payload/create-page-part-drop.js +0 -39
  464. package/dist/public-payload/create-page-part-drop.js.map +0 -1
  465. package/dist/public-payload/excerpt.queries.d.ts +0 -10
  466. package/dist/public-payload/excerpt.queries.js +0 -38
  467. package/dist/public-payload/excerpt.queries.js.map +0 -1
  468. package/dist/public-payload/field-values.d.ts +0 -9
  469. package/dist/public-payload/field-values.js +0 -99
  470. package/dist/public-payload/field-values.js.map +0 -1
  471. package/dist/public-payload/get-siblings.queries.d.ts +0 -5
  472. package/dist/public-payload/get-siblings.queries.js +0 -117
  473. package/dist/public-payload/get-siblings.queries.js.map +0 -1
  474. package/dist/public-payload/load-default-image.d.ts +0 -8
  475. package/dist/public-payload/load-default-image.js +0 -52
  476. package/dist/public-payload/load-default-image.js.map +0 -1
  477. package/dist/public-payload/make-basic-payload.d.ts +0 -6
  478. package/dist/public-payload/make-basic-payload.js +0 -19
  479. package/dist/public-payload/make-basic-payload.js.map +0 -1
  480. package/dist/public-payload/make-image-available.d.ts +0 -26
  481. package/dist/public-payload/make-image-available.js +0 -38
  482. package/dist/public-payload/make-image-available.js.map +0 -1
  483. package/dist/public-payload/page-values.queries.d.ts +0 -27
  484. package/dist/public-payload/page-values.queries.js +0 -110
  485. package/dist/public-payload/page-values.queries.js.map +0 -1
  486. package/dist/public-payload/parts.queries.d.ts +0 -6
  487. package/dist/public-payload/parts.queries.js +0 -123
  488. package/dist/public-payload/parts.queries.js.map +0 -1
  489. package/dist/public-payload/public-payload.types.d.ts +0 -130
  490. package/dist/public-payload/public-payload.types.js +0 -3
  491. package/dist/public-payload/public-payload.types.js.map +0 -1
  492. package/dist/public-payload/site-payload.d.ts +0 -4
  493. package/dist/public-payload/site-payload.js +0 -43
  494. package/dist/public-payload/site-payload.js.map +0 -1
  495. package/dist/public-payload/taxonomies.queries.d.ts +0 -13
  496. package/dist/public-payload/taxonomies.queries.js +0 -45
  497. package/dist/public-payload/taxonomies.queries.js.map +0 -1
  498. package/dist/public-payload/translations.queries.d.ts +0 -7
  499. package/dist/public-payload/translations.queries.js +0 -62
  500. package/dist/public-payload/translations.queries.js.map +0 -1
  501. package/dist/public.types.d.ts +0 -5
  502. package/dist/public.types.js +0 -3
  503. package/dist/public.types.js.map +0 -1
  504. package/dist/share/pino-app-log.d.ts +0 -26
  505. package/dist/share/pino-app-log.js +0 -138
  506. package/dist/share/pino-app-log.js.map +0 -1
  507. package/dist/share/read-configuration.d.ts +0 -7
  508. package/dist/share/read-configuration.js +0 -31
  509. package/dist/share/read-configuration.js.map +0 -1
  510. package/dist/site-backup/archiver.helper.d.ts +0 -12
  511. package/dist/site-backup/archiver.helper.js +0 -43
  512. package/dist/site-backup/archiver.helper.js.map +0 -1
  513. package/dist/site-backup/backup-tasks.d.ts +0 -10
  514. package/dist/site-backup/backup-tasks.js +0 -50
  515. package/dist/site-backup/backup-tasks.js.map +0 -1
  516. package/dist/site-backup/backup.d.ts +0 -11
  517. package/dist/site-backup/backup.helper.d.ts +0 -3
  518. package/dist/site-backup/backup.helper.js +0 -13
  519. package/dist/site-backup/backup.helper.js.map +0 -1
  520. package/dist/site-backup/backup.js +0 -35
  521. package/dist/site-backup/backup.js.map +0 -1
  522. package/dist/site-context/create-site-context.d.ts +0 -3
  523. package/dist/site-context/create-site-context.js +0 -183
  524. package/dist/site-context/create-site-context.js.map +0 -1
  525. package/dist/site-context/db-init/db-init.d.ts +0 -11
  526. package/dist/site-context/db-init/db-init.js +0 -38
  527. package/dist/site-context/db-init/db-init.js.map +0 -1
  528. package/dist/site-context/db-init/ddl-migration.d.ts +0 -13
  529. package/dist/site-context/db-init/ddl-migration.js +0 -26
  530. package/dist/site-context/db-init/ddl-migration.js.map +0 -1
  531. package/dist/site-context/db-init/init-routing-points.d.ts +0 -5
  532. package/dist/site-context/db-init/init-routing-points.js +0 -149
  533. package/dist/site-context/db-init/init-routing-points.js.map +0 -1
  534. package/dist/site-context/site-conf.d.ts +0 -17
  535. package/dist/site-context/site-conf.js +0 -103
  536. package/dist/site-context/site-conf.js.map +0 -1
  537. package/dist/site-context/site-context.d.ts +0 -12
  538. package/dist/site-context/site-context.js +0 -87
  539. package/dist/site-context/site-context.js.map +0 -1
  540. package/dist/site-context/site-context.types.d.ts +0 -46
  541. package/dist/site-context/site-context.types.js +0 -3
  542. package/dist/site-context/site-context.types.js.map +0 -1
  543. package/dist/site-context/theme-conf-reader.d.ts +0 -4
  544. package/dist/site-context/theme-conf-reader.js +0 -33
  545. package/dist/site-context/theme-conf-reader.js.map +0 -1
  546. package/dist/site-context/theme-conf-types.d.ts +0 -4
  547. package/dist/site-context/theme-conf-types.js +0 -3
  548. package/dist/site-context/theme-conf-types.js.map +0 -1
  549. package/dist/site-schema/common-schema-reader.d.ts +0 -6
  550. package/dist/site-schema/common-schema-reader.js +0 -29
  551. package/dist/site-schema/common-schema-reader.js.map +0 -1
  552. package/dist/site-schema/merged-schema-lib.d.ts +0 -30
  553. package/dist/site-schema/merged-schema-lib.js +0 -118
  554. package/dist/site-schema/merged-schema-lib.js.map +0 -1
  555. package/dist/site-schema/read-locales.d.ts +0 -24
  556. package/dist/site-schema/read-locales.js +0 -171
  557. package/dist/site-schema/read-locales.js.map +0 -1
  558. package/dist/site-schema/site-schema-factory.d.ts +0 -2
  559. package/dist/site-schema/site-schema-factory.js +0 -385
  560. package/dist/site-schema/site-schema-factory.js.map +0 -1
  561. package/dist/site-schema/site-schema-helpers.d.ts +0 -5
  562. package/dist/site-schema/site-schema-helpers.js +0 -27
  563. package/dist/site-schema/site-schema-helpers.js.map +0 -1
  564. package/dist/site-schema/site-schema-lib-reader.d.ts +0 -14
  565. package/dist/site-schema/site-schema-lib-reader.js +0 -48
  566. package/dist/site-schema/site-schema-lib-reader.js.map +0 -1
  567. package/dist/start.d.ts +0 -1
  568. package/dist/start.js +0 -5
  569. package/dist/start.js.map +0 -1
  570. package/dist/types.to.json +0 -1
@@ -1,37 +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
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.comparePassword = exports.hashPassword = void 0;
27
- const bcrypt = __importStar(require("bcrypt"));
28
- const salt = 10;
29
- async function hashPassword(password) {
30
- return await bcrypt.hash(password, salt);
31
- }
32
- exports.hashPassword = hashPassword;
33
- async function comparePassword(password, passwordHash) {
34
- return await bcrypt.compare(password, passwordHash);
35
- }
36
- exports.comparePassword = comparePassword;
37
- //# sourceMappingURL=passwordEncrypt-helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"passwordEncrypt-helper.js","sourceRoot":"","sources":["../../src/helpers/passwordEncrypt-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AAEjC,MAAM,IAAI,GAAG,EAAE,CAAC;AAET,KAAK,UAAU,YAAY,CAAC,QAAgB;IACjD,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC;AAFD,oCAEC;AAEM,KAAK,UAAU,eAAe,CAAC,QAAgB,EAAE,YAAoB;IAC1E,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AACtD,CAAC;AAFD,0CAEC"}
@@ -1,10 +0,0 @@
1
- export interface RandomCharsGeneratorConfig {
2
- chars: string;
3
- min: number;
4
- max: number;
5
- }
6
- export declare function makeDefaultRelativeId({ smallAlphabet, bigAlphabet, size, }?: {
7
- smallAlphabet?: string | undefined;
8
- bigAlphabet?: string | undefined;
9
- size?: number | undefined;
10
- }): string;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeDefaultRelativeId = void 0;
4
- function makeDefaultRelativeId({ smallAlphabet = "023456789", bigAlphabet = "023456789abcdefghijkmnopqrstuvwxyz", size = 3, } = {}) {
5
- const flags = Array(size);
6
- const maxFlagIndex = size - 1;
7
- while (true) {
8
- const remaining = [];
9
- for (let i = 0; i < size; ++i) {
10
- if (flags[i] === undefined) {
11
- remaining.push(i);
12
- }
13
- }
14
- if (remaining.length === 0)
15
- break;
16
- const remainingIndex = randomInt(0, remaining.length);
17
- const flagIndex = remaining[remainingIndex];
18
- flags[flagIndex] = "b";
19
- if (flagIndex > 0)
20
- flags[flagIndex - 1] = "s";
21
- if (flagIndex < maxFlagIndex)
22
- flags[flagIndex + 1] = "s";
23
- }
24
- const result = [];
25
- for (let i = 0; i < size; ++i) {
26
- result.push(randomCharacterOf(flags[i] === "b" ? bigAlphabet : smallAlphabet));
27
- }
28
- return result.join("");
29
- }
30
- exports.makeDefaultRelativeId = makeDefaultRelativeId;
31
- function randomCharacterOf(alphabet) {
32
- return alphabet[Math.floor(Math.random() * alphabet.length)];
33
- }
34
- function randomInt(min, max) {
35
- return Math.floor(Math.random() * (max - min) + min);
36
- }
37
- //# sourceMappingURL=relative-id-helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"relative-id-helper.js","sourceRoot":"","sources":["../../src/helpers/relative-id-helper.ts"],"names":[],"mappings":";;;AAMA,SAAgB,qBAAqB,CAAC,EACpC,aAAa,GAAG,WAAW,EAC3B,WAAW,GAAG,oCAAoC,EAClD,IAAI,GAAG,CAAC,GACT,GAAG,EAAE;IACJ,MAAM,KAAK,GAA8B,KAAK,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC;IAE9B,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,SAAS,GAAG,EAAE,CAAC;QACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC;YAC9B,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;gBAC3B,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;QACD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;YAAE,MAAM;QAClC,MAAM,cAAc,GAAG,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;QACtD,MAAM,SAAS,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;QAC5C,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC;QACvB,IAAI,SAAS,GAAG,CAAC;YAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;QAC9C,IAAI,SAAS,GAAG,YAAY;YAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;IAC3D,CAAC;IAED,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC;QAC9B,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC;AA5BD,sDA4BC;AAED,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/D,CAAC;AAKD,SAAS,SAAS,CAAC,GAAW,EAAE,GAAW;IACzC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AACvD,CAAC"}
@@ -1,14 +0,0 @@
1
- import { AppLog } from "@paroicms/server-lib";
2
- export interface SimpleTranslator {
3
- translate: (options: SimpleTranslateOptions) => string;
4
- }
5
- export interface SimpleTranslateOptions {
6
- lang: string;
7
- key: string;
8
- args?: (string | number)[];
9
- }
10
- export declare function createSimpleTranslator(options: {
11
- l10nDir: string;
12
- langs: string[];
13
- appLog: Pick<AppLog, "warn">;
14
- }): Promise<SimpleTranslator>;
@@ -1,82 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createSimpleTranslator = void 0;
4
- const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
5
- const promises_1 = require("fs/promises");
6
- const path_1 = require("path");
7
- async function createSimpleTranslator(options) {
8
- const labels = await loadLabels(options);
9
- return {
10
- translate: (options) => translate(labels, options),
11
- };
12
- }
13
- exports.createSimpleTranslator = createSimpleTranslator;
14
- function translate(labels, { args = [], key, lang }) {
15
- let label = labels.get(lang)?.[key] ?? key;
16
- const variables = findVariablesInString(label, args.length);
17
- variables.reverse();
18
- for (const { indexInString, variableName, variableNumber } of variables) {
19
- const value = args[variableNumber - 1];
20
- const before = label.substring(0, indexInString);
21
- const after = label.substring(indexInString + variableName.length);
22
- label = `${before}${value}${after}`;
23
- }
24
- return label;
25
- }
26
- function findVariablesInString(str, max) {
27
- const matches = [];
28
- const regex = /\$[0-9]+/g;
29
- let match;
30
- while (true) {
31
- match = regex.exec(str);
32
- if (!match)
33
- break;
34
- const [variableName] = match;
35
- const variableNumber = (0, data_formatters_lib_1.nbVal)(variableName.substring(1), { varName: variableName });
36
- if (variableNumber <= max) {
37
- matches.push({
38
- variableName,
39
- variableNumber,
40
- indexInString: match.index,
41
- });
42
- }
43
- }
44
- return matches;
45
- }
46
- async function loadLabels({ l10nDir, langs, appLog, }) {
47
- const labels = new Map();
48
- for (const lang of langs) {
49
- let content;
50
- try {
51
- content = await (0, promises_1.readFile)((0, path_1.join)(l10nDir, `${lang}.json`), "utf-8");
52
- }
53
- catch {
54
- continue;
55
- }
56
- try {
57
- labels.set(lang, flattenLocales(JSON.parse(content)));
58
- }
59
- catch {
60
- appLog.warn(`invalid locale file '${(0, path_1.join)(l10nDir, `${lang}.json`)}'`);
61
- }
62
- }
63
- return labels;
64
- }
65
- function flattenLocales(source, prefix = "") {
66
- const result = {};
67
- for (const [key, val] of Object.entries(source)) {
68
- if (val === null)
69
- throw new Error(`invalid null value for '${key}'`);
70
- if (typeof val === "string") {
71
- result[`${prefix}${key}`] = val;
72
- }
73
- else if (typeof val === "object") {
74
- Object.assign(result, flattenLocales(val, `${prefix}${key}.`));
75
- }
76
- else {
77
- throw new Error(`invalid value for '${key}'`);
78
- }
79
- }
80
- return result;
81
- }
82
- //# sourceMappingURL=simple-i18n.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"simple-i18n.js","sourceRoot":"","sources":["../../src/helpers/simple-i18n.ts"],"names":[],"mappings":"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"}
@@ -1,9 +0,0 @@
1
- import { AccountModel } from "../modules/core/account/account.model";
2
- export declare const devAccountId = "dev:0";
3
- export declare function isDevAccountId(id: string): boolean;
4
- export interface ParsedPlatformAdminAccountId {
5
- index: number;
6
- }
7
- export declare function parsePlatformAdminAccountId(id: string): ParsedPlatformAdminAccountId | undefined;
8
- export declare function getDevAccount(id: string): AccountModel;
9
- export declare function getPlatformAdminAccount({ index }: ParsedPlatformAdminAccountId): AccountModel;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPlatformAdminAccount = exports.getDevAccount = exports.parsePlatformAdminAccountId = exports.isDevAccountId = exports.devAccountId = void 0;
4
- const common_1 = require("@nestjs/common");
5
- const context_1 = require("../context");
6
- exports.devAccountId = "dev:0";
7
- function isDevAccountId(id) {
8
- return id === exports.devAccountId;
9
- }
10
- exports.isDevAccountId = isDevAccountId;
11
- function parsePlatformAdminAccountId(id) {
12
- if (!id.startsWith("pladm:"))
13
- return;
14
- return { index: Number(id.substring(6)) };
15
- }
16
- exports.parsePlatformAdminAccountId = parsePlatformAdminAccountId;
17
- function getDevAccount(id) {
18
- const devAccount = context_1.appConf.devAccount;
19
- if (!devAccount || exports.devAccountId !== id) {
20
- throw new common_1.NotFoundException();
21
- }
22
- return {
23
- email: devAccount.email,
24
- id: exports.devAccountId,
25
- name: devAccount.name,
26
- special: "dev",
27
- };
28
- }
29
- exports.getDevAccount = getDevAccount;
30
- function getPlatformAdminAccount({ index }) {
31
- const account = context_1.appConf.platformAdminAccounts?.[index];
32
- if (!account) {
33
- throw new common_1.NotFoundException();
34
- }
35
- return {
36
- id: `pladm:${index}`,
37
- email: account.email,
38
- name: account.name,
39
- special: "platformAdmin",
40
- };
41
- }
42
- exports.getPlatformAdminAccount = getPlatformAdminAccount;
43
- //# sourceMappingURL=special-account.helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"special-account.helpers.js","sourceRoot":"","sources":["../../src/helpers/special-account.helpers.ts"],"names":[],"mappings":";;;AAAA,2CAAmD;AACnD,wCAAqC;AAGxB,QAAA,YAAY,GAAG,OAAO,CAAC;AAEpC,SAAgB,cAAc,CAAC,EAAU;IACvC,OAAO,EAAE,KAAK,oBAAY,CAAC;AAC7B,CAAC;AAFD,wCAEC;AAMD,SAAgB,2BAA2B,CAAC,EAAU;IACpD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO;IACrC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC5C,CAAC;AAHD,kEAGC;AAED,SAAgB,aAAa,CAAC,EAAU;IACtC,MAAM,UAAU,GAAG,iBAAO,CAAC,UAAU,CAAC;IACtC,IAAI,CAAC,UAAU,IAAI,oBAAY,KAAK,EAAE,EAAE,CAAC;QACvC,MAAM,IAAI,0BAAiB,EAAE,CAAC;IAChC,CAAC;IAED,OAAO;QACL,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,EAAE,EAAE,oBAAY;QAChB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC;AAZD,sCAYC;AAED,SAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAgC;IAC7E,MAAM,OAAO,GAAG,iBAAO,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC,CAAC;IACvD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,0BAAiB,EAAE,CAAC;IAChC,CAAC;IAED,OAAO;QACL,EAAE,EAAE,SAAS,KAAK,EAAE;QACpB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO,EAAE,eAAe;KACzB,CAAC;AACJ,CAAC;AAZD,0DAYC"}
@@ -1,2 +0,0 @@
1
- import { SiteConf } from "../site-context/site-conf";
2
- export declare function getBoUrl(siteConf: SiteConf, path?: string): string;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBoUrl = void 0;
4
- const context_1 = require("../context");
5
- function getBoUrl(siteConf, path) {
6
- const { boPublicPort, https } = context_1.appConf.thisServer;
7
- const { fqdn } = siteConf;
8
- const protocol = https ? "https" : "http";
9
- return `${protocol}://${fqdn}${boPublicPort ? `:${boPublicPort}` : ""}${path ?? ""}`;
10
- }
11
- exports.getBoUrl = getBoUrl;
12
- //# sourceMappingURL=url.helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"url.helpers.js","sourceRoot":"","sources":["../../src/helpers/url.helpers.ts"],"names":[],"mappings":";;;AAAA,wCAAqC;AAGrC,SAAgB,QAAQ,CAAC,QAAkB,EAAE,IAAa;IACxD,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,iBAAO,CAAC,UAAU,CAAC;IACnD,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;IAC1B,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,GAAG,QAAQ,MAAM,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,IAAI,EAAE,EAAE,CAAC;AACvF,CAAC;AALD,4BAKC"}
@@ -1,4 +0,0 @@
1
- export declare function toHttpHeaderIfModifiedSince(time: unknown): string;
2
- export declare function mediaTypeToFileExtension(mediaType: string): string;
3
- export declare function pascalCaseToDashed(s: string): string;
4
- export declare function toLeafId(leafOrSectionId: string): string;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toLeafId = exports.pascalCaseToDashed = exports.mediaTypeToFileExtension = exports.toHttpHeaderIfModifiedSince = void 0;
4
- const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
5
- const anywhere_lib_1 = require("@paroicms/anywhere-lib");
6
- function toHttpHeaderIfModifiedSince(time) {
7
- return (0, data_formatters_lib_1.dateVal)(time).toUTCString();
8
- }
9
- exports.toHttpHeaderIfModifiedSince = toHttpHeaderIfModifiedSince;
10
- function mediaTypeToFileExtension(mediaType) {
11
- const regexMatchArray = mediaType.match(/\w+\/([-+.\w]+)/);
12
- if (!regexMatchArray) {
13
- throw new Error("media extension is incorrect.");
14
- }
15
- return regexMatchArray[1];
16
- }
17
- exports.mediaTypeToFileExtension = mediaTypeToFileExtension;
18
- function pascalCaseToDashed(s) {
19
- return s
20
- .replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`)
21
- .replace(/^-+/, "")
22
- .replace(/-+$/, "")
23
- .replace(/--+/g, "-");
24
- }
25
- exports.pascalCaseToDashed = pascalCaseToDashed;
26
- function toLeafId(leafOrSectionId) {
27
- return leafOrSectionId.indexOf(":") !== -1
28
- ? (0, anywhere_lib_1.parseSectionId)(leafOrSectionId).leafId
29
- : leafOrSectionId;
30
- }
31
- exports.toLeafId = toLeafId;
32
- //# sourceMappingURL=utils-helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils-helper.js","sourceRoot":"","sources":["../../src/helpers/utils-helper.ts"],"names":[],"mappings":";;;AAAA,oEAAqD;AACrD,yDAAwD;AAExD,SAAgB,2BAA2B,CAAC,IAAa;IACvD,OAAO,IAAA,6BAAO,EAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AACrC,CAAC;AAFD,kEAEC;AAED,SAAgB,wBAAwB,CAAC,SAAiB;IACxD,MAAM,eAAe,GAAG,SAAS,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAE3D,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC;AARD,4DAQC;AAED,SAAgB,kBAAkB,CAAC,CAAS;IAC1C,OAAO,CAAC;SACL,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;SAC/C,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;SAClB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;SAClB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC1B,CAAC;AAND,gDAMC;AAED,SAAgB,QAAQ,CAAC,eAAuB;IAC9C,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACxC,CAAC,CAAC,IAAA,6BAAc,EAAC,eAAe,CAAC,CAAC,MAAM;QACxC,CAAC,CAAC,eAAe,CAAC;AACtB,CAAC;AAJD,4BAIC"}
package/dist/index.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import { SitePlace } from "./public.types";
2
- export interface StartOptions {
3
- sitePackPlaces?: {
4
- [packName: string]: SitePlace[];
5
- };
6
- }
7
- export declare function start(options?: StartOptions): Promise<void>;
package/dist/index.js DELETED
@@ -1,69 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.start = void 0;
7
- const core_1 = require("@nestjs/core");
8
- const platform_express_1 = require("@nestjs/platform-express");
9
- const server_image_cache_engine_1 = require("@paroicms/server-image-cache-engine");
10
- const server_lib_1 = require("@paroicms/server-lib");
11
- const express_1 = __importDefault(require("express"));
12
- const context_1 = require("./context");
13
- const static_middlewares_1 = require("./express/static-middlewares");
14
- const configuration_helpers_1 = require("./helpers/configuration.helpers");
15
- const maintenance_task_1 = require("./maintenance/maintenance-task");
16
- const shutdown_1 = require("./maintenance/shutdown");
17
- const app_module_1 = require("./modules/app.module");
18
- const nest_custom_logger_1 = require("./nest-custom-logger");
19
- const site_conf_1 = require("./site-context/site-conf");
20
- const site_context_1 = require("./site-context/site-context");
21
- const site_schema_lib_reader_1 = require("./site-schema/site-schema-lib-reader");
22
- async function start(options = {}) {
23
- try {
24
- await context_1.platformLog.untilReady;
25
- (0, site_context_1.watchForIdleSiteContexts)();
26
- (0, server_image_cache_engine_1.setupImageProcessor)({ ...context_1.appConf.imageProcessor, appLog: context_1.platformLog });
27
- const siteConfs = (0, configuration_helpers_1.isMultiSiteConfiguration)(context_1.appConf)
28
- ? await (0, site_conf_1.loadSitePackConfs)(context_1.appConf.sitePacks, options.sitePackPlaces)
29
- : await (0, site_conf_1.createSiteConfsFromSingle)(context_1.appConf.singleSite);
30
- await (0, context_1.initializeContext)(siteConfs);
31
- (0, context_1.initSiteSchemaLib)(await (0, site_schema_lib_reader_1.readSiteSchemaLibraries)());
32
- const stopCron = (0, server_lib_1.startCronLike)(maintenance_task_1.maintenanceTask, {
33
- shouldExecute: (0, server_lib_1.eachDay)({ hours: 2 }),
34
- appLog: context_1.platformLog,
35
- });
36
- const expressApp = (0, express_1.default)();
37
- const app = await core_1.NestFactory.create(app_module_1.AppModule, new platform_express_1.ExpressAdapter(expressApp), {
38
- logger: new nest_custom_logger_1.NestCustomLogger(),
39
- });
40
- app.enableCors({ credentials: true, origin: "*" });
41
- app.use(static_middlewares_1.boMiddleware);
42
- app.use(static_middlewares_1.themeAssetsMiddleware);
43
- if (context_1.appConf.thisServer.hostName) {
44
- await app.listen(context_1.appConf.thisServer.port, context_1.appConf.thisServer.hostName);
45
- }
46
- else {
47
- await app.listen(context_1.appConf.thisServer.port);
48
- }
49
- (0, shutdown_1.handleShutdownEvents)({
50
- appLog: context_1.platformLog,
51
- onCloseCb: async () => {
52
- await Promise.all([stopCron(), (0, maintenance_task_1.unloadAllActiveSites)(), app.close()]);
53
- },
54
- });
55
- context_1.platformLog.info(`paroi-web-platform is up and running on port '${context_1.appConf.thisServer.port}', it serves:${getListOfSiteUrls()
56
- .map((url) => `\n- ${url}`)
57
- .join("")}`);
58
- }
59
- catch (error) {
60
- context_1.platformLog.error(error);
61
- }
62
- }
63
- exports.start = start;
64
- function getListOfSiteUrls() {
65
- return Array.from(context_1.siteConfs.values())
66
- .map((siteConf) => siteConf.siteUrl)
67
- .sort();
68
- }
69
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA2C;AAC3C,+DAAkF;AAClF,mFAA0E;AAC1E,qDAA8D;AAC9D,sDAA8B;AAC9B,uCAAkG;AAClG,qEAAmF;AACnF,2EAA2E;AAC3E,qEAAuF;AACvF,qDAA8D;AAC9D,qDAAiD;AACjD,6DAAwD;AAExD,wDAAwF;AACxF,8DAAuE;AACvE,iFAA+E;AAQxE,KAAK,UAAU,KAAK,CAAC,UAAwB,EAAE;IACpD,IAAI,CAAC;QACH,MAAM,qBAAW,CAAC,UAAU,CAAC;QAC7B,IAAA,uCAAwB,GAAE,CAAC;QAE3B,IAAA,+CAAmB,EAAC,EAAE,GAAG,iBAAO,CAAC,cAAc,EAAE,MAAM,EAAE,qBAAW,EAAE,CAAC,CAAC;QACxE,MAAM,SAAS,GAAG,IAAA,gDAAwB,EAAC,iBAAO,CAAC;YACjD,CAAC,CAAC,MAAM,IAAA,6BAAiB,EAAC,iBAAO,CAAC,SAAS,EAAE,OAAO,CAAC,cAAc,CAAC;YACpE,CAAC,CAAC,MAAM,IAAA,qCAAyB,EAAC,iBAAO,CAAC,UAAU,CAAC,CAAC;QAExD,MAAM,IAAA,2BAAiB,EAAC,SAAS,CAAC,CAAC;QACnC,IAAA,2BAAiB,EAAC,MAAM,IAAA,gDAAuB,GAAE,CAAC,CAAC;QAEnD,MAAM,QAAQ,GAAG,IAAA,0BAAa,EAAC,kCAAe,EAAE;YAC9C,aAAa,EAAE,IAAA,oBAAO,EAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;YACpC,MAAM,EAAE,qBAAW;SACpB,CAAC,CAAC;QAEH,MAAM,UAAU,GAAG,IAAA,iBAAO,GAAE,CAAC;QAG7B,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAClC,sBAAS,EACT,IAAI,iCAAc,CAAC,UAAU,CAAC,EAC9B;YACE,MAAM,EAAE,IAAI,qCAAgB,EAAE;SAC/B,CACF,CAAC;QACF,GAAG,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACnD,GAAG,CAAC,GAAG,CAAC,iCAAY,CAAC,CAAC;QACtB,GAAG,CAAC,GAAG,CAAC,0CAAqB,CAAC,CAAC;QAE/B,IAAI,iBAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;YAChC,MAAM,GAAG,CAAC,MAAM,CAAC,iBAAO,CAAC,UAAU,CAAC,IAAI,EAAE,iBAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACzE,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,CAAC,MAAM,CAAC,iBAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;QAED,IAAA,+BAAoB,EAAC;YACnB,MAAM,EAAE,qBAAW;YACnB,SAAS,EAAE,KAAK,IAAI,EAAE;gBACpB,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,IAAA,uCAAoB,GAAE,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACvE,CAAC;SACF,CAAC,CAAC;QAEH,qBAAW,CAAC,IAAI,CACd,iDACE,iBAAO,CAAC,UAAU,CAAC,IACrB,gBAAgB,iBAAiB,EAAE;aAChC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,GAAG,EAAE,CAAC;aAC1B,IAAI,CAAC,EAAE,CAAC,EAAE,CACd,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,qBAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC;AAvDD,sBAuDC;AAED,SAAS,iBAAiB;IACxB,OAAO,KAAK,CAAC,IAAI,CAAC,mBAAS,CAAC,MAAM,EAAE,CAAC;SAClC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;SACnC,IAAI,EAAE,CAAC;AACZ,CAAC"}
@@ -1,31 +0,0 @@
1
- import { ParsedSectionId } from "@paroicms/anywhere-lib";
2
- import { Drop } from "liquidjs";
3
- import { SiteContext } from "../site-context/site-context.types";
4
- import { RenderingContext } from "./liquidjs-rendering/rendering-context";
5
- export declare const valuesSymbol: unique symbol;
6
- export type DropValues<T> = {
7
- [name in keyof T]: DropOrLiquidValue;
8
- };
9
- export type DropOrLiquidValue = DropInst<any> | LiquidValue | (() => Promise<DropOrLiquidValue> | DropOrLiquidValue);
10
- export type LiquidValue = PrimitiveLiquidValue | object | DropOrLiquidValue[];
11
- export type PrimitiveLiquidValue = string | number | boolean | undefined;
12
- export type DropInst<T> = Drop & {
13
- [valuesSymbol]: DropValues<T>;
14
- };
15
- export type CacheKeyOptions = DocumentCacheKeyOptions | SiteCacheKeyOptions;
16
- export interface DocumentCacheKeyOptions {
17
- documentId: ParsedSectionId;
18
- keySuffix?: string;
19
- keyPrefix?: string;
20
- }
21
- export interface SiteCacheKeyOptions {
22
- lang: string;
23
- keyPrefix?: string;
24
- }
25
- export declare function createLiquidJsDrop<T>({ renderingContext, cacheKeyOptions, values, }: {
26
- renderingContext: RenderingContext;
27
- cacheKeyOptions: CacheKeyOptions;
28
- values: DropValues<T>;
29
- }, { siteLog }: Pick<SiteContext, "siteLog">): DropInst<T>;
30
- export declare function loadOrFromRenderingCache<T>(renderingContext: RenderingContext, cacheKey: string, load: () => T): Promise<T>;
31
- export declare function makeDropCacheKeyForRendering(propName: string, cacheKeyOptions: CacheKeyOptions): string;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeDropCacheKeyForRendering = exports.loadOrFromRenderingCache = exports.createLiquidJsDrop = exports.valuesSymbol = void 0;
4
- const liquidjs_1 = require("liquidjs");
5
- exports.valuesSymbol = Symbol("values");
6
- function createLiquidJsDrop({ renderingContext, cacheKeyOptions, values, }, { siteLog }) {
7
- const drop = Object.create(liquidjs_1.Drop.prototype);
8
- drop.liquidMethodMissing = async (name) => {
9
- const val = values[name];
10
- if (typeof val !== "function")
11
- return val;
12
- try {
13
- return await loadOrFromRenderingCache(renderingContext, makeDropCacheKeyForRendering(name, cacheKeyOptions), val);
14
- }
15
- catch (error) {
16
- siteLog.error(`Error when generating '${name}':`, error);
17
- throw error;
18
- }
19
- };
20
- drop[exports.valuesSymbol] = values;
21
- return drop;
22
- }
23
- exports.createLiquidJsDrop = createLiquidJsDrop;
24
- async function loadOrFromRenderingCache(renderingContext, cacheKey, load) {
25
- const cacheVal = renderingContext.getValueFromCache(cacheKey);
26
- if (cacheVal.found)
27
- return cacheVal.val;
28
- const result = await load();
29
- renderingContext.setValueIntoCache(cacheKey, result);
30
- return result;
31
- }
32
- exports.loadOrFromRenderingCache = loadOrFromRenderingCache;
33
- function makeDropCacheKeyForRendering(propName, cacheKeyOptions) {
34
- if ("documentId" in cacheKeyOptions) {
35
- const { documentId, keySuffix, keyPrefix } = cacheKeyOptions;
36
- return `drop:${documentId.lang}:${documentId.leafId}${keyPrefix ? `:${keyPrefix}` : ""}:${propName}${keySuffix ? `:${keySuffix}` : ""}`;
37
- }
38
- return makeSiteFieldDropCacheKeyForRendering(propName, cacheKeyOptions);
39
- }
40
- exports.makeDropCacheKeyForRendering = makeDropCacheKeyForRendering;
41
- function makeSiteFieldDropCacheKeyForRendering(fieldName, cacheKeyOptions) {
42
- const { lang, keyPrefix } = cacheKeyOptions;
43
- return `drop${keyPrefix ? `:${keyPrefix}` : ""}:${lang}:${fieldName}`;
44
- }
45
- //# sourceMappingURL=liquidjs-drop.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"liquidjs-drop.js","sourceRoot":"","sources":["../../src/liquidjs-tools/liquidjs-drop.ts"],"names":[],"mappings":";;;AACA,uCAAgC;AAInB,QAAA,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAgC7C,SAAgB,kBAAkB,CAChC,EACE,gBAAgB,EAChB,eAAe,EACf,MAAM,GAKP,EACD,EAAE,OAAO,EAAgC;IAEzC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,eAAI,CAAC,SAAS,CAAC,CAAC;IAC3C,IAAI,CAAC,mBAAmB,GAAG,KAAK,EAAE,IAAY,EAAgB,EAAE;QAC9D,MAAM,GAAG,GAAI,MAAc,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,OAAO,GAAG,KAAK,UAAU;YAAE,OAAO,GAAG,CAAC;QAC1C,IAAI,CAAC;YACH,OAAO,MAAM,wBAAwB,CACnC,gBAAgB,EAChB,4BAA4B,CAAC,IAAI,EAAE,eAAe,CAAC,EACnD,GAAG,CACJ,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,0BAA0B,IAAI,IAAI,EAAE,KAAK,CAAC,CAAC;YACzD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CAAC;IACF,IAAI,CAAC,oBAAY,CAAC,GAAG,MAAM,CAAC;IAC5B,OAAO,IAAI,CAAC;AAed,CAAC;AA3CD,gDA2CC;AAEM,KAAK,UAAU,wBAAwB,CAC5C,gBAAkC,EAClC,QAAgB,EAChB,IAAa;IAEb,MAAM,QAAQ,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC9D,IAAI,QAAQ,CAAC,KAAK;QAAE,OAAO,QAAQ,CAAC,GAAG,CAAC;IAExC,MAAM,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;IAC5B,gBAAgB,CAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACrD,OAAO,MAAM,CAAC;AAChB,CAAC;AAXD,4DAWC;AAED,SAAgB,4BAA4B,CAAC,QAAgB,EAAE,eAAgC;IAC7F,IAAI,YAAY,IAAI,eAAe,EAAE,CAAC;QACpC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,eAAe,CAAC;QAC7D,OAAO,QAAQ,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,MAAM,GACjD,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAChC,IAAI,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACpD,CAAC;IACD,OAAO,qCAAqC,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;AAC1E,CAAC;AARD,oEAQC;AAED,SAAS,qCAAqC,CAC5C,SAAiB,EACjB,eAAoC;IAEpC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,eAAe,CAAC;IAC5C,OAAO,OAAO,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,IAAI,SAAS,EAAE,CAAC;AACxE,CAAC"}
@@ -1,10 +0,0 @@
1
- import { Context } from "liquidjs";
2
- import { SiteContext } from "../site-context/site-context.types";
3
- export type LiquidFilterHandler = (value: unknown, options: {
4
- ctx: Context;
5
- args: any[];
6
- siteContext: SiteContext;
7
- }) => string | undefined | Promise<string | undefined>;
8
- export declare function toLiquidJsFilterHandler(siteContext: SiteContext, handler: LiquidFilterHandler): (this: {
9
- context: Context;
10
- }, value: unknown, ...args: unknown[]) => string | Promise<string | undefined> | undefined;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toLiquidJsFilterHandler = void 0;
4
- function toLiquidJsFilterHandler(siteContext, handler) {
5
- return function (value, ...args) {
6
- try {
7
- const result = handler(value, { ctx: this.context, args, siteContext });
8
- if (result && typeof result !== "string" && "then" in result) {
9
- return result.then(undefined, (error) => {
10
- siteContext.siteLog.error("Error in liquid filter:", error);
11
- throw error;
12
- });
13
- }
14
- return result;
15
- }
16
- catch (error) {
17
- siteContext.siteLog.error("Error in liquid filter:", error);
18
- throw error;
19
- }
20
- };
21
- }
22
- exports.toLiquidJsFilterHandler = toLiquidJsFilterHandler;
23
- //# sourceMappingURL=liquidjs-filter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"liquidjs-filter.js","sourceRoot":"","sources":["../../src/liquidjs-tools/liquidjs-filter.ts"],"names":[],"mappings":";;;AAYA,SAAgB,uBAAuB,CAAC,WAAwB,EAAE,OAA4B;IAC5F,OAAO,UAAsC,KAAc,EAAE,GAAG,IAAe;QAC7E,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;YACxE,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;gBAC7D,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE;oBACtC,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;oBAC5D,MAAM,KAAK,CAAC;gBACd,CAAC,CAAC,CAAC;YACL,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;YAC5D,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAhBD,0DAgBC"}
@@ -1,6 +0,0 @@
1
- import { SiteContext } from "../../site-context/site-context.types";
2
- import { RenderingContext } from "./rendering-context";
3
- export declare function renderLiquidTemplate(siteContext: SiteContext, renderingContext: RenderingContext, { templateNames, payload }: {
4
- templateNames: string[];
5
- payload: object;
6
- }): Promise<string>;
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.renderLiquidTemplate = void 0;
7
- const html_minifier_terser_1 = require("html-minifier-terser");
8
- const render_1 = __importDefault(require("../render-clone/render"));
9
- async function renderLiquidTemplate(siteContext, renderingContext, { templateNames, payload }) {
10
- let html;
11
- let usedTemplate;
12
- for (const templateName of templateNames) {
13
- try {
14
- html = await siteContext.liquidEngine.renderFile(templateName, {
15
- ...payload,
16
- [render_1.default.passThroughSymbol]: renderingContext,
17
- });
18
- usedTemplate = templateName;
19
- }
20
- catch (err) {
21
- if (err.code === "ENOENT")
22
- continue;
23
- throw err;
24
- }
25
- }
26
- if (!html)
27
- throw new Error(`missing template '${templateNames[0]}'`);
28
- try {
29
- return await (0, html_minifier_terser_1.minify)(html, {
30
- collapseWhitespace: true,
31
- removeComments: true,
32
- });
33
- }
34
- catch {
35
- siteContext.siteLog.warn(`[${siteContext.fqdn}] invalid HTML generated by '${usedTemplate}'`);
36
- }
37
- return html;
38
- }
39
- exports.renderLiquidTemplate = renderLiquidTemplate;
40
- //# sourceMappingURL=render-liquidjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render-liquidjs.js","sourceRoot":"","sources":["../../../src/liquidjs-tools/liquidjs-rendering/render-liquidjs.ts"],"names":[],"mappings":";;;;;;AAAA,+DAA8C;AAE9C,oEAA+C;AAGxC,KAAK,UAAU,oBAAoB,CACxC,WAAwB,EACxB,gBAAkC,EAClC,EAAE,aAAa,EAAE,OAAO,EAAgD;IAExE,IAAI,IAAwB,CAAC;IAC7B,IAAI,YAAgC,CAAC;IACrC,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,IAAI,GAAG,MAAM,WAAW,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,EAAE;gBAC7D,GAAG,OAAO;gBACV,CAAC,gBAAS,CAAC,iBAAiB,CAAC,EAAE,gBAAgB;aAChD,CAAC,CAAC;YACH,YAAY,GAAG,YAAY,CAAC;QAC9B,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ;gBAAE,SAAS;YACpC,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;IACD,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACrE,IAAI,CAAC;QACH,OAAO,MAAM,IAAA,6BAAM,EAAC,IAAI,EAAE;YACxB,kBAAkB,EAAE,IAAI;YACxB,cAAc,EAAE,IAAI;SACrB,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,IAAI,gCAAgC,YAAY,GAAG,CAAC,CAAC;IAChG,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AA7BD,oDA6BC"}
@@ -1,25 +0,0 @@
1
- import { Tracker } from "@paroicms/server-lib";
2
- import { SiteContext } from "../../site-context/site-context.types";
3
- export interface RenderingContext {
4
- renderingId: bigint;
5
- cacheKey: string;
6
- tracker: Tracker;
7
- getDependencyKeys: () => string[];
8
- addDependencyKey: (...dependencyKeys: string[]) => void;
9
- getValueFromCache: (key: string) => RenderingCacheResult;
10
- setValueIntoCache: (key: string, val: any) => void;
11
- }
12
- export type RenderingCacheResult = {
13
- found: false;
14
- } | {
15
- found: true;
16
- val: any;
17
- };
18
- export declare function createRenderingContext(siteContext: Pick<SiteContext, "imageCache">, options: {
19
- cacheKey: string;
20
- tracker: Tracker;
21
- dependencyKey?: string;
22
- }): Promise<RenderingContext>;
23
- export declare function makeTagCacheKeyForRendering(cacheKey: string, { tagParameters }: {
24
- tagParameters?: any;
25
- }): string;