@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.
- package/README.md +10 -7
- package/package.json +17 -8
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -5
- package/dist/cli.js.map +0 -1
- package/dist/common/child-ordering-query.d.ts +0 -13
- package/dist/common/child-ordering-query.js +0 -107
- package/dist/common/child-ordering-query.js.map +0 -1
- package/dist/common/data-format.d.ts +0 -19
- package/dist/common/data-format.js +0 -86
- package/dist/common/data-format.js.map +0 -1
- package/dist/common/mail/html-helpers.d.ts +0 -7
- package/dist/common/mail/html-helpers.js +0 -46
- package/dist/common/mail/html-helpers.js.map +0 -1
- package/dist/common/mail/sendMail.helpers.d.ts +0 -14
- package/dist/common/mail/sendMail.helpers.js +0 -51
- package/dist/common/mail/sendMail.helpers.js.map +0 -1
- package/dist/common/media-handles.helpers.d.ts +0 -19
- package/dist/common/media-handles.helpers.js +0 -52
- package/dist/common/media-handles.helpers.js.map +0 -1
- package/dist/common/serve-html-or.d.ts +0 -16
- package/dist/common/serve-html-or.js +0 -72
- package/dist/common/serve-html-or.js.map +0 -1
- package/dist/common/text-cache.d.ts +0 -57
- package/dist/common/text-cache.js +0 -87
- package/dist/common/text-cache.js.map +0 -1
- package/dist/common/tracker-report.d.ts +0 -2
- package/dist/common/tracker-report.js +0 -27
- package/dist/common/tracker-report.js.map +0 -1
- package/dist/context.d.ts +0 -29
- package/dist/context.js +0 -60
- package/dist/context.js.map +0 -1
- package/dist/express/http-helpers.d.ts +0 -16
- package/dist/express/http-helpers.js +0 -44
- package/dist/express/http-helpers.js.map +0 -1
- package/dist/express/static-middlewares.d.ts +0 -3
- package/dist/express/static-middlewares.js +0 -114
- package/dist/express/static-middlewares.js.map +0 -1
- package/dist/helpers/configuration.helpers.d.ts +0 -2
- package/dist/helpers/configuration.helpers.js +0 -8
- package/dist/helpers/configuration.helpers.js.map +0 -1
- package/dist/helpers/excerpt.helpers.d.ts +0 -2
- package/dist/helpers/excerpt.helpers.js +0 -31
- package/dist/helpers/excerpt.helpers.js.map +0 -1
- package/dist/helpers/jwt-secret.helpers.d.ts +0 -2
- package/dist/helpers/jwt-secret.helpers.js +0 -30
- package/dist/helpers/jwt-secret.helpers.js.map +0 -1
- package/dist/helpers/label-translator.helper.d.ts +0 -9
- package/dist/helpers/label-translator.helper.js +0 -14
- package/dist/helpers/label-translator.helper.js.map +0 -1
- package/dist/helpers/passwordEncrypt-helper.d.ts +0 -2
- package/dist/helpers/passwordEncrypt-helper.js +0 -37
- package/dist/helpers/passwordEncrypt-helper.js.map +0 -1
- package/dist/helpers/relative-id-helper.d.ts +0 -10
- package/dist/helpers/relative-id-helper.js +0 -37
- package/dist/helpers/relative-id-helper.js.map +0 -1
- package/dist/helpers/simple-i18n.d.ts +0 -14
- package/dist/helpers/simple-i18n.js +0 -82
- package/dist/helpers/simple-i18n.js.map +0 -1
- package/dist/helpers/special-account.helpers.d.ts +0 -9
- package/dist/helpers/special-account.helpers.js +0 -43
- package/dist/helpers/special-account.helpers.js.map +0 -1
- package/dist/helpers/url.helpers.d.ts +0 -2
- package/dist/helpers/url.helpers.js +0 -12
- package/dist/helpers/url.helpers.js.map +0 -1
- package/dist/helpers/utils-helper.d.ts +0 -4
- package/dist/helpers/utils-helper.js +0 -32
- package/dist/helpers/utils-helper.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -69
- package/dist/index.js.map +0 -1
- package/dist/liquidjs-tools/liquidjs-drop.d.ts +0 -31
- package/dist/liquidjs-tools/liquidjs-drop.js +0 -45
- package/dist/liquidjs-tools/liquidjs-drop.js.map +0 -1
- package/dist/liquidjs-tools/liquidjs-filter.d.ts +0 -10
- package/dist/liquidjs-tools/liquidjs-filter.js +0 -23
- package/dist/liquidjs-tools/liquidjs-filter.js.map +0 -1
- package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.d.ts +0 -6
- package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.js +0 -40
- package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.js.map +0 -1
- package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.d.ts +0 -25
- package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.js +0 -35
- package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.js.map +0 -1
- package/dist/liquidjs-tools/liquidjs-utils.d.ts +0 -5
- package/dist/liquidjs-tools/liquidjs-utils.js +0 -22
- package/dist/liquidjs-tools/liquidjs-utils.js.map +0 -1
- package/dist/liquidjs-tools/render-clone/collection.d.ts +0 -1
- package/dist/liquidjs-tools/render-clone/collection.js +0 -18
- package/dist/liquidjs-tools/render-clone/collection.js.map +0 -1
- package/dist/liquidjs-tools/render-clone/forloop-drop.d.ts +0 -15
- package/dist/liquidjs-tools/render-clone/forloop-drop.js +0 -40
- package/dist/liquidjs-tools/render-clone/forloop-drop.js.map +0 -1
- package/dist/liquidjs-tools/render-clone/render.d.ts +0 -13
- package/dist/liquidjs-tools/render-clone/render.js +0 -108
- package/dist/liquidjs-tools/render-clone/render.js.map +0 -1
- package/dist/maintenance/maintenance-task.d.ts +0 -4
- package/dist/maintenance/maintenance-task.js +0 -27
- package/dist/maintenance/maintenance-task.js.map +0 -1
- package/dist/maintenance/shutdown.d.ts +0 -7
- package/dist/maintenance/shutdown.js +0 -51
- package/dist/maintenance/shutdown.js.map +0 -1
- package/dist/modules/app.controller.d.ts +0 -5
- package/dist/modules/app.controller.js +0 -89
- package/dist/modules/app.controller.js.map +0 -1
- package/dist/modules/app.module.d.ts +0 -2
- package/dist/modules/app.module.js +0 -48
- package/dist/modules/app.module.js.map +0 -1
- package/dist/modules/core/account/account.model.d.ts +0 -18
- package/dist/modules/core/account/account.model.js +0 -59
- package/dist/modules/core/account/account.model.js.map +0 -1
- package/dist/modules/core/account/account.module.d.ts +0 -2
- package/dist/modules/core/account/account.module.js +0 -20
- package/dist/modules/core/account/account.module.js.map +0 -1
- package/dist/modules/core/account/account.queries.d.ts +0 -18
- package/dist/modules/core/account/account.queries.js +0 -150
- package/dist/modules/core/account/account.queries.js.map +0 -1
- package/dist/modules/core/account/account.resolver.d.ts +0 -11
- package/dist/modules/core/account/account.resolver.js +0 -107
- package/dist/modules/core/account/account.resolver.js.map +0 -1
- package/dist/modules/core/account/account.schema.d.ts +0 -24
- package/dist/modules/core/account/account.schema.js +0 -114
- package/dist/modules/core/account/account.schema.js.map +0 -1
- package/dist/modules/core/account-auth/account-auth.module.d.ts +0 -2
- package/dist/modules/core/account-auth/account-auth.module.js +0 -24
- package/dist/modules/core/account-auth/account-auth.module.js.map +0 -1
- package/dist/modules/core/account-auth/account-auth.service.d.ts +0 -5
- package/dist/modules/core/account-auth/account-auth.service.js +0 -41
- package/dist/modules/core/account-auth/account-auth.service.js.map +0 -1
- package/dist/modules/core/account-auth/account-auth.strategy.d.ts +0 -10
- package/dist/modules/core/account-auth/account-auth.strategy.js +0 -49
- package/dist/modules/core/account-auth/account-auth.strategy.js.map +0 -1
- package/dist/modules/core/auth/auth.module.d.ts +0 -2
- package/dist/modules/core/auth/auth.module.js +0 -35
- package/dist/modules/core/auth/auth.module.js.map +0 -1
- package/dist/modules/core/auth/auth.service.d.ts +0 -11
- package/dist/modules/core/auth/auth.service.js +0 -164
- package/dist/modules/core/auth/auth.service.js.map +0 -1
- package/dist/modules/core/auth/auth.types.d.ts +0 -27
- package/dist/modules/core/auth/auth.types.js +0 -3
- package/dist/modules/core/auth/auth.types.js.map +0 -1
- package/dist/modules/core/auth/jwt.auth.guard.d.ts +0 -6
- package/dist/modules/core/auth/jwt.auth.guard.js +0 -23
- package/dist/modules/core/auth/jwt.auth.guard.js.map +0 -1
- package/dist/modules/core/auth/jwt.strategy.d.ts +0 -10
- package/dist/modules/core/auth/jwt.strategy.js +0 -35
- package/dist/modules/core/auth/jwt.strategy.js.map +0 -1
- package/dist/modules/core/backup/backup.controller.d.ts +0 -7
- package/dist/modules/core/backup/backup.controller.js +0 -61
- package/dist/modules/core/backup/backup.controller.js.map +0 -1
- package/dist/modules/core/backup/backup.module.d.ts +0 -2
- package/dist/modules/core/backup/backup.module.js +0 -22
- package/dist/modules/core/backup/backup.module.js.map +0 -1
- package/dist/modules/core/backup/backup.resolver.d.ts +0 -8
- package/dist/modules/core/backup/backup.resolver.js +0 -54
- package/dist/modules/core/backup/backup.resolver.js.map +0 -1
- package/dist/modules/core/backup/backup.shema.d.ts +0 -4
- package/dist/modules/core/backup/backup.shema.js +0 -30
- package/dist/modules/core/backup/backup.shema.js.map +0 -1
- package/dist/modules/core/core.module.d.ts +0 -2
- package/dist/modules/core/core.module.js +0 -50
- package/dist/modules/core/core.module.js.map +0 -1
- package/dist/modules/core/document/document.helper.d.ts +0 -2
- package/dist/modules/core/document/document.helper.js +0 -10
- package/dist/modules/core/document/document.helper.js.map +0 -1
- package/dist/modules/core/document/document.model.d.ts +0 -9
- package/dist/modules/core/document/document.model.js +0 -59
- package/dist/modules/core/document/document.model.js.map +0 -1
- package/dist/modules/core/document/document.module.d.ts +0 -2
- package/dist/modules/core/document/document.module.js +0 -25
- package/dist/modules/core/document/document.module.js.map +0 -1
- package/dist/modules/core/document/document.resolver.d.ts +0 -12
- package/dist/modules/core/document/document.resolver.extend.d.ts +0 -10
- package/dist/modules/core/document/document.resolver.extend.js +0 -69
- package/dist/modules/core/document/document.resolver.extend.js.map +0 -1
- package/dist/modules/core/document/document.resolver.js +0 -154
- package/dist/modules/core/document/document.resolver.js.map +0 -1
- package/dist/modules/core/document/document.schema.d.ts +0 -39
- package/dist/modules/core/document/document.schema.js +0 -181
- package/dist/modules/core/document/document.schema.js.map +0 -1
- package/dist/modules/core/document/load-documents.queries.d.ts +0 -17
- package/dist/modules/core/document/load-documents.queries.js +0 -119
- package/dist/modules/core/document/load-documents.queries.js.map +0 -1
- package/dist/modules/core/document/save-documents.queries.d.ts +0 -18
- package/dist/modules/core/document/save-documents.queries.js +0 -199
- package/dist/modules/core/document/save-documents.queries.js.map +0 -1
- package/dist/modules/core/fields/_fields.helpers.d.ts +0 -2
- package/dist/modules/core/fields/_fields.helpers.js +0 -12
- package/dist/modules/core/fields/_fields.helpers.js.map +0 -1
- package/dist/modules/core/fields/fields.model.d.ts +0 -17
- package/dist/modules/core/fields/fields.model.js +0 -99
- package/dist/modules/core/fields/fields.model.js.map +0 -1
- package/dist/modules/core/fields/fields.module.d.ts +0 -2
- package/dist/modules/core/fields/fields.module.js +0 -20
- package/dist/modules/core/fields/fields.module.js.map +0 -1
- package/dist/modules/core/fields/fields.resolver.d.ts +0 -14
- package/dist/modules/core/fields/fields.resolver.js +0 -165
- package/dist/modules/core/fields/fields.resolver.js.map +0 -1
- package/dist/modules/core/fields/load-fields.queries.d.ts +0 -20
- package/dist/modules/core/fields/load-fields.queries.js +0 -233
- package/dist/modules/core/fields/load-fields.queries.js.map +0 -1
- package/dist/modules/core/fields/quill-delta.d.ts +0 -1
- package/dist/modules/core/fields/quill-delta.js +0 -40
- package/dist/modules/core/fields/quill-delta.js.map +0 -1
- package/dist/modules/core/fields/save-fields.queries.d.ts +0 -9
- package/dist/modules/core/fields/save-fields.queries.js +0 -135
- package/dist/modules/core/fields/save-fields.queries.js.map +0 -1
- package/dist/modules/core/leaf/leaf.model.d.ts +0 -9
- package/dist/modules/core/leaf/leaf.model.js +0 -61
- package/dist/modules/core/leaf/leaf.model.js.map +0 -1
- package/dist/modules/core/leaf/leaf.module.d.ts +0 -2
- package/dist/modules/core/leaf/leaf.module.js +0 -21
- package/dist/modules/core/leaf/leaf.module.js.map +0 -1
- package/dist/modules/core/leaf/leaf.queries.d.ts +0 -21
- package/dist/modules/core/leaf/leaf.queries.js +0 -159
- package/dist/modules/core/leaf/leaf.queries.js.map +0 -1
- package/dist/modules/core/leaf/leaf.resolver.d.ts +0 -9
- package/dist/modules/core/leaf/leaf.resolver.extend.d.ts +0 -6
- package/dist/modules/core/leaf/leaf.resolver.extend.js +0 -42
- package/dist/modules/core/leaf/leaf.resolver.extend.js.map +0 -1
- package/dist/modules/core/leaf/leaf.resolver.js +0 -84
- package/dist/modules/core/leaf/leaf.resolver.js.map +0 -1
- package/dist/modules/core/leaf/leaf.schema.d.ts +0 -7
- package/dist/modules/core/leaf/leaf.schema.js +0 -45
- package/dist/modules/core/leaf/leaf.schema.js.map +0 -1
- package/dist/modules/core/leaf-item/leaf-item.model.d.ts +0 -6
- package/dist/modules/core/leaf-item/leaf-item.model.js +0 -44
- package/dist/modules/core/leaf-item/leaf-item.model.js.map +0 -1
- package/dist/modules/core/leaf-item/leaf-item.queries.d.ts +0 -9
- package/dist/modules/core/leaf-item/leaf-item.queries.js +0 -120
- package/dist/modules/core/leaf-item/leaf-item.queries.js.map +0 -1
- package/dist/modules/core/login/login.controller.d.ts +0 -8
- package/dist/modules/core/login/login.controller.js +0 -54
- package/dist/modules/core/login/login.controller.js.map +0 -1
- package/dist/modules/core/login/login.module.d.ts +0 -2
- package/dist/modules/core/login/login.module.js +0 -22
- package/dist/modules/core/login/login.module.js.map +0 -1
- package/dist/modules/core/media/media-upload.controller.d.ts +0 -21
- package/dist/modules/core/media/media-upload.controller.js +0 -160
- package/dist/modules/core/media/media-upload.controller.js.map +0 -1
- package/dist/modules/core/media/media.d.ts +0 -22
- package/dist/modules/core/media/media.js +0 -53
- package/dist/modules/core/media/media.js.map +0 -1
- package/dist/modules/core/media/media.module.d.ts +0 -2
- package/dist/modules/core/media/media.module.js +0 -22
- package/dist/modules/core/media/media.module.js.map +0 -1
- package/dist/modules/core/media/media.resolver.d.ts +0 -14
- package/dist/modules/core/media/media.resolver.js +0 -199
- package/dist/modules/core/media/media.resolver.js.map +0 -1
- package/dist/modules/core/media/media.schema.d.ts +0 -30
- package/dist/modules/core/media/media.schema.js +0 -144
- package/dist/modules/core/media/media.schema.js.map +0 -1
- package/dist/modules/core/part/part.module.d.ts +0 -2
- package/dist/modules/core/part/part.module.js +0 -21
- package/dist/modules/core/part/part.module.js.map +0 -1
- package/dist/modules/core/part/part.queries.d.ts +0 -22
- package/dist/modules/core/part/part.queries.js +0 -167
- package/dist/modules/core/part/part.queries.js.map +0 -1
- package/dist/modules/core/part/part.resolver.d.ts +0 -14
- package/dist/modules/core/part/part.resolver.extend.d.ts +0 -5
- package/dist/modules/core/part/part.resolver.extend.js +0 -49
- package/dist/modules/core/part/part.resolver.extend.js.map +0 -1
- package/dist/modules/core/part/part.resolver.js +0 -135
- package/dist/modules/core/part/part.resolver.js.map +0 -1
- package/dist/modules/core/part/part.schema.d.ts +0 -12
- package/dist/modules/core/part/part.schema.js +0 -66
- package/dist/modules/core/part/part.schema.js.map +0 -1
- package/dist/modules/core/section/section-wrap.resolver.d.ts +0 -11
- package/dist/modules/core/section/section-wrap.resolver.js +0 -168
- package/dist/modules/core/section/section-wrap.resolver.js.map +0 -1
- package/dist/modules/core/section/section.model.d.ts +0 -6
- package/dist/modules/core/section/section.model.js +0 -44
- package/dist/modules/core/section/section.model.js.map +0 -1
- package/dist/modules/core/section/section.module.d.ts +0 -2
- package/dist/modules/core/section/section.module.js +0 -21
- package/dist/modules/core/section/section.module.js.map +0 -1
- package/dist/modules/core/section/section.queries.d.ts +0 -51
- package/dist/modules/core/section/section.queries.js +0 -228
- package/dist/modules/core/section/section.queries.js.map +0 -1
- package/dist/modules/core/section/section.resolver.d.ts +0 -7
- package/dist/modules/core/section/section.resolver.js +0 -78
- package/dist/modules/core/section/section.resolver.js.map +0 -1
- package/dist/modules/core/section/section.schema.d.ts +0 -27
- package/dist/modules/core/section/section.schema.js +0 -129
- package/dist/modules/core/section/section.schema.js.map +0 -1
- package/dist/modules/core/site-info/site-info.module.d.ts +0 -2
- package/dist/modules/core/site-info/site-info.module.js +0 -20
- package/dist/modules/core/site-info/site-info.module.js.map +0 -1
- package/dist/modules/core/site-info/site-info.resolver.d.ts +0 -5
- package/dist/modules/core/site-info/site-info.resolver.js +0 -44
- package/dist/modules/core/site-info/site-info.resolver.js.map +0 -1
- package/dist/modules/core/site-info/site-info.schema.d.ts +0 -6
- package/dist/modules/core/site-info/site-info.schema.js +0 -36
- package/dist/modules/core/site-info/site-info.schema.js.map +0 -1
- package/dist/modules/core/site-schema/site-schema.module.d.ts +0 -2
- package/dist/modules/core/site-schema/site-schema.module.js +0 -20
- package/dist/modules/core/site-schema/site-schema.module.js.map +0 -1
- package/dist/modules/core/site-schema/site-schema.resolver.d.ts +0 -4
- package/dist/modules/core/site-schema/site-schema.resolver.js +0 -35
- package/dist/modules/core/site-schema/site-schema.resolver.js.map +0 -1
- package/dist/modules/core/term-flag/term-flag.model.d.ts +0 -6
- package/dist/modules/core/term-flag/term-flag.model.js +0 -45
- package/dist/modules/core/term-flag/term-flag.model.js.map +0 -1
- package/dist/modules/core/term-flag/term-flag.module.d.ts +0 -2
- package/dist/modules/core/term-flag/term-flag.module.js +0 -20
- package/dist/modules/core/term-flag/term-flag.module.js.map +0 -1
- package/dist/modules/core/term-flag/term-flag.queries.d.ts +0 -7
- package/dist/modules/core/term-flag/term-flag.queries.js +0 -44
- package/dist/modules/core/term-flag/term-flag.queries.js.map +0 -1
- package/dist/modules/core/term-flag/term-flag.resolver.d.ts +0 -5
- package/dist/modules/core/term-flag/term-flag.resolver.js +0 -47
- package/dist/modules/core/term-flag/term-flag.resolver.js.map +0 -1
- package/dist/modules/core/term-flag/term-flag.schema.d.ts +0 -9
- package/dist/modules/core/term-flag/term-flag.schema.js +0 -51
- package/dist/modules/core/term-flag/term-flag.schema.js.map +0 -1
- package/dist/modules/core/unprotected/unprotected.module.d.ts +0 -2
- package/dist/modules/core/unprotected/unprotected.module.js +0 -20
- package/dist/modules/core/unprotected/unprotected.module.js.map +0 -1
- package/dist/modules/core/unprotected/unprotected.resolver.d.ts +0 -8
- package/dist/modules/core/unprotected/unprotected.resolver.js +0 -106
- package/dist/modules/core/unprotected/unprotected.resolver.js.map +0 -1
- package/dist/modules/core/unprotected/unprotected.schema.d.ts +0 -19
- package/dist/modules/core/unprotected/unprotected.schema.js +0 -93
- package/dist/modules/core/unprotected/unprotected.schema.js.map +0 -1
- package/dist/modules/graphql.types.d.ts +0 -6
- package/dist/modules/graphql.types.js +0 -3
- package/dist/modules/graphql.types.js.map +0 -1
- package/dist/modules/private-api.module.d.ts +0 -2
- package/dist/modules/private-api.module.js +0 -50
- package/dist/modules/private-api.module.js.map +0 -1
- package/dist/modules/public-api/class-validator-options.d.ts +0 -7
- package/dist/modules/public-api/class-validator-options.js +0 -11
- package/dist/modules/public-api/class-validator-options.js.map +0 -1
- package/dist/modules/public-api/mail/contact-form-mail.d.ts +0 -8
- package/dist/modules/public-api/mail/contact-form-mail.js +0 -96
- package/dist/modules/public-api/mail/contact-form-mail.js.map +0 -1
- package/dist/modules/public-api/mail/mail.dto.d.ts +0 -8
- package/dist/modules/public-api/mail/mail.dto.js +0 -56
- package/dist/modules/public-api/mail/mail.dto.js.map +0 -1
- package/dist/modules/public-api/partials/partials-params.dto.d.ts +0 -6
- package/dist/modules/public-api/partials/partials-params.dto.js +0 -45
- package/dist/modules/public-api/partials/partials-params.dto.js.map +0 -1
- package/dist/modules/public-api/password-reset/password-reset.controller.d.ts +0 -11
- package/dist/modules/public-api/password-reset/password-reset.controller.js +0 -59
- package/dist/modules/public-api/password-reset/password-reset.controller.js.map +0 -1
- package/dist/modules/public-api/password-reset/password-reset.dto.d.ts +0 -9
- package/dist/modules/public-api/password-reset/password-reset.dto.js +0 -55
- package/dist/modules/public-api/password-reset/password-reset.dto.js.map +0 -1
- package/dist/modules/public-api/password-reset/password-reset.module.d.ts +0 -2
- package/dist/modules/public-api/password-reset/password-reset.module.js +0 -22
- package/dist/modules/public-api/password-reset/password-reset.module.js.map +0 -1
- package/dist/modules/public-api/password-reset/password-reset.service.d.ts +0 -14
- package/dist/modules/public-api/password-reset/password-reset.service.js +0 -56
- package/dist/modules/public-api/password-reset/password-reset.service.js.map +0 -1
- package/dist/modules/public-api/public-api-controller.d.ts +0 -32
- package/dist/modules/public-api/public-api-controller.js +0 -198
- package/dist/modules/public-api/public-api-controller.js.map +0 -1
- package/dist/modules/public-api/public-api.module.d.ts +0 -2
- package/dist/modules/public-api/public-api.module.js +0 -22
- package/dist/modules/public-api/public-api.module.js.map +0 -1
- package/dist/modules/public-api/search-text/search-text.dto.d.ts +0 -7
- package/dist/modules/public-api/search-text/search-text.dto.js +0 -50
- package/dist/modules/public-api/search-text/search-text.dto.js.map +0 -1
- package/dist/modules/public-api/search-text/search-text.queries.d.ts +0 -14
- package/dist/modules/public-api/search-text/search-text.queries.js +0 -58
- package/dist/modules/public-api/search-text/search-text.queries.js.map +0 -1
- package/dist/modules/public-site/app-exception-filter.d.ts +0 -4
- package/dist/modules/public-site/app-exception-filter.js +0 -41
- package/dist/modules/public-site/app-exception-filter.js.map +0 -1
- package/dist/modules/public-site/helpers/format-date.helper.d.ts +0 -4
- package/dist/modules/public-site/helpers/format-date.helper.js +0 -35
- package/dist/modules/public-site/helpers/format-date.helper.js.map +0 -1
- package/dist/modules/public-site/helpers/medias.helpers.d.ts +0 -3
- package/dist/modules/public-site/helpers/medias.helpers.js +0 -16
- package/dist/modules/public-site/helpers/medias.helpers.js.map +0 -1
- package/dist/modules/public-site/helpers/obfuscate.helper.d.ts +0 -2
- package/dist/modules/public-site/helpers/obfuscate.helper.js +0 -27
- package/dist/modules/public-site/helpers/obfuscate.helper.js.map +0 -1
- package/dist/modules/public-site/liquidjs-filters/format-date.d.ts +0 -7
- package/dist/modules/public-site/liquidjs-filters/format-date.js +0 -15
- package/dist/modules/public-site/liquidjs-filters/format-date.js.map +0 -1
- package/dist/modules/public-site/liquidjs-filters/format-number.d.ts +0 -6
- package/dist/modules/public-site/liquidjs-filters/format-number.js +0 -17
- package/dist/modules/public-site/liquidjs-filters/format-number.js.map +0 -1
- package/dist/modules/public-site/liquidjs-filters/info-filter.d.ts +0 -1
- package/dist/modules/public-site/liquidjs-filters/info-filter.js +0 -144
- package/dist/modules/public-site/liquidjs-filters/info-filter.js.map +0 -1
- package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.d.ts +0 -1
- package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js +0 -40
- package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js.map +0 -1
- package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.d.ts +0 -6
- package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js +0 -25
- package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js.map +0 -1
- package/dist/modules/public-site/liquidjs-filters/make-excerpt.d.ts +0 -3
- package/dist/modules/public-site/liquidjs-filters/make-excerpt.js +0 -10
- package/dist/modules/public-site/liquidjs-filters/make-excerpt.js.map +0 -1
- package/dist/modules/public-site/liquidjs-filters/obfuscate.d.ts +0 -2
- package/dist/modules/public-site/liquidjs-filters/obfuscate.js +0 -18
- package/dist/modules/public-site/liquidjs-filters/obfuscate.js.map +0 -1
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.d.ts +0 -6
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js +0 -41
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js.map +0 -1
- package/dist/modules/public-site/liquidjs-filters/translate-filter.d.ts +0 -7
- package/dist/modules/public-site/liquidjs-filters/translate-filter.js +0 -23
- package/dist/modules/public-site/liquidjs-filters/translate-filter.js.map +0 -1
- package/dist/modules/public-site/liquidjs-tags/get-page-tag.d.ts +0 -13
- package/dist/modules/public-site/liquidjs-tags/get-page-tag.js +0 -69
- package/dist/modules/public-site/liquidjs-tags/get-page-tag.js.map +0 -1
- package/dist/modules/public-site/liquidjs-tags/get-pages-tag.d.ts +0 -13
- package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js +0 -95
- package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js.map +0 -1
- package/dist/modules/public-site/liquidjs-tags/use-image-tag.d.ts +0 -13
- package/dist/modules/public-site/liquidjs-tags/use-image-tag.js +0 -54
- package/dist/modules/public-site/liquidjs-tags/use-image-tag.js.map +0 -1
- package/dist/modules/public-site/media-serve/_media-serve-helpers.d.ts +0 -11
- package/dist/modules/public-site/media-serve/_media-serve-helpers.js +0 -26
- package/dist/modules/public-site/media-serve/_media-serve-helpers.js.map +0 -1
- package/dist/modules/public-site/media-serve/media-serve.controller.d.ts +0 -4
- package/dist/modules/public-site/media-serve/media-serve.controller.js +0 -140
- package/dist/modules/public-site/media-serve/media-serve.controller.js.map +0 -1
- package/dist/modules/public-site/media-serve/media-serve.module.d.ts +0 -2
- package/dist/modules/public-site/media-serve/media-serve.module.js +0 -20
- package/dist/modules/public-site/media-serve/media-serve.module.js.map +0 -1
- package/dist/modules/public-site/oauth2-client.controller.d.ts +0 -10
- package/dist/modules/public-site/oauth2-client.controller.js +0 -144
- package/dist/modules/public-site/oauth2-client.controller.js.map +0 -1
- package/dist/modules/public-site/public-route/make-url.d.ts +0 -11
- package/dist/modules/public-site/public-route/make-url.js +0 -150
- package/dist/modules/public-site/public-route/make-url.js.map +0 -1
- package/dist/modules/public-site/public-route/public-route-parser.d.ts +0 -16
- package/dist/modules/public-site/public-route/public-route-parser.js +0 -154
- package/dist/modules/public-site/public-route/public-route-parser.js.map +0 -1
- package/dist/modules/public-site/public-route/raw-document-payload.d.ts +0 -8
- package/dist/modules/public-site/public-route/raw-document-payload.js +0 -86
- package/dist/modules/public-site/public-route/raw-document-payload.js.map +0 -1
- package/dist/modules/public-site/public-site.controller.d.ts +0 -7
- package/dist/modules/public-site/public-site.controller.js +0 -58
- package/dist/modules/public-site/public-site.controller.js.map +0 -1
- package/dist/modules/public-site/public-site.middleware.d.ts +0 -5
- package/dist/modules/public-site/public-site.middleware.js +0 -67
- package/dist/modules/public-site/public-site.middleware.js.map +0 -1
- package/dist/modules/public-site/public-site.module.d.ts +0 -4
- package/dist/modules/public-site/public-site.module.js +0 -27
- package/dist/modules/public-site/public-site.module.js.map +0 -1
- package/dist/modules/public-site/serve-document/serve-document.d.ts +0 -20
- package/dist/modules/public-site/serve-document/serve-document.js +0 -60
- package/dist/modules/public-site/serve-document/serve-document.js.map +0 -1
- package/dist/modules/security/app-throttler-guard.d.ts +0 -8
- package/dist/modules/security/app-throttler-guard.js +0 -18
- package/dist/modules/security/app-throttler-guard.js.map +0 -1
- package/dist/modules/security/complexity-plugin.d.ts +0 -8
- package/dist/modules/security/complexity-plugin.js +0 -46
- package/dist/modules/security/complexity-plugin.js.map +0 -1
- package/dist/nest-custom-logger.d.ts +0 -8
- package/dist/nest-custom-logger.js +0 -23
- package/dist/nest-custom-logger.js.map +0 -1
- package/dist/public-payload/breadcrumb.queries.d.ts +0 -5
- package/dist/public-payload/breadcrumb.queries.js +0 -26
- package/dist/public-payload/breadcrumb.queries.js.map +0 -1
- package/dist/public-payload/create-page-drop.d.ts +0 -11
- package/dist/public-payload/create-page-drop.js +0 -160
- package/dist/public-payload/create-page-drop.js.map +0 -1
- package/dist/public-payload/create-page-part-drop.d.ts +0 -7
- package/dist/public-payload/create-page-part-drop.js +0 -39
- package/dist/public-payload/create-page-part-drop.js.map +0 -1
- package/dist/public-payload/excerpt.queries.d.ts +0 -10
- package/dist/public-payload/excerpt.queries.js +0 -38
- package/dist/public-payload/excerpt.queries.js.map +0 -1
- package/dist/public-payload/field-values.d.ts +0 -9
- package/dist/public-payload/field-values.js +0 -99
- package/dist/public-payload/field-values.js.map +0 -1
- package/dist/public-payload/get-siblings.queries.d.ts +0 -5
- package/dist/public-payload/get-siblings.queries.js +0 -117
- package/dist/public-payload/get-siblings.queries.js.map +0 -1
- package/dist/public-payload/load-default-image.d.ts +0 -8
- package/dist/public-payload/load-default-image.js +0 -52
- package/dist/public-payload/load-default-image.js.map +0 -1
- package/dist/public-payload/make-basic-payload.d.ts +0 -6
- package/dist/public-payload/make-basic-payload.js +0 -19
- package/dist/public-payload/make-basic-payload.js.map +0 -1
- package/dist/public-payload/make-image-available.d.ts +0 -26
- package/dist/public-payload/make-image-available.js +0 -38
- package/dist/public-payload/make-image-available.js.map +0 -1
- package/dist/public-payload/page-values.queries.d.ts +0 -27
- package/dist/public-payload/page-values.queries.js +0 -110
- package/dist/public-payload/page-values.queries.js.map +0 -1
- package/dist/public-payload/parts.queries.d.ts +0 -6
- package/dist/public-payload/parts.queries.js +0 -123
- package/dist/public-payload/parts.queries.js.map +0 -1
- package/dist/public-payload/public-payload.types.d.ts +0 -130
- package/dist/public-payload/public-payload.types.js +0 -3
- package/dist/public-payload/public-payload.types.js.map +0 -1
- package/dist/public-payload/site-payload.d.ts +0 -4
- package/dist/public-payload/site-payload.js +0 -43
- package/dist/public-payload/site-payload.js.map +0 -1
- package/dist/public-payload/taxonomies.queries.d.ts +0 -13
- package/dist/public-payload/taxonomies.queries.js +0 -45
- package/dist/public-payload/taxonomies.queries.js.map +0 -1
- package/dist/public-payload/translations.queries.d.ts +0 -7
- package/dist/public-payload/translations.queries.js +0 -62
- package/dist/public-payload/translations.queries.js.map +0 -1
- package/dist/public.types.d.ts +0 -5
- package/dist/public.types.js +0 -3
- package/dist/public.types.js.map +0 -1
- package/dist/share/pino-app-log.d.ts +0 -26
- package/dist/share/pino-app-log.js +0 -138
- package/dist/share/pino-app-log.js.map +0 -1
- package/dist/share/read-configuration.d.ts +0 -7
- package/dist/share/read-configuration.js +0 -31
- package/dist/share/read-configuration.js.map +0 -1
- package/dist/site-backup/archiver.helper.d.ts +0 -12
- package/dist/site-backup/archiver.helper.js +0 -43
- package/dist/site-backup/archiver.helper.js.map +0 -1
- package/dist/site-backup/backup-tasks.d.ts +0 -10
- package/dist/site-backup/backup-tasks.js +0 -50
- package/dist/site-backup/backup-tasks.js.map +0 -1
- package/dist/site-backup/backup.d.ts +0 -11
- package/dist/site-backup/backup.helper.d.ts +0 -3
- package/dist/site-backup/backup.helper.js +0 -13
- package/dist/site-backup/backup.helper.js.map +0 -1
- package/dist/site-backup/backup.js +0 -35
- package/dist/site-backup/backup.js.map +0 -1
- package/dist/site-context/create-site-context.d.ts +0 -3
- package/dist/site-context/create-site-context.js +0 -183
- package/dist/site-context/create-site-context.js.map +0 -1
- package/dist/site-context/db-init/db-init.d.ts +0 -11
- package/dist/site-context/db-init/db-init.js +0 -38
- package/dist/site-context/db-init/db-init.js.map +0 -1
- package/dist/site-context/db-init/ddl-migration.d.ts +0 -13
- package/dist/site-context/db-init/ddl-migration.js +0 -26
- package/dist/site-context/db-init/ddl-migration.js.map +0 -1
- package/dist/site-context/db-init/init-routing-points.d.ts +0 -5
- package/dist/site-context/db-init/init-routing-points.js +0 -149
- package/dist/site-context/db-init/init-routing-points.js.map +0 -1
- package/dist/site-context/site-conf.d.ts +0 -17
- package/dist/site-context/site-conf.js +0 -103
- package/dist/site-context/site-conf.js.map +0 -1
- package/dist/site-context/site-context.d.ts +0 -12
- package/dist/site-context/site-context.js +0 -87
- package/dist/site-context/site-context.js.map +0 -1
- package/dist/site-context/site-context.types.d.ts +0 -46
- package/dist/site-context/site-context.types.js +0 -3
- package/dist/site-context/site-context.types.js.map +0 -1
- package/dist/site-context/theme-conf-reader.d.ts +0 -4
- package/dist/site-context/theme-conf-reader.js +0 -33
- package/dist/site-context/theme-conf-reader.js.map +0 -1
- package/dist/site-context/theme-conf-types.d.ts +0 -4
- package/dist/site-context/theme-conf-types.js +0 -3
- package/dist/site-context/theme-conf-types.js.map +0 -1
- package/dist/site-schema/common-schema-reader.d.ts +0 -6
- package/dist/site-schema/common-schema-reader.js +0 -29
- package/dist/site-schema/common-schema-reader.js.map +0 -1
- package/dist/site-schema/merged-schema-lib.d.ts +0 -30
- package/dist/site-schema/merged-schema-lib.js +0 -118
- package/dist/site-schema/merged-schema-lib.js.map +0 -1
- package/dist/site-schema/read-locales.d.ts +0 -24
- package/dist/site-schema/read-locales.js +0 -171
- package/dist/site-schema/read-locales.js.map +0 -1
- package/dist/site-schema/site-schema-factory.d.ts +0 -2
- package/dist/site-schema/site-schema-factory.js +0 -385
- package/dist/site-schema/site-schema-factory.js.map +0 -1
- package/dist/site-schema/site-schema-helpers.d.ts +0 -5
- package/dist/site-schema/site-schema-helpers.js +0 -27
- package/dist/site-schema/site-schema-helpers.js.map +0 -1
- package/dist/site-schema/site-schema-lib-reader.d.ts +0 -14
- package/dist/site-schema/site-schema-lib-reader.js +0 -48
- package/dist/site-schema/site-schema-lib-reader.js.map +0 -1
- package/dist/start.d.ts +0 -1
- package/dist/start.js +0 -5
- package/dist/start.js.map +0 -1
- package/dist/types.to.json +0 -1
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { ParsedSectionId } from "@paroicms/anywhere-lib";
|
|
2
|
-
import { SiteContext } from "../site-context/site-context.types";
|
|
3
|
-
export declare function makeCacheDependencyKey(options: {
|
|
4
|
-
documentId: ParsedSectionId;
|
|
5
|
-
perimeter?: "slug";
|
|
6
|
-
} | {
|
|
7
|
-
documentId: ParsedSectionId;
|
|
8
|
-
relation: "children";
|
|
9
|
-
} | {
|
|
10
|
-
leafId: string;
|
|
11
|
-
relation: "flagged";
|
|
12
|
-
taxonomyLeafType: string;
|
|
13
|
-
} | {
|
|
14
|
-
leafId: string;
|
|
15
|
-
}): string;
|
|
16
|
-
export declare function makeCacheKey(options: {
|
|
17
|
-
kind: "redirect";
|
|
18
|
-
urlKey: string;
|
|
19
|
-
}): string;
|
|
20
|
-
export declare function makeCacheKey(options: {
|
|
21
|
-
kind: "url";
|
|
22
|
-
documentId: ParsedSectionId;
|
|
23
|
-
}): string;
|
|
24
|
-
export declare function makeCacheKey(options: {
|
|
25
|
-
kind: "html";
|
|
26
|
-
url: string;
|
|
27
|
-
}): string;
|
|
28
|
-
export declare function makeCacheKey(options: {
|
|
29
|
-
kind: "api";
|
|
30
|
-
url: string;
|
|
31
|
-
}): string;
|
|
32
|
-
export declare function invalidateDocumentInCache(siteContext: Pick<SiteContext, "mainCn" | "textCache" | "siteSchema">, options: {
|
|
33
|
-
parentOf: ParsedSectionId;
|
|
34
|
-
} | {
|
|
35
|
-
documentId: ParsedSectionId;
|
|
36
|
-
perimeter?: "slug";
|
|
37
|
-
} | {
|
|
38
|
-
documentId: ParsedSectionId;
|
|
39
|
-
fully: true;
|
|
40
|
-
parentId: ParsedSectionId | undefined;
|
|
41
|
-
}): Promise<void>;
|
|
42
|
-
export declare function invalidateDocumentRelationCache(siteContext: Pick<SiteContext, "textCache">, options: {
|
|
43
|
-
documentId: ParsedSectionId;
|
|
44
|
-
relation: "children";
|
|
45
|
-
} | {
|
|
46
|
-
leafId: string;
|
|
47
|
-
relation: "flagged";
|
|
48
|
-
taxonomyLeafType: string;
|
|
49
|
-
}): Promise<void>;
|
|
50
|
-
export declare function invalidateMultipleDocumentsInCache(siteContext: Pick<SiteContext, "mainCn" | "textCache" | "siteSchema">, options: {
|
|
51
|
-
leafId: string;
|
|
52
|
-
parentIds?: ParsedSectionId[];
|
|
53
|
-
fully?: boolean;
|
|
54
|
-
} | {
|
|
55
|
-
parentOfLeafId: string;
|
|
56
|
-
fully?: boolean;
|
|
57
|
-
}): Promise<void>;
|
|
@@ -1,87 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-cache.js","sourceRoot":"","sources":["../../src/common/text-cache.ts"],"names":[],"mappings":";;;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D,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"}
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
//# sourceM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AO,GAAG,MAAM,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAC1C,CAAC"}
|
package/dist/context.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { VariantName } from "@paroicms/server-image-cache-engine";
|
|
2
|
-
import { SimpleTranslator } from "./helpers/simple-i18n";
|
|
3
|
-
import { SiteConf } from "./site-context/site-conf";
|
|
4
|
-
import { SiteSchemaLibrary } from "./site-schema/site-schema-lib-reader";
|
|
5
|
-
import { 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>;
|
package/dist/context.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
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 validator_1 = require("@typeonly/validator");
|
|
6
|
-
const path_1 = require("path");
|
|
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, path_1.dirname)(__dirname);
|
|
14
|
-
_a = require((0, 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, 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, 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, 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, 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
|
package/dist/context.js.map
DELETED
|
@@ -1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/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;
|
|
@@ -1,44 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.boMiddleware = exports.themeAssetsMiddleware = void 0;
|
|
4
|
-
const bo_1 = require("@paroicms/bo");
|
|
5
|
-
const server_lib_1 = require("@paroicms/server-lib");
|
|
6
|
-
const site_app_1 = require("@paroicms/site-app");
|
|
7
|
-
const path_1 = require("path");
|
|
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, 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, 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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static-middlewares.js","sourceRoot":"","sources":["../../src/express/static-middlewares.ts"],"names":[],"mappings":";;;AAAA,qCAAoD;AACpD,qDAAkD;AAClD,iDAA+D;AAE/D,+BAA4B;AAC5B,uDAA4E;AAC5E,2DAAwD;AACxD,wCAAqC;AACrC,+DAA8D;AAE9D,iDAAkE;AAE3D,KAAK,UAAU,qBAAqB,CAAC,GAAY,EAAE,GAAa,EAAE,IAAgB;IACvF,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IACpB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACjC,IAAI,EAAE,CAAC;QACP,OAAO;IACT,CAAC;IAED,IAAI,WAAwB,CAAC;IAC7B,IAAI,CAAC;QACH,WAAW,GAAG,MAAM,IAAA,6BAAc,EAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAA,iCAAkB,EAAC,GAAG,CAAC,CAAC;QACxB,OAAO;IACT,CAAC;IAED,IAAI,UAAkB,CAAC;IACvB,IAAI,OAAe,CAAC;IACpB,IAAI,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC;QACzC,UAAU,GAAG,GAAG,IAAA,+BAAiB,GAAE,GAAG,CAAC;QACvC,OAAO,GAAG,kBAAc,CAAC;IAC3B,CAAC;SAAM,CAAC;QACN,UAAU,GAAG,GAAG,IAAA,8BAAgB,EAAC,WAAW,CAAC,GAAG,CAAC;QACjD,OAAO,GAAG,IAAA,WAAI,EAAC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CAAC,KAAK,CAAC,yBAAyB,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAClF,CAAC;QACD,IAAA,2BAAY,EAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IACjC,CAAC;AACH,CAAC;AAED,KAAK,UAAU,cAAc,CAAC,WAAwB,EAAE,GAAa;IACnE,IAAI,CAAC;QACH,MAAM,IAAA,6BAAa,EAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;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"}
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"excerpt.helpers.js","sourceRoot":"","sources":["../../src/helpers/excerpt.helpers.ts"],"names":[],"mappings":";;;AACA,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,CAAE,KAAa;IAC9B,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,GAAI,eAAe,CAAC,KAAK,CAAC,CAAC;IAExC,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"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeSecret = exports.getJwtSecretSync = void 0;
|
|
4
|
-
const fs_1 = require("fs");
|
|
5
|
-
function getJwtSecretSync(file) {
|
|
6
|
-
if (!pathExistsSync(file)) {
|
|
7
|
-
(0, fs_1.writeFileSync)(file, makeSecret(50), "utf8");
|
|
8
|
-
}
|
|
9
|
-
return (0, 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, fs_1.accessSync)(path);
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
catch {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=jwt-secret.helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jwt-secret.helpers.js","sourceRoot":"","sources":["../../src/helpers/jwt-secret.helpers.ts"],"names":[],"mappings":";;;AAAA,2BAA6D;AAE7D,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,IAAA,kBAAa,EAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,IAAA,iBAAY,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,eAAU,EAAC,IAAI,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { 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;
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|