@paroicms/server 0.151.0 → 0.151.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -0
- package/dist/common/child-ordering-query.d.ts +13 -0
- package/dist/common/child-ordering-query.js +107 -0
- package/dist/common/child-ordering-query.js.map +1 -0
- package/dist/common/data-format.d.ts +19 -0
- package/dist/common/data-format.js +86 -0
- package/dist/common/data-format.js.map +1 -0
- package/dist/common/mail/html-helpers.d.ts +7 -0
- package/dist/common/mail/html-helpers.js +46 -0
- package/dist/common/mail/html-helpers.js.map +1 -0
- package/dist/common/mail/sendMail.helpers.d.ts +14 -0
- package/dist/common/mail/sendMail.helpers.js +51 -0
- package/dist/common/mail/sendMail.helpers.js.map +1 -0
- package/dist/common/media-handles.helpers.d.ts +19 -0
- package/dist/common/media-handles.helpers.js +52 -0
- package/dist/common/media-handles.helpers.js.map +1 -0
- package/dist/common/serve-html-or.d.ts +16 -0
- package/dist/common/serve-html-or.js +72 -0
- package/dist/common/serve-html-or.js.map +1 -0
- package/dist/common/text-cache.d.ts +57 -0
- package/dist/common/text-cache.js +87 -0
- package/dist/common/text-cache.js.map +1 -0
- package/dist/common/tracker-report.d.ts +2 -0
- package/dist/common/tracker-report.js +27 -0
- package/dist/common/tracker-report.js.map +1 -0
- package/dist/context.d.ts +29 -0
- package/dist/context.js +60 -0
- package/dist/context.js.map +1 -0
- package/dist/express/http-helpers.d.ts +16 -0
- package/dist/express/http-helpers.js +44 -0
- package/dist/express/http-helpers.js.map +1 -0
- package/dist/express/static-middlewares.d.ts +3 -0
- package/dist/express/static-middlewares.js +114 -0
- package/dist/express/static-middlewares.js.map +1 -0
- package/dist/helpers/configuration.helpers.d.ts +2 -0
- package/dist/helpers/configuration.helpers.js +8 -0
- package/dist/helpers/configuration.helpers.js.map +1 -0
- package/dist/helpers/excerpt.helpers.d.ts +2 -0
- package/dist/helpers/excerpt.helpers.js +31 -0
- package/dist/helpers/excerpt.helpers.js.map +1 -0
- package/dist/helpers/jwt-secret.helpers.d.ts +2 -0
- package/dist/helpers/jwt-secret.helpers.js +30 -0
- package/dist/helpers/jwt-secret.helpers.js.map +1 -0
- package/dist/helpers/label-translator.helper.d.ts +9 -0
- package/dist/helpers/label-translator.helper.js +14 -0
- package/dist/helpers/label-translator.helper.js.map +1 -0
- package/dist/helpers/passwordEncrypt-helper.d.ts +2 -0
- package/dist/helpers/passwordEncrypt-helper.js +37 -0
- package/dist/helpers/passwordEncrypt-helper.js.map +1 -0
- package/dist/helpers/relative-id-helper.d.ts +10 -0
- package/dist/helpers/relative-id-helper.js +37 -0
- package/dist/helpers/relative-id-helper.js.map +1 -0
- package/dist/helpers/simple-i18n.d.ts +14 -0
- package/dist/helpers/simple-i18n.js +82 -0
- package/dist/helpers/simple-i18n.js.map +1 -0
- package/dist/helpers/special-account.helpers.d.ts +9 -0
- package/dist/helpers/special-account.helpers.js +43 -0
- package/dist/helpers/special-account.helpers.js.map +1 -0
- package/dist/helpers/url.helpers.d.ts +2 -0
- package/dist/helpers/url.helpers.js +12 -0
- package/dist/helpers/url.helpers.js.map +1 -0
- package/dist/helpers/utils-helper.d.ts +4 -0
- package/dist/helpers/utils-helper.js +32 -0
- package/dist/helpers/utils-helper.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +69 -0
- package/dist/index.js.map +1 -0
- package/dist/liquidjs-tools/liquidjs-drop.d.ts +31 -0
- package/dist/liquidjs-tools/liquidjs-drop.js +45 -0
- package/dist/liquidjs-tools/liquidjs-drop.js.map +1 -0
- package/dist/liquidjs-tools/liquidjs-filter.d.ts +10 -0
- package/dist/liquidjs-tools/liquidjs-filter.js +23 -0
- package/dist/liquidjs-tools/liquidjs-filter.js.map +1 -0
- package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.d.ts +6 -0
- package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.js +40 -0
- package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.js.map +1 -0
- package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.d.ts +25 -0
- package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.js +35 -0
- package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.js.map +1 -0
- package/dist/liquidjs-tools/liquidjs-utils.d.ts +5 -0
- package/dist/liquidjs-tools/liquidjs-utils.js +22 -0
- package/dist/liquidjs-tools/liquidjs-utils.js.map +1 -0
- package/dist/liquidjs-tools/render-clone/collection.d.ts +1 -0
- package/dist/liquidjs-tools/render-clone/collection.js +18 -0
- package/dist/liquidjs-tools/render-clone/collection.js.map +1 -0
- package/dist/liquidjs-tools/render-clone/forloop-drop.d.ts +15 -0
- package/dist/liquidjs-tools/render-clone/forloop-drop.js +40 -0
- package/dist/liquidjs-tools/render-clone/forloop-drop.js.map +1 -0
- package/dist/liquidjs-tools/render-clone/render.d.ts +13 -0
- package/dist/liquidjs-tools/render-clone/render.js +108 -0
- package/dist/liquidjs-tools/render-clone/render.js.map +1 -0
- package/dist/maintenance/maintenance-task.d.ts +4 -0
- package/dist/maintenance/maintenance-task.js +27 -0
- package/dist/maintenance/maintenance-task.js.map +1 -0
- package/dist/maintenance/shutdown.d.ts +7 -0
- package/dist/maintenance/shutdown.js +51 -0
- package/dist/maintenance/shutdown.js.map +1 -0
- package/dist/modules/app.controller.d.ts +5 -0
- package/dist/modules/app.controller.js +89 -0
- package/dist/modules/app.controller.js.map +1 -0
- package/dist/modules/app.module.d.ts +2 -0
- package/dist/modules/app.module.js +48 -0
- package/dist/modules/app.module.js.map +1 -0
- package/dist/modules/core/account/account.model.d.ts +18 -0
- package/dist/modules/core/account/account.model.js +59 -0
- package/dist/modules/core/account/account.model.js.map +1 -0
- package/dist/modules/core/account/account.module.d.ts +2 -0
- package/dist/modules/core/account/account.module.js +20 -0
- package/dist/modules/core/account/account.module.js.map +1 -0
- package/dist/modules/core/account/account.queries.d.ts +18 -0
- package/dist/modules/core/account/account.queries.js +150 -0
- package/dist/modules/core/account/account.queries.js.map +1 -0
- package/dist/modules/core/account/account.resolver.d.ts +11 -0
- package/dist/modules/core/account/account.resolver.js +107 -0
- package/dist/modules/core/account/account.resolver.js.map +1 -0
- package/dist/modules/core/account/account.schema.d.ts +24 -0
- package/dist/modules/core/account/account.schema.js +114 -0
- package/dist/modules/core/account/account.schema.js.map +1 -0
- package/dist/modules/core/account-auth/account-auth.module.d.ts +2 -0
- package/dist/modules/core/account-auth/account-auth.module.js +24 -0
- package/dist/modules/core/account-auth/account-auth.module.js.map +1 -0
- package/dist/modules/core/account-auth/account-auth.service.d.ts +5 -0
- package/dist/modules/core/account-auth/account-auth.service.js +41 -0
- package/dist/modules/core/account-auth/account-auth.service.js.map +1 -0
- package/dist/modules/core/account-auth/account-auth.strategy.d.ts +10 -0
- package/dist/modules/core/account-auth/account-auth.strategy.js +48 -0
- package/dist/modules/core/account-auth/account-auth.strategy.js.map +1 -0
- package/dist/modules/core/auth/auth.module.d.ts +2 -0
- package/dist/modules/core/auth/auth.module.js +35 -0
- package/dist/modules/core/auth/auth.module.js.map +1 -0
- package/dist/modules/core/auth/auth.service.d.ts +11 -0
- package/dist/modules/core/auth/auth.service.js +163 -0
- package/dist/modules/core/auth/auth.service.js.map +1 -0
- package/dist/modules/core/auth/auth.types.d.ts +27 -0
- package/dist/modules/core/auth/auth.types.js +3 -0
- package/dist/modules/core/auth/auth.types.js.map +1 -0
- package/dist/modules/core/auth/jwt.auth.guard.d.ts +6 -0
- package/dist/modules/core/auth/jwt.auth.guard.js +23 -0
- package/dist/modules/core/auth/jwt.auth.guard.js.map +1 -0
- package/dist/modules/core/auth/jwt.strategy.d.ts +10 -0
- package/dist/modules/core/auth/jwt.strategy.js +35 -0
- package/dist/modules/core/auth/jwt.strategy.js.map +1 -0
- package/dist/modules/core/backup/backup.controller.d.ts +7 -0
- package/dist/modules/core/backup/backup.controller.js +60 -0
- package/dist/modules/core/backup/backup.controller.js.map +1 -0
- package/dist/modules/core/backup/backup.module.d.ts +2 -0
- package/dist/modules/core/backup/backup.module.js +22 -0
- package/dist/modules/core/backup/backup.module.js.map +1 -0
- package/dist/modules/core/backup/backup.resolver.d.ts +8 -0
- package/dist/modules/core/backup/backup.resolver.js +53 -0
- package/dist/modules/core/backup/backup.resolver.js.map +1 -0
- package/dist/modules/core/backup/backup.shema.d.ts +4 -0
- package/dist/modules/core/backup/backup.shema.js +30 -0
- package/dist/modules/core/backup/backup.shema.js.map +1 -0
- package/dist/modules/core/core.module.d.ts +2 -0
- package/dist/modules/core/core.module.js +50 -0
- package/dist/modules/core/core.module.js.map +1 -0
- package/dist/modules/core/document/document.helper.d.ts +2 -0
- package/dist/modules/core/document/document.helper.js +10 -0
- package/dist/modules/core/document/document.helper.js.map +1 -0
- package/dist/modules/core/document/document.model.d.ts +9 -0
- package/dist/modules/core/document/document.model.js +59 -0
- package/dist/modules/core/document/document.model.js.map +1 -0
- package/dist/modules/core/document/document.module.d.ts +2 -0
- package/dist/modules/core/document/document.module.js +25 -0
- package/dist/modules/core/document/document.module.js.map +1 -0
- package/dist/modules/core/document/document.resolver.d.ts +12 -0
- package/dist/modules/core/document/document.resolver.extend.d.ts +10 -0
- package/dist/modules/core/document/document.resolver.extend.js +69 -0
- package/dist/modules/core/document/document.resolver.extend.js.map +1 -0
- package/dist/modules/core/document/document.resolver.js +154 -0
- package/dist/modules/core/document/document.resolver.js.map +1 -0
- package/dist/modules/core/document/document.schema.d.ts +39 -0
- package/dist/modules/core/document/document.schema.js +181 -0
- package/dist/modules/core/document/document.schema.js.map +1 -0
- package/dist/modules/core/document/load-documents.queries.d.ts +17 -0
- package/dist/modules/core/document/load-documents.queries.js +119 -0
- package/dist/modules/core/document/load-documents.queries.js.map +1 -0
- package/dist/modules/core/document/save-documents.queries.d.ts +18 -0
- package/dist/modules/core/document/save-documents.queries.js +199 -0
- package/dist/modules/core/document/save-documents.queries.js.map +1 -0
- package/dist/modules/core/fields/_fields.helpers.d.ts +2 -0
- package/dist/modules/core/fields/_fields.helpers.js +12 -0
- package/dist/modules/core/fields/_fields.helpers.js.map +1 -0
- package/dist/modules/core/fields/fields.model.d.ts +17 -0
- package/dist/modules/core/fields/fields.model.js +99 -0
- package/dist/modules/core/fields/fields.model.js.map +1 -0
- package/dist/modules/core/fields/fields.module.d.ts +2 -0
- package/dist/modules/core/fields/fields.module.js +20 -0
- package/dist/modules/core/fields/fields.module.js.map +1 -0
- package/dist/modules/core/fields/fields.resolver.d.ts +14 -0
- package/dist/modules/core/fields/fields.resolver.js +165 -0
- package/dist/modules/core/fields/fields.resolver.js.map +1 -0
- package/dist/modules/core/fields/load-fields.queries.d.ts +20 -0
- package/dist/modules/core/fields/load-fields.queries.js +233 -0
- package/dist/modules/core/fields/load-fields.queries.js.map +1 -0
- package/dist/modules/core/fields/quill-delta.d.ts +1 -0
- package/dist/modules/core/fields/quill-delta.js +40 -0
- package/dist/modules/core/fields/quill-delta.js.map +1 -0
- package/dist/modules/core/fields/save-fields.queries.d.ts +9 -0
- package/dist/modules/core/fields/save-fields.queries.js +135 -0
- package/dist/modules/core/fields/save-fields.queries.js.map +1 -0
- package/dist/modules/core/leaf/leaf.model.d.ts +9 -0
- package/dist/modules/core/leaf/leaf.model.js +61 -0
- package/dist/modules/core/leaf/leaf.model.js.map +1 -0
- package/dist/modules/core/leaf/leaf.module.d.ts +2 -0
- package/dist/modules/core/leaf/leaf.module.js +21 -0
- package/dist/modules/core/leaf/leaf.module.js.map +1 -0
- package/dist/modules/core/leaf/leaf.queries.d.ts +21 -0
- package/dist/modules/core/leaf/leaf.queries.js +159 -0
- package/dist/modules/core/leaf/leaf.queries.js.map +1 -0
- package/dist/modules/core/leaf/leaf.resolver.d.ts +9 -0
- package/dist/modules/core/leaf/leaf.resolver.extend.d.ts +6 -0
- package/dist/modules/core/leaf/leaf.resolver.extend.js +42 -0
- package/dist/modules/core/leaf/leaf.resolver.extend.js.map +1 -0
- package/dist/modules/core/leaf/leaf.resolver.js +84 -0
- package/dist/modules/core/leaf/leaf.resolver.js.map +1 -0
- package/dist/modules/core/leaf/leaf.schema.d.ts +7 -0
- package/dist/modules/core/leaf/leaf.schema.js +45 -0
- package/dist/modules/core/leaf/leaf.schema.js.map +1 -0
- package/dist/modules/core/leaf-item/leaf-item.model.d.ts +6 -0
- package/dist/modules/core/leaf-item/leaf-item.model.js +44 -0
- package/dist/modules/core/leaf-item/leaf-item.model.js.map +1 -0
- package/dist/modules/core/leaf-item/leaf-item.queries.d.ts +9 -0
- package/dist/modules/core/leaf-item/leaf-item.queries.js +120 -0
- package/dist/modules/core/leaf-item/leaf-item.queries.js.map +1 -0
- package/dist/modules/core/login/login.controller.d.ts +8 -0
- package/dist/modules/core/login/login.controller.js +53 -0
- package/dist/modules/core/login/login.controller.js.map +1 -0
- package/dist/modules/core/login/login.module.d.ts +2 -0
- package/dist/modules/core/login/login.module.js +22 -0
- package/dist/modules/core/login/login.module.js.map +1 -0
- package/dist/modules/core/media/media-upload.controller.d.ts +21 -0
- package/dist/modules/core/media/media-upload.controller.js +160 -0
- package/dist/modules/core/media/media-upload.controller.js.map +1 -0
- package/dist/modules/core/media/media.d.ts +22 -0
- package/dist/modules/core/media/media.js +53 -0
- package/dist/modules/core/media/media.js.map +1 -0
- package/dist/modules/core/media/media.module.d.ts +2 -0
- package/dist/modules/core/media/media.module.js +22 -0
- package/dist/modules/core/media/media.module.js.map +1 -0
- package/dist/modules/core/media/media.resolver.d.ts +14 -0
- package/dist/modules/core/media/media.resolver.js +199 -0
- package/dist/modules/core/media/media.resolver.js.map +1 -0
- package/dist/modules/core/media/media.schema.d.ts +30 -0
- package/dist/modules/core/media/media.schema.js +144 -0
- package/dist/modules/core/media/media.schema.js.map +1 -0
- package/dist/modules/core/part/part.module.d.ts +2 -0
- package/dist/modules/core/part/part.module.js +21 -0
- package/dist/modules/core/part/part.module.js.map +1 -0
- package/dist/modules/core/part/part.queries.d.ts +22 -0
- package/dist/modules/core/part/part.queries.js +167 -0
- package/dist/modules/core/part/part.queries.js.map +1 -0
- package/dist/modules/core/part/part.resolver.d.ts +14 -0
- package/dist/modules/core/part/part.resolver.extend.d.ts +5 -0
- package/dist/modules/core/part/part.resolver.extend.js +49 -0
- package/dist/modules/core/part/part.resolver.extend.js.map +1 -0
- package/dist/modules/core/part/part.resolver.js +135 -0
- package/dist/modules/core/part/part.resolver.js.map +1 -0
- package/dist/modules/core/part/part.schema.d.ts +12 -0
- package/dist/modules/core/part/part.schema.js +66 -0
- package/dist/modules/core/part/part.schema.js.map +1 -0
- package/dist/modules/core/section/section-wrap.resolver.d.ts +11 -0
- package/dist/modules/core/section/section-wrap.resolver.js +168 -0
- package/dist/modules/core/section/section-wrap.resolver.js.map +1 -0
- package/dist/modules/core/section/section.model.d.ts +6 -0
- package/dist/modules/core/section/section.model.js +44 -0
- package/dist/modules/core/section/section.model.js.map +1 -0
- package/dist/modules/core/section/section.module.d.ts +2 -0
- package/dist/modules/core/section/section.module.js +21 -0
- package/dist/modules/core/section/section.module.js.map +1 -0
- package/dist/modules/core/section/section.queries.d.ts +51 -0
- package/dist/modules/core/section/section.queries.js +228 -0
- package/dist/modules/core/section/section.queries.js.map +1 -0
- package/dist/modules/core/section/section.resolver.d.ts +7 -0
- package/dist/modules/core/section/section.resolver.js +78 -0
- package/dist/modules/core/section/section.resolver.js.map +1 -0
- package/dist/modules/core/section/section.schema.d.ts +27 -0
- package/dist/modules/core/section/section.schema.js +129 -0
- package/dist/modules/core/section/section.schema.js.map +1 -0
- package/dist/modules/core/site-info/site-info.module.d.ts +2 -0
- package/dist/modules/core/site-info/site-info.module.js +20 -0
- package/dist/modules/core/site-info/site-info.module.js.map +1 -0
- package/dist/modules/core/site-info/site-info.resolver.d.ts +5 -0
- package/dist/modules/core/site-info/site-info.resolver.js +44 -0
- package/dist/modules/core/site-info/site-info.resolver.js.map +1 -0
- package/dist/modules/core/site-info/site-info.schema.d.ts +6 -0
- package/dist/modules/core/site-info/site-info.schema.js +36 -0
- package/dist/modules/core/site-info/site-info.schema.js.map +1 -0
- package/dist/modules/core/site-schema/site-schema.module.d.ts +2 -0
- package/dist/modules/core/site-schema/site-schema.module.js +20 -0
- package/dist/modules/core/site-schema/site-schema.module.js.map +1 -0
- package/dist/modules/core/site-schema/site-schema.resolver.d.ts +4 -0
- package/dist/modules/core/site-schema/site-schema.resolver.js +35 -0
- package/dist/modules/core/site-schema/site-schema.resolver.js.map +1 -0
- package/dist/modules/core/term-flag/term-flag.model.d.ts +6 -0
- package/dist/modules/core/term-flag/term-flag.model.js +45 -0
- package/dist/modules/core/term-flag/term-flag.model.js.map +1 -0
- package/dist/modules/core/term-flag/term-flag.module.d.ts +2 -0
- package/dist/modules/core/term-flag/term-flag.module.js +20 -0
- package/dist/modules/core/term-flag/term-flag.module.js.map +1 -0
- package/dist/modules/core/term-flag/term-flag.queries.d.ts +7 -0
- package/dist/modules/core/term-flag/term-flag.queries.js +44 -0
- package/dist/modules/core/term-flag/term-flag.queries.js.map +1 -0
- package/dist/modules/core/term-flag/term-flag.resolver.d.ts +5 -0
- package/dist/modules/core/term-flag/term-flag.resolver.js +47 -0
- package/dist/modules/core/term-flag/term-flag.resolver.js.map +1 -0
- package/dist/modules/core/term-flag/term-flag.schema.d.ts +9 -0
- package/dist/modules/core/term-flag/term-flag.schema.js +51 -0
- package/dist/modules/core/term-flag/term-flag.schema.js.map +1 -0
- package/dist/modules/core/unprotected/unprotected.module.d.ts +2 -0
- package/dist/modules/core/unprotected/unprotected.module.js +20 -0
- package/dist/modules/core/unprotected/unprotected.module.js.map +1 -0
- package/dist/modules/core/unprotected/unprotected.resolver.d.ts +8 -0
- package/dist/modules/core/unprotected/unprotected.resolver.js +106 -0
- package/dist/modules/core/unprotected/unprotected.resolver.js.map +1 -0
- package/dist/modules/core/unprotected/unprotected.schema.d.ts +19 -0
- package/dist/modules/core/unprotected/unprotected.schema.js +93 -0
- package/dist/modules/core/unprotected/unprotected.schema.js.map +1 -0
- package/dist/modules/graphql.types.d.ts +6 -0
- package/dist/modules/graphql.types.js +3 -0
- package/dist/modules/graphql.types.js.map +1 -0
- package/dist/modules/private-api.module.d.ts +2 -0
- package/dist/modules/private-api.module.js +50 -0
- package/dist/modules/private-api.module.js.map +1 -0
- package/dist/modules/public-api/class-validator-options.d.ts +7 -0
- package/dist/modules/public-api/class-validator-options.js +11 -0
- package/dist/modules/public-api/class-validator-options.js.map +1 -0
- package/dist/modules/public-api/mail/contact-form-mail.d.ts +8 -0
- package/dist/modules/public-api/mail/contact-form-mail.js +96 -0
- package/dist/modules/public-api/mail/contact-form-mail.js.map +1 -0
- package/dist/modules/public-api/mail/mail.dto.d.ts +8 -0
- package/dist/modules/public-api/mail/mail.dto.js +56 -0
- package/dist/modules/public-api/mail/mail.dto.js.map +1 -0
- package/dist/modules/public-api/partials/partials-params.dto.d.ts +6 -0
- package/dist/modules/public-api/partials/partials-params.dto.js +45 -0
- package/dist/modules/public-api/partials/partials-params.dto.js.map +1 -0
- package/dist/modules/public-api/password-reset/password-reset.controller.d.ts +11 -0
- package/dist/modules/public-api/password-reset/password-reset.controller.js +57 -0
- package/dist/modules/public-api/password-reset/password-reset.controller.js.map +1 -0
- package/dist/modules/public-api/password-reset/password-reset.dto.d.ts +9 -0
- package/dist/modules/public-api/password-reset/password-reset.dto.js +55 -0
- package/dist/modules/public-api/password-reset/password-reset.dto.js.map +1 -0
- package/dist/modules/public-api/password-reset/password-reset.module.d.ts +2 -0
- package/dist/modules/public-api/password-reset/password-reset.module.js +22 -0
- package/dist/modules/public-api/password-reset/password-reset.module.js.map +1 -0
- package/dist/modules/public-api/password-reset/password-reset.service.d.ts +14 -0
- package/dist/modules/public-api/password-reset/password-reset.service.js +56 -0
- package/dist/modules/public-api/password-reset/password-reset.service.js.map +1 -0
- package/dist/modules/public-api/public-api-controller.d.ts +32 -0
- package/dist/modules/public-api/public-api-controller.js +195 -0
- package/dist/modules/public-api/public-api-controller.js.map +1 -0
- package/dist/modules/public-api/public-api.module.d.ts +2 -0
- package/dist/modules/public-api/public-api.module.js +22 -0
- package/dist/modules/public-api/public-api.module.js.map +1 -0
- package/dist/modules/public-api/search-text/search-text.dto.d.ts +7 -0
- package/dist/modules/public-api/search-text/search-text.dto.js +50 -0
- package/dist/modules/public-api/search-text/search-text.dto.js.map +1 -0
- package/dist/modules/public-api/search-text/search-text.queries.d.ts +14 -0
- package/dist/modules/public-api/search-text/search-text.queries.js +58 -0
- package/dist/modules/public-api/search-text/search-text.queries.js.map +1 -0
- package/dist/modules/public-site/app-exception-filter.d.ts +4 -0
- package/dist/modules/public-site/app-exception-filter.js +41 -0
- package/dist/modules/public-site/app-exception-filter.js.map +1 -0
- package/dist/modules/public-site/helpers/format-date.helper.d.ts +4 -0
- package/dist/modules/public-site/helpers/format-date.helper.js +35 -0
- package/dist/modules/public-site/helpers/format-date.helper.js.map +1 -0
- package/dist/modules/public-site/helpers/medias.helpers.d.ts +3 -0
- package/dist/modules/public-site/helpers/medias.helpers.js +16 -0
- package/dist/modules/public-site/helpers/medias.helpers.js.map +1 -0
- package/dist/modules/public-site/helpers/obfuscate.helper.d.ts +2 -0
- package/dist/modules/public-site/helpers/obfuscate.helper.js +27 -0
- package/dist/modules/public-site/helpers/obfuscate.helper.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/format-date.d.ts +7 -0
- package/dist/modules/public-site/liquidjs-filters/format-date.js +15 -0
- package/dist/modules/public-site/liquidjs-filters/format-date.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/format-number.d.ts +6 -0
- package/dist/modules/public-site/liquidjs-filters/format-number.js +17 -0
- package/dist/modules/public-site/liquidjs-filters/format-number.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/info-filter.d.ts +1 -0
- package/dist/modules/public-site/liquidjs-filters/info-filter.js +144 -0
- package/dist/modules/public-site/liquidjs-filters/info-filter.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.d.ts +1 -0
- package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js +40 -0
- package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.d.ts +6 -0
- package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js +25 -0
- package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/make-excerpt.d.ts +3 -0
- package/dist/modules/public-site/liquidjs-filters/make-excerpt.js +10 -0
- package/dist/modules/public-site/liquidjs-filters/make-excerpt.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/obfuscate.d.ts +2 -0
- package/dist/modules/public-site/liquidjs-filters/obfuscate.js +18 -0
- package/dist/modules/public-site/liquidjs-filters/obfuscate.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.d.ts +6 -0
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js +41 -0
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.d.ts +7 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.js +23 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.js.map +1 -0
- package/dist/modules/public-site/liquidjs-tags/get-page-tag.d.ts +13 -0
- package/dist/modules/public-site/liquidjs-tags/get-page-tag.js +69 -0
- package/dist/modules/public-site/liquidjs-tags/get-page-tag.js.map +1 -0
- package/dist/modules/public-site/liquidjs-tags/get-pages-tag.d.ts +13 -0
- package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js +95 -0
- package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js.map +1 -0
- package/dist/modules/public-site/liquidjs-tags/use-image-tag.d.ts +13 -0
- package/dist/modules/public-site/liquidjs-tags/use-image-tag.js +54 -0
- package/dist/modules/public-site/liquidjs-tags/use-image-tag.js.map +1 -0
- package/dist/modules/public-site/media-serve/_media-serve-helpers.d.ts +11 -0
- package/dist/modules/public-site/media-serve/_media-serve-helpers.js +26 -0
- package/dist/modules/public-site/media-serve/_media-serve-helpers.js.map +1 -0
- package/dist/modules/public-site/media-serve/media-serve.controller.d.ts +4 -0
- package/dist/modules/public-site/media-serve/media-serve.controller.js +140 -0
- package/dist/modules/public-site/media-serve/media-serve.controller.js.map +1 -0
- package/dist/modules/public-site/media-serve/media-serve.module.d.ts +2 -0
- package/dist/modules/public-site/media-serve/media-serve.module.js +20 -0
- package/dist/modules/public-site/media-serve/media-serve.module.js.map +1 -0
- package/dist/modules/public-site/oauth2-client.controller.d.ts +10 -0
- package/dist/modules/public-site/oauth2-client.controller.js +143 -0
- package/dist/modules/public-site/oauth2-client.controller.js.map +1 -0
- package/dist/modules/public-site/public-route/make-url.d.ts +11 -0
- package/dist/modules/public-site/public-route/make-url.js +150 -0
- package/dist/modules/public-site/public-route/make-url.js.map +1 -0
- package/dist/modules/public-site/public-route/public-route-parser.d.ts +16 -0
- package/dist/modules/public-site/public-route/public-route-parser.js +154 -0
- package/dist/modules/public-site/public-route/public-route-parser.js.map +1 -0
- package/dist/modules/public-site/public-route/raw-document-payload.d.ts +8 -0
- package/dist/modules/public-site/public-route/raw-document-payload.js +86 -0
- package/dist/modules/public-site/public-route/raw-document-payload.js.map +1 -0
- package/dist/modules/public-site/public-site.controller.d.ts +7 -0
- package/dist/modules/public-site/public-site.controller.js +58 -0
- package/dist/modules/public-site/public-site.controller.js.map +1 -0
- package/dist/modules/public-site/public-site.middleware.d.ts +5 -0
- package/dist/modules/public-site/public-site.middleware.js +67 -0
- package/dist/modules/public-site/public-site.middleware.js.map +1 -0
- package/dist/modules/public-site/public-site.module.d.ts +4 -0
- package/dist/modules/public-site/public-site.module.js +27 -0
- package/dist/modules/public-site/public-site.module.js.map +1 -0
- package/dist/modules/public-site/serve-document/serve-document.d.ts +20 -0
- package/dist/modules/public-site/serve-document/serve-document.js +60 -0
- package/dist/modules/public-site/serve-document/serve-document.js.map +1 -0
- package/dist/modules/security/app-throttler-guard.d.ts +8 -0
- package/dist/modules/security/app-throttler-guard.js +18 -0
- package/dist/modules/security/app-throttler-guard.js.map +1 -0
- package/dist/modules/security/complexity-plugin.d.ts +8 -0
- package/dist/modules/security/complexity-plugin.js +45 -0
- package/dist/modules/security/complexity-plugin.js.map +1 -0
- package/dist/nest-custom-logger.d.ts +8 -0
- package/dist/nest-custom-logger.js +23 -0
- package/dist/nest-custom-logger.js.map +1 -0
- package/dist/public-payload/breadcrumb.queries.d.ts +5 -0
- package/dist/public-payload/breadcrumb.queries.js +26 -0
- package/dist/public-payload/breadcrumb.queries.js.map +1 -0
- package/dist/public-payload/create-page-drop.d.ts +11 -0
- package/dist/public-payload/create-page-drop.js +160 -0
- package/dist/public-payload/create-page-drop.js.map +1 -0
- package/dist/public-payload/create-page-part-drop.d.ts +7 -0
- package/dist/public-payload/create-page-part-drop.js +39 -0
- package/dist/public-payload/create-page-part-drop.js.map +1 -0
- package/dist/public-payload/excerpt.queries.d.ts +10 -0
- package/dist/public-payload/excerpt.queries.js +38 -0
- package/dist/public-payload/excerpt.queries.js.map +1 -0
- package/dist/public-payload/field-values.d.ts +9 -0
- package/dist/public-payload/field-values.js +99 -0
- package/dist/public-payload/field-values.js.map +1 -0
- package/dist/public-payload/get-siblings.queries.d.ts +5 -0
- package/dist/public-payload/get-siblings.queries.js +117 -0
- package/dist/public-payload/get-siblings.queries.js.map +1 -0
- package/dist/public-payload/load-default-image.d.ts +8 -0
- package/dist/public-payload/load-default-image.js +52 -0
- package/dist/public-payload/load-default-image.js.map +1 -0
- package/dist/public-payload/make-basic-payload.d.ts +6 -0
- package/dist/public-payload/make-basic-payload.js +19 -0
- package/dist/public-payload/make-basic-payload.js.map +1 -0
- package/dist/public-payload/make-image-available.d.ts +26 -0
- package/dist/public-payload/make-image-available.js +38 -0
- package/dist/public-payload/make-image-available.js.map +1 -0
- package/dist/public-payload/page-values.queries.d.ts +27 -0
- package/dist/public-payload/page-values.queries.js +110 -0
- package/dist/public-payload/page-values.queries.js.map +1 -0
- package/dist/public-payload/parts.queries.d.ts +6 -0
- package/dist/public-payload/parts.queries.js +123 -0
- package/dist/public-payload/parts.queries.js.map +1 -0
- package/dist/public-payload/public-payload.types.d.ts +130 -0
- package/dist/public-payload/public-payload.types.js +3 -0
- package/dist/public-payload/public-payload.types.js.map +1 -0
- package/dist/public-payload/site-payload.d.ts +4 -0
- package/dist/public-payload/site-payload.js +43 -0
- package/dist/public-payload/site-payload.js.map +1 -0
- package/dist/public-payload/taxonomies.queries.d.ts +13 -0
- package/dist/public-payload/taxonomies.queries.js +45 -0
- package/dist/public-payload/taxonomies.queries.js.map +1 -0
- package/dist/public-payload/translations.queries.d.ts +7 -0
- package/dist/public-payload/translations.queries.js +62 -0
- package/dist/public-payload/translations.queries.js.map +1 -0
- package/dist/public.types.d.ts +5 -0
- package/dist/public.types.js +3 -0
- package/dist/public.types.js.map +1 -0
- package/dist/share/pino-app-log.d.ts +26 -0
- package/dist/share/pino-app-log.js +138 -0
- package/dist/share/pino-app-log.js.map +1 -0
- package/dist/share/read-configuration.d.ts +7 -0
- package/dist/share/read-configuration.js +31 -0
- package/dist/share/read-configuration.js.map +1 -0
- package/dist/site-backup/archiver.helper.d.ts +12 -0
- package/dist/site-backup/archiver.helper.js +43 -0
- package/dist/site-backup/archiver.helper.js.map +1 -0
- package/dist/site-backup/backup-tasks.d.ts +10 -0
- package/dist/site-backup/backup-tasks.js +50 -0
- package/dist/site-backup/backup-tasks.js.map +1 -0
- package/dist/site-backup/backup.d.ts +11 -0
- package/dist/site-backup/backup.helper.d.ts +3 -0
- package/dist/site-backup/backup.helper.js +13 -0
- package/dist/site-backup/backup.helper.js.map +1 -0
- package/dist/site-backup/backup.js +35 -0
- package/dist/site-backup/backup.js.map +1 -0
- package/dist/site-context/create-site-context.d.ts +3 -0
- package/dist/site-context/create-site-context.js +183 -0
- package/dist/site-context/create-site-context.js.map +1 -0
- package/dist/site-context/db-init/db-init.d.ts +11 -0
- package/dist/site-context/db-init/db-init.js +38 -0
- package/dist/site-context/db-init/db-init.js.map +1 -0
- package/dist/site-context/db-init/ddl-migration.d.ts +13 -0
- package/dist/site-context/db-init/ddl-migration.js +26 -0
- package/dist/site-context/db-init/ddl-migration.js.map +1 -0
- package/dist/site-context/db-init/init-routing-points.d.ts +5 -0
- package/dist/site-context/db-init/init-routing-points.js +149 -0
- package/dist/site-context/db-init/init-routing-points.js.map +1 -0
- package/dist/site-context/site-conf.d.ts +17 -0
- package/dist/site-context/site-conf.js +103 -0
- package/dist/site-context/site-conf.js.map +1 -0
- package/dist/site-context/site-context.d.ts +12 -0
- package/dist/site-context/site-context.js +87 -0
- package/dist/site-context/site-context.js.map +1 -0
- package/dist/site-context/site-context.types.d.ts +46 -0
- package/dist/site-context/site-context.types.js +3 -0
- package/dist/site-context/site-context.types.js.map +1 -0
- package/dist/site-context/theme-conf-reader.d.ts +4 -0
- package/dist/site-context/theme-conf-reader.js +33 -0
- package/dist/site-context/theme-conf-reader.js.map +1 -0
- package/dist/site-context/theme-conf-types.d.ts +4 -0
- package/dist/site-context/theme-conf-types.js +3 -0
- package/dist/site-context/theme-conf-types.js.map +1 -0
- package/dist/site-schema/common-schema-reader.d.ts +6 -0
- package/dist/site-schema/common-schema-reader.js +29 -0
- package/dist/site-schema/common-schema-reader.js.map +1 -0
- package/dist/site-schema/merged-schema-lib.d.ts +30 -0
- package/dist/site-schema/merged-schema-lib.js +118 -0
- package/dist/site-schema/merged-schema-lib.js.map +1 -0
- package/dist/site-schema/read-locales.d.ts +24 -0
- package/dist/site-schema/read-locales.js +171 -0
- package/dist/site-schema/read-locales.js.map +1 -0
- package/dist/site-schema/site-schema-factory.d.ts +2 -0
- package/dist/site-schema/site-schema-factory.js +385 -0
- package/dist/site-schema/site-schema-factory.js.map +1 -0
- package/dist/site-schema/site-schema-helpers.d.ts +5 -0
- package/dist/site-schema/site-schema-helpers.js +27 -0
- package/dist/site-schema/site-schema-helpers.js.map +1 -0
- package/dist/site-schema/site-schema-lib-reader.d.ts +14 -0
- package/dist/site-schema/site-schema-lib-reader.js +48 -0
- package/dist/site-schema/site-schema-lib-reader.js.map +1 -0
- package/dist/start.d.ts +1 -0
- package/dist/start.js +5 -0
- package/dist/start.js.map +1 -0
- package/dist/types.to.json +1 -0
- package/package.json +9 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function toEnumerable<T = unknown>(val: any): T[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toEnumerable = void 0;
|
|
4
|
+
function toEnumerable(val) {
|
|
5
|
+
if (val === null || val === undefined)
|
|
6
|
+
return [];
|
|
7
|
+
if (Array.isArray(val))
|
|
8
|
+
return val;
|
|
9
|
+
if (typeof val === "string" && val.length > 0)
|
|
10
|
+
return [val];
|
|
11
|
+
if (typeof val[Symbol.iterator] === "function")
|
|
12
|
+
return Array.from(val);
|
|
13
|
+
if (typeof val === "object")
|
|
14
|
+
return Object.keys(val).map((key) => [key, val[key]]);
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
exports.toEnumerable = toEnumerable;
|
|
18
|
+
//# sourceMappingURL=collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../../src/liquidjs-tools/render-clone/collection.ts"],"names":[],"mappings":";;;AAIA,SAAgB,YAAY,CAAc,GAAQ;IAChD,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACjD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACnC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,GAAG,CAAmB,CAAC;IAC9E,IAAI,OAAO,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,UAAU;QAAE,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvE,IAAI,OAAO,GAAG,KAAK,QAAQ;QACzB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAmB,CAAC;IAC1E,OAAO,EAAE,CAAC;AACZ,CAAC;AARD,oCAQC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Drop } from "liquidjs";
|
|
2
|
+
export declare class ForloopDrop extends Drop {
|
|
3
|
+
protected i: number;
|
|
4
|
+
name: string;
|
|
5
|
+
length: number;
|
|
6
|
+
constructor(length: number, collection: string, variable: string);
|
|
7
|
+
next(): void;
|
|
8
|
+
index0(): number;
|
|
9
|
+
index(): number;
|
|
10
|
+
first(): boolean;
|
|
11
|
+
last(): boolean;
|
|
12
|
+
rindex(): number;
|
|
13
|
+
rindex0(): number;
|
|
14
|
+
valueOf(): string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ForloopDrop = void 0;
|
|
4
|
+
const liquidjs_1 = require("liquidjs");
|
|
5
|
+
class ForloopDrop extends liquidjs_1.Drop {
|
|
6
|
+
i = 0;
|
|
7
|
+
name;
|
|
8
|
+
length;
|
|
9
|
+
constructor(length, collection, variable) {
|
|
10
|
+
super();
|
|
11
|
+
this.length = length;
|
|
12
|
+
this.name = `${variable}-${collection}`;
|
|
13
|
+
}
|
|
14
|
+
next() {
|
|
15
|
+
this.i++;
|
|
16
|
+
}
|
|
17
|
+
index0() {
|
|
18
|
+
return this.i;
|
|
19
|
+
}
|
|
20
|
+
index() {
|
|
21
|
+
return this.i + 1;
|
|
22
|
+
}
|
|
23
|
+
first() {
|
|
24
|
+
return this.i === 0;
|
|
25
|
+
}
|
|
26
|
+
last() {
|
|
27
|
+
return this.i === this.length - 1;
|
|
28
|
+
}
|
|
29
|
+
rindex() {
|
|
30
|
+
return this.length - this.i;
|
|
31
|
+
}
|
|
32
|
+
rindex0() {
|
|
33
|
+
return this.length - this.i - 1;
|
|
34
|
+
}
|
|
35
|
+
valueOf() {
|
|
36
|
+
return JSON.stringify(this);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.ForloopDrop = ForloopDrop;
|
|
40
|
+
//# sourceMappingURL=forloop-drop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forloop-drop.js","sourceRoot":"","sources":["../../../src/liquidjs-tools/render-clone/forloop-drop.ts"],"names":[],"mappings":";;;AAAA,uCAAgC;AAMhC,MAAa,WAAY,SAAQ,eAAI;IACzB,CAAC,GAAG,CAAC,CAAC;IACT,IAAI,CAAS;IACb,MAAM,CAAS;IACtB,YAAmB,MAAc,EAAE,UAAkB,EAAE,QAAgB;QACrE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,GAAG,QAAQ,IAAI,UAAU,EAAE,CAAC;IAC1C,CAAC;IACM,IAAI;QACT,IAAI,CAAC,CAAC,EAAE,CAAC;IACX,CAAC;IACM,MAAM;QACX,OAAO,IAAI,CAAC,CAAC,CAAC;IAChB,CAAC;IACM,KAAK;QACV,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;IACM,KAAK;QACV,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;IACM,IAAI;QACT,OAAO,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACpC,CAAC;IACM,MAAM;QACX,OAAO,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IAC9B,CAAC;IACM,OAAO;QACZ,OAAO,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;IACM,OAAO;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF;AAjCD,kCAiCC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Context, Emitter, Liquid, Tag, TagToken, Template, Token, Tokenizer, TopLevelToken } from 'liquidjs';
|
|
2
|
+
type ParsedFileName = Template[] | Token | string | undefined;
|
|
3
|
+
export default class RenderTag extends Tag {
|
|
4
|
+
static passThroughSymbol: symbol;
|
|
5
|
+
private file;
|
|
6
|
+
private currentFile?;
|
|
7
|
+
private hash;
|
|
8
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
9
|
+
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
|
|
10
|
+
}
|
|
11
|
+
export declare function parseFilePath(tokenizer: Tokenizer, liquid: Liquid): ParsedFileName;
|
|
12
|
+
export declare function renderFilePath(file: ParsedFileName, ctx: Context, liquid: Liquid): IterableIterator<unknown>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderFilePath = exports.parseFilePath = void 0;
|
|
4
|
+
const liquidjs_1 = require("liquidjs");
|
|
5
|
+
const collection_1 = require("./collection");
|
|
6
|
+
const forloop_drop_1 = require("./forloop-drop");
|
|
7
|
+
class RenderTag extends liquidjs_1.Tag {
|
|
8
|
+
static passThroughSymbol = Symbol("passThrough");
|
|
9
|
+
file;
|
|
10
|
+
currentFile;
|
|
11
|
+
hash;
|
|
12
|
+
constructor(token, remainTokens, liquid) {
|
|
13
|
+
super(token, remainTokens, liquid);
|
|
14
|
+
const tokenizer = this.tokenizer;
|
|
15
|
+
this.file = parseFilePath(tokenizer, this.liquid);
|
|
16
|
+
this.currentFile = token.file;
|
|
17
|
+
while (!tokenizer.end()) {
|
|
18
|
+
tokenizer.skipBlank();
|
|
19
|
+
const begin = tokenizer.p;
|
|
20
|
+
const keyword = tokenizer.readIdentifier();
|
|
21
|
+
if (keyword.content === 'with' || keyword.content === 'for') {
|
|
22
|
+
tokenizer.skipBlank();
|
|
23
|
+
if (tokenizer.peek() !== ':') {
|
|
24
|
+
const value = tokenizer.readValue();
|
|
25
|
+
if (value) {
|
|
26
|
+
const beforeAs = tokenizer.p;
|
|
27
|
+
const asStr = tokenizer.readIdentifier();
|
|
28
|
+
let alias;
|
|
29
|
+
if (asStr.content === 'as')
|
|
30
|
+
alias = tokenizer.readIdentifier();
|
|
31
|
+
else
|
|
32
|
+
tokenizer.p = beforeAs(this)[keyword.content] = { value, alias: alias && alias.content };
|
|
33
|
+
tokenizer.skipBlank();
|
|
34
|
+
if (tokenizer.peek() === ',')
|
|
35
|
+
tokenizer.advance();
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
tokenizer.p = begin;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
this.hash = new liquidjs_1.Hash(tokenizer.remaining());
|
|
44
|
+
}
|
|
45
|
+
*render(ctx, emitter) {
|
|
46
|
+
const { liquid, hash } = this;
|
|
47
|
+
let filepath = (yield renderFilePath(this['file'], ctx, liquid));
|
|
48
|
+
(0, liquidjs_1.assert)(filepath, () => `illegal file path "${filepath}"`);
|
|
49
|
+
if (!filepath.endsWith(".liquid")) {
|
|
50
|
+
filepath += ".liquid";
|
|
51
|
+
}
|
|
52
|
+
const env = { [RenderTag.passThroughSymbol]: (ctx.environments ?? {})[RenderTag.passThroughSymbol] };
|
|
53
|
+
const childCtx = new liquidjs_1.Context(env, ctx.opts, { sync: ctx.sync, globals: ctx.globals, strictVariables: ctx.strictVariables });
|
|
54
|
+
const scope = childCtx.bottom();
|
|
55
|
+
Object.assign(scope, yield hash.render(ctx));
|
|
56
|
+
if (this['with']) {
|
|
57
|
+
const { value, alias } = this['with'];
|
|
58
|
+
scope[alias || filepath] = yield (0, liquidjs_1.evalToken)(value, ctx);
|
|
59
|
+
}
|
|
60
|
+
if (this['for']) {
|
|
61
|
+
const { value, alias } = this['for'];
|
|
62
|
+
const collection = (0, collection_1.toEnumerable)(yield (0, liquidjs_1.evalToken)(value, ctx));
|
|
63
|
+
scope['forloop'] = new forloop_drop_1.ForloopDrop(collection.length, value.getText(), alias);
|
|
64
|
+
for (const item of collection) {
|
|
65
|
+
scope[alias] = item;
|
|
66
|
+
const templates = (yield liquid._parsePartialFile(filepath, childCtx.sync, this['currentFile']));
|
|
67
|
+
yield liquid.renderer.renderTemplates(templates, childCtx, emitter);
|
|
68
|
+
scope['forloop'].next();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
const templates = (yield liquid._parsePartialFile(filepath, childCtx.sync, this['currentFile']));
|
|
73
|
+
yield liquid.renderer.renderTemplates(templates, childCtx, emitter);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.default = RenderTag;
|
|
78
|
+
function parseFilePath(tokenizer, liquid) {
|
|
79
|
+
if (liquid.options.dynamicPartials) {
|
|
80
|
+
const file = tokenizer.readValue();
|
|
81
|
+
tokenizer.assert(file, 'illegal file path');
|
|
82
|
+
if (file.getText() === 'none')
|
|
83
|
+
return;
|
|
84
|
+
if (liquidjs_1.TypeGuards.isQuotedToken(file)) {
|
|
85
|
+
const templates = liquid.parse((0, liquidjs_1.evalQuotedToken)(file));
|
|
86
|
+
return optimize(templates);
|
|
87
|
+
}
|
|
88
|
+
return file;
|
|
89
|
+
}
|
|
90
|
+
const tokens = [...tokenizer.readFileNameTemplate(liquid.options)];
|
|
91
|
+
const templates = optimize(liquid.parser.parseTokens(tokens));
|
|
92
|
+
return templates === 'none' ? undefined : templates;
|
|
93
|
+
}
|
|
94
|
+
exports.parseFilePath = parseFilePath;
|
|
95
|
+
function optimize(templates) {
|
|
96
|
+
if (templates.length === 1 && liquidjs_1.TypeGuards.isHTMLToken(templates[0].token))
|
|
97
|
+
return templates[0].token.getContent();
|
|
98
|
+
return templates;
|
|
99
|
+
}
|
|
100
|
+
function* renderFilePath(file, ctx, liquid) {
|
|
101
|
+
if (typeof file === 'string')
|
|
102
|
+
return file;
|
|
103
|
+
if (Array.isArray(file))
|
|
104
|
+
return liquid.renderer.renderTemplates(file, ctx);
|
|
105
|
+
return yield (0, liquidjs_1.evalToken)(file, ctx);
|
|
106
|
+
}
|
|
107
|
+
exports.renderFilePath = renderFilePath;
|
|
108
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/liquidjs-tools/render-clone/render.ts"],"names":[],"mappings":";;;AAAA,uCAAoK;AACpK,6CAA4C;AAC5C,iDAA6C;AAQ7C,MAAqB,SAAU,SAAQ,cAAG;IACxC,MAAM,CAAC,iBAAiB,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;IAEzC,IAAI,CAAgB;IACpB,WAAW,CAAS;IACpB,IAAI,CAAM;IAClB,YAAa,KAAe,EAAE,YAA6B,EAAE,MAAc;QACzE,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,CAAA;QAClC,MAAM,SAAS,GAAQ,IAAI,CAAC,SAAS,CAAA;QACrC,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QACjD,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,IAAI,CAAA;QAC7B,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,CAAC;YACxB,SAAS,CAAC,SAAS,EAAE,CAAA;YACrB,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAA;YACzB,MAAM,OAAO,GAAG,SAAS,CAAC,cAAc,EAAE,CAAA;YAC1C,IAAI,OAAO,CAAC,OAAO,KAAK,MAAM,IAAI,OAAO,CAAC,OAAO,KAAK,KAAK,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C;IACD,MAAM,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;IAClE,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAA;IAC7D,OAAO,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAA;AACrD,CAAC;AAfD,sCAeC;AAED,SAAS,QAAQ,CAAE,SAAqB;IAEtC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,qBAAU,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,EAAE,CAAA;IAChH,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,QAAgB,CAAC,CAAC,cAAc,CAAE,IAAoB,EAAE,GAAY,EAAE,MAAc;IAClF,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IACzC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAC1E,OAAO,MAAM,IAAA,oBAAS,EAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AACnC,CAAC;AAJD,wCAIC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SiteContext } from "../site-context/site-context.types";
|
|
2
|
+
export declare function maintenanceTask(): Promise<void>;
|
|
3
|
+
export declare function siteMaintenanceTask(siteContext: Pick<SiteContext, "imageCache" | "textCache">): Promise<void>;
|
|
4
|
+
export declare function unloadAllActiveSites(): Promise<void>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unloadAllActiveSites = exports.siteMaintenanceTask = exports.maintenanceTask = void 0;
|
|
4
|
+
const context_1 = require("../context");
|
|
5
|
+
const site_context_1 = require("../site-context/site-context");
|
|
6
|
+
const shutdown_1 = require("./shutdown");
|
|
7
|
+
async function maintenanceTask() {
|
|
8
|
+
const siteContexts = (0, site_context_1.getActiveSiteContexts)();
|
|
9
|
+
for (const siteContext of siteContexts) {
|
|
10
|
+
if ((0, shutdown_1.isShuttingDown)())
|
|
11
|
+
return;
|
|
12
|
+
await siteMaintenanceTask(siteContext);
|
|
13
|
+
context_1.platformLog.info(`[${siteContext.siteName}] Maintenance done`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.maintenanceTask = maintenanceTask;
|
|
17
|
+
async function siteMaintenanceTask(siteContext) {
|
|
18
|
+
await siteContext.imageCache.cleanUnusedValues();
|
|
19
|
+
await siteContext.textCache.cleanUnusedValues();
|
|
20
|
+
}
|
|
21
|
+
exports.siteMaintenanceTask = siteMaintenanceTask;
|
|
22
|
+
async function unloadAllActiveSites() {
|
|
23
|
+
const siteContexts = Array.from((0, site_context_1.getActiveSiteContexts)());
|
|
24
|
+
await Promise.all(siteContexts.map((siteContext) => (0, site_context_1.unloadSiteContext)(siteContext)));
|
|
25
|
+
}
|
|
26
|
+
exports.unloadAllActiveSites = unloadAllActiveSites;
|
|
27
|
+
//# sourceMappingURL=maintenance-task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maintenance-task.js","sourceRoot":"","sources":["../../src/maintenance/maintenance-task.ts"],"names":[],"mappings":";;;AAAA,wCAAyC;AACzC,+DAAwF;AAExF,yCAA4C;AAErC,KAAK,UAAU,eAAe;IACnC,MAAM,YAAY,GAAG,IAAA,oCAAqB,GAAE,CAAC;IAC7C,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,IAAI,IAAA,yBAAc,GAAE;YAAE,OAAO;QAC7B,MAAM,mBAAmB,CAAC,WAAW,CAAC,CAAC;QACvC,qBAAW,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,QAAQ,oBAAoB,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AAPD,0CAOC;AAEM,KAAK,UAAU,mBAAmB,CACvC,WAA0D;IAE1D,MAAM,WAAW,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC;IACjD,MAAM,WAAW,CAAC,SAAS,CAAC,iBAAiB,EAAE,CAAC;AAClD,CAAC;AALD,kDAKC;AAEM,KAAK,UAAU,oBAAoB;IACxC,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,IAAA,oCAAqB,GAAE,CAAC,CAAC;IACzD,MAAM,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAA,gCAAiB,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AACvF,CAAC;AAHD,oDAGC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PlatformLog } from "../share/pino-app-log";
|
|
2
|
+
export declare function isShuttingDown(): boolean;
|
|
3
|
+
export interface HandleShutdownEventsOptions {
|
|
4
|
+
appLog: PlatformLog;
|
|
5
|
+
onCloseCb?: (error?: unknown) => Promise<void> | void;
|
|
6
|
+
}
|
|
7
|
+
export declare function handleShutdownEvents({ appLog, onCloseCb }: HandleShutdownEventsOptions): void;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleShutdownEvents = exports.isShuttingDown = void 0;
|
|
4
|
+
let shuttingDown = false;
|
|
5
|
+
function isShuttingDown() {
|
|
6
|
+
return shuttingDown;
|
|
7
|
+
}
|
|
8
|
+
exports.isShuttingDown = isShuttingDown;
|
|
9
|
+
function handleShutdownEvents({ appLog, onCloseCb }) {
|
|
10
|
+
process.on("uncaughtException", (error) => {
|
|
11
|
+
appLog.error("uncaughtException", error);
|
|
12
|
+
void stopAllAndExit(error);
|
|
13
|
+
});
|
|
14
|
+
process.on("unhandledRejection", (error) => {
|
|
15
|
+
appLog.error("unhandledRejection", error);
|
|
16
|
+
void stopAllAndExit(error);
|
|
17
|
+
});
|
|
18
|
+
process.on("SIGINT", () => {
|
|
19
|
+
appLog.info("Caught SIGINT signal.");
|
|
20
|
+
void stopAllAndExit();
|
|
21
|
+
});
|
|
22
|
+
process.on("SIGTERM", () => {
|
|
23
|
+
appLog.info("Caught SIGTERM signal.");
|
|
24
|
+
void stopAllAndExit();
|
|
25
|
+
});
|
|
26
|
+
process.on("SIGSEGV", () => {
|
|
27
|
+
appLog.error("Caught SIGSEGV signal. Exit.");
|
|
28
|
+
appLog.flushSync();
|
|
29
|
+
process.exit(1);
|
|
30
|
+
});
|
|
31
|
+
async function stopAllAndExit(error) {
|
|
32
|
+
shuttingDown = true;
|
|
33
|
+
try {
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
appLog.warn("Backend doesn't answer. Exit anyway.");
|
|
36
|
+
appLog.flushSync();
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}, error === undefined ? 30000 : 1000).unref();
|
|
39
|
+
if (onCloseCb)
|
|
40
|
+
await onCloseCb(error);
|
|
41
|
+
appLog.info("… server ended.");
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
appLog.error("Error during shutdown:", error);
|
|
45
|
+
}
|
|
46
|
+
appLog.flushSync();
|
|
47
|
+
process.exit(error ? 1 : 0);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.handleShutdownEvents = handleShutdownEvents;
|
|
51
|
+
//# sourceMappingURL=shutdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shutdown.js","sourceRoot":"","sources":["../../src/maintenance/shutdown.ts"],"names":[],"mappings":";;;AAEA,IAAI,YAAY,GAAG,KAAK,CAAC;AAEzB,SAAgB,cAAc;IAC5B,OAAO,YAAY,CAAC;AACtB,C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I,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,EACD,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CACnC,CAAC,KAAK,EAAE,CAAC;YACV,IAAI,SAAS;gBAAE,MAAM,SAAS,CAAC,KAAK,CAAC,CAAC;YACtC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC;QACD,MAAM,CAAC,SAAS,EAAE,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AA9CD,oDA8CC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AppController = void 0;
|
|
16
|
+
const node_stream_1 = require("node:stream");
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const media_handles_helpers_1 = require("../common/media-handles.helpers");
|
|
19
|
+
const serve_html_or_1 = require("../common/serve-html-or");
|
|
20
|
+
const context_1 = require("../context");
|
|
21
|
+
const http_helpers_1 = require("../express/http-helpers");
|
|
22
|
+
const utils_helper_1 = require("../helpers/utils-helper");
|
|
23
|
+
const site_context_1 = require("../site-context/site-context");
|
|
24
|
+
let AppController = class AppController {
|
|
25
|
+
robotsTxt(res) {
|
|
26
|
+
res.setHeader("Content-Type", "text/plain");
|
|
27
|
+
if (!context_1.appConf.allowRobots) {
|
|
28
|
+
res.send(`User-agent: *
|
|
29
|
+
Disallow: /`);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
res.send();
|
|
33
|
+
}
|
|
34
|
+
async favicon(req, res) {
|
|
35
|
+
const siteContext = await (0, site_context_1.getSiteContext)(req.hostname);
|
|
36
|
+
const handle = (0, media_handles_helpers_1.getHandleOfSiteFavicon)();
|
|
37
|
+
const media = await siteContext.mediaStorage.getMedia({ handle });
|
|
38
|
+
if (media?.kind !== "image")
|
|
39
|
+
return await (0, serve_html_or_1.render404Html)(siteContext, res);
|
|
40
|
+
const lastModified = (0, utils_helper_1.toHttpHeaderIfModifiedSince)(media.modifiedTs);
|
|
41
|
+
if (req.headers["if-modified-since"] === lastModified)
|
|
42
|
+
return (0, http_helpers_1.serve304NotModified)(res);
|
|
43
|
+
const file = await siteContext.imageCache.getOrCreateImageWithBinary({
|
|
44
|
+
variantName: "16x16",
|
|
45
|
+
imageRef: {
|
|
46
|
+
imageUid: media.uid,
|
|
47
|
+
width: media.width,
|
|
48
|
+
height: media.height,
|
|
49
|
+
mediaType: media.mediaType,
|
|
50
|
+
},
|
|
51
|
+
mediaType: "image/x-icon",
|
|
52
|
+
dependsOnCacheKey: "favicon16x16",
|
|
53
|
+
});
|
|
54
|
+
if (!file)
|
|
55
|
+
throw new Error(`favicon variant of '${media.uid}' should be available here`);
|
|
56
|
+
res.setHeader("content-type", file.mediaType);
|
|
57
|
+
res.append("Last-Modified", lastModified);
|
|
58
|
+
node_stream_1.Readable.from(file.binaryFile)
|
|
59
|
+
.on("data", (chunk) => {
|
|
60
|
+
res.write(chunk);
|
|
61
|
+
})
|
|
62
|
+
.on("error", (error) => {
|
|
63
|
+
res.end(error);
|
|
64
|
+
})
|
|
65
|
+
.on("end", () => {
|
|
66
|
+
res.end();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
exports.AppController = AppController;
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, common_1.Get)("/robots.txt"),
|
|
73
|
+
__param(0, (0, common_1.Res)()),
|
|
74
|
+
__metadata("design:type", Function),
|
|
75
|
+
__metadata("design:paramtypes", [Object]),
|
|
76
|
+
__metadata("design:returntype", void 0)
|
|
77
|
+
], AppController.prototype, "robotsTxt", null);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, common_1.Get)("/favicon.ico"),
|
|
80
|
+
__param(0, (0, common_1.Req)()),
|
|
81
|
+
__param(1, (0, common_1.Res)()),
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
84
|
+
__metadata("design:returntype", Promise)
|
|
85
|
+
], AppController.prototype, "favicon", null);
|
|
86
|
+
exports.AppController = AppController = __decorate([
|
|
87
|
+
(0, common_1.Controller)()
|
|
88
|
+
], AppController);
|
|
89
|
+
//# sourceMappingURL=app.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../src/modules/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAuC;AACvC,2CAA2D;AAE3D,2EAAyE;AACzE,2DAAwD;AACxD,wCAAqC;AACrC,0DAA8D;AAC9D,0DAAsE;AACtE,+DAA8D;AAGvD,IAAM,aAAa,GAA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K,CAAC,uBAAuB,KAAK,CAAC,GAAG,4BAA4B,CAAC,CAAC;QAEzF,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAC9C,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;QAE1C,sBAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;aAC3B,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YACpB,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACnB,CAAC,CAAC;aACD,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACrB,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,CAAC;aACD,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;YACd,GAAG,CAAC,GAAG,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACP,CAAC;CACF,CAAA;AApDY,sCAAa;AAExB;IADC,IAAA,YAAG,EAAC,aAAa,CAAC;IACR,WAAA,IAAA,YAAG,GAAE,CAAA;;;;8CAUf;AAGK;IADL,IAAA,YAAG,EAAC,cAAc,CAAC;IACL,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;4CAoCxC;wBAnDU,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CAoDzB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AppModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const core_1 = require("@nestjs/core");
|
|
12
|
+
const throttler_1 = require("@nestjs/throttler");
|
|
13
|
+
const app_controller_1 = require("./app.controller");
|
|
14
|
+
const private_api_module_1 = require("./private-api.module");
|
|
15
|
+
const public_api_module_1 = require("./public-api/public-api.module");
|
|
16
|
+
const app_exception_filter_1 = require("./public-site/app-exception-filter");
|
|
17
|
+
const public_site_module_1 = require("./public-site/public-site.module");
|
|
18
|
+
const app_throttler_guard_1 = require("./security/app-throttler-guard");
|
|
19
|
+
let AppModule = class AppModule {
|
|
20
|
+
};
|
|
21
|
+
exports.AppModule = AppModule;
|
|
22
|
+
exports.AppModule = AppModule = __decorate([
|
|
23
|
+
(0, common_1.Module)({
|
|
24
|
+
imports: [
|
|
25
|
+
throttler_1.ThrottlerModule.forRoot([
|
|
26
|
+
{
|
|
27
|
+
limit: 50,
|
|
28
|
+
ttl: 2000,
|
|
29
|
+
},
|
|
30
|
+
]),
|
|
31
|
+
private_api_module_1.PrivateApiModule,
|
|
32
|
+
public_site_module_1.PublicSiteModule,
|
|
33
|
+
public_api_module_1.PublicApiModule,
|
|
34
|
+
],
|
|
35
|
+
controllers: [app_controller_1.AppController],
|
|
36
|
+
providers: [
|
|
37
|
+
{
|
|
38
|
+
provide: core_1.APP_FILTER,
|
|
39
|
+
useClass: app_exception_filter_1.NotFoundExceptionFilter,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
provide: core_1.APP_GUARD,
|
|
43
|
+
useClass: app_throttler_guard_1.AppThrottlerGuard,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
})
|
|
47
|
+
], AppModule);
|
|
48
|
+
//# sourceMappingURL=app.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../src/modules/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,uCAAqD;AACrD,iDAAoD;AACpD,qDAAiD;AACjD,6DAAwD;AACxD,sEAAiE;AACjE,6EAA6E;AAC7E,yEAAoE;AACpE,wEAAmE;AA0B5D,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAxBrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,2BAAe,CAAC,OAAO,CAAC;gBACtB;oBACE,KAAK,EAAE,EAAE;oBACT,GAAG,EAAE,IAAI;iBACV;aACF,CAAC;YACF,qCAAgB;YAChB,qCAAgB;YAChB,mCAAe;SAChB;QACD,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,iBAAU;gBACnB,QAAQ,EAAE,8CAAuB;aAClC;YACD;gBACE,OAAO,EAAE,gBAAS;gBAClB,QAAQ,EAAE,uCAAiB;aAC5B;SACF;KACF,CAAC;GACW,SAAS,CAAG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface AccountModel {
|
|
2
|
+
id: string;
|
|
3
|
+
email: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
preferences?: string;
|
|
6
|
+
passwordHash?: string | null;
|
|
7
|
+
passwordResetToken?: string | null;
|
|
8
|
+
special?: "dev" | "platformAdmin";
|
|
9
|
+
}
|
|
10
|
+
export declare class AccountEntity implements AccountModel {
|
|
11
|
+
id: string;
|
|
12
|
+
email: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
preferences?: string;
|
|
15
|
+
passwordHash?: string | null;
|
|
16
|
+
passwordResetToken?: string | null;
|
|
17
|
+
idToString(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AccountEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let AccountEntity = class AccountEntity {
|
|
15
|
+
id;
|
|
16
|
+
email;
|
|
17
|
+
name;
|
|
18
|
+
preferences;
|
|
19
|
+
passwordHash;
|
|
20
|
+
passwordResetToken;
|
|
21
|
+
idToString() {
|
|
22
|
+
this.id = this.id?.toString();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.AccountEntity = AccountEntity;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("increment", { type: "bigint" }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], AccountEntity.prototype, "id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ unique: true, type: "varchar" }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], AccountEntity.prototype, "email", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: "varchar", nullable: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], AccountEntity.prototype, "name", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ nullable: true, type: "text" }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], AccountEntity.prototype, "preferences", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ nullable: true, type: "varchar", length: 200 }),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], AccountEntity.prototype, "passwordHash", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ nullable: true, type: "varchar", length: 200 }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], AccountEntity.prototype, "passwordResetToken", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.AfterLoad)(),
|
|
52
|
+
__metadata("design:type", Function),
|
|
53
|
+
__metadata("design:paramtypes", []),
|
|
54
|
+
__metadata("design:returntype", void 0)
|
|
55
|
+
], AccountEntity.prototype, "idToString", null);
|
|
56
|
+
exports.AccountEntity = AccountEntity = __decorate([
|
|
57
|
+
(0, typeorm_1.Entity)("PaAccount")
|
|
58
|
+
], AccountEntity);
|
|
59
|
+
//# sourceMappingURL=account.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.model.js","sourceRoot":"","sources":["../../../../src/modules/core/account/account.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4E;AAarE,IAAM,aAAa,GAAnB,MAAM,aAAa;IAExB,EAAE,CAAU;IAGZ,KAAK,CAAU;IAGf,IAAI,CAAU;IAGd,WAAW,CAAU;IAGrB,YAAY,CAAiB;IAG7B,kBAAkB,CAAiB;IAGnC,UAAU;QACR,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC;IAChC,CAAC;CACF,CAAA;AAvBY,sCAAa;AAExB;IADC,IAAA,gCAAsB,EAAC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;yCAC5C;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;4CAC3B;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC9B;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDACpB;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;mDAC5B;AAG7B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;yDACtB;AAGnC;IADC,IAAA,mBAAS,GAAE;;;;+CAGX;wBAtBU,aAAa;IADzB,IAAA,gBAAM,EAAC,WAAW,CAAC;GACP,aAAa,CAuBzB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AccountModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const account_resolver_1 = require("./account.resolver");
|
|
12
|
+
let AccountModule = class AccountModule {
|
|
13
|
+
};
|
|
14
|
+
exports.AccountModule = AccountModule;
|
|
15
|
+
exports.AccountModule = AccountModule = __decorate([
|
|
16
|
+
(0, common_1.Module)({
|
|
17
|
+
providers: [account_resolver_1.AccountResolver],
|
|
18
|
+
})
|
|
19
|
+
], AccountModule);
|
|
20
|
+
//# sourceMappingURL=account.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.module.js","sourceRoot":"","sources":["../../../../src/modules/core/account/account.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yDAAqD;AAK9C,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAHzB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,kCAAe,CAAC;KAC7B,CAAC;GACW,aAAa,CAAG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SiteContext } from "../../../site-context/site-context.types";
|
|
2
|
+
import { AccountEntity } from "./account.model";
|
|
3
|
+
import type { AccountObjectType, AccountPreferencesInput, CreateAccountInput } from "./account.schema";
|
|
4
|
+
export declare function findAccountByIdAndEmail(siteContext: SiteContext, payload: {
|
|
5
|
+
id: string;
|
|
6
|
+
email: string;
|
|
7
|
+
}): Promise<AccountEntity>;
|
|
8
|
+
export declare function findAccountByEmail(siteContext: SiteContext, email: string): Promise<AccountEntity | null>;
|
|
9
|
+
export declare function getAccount(siteContext: SiteContext, id: string): Promise<AccountObjectType>;
|
|
10
|
+
export declare function getAllAccounts(siteContext: SiteContext): Promise<AccountObjectType[]>;
|
|
11
|
+
export declare function setAccountPreferences(siteContext: SiteContext, accountId: string, values: AccountPreferencesInput): Promise<void>;
|
|
12
|
+
export declare function createAccount(siteContext: SiteContext, payload: CreateAccountInput): Promise<AccountObjectType>;
|
|
13
|
+
export declare function updateAccount(siteContext: SiteContext, accountId: string, payload: {
|
|
14
|
+
name?: string;
|
|
15
|
+
email?: string;
|
|
16
|
+
}): Promise<AccountObjectType>;
|
|
17
|
+
export declare function deleteAccount(siteContext: SiteContext, accountId: string): Promise<void>;
|
|
18
|
+
export declare function resetAccountPassword(siteContext: SiteContext, accountId: string): Promise<void>;
|