@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,87 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.watchForIdleSiteContexts = exports.unloadSiteContext = exports.getSiteContext = exports.getActiveSiteContext = exports.getActiveSiteContexts = void 0;
4
- const common_1 = require("@nestjs/common");
5
- const context_1 = require("../context");
6
- const create_site_context_1 = require("./create-site-context");
7
- const MAX_IDLE_TIME = 1000 * 60 * 20;
8
- const promises = new Map();
9
- const activeContextAndTimes = new Map();
10
- function getActiveSiteContexts() {
11
- return Array.from(activeContextAndTimes.values()).map((item) => item.siteContext);
12
- }
13
- exports.getActiveSiteContexts = getActiveSiteContexts;
14
- function getActiveSiteContext(fqdn, options = {}) {
15
- const item = activeContextAndTimes.get(fqdn);
16
- if (item) {
17
- updateLastUseTime(fqdn);
18
- return item.siteContext;
19
- }
20
- if (options.returnsUndef)
21
- return;
22
- throw new Error(`should have the site-context for '${fqdn}'`);
23
- }
24
- exports.getActiveSiteContext = getActiveSiteContext;
25
- function getSiteContext(fqdn, options = {}) {
26
- let promise = promises.get(fqdn);
27
- if (promise) {
28
- updateLastUseTime(fqdn);
29
- }
30
- else {
31
- const siteConf = context_1.siteConfs.get(fqdn);
32
- if (!siteConf) {
33
- if (options.returnsUndef)
34
- return Promise.resolve(undefined);
35
- throw new common_1.NotFoundException(`Site not found '${fqdn}'`);
36
- }
37
- promise = wrapCreateSiteContext(siteConf);
38
- promises.set(fqdn, promise);
39
- }
40
- return promise;
41
- }
42
- exports.getSiteContext = getSiteContext;
43
- async function unloadSiteContext(siteContext) {
44
- promises.delete(siteContext.fqdn);
45
- activeContextAndTimes.delete(siteContext.fqdn);
46
- await Promise.all([
47
- siteContext.imageCache.close(),
48
- siteContext.textCache.close(),
49
- siteContext.mediaStorage.close(),
50
- siteContext.mainCn.destroy(),
51
- ]);
52
- context_1.platformLog.info(`Site '${siteContext.siteName}' unloaded`);
53
- }
54
- exports.unloadSiteContext = unloadSiteContext;
55
- async function wrapCreateSiteContext(siteConf) {
56
- const siteContext = await (0, create_site_context_1.createSiteContext)(siteConf);
57
- activeContextAndTimes.set(siteConf.fqdn, {
58
- siteContext,
59
- lastUseTimeMs: Date.now(),
60
- });
61
- return siteContext;
62
- }
63
- function updateLastUseTime(fqdn) {
64
- const item = activeContextAndTimes.get(fqdn);
65
- if (item) {
66
- item.lastUseTimeMs = Date.now();
67
- }
68
- }
69
- function watchForIdleSiteContexts() {
70
- const intervalId = setInterval(closeIdlingSiteContexts, 1000 * 60 * 5);
71
- intervalId.unref();
72
- }
73
- exports.watchForIdleSiteContexts = watchForIdleSiteContexts;
74
- async function closeIdlingSiteContexts() {
75
- const limit = Date.now() - MAX_IDLE_TIME;
76
- for (const { lastUseTimeMs, siteContext } of activeContextAndTimes.values()) {
77
- if (lastUseTimeMs >= limit)
78
- continue;
79
- try {
80
- await unloadSiteContext(siteContext);
81
- }
82
- catch (error) {
83
- siteContext.siteLog.error("Error unloading site", error);
84
- }
85
- }
86
- }
87
- //# sourceMappingURL=site-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"site-context.js","sourceRoot":"","sources":["../../src/site-context/site-context.ts"],"names":[],"mappings":";;;AAAA,2CAAmD;AACnD,wCAAoD;AACpD,+DAA0D;AAI1D,MAAM,aAAa,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC;AACrC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAgC,CAAC;AACzD,MAAM,qBAAqB,GAAG,IAAI,GAAG,EA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aAAa,CAAC;IACzC,KAAK,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,IAAI,qBAAqB,CAAC,MAAM,EAAE,EAAE,CAAC;QAC5E,IAAI,aAAa,IAAI,KAAK;YAAE,SAAS;QACrC,IAAI,CAAC;YACH,MAAM,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1,46 +0,0 @@
1
- import { SiteSchema } from "@paroicms/anywhere-lib";
2
- import { MediaStorage } from "@paroicms/server-database-media-storage";
3
- import { ImageCacheEngine } from "@paroicms/server-image-cache-engine";
4
- import { TextCacheSystem } from "@paroicms/server-text-cache-system";
5
- import { Liquid } from "liquidjs";
6
- import { DataSource } from "typeorm";
7
- import { SimpleTranslator } from "../helpers/simple-i18n";
8
- import { AppLog } from "../share/pino-app-log";
9
- import { ThemeConf } from "./theme-conf-types";
10
- export interface SiteContext {
11
- fqdn: string;
12
- siteName: string;
13
- version?: string;
14
- siteDir: string;
15
- dataDir: string;
16
- cacheDir: string;
17
- backupDir: string;
18
- siteUrl: string;
19
- siteSchema: SiteSchema;
20
- mainCn: DataSource;
21
- siteIds: SiteIds;
22
- themeDir: string;
23
- liquidEngine: Liquid;
24
- mediaStorage: MediaStorage;
25
- imageCache: ImageCacheEngine;
26
- textCache: TextCacheSystem;
27
- themeTranslator: SimpleTranslator;
28
- multilingual: boolean;
29
- themeConf: ThemeConf;
30
- logNextQuery: (count?: number) => void;
31
- siteLog: AppLog;
32
- }
33
- export interface SiteIds {
34
- siteLeafId: string;
35
- homeIds: RoutingPointIds;
36
- }
37
- export interface RoutingPointIds {
38
- leafId: string;
39
- leafType: string;
40
- sectionIds: {
41
- [lang: string]: string;
42
- };
43
- children?: {
44
- [leafType: string]: RoutingPointIds;
45
- };
46
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=site-context.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"site-context.types.js","sourceRoot":"","sources":["../../src/site-context/site-context.types.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import { JsonOfThemeConf } from "../typeonly/theme-json-types";
2
- import { ThemeConf } from "./theme-conf-types";
3
- export declare function readThemeConfFile(themeDir: string): Promise<ThemeConf>;
4
- export declare function formatThemeConf(val: JsonOfThemeConf): ThemeConf;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatThemeConf = exports.readThemeConfFile = void 0;
4
- const anywhere_lib_1 = require("@paroicms/anywhere-lib");
5
- const server_image_cache_engine_1 = require("@paroicms/server-image-cache-engine");
6
- const promises_1 = require("fs/promises");
7
- const path_1 = require("path");
8
- const context_1 = require("../context");
9
- async function readThemeConfFile(themeDir) {
10
- const themeFile = (0, path_1.join)(themeDir, "theme.json");
11
- try {
12
- const content = await (0, promises_1.readFile)(themeFile, "utf-8");
13
- const data = JSON.parse(content);
14
- const result = context_1.typeValidator.validate("JsonOfThemeConf", data);
15
- if (!result.valid)
16
- throw new Error(result.error ?? "(missing message)");
17
- return formatThemeConf(data);
18
- }
19
- catch (error) {
20
- throw new Error(`invalid theme configuration '${themeFile}': ${(0, anywhere_lib_1.messageOf)(error)} `);
21
- }
22
- }
23
- exports.readThemeConfFile = readThemeConfFile;
24
- function formatThemeConf(val) {
25
- val.fTextImages.forEach(checkVariantName);
26
- return val;
27
- }
28
- exports.formatThemeConf = formatThemeConf;
29
- function checkVariantName(val) {
30
- if (!(0, server_image_cache_engine_1.isVariantName)(val))
31
- throw new Error(`invalid variant '${val}'`);
32
- }
33
- //# sourceMappingURL=theme-conf-reader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme-conf-reader.js","sourceRoot":"","sources":["../../src/site-context/theme-conf-reader.ts"],"names":[],"mappings":";;;AAAA,yDAAmD;AACnD,mFAAiF;AACjF,0CAAuC;AACvC,+BAA4B;AAC5B,wCAA2C;AAIpC,KAAK,UAAU,iBAAiB,CAAC,QAAgB;IACtD,MAAM,SAAS,GAAG,IAAA,WAAI,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAE/C,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,IAAA,mBAAQ,EAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACnD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACjC,MAAM,MAAM,GAAG,uBAAa,CAAC,QAAQ,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;QAC/D,IAAI,CAAC,MAAM,CAAC,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,mBAAmB,CAAC,CAAC;QACxE,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,gCAAgC,SAAS,MAAM,IAAA,wBAAS,EAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtF,CAAC;AACH,CAAC;AAZD,8CAYC;AAED,SAAgB,eAAe,CAAC,GAAoB;IAClD,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC1C,OAAO,GAAgB,CAAC;AAC1B,CAAC;AAHD,0CAGC;AAED,SAAS,gBAAgB,CAAC,GAAW;IACnC,IAAI,CAAC,IAAA,yCAAa,EAAC,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,GAAG,CAAC,CAAC;AACvE,CAAC"}
@@ -1,4 +0,0 @@
1
- import { VariantName } from "@paroicms/server-image-cache-engine";
2
- export interface ThemeConf {
3
- fTextImages: VariantName[];
4
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=theme-conf-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme-conf-types.js","sourceRoot":"","sources":["../../src/site-context/theme-conf-types.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import { JsonOfCommonSchema } from "../typeonly/site-schema-json-types";
2
- import { GroupedLabelLocales } from "./read-locales";
3
- export interface CommonSchema extends JsonOfCommonSchema {
4
- l10n: GroupedLabelLocales;
5
- }
6
- export declare function readCommonSchema(dir: string): Promise<CommonSchema>;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readCommonSchema = void 0;
4
- const promises_1 = require("node:fs/promises");
5
- const node_path_1 = require("node:path");
6
- const context_1 = require("../context");
7
- const read_locales_1 = require("./read-locales");
8
- async function readCommonSchema(dir) {
9
- const schema = await readJsonOfCommonSchema({ fileName: "common-schema.json", dir });
10
- const l10n = (0, read_locales_1.createEmptyGroupedLabelLocales)(schema.langs);
11
- await (0, read_locales_1.appendToSchemaLocales)({ dir, baseFileName: "common-schema.l10n" }, l10n);
12
- return {
13
- ...schema,
14
- l10n,
15
- };
16
- }
17
- exports.readCommonSchema = readCommonSchema;
18
- async function readJsonOfCommonSchema({ dir, fileName }) {
19
- const json = await (0, promises_1.readFile)((0, node_path_1.join)(dir, fileName), {
20
- encoding: "utf8",
21
- });
22
- const data = JSON.parse(json);
23
- const result = context_1.typeValidator.validate("JsonOfCommonSchema", data);
24
- if (!result.valid) {
25
- throw new Error(`invalid common-schema file '${fileName}': ${result.error ?? "(missing message)"}`);
26
- }
27
- return data;
28
- }
29
- //# sourceMappingURL=common-schema-reader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common-schema-reader.js","sourceRoot":"","sources":["../../src/site-schema/common-schema-reader.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,yCAAiC;AACjC,wCAA2C;AAE3C,iDAIwB;AAMjB,KAAK,UAAU,gBAAgB,CAAC,GAAW;IAChD,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAAC,EAAE,QAAQ,EAAE,oBAAoB,EAAE,GAAG,EAAE,CAAC,CAAC;IACrF,MAAM,IAAI,GAAG,IAAA,6CAA8B,EAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1D,MAAM,IAAA,oCAAqB,EAAC,EAAE,GAAG,EAAE,YAAY,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;IAC/E,OAAO;QACL,GAAG,MAAM;QACT,IAAI;KACL,CAAC;AACJ,CAAC;AARD,4CAQC;AAED,KAAK,UAAU,sBAAsB,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAqC;IACxF,MAAM,IAAI,GAAG,MAAM,IAAA,mBAAQ,EAAC,IAAA,gBAAI,EAAC,GAAG,EAAE,QAAQ,CAAC,EAAE;QAC/C,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,uBAAa,CAAC,QAAQ,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;IAClE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,+BAA+B,QAAQ,MAAM,MAAM,CAAC,KAAK,IAAI,mBAAmB,EAAE,CACnF,CAAC;IACJ,CAAC;IACD,OAAO,IAA0B,CAAC;AACpC,CAAC"}
@@ -1,30 +0,0 @@
1
- import { JsonOfFieldType, JsonOfImageCompressionQualityPolicy, JsonOfMediaPolicy, JsonOfModuleDocumentType, JsonOfPartSchema } from "../typeonly/site-schema-json-types";
2
- import { CommonSchema } from "./common-schema-reader";
3
- import { GroupedLabelLocales } from "./read-locales";
4
- import { SiteSchemaLibrary } from "./site-schema-lib-reader";
5
- export interface MergedSchemaLib {
6
- common: CommonSchema;
7
- module: {
8
- siteFieldLib: {
9
- [fieldName: string]: JsonOfFieldType;
10
- };
11
- sectionFieldLib: {
12
- [fieldName: string]: JsonOfFieldType;
13
- };
14
- documentTypes: {
15
- [leafType: string]: JsonOfModuleDocumentType;
16
- };
17
- partTypes: {
18
- [leafType: string]: JsonOfPartSchema;
19
- };
20
- mediaPolicies: {
21
- [policyName: string]: JsonOfMediaPolicy;
22
- };
23
- imageQualityPolicy?: JsonOfImageCompressionQualityPolicy[];
24
- site?: {
25
- fields?: (JsonOfFieldType | string)[];
26
- };
27
- };
28
- l10n: GroupedLabelLocales;
29
- }
30
- export declare function prepareLib(useModules: string[] | undefined, siteSchemaLib: SiteSchemaLibrary, langs: string[]): MergedSchemaLib;
@@ -1,118 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.prepareLib = void 0;
4
- const read_locales_1 = require("./read-locales");
5
- function prepareLib(useModules, siteSchemaLib, langs) {
6
- const result = {
7
- common: siteSchemaLib.common,
8
- module: {
9
- siteFieldLib: {},
10
- sectionFieldLib: {},
11
- documentTypes: {},
12
- partTypes: {},
13
- mediaPolicies: {},
14
- },
15
- l10n: (0, read_locales_1.createEmptyGroupedLabelLocales)(langs),
16
- };
17
- if (!useModules)
18
- return result;
19
- const allUseModules = getAllUseModules(useModules, siteSchemaLib);
20
- for (const moduleName of allUseModules) {
21
- const modLib = siteSchemaLib.modules[moduleName];
22
- if (!modLib)
23
- throw new Error(`unknown module '${moduleName}'`);
24
- const { module, l10n } = modLib;
25
- if (!containsAllLangs(langs, module.langs)) {
26
- throw new Error(`missing lang in module '${moduleName}'`);
27
- }
28
- if (modLib.module.site?.fields) {
29
- if (!result.module.site) {
30
- result.module.site = {};
31
- }
32
- if (result.module.site.fields)
33
- throw new Error("duplicated 'site.fields' in site-schema");
34
- result.module.site.fields = modLib.module.site.fields;
35
- }
36
- if (modLib.module.imageQualityPolicy) {
37
- if (result.module.imageQualityPolicy) {
38
- throw new Error("duplicated 'imageQualityPolicy' in site-schema");
39
- }
40
- result.module.imageQualityPolicy = modLib.module.imageQualityPolicy;
41
- }
42
- for (const item of module.siteFieldLib ?? []) {
43
- if (result.module.siteFieldLib[item.name]) {
44
- throw new Error(`duplicate site field '${item.name}'`);
45
- }
46
- result.module.siteFieldLib[item.name] = item;
47
- }
48
- for (const item of module.sectionFieldLib ?? []) {
49
- if (result.module.sectionFieldLib[item.name]) {
50
- throw new Error(`duplicate section field '${item.name}'`);
51
- }
52
- result.module.sectionFieldLib[item.name] = item;
53
- }
54
- for (const item of module.documentTypes ?? []) {
55
- if (result.module.documentTypes[item.leafType]) {
56
- throw new Error(`duplicate document type '${item.leafType}'`);
57
- }
58
- result.module.documentTypes[item.leafType] = item;
59
- }
60
- for (const item of module.partTypes ?? []) {
61
- if (result.module.partTypes[item.leafType]) {
62
- throw new Error(`duplicate part type '${item.leafType}'`);
63
- }
64
- result.module.partTypes[item.leafType] = item;
65
- }
66
- for (const item of module.mediaPolicies ?? []) {
67
- if (typeof item === "string")
68
- continue;
69
- if (result.module.mediaPolicies[item.policyName]) {
70
- throw new Error(`duplicate media policy '${item.policyName}'`);
71
- }
72
- result.module.mediaPolicies[item.policyName] = item;
73
- }
74
- (0, read_locales_1.mergeL10n)(l10n, result.l10n);
75
- }
76
- return result;
77
- }
78
- exports.prepareLib = prepareLib;
79
- function containsAllLangs(requiredLangs, langsToCheck) {
80
- for (const lang of requiredLangs) {
81
- if (!langsToCheck.includes(lang))
82
- return false;
83
- }
84
- return true;
85
- }
86
- function getAllUseModules(useModules, siteSchemaLib) {
87
- const result = [...useModules];
88
- const processed = new Set();
89
- walkUseModules(useModules, siteSchemaLib, result, processed);
90
- return result.length !== processed.size ? dedup(result) : result;
91
- }
92
- function walkUseModules(useModules, siteSchemaLib, result, processed) {
93
- for (const moduleName of useModules) {
94
- if (processed.has(moduleName))
95
- continue;
96
- processed.add(moduleName);
97
- const modLib = siteSchemaLib.modules[moduleName];
98
- if (!modLib)
99
- throw new Error(`unknown module '${moduleName}'`);
100
- const childUseModules = modLib.module.useModules;
101
- if (!childUseModules)
102
- continue;
103
- result.push(...childUseModules);
104
- walkUseModules(childUseModules, siteSchemaLib, result, processed);
105
- }
106
- }
107
- function dedup(arr) {
108
- const processed = new Set();
109
- const result = [];
110
- for (const item of arr) {
111
- if (processed.has(item))
112
- continue;
113
- processed.add(item);
114
- result.push(item);
115
- }
116
- return result;
117
- }
118
- //# sourceMappingURL=merged-schema-lib.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"merged-schema-lib.js","sourceRoot":"","sources":["../../src/site-schema/merged-schema-lib.ts"],"names":[],"mappings":";;;AAQA,iDAAgG;AA6BhG,SAAgB,UAAU,CACxB,UAAgC,EAChC,aAAgC,EAChC,KAAe;IAEf,MAAM,MAAM,GAAoB;QAC9B,MAAM,EAAE,aAAa,CAAC,MAAM;QAC5B,MAAM,EAAE;YACN,YAAY,EAAE,EAAE;YAChB,eAAe,EAAE,EAAE;YACnB,aAAa,EAAE,EAAE;YACjB,SAAS,EAAE,EAAE;YACb,aAAa,EAAE,EAAE;SAClB;QACD,IAAI,EAAE,IAAA,6CAA8B,EAAC,KAAK,CAAC;KAC5C,CAAC;IAEF,IAAI,CAAC,UAAU;QAAE,OAAO,MAAM,CAAC;IAE/B,MAAM,aAAa,GAAG,gBAAgB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAElE,KAAK,MAAM,UAAU,IAAI,aAAa,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACjD,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,GAAG,CAAC,CAAC;QAC/D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;QAChC,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3C,MAAM,IAAI,KAAK,CAAC,2BAA2B,UAAU,GAAG,C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eAAe,CAAC,CAAC;QAChC,cAAc,CAAC,eAAe,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACpE,CAAC;AACH,CAAC;AAED,SAAS,KAAK,CAAI,GAAQ;IACxB,MAAM,SAAS,GAAG,IAAI,GAAG,EAAK,CAAC;IAC/B,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,KAAK,MAAM,IAAI,IAAI,GAAG,EAAE,CAAC;QACvB,IAAI,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,SAAS;QAClC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,24 +0,0 @@
1
- import { LabelLocales, SchemaLocales } from "@paroicms/anywhere-lib";
2
- export declare function createEmptySchemaLocales(langs: string[]): SchemaLocales;
3
- export interface GroupedLabelLocales {
4
- [lang: string]: GroupedLanguageLabelLocales;
5
- }
6
- export interface GroupedLanguageLabelLocales {
7
- [group: string]: {
8
- [name: string]: LabelLocales;
9
- };
10
- }
11
- export declare function createEmptyGroupedLabelLocales(langs: string[]): GroupedLabelLocales;
12
- export declare function mergeL10n(from: GroupedLabelLocales, to: GroupedLabelLocales): void;
13
- export declare function importPartOfL10n(options: {
14
- from: GroupedLabelLocales;
15
- fromPath: string[];
16
- to: SchemaLocales;
17
- toPath?: string[];
18
- ifDuplicate?: "overwrite" | "merge";
19
- }): void;
20
- export declare function appendToSchemaLocales({ dir, baseFileName, }: {
21
- dir: string;
22
- baseFileName: string;
23
- }, l10n: GroupedLabelLocales): Promise<void>;
24
- export declare function completeSchemaLocales(dir: string, l10n: SchemaLocales): Promise<void>;
@@ -1,171 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.completeSchemaLocales = exports.appendToSchemaLocales = exports.importPartOfL10n = exports.mergeL10n = exports.createEmptyGroupedLabelLocales = exports.createEmptySchemaLocales = void 0;
4
- const server_lib_1 = require("@paroicms/server-lib");
5
- const promises_1 = require("fs/promises");
6
- const path_1 = require("path");
7
- const context_1 = require("../context");
8
- function createEmptySchemaLocales(langs) {
9
- const locales = {};
10
- for (const lang of langs) {
11
- locales[lang] = {
12
- documentTypes: {},
13
- partTypes: {},
14
- site: {
15
- fields: {},
16
- },
17
- };
18
- }
19
- return locales;
20
- }
21
- exports.createEmptySchemaLocales = createEmptySchemaLocales;
22
- function createEmptyGroupedLabelLocales(langs) {
23
- const locales = {};
24
- for (const lang of langs) {
25
- locales[lang] = {};
26
- }
27
- return locales;
28
- }
29
- exports.createEmptyGroupedLabelLocales = createEmptyGroupedLabelLocales;
30
- function mergeL10n(from, to) {
31
- for (const lang of Object.keys(to)) {
32
- const locales = from[lang];
33
- if (!locales)
34
- throw new Error(`missing lang '${lang}'`);
35
- for (const [groupName, group] of Object.entries(locales)) {
36
- if (!to[lang][groupName]) {
37
- to[lang][groupName] = {};
38
- }
39
- for (const [name, item] of Object.entries(group)) {
40
- if (to[lang][groupName][name]) {
41
- throw new Error(`duplicate '${groupName}.${name}', for language '${lang}'`);
42
- }
43
- to[lang][groupName][name] = item;
44
- }
45
- }
46
- }
47
- }
48
- exports.mergeL10n = mergeL10n;
49
- function importPartOfL10n(options) {
50
- for (const lang of Object.keys(options.to)) {
51
- importPartOfL10nForLang(options, lang);
52
- }
53
- }
54
- exports.importPartOfL10n = importPartOfL10n;
55
- function importPartOfL10nForLang(options, lang) {
56
- const { from, fromPath, to, ifDuplicate } = options;
57
- const toPath = options.toPath ?? fromPath;
58
- const fromLocales = from[lang];
59
- if (!fromLocales)
60
- throw new Error(`missing lang '${lang}'`);
61
- let fromCurrent = fromLocales;
62
- for (const token of fromPath) {
63
- const cur = fromCurrent[token];
64
- if (!cur || typeof cur === "string")
65
- return;
66
- fromCurrent = cur;
67
- }
68
- if (!fromCurrent)
69
- return;
70
- const toParentPath = [...toPath];
71
- const lastKey = toParentPath.pop();
72
- if (!lastKey)
73
- throw new Error("toPath should not be empty");
74
- let toCurrent = to[lang];
75
- for (const token of toParentPath) {
76
- let cur = toCurrent[token];
77
- if (typeof cur === "string")
78
- throw new Error(`should not be a string '${cur}'`);
79
- if (!cur) {
80
- toCurrent[token] = cur = {};
81
- }
82
- toCurrent = cur;
83
- }
84
- const copy = deepCopyLabelLocales(fromCurrent);
85
- if (!toCurrent[lastKey]) {
86
- toCurrent[lastKey] = copy;
87
- }
88
- else if (ifDuplicate === "overwrite") {
89
- toCurrent[lastKey] = copy;
90
- }
91
- else if (ifDuplicate === "merge") {
92
- Object.assign(toCurrent[lastKey], copy);
93
- }
94
- else {
95
- throw new Error(`duplicate '${toPath.join(".")}', for language '${lang}'`);
96
- }
97
- }
98
- function deepCopyLabelLocales(obj) {
99
- const result = {};
100
- for (const key of Object.keys(obj)) {
101
- const val = obj[key];
102
- result[key] = typeof val === "string" ? val : deepCopyLabelLocales(val);
103
- }
104
- return result;
105
- }
106
- async function appendToSchemaLocales({ dir, baseFileName, }, l10n) {
107
- const langs = Object.keys(l10n);
108
- for (const lang of langs) {
109
- const file = (0, path_1.join)(dir, `${baseFileName}.${lang}.json`);
110
- const jsonData = (await readJsonLocalesFile(file));
111
- if (!jsonData)
112
- continue;
113
- for (const group of Object.keys(jsonData)) {
114
- if (!l10n[lang][group]) {
115
- l10n[lang][group] = {};
116
- }
117
- for (const name of Object.keys(jsonData[group])) {
118
- if (l10n[lang][group][name])
119
- throw new Error(`document '${name}' already exists`);
120
- l10n[lang][group][name] = jsonData[group][name];
121
- }
122
- }
123
- }
124
- }
125
- exports.appendToSchemaLocales = appendToSchemaLocales;
126
- async function completeSchemaLocales(dir, l10n) {
127
- const langs = Object.keys(l10n);
128
- for (const lang of langs) {
129
- const file = (0, path_1.join)(dir, `site-schema.l10n.${lang}.json`);
130
- const jsonData = await readJsonLocalesFile(file);
131
- if (!jsonData)
132
- continue;
133
- recursivelyMergeLocales(jsonData.site?.fields, l10n[lang].site.fields);
134
- recursivelyMergeLocales(jsonData.documentTypes, l10n[lang].documentTypes);
135
- recursivelyMergeLocales(jsonData.partTypes, l10n[lang].partTypes);
136
- }
137
- }
138
- exports.completeSchemaLocales = completeSchemaLocales;
139
- function recursivelyMergeLocales(from, to, debug = []) {
140
- if (!from)
141
- return;
142
- for (const key of Object.keys(from)) {
143
- const fromVal = from[key];
144
- if (to[key]) {
145
- const fromValType = typeof fromVal;
146
- if (fromValType !== typeof to[key]) {
147
- throw new Error(`inconsistant locales '${to[key]}' and '${fromVal}'`);
148
- }
149
- if (fromValType === "string") {
150
- to[key] = fromVal;
151
- }
152
- else
153
- recursivelyMergeLocales(fromVal, to[key], [...debug, key]);
154
- }
155
- else {
156
- to[key] = fromVal;
157
- }
158
- }
159
- }
160
- async function readJsonLocalesFile(file) {
161
- if (!(await (0, server_lib_1.pathExists)(file)))
162
- return;
163
- const jsonContent = await (0, promises_1.readFile)(file, "utf8");
164
- const jsonData = JSON.parse(jsonContent);
165
- const result = context_1.typeValidator.validate("JsonOfLanguageSchemaLocales", jsonData);
166
- if (!result.valid) {
167
- throw new Error(`invalid site-schema '${file}': ${result.error ?? "(missing message)"}`);
168
- }
169
- return jsonData;
170
- }
171
- //# sourceMappingURL=read-locales.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"read-locales.js","sourceRoot":"","sources":["../../src/site-schema/read-locales.ts"],"names":[],"mappings":";;;AACA,qDAAkD;AAClD,0CAAuC;AACvC,+BAA4B;AAC5B,wCAA2C;AAG3C,SAAgB,wBAAwB,CAAC,KAAe;IACtD,MAAM,OAAO,GAAkB,EAAE,CAAC;IAClC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,GAAG;YACd,aAAa,EAAE,EAAE;YACjB,SAAS,EAAE,EAAE;YACb,IAAI,EAAE;gBACJ,MAAM,EAAE,EAAE;aACX;SACF,CAAC;IACJ,CAAC;IACD,OAAO,OAAO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