@paroicms/server 0.146.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 +3 -0
- package/ddl/main.ddl.sql +84 -0
- package/dist/backup/site/archiver.helper.d.ts +12 -0
- package/dist/backup/site/archiver.helper.js +46 -0
- package/dist/backup/site/archiver.helper.js.map +1 -0
- package/dist/backup/site/backup.d.ts +5 -0
- package/dist/backup/site/backup.js +118 -0
- package/dist/backup/site/backup.js.map +1 -0
- 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/excerpt.helpers.spec.d.ts +1 -0
- package/dist/helpers/excerpt.helpers.spec.js +133 -0
- package/dist/helpers/excerpt.helpers.spec.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/search-text-helper.d.ts +7 -0
- package/dist/helpers/search-text-helper.js +27 -0
- package/dist/helpers/search-text-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 +67 -0
- package/dist/index.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.controller.d.ts +5 -0
- package/dist/modules/core/account-auth/account-auth.controller.js +46 -0
- package/dist/modules/core/account-auth/account-auth.controller.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 +49 -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 +164 -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 +61 -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 +54 -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/document/search-document-item.resolver.d.ts +7 -0
- package/dist/modules/core/document/search-document-item.resolver.js +58 -0
- package/dist/modules/core/document/search-document-item.resolver.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 +143 -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 +54 -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.model.d.ts +6 -0
- package/dist/modules/core/part/part.model.js +44 -0
- package/dist/modules/core/part/part.model.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-fields/site-fields.model.d.ts +4 -0
- package/dist/modules/core/site-fields/site-fields.model.js +30 -0
- package/dist/modules/core/site-fields/site-fields.model.js.map +1 -0
- package/dist/modules/core/site-fields/site-fields.module.d.ts +2 -0
- package/dist/modules/core/site-fields/site-fields.module.js +20 -0
- package/dist/modules/core/site-fields/site-fields.module.js.map +1 -0
- package/dist/modules/core/site-fields/site-fields.queries.d.ts +9 -0
- package/dist/modules/core/site-fields/site-fields.queries.js +123 -0
- package/dist/modules/core/site-fields/site-fields.queries.js.map +1 -0
- package/dist/modules/core/site-fields/site-fields.resolver.d.ts +5 -0
- package/dist/modules/core/site-fields/site-fields.resolver.js +56 -0
- package/dist/modules/core/site-fields/site-fields.resolver.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/term-flag/term-flag.service.d.ts +9 -0
- package/dist/modules/core/term-flag/term-flag.service.js +50 -0
- package/dist/modules/core/term-flag/term-flag.service.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 +59 -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 +198 -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/google-auth.controller.d.ts +10 -0
- package/dist/modules/public-site/google-auth.controller.js +127 -0
- package/dist/modules/public-site/google-auth.controller.js.map +1 -0
- package/dist/modules/public-site/helpers/format-date.helper.d.ts +3 -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/format-date.helper.spec.d.ts +1 -0
- package/dist/modules/public-site/helpers/format-date.helper.spec.js +37 -0
- package/dist/modules/public-site/helpers/format-date.helper.spec.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/helpers/public-field-values.d.ts +10 -0
- package/dist/modules/public-site/helpers/public-field-values.js +76 -0
- package/dist/modules/public-site/helpers/public-field-values.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/format-date.d.ts +2 -0
- package/dist/modules/public-site/liquidjs-filters/format-date.js +14 -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 +2 -0
- package/dist/modules/public-site/liquidjs-filters/format-number.js +18 -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 +2 -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 +2 -0
- package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js +38 -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 +3 -0
- package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js +21 -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 +2 -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 +3 -0
- package/dist/modules/public-site/liquidjs-filters/obfuscate.js +15 -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 +4 -0
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js +39 -0
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.1.d.ts +3 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.1.js +12 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.1.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.d.ts +3 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.js +12 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.js.map +1 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/collection.d.ts +1 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/collection.js +18 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/collection.js.map +1 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/forloop-drop.d.ts +15 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/forloop-drop.js +40 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/forloop-drop.js.map +1 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/render.d.ts +13 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/render.js +108 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/render.js.map +1 -0
- package/dist/modules/public-site/liquidjs-rendering/render-liquidjs.d.ts +6 -0
- package/dist/modules/public-site/liquidjs-rendering/render-liquidjs.js +40 -0
- package/dist/modules/public-site/liquidjs-rendering/render-liquidjs.js.map +1 -0
- package/dist/modules/public-site/liquidjs-rendering/rendering-context.d.ts +27 -0
- package/dist/modules/public-site/liquidjs-rendering/rendering-context.js +46 -0
- package/dist/modules/public-site/liquidjs-rendering/rendering-context.js.map +1 -0
- package/dist/modules/public-site/liquidjs-tags/get-breadcrumb-liquidjs-tag.d.ts +13 -0
- package/dist/modules/public-site/liquidjs-tags/get-breadcrumb-liquidjs-tag.js +49 -0
- package/dist/modules/public-site/liquidjs-tags/get-breadcrumb-liquidjs-tag.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 +68 -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 +94 -0
- package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js.map +1 -0
- package/dist/modules/public-site/liquidjs-tags/get-siblings-liquidjs-tag.d.ts +13 -0
- package/dist/modules/public-site/liquidjs-tags/get-siblings-liquidjs-tag.js +61 -0
- package/dist/modules/public-site/liquidjs-tags/get-siblings-liquidjs-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 +53 -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 +144 -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 +46 -0
- package/dist/modules/security/complexity-plugin.js.map +1 -0
- package/dist/modules/security/gqlThrottlerGuard.d.ts +8 -0
- package/dist/modules/security/gqlThrottlerGuard.js +24 -0
- package/dist/modules/security/gqlThrottlerGuard.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/create-page-payload-drop.d.ts +10 -0
- package/dist/public-payload/create-page-payload-drop.js +143 -0
- package/dist/public-payload/create-page-payload-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/liquidjs-drop.d.ts +31 -0
- package/dist/public-payload/liquidjs-drop.js +45 -0
- package/dist/public-payload/liquidjs-drop.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 +11 -0
- package/dist/site-backup/backup-tasks.js +98 -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 +34 -0
- package/dist/site-backup/backup.js.map +1 -0
- package/dist/site-backup/default-data/default-config.d.ts +1 -0
- package/dist/site-backup/default-data/default-config.js +50 -0
- package/dist/site-backup/default-data/default-config.js.map +1 -0
- package/dist/site-backup/default-data/default-readme.d.ts +1 -0
- package/dist/site-backup/default-data/default-readme.js +8 -0
- package/dist/site-backup/default-data/default-readme.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 +37 -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 +4 -0
- package/dist/site-context/db-init/init-routing-points.js +147 -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 +11 -0
- package/dist/site-context/site-context.js +234 -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 +382 -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/locales/en.json +18 -0
- package/locales/fr.json +18 -0
- package/package.json +99 -0
- package/schema.gql +293 -0
- package/site-schema-lib/common-schema.json +36 -0
- package/site-schema-lib/common-schema.l10n.en.json +10 -0
- package/site-schema-lib/common-schema.l10n.fr.json +10 -0
- package/site-schema-lib/fields.site-schema.json +79 -0
- package/site-schema-lib/fields.site-schema.l10n.en.json +26 -0
- package/site-schema-lib/fields.site-schema.l10n.fr.json +26 -0
- package/site-schema-lib/gallery-page.site-schema.json +19 -0
- package/site-schema-lib/gallery-page.site-schema.l10n.en.json +11 -0
- package/site-schema-lib/gallery-page.site-schema.l10n.fr.json +11 -0
- package/site-schema-lib/lowcost.site-schema.json +84 -0
- package/site-schema-lib/lowcost.site-schema.l10n.en.json +30 -0
- package/site-schema-lib/lowcost.site-schema.l10n.fr.json +30 -0
- package/site-schema-lib/media-policies.site-schema.json +26 -0
- package/site-schema-lib/portfolio.site-schema.json +28 -0
- package/site-schema-lib/portfolio.site-schema.l10n.en.json +16 -0
- package/site-schema-lib/portfolio.site-schema.l10n.fr.json +16 -0
- package/site-schema-lib/post.site-schema.json +48 -0
- package/site-schema-lib/post.site-schema.l10n.en.json +28 -0
- package/site-schema-lib/post.site-schema.l10n.fr.json +27 -0
- package/site-schema-lib/simple-pages.site-schema.json +19 -0
- package/site-schema-lib/simple-pages.site-schema.l10n.en.json +11 -0
- package/site-schema-lib/simple-pages.site-schema.l10n.fr.json +11 -0
- package/site-schema-lib/special-page.site-schema.json +42 -0
- package/site-schema-lib/special-page.site-schema.l10n.en.json +16 -0
- package/site-schema-lib/special-page.site-schema.l10n.fr.json +16 -0
- package/site-schema-lib/tour.site-schema.json +70 -0
- package/site-schema-lib/tour.site-schema.l10n.en.json +37 -0
- package/site-schema-lib/tour.site-schema.l10n.fr.json +37 -0
|
@@ -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.MediaServeModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const media_serve_controller_1 = require("./media-serve.controller");
|
|
12
|
+
let MediaServeModule = class MediaServeModule {
|
|
13
|
+
};
|
|
14
|
+
exports.MediaServeModule = MediaServeModule;
|
|
15
|
+
exports.MediaServeModule = MediaServeModule = __decorate([
|
|
16
|
+
(0, common_1.Module)({
|
|
17
|
+
controllers: [media_serve_controller_1.MediaServeController],
|
|
18
|
+
})
|
|
19
|
+
], MediaServeModule);
|
|
20
|
+
//# sourceMappingURL=media-serve.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-serve.module.js","sourceRoot":"","sources":["../../../../src/modules/public-site/media-serve/media-serve.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qEAAgE;AAKzD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAH5B,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,6CAAoB,CAAC;KACpC,CAAC;GACW,gBAAgB,CAAG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { JwtService } from "@nestjs/jwt";
|
|
2
|
+
import { Request, Response } from "express";
|
|
3
|
+
export declare class OAuth2ClientController {
|
|
4
|
+
private readonly jwtService;
|
|
5
|
+
constructor(jwtService: JwtService);
|
|
6
|
+
auth(req: Request, res: Response): Promise<void>;
|
|
7
|
+
googleLogin(): void;
|
|
8
|
+
googleLoginCallback(req: Request, res: Response): Promise<void>;
|
|
9
|
+
siteUrl(redirectTo: string): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
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.OAuth2ClientController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const jwt_1 = require("@nestjs/jwt");
|
|
18
|
+
const passport_1 = require("@nestjs/passport");
|
|
19
|
+
const html_helpers_1 = require("../../common/mail/html-helpers");
|
|
20
|
+
const context_1 = require("../../context");
|
|
21
|
+
const url_helpers_1 = require("../../helpers/url.helpers");
|
|
22
|
+
let OAuth2ClientController = class OAuth2ClientController {
|
|
23
|
+
jwtService;
|
|
24
|
+
constructor(jwtService) {
|
|
25
|
+
this.jwtService = jwtService;
|
|
26
|
+
}
|
|
27
|
+
async auth(req, res) {
|
|
28
|
+
if (req.hostname !== context_1.appConf.googleAuth.fqdn) {
|
|
29
|
+
throw new common_1.NotFoundException();
|
|
30
|
+
}
|
|
31
|
+
res.send(generateAuthPageHtml(context_1.platformAuthUrl));
|
|
32
|
+
}
|
|
33
|
+
googleLogin() { }
|
|
34
|
+
async googleLoginCallback(req, res) {
|
|
35
|
+
if (!req.user) {
|
|
36
|
+
throw new common_1.BadRequestException("Email not found in user payload");
|
|
37
|
+
}
|
|
38
|
+
const platformToken = await this.jwtService.signAsync(req.user, {
|
|
39
|
+
secret: context_1.platformJwtSecret,
|
|
40
|
+
expiresIn: "7d",
|
|
41
|
+
});
|
|
42
|
+
res.send(generateGoogleRedirectPageHtml({ platformToken, platformAuthUrl: context_1.platformAuthUrl }));
|
|
43
|
+
}
|
|
44
|
+
siteUrl(redirectTo) {
|
|
45
|
+
const siteConf = context_1.siteConfs.get(redirectTo);
|
|
46
|
+
if (!siteConf)
|
|
47
|
+
throw new common_1.BadRequestException("Site not found");
|
|
48
|
+
return (0, url_helpers_1.getBoUrl)(siteConf);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.OAuth2ClientController = OAuth2ClientController;
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, common_1.Get)(),
|
|
54
|
+
__param(0, (0, common_1.Req)()),
|
|
55
|
+
__param(1, (0, common_1.Res)()),
|
|
56
|
+
__metadata("design:type", Function),
|
|
57
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
58
|
+
__metadata("design:returntype", Promise)
|
|
59
|
+
], OAuth2ClientController.prototype, "auth", null);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, common_1.Get)("google"),
|
|
62
|
+
(0, common_1.UseGuards)((0, passport_1.AuthGuard)("google")),
|
|
63
|
+
__metadata("design:type", Function),
|
|
64
|
+
__metadata("design:paramtypes", []),
|
|
65
|
+
__metadata("design:returntype", void 0)
|
|
66
|
+
], OAuth2ClientController.prototype, "googleLogin", null);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, common_1.Get)("google/callback"),
|
|
69
|
+
(0, common_1.UseGuards)((0, passport_1.AuthGuard)("google")),
|
|
70
|
+
__param(0, (0, common_1.Req)()),
|
|
71
|
+
__param(1, (0, common_1.Res)()),
|
|
72
|
+
__metadata("design:type", Function),
|
|
73
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
74
|
+
__metadata("design:returntype", Promise)
|
|
75
|
+
], OAuth2ClientController.prototype, "googleLoginCallback", null);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, common_1.Get)("site-url/:redirectTo"),
|
|
78
|
+
__param(0, (0, common_1.Param)("redirectTo")),
|
|
79
|
+
__metadata("design:type", Function),
|
|
80
|
+
__metadata("design:paramtypes", [String]),
|
|
81
|
+
__metadata("design:returntype", void 0)
|
|
82
|
+
], OAuth2ClientController.prototype, "siteUrl", null);
|
|
83
|
+
exports.OAuth2ClientController = OAuth2ClientController = __decorate([
|
|
84
|
+
(0, common_1.Controller)("auth"),
|
|
85
|
+
__metadata("design:paramtypes", [jwt_1.JwtService])
|
|
86
|
+
], OAuth2ClientController);
|
|
87
|
+
function generateGoogleRedirectPageHtml({ platformToken, platformAuthUrl, }) {
|
|
88
|
+
return `<!DOCTYPE html>
|
|
89
|
+
<html lang="en">
|
|
90
|
+
<head>
|
|
91
|
+
<meta charset="UTF-8">
|
|
92
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
93
|
+
<title>Successful authentication</title>
|
|
94
|
+
</head>
|
|
95
|
+
<body>
|
|
96
|
+
<p>Authentication successful, redirect now to the website.</p>
|
|
97
|
+
|
|
98
|
+
<script>
|
|
99
|
+
async function redirectToBo () {
|
|
100
|
+
const redirectTo = sessionStorage.getItem("redirectTo");
|
|
101
|
+
const redirectUrl = await getRedirectUrl(redirectTo);
|
|
102
|
+
window.location.replace(redirectUrl + "/adm/login/?pltok=${(0, html_helpers_1.escapeHtml)(platformToken)}");
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async function getRedirectUrl (redirectTo) {
|
|
106
|
+
const res = await fetch("${(0, html_helpers_1.escapeHtml)(platformAuthUrl)}/site-url/" + redirectTo);
|
|
107
|
+
if (!res.ok) {
|
|
108
|
+
throw new Error(\`redirect url, \${res.status} \${res.statusText}\`)
|
|
109
|
+
}
|
|
110
|
+
return await res.text();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
redirectToBo().catch(error => {
|
|
114
|
+
const node = document.createElement("p");
|
|
115
|
+
node.textContent = \`You have been successfully authenticated, but we cannot redirect you to the website: \${error.message}\`;
|
|
116
|
+
node.style = "color: red;";
|
|
117
|
+
document.body.appendChild(node);
|
|
118
|
+
console.error(error);
|
|
119
|
+
});
|
|
120
|
+
</script>
|
|
121
|
+
</body>
|
|
122
|
+
</html>`;
|
|
123
|
+
}
|
|
124
|
+
function generateAuthPageHtml(platformAuthUrl) {
|
|
125
|
+
return `<!DOCTYPE html>
|
|
126
|
+
<html lang="en">
|
|
127
|
+
<head>
|
|
128
|
+
<meta charset="UTF-8">
|
|
129
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
130
|
+
<title>Authentication</title>
|
|
131
|
+
</head>
|
|
132
|
+
<body>
|
|
133
|
+
<p>Initiating authentification on Google…</p>
|
|
134
|
+
|
|
135
|
+
<script>
|
|
136
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
137
|
+
const redirectTo = urlParams.get("redirectTo");
|
|
138
|
+
sessionStorage.setItem("redirectTo", redirectTo);
|
|
139
|
+
window.location.replace("${(0, html_helpers_1.escapeHtml)(platformAuthUrl)}/google");
|
|
140
|
+
</script>
|
|
141
|
+
</body>
|
|
142
|
+
</html>`;
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=oauth2-client.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth2-client.controller.js","sourceRoot":"","sources":["../../../src/modules/public-site/oauth2-client.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AAC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,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;kDAMrC;AAID;IAFC,IAAA,YAAG,EAAC,QAAQ,CAAC;IACb,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,QAAQ,CAAC,CAAC;;;;yDACf;AAIV;IAFL,IAAA,YAAG,EAAC,iBAAiB,CAAC;IACtB,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,QAAQ,CAAC,CAAC;IACJ,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;iEAUpD;AAGD;IADC,IAAA,YAAG,EAAC,sBAAsB,CAAC;IACnB,WAAA,IAAA,cAAK,EAAC,YAAY,CAAC,CAAA;;;;qDAI3B;iCAnCU,sBAAsB;IADlC,IAAA,mBAAU,EAAC,MAAM,CAAC;qCAEwB,gBAAU;GADxC,sBAAsB,CAoClC;AAED,SAAS,8BAA8B,CAAC,EACtC,aAAa,EACb,eAAe,GACoC;IACnD,OAAO;;;;;;;;;;;;;;iEAcwD,IAAA,yBAAU,EAAC,aAAa,CAAC;;;;iCAIzD,IAAA,yBAAU,EAAC,eAAe,CAAC;;;;;;;;;;;;;;;;QAgBpD,CAAC;AACT,CAAC;AAED,SAAS,oBAAoB,CAAC,eAAuB;IACnD,OAAO;;;;;;;;;;;;;;+BAcsB,IAAA,yBAAU,EAAC,eAAe,CAAC;;;QAGlD,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ParsedSectionId } from "@paroicms/anywhere-lib";
|
|
2
|
+
import { Tracker } from "@paroicms/server-lib";
|
|
3
|
+
import { SiteContext } from "../../../site-context/site-context.types";
|
|
4
|
+
export declare function getUrlOfDocument(siteContext: SiteContext, tracker: Tracker, documentId: ParsedSectionId): Promise<string>;
|
|
5
|
+
export declare function getUrlOfDocument(siteContext: SiteContext, tracker: Tracker, documentId: ParsedSectionId, options: {
|
|
6
|
+
returnUrlDependencyKeys: true;
|
|
7
|
+
}): Promise<{
|
|
8
|
+
url: string;
|
|
9
|
+
dependencyKeys: string[];
|
|
10
|
+
}>;
|
|
11
|
+
export declare function getHomeUrl(siteContext: Pick<SiteContext, "multilingual">, lang: string): string;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHomeUrl = exports.getUrlOfDocument = void 0;
|
|
4
|
+
const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
|
|
5
|
+
const anywhere_lib_1 = require("@paroicms/anywhere-lib");
|
|
6
|
+
const text_cache_1 = require("../../../common/text-cache");
|
|
7
|
+
const ddl_migration_1 = require("../../../site-context/db-init/ddl-migration");
|
|
8
|
+
const leaf_queries_1 = require("../../core/leaf/leaf.queries");
|
|
9
|
+
async function getUrlOfDocument(siteContext, tracker, documentId, options = {}) {
|
|
10
|
+
const cacheKey = (0, text_cache_1.makeCacheKey)({ kind: "url", documentId });
|
|
11
|
+
const cacheValue = await siteContext.textCache.getCacheValue(cacheKey, tracker);
|
|
12
|
+
if (cacheValue) {
|
|
13
|
+
if (!options.returnUrlDependencyKeys)
|
|
14
|
+
return cacheValue.value;
|
|
15
|
+
return {
|
|
16
|
+
url: cacheValue.value,
|
|
17
|
+
dependencyKeys: await siteContext.textCache.getDependencyKeys(cacheKey, tracker),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
let dependencyKeys;
|
|
21
|
+
let url;
|
|
22
|
+
const { leafId, lang } = documentId;
|
|
23
|
+
const depth = await (0, leaf_queries_1.getLeafDepth)(siteContext, tracker, leafId);
|
|
24
|
+
if (depth === 0) {
|
|
25
|
+
url = getHomeUrl(siteContext, lang);
|
|
26
|
+
dependencyKeys = [];
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const query = buildUrlQuery(siteContext, documentId, depth);
|
|
30
|
+
const [row] = await query.getRawMany();
|
|
31
|
+
tracker.trackAccess(ddl_migration_1.dbSchemaName, "PaLeaf", "read");
|
|
32
|
+
if (!row) {
|
|
33
|
+
throw new Error(`invalid url data for document "${lang}:${leafId}"`);
|
|
34
|
+
}
|
|
35
|
+
const urlData = formatUrlData(row, depth);
|
|
36
|
+
url = makeUrl(siteContext, urlData, lang);
|
|
37
|
+
dependencyKeys = makeUrlDependencyKeys(urlData, lang);
|
|
38
|
+
}
|
|
39
|
+
await siteContext.textCache.setCacheValue({
|
|
40
|
+
cacheKey,
|
|
41
|
+
value: url,
|
|
42
|
+
dependencyKeys,
|
|
43
|
+
}, tracker);
|
|
44
|
+
return options.returnUrlDependencyKeys ? { url, dependencyKeys } : url;
|
|
45
|
+
}
|
|
46
|
+
exports.getUrlOfDocument = getUrlOfDocument;
|
|
47
|
+
function buildUrlQuery(siteContext, sectionId, depth) {
|
|
48
|
+
const { leafId, lang } = sectionId;
|
|
49
|
+
let cur = depth;
|
|
50
|
+
const query = siteContext.mainCn
|
|
51
|
+
.createQueryBuilder()
|
|
52
|
+
.addSelect(`l${cur}.id`, `id${cur}`)
|
|
53
|
+
.addSelect(`l${cur}.leafType`, `leafType${cur}`)
|
|
54
|
+
.addSelect(`l${cur}.relativeId`, `relativeId${cur}`)
|
|
55
|
+
.addSelect(`l${cur}.publishDate`, `publishDate${cur}`)
|
|
56
|
+
.addSelect(`d${cur}.slug`, `slug${cur}`)
|
|
57
|
+
.from("PaLeaf", `l${cur}`)
|
|
58
|
+
.innerJoin("PaSection", `s${cur}`, `s${cur}.leafId = l${cur}.id and s${cur}.lang = :lang`, {
|
|
59
|
+
lang,
|
|
60
|
+
})
|
|
61
|
+
.leftJoin("PaDocument", `d${cur}`, `d${cur}.leafId = s${cur}.leafId and d${cur}.lang = s${cur}.lang`)
|
|
62
|
+
.where(`l${cur}.id = :leafId`, { leafId })
|
|
63
|
+
.andWhere(`l${cur}.publishDate is not null`);
|
|
64
|
+
let prev = cur;
|
|
65
|
+
while (prev > 1) {
|
|
66
|
+
cur = prev - 1;
|
|
67
|
+
query
|
|
68
|
+
.addSelect(`l${cur}.id`, `id${cur}`)
|
|
69
|
+
.addSelect(`l${cur}.leafType`, `leafType${cur}`)
|
|
70
|
+
.addSelect(`l${cur}.relativeId`, `relativeId${cur}`)
|
|
71
|
+
.addSelect(`l${cur}.publishDate`, `publishDate${cur}`)
|
|
72
|
+
.addSelect(`d${cur}.slug`, `slug${cur}`)
|
|
73
|
+
.innerJoin("PaLeaf", `l${cur}`, `l${cur}.id = l${prev}.parentId`)
|
|
74
|
+
.innerJoin("PaSection", `s${cur}`, `s${cur}.leafId = l${cur}.id and s${cur}.lang = :lang`, {
|
|
75
|
+
lang,
|
|
76
|
+
})
|
|
77
|
+
.leftJoin("PaDocument", `d${cur}`, `d${cur}.leafId = s${cur}.leafId and d${cur}.lang = s${cur}.lang`)
|
|
78
|
+
.andWhere(`l${cur}.publishDate is not null`);
|
|
79
|
+
prev = cur;
|
|
80
|
+
}
|
|
81
|
+
query.andWhere(`l${prev}.parentId = :homeLeafId`, {
|
|
82
|
+
homeLeafId: siteContext.siteIds.homeIds.leafId,
|
|
83
|
+
});
|
|
84
|
+
return query;
|
|
85
|
+
}
|
|
86
|
+
function formatUrlData(row, depth) {
|
|
87
|
+
const parts = new Map();
|
|
88
|
+
for (let cur = 1; cur <= depth; ++cur) {
|
|
89
|
+
parts.set(cur, {
|
|
90
|
+
leafId: (0, data_formatters_lib_1.strVal)(row[`id${cur}`]),
|
|
91
|
+
leafType: (0, data_formatters_lib_1.strVal)(row[`leafType${cur}`]),
|
|
92
|
+
relativeId: (0, data_formatters_lib_1.strVal)(row[`relativeId${cur}`]),
|
|
93
|
+
slug: (0, data_formatters_lib_1.strValOrUndef)(row[`slug${cur}`]),
|
|
94
|
+
publishDate: (0, data_formatters_lib_1.dateVal)(row[`publishDate${cur}`]),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return { depth, parts };
|
|
98
|
+
}
|
|
99
|
+
function getHomeUrl(siteContext, lang) {
|
|
100
|
+
return siteContext.multilingual ? `/${lang}` : "/";
|
|
101
|
+
}
|
|
102
|
+
exports.getHomeUrl = getHomeUrl;
|
|
103
|
+
function makeUrl(siteContext, urlData, lang) {
|
|
104
|
+
const { siteSchema, multilingual } = siteContext;
|
|
105
|
+
const urlParts = multilingual ? [lang] : [];
|
|
106
|
+
let parent = (0, anywhere_lib_1.getDocumentTypeByLeafType)(siteSchema, "home");
|
|
107
|
+
for (let cur = 1; cur <= urlData.depth; ++cur) {
|
|
108
|
+
const part = urlData.parts.get(cur);
|
|
109
|
+
if (!part)
|
|
110
|
+
throw new Error(`missing url part for depth '${cur}'`);
|
|
111
|
+
if (!parent.children?.includes(part.leafType)) {
|
|
112
|
+
throw new Error(`schema and database are not compatible, '${part.leafType}' should not be a child of '${parent.leafType}'`);
|
|
113
|
+
}
|
|
114
|
+
const docType = (0, anywhere_lib_1.getDocumentTypeByLeafType)(siteSchema, part.leafType);
|
|
115
|
+
if (docType.kind === "routingPoint") {
|
|
116
|
+
const part = docType.urlPaths?.[lang];
|
|
117
|
+
if (!part) {
|
|
118
|
+
throw new Error(`missing urlPath['${lang}'] in document type '${docType.leafType}'`);
|
|
119
|
+
}
|
|
120
|
+
urlParts.push(part);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
if (docType.route === ":relativeId-:slug") {
|
|
124
|
+
urlParts.push(makeRelativeIdSlugUrlPart(part));
|
|
125
|
+
}
|
|
126
|
+
else if (docType.route === ":yyyy/:mm/:dd/:relativeId-:slug") {
|
|
127
|
+
const { publishDate } = part;
|
|
128
|
+
urlParts.push(String(publishDate.getFullYear()).padStart(4, "0"));
|
|
129
|
+
urlParts.push(String(publishDate.getMonth() + 1).padStart(2, "0"));
|
|
130
|
+
urlParts.push(String(publishDate.getDate()).padStart(2, "0"));
|
|
131
|
+
urlParts.push(makeRelativeIdSlugUrlPart(part));
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
throw new Error(`in '${docType.leafType}', unknown value for route: '${docType.route}'`);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
parent = docType;
|
|
138
|
+
}
|
|
139
|
+
return `/${urlParts.join("/")}`;
|
|
140
|
+
}
|
|
141
|
+
function makeRelativeIdSlugUrlPart(part) {
|
|
142
|
+
return part.slug ? `${part.relativeId}-${part.slug}` : part.relativeId;
|
|
143
|
+
}
|
|
144
|
+
function makeUrlDependencyKeys(urlData, lang) {
|
|
145
|
+
return Array.from(urlData.parts.values()).map((part) => (0, text_cache_1.makeCacheDependencyKey)({
|
|
146
|
+
documentId: { lang, leafId: part.leafId },
|
|
147
|
+
perimeter: "slug",
|
|
148
|
+
}));
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=make-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"make-url.js","sourceRoot":"","sources":["../../../../src/modules/public-site/public-route/make-url.ts"],"names":[],"mappings":";;;AAAA,oEAA4E;AAC5E,yDAAyF;AAEzF,2DAAkF;AAClF,+EAA2E;AAE3E,+DAA4D;AA0BrD,KAAK,UAAU,gBAAgB,CACpC,WAAwB,EACxB,OAAgB,EAChB,UAA2B,EAC3B,UAAiD,EAAE;IAEnD,MAAM,QAAQ,GAAG,IAAA,yBAAY,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;IAC3D,MAAM,UAAU,GAAG,MAAM,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAChF,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,CAAC,OAAO,CAAC,uBAAuB;YAAE,OAAO,UAAU,CAAC,KAAK,CAAC;QAC9D,OAAO;YACL,GAAG,EAAE,UAAU,CAAC,KAAK;YACrB,cAAc,EAAE,MAAM,WAAW,CAAC,SAAS,CAAC,iBAAiB,CAAC,QAAQ,EAAE,OAAO,CAAC;SACjF,CAAC;IACJ,CAAC;IAED,IAAI,cAAwB,CAAC;I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IACD,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAClC,CAAC;AAED,SAAS,yBAAyB,CAAC,IAAiB;IAClD,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;AACzE,CAAC;AAED,SAAS,qBAAqB,CAAC,OAAgB,EAAE,IAAY;IAC3D,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACrD,IAAA,mCAAsB,EAAC;QACrB,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;QACzC,SAAS,EAAE,MAAM;KAClB,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ClassicDocumentSchema, DocumentSchema, RoutingPointDocumentSchema } from "@paroicms/anywhere-lib";
|
|
2
|
+
import { SiteContext } from "../../../site-context/site-context.types";
|
|
3
|
+
export interface ParsedPublicRoute {
|
|
4
|
+
lang: string;
|
|
5
|
+
routingPoints: RoutingPointDocumentSchema[];
|
|
6
|
+
classicRelativeIds: ClassicRelativeId[];
|
|
7
|
+
documentType: DocumentSchema;
|
|
8
|
+
depth: number;
|
|
9
|
+
urlCacheKey: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ClassicRelativeId {
|
|
12
|
+
relativeId: string;
|
|
13
|
+
documentType: ClassicDocumentSchema;
|
|
14
|
+
}
|
|
15
|
+
export declare function parsePublicRoute(siteContext: Pick<SiteContext, "siteSchema" | "multilingual">, path: string): ParsedPublicRoute | undefined;
|
|
16
|
+
export declare function findParentParsedRouteWithData(parsedRoute: ParsedPublicRoute): ParsedPublicRoute | undefined;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findParentParsedRouteWithData = exports.parsePublicRoute = void 0;
|
|
4
|
+
function parsePublicRoute(siteContext, path) {
|
|
5
|
+
const { siteSchema, multilingual } = siteContext;
|
|
6
|
+
const tokens = path
|
|
7
|
+
.split("/")
|
|
8
|
+
.slice(1)
|
|
9
|
+
.filter((token) => token.length > 0);
|
|
10
|
+
const lang = multilingual ? tokens[0] : siteSchema.langs[0];
|
|
11
|
+
const parts = multilingual ? tokens.slice(1) : tokens;
|
|
12
|
+
if (!lang || !siteSchema.langs.includes(lang))
|
|
13
|
+
return;
|
|
14
|
+
const urlCacheKey = [];
|
|
15
|
+
if (multilingual)
|
|
16
|
+
urlCacheKey.push(lang);
|
|
17
|
+
let prev = siteSchema.documentTypes.home;
|
|
18
|
+
const routingPoints = [prev];
|
|
19
|
+
let depth = 0;
|
|
20
|
+
let i = 0;
|
|
21
|
+
for (; i < parts.length; ++i) {
|
|
22
|
+
const urlPath = parts[i];
|
|
23
|
+
const routingPoint = findRoutingPointByUrlPath({ siteSchema, parent: prev, urlPath, lang });
|
|
24
|
+
if (!routingPoint)
|
|
25
|
+
break;
|
|
26
|
+
routingPoints.push(routingPoint);
|
|
27
|
+
urlCacheKey.push(urlPath);
|
|
28
|
+
++depth;
|
|
29
|
+
prev = routingPoint;
|
|
30
|
+
}
|
|
31
|
+
const classicRelativeIds = [];
|
|
32
|
+
while (i < parts.length) {
|
|
33
|
+
const found = findClassicRelativeIdByUrlPath({
|
|
34
|
+
siteSchema,
|
|
35
|
+
parent: prev,
|
|
36
|
+
parts,
|
|
37
|
+
partsIndex: i,
|
|
38
|
+
});
|
|
39
|
+
if (!found)
|
|
40
|
+
return;
|
|
41
|
+
classicRelativeIds.push(found.classicRelativeId);
|
|
42
|
+
urlCacheKey.push(`${found.classicRelativeId.documentType.leafType}:${found.classicRelativeId.relativeId}`);
|
|
43
|
+
++depth;
|
|
44
|
+
prev = found.classicRelativeId.documentType;
|
|
45
|
+
i += found.skipUrlParts;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
lang,
|
|
49
|
+
routingPoints,
|
|
50
|
+
classicRelativeIds,
|
|
51
|
+
documentType: prev,
|
|
52
|
+
depth,
|
|
53
|
+
urlCacheKey: urlCacheKey.join("/"),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
exports.parsePublicRoute = parsePublicRoute;
|
|
57
|
+
function findRoutingPointByUrlPath({ siteSchema, parent, urlPath, lang, }) {
|
|
58
|
+
for (const leafType of parent.children ?? []) {
|
|
59
|
+
const documentType = siteSchema.documentTypes[leafType];
|
|
60
|
+
if (!documentType)
|
|
61
|
+
throw new Error(`document-type '${leafType}' should be in the schema`);
|
|
62
|
+
if (documentType.kind !== "routingPoint" || !documentType.urlPaths)
|
|
63
|
+
continue;
|
|
64
|
+
if (urlPath === documentType.urlPaths[lang])
|
|
65
|
+
return documentType;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function findClassicRelativeIdByUrlPath({ siteSchema, parent, parts, partsIndex, }) {
|
|
69
|
+
for (const leafType of parent.children ?? []) {
|
|
70
|
+
const documentType = siteSchema.documentTypes[leafType];
|
|
71
|
+
if (!documentType)
|
|
72
|
+
throw new Error(`document-type '${leafType}' should be in the schema`);
|
|
73
|
+
if (documentType.kind !== "classic")
|
|
74
|
+
continue;
|
|
75
|
+
if (documentType.route === ":relativeId-:slug") {
|
|
76
|
+
const urlPath = parts[partsIndex];
|
|
77
|
+
const relativeId = parseClassicRelativeIdSlug(urlPath);
|
|
78
|
+
return {
|
|
79
|
+
classicRelativeId: { relativeId, documentType },
|
|
80
|
+
skipUrlParts: 1,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
if (documentType.route === ":yyyy/:mm/:dd/:relativeId-:slug") {
|
|
84
|
+
if (parts.length < partsIndex + 3 ||
|
|
85
|
+
!isYear(parts[partsIndex]) ||
|
|
86
|
+
!isMonth(parts[partsIndex + 1]) ||
|
|
87
|
+
!isDay(parts[partsIndex + 2])) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
const urlPath = parts[partsIndex + 3];
|
|
91
|
+
const relativeId = parseClassicRelativeIdSlug(urlPath);
|
|
92
|
+
return {
|
|
93
|
+
classicRelativeId: { relativeId, documentType },
|
|
94
|
+
skipUrlParts: 4,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function parseClassicRelativeIdSlug(urlPath) {
|
|
100
|
+
const index = urlPath.indexOf("-");
|
|
101
|
+
return index === -1 ? urlPath : urlPath.substring(0, index);
|
|
102
|
+
}
|
|
103
|
+
function isYear(s) {
|
|
104
|
+
return /[0-9]{4}/.test(s);
|
|
105
|
+
}
|
|
106
|
+
function isMonth(s) {
|
|
107
|
+
if (!/[0-9]{2}/.test(s))
|
|
108
|
+
return false;
|
|
109
|
+
const val = Number(s);
|
|
110
|
+
return val >= 1 && val <= 12;
|
|
111
|
+
}
|
|
112
|
+
function isDay(s) {
|
|
113
|
+
if (!/[0-9]{2}/.test(s))
|
|
114
|
+
return false;
|
|
115
|
+
const val = Number(s);
|
|
116
|
+
return val >= 1 && val <= 31;
|
|
117
|
+
}
|
|
118
|
+
function findParentParsedRouteWithData(parsedRoute) {
|
|
119
|
+
let curRoute = parsedRoute;
|
|
120
|
+
while (true) {
|
|
121
|
+
curRoute = findParentParsedRoute(curRoute);
|
|
122
|
+
if (!curRoute)
|
|
123
|
+
break;
|
|
124
|
+
if (curRoute.documentType.withData)
|
|
125
|
+
return curRoute;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
exports.findParentParsedRouteWithData = findParentParsedRouteWithData;
|
|
129
|
+
function findParentParsedRoute(parsedRoute) {
|
|
130
|
+
const routingPoints = [...parsedRoute.routingPoints];
|
|
131
|
+
const classicRelativeIds = [...parsedRoute.classicRelativeIds];
|
|
132
|
+
const urlCacheKey = parsedRoute.urlCacheKey.split("/");
|
|
133
|
+
if (classicRelativeIds.length > 0) {
|
|
134
|
+
classicRelativeIds.pop();
|
|
135
|
+
urlCacheKey.pop();
|
|
136
|
+
}
|
|
137
|
+
else if (routingPoints.length > 0) {
|
|
138
|
+
routingPoints.pop();
|
|
139
|
+
urlCacheKey.pop();
|
|
140
|
+
}
|
|
141
|
+
if (classicRelativeIds.length === 0 && routingPoints.length === 0)
|
|
142
|
+
return;
|
|
143
|
+
const lastClassic = classicRelativeIds.length > 0 ? classicRelativeIds[classicRelativeIds.length - 1] : undefined;
|
|
144
|
+
const documentType = lastClassic?.documentType ?? routingPoints[routingPoints.length - 1];
|
|
145
|
+
return {
|
|
146
|
+
lang: parsedRoute.lang,
|
|
147
|
+
routingPoints,
|
|
148
|
+
classicRelativeIds,
|
|
149
|
+
documentType,
|
|
150
|
+
depth: parsedRoute.depth - 1,
|
|
151
|
+
urlCacheKey: urlCacheKey.join("/"),
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=public-route-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-route-parser.js","sourceRoot":"","sources":["../../../../src/modules/public-site/public-route/public-route-parser.ts"],"names":[],"mappings":";;;AAsBA,SAAgB,gBAAgB,CAC9B,WAA6D,EAC7D,IAAY;IAEZ,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,WAAW,CAAC;IACjD,MAAM,MAAM,GAAG,IAAI;SAChB,KAAK,CAAC,GAAG,CAAC;SACV,KAAK,CAAC,CAAC,CAAC;SACR,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5D,MAAM,KAAK,GAAG,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CAAC;IACpB,CAAC;SAAM,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,aAAa,CAAC,GAAG,EAAE,CAAC;QACpB,WAAW,CAAC,GAAG,EAAE,CAAC;IACpB,CAAC;IAED,IAAI,kBAAkB,CAAC,MAAM,KAAK,CAAC,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAE1E,MAAM,WAAW,GACf,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAChG,MAAM,YAAY,GAAG,WAAW,EAAE,YAAY,IAAI,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAE1F,OAAO;QACL,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,aAAa;QACb,kBAAkB;QAClB,YAAY;QACZ,KAAK,EAAE,WAAW,CAAC,KAAK,GAAG,CAAC;QAC5B,WAAW,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC;KACnC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PageValues } from "../../../public-payload/public-payload.types";
|
|
2
|
+
import { SiteContext } from "../../../site-context/site-context.types";
|
|
3
|
+
import { ParsedPublicRoute } from "./public-route-parser";
|
|
4
|
+
export interface RawPagePayload {
|
|
5
|
+
leafIdPath: string[];
|
|
6
|
+
pageValues: PageValues;
|
|
7
|
+
}
|
|
8
|
+
export declare function fetchRawPagePayload(siteContext: SiteContext, parsedRoute: ParsedPublicRoute): Promise<RawPagePayload | undefined>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchRawPagePayload = void 0;
|
|
4
|
+
const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
|
|
5
|
+
const page_values_queries_1 = require("../../../public-payload/page-values.queries");
|
|
6
|
+
async function fetchRawPagePayload(siteContext, parsedRoute) {
|
|
7
|
+
const query = buildRawPagePayloadQuery(siteContext, parsedRoute);
|
|
8
|
+
const [row] = await query.getRawMany();
|
|
9
|
+
if (!row)
|
|
10
|
+
return;
|
|
11
|
+
return formatRawPagePayload(row, {
|
|
12
|
+
depth: parsedRoute.depth,
|
|
13
|
+
lang: parsedRoute.lang,
|
|
14
|
+
leafType: parsedRoute.documentType.leafType,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
exports.fetchRawPagePayload = fetchRawPagePayload;
|
|
18
|
+
function buildRawPagePayloadQuery(siteContext, parsedRoute) {
|
|
19
|
+
const query = siteContext.mainCn.createQueryBuilder();
|
|
20
|
+
query
|
|
21
|
+
.select("cast(l0.id as varchar)", "_id0")
|
|
22
|
+
.from("PaLeaf", "l0")
|
|
23
|
+
.innerJoin("PaSection", "s0", "l0.id = s0.leafId and s0.lang = :lang", {
|
|
24
|
+
lang: parsedRoute.lang,
|
|
25
|
+
})
|
|
26
|
+
.where("l0.depth = 0")
|
|
27
|
+
.andWhere("l0.leafType = 'home'")
|
|
28
|
+
.andWhere("l0.publishDate <= current_timestamp")
|
|
29
|
+
.andWhere("s0.ready = 1");
|
|
30
|
+
let prev = 0;
|
|
31
|
+
for (const routingPoint of parsedRoute.routingPoints.slice(1)) {
|
|
32
|
+
const cur = prev + 1;
|
|
33
|
+
query
|
|
34
|
+
.addSelect(`cast(l${cur}.id as varchar)`, `_id${cur}`)
|
|
35
|
+
.innerJoin("PaLeaf", `l${cur}`, `l${prev}.id = l${cur}.parentId and l${cur}.leafType = :leafType${cur}`, {
|
|
36
|
+
[`leafType${cur}`]: routingPoint.leafType,
|
|
37
|
+
})
|
|
38
|
+
.innerJoin("PaSection", `s${cur}`, `l${cur}.id = s${cur}.leafId and s${cur}.lang = :lang`, {
|
|
39
|
+
lang: parsedRoute.lang,
|
|
40
|
+
})
|
|
41
|
+
.andWhere(`l${cur}.publishDate <= current_timestamp`)
|
|
42
|
+
.andWhere(`s${cur}.ready = 1`);
|
|
43
|
+
prev = cur;
|
|
44
|
+
}
|
|
45
|
+
for (const { documentType, relativeId } of parsedRoute.classicRelativeIds) {
|
|
46
|
+
const cur = prev + 1;
|
|
47
|
+
query
|
|
48
|
+
.addSelect(`cast(l${cur}.id as varchar)`, `_id${cur}`)
|
|
49
|
+
.innerJoin("PaLeaf", `l${cur}`, `l${prev}.id = l${cur}.parentId and l${cur}.relativeId = :relativeId${cur}`, {
|
|
50
|
+
[`relativeId${cur}`]: relativeId,
|
|
51
|
+
})
|
|
52
|
+
.innerJoin("PaSection", `s${cur}`, `l${cur}.id = s${cur}.leafId and s${cur}.lang = :lang`, {
|
|
53
|
+
lang: parsedRoute.lang,
|
|
54
|
+
})
|
|
55
|
+
.andWhere(`l${cur}.leafType = :leafType${cur}`, {
|
|
56
|
+
[`leafType${cur}`]: documentType.leafType,
|
|
57
|
+
})
|
|
58
|
+
.andWhere(`l${cur}.publishDate <= current_timestamp`)
|
|
59
|
+
.andWhere(`s${cur}.ready = 1`);
|
|
60
|
+
prev = cur;
|
|
61
|
+
}
|
|
62
|
+
query
|
|
63
|
+
.addSelect(`l${prev}.relativeId`, "relativeId")
|
|
64
|
+
.addSelect(`l${prev}.publishDate`, "publishDate");
|
|
65
|
+
if (parsedRoute.documentType.withData) {
|
|
66
|
+
query
|
|
67
|
+
.addSelect("d.title", "title")
|
|
68
|
+
.addSelect("d.slug", "slug")
|
|
69
|
+
.addSelect("d.metaDescription", "metaDescription")
|
|
70
|
+
.addSelect("d.metaKeywords", "metaKeywords")
|
|
71
|
+
.innerJoin("PaDocument", "d", `l${prev}.id = d.leafId and s${prev}.lang = d.lang`);
|
|
72
|
+
}
|
|
73
|
+
return query;
|
|
74
|
+
}
|
|
75
|
+
function formatRawPagePayload(row, { depth, lang, leafType }) {
|
|
76
|
+
const leafIdPath = [];
|
|
77
|
+
for (let i = 0; i <= depth; ++i) {
|
|
78
|
+
leafIdPath.push((0, data_formatters_lib_1.strVal)(row[`_id${i}`], { varName: `_id${i}` }));
|
|
79
|
+
}
|
|
80
|
+
const leafId = leafIdPath[depth];
|
|
81
|
+
return {
|
|
82
|
+
leafIdPath,
|
|
83
|
+
pageValues: (0, page_values_queries_1.formatPageValues)(row, { lang, leafId, leafType }),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=raw-document-payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raw-document-payload.js","sourceRoot":"","sources":["../../../../src/modules/public-site/public-route/raw-document-payload.ts"],"names":[],"mappings":";;;AAAA,oEAAoD;AAEpD,qFAA+E;AAUxE,KAAK,UAAU,mBAAmB,CACvC,WAAwB,EACxB,WAA8B;IAE9B,MAAM,KAAK,GAAG,wBAAwB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACjE,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,KAAK,CAAC,UAAU,EAAO,CAAC;IAC5C,IAAI,CAAC,GAAG;QAAE,OAAO;IAEjB,OAAO,oBAAoB,CAAC,GAAG,EAAE;QAC/B,KAAK,EAAE,WAAW,CAAC,KAAK;QACxB,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,QAAQ,EAAE,WAAW,CAAC,YAAY,CAAC,QAAQ;KAC5C,CAAC,CAAC;AACL,CAAC;AAbD,kDAaC;AAED,SAAS,wBAAwB,CAAC,WAAwB,EAAE,WAA8B;IACxF,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC;IACtD,KAAK;SACF,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAAC;SACxC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC;SACpB,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,uCAAuC,EAAE;QACrE,IAAI,EAAE,WAAW,CAAC,IAAI;KACvB,CAAC;SACD,KAAK,CAAC,cAAc,C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