@paroicms/server 0.151.0 → 0.151.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 (569) hide show
  1. package/dist/cli.d.ts +2 -0
  2. package/dist/cli.js +5 -0
  3. package/dist/cli.js.map +1 -0
  4. package/dist/common/child-ordering-query.d.ts +13 -0
  5. package/dist/common/child-ordering-query.js +107 -0
  6. package/dist/common/child-ordering-query.js.map +1 -0
  7. package/dist/common/data-format.d.ts +19 -0
  8. package/dist/common/data-format.js +86 -0
  9. package/dist/common/data-format.js.map +1 -0
  10. package/dist/common/mail/html-helpers.d.ts +7 -0
  11. package/dist/common/mail/html-helpers.js +46 -0
  12. package/dist/common/mail/html-helpers.js.map +1 -0
  13. package/dist/common/mail/sendMail.helpers.d.ts +14 -0
  14. package/dist/common/mail/sendMail.helpers.js +51 -0
  15. package/dist/common/mail/sendMail.helpers.js.map +1 -0
  16. package/dist/common/media-handles.helpers.d.ts +19 -0
  17. package/dist/common/media-handles.helpers.js +52 -0
  18. package/dist/common/media-handles.helpers.js.map +1 -0
  19. package/dist/common/serve-html-or.d.ts +16 -0
  20. package/dist/common/serve-html-or.js +72 -0
  21. package/dist/common/serve-html-or.js.map +1 -0
  22. package/dist/common/text-cache.d.ts +57 -0
  23. package/dist/common/text-cache.js +87 -0
  24. package/dist/common/text-cache.js.map +1 -0
  25. package/dist/common/tracker-report.d.ts +2 -0
  26. package/dist/common/tracker-report.js +27 -0
  27. package/dist/common/tracker-report.js.map +1 -0
  28. package/dist/context.d.ts +29 -0
  29. package/dist/context.js +60 -0
  30. package/dist/context.js.map +1 -0
  31. package/dist/express/http-helpers.d.ts +16 -0
  32. package/dist/express/http-helpers.js +44 -0
  33. package/dist/express/http-helpers.js.map +1 -0
  34. package/dist/express/static-middlewares.d.ts +3 -0
  35. package/dist/express/static-middlewares.js +114 -0
  36. package/dist/express/static-middlewares.js.map +1 -0
  37. package/dist/helpers/configuration.helpers.d.ts +2 -0
  38. package/dist/helpers/configuration.helpers.js +8 -0
  39. package/dist/helpers/configuration.helpers.js.map +1 -0
  40. package/dist/helpers/excerpt.helpers.d.ts +2 -0
  41. package/dist/helpers/excerpt.helpers.js +31 -0
  42. package/dist/helpers/excerpt.helpers.js.map +1 -0
  43. package/dist/helpers/jwt-secret.helpers.d.ts +2 -0
  44. package/dist/helpers/jwt-secret.helpers.js +30 -0
  45. package/dist/helpers/jwt-secret.helpers.js.map +1 -0
  46. package/dist/helpers/label-translator.helper.d.ts +9 -0
  47. package/dist/helpers/label-translator.helper.js +14 -0
  48. package/dist/helpers/label-translator.helper.js.map +1 -0
  49. package/dist/helpers/passwordEncrypt-helper.d.ts +2 -0
  50. package/dist/helpers/passwordEncrypt-helper.js +37 -0
  51. package/dist/helpers/passwordEncrypt-helper.js.map +1 -0
  52. package/dist/helpers/relative-id-helper.d.ts +10 -0
  53. package/dist/helpers/relative-id-helper.js +37 -0
  54. package/dist/helpers/relative-id-helper.js.map +1 -0
  55. package/dist/helpers/simple-i18n.d.ts +14 -0
  56. package/dist/helpers/simple-i18n.js +82 -0
  57. package/dist/helpers/simple-i18n.js.map +1 -0
  58. package/dist/helpers/special-account.helpers.d.ts +9 -0
  59. package/dist/helpers/special-account.helpers.js +43 -0
  60. package/dist/helpers/special-account.helpers.js.map +1 -0
  61. package/dist/helpers/url.helpers.d.ts +2 -0
  62. package/dist/helpers/url.helpers.js +12 -0
  63. package/dist/helpers/url.helpers.js.map +1 -0
  64. package/dist/helpers/utils-helper.d.ts +4 -0
  65. package/dist/helpers/utils-helper.js +32 -0
  66. package/dist/helpers/utils-helper.js.map +1 -0
  67. package/dist/index.d.ts +7 -0
  68. package/dist/index.js +69 -0
  69. package/dist/index.js.map +1 -0
  70. package/dist/liquidjs-tools/liquidjs-drop.d.ts +31 -0
  71. package/dist/liquidjs-tools/liquidjs-drop.js +45 -0
  72. package/dist/liquidjs-tools/liquidjs-drop.js.map +1 -0
  73. package/dist/liquidjs-tools/liquidjs-filter.d.ts +10 -0
  74. package/dist/liquidjs-tools/liquidjs-filter.js +23 -0
  75. package/dist/liquidjs-tools/liquidjs-filter.js.map +1 -0
  76. package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.d.ts +6 -0
  77. package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.js +40 -0
  78. package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.js.map +1 -0
  79. package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.d.ts +25 -0
  80. package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.js +35 -0
  81. package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.js.map +1 -0
  82. package/dist/liquidjs-tools/liquidjs-utils.d.ts +5 -0
  83. package/dist/liquidjs-tools/liquidjs-utils.js +22 -0
  84. package/dist/liquidjs-tools/liquidjs-utils.js.map +1 -0
  85. package/dist/liquidjs-tools/render-clone/collection.d.ts +1 -0
  86. package/dist/liquidjs-tools/render-clone/collection.js +18 -0
  87. package/dist/liquidjs-tools/render-clone/collection.js.map +1 -0
  88. package/dist/liquidjs-tools/render-clone/forloop-drop.d.ts +15 -0
  89. package/dist/liquidjs-tools/render-clone/forloop-drop.js +40 -0
  90. package/dist/liquidjs-tools/render-clone/forloop-drop.js.map +1 -0
  91. package/dist/liquidjs-tools/render-clone/render.d.ts +13 -0
  92. package/dist/liquidjs-tools/render-clone/render.js +108 -0
  93. package/dist/liquidjs-tools/render-clone/render.js.map +1 -0
  94. package/dist/maintenance/maintenance-task.d.ts +4 -0
  95. package/dist/maintenance/maintenance-task.js +27 -0
  96. package/dist/maintenance/maintenance-task.js.map +1 -0
  97. package/dist/maintenance/shutdown.d.ts +7 -0
  98. package/dist/maintenance/shutdown.js +51 -0
  99. package/dist/maintenance/shutdown.js.map +1 -0
  100. package/dist/modules/app.controller.d.ts +5 -0
  101. package/dist/modules/app.controller.js +89 -0
  102. package/dist/modules/app.controller.js.map +1 -0
  103. package/dist/modules/app.module.d.ts +2 -0
  104. package/dist/modules/app.module.js +48 -0
  105. package/dist/modules/app.module.js.map +1 -0
  106. package/dist/modules/core/account/account.model.d.ts +18 -0
  107. package/dist/modules/core/account/account.model.js +59 -0
  108. package/dist/modules/core/account/account.model.js.map +1 -0
  109. package/dist/modules/core/account/account.module.d.ts +2 -0
  110. package/dist/modules/core/account/account.module.js +20 -0
  111. package/dist/modules/core/account/account.module.js.map +1 -0
  112. package/dist/modules/core/account/account.queries.d.ts +18 -0
  113. package/dist/modules/core/account/account.queries.js +150 -0
  114. package/dist/modules/core/account/account.queries.js.map +1 -0
  115. package/dist/modules/core/account/account.resolver.d.ts +11 -0
  116. package/dist/modules/core/account/account.resolver.js +107 -0
  117. package/dist/modules/core/account/account.resolver.js.map +1 -0
  118. package/dist/modules/core/account/account.schema.d.ts +24 -0
  119. package/dist/modules/core/account/account.schema.js +114 -0
  120. package/dist/modules/core/account/account.schema.js.map +1 -0
  121. package/dist/modules/core/account-auth/account-auth.module.d.ts +2 -0
  122. package/dist/modules/core/account-auth/account-auth.module.js +24 -0
  123. package/dist/modules/core/account-auth/account-auth.module.js.map +1 -0
  124. package/dist/modules/core/account-auth/account-auth.service.d.ts +5 -0
  125. package/dist/modules/core/account-auth/account-auth.service.js +41 -0
  126. package/dist/modules/core/account-auth/account-auth.service.js.map +1 -0
  127. package/dist/modules/core/account-auth/account-auth.strategy.d.ts +10 -0
  128. package/dist/modules/core/account-auth/account-auth.strategy.js +48 -0
  129. package/dist/modules/core/account-auth/account-auth.strategy.js.map +1 -0
  130. package/dist/modules/core/auth/auth.module.d.ts +2 -0
  131. package/dist/modules/core/auth/auth.module.js +35 -0
  132. package/dist/modules/core/auth/auth.module.js.map +1 -0
  133. package/dist/modules/core/auth/auth.service.d.ts +11 -0
  134. package/dist/modules/core/auth/auth.service.js +163 -0
  135. package/dist/modules/core/auth/auth.service.js.map +1 -0
  136. package/dist/modules/core/auth/auth.types.d.ts +27 -0
  137. package/dist/modules/core/auth/auth.types.js +3 -0
  138. package/dist/modules/core/auth/auth.types.js.map +1 -0
  139. package/dist/modules/core/auth/jwt.auth.guard.d.ts +6 -0
  140. package/dist/modules/core/auth/jwt.auth.guard.js +23 -0
  141. package/dist/modules/core/auth/jwt.auth.guard.js.map +1 -0
  142. package/dist/modules/core/auth/jwt.strategy.d.ts +10 -0
  143. package/dist/modules/core/auth/jwt.strategy.js +35 -0
  144. package/dist/modules/core/auth/jwt.strategy.js.map +1 -0
  145. package/dist/modules/core/backup/backup.controller.d.ts +7 -0
  146. package/dist/modules/core/backup/backup.controller.js +60 -0
  147. package/dist/modules/core/backup/backup.controller.js.map +1 -0
  148. package/dist/modules/core/backup/backup.module.d.ts +2 -0
  149. package/dist/modules/core/backup/backup.module.js +22 -0
  150. package/dist/modules/core/backup/backup.module.js.map +1 -0
  151. package/dist/modules/core/backup/backup.resolver.d.ts +8 -0
  152. package/dist/modules/core/backup/backup.resolver.js +53 -0
  153. package/dist/modules/core/backup/backup.resolver.js.map +1 -0
  154. package/dist/modules/core/backup/backup.shema.d.ts +4 -0
  155. package/dist/modules/core/backup/backup.shema.js +30 -0
  156. package/dist/modules/core/backup/backup.shema.js.map +1 -0
  157. package/dist/modules/core/core.module.d.ts +2 -0
  158. package/dist/modules/core/core.module.js +50 -0
  159. package/dist/modules/core/core.module.js.map +1 -0
  160. package/dist/modules/core/document/document.helper.d.ts +2 -0
  161. package/dist/modules/core/document/document.helper.js +10 -0
  162. package/dist/modules/core/document/document.helper.js.map +1 -0
  163. package/dist/modules/core/document/document.model.d.ts +9 -0
  164. package/dist/modules/core/document/document.model.js +59 -0
  165. package/dist/modules/core/document/document.model.js.map +1 -0
  166. package/dist/modules/core/document/document.module.d.ts +2 -0
  167. package/dist/modules/core/document/document.module.js +25 -0
  168. package/dist/modules/core/document/document.module.js.map +1 -0
  169. package/dist/modules/core/document/document.resolver.d.ts +12 -0
  170. package/dist/modules/core/document/document.resolver.extend.d.ts +10 -0
  171. package/dist/modules/core/document/document.resolver.extend.js +69 -0
  172. package/dist/modules/core/document/document.resolver.extend.js.map +1 -0
  173. package/dist/modules/core/document/document.resolver.js +154 -0
  174. package/dist/modules/core/document/document.resolver.js.map +1 -0
  175. package/dist/modules/core/document/document.schema.d.ts +39 -0
  176. package/dist/modules/core/document/document.schema.js +181 -0
  177. package/dist/modules/core/document/document.schema.js.map +1 -0
  178. package/dist/modules/core/document/load-documents.queries.d.ts +17 -0
  179. package/dist/modules/core/document/load-documents.queries.js +119 -0
  180. package/dist/modules/core/document/load-documents.queries.js.map +1 -0
  181. package/dist/modules/core/document/save-documents.queries.d.ts +18 -0
  182. package/dist/modules/core/document/save-documents.queries.js +199 -0
  183. package/dist/modules/core/document/save-documents.queries.js.map +1 -0
  184. package/dist/modules/core/fields/_fields.helpers.d.ts +2 -0
  185. package/dist/modules/core/fields/_fields.helpers.js +12 -0
  186. package/dist/modules/core/fields/_fields.helpers.js.map +1 -0
  187. package/dist/modules/core/fields/fields.model.d.ts +17 -0
  188. package/dist/modules/core/fields/fields.model.js +99 -0
  189. package/dist/modules/core/fields/fields.model.js.map +1 -0
  190. package/dist/modules/core/fields/fields.module.d.ts +2 -0
  191. package/dist/modules/core/fields/fields.module.js +20 -0
  192. package/dist/modules/core/fields/fields.module.js.map +1 -0
  193. package/dist/modules/core/fields/fields.resolver.d.ts +14 -0
  194. package/dist/modules/core/fields/fields.resolver.js +165 -0
  195. package/dist/modules/core/fields/fields.resolver.js.map +1 -0
  196. package/dist/modules/core/fields/load-fields.queries.d.ts +20 -0
  197. package/dist/modules/core/fields/load-fields.queries.js +233 -0
  198. package/dist/modules/core/fields/load-fields.queries.js.map +1 -0
  199. package/dist/modules/core/fields/quill-delta.d.ts +1 -0
  200. package/dist/modules/core/fields/quill-delta.js +40 -0
  201. package/dist/modules/core/fields/quill-delta.js.map +1 -0
  202. package/dist/modules/core/fields/save-fields.queries.d.ts +9 -0
  203. package/dist/modules/core/fields/save-fields.queries.js +135 -0
  204. package/dist/modules/core/fields/save-fields.queries.js.map +1 -0
  205. package/dist/modules/core/leaf/leaf.model.d.ts +9 -0
  206. package/dist/modules/core/leaf/leaf.model.js +61 -0
  207. package/dist/modules/core/leaf/leaf.model.js.map +1 -0
  208. package/dist/modules/core/leaf/leaf.module.d.ts +2 -0
  209. package/dist/modules/core/leaf/leaf.module.js +21 -0
  210. package/dist/modules/core/leaf/leaf.module.js.map +1 -0
  211. package/dist/modules/core/leaf/leaf.queries.d.ts +21 -0
  212. package/dist/modules/core/leaf/leaf.queries.js +159 -0
  213. package/dist/modules/core/leaf/leaf.queries.js.map +1 -0
  214. package/dist/modules/core/leaf/leaf.resolver.d.ts +9 -0
  215. package/dist/modules/core/leaf/leaf.resolver.extend.d.ts +6 -0
  216. package/dist/modules/core/leaf/leaf.resolver.extend.js +42 -0
  217. package/dist/modules/core/leaf/leaf.resolver.extend.js.map +1 -0
  218. package/dist/modules/core/leaf/leaf.resolver.js +84 -0
  219. package/dist/modules/core/leaf/leaf.resolver.js.map +1 -0
  220. package/dist/modules/core/leaf/leaf.schema.d.ts +7 -0
  221. package/dist/modules/core/leaf/leaf.schema.js +45 -0
  222. package/dist/modules/core/leaf/leaf.schema.js.map +1 -0
  223. package/dist/modules/core/leaf-item/leaf-item.model.d.ts +6 -0
  224. package/dist/modules/core/leaf-item/leaf-item.model.js +44 -0
  225. package/dist/modules/core/leaf-item/leaf-item.model.js.map +1 -0
  226. package/dist/modules/core/leaf-item/leaf-item.queries.d.ts +9 -0
  227. package/dist/modules/core/leaf-item/leaf-item.queries.js +120 -0
  228. package/dist/modules/core/leaf-item/leaf-item.queries.js.map +1 -0
  229. package/dist/modules/core/login/login.controller.d.ts +8 -0
  230. package/dist/modules/core/login/login.controller.js +53 -0
  231. package/dist/modules/core/login/login.controller.js.map +1 -0
  232. package/dist/modules/core/login/login.module.d.ts +2 -0
  233. package/dist/modules/core/login/login.module.js +22 -0
  234. package/dist/modules/core/login/login.module.js.map +1 -0
  235. package/dist/modules/core/media/media-upload.controller.d.ts +21 -0
  236. package/dist/modules/core/media/media-upload.controller.js +160 -0
  237. package/dist/modules/core/media/media-upload.controller.js.map +1 -0
  238. package/dist/modules/core/media/media.d.ts +22 -0
  239. package/dist/modules/core/media/media.js +53 -0
  240. package/dist/modules/core/media/media.js.map +1 -0
  241. package/dist/modules/core/media/media.module.d.ts +2 -0
  242. package/dist/modules/core/media/media.module.js +22 -0
  243. package/dist/modules/core/media/media.module.js.map +1 -0
  244. package/dist/modules/core/media/media.resolver.d.ts +14 -0
  245. package/dist/modules/core/media/media.resolver.js +199 -0
  246. package/dist/modules/core/media/media.resolver.js.map +1 -0
  247. package/dist/modules/core/media/media.schema.d.ts +30 -0
  248. package/dist/modules/core/media/media.schema.js +144 -0
  249. package/dist/modules/core/media/media.schema.js.map +1 -0
  250. package/dist/modules/core/part/part.module.d.ts +2 -0
  251. package/dist/modules/core/part/part.module.js +21 -0
  252. package/dist/modules/core/part/part.module.js.map +1 -0
  253. package/dist/modules/core/part/part.queries.d.ts +22 -0
  254. package/dist/modules/core/part/part.queries.js +167 -0
  255. package/dist/modules/core/part/part.queries.js.map +1 -0
  256. package/dist/modules/core/part/part.resolver.d.ts +14 -0
  257. package/dist/modules/core/part/part.resolver.extend.d.ts +5 -0
  258. package/dist/modules/core/part/part.resolver.extend.js +49 -0
  259. package/dist/modules/core/part/part.resolver.extend.js.map +1 -0
  260. package/dist/modules/core/part/part.resolver.js +135 -0
  261. package/dist/modules/core/part/part.resolver.js.map +1 -0
  262. package/dist/modules/core/part/part.schema.d.ts +12 -0
  263. package/dist/modules/core/part/part.schema.js +66 -0
  264. package/dist/modules/core/part/part.schema.js.map +1 -0
  265. package/dist/modules/core/section/section-wrap.resolver.d.ts +11 -0
  266. package/dist/modules/core/section/section-wrap.resolver.js +168 -0
  267. package/dist/modules/core/section/section-wrap.resolver.js.map +1 -0
  268. package/dist/modules/core/section/section.model.d.ts +6 -0
  269. package/dist/modules/core/section/section.model.js +44 -0
  270. package/dist/modules/core/section/section.model.js.map +1 -0
  271. package/dist/modules/core/section/section.module.d.ts +2 -0
  272. package/dist/modules/core/section/section.module.js +21 -0
  273. package/dist/modules/core/section/section.module.js.map +1 -0
  274. package/dist/modules/core/section/section.queries.d.ts +51 -0
  275. package/dist/modules/core/section/section.queries.js +228 -0
  276. package/dist/modules/core/section/section.queries.js.map +1 -0
  277. package/dist/modules/core/section/section.resolver.d.ts +7 -0
  278. package/dist/modules/core/section/section.resolver.js +78 -0
  279. package/dist/modules/core/section/section.resolver.js.map +1 -0
  280. package/dist/modules/core/section/section.schema.d.ts +27 -0
  281. package/dist/modules/core/section/section.schema.js +129 -0
  282. package/dist/modules/core/section/section.schema.js.map +1 -0
  283. package/dist/modules/core/site-info/site-info.module.d.ts +2 -0
  284. package/dist/modules/core/site-info/site-info.module.js +20 -0
  285. package/dist/modules/core/site-info/site-info.module.js.map +1 -0
  286. package/dist/modules/core/site-info/site-info.resolver.d.ts +5 -0
  287. package/dist/modules/core/site-info/site-info.resolver.js +44 -0
  288. package/dist/modules/core/site-info/site-info.resolver.js.map +1 -0
  289. package/dist/modules/core/site-info/site-info.schema.d.ts +6 -0
  290. package/dist/modules/core/site-info/site-info.schema.js +36 -0
  291. package/dist/modules/core/site-info/site-info.schema.js.map +1 -0
  292. package/dist/modules/core/site-schema/site-schema.module.d.ts +2 -0
  293. package/dist/modules/core/site-schema/site-schema.module.js +20 -0
  294. package/dist/modules/core/site-schema/site-schema.module.js.map +1 -0
  295. package/dist/modules/core/site-schema/site-schema.resolver.d.ts +4 -0
  296. package/dist/modules/core/site-schema/site-schema.resolver.js +35 -0
  297. package/dist/modules/core/site-schema/site-schema.resolver.js.map +1 -0
  298. package/dist/modules/core/term-flag/term-flag.model.d.ts +6 -0
  299. package/dist/modules/core/term-flag/term-flag.model.js +45 -0
  300. package/dist/modules/core/term-flag/term-flag.model.js.map +1 -0
  301. package/dist/modules/core/term-flag/term-flag.module.d.ts +2 -0
  302. package/dist/modules/core/term-flag/term-flag.module.js +20 -0
  303. package/dist/modules/core/term-flag/term-flag.module.js.map +1 -0
  304. package/dist/modules/core/term-flag/term-flag.queries.d.ts +7 -0
  305. package/dist/modules/core/term-flag/term-flag.queries.js +44 -0
  306. package/dist/modules/core/term-flag/term-flag.queries.js.map +1 -0
  307. package/dist/modules/core/term-flag/term-flag.resolver.d.ts +5 -0
  308. package/dist/modules/core/term-flag/term-flag.resolver.js +47 -0
  309. package/dist/modules/core/term-flag/term-flag.resolver.js.map +1 -0
  310. package/dist/modules/core/term-flag/term-flag.schema.d.ts +9 -0
  311. package/dist/modules/core/term-flag/term-flag.schema.js +51 -0
  312. package/dist/modules/core/term-flag/term-flag.schema.js.map +1 -0
  313. package/dist/modules/core/unprotected/unprotected.module.d.ts +2 -0
  314. package/dist/modules/core/unprotected/unprotected.module.js +20 -0
  315. package/dist/modules/core/unprotected/unprotected.module.js.map +1 -0
  316. package/dist/modules/core/unprotected/unprotected.resolver.d.ts +8 -0
  317. package/dist/modules/core/unprotected/unprotected.resolver.js +106 -0
  318. package/dist/modules/core/unprotected/unprotected.resolver.js.map +1 -0
  319. package/dist/modules/core/unprotected/unprotected.schema.d.ts +19 -0
  320. package/dist/modules/core/unprotected/unprotected.schema.js +93 -0
  321. package/dist/modules/core/unprotected/unprotected.schema.js.map +1 -0
  322. package/dist/modules/graphql.types.d.ts +6 -0
  323. package/dist/modules/graphql.types.js +3 -0
  324. package/dist/modules/graphql.types.js.map +1 -0
  325. package/dist/modules/private-api.module.d.ts +2 -0
  326. package/dist/modules/private-api.module.js +50 -0
  327. package/dist/modules/private-api.module.js.map +1 -0
  328. package/dist/modules/public-api/class-validator-options.d.ts +7 -0
  329. package/dist/modules/public-api/class-validator-options.js +11 -0
  330. package/dist/modules/public-api/class-validator-options.js.map +1 -0
  331. package/dist/modules/public-api/mail/contact-form-mail.d.ts +8 -0
  332. package/dist/modules/public-api/mail/contact-form-mail.js +96 -0
  333. package/dist/modules/public-api/mail/contact-form-mail.js.map +1 -0
  334. package/dist/modules/public-api/mail/mail.dto.d.ts +8 -0
  335. package/dist/modules/public-api/mail/mail.dto.js +56 -0
  336. package/dist/modules/public-api/mail/mail.dto.js.map +1 -0
  337. package/dist/modules/public-api/partials/partials-params.dto.d.ts +6 -0
  338. package/dist/modules/public-api/partials/partials-params.dto.js +45 -0
  339. package/dist/modules/public-api/partials/partials-params.dto.js.map +1 -0
  340. package/dist/modules/public-api/password-reset/password-reset.controller.d.ts +11 -0
  341. package/dist/modules/public-api/password-reset/password-reset.controller.js +57 -0
  342. package/dist/modules/public-api/password-reset/password-reset.controller.js.map +1 -0
  343. package/dist/modules/public-api/password-reset/password-reset.dto.d.ts +9 -0
  344. package/dist/modules/public-api/password-reset/password-reset.dto.js +55 -0
  345. package/dist/modules/public-api/password-reset/password-reset.dto.js.map +1 -0
  346. package/dist/modules/public-api/password-reset/password-reset.module.d.ts +2 -0
  347. package/dist/modules/public-api/password-reset/password-reset.module.js +22 -0
  348. package/dist/modules/public-api/password-reset/password-reset.module.js.map +1 -0
  349. package/dist/modules/public-api/password-reset/password-reset.service.d.ts +14 -0
  350. package/dist/modules/public-api/password-reset/password-reset.service.js +56 -0
  351. package/dist/modules/public-api/password-reset/password-reset.service.js.map +1 -0
  352. package/dist/modules/public-api/public-api-controller.d.ts +32 -0
  353. package/dist/modules/public-api/public-api-controller.js +195 -0
  354. package/dist/modules/public-api/public-api-controller.js.map +1 -0
  355. package/dist/modules/public-api/public-api.module.d.ts +2 -0
  356. package/dist/modules/public-api/public-api.module.js +22 -0
  357. package/dist/modules/public-api/public-api.module.js.map +1 -0
  358. package/dist/modules/public-api/search-text/search-text.dto.d.ts +7 -0
  359. package/dist/modules/public-api/search-text/search-text.dto.js +50 -0
  360. package/dist/modules/public-api/search-text/search-text.dto.js.map +1 -0
  361. package/dist/modules/public-api/search-text/search-text.queries.d.ts +14 -0
  362. package/dist/modules/public-api/search-text/search-text.queries.js +58 -0
  363. package/dist/modules/public-api/search-text/search-text.queries.js.map +1 -0
  364. package/dist/modules/public-site/app-exception-filter.d.ts +4 -0
  365. package/dist/modules/public-site/app-exception-filter.js +41 -0
  366. package/dist/modules/public-site/app-exception-filter.js.map +1 -0
  367. package/dist/modules/public-site/helpers/format-date.helper.d.ts +4 -0
  368. package/dist/modules/public-site/helpers/format-date.helper.js +35 -0
  369. package/dist/modules/public-site/helpers/format-date.helper.js.map +1 -0
  370. package/dist/modules/public-site/helpers/medias.helpers.d.ts +3 -0
  371. package/dist/modules/public-site/helpers/medias.helpers.js +16 -0
  372. package/dist/modules/public-site/helpers/medias.helpers.js.map +1 -0
  373. package/dist/modules/public-site/helpers/obfuscate.helper.d.ts +2 -0
  374. package/dist/modules/public-site/helpers/obfuscate.helper.js +27 -0
  375. package/dist/modules/public-site/helpers/obfuscate.helper.js.map +1 -0
  376. package/dist/modules/public-site/liquidjs-filters/format-date.d.ts +7 -0
  377. package/dist/modules/public-site/liquidjs-filters/format-date.js +15 -0
  378. package/dist/modules/public-site/liquidjs-filters/format-date.js.map +1 -0
  379. package/dist/modules/public-site/liquidjs-filters/format-number.d.ts +6 -0
  380. package/dist/modules/public-site/liquidjs-filters/format-number.js +17 -0
  381. package/dist/modules/public-site/liquidjs-filters/format-number.js.map +1 -0
  382. package/dist/modules/public-site/liquidjs-filters/info-filter.d.ts +1 -0
  383. package/dist/modules/public-site/liquidjs-filters/info-filter.js +144 -0
  384. package/dist/modules/public-site/liquidjs-filters/info-filter.js.map +1 -0
  385. package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.d.ts +1 -0
  386. package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js +40 -0
  387. package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js.map +1 -0
  388. package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.d.ts +6 -0
  389. package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js +25 -0
  390. package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js.map +1 -0
  391. package/dist/modules/public-site/liquidjs-filters/make-excerpt.d.ts +3 -0
  392. package/dist/modules/public-site/liquidjs-filters/make-excerpt.js +10 -0
  393. package/dist/modules/public-site/liquidjs-filters/make-excerpt.js.map +1 -0
  394. package/dist/modules/public-site/liquidjs-filters/obfuscate.d.ts +2 -0
  395. package/dist/modules/public-site/liquidjs-filters/obfuscate.js +18 -0
  396. package/dist/modules/public-site/liquidjs-filters/obfuscate.js.map +1 -0
  397. package/dist/modules/public-site/liquidjs-filters/open-graph-filter.d.ts +6 -0
  398. package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js +41 -0
  399. package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js.map +1 -0
  400. package/dist/modules/public-site/liquidjs-filters/translate-filter.d.ts +7 -0
  401. package/dist/modules/public-site/liquidjs-filters/translate-filter.js +23 -0
  402. package/dist/modules/public-site/liquidjs-filters/translate-filter.js.map +1 -0
  403. package/dist/modules/public-site/liquidjs-tags/get-page-tag.d.ts +13 -0
  404. package/dist/modules/public-site/liquidjs-tags/get-page-tag.js +69 -0
  405. package/dist/modules/public-site/liquidjs-tags/get-page-tag.js.map +1 -0
  406. package/dist/modules/public-site/liquidjs-tags/get-pages-tag.d.ts +13 -0
  407. package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js +95 -0
  408. package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js.map +1 -0
  409. package/dist/modules/public-site/liquidjs-tags/use-image-tag.d.ts +13 -0
  410. package/dist/modules/public-site/liquidjs-tags/use-image-tag.js +54 -0
  411. package/dist/modules/public-site/liquidjs-tags/use-image-tag.js.map +1 -0
  412. package/dist/modules/public-site/media-serve/_media-serve-helpers.d.ts +11 -0
  413. package/dist/modules/public-site/media-serve/_media-serve-helpers.js +26 -0
  414. package/dist/modules/public-site/media-serve/_media-serve-helpers.js.map +1 -0
  415. package/dist/modules/public-site/media-serve/media-serve.controller.d.ts +4 -0
  416. package/dist/modules/public-site/media-serve/media-serve.controller.js +140 -0
  417. package/dist/modules/public-site/media-serve/media-serve.controller.js.map +1 -0
  418. package/dist/modules/public-site/media-serve/media-serve.module.d.ts +2 -0
  419. package/dist/modules/public-site/media-serve/media-serve.module.js +20 -0
  420. package/dist/modules/public-site/media-serve/media-serve.module.js.map +1 -0
  421. package/dist/modules/public-site/oauth2-client.controller.d.ts +10 -0
  422. package/dist/modules/public-site/oauth2-client.controller.js +143 -0
  423. package/dist/modules/public-site/oauth2-client.controller.js.map +1 -0
  424. package/dist/modules/public-site/public-route/make-url.d.ts +11 -0
  425. package/dist/modules/public-site/public-route/make-url.js +150 -0
  426. package/dist/modules/public-site/public-route/make-url.js.map +1 -0
  427. package/dist/modules/public-site/public-route/public-route-parser.d.ts +16 -0
  428. package/dist/modules/public-site/public-route/public-route-parser.js +154 -0
  429. package/dist/modules/public-site/public-route/public-route-parser.js.map +1 -0
  430. package/dist/modules/public-site/public-route/raw-document-payload.d.ts +8 -0
  431. package/dist/modules/public-site/public-route/raw-document-payload.js +86 -0
  432. package/dist/modules/public-site/public-route/raw-document-payload.js.map +1 -0
  433. package/dist/modules/public-site/public-site.controller.d.ts +7 -0
  434. package/dist/modules/public-site/public-site.controller.js +58 -0
  435. package/dist/modules/public-site/public-site.controller.js.map +1 -0
  436. package/dist/modules/public-site/public-site.middleware.d.ts +5 -0
  437. package/dist/modules/public-site/public-site.middleware.js +67 -0
  438. package/dist/modules/public-site/public-site.middleware.js.map +1 -0
  439. package/dist/modules/public-site/public-site.module.d.ts +4 -0
  440. package/dist/modules/public-site/public-site.module.js +27 -0
  441. package/dist/modules/public-site/public-site.module.js.map +1 -0
  442. package/dist/modules/public-site/serve-document/serve-document.d.ts +20 -0
  443. package/dist/modules/public-site/serve-document/serve-document.js +60 -0
  444. package/dist/modules/public-site/serve-document/serve-document.js.map +1 -0
  445. package/dist/modules/security/app-throttler-guard.d.ts +8 -0
  446. package/dist/modules/security/app-throttler-guard.js +18 -0
  447. package/dist/modules/security/app-throttler-guard.js.map +1 -0
  448. package/dist/modules/security/complexity-plugin.d.ts +8 -0
  449. package/dist/modules/security/complexity-plugin.js +45 -0
  450. package/dist/modules/security/complexity-plugin.js.map +1 -0
  451. package/dist/nest-custom-logger.d.ts +8 -0
  452. package/dist/nest-custom-logger.js +23 -0
  453. package/dist/nest-custom-logger.js.map +1 -0
  454. package/dist/public-payload/breadcrumb.queries.d.ts +5 -0
  455. package/dist/public-payload/breadcrumb.queries.js +26 -0
  456. package/dist/public-payload/breadcrumb.queries.js.map +1 -0
  457. package/dist/public-payload/create-page-drop.d.ts +11 -0
  458. package/dist/public-payload/create-page-drop.js +160 -0
  459. package/dist/public-payload/create-page-drop.js.map +1 -0
  460. package/dist/public-payload/create-page-part-drop.d.ts +7 -0
  461. package/dist/public-payload/create-page-part-drop.js +39 -0
  462. package/dist/public-payload/create-page-part-drop.js.map +1 -0
  463. package/dist/public-payload/excerpt.queries.d.ts +10 -0
  464. package/dist/public-payload/excerpt.queries.js +38 -0
  465. package/dist/public-payload/excerpt.queries.js.map +1 -0
  466. package/dist/public-payload/field-values.d.ts +9 -0
  467. package/dist/public-payload/field-values.js +99 -0
  468. package/dist/public-payload/field-values.js.map +1 -0
  469. package/dist/public-payload/get-siblings.queries.d.ts +5 -0
  470. package/dist/public-payload/get-siblings.queries.js +117 -0
  471. package/dist/public-payload/get-siblings.queries.js.map +1 -0
  472. package/dist/public-payload/load-default-image.d.ts +8 -0
  473. package/dist/public-payload/load-default-image.js +52 -0
  474. package/dist/public-payload/load-default-image.js.map +1 -0
  475. package/dist/public-payload/make-basic-payload.d.ts +6 -0
  476. package/dist/public-payload/make-basic-payload.js +19 -0
  477. package/dist/public-payload/make-basic-payload.js.map +1 -0
  478. package/dist/public-payload/make-image-available.d.ts +26 -0
  479. package/dist/public-payload/make-image-available.js +38 -0
  480. package/dist/public-payload/make-image-available.js.map +1 -0
  481. package/dist/public-payload/page-values.queries.d.ts +27 -0
  482. package/dist/public-payload/page-values.queries.js +110 -0
  483. package/dist/public-payload/page-values.queries.js.map +1 -0
  484. package/dist/public-payload/parts.queries.d.ts +6 -0
  485. package/dist/public-payload/parts.queries.js +123 -0
  486. package/dist/public-payload/parts.queries.js.map +1 -0
  487. package/dist/public-payload/public-payload.types.d.ts +130 -0
  488. package/dist/public-payload/public-payload.types.js +3 -0
  489. package/dist/public-payload/public-payload.types.js.map +1 -0
  490. package/dist/public-payload/site-payload.d.ts +4 -0
  491. package/dist/public-payload/site-payload.js +43 -0
  492. package/dist/public-payload/site-payload.js.map +1 -0
  493. package/dist/public-payload/taxonomies.queries.d.ts +13 -0
  494. package/dist/public-payload/taxonomies.queries.js +45 -0
  495. package/dist/public-payload/taxonomies.queries.js.map +1 -0
  496. package/dist/public-payload/translations.queries.d.ts +7 -0
  497. package/dist/public-payload/translations.queries.js +62 -0
  498. package/dist/public-payload/translations.queries.js.map +1 -0
  499. package/dist/public.types.d.ts +5 -0
  500. package/dist/public.types.js +3 -0
  501. package/dist/public.types.js.map +1 -0
  502. package/dist/share/pino-app-log.d.ts +26 -0
  503. package/dist/share/pino-app-log.js +138 -0
  504. package/dist/share/pino-app-log.js.map +1 -0
  505. package/dist/share/read-configuration.d.ts +7 -0
  506. package/dist/share/read-configuration.js +31 -0
  507. package/dist/share/read-configuration.js.map +1 -0
  508. package/dist/site-backup/archiver.helper.d.ts +12 -0
  509. package/dist/site-backup/archiver.helper.js +43 -0
  510. package/dist/site-backup/archiver.helper.js.map +1 -0
  511. package/dist/site-backup/backup-tasks.d.ts +10 -0
  512. package/dist/site-backup/backup-tasks.js +50 -0
  513. package/dist/site-backup/backup-tasks.js.map +1 -0
  514. package/dist/site-backup/backup.d.ts +11 -0
  515. package/dist/site-backup/backup.helper.d.ts +3 -0
  516. package/dist/site-backup/backup.helper.js +13 -0
  517. package/dist/site-backup/backup.helper.js.map +1 -0
  518. package/dist/site-backup/backup.js +35 -0
  519. package/dist/site-backup/backup.js.map +1 -0
  520. package/dist/site-context/create-site-context.d.ts +3 -0
  521. package/dist/site-context/create-site-context.js +183 -0
  522. package/dist/site-context/create-site-context.js.map +1 -0
  523. package/dist/site-context/db-init/db-init.d.ts +11 -0
  524. package/dist/site-context/db-init/db-init.js +38 -0
  525. package/dist/site-context/db-init/db-init.js.map +1 -0
  526. package/dist/site-context/db-init/ddl-migration.d.ts +13 -0
  527. package/dist/site-context/db-init/ddl-migration.js +26 -0
  528. package/dist/site-context/db-init/ddl-migration.js.map +1 -0
  529. package/dist/site-context/db-init/init-routing-points.d.ts +5 -0
  530. package/dist/site-context/db-init/init-routing-points.js +149 -0
  531. package/dist/site-context/db-init/init-routing-points.js.map +1 -0
  532. package/dist/site-context/site-conf.d.ts +17 -0
  533. package/dist/site-context/site-conf.js +103 -0
  534. package/dist/site-context/site-conf.js.map +1 -0
  535. package/dist/site-context/site-context.d.ts +12 -0
  536. package/dist/site-context/site-context.js +87 -0
  537. package/dist/site-context/site-context.js.map +1 -0
  538. package/dist/site-context/site-context.types.d.ts +46 -0
  539. package/dist/site-context/site-context.types.js +3 -0
  540. package/dist/site-context/site-context.types.js.map +1 -0
  541. package/dist/site-context/theme-conf-reader.d.ts +4 -0
  542. package/dist/site-context/theme-conf-reader.js +33 -0
  543. package/dist/site-context/theme-conf-reader.js.map +1 -0
  544. package/dist/site-context/theme-conf-types.d.ts +4 -0
  545. package/dist/site-context/theme-conf-types.js +3 -0
  546. package/dist/site-context/theme-conf-types.js.map +1 -0
  547. package/dist/site-schema/common-schema-reader.d.ts +6 -0
  548. package/dist/site-schema/common-schema-reader.js +29 -0
  549. package/dist/site-schema/common-schema-reader.js.map +1 -0
  550. package/dist/site-schema/merged-schema-lib.d.ts +30 -0
  551. package/dist/site-schema/merged-schema-lib.js +118 -0
  552. package/dist/site-schema/merged-schema-lib.js.map +1 -0
  553. package/dist/site-schema/read-locales.d.ts +24 -0
  554. package/dist/site-schema/read-locales.js +171 -0
  555. package/dist/site-schema/read-locales.js.map +1 -0
  556. package/dist/site-schema/site-schema-factory.d.ts +2 -0
  557. package/dist/site-schema/site-schema-factory.js +385 -0
  558. package/dist/site-schema/site-schema-factory.js.map +1 -0
  559. package/dist/site-schema/site-schema-helpers.d.ts +5 -0
  560. package/dist/site-schema/site-schema-helpers.js +27 -0
  561. package/dist/site-schema/site-schema-helpers.js.map +1 -0
  562. package/dist/site-schema/site-schema-lib-reader.d.ts +14 -0
  563. package/dist/site-schema/site-schema-lib-reader.js +48 -0
  564. package/dist/site-schema/site-schema-lib-reader.js.map +1 -0
  565. package/dist/start.d.ts +1 -0
  566. package/dist/start.js +5 -0
  567. package/dist/start.js.map +1 -0
  568. package/dist/types.to.json +1 -0
  569. package/package.json +9 -8
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.invalidateMultipleDocumentsInCache = exports.invalidateDocumentRelationCache = exports.invalidateDocumentInCache = exports.makeCacheKey = exports.makeCacheDependencyKey = void 0;
4
+ const anywhere_lib_1 = require("@paroicms/anywhere-lib");
5
+ const load_documents_queries_1 = require("../modules/core/document/load-documents.queries");
6
+ function makeCacheDependencyKey(options) {
7
+ if ("leafId" in options) {
8
+ if ("relation" in options && options.relation === "flagged") {
9
+ const { leafId, taxonomyLeafType } = options;
10
+ return `*:${leafId}:flagged:${taxonomyLeafType}`;
11
+ }
12
+ return `*:${options.leafId}`;
13
+ }
14
+ const encodedId = (0, anywhere_lib_1.encodeSectionId)(options.documentId);
15
+ if ("relation" in options)
16
+ return `${encodedId}:${options.relation}`;
17
+ if (options.perimeter)
18
+ return `${encodedId}:${options.perimeter}`;
19
+ return encodedId;
20
+ }
21
+ exports.makeCacheDependencyKey = makeCacheDependencyKey;
22
+ function makeCacheKey(options) {
23
+ const { kind, url, urlKey, documentId } = options;
24
+ if (kind === "html")
25
+ return `${kind}:${url}`;
26
+ if (kind === "api")
27
+ return `${kind}:${url}`;
28
+ if (kind === "redirect")
29
+ return `${kind}:${urlKey}`;
30
+ if (documentId)
31
+ return `${kind}:${(0, anywhere_lib_1.encodeSectionId)(documentId)}`;
32
+ throw new Error("invalid parameter");
33
+ }
34
+ exports.makeCacheKey = makeCacheKey;
35
+ async function invalidateDocumentInCache(siteContext, options) {
36
+ const dependencyKeys = [];
37
+ const documentId = "documentId" in options
38
+ ? options.documentId
39
+ : await (0, load_documents_queries_1.getParentSectionIdOf)(siteContext, options.parentOf);
40
+ if (!documentId)
41
+ return;
42
+ const fully = "fully" in options && options.fully;
43
+ const withSlug = ("perimeter" in options && options.perimeter === "slug") || fully;
44
+ dependencyKeys.push(makeCacheDependencyKey({ documentId }), makeCacheDependencyKey({ leafId: documentId.leafId }));
45
+ if (withSlug) {
46
+ dependencyKeys.push(makeCacheDependencyKey({ documentId, perimeter: "slug" }));
47
+ }
48
+ if (fully) {
49
+ dependencyKeys.push(makeCacheDependencyKey({ documentId, relation: "children" }));
50
+ }
51
+ const parentId = "parentId" in options ? options.parentId : await (0, load_documents_queries_1.getParentSectionIdOf)(siteContext, documentId);
52
+ if (parentId) {
53
+ dependencyKeys.push(makeCacheDependencyKey({ documentId: parentId, relation: "children" }));
54
+ }
55
+ await siteContext.textCache.invalidate(dependencyKeys);
56
+ }
57
+ exports.invalidateDocumentInCache = invalidateDocumentInCache;
58
+ async function invalidateDocumentRelationCache(siteContext, options) {
59
+ await siteContext.textCache.invalidate([makeCacheDependencyKey(options)]);
60
+ }
61
+ exports.invalidateDocumentRelationCache = invalidateDocumentRelationCache;
62
+ async function invalidateMultipleDocumentsInCache(siteContext, options) {
63
+ const langs = siteContext.siteSchema.langs;
64
+ const leafId = "leafId" in options
65
+ ? options.leafId
66
+ : await (0, load_documents_queries_1.getParentLeafIdOf)(siteContext, options.parentOfLeafId);
67
+ if (leafId === undefined)
68
+ return;
69
+ const documentIds = langs.map((lang) => ({ lang, leafId }));
70
+ const dependencyKeys = [makeCacheDependencyKey({ leafId })];
71
+ for (const documentId of documentIds) {
72
+ dependencyKeys.push(makeCacheDependencyKey({ documentId }));
73
+ if (options.fully) {
74
+ dependencyKeys.push(makeCacheDependencyKey({ documentId, perimeter: "slug" }), makeCacheDependencyKey({ documentId, relation: "children" }));
75
+ }
76
+ }
77
+ const parentIds = "parentIds" in options && options.parentIds !== undefined
78
+ ? options.parentIds
79
+ : await (0, load_documents_queries_1.getParentDocumentIdsOf)(siteContext, {
80
+ langs,
81
+ leafId,
82
+ });
83
+ dependencyKeys.push(...parentIds.map((parentId) => makeCacheDependencyKey({ documentId: parentId, relation: "children" })));
84
+ await siteContext.textCache.invalidate(dependencyKeys);
85
+ }
86
+ exports.invalidateMultipleDocumentsInCache = invalidateMultipleDocumentsInCache;
87
+ //# sourceMappingURL=text-cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-cache.js","sourceRoot":"","sources":["../../src/common/text-cache.ts"],"names":[],"mappings":";;;AAAA,yDAA+E;AAC/E,4FAIyD;AAGzD,SAAgB,sBAAsB,CACpC,OAIsB;IAEtB,IAAI,QAAQ,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,UAAU,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC5D,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;YAC7C,OAAO,KAAK,MAAM,YAAY,gBAAgB,EAAE,CAAC;QACnD,CAAC;QACD,OAAO,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC;IAED,MAAM,SAAS,GAAG,IAAA,8BAAe,EAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACtD,IAAI,UAAU,IAAI,OAAO;QAAE,OAAO,GAAG,SAAS,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IACrE,IAAI,OAAO,CAAC,SAAS;QAAE,OAAO,GAAG,SAAS,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAClE,OAAO,SAAS,CAAC;AACnB,CAAC;AAnBD,wDAmBC;AAMD,SAAgB,YAAY,CAAC,OAK5B;IACC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAClD,IAAI,IAAI,KAAK,MAAM;QAAE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C,cAAc,CAAC,IAAI,CAAC,sBAAsB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;QAC5D,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAClB,cAAc,CAAC,IAAI,CACjB,sBAAsB,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EACzD,sBAAsB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAC7D,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,SAAS,GACb,WAAW,IAAI,OAAO,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS;QACvD,CAAC,CAAC,OAAO,CAAC,SAAS;QACnB,CAAC,CAAC,MAAM,IAAA,+CAAsB,EAAC,WAAW,EAAE;YACxC,KAAK;YACL,MAAM;SACP,CAAC,CAAC;IACT,cAAc,CAAC,IAAI,CACjB,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC5B,sBAAsB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CACvE,CACF,CAAC;IAEF,MAAM,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;AACzD,CAAC;AAzCD,gFAyCC"}
@@ -0,0 +1,2 @@
1
+ import type { TrackerReport } from "@paroicms/server-lib";
2
+ export declare function trackerReportToMessage(report: TrackerReport, about: string): string;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.trackerReportToMessage = void 0;
4
+ function trackerReportToMessage(report, about) {
5
+ const parts = [];
6
+ if (report.main)
7
+ parts.push(dbReportToMessage(report.main, "main"));
8
+ if (report.medias)
9
+ parts.push(dbReportToMessage(report.medias, "medias"));
10
+ if (report["text-cache"])
11
+ parts.push(dbReportToMessage(report["text-cache"], "text-cache"));
12
+ if (report["image-cache"])
13
+ parts.push(dbReportToMessage(report["image-cache"], "image-cache"));
14
+ return `${about}: ${parts.join(" • ")}`;
15
+ }
16
+ exports.trackerReportToMessage = trackerReportToMessage;
17
+ function dbReportToMessage(report, dbName) {
18
+ const parts = [];
19
+ if (report.read)
20
+ parts.push(`read(${report.read})`);
21
+ if (report.write)
22
+ parts.push(`write(${report.write})`);
23
+ if (report.delete)
24
+ parts.push(`delete(${report.delete})`);
25
+ return `${dbName}: ${parts.join(", ")}`;
26
+ }
27
+ //# sourceMappingURL=tracker-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracker-report.js","sourceRoot":"","sources":["../../src/common/tracker-report.ts"],"names":[],"mappings":";;;AAEA,SAAgB,sBAAsB,CAAC,MAAqB,EAAE,KAAa;IACzE,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,IAAI,MAAM,CAAC,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IACpE,IAAI,MAAM,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC1E,IAAI,MAAM,CAAC,YAAY,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;IAC5F,IAAI,MAAM,CAAC,aAAa,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC;IAC/F,OAAO,GAAG,KAAK,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC1C,CAAC;AAPD,wDAOC;AAED,SAAS,iBAAiB,CAAC,MAA6B,EAAE,MAAc;IACtE,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,IAAI,MAAM,CAAC,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC;IACpD,IAAI,MAAM,CAAC,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;IACvD,IAAI,MAAM,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,UAAU,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1D,OAAO,GAAG,MAAM,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { VariantName } from "@paroicms/server-image-cache-engine";
2
+ import { type SimpleTranslator } from "./helpers/simple-i18n";
3
+ import type { SiteConf } from "./site-context/site-conf";
4
+ import type { SiteSchemaLibrary } from "./site-schema/site-schema-lib-reader";
5
+ import type { Configuration } from "./typeonly/configuration-types";
6
+ export declare const dbAnyLang = ".";
7
+ export declare const packageDir: string;
8
+ export declare const appVersion: any, appName: any;
9
+ export declare const typeValidator: import("@typeonly/validator").TypeOnlyValidator;
10
+ export declare const appConf: Configuration;
11
+ export declare const platformLog: import("./share/pino-app-log").PlatformLog;
12
+ export declare const boAppVersion: {
13
+ version: any;
14
+ devTools: boolean;
15
+ };
16
+ export declare const langs: string[];
17
+ export declare const langLabels: {
18
+ [lang: string]: string;
19
+ };
20
+ export declare const thumbVariantName: VariantName;
21
+ export declare let siteConfs: Map<string, SiteConf>;
22
+ export declare function initSiteSchemaLib(val: SiteSchemaLibrary): void;
23
+ export declare function getSiteSchemaLib(): SiteSchemaLibrary;
24
+ export declare const jwtSecret: string;
25
+ export declare const jwtExpiresIn = "180d";
26
+ export declare const platformJwtSecret: string;
27
+ export declare const platformAuthUrl: string;
28
+ export declare let simpleI18n: SimpleTranslator;
29
+ export declare function initializeContext(siteConfsVal: Map<string, SiteConf>): Promise<void>;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.initializeContext = exports.simpleI18n = exports.platformAuthUrl = exports.platformJwtSecret = exports.jwtExpiresIn = exports.jwtSecret = exports.getSiteSchemaLib = exports.initSiteSchemaLib = exports.siteConfs = exports.thumbVariantName = exports.langLabels = exports.langs = exports.boAppVersion = exports.platformLog = exports.appConf = exports.typeValidator = exports.appName = exports.appVersion = exports.packageDir = exports.dbAnyLang = void 0;
5
+ const node_path_1 = require("node:path");
6
+ const validator_1 = require("@typeonly/validator");
7
+ const configuration_helpers_1 = require("./helpers/configuration.helpers");
8
+ const jwt_secret_helpers_1 = require("./helpers/jwt-secret.helpers");
9
+ const simple_i18n_1 = require("./helpers/simple-i18n");
10
+ const pino_app_log_1 = require("./share/pino-app-log");
11
+ const read_configuration_1 = require("./share/read-configuration");
12
+ exports.dbAnyLang = ".";
13
+ exports.packageDir = (0, node_path_1.dirname)(__dirname);
14
+ _a = require((0, node_path_1.join)(exports.packageDir, "package.json")), exports.appVersion = _a.version, exports.appName = _a.name;
15
+ exports.typeValidator = (0, validator_1.createValidator)({
16
+ bundle: require((0, node_path_1.join)(exports.packageDir, "dist", "types.to.json")),
17
+ });
18
+ exports.appConf = (0, read_configuration_1.readConfigFileSync)({
19
+ typeValidator: exports.typeValidator,
20
+ typeName: "Configuration",
21
+ defaultFileName: "config.json",
22
+ });
23
+ exports.platformLog = (0, pino_app_log_1.createPlatformLog)(exports.appConf.log);
24
+ exports.boAppVersion = {
25
+ version: exports.appVersion,
26
+ devTools: exports.appConf.devTools,
27
+ };
28
+ exports.langs = ["en", "fr"];
29
+ exports.langLabels = {
30
+ en: "English",
31
+ fr: "Français",
32
+ };
33
+ exports.thumbVariantName = "x200x";
34
+ let siteSchemaLib;
35
+ function initSiteSchemaLib(val) {
36
+ siteSchemaLib = val;
37
+ }
38
+ exports.initSiteSchemaLib = initSiteSchemaLib;
39
+ function getSiteSchemaLib() {
40
+ if (!siteSchemaLib) {
41
+ throw new Error("siteSchemaLib is undefined.");
42
+ }
43
+ return siteSchemaLib;
44
+ }
45
+ exports.getSiteSchemaLib = getSiteSchemaLib;
46
+ exports.jwtSecret = (0, jwt_secret_helpers_1.getJwtSecretSync)((0, node_path_1.join)((0, configuration_helpers_1.isMultiSiteConfiguration)(exports.appConf) ? exports.appConf.platformDataDir : exports.appConf.singleSite.dataDir, "jwt-secret.txt"));
47
+ exports.jwtExpiresIn = "180d";
48
+ exports.platformJwtSecret = (0, jwt_secret_helpers_1.getJwtSecretSync)((0, node_path_1.join)((0, configuration_helpers_1.isMultiSiteConfiguration)(exports.appConf) ? exports.appConf.platformDataDir : exports.appConf.singleSite.dataDir, "platform-jwt-secret.txt"));
49
+ const protocol = exports.appConf.thisServer.https ? "https" : "http";
50
+ exports.platformAuthUrl = `${protocol}://${exports.appConf.googleAuth.fqdn}${exports.appConf.thisServer.publicPort ? `:${exports.appConf.thisServer.publicPort}` : ""}/auth`;
51
+ async function initializeContext(siteConfsVal) {
52
+ exports.siteConfs = siteConfsVal;
53
+ exports.simpleI18n = await (0, simple_i18n_1.createSimpleTranslator)({
54
+ l10nDir: (0, node_path_1.join)(exports.packageDir, "locales"),
55
+ langs: exports.langs,
56
+ appLog: exports.platformLog,
57
+ });
58
+ }
59
+ exports.initializeContext = initializeContext;
60
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;;AAAA,yCAA0C;AAE1C,mDAAsD;AACtD,2EAA2E;AAC3E,qEAAgE;AAChE,uDAAsF;AACtF,uDAAyD;AACzD,mEAAgE;AAKnD,QAAA,SAAS,GAAG,GAAG,CAAC;AAEhB,QAAA,UAAU,GAAG,IAAA,mBAAO,EAAC,SAAS,CAAC,CAAC;AAChC,KAAyC,OAAO,CAAC,IAAA,gBAAI,EAAC,kBAAU,EAAE,cAAc,CAAC,CAAC,EAAvE,kBAAU,eAAQ,eAAO,WAA+C;AAEnF,QAAA,aAAa,GAAG,IA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DAAwB,EAAC,eAAO,CAAC,CAAC,CAAC,CAAC,eAAO,CAAC,eAAe,CAAC,CAAC,CAAC,eAAO,CAAC,UAAU,CAAC,OAAO,EACxF,yBAAyB,CAC1B,CACF,CAAC;AAEF,MAAM,QAAQ,GAAG,eAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;AAChD,QAAA,eAAe,GAAG,GAAG,QAAQ,MAAM,eAAO,CAAC,UAAU,CAAC,IAAI,GACrE,eAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,eAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EACxE,OAAO,CAAC;AAGD,KAAK,UAAU,iBAAiB,CAAC,YAAmC;IACzE,iBAAS,GAAG,YAAY,CAAC;IACzB,kBAAU,GAAG,MAAM,IAAA,oCAAsB,EAAC;QACxC,OAAO,EAAE,IAAA,gBAAI,EAAC,kBAAU,EAAE,SAAS,CAAC;QACpC,KAAK,EAAL,aAAK;QACL,MAAM,EAAE,mBAAW;KACpB,CAAC,CAAC;AACL,CAAC;AAPD,8CAOC"}
@@ -0,0 +1,16 @@
1
+ import type { Request, Response } from "express";
2
+ import type { SiteContext } from "../site-context/site-context.types";
3
+ export declare function serveContent({ res, status, contentType, html, or304, }: {
4
+ res: Response;
5
+ status?: number;
6
+ contentType?: string;
7
+ html: string;
8
+ or304?: {
9
+ lastModified: string;
10
+ req: Request;
11
+ };
12
+ }): void;
13
+ export declare function serve500Html(res: Response, _siteContext?: SiteContext): void;
14
+ export declare function serve404NoSiteHtml(res: Response): void;
15
+ export declare function serve304NotModified(res: Response): void;
16
+ export declare function serve301Redirect(res: Response, redirectTo: string): void;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serve301Redirect = exports.serve304NotModified = exports.serve404NoSiteHtml = exports.serve500Html = exports.serveContent = void 0;
4
+ function serveContent({ res, status, contentType, html, or304, }) {
5
+ res.status(status ?? 200);
6
+ res.setHeader("Content-Type", contentType ?? "text/html");
7
+ if (or304) {
8
+ res.append("Last-Modified", or304.lastModified);
9
+ if (or304.req.headers["if-modified-since"] === or304.lastModified) {
10
+ serve304NotModified(res);
11
+ return;
12
+ }
13
+ }
14
+ res.send(html);
15
+ res.end();
16
+ }
17
+ exports.serveContent = serveContent;
18
+ function serve500Html(res, _siteContext) {
19
+ res.status(500);
20
+ res.setHeader("Content-Type", "text/html");
21
+ res.send(`<!DOCTYPE html>
22
+ <p>Internal error</p>`);
23
+ res.end();
24
+ }
25
+ exports.serve500Html = serve500Html;
26
+ function serve404NoSiteHtml(res) {
27
+ res.status(404);
28
+ res.setHeader("Content-Type", "text/html");
29
+ res.send(`<!DOCTYPE html>
30
+ <p>404 Not Found</p>`);
31
+ res.end();
32
+ }
33
+ exports.serve404NoSiteHtml = serve404NoSiteHtml;
34
+ function serve304NotModified(res) {
35
+ res.status(304);
36
+ res.end();
37
+ }
38
+ exports.serve304NotModified = serve304NotModified;
39
+ function serve301Redirect(res, redirectTo) {
40
+ res.set("location", redirectTo);
41
+ res.status(301).send();
42
+ }
43
+ exports.serve301Redirect = serve301Redirect;
44
+ //# sourceMappingURL=http-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-helpers.js","sourceRoot":"","sources":["../../src/express/http-helpers.ts"],"names":[],"mappings":";;;AAGA,SAAgB,YAAY,CAAC,EAC3B,GAAG,EACH,MAAM,EACN,WAAW,EACX,IAAI,EACJ,KAAK,GAaN;IACC,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC;IAC1B,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,WAAW,IAAI,WAAW,CAAC,CAAC;IAC1D,IAAI,KAAK,EAAE,CAAC;QACV,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;QAChD,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK,KAAK,CAAC,YAAY,EAAE,CAAC;YAClE,mBAAmB,CAAC,GAAG,CAAC,CAAC;YACzB,OAAO;QACT,CAAC;IACH,CAAC;IACD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,GAAG,CAAC,GAAG,EAAE,CAAC;AACZ,CAAC;AA9BD,oCA8BC;AAED,SAAgB,YAAY,CAAC,GAAa,EAAE,YAA0B;IACpE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAChB,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IAC3C,GAAG,CAAC,IAAI,CAAC;sBACW,CAAC,CAAC;IACtB,GAAG,CAAC,GAAG,EAAE,CAAC;AACZ,CAAC;AAND,oCAMC;AAED,SAAgB,kBAAkB,CAAC,GAAa;IAC9C,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAChB,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IAC3C,GAAG,CAAC,IAAI,CAAC;qBACU,CAAC,CAAC;IACrB,GAAG,CAAC,GAAG,EAAE,CAAC;AACZ,CAAC;AAND,gDAMC;AAED,SAAgB,mBAAmB,CAAC,GAAa;IAC/C,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAChB,GAAG,CAAC,GAAG,EAAE,CAAC;AACZ,CAAC;AAHD,kDAGC;AAED,SAAgB,gBAAgB,CAAC,GAAa,EAAE,UAAkB;IAChE,GAAG,CAAC,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAChC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC;AAHD,4CAGC"}
@@ -0,0 +1,3 @@
1
+ import type { Request, Response } from "express";
2
+ export declare function themeAssetsMiddleware(req: Request, res: Response, next: () => void): Promise<void>;
3
+ export declare function boMiddleware(req: Request, res: Response, next: () => void): Promise<void>;
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.boMiddleware = exports.themeAssetsMiddleware = void 0;
4
+ const node_path_1 = require("node:path");
5
+ const bo_1 = require("@paroicms/bo");
6
+ const server_lib_1 = require("@paroicms/server-lib");
7
+ const site_app_1 = require("@paroicms/site-app");
8
+ const data_format_1 = require("../common/data-format");
9
+ const serve_html_or_1 = require("../common/serve-html-or");
10
+ const context_1 = require("../context");
11
+ const site_context_1 = require("../site-context/site-context");
12
+ const http_helpers_1 = require("./http-helpers");
13
+ async function themeAssetsMiddleware(req, res, next) {
14
+ let path = req.path;
15
+ if (!path.startsWith("/assets/")) {
16
+ next();
17
+ return;
18
+ }
19
+ let siteContext;
20
+ try {
21
+ siteContext = await (0, site_context_1.getSiteContext)(req.hostname);
22
+ }
23
+ catch (error) {
24
+ (0, http_helpers_1.serve404NoSiteHtml)(res);
25
+ return;
26
+ }
27
+ let pathPrefix;
28
+ let baseDir;
29
+ if (path.startsWith("/assets/site-app/")) {
30
+ pathPrefix = `${(0, data_format_1.getSiteAppBaseUrl)()}/`;
31
+ baseDir = site_app_1.distDir;
32
+ }
33
+ else {
34
+ pathPrefix = `${(0, data_format_1.getAssetsBaseUrl)(siteContext)}/`;
35
+ baseDir = (0, node_path_1.join)(siteContext.themeDir, "assets");
36
+ }
37
+ if (!path.startsWith(pathPrefix)) {
38
+ void render404Asset(siteContext, res);
39
+ return;
40
+ }
41
+ path = path.substring(pathPrefix.length);
42
+ try {
43
+ res.sendFile(path, { root: baseDir, immutable: context_1.appConf.immutableAssets }, (error) => {
44
+ if (!error)
45
+ return;
46
+ sendFileErrorHandler(error, siteContext, res, path);
47
+ });
48
+ }
49
+ catch (error) {
50
+ siteContext.siteLog.error(error);
51
+ (0, http_helpers_1.serve500Html)(res, siteContext);
52
+ }
53
+ }
54
+ exports.themeAssetsMiddleware = themeAssetsMiddleware;
55
+ async function boMiddleware(req, res, next) {
56
+ let path = req.path;
57
+ if (req.method !== "GET" ||
58
+ path.startsWith("/adm/api/v1") ||
59
+ (path !== "/adm" && !path.startsWith("/adm/"))) {
60
+ next();
61
+ return;
62
+ }
63
+ let siteContext;
64
+ try {
65
+ siteContext = await (0, site_context_1.getSiteContext)(req.hostname);
66
+ }
67
+ catch (error) {
68
+ (0, http_helpers_1.serve404NoSiteHtml)(res);
69
+ return;
70
+ }
71
+ try {
72
+ path = path.substring("/adm/".length);
73
+ if (path === "")
74
+ path = "index.html";
75
+ if (!(await (0, server_lib_1.pathExists)((0, node_path_1.join)(bo_1.distDir, path)))) {
76
+ path = "index.html";
77
+ }
78
+ res.sendFile(path, { root: bo_1.distDir }, (error) => {
79
+ if (!error)
80
+ return;
81
+ sendFileErrorHandler(error, siteContext, res, path);
82
+ });
83
+ }
84
+ catch (error) {
85
+ siteContext.siteLog.error(error);
86
+ (0, http_helpers_1.serve500Html)(res, siteContext);
87
+ }
88
+ }
89
+ exports.boMiddleware = boMiddleware;
90
+ function sendFileErrorHandler(error, siteContext, res, path) {
91
+ if ("statusCode" in error && error.statusCode === 404) {
92
+ void render404Asset(siteContext, res);
93
+ }
94
+ else {
95
+ if ("code" in error) {
96
+ if (error.code === "ECONNABORTED") {
97
+ res.end();
98
+ return;
99
+ }
100
+ siteContext.siteLog.error(`failed to serve file '${path}':`, error.code, error);
101
+ }
102
+ (0, http_helpers_1.serve500Html)(res, siteContext);
103
+ }
104
+ }
105
+ async function render404Asset(siteContext, res) {
106
+ try {
107
+ await (0, serve_html_or_1.render404Html)(siteContext, res);
108
+ }
109
+ catch (error) {
110
+ siteContext.siteLog.error("failed to render 404", error);
111
+ (0, http_helpers_1.serve500Html)(res, siteContext);
112
+ }
113
+ }
114
+ //# sourceMappingURL=static-middlewares.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static-middlewares.js","sourceRoot":"","sources":["../../src/express/static-middlewares.ts"],"names":[],"mappings":";;;AAAA,yCAAiC;AACjC,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AC;QACf,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;QACzD,IAAA,2BAAY,EAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Configuration, MultiSiteConfiguration } from "../typeonly/configuration-types";
2
+ export declare function isMultiSiteConfiguration(appConf: Configuration): appConf is MultiSiteConfiguration;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isMultiSiteConfiguration = void 0;
4
+ function isMultiSiteConfiguration(appConf) {
5
+ return "platformDataDir" in appConf;
6
+ }
7
+ exports.isMultiSiteConfiguration = isMultiSiteConfiguration;
8
+ //# sourceMappingURL=configuration.helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.helpers.js","sourceRoot":"","sources":["../../src/helpers/configuration.helpers.ts"],"names":[],"mappings":";;;AAEA,SAAgB,wBAAwB,CACtC,OAAsB;IAEtB,OAAO,iBAAiB,IAAI,OAAO,CAAC;AACtC,CAAC;AAJD,4DAIC"}
@@ -0,0 +1,2 @@
1
+ export declare function toExcerptString(rawText: string): string;
2
+ export declare function truncExcerptToWord(input: string, maxLength: number): string;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.truncExcerptToWord = exports.toExcerptString = void 0;
4
+ function toExcerptString(rawText) {
5
+ return rawText.replaceAll(/[.…,;:!?\s]+/g, replacer).trim();
6
+ }
7
+ exports.toExcerptString = toExcerptString;
8
+ function replacer(match) {
9
+ return match === " " ? " " : " ";
10
+ }
11
+ function truncExcerptToWord(input, maxLength) {
12
+ const hasEllipsis = input.charAt(input.length - 1) === "…";
13
+ const excerpt = toExcerptString(input);
14
+ let sepIndex = maxLength;
15
+ if (sepIndex >= excerpt.length) {
16
+ sepIndex = excerpt.length;
17
+ }
18
+ else {
19
+ for (sepIndex = maxLength; sepIndex >= 0; --sepIndex) {
20
+ if (excerpt.charAt(sepIndex) === " ")
21
+ break;
22
+ }
23
+ }
24
+ const result = excerpt.substring(0, sepIndex);
25
+ if (hasEllipsis || sepIndex < excerpt.length) {
26
+ return `${result}…`;
27
+ }
28
+ return result;
29
+ }
30
+ exports.truncExcerptToWord = truncExcerptToWord;
31
+ //# sourceMappingURL=excerpt.helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"excerpt.helpers.js","sourceRoot":"","sources":["../../src/helpers/excerpt.helpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,OAAe;IAC7C,OAAO,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;AAC9D,CAAC;AAFD,0CAEC;AAED,SAAS,QAAQ,CAAC,KAAa;IAC7B,OAAO,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AACnC,CAAC;AAED,SAAgB,kBAAkB,CAAC,KAAa,EAAE,SAAiB;IACjE,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC;IAC3D,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IAEvC,IAAI,QAAQ,GAAG,SAAS,CAAC;IACzB,IAAI,QAAQ,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QAC/B,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IAC5B,CAAC;SAAM,CAAC;QACN,KAAK,QAAQ,GAAG,SAAS,EAAE,QAAQ,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC;YACrD,IAAI,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,GAAG;gBAAE,MAAM;QAC9C,CAAC;IACH,CAAC;IACD,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IAE9C,IAAI,WAAW,IAAI,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QAC7C,OAAO,GAAG,MAAM,GAAG,CAAC;IACtB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAnBD,gDAmBC"}
@@ -0,0 +1,2 @@
1
+ export declare function getJwtSecretSync(file: string): string;
2
+ export declare function makeSecret(length: number): string;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeSecret = exports.getJwtSecretSync = void 0;
4
+ const node_fs_1 = require("node:fs");
5
+ function getJwtSecretSync(file) {
6
+ if (!pathExistsSync(file)) {
7
+ (0, node_fs_1.writeFileSync)(file, makeSecret(50), "utf8");
8
+ }
9
+ return (0, node_fs_1.readFileSync)(file, "utf8");
10
+ }
11
+ exports.getJwtSecretSync = getJwtSecretSync;
12
+ function makeSecret(length) {
13
+ const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
14
+ let result = "";
15
+ for (let i = 0; i < length; i++) {
16
+ result += characters.charAt(Math.floor(Math.random() * characters.length));
17
+ }
18
+ return result;
19
+ }
20
+ exports.makeSecret = makeSecret;
21
+ function pathExistsSync(path) {
22
+ try {
23
+ (0, node_fs_1.accessSync)(path);
24
+ return true;
25
+ }
26
+ catch {
27
+ return false;
28
+ }
29
+ }
30
+ //# sourceMappingURL=jwt-secret.helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jwt-secret.helpers.js","sourceRoot":"","sources":["../../src/helpers/jwt-secret.helpers.ts"],"names":[],"mappings":";;;AAAA,qCAAkE;AAElE,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,IAAA,uBAAa,EAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,IAAA,sBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC;AALD,4CAKC;AAED,SAAgB,UAAU,CAAC,MAAc;IACvC,MAAM,UAAU,GAAG,gEAAgE,CAAC;IACpF,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAPD,gCAOC;AAED,SAAS,cAAc,CAAC,IAAY;IAClC,IAAI,CAAC;QACH,IAAA,oBAAU,EAAC,IAAI,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { SiteSchema } from "@paroicms/anywhere-lib";
2
+ export declare function getDocumentLeafTypeLabel(siteSchema: SiteSchema, options: {
3
+ leafType: string;
4
+ lang: string;
5
+ }): string;
6
+ export declare function getPartLeafTypeLabel(siteSchema: SiteSchema, options: {
7
+ leafType: string;
8
+ lang: string;
9
+ }): string;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPartLeafTypeLabel = exports.getDocumentLeafTypeLabel = void 0;
4
+ function getDocumentLeafTypeLabel(siteSchema, options) {
5
+ const label = siteSchema.l10n[options.lang]?.documentTypes[options.leafType]?.label;
6
+ return typeof label === "string" ? label : options.leafType;
7
+ }
8
+ exports.getDocumentLeafTypeLabel = getDocumentLeafTypeLabel;
9
+ function getPartLeafTypeLabel(siteSchema, options) {
10
+ const label = siteSchema.l10n[options.lang]?.partTypes[options.leafType]?.label;
11
+ return typeof label === "string" ? label : options.leafType;
12
+ }
13
+ exports.getPartLeafTypeLabel = getPartLeafTypeLabel;
14
+ //# sourceMappingURL=label-translator.helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label-translator.helper.js","sourceRoot":"","sources":["../../src/helpers/label-translator.helper.ts"],"names":[],"mappings":";;;AAEA,SAAgB,wBAAwB,CACtC,UAAsB,EACtB,OAA2C;IAE3C,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;IACpF,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AAC9D,CAAC;AAND,4DAMC;AAED,SAAgB,oBAAoB,CAClC,UAAsB,EACtB,OAA2C;IAE3C,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;IAChF,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AAC9D,CAAC;AAND,oDAMC"}
@@ -0,0 +1,2 @@
1
+ export declare function hashPassword(password: string): Promise<string>;
2
+ export declare function comparePassword(password: string, passwordHash: string): Promise<boolean>;
@@ -0,0 +1,37 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,10 @@
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;