@candlerip/shared3 0.0.100 → 0.0.102
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +16 -1
- package/src/_devops/get-project-config/domains/args/index.d.ts +5 -0
- package/src/_devops/get-project-config/domains/index.d.ts +1 -0
- package/src/_devops/get-project-config/domains/index.js +1 -0
- package/src/_devops/get-project-config/index.d.ts +2 -0
- package/src/_devops/get-project-config/index.js +18 -0
- package/src/aws/account-id/config.d.ts +1 -0
- package/src/aws/account-id/config.js +1 -0
- package/src/aws/app-config/get-app-config/util.d.ts +10 -0
- package/src/aws/app-config/get-app-config/util.js +79 -0
- package/src/aws/app-config/index.d.ts +1 -0
- package/src/aws/app-config/index.js +1 -0
- package/src/aws/cdk/attach-policy/type.d.ts +24 -0
- package/src/aws/cdk/attach-policy/util.d.ts +2 -0
- package/src/aws/cdk/attach-policy/util.js +33 -0
- package/src/aws/cdk/compose-cdk-stack/type.d.ts +2 -0
- package/src/aws/cdk/compose-cdk-stack/util.d.ts +2 -0
- package/src/aws/cdk/compose-cdk-stack/util.js +2 -0
- package/src/aws/cdk/index.d.ts +2 -0
- package/src/aws/cdk/index.js +2 -0
- package/src/aws/index.d.ts +7 -1
- package/src/aws/index.js +7 -1
- package/src/aws/lambda/index.d.ts +2 -0
- package/src/aws/lambda/index.js +2 -0
- package/src/aws/lambda/lambda-arn/compose-lambda-arn/type.d.ts +2 -0
- package/src/aws/lambda/lambda-arn/compose-lambda-arn/util.d.ts +2 -0
- package/src/aws/lambda/lambda-arn/compose-lambda-arn/util.js +2 -0
- package/src/aws/lambda/lambda-arn/config.d.ts +1 -0
- package/src/aws/lambda/lambda-arn/config.js +3 -0
- package/src/aws/lambda/lambda-arn/index.d.ts +2 -0
- package/src/aws/lambda/lambda-arn/index.js +2 -0
- package/src/aws/lambda/lambda-name/config.d.ts +1 -0
- package/src/aws/lambda/lambda-name/config.js +1 -0
- package/src/aws/lambda/lambda-name/type.d.ts +2 -0
- package/src/aws/s3/index.d.ts +1 -0
- package/src/aws/s3/index.js +1 -0
- package/src/aws/s3/s3-arn/compose-s3-arn/index.d.ts +1 -0
- package/src/aws/s3/s3-arn/compose-s3-arn/index.js +1 -0
- package/src/aws/s3/s3-arn/compose-s3-arn/type.d.ts +1 -0
- package/src/aws/s3/s3-arn/compose-s3-arn/util.d.ts +2 -0
- package/src/aws/s3/s3-arn/compose-s3-arn/util.js +2 -0
- package/src/aws/s3/s3-arn/config.d.ts +1 -0
- package/src/aws/s3/s3-arn/config.js +1 -0
- package/src/aws/s3/s3-arn/index.d.ts +2 -0
- package/src/aws/s3/s3-arn/index.js +2 -0
- package/src/aws/sqs/index.d.ts +2 -0
- package/src/aws/sqs/index.js +2 -0
- package/src/aws/sqs/queue-arn/compose-queue-arn/index.d.ts +1 -0
- package/src/aws/sqs/queue-arn/compose-queue-arn/index.js +1 -0
- package/src/aws/sqs/queue-arn/compose-queue-arn/type.d.ts +2 -0
- package/src/aws/sqs/queue-arn/compose-queue-arn/util.d.ts +2 -0
- package/src/aws/sqs/queue-arn/compose-queue-arn/util.js +2 -0
- package/src/aws/sqs/queue-arn/config.d.ts +1 -0
- package/src/aws/sqs/queue-arn/config.js +3 -0
- package/src/aws/sqs/queue-arn/index.d.ts +2 -0
- package/src/aws/sqs/queue-arn/index.js +2 -0
- package/src/aws/sqs/queue-name/cache/config.d.ts +1 -0
- package/src/aws/sqs/queue-name/cache/config.js +1 -0
- package/src/aws/sqs/queue-name/cache/type.d.ts +2 -0
- package/src/aws/sqs/queue-name/index.d.ts +3 -0
- package/src/aws/sqs/queue-name/index.js +3 -0
- package/src/aws/sqs/queue-name/logger/config.d.ts +1 -0
- package/src/aws/sqs/queue-name/logger/config.js +1 -0
- package/src/aws/sqs/queue-name/logger/type.d.ts +2 -0
- package/src/aws/sqs/queue-name/queue-name/config.d.ts +1 -0
- package/src/aws/sqs/queue-name/queue-name/config.js +3 -0
- package/src/aws/sqs/queue-name/queue-name/index.d.ts +2 -0
- package/src/aws/sqs/queue-name/queue-name/index.js +2 -0
- package/src/aws/sqs/queue-name/queue-name/type.d.ts +2 -0
- package/src/backend/cache/cache/index.d.ts +2 -0
- package/src/backend/cache/cache/index.js +2 -0
- package/src/backend/cache/cache/singleton.d.ts +23 -0
- package/src/backend/cache/cache/singleton.js +104 -0
- package/src/backend/cache/cache/type.d.ts +5 -0
- package/src/backend/cache/cache-key/config.d.ts +1 -0
- package/src/backend/cache/cache-key/config.js +18 -0
- package/src/backend/cache/cache-key/type-guard.d.ts +2 -0
- package/src/backend/cache/cache-key/type-guard.js +4 -0
- package/src/backend/cache/cache-key/type.d.ts +2 -0
- package/src/backend/cache/index.d.ts +2 -0
- package/src/backend/cache/index.js +2 -0
- package/src/backend/database/connect-database/index.d.ts +1 -0
- package/src/backend/database/connect-database/index.js +1 -0
- package/src/backend/database/connect-database/type.d.ts +1 -0
- package/src/backend/database/connect-database/util.d.ts +2 -0
- package/src/backend/database/connect-database/util.js +12 -0
- package/src/{candle/candles-count → backend/database/model/translation}/index.d.ts +1 -0
- package/src/{candle/candles-count → backend/database/model/translation}/index.js +1 -0
- package/src/{database → backend/database}/model/translation/type.d.ts +1 -1
- package/src/backend/database/model/translation/util.d.ts +7 -0
- package/src/backend/database/model/translation/util.js +7 -0
- package/src/backend/database/mutation/translation/get-translations/index.d.ts +1 -0
- package/src/backend/database/mutation/translation/get-translations/index.js +1 -0
- package/src/backend/database/mutation/translation/get-translations/type.d.ts +8 -0
- package/src/backend/database/mutation/translation/get-translations/util.d.ts +2 -0
- package/src/backend/database/mutation/translation/get-translations/util.js +30 -0
- package/src/backend/database/mutation/translation/get-translations-as-dictionary/index.d.ts +1 -0
- package/src/backend/database/mutation/translation/get-translations-as-dictionary/index.js +1 -0
- package/src/backend/database/mutation/translation/get-translations-as-dictionary/util.d.ts +7 -0
- package/src/backend/database/mutation/translation/get-translations-as-dictionary/util.js +51 -0
- package/src/backend/database/mutation/translation/index.d.ts +2 -0
- package/src/backend/database/mutation/translation/index.js +2 -0
- package/src/backend/dictionary/compose-dictionary/index.d.ts +1 -0
- package/src/backend/dictionary/compose-dictionary/index.js +1 -0
- package/src/backend/dictionary/compose-dictionary/type.d.ts +10 -0
- package/src/backend/dictionary/compose-dictionary/util.d.ts +2 -0
- package/src/backend/dictionary/compose-dictionary/util.js +10 -0
- package/src/backend/dictionary/get-excluded-translation-ids/index.d.ts +1 -0
- package/src/backend/dictionary/get-excluded-translation-ids/index.js +1 -0
- package/src/backend/dictionary/get-excluded-translation-ids/type.d.ts +5 -0
- package/src/backend/dictionary/get-excluded-translation-ids/util.d.ts +2 -0
- package/src/backend/dictionary/get-excluded-translation-ids/util.js +10 -0
- package/src/backend/dictionary/index.d.ts +2 -0
- package/src/backend/dictionary/index.js +2 -0
- package/src/backend/express/index.d.ts +1 -0
- package/src/backend/express/index.js +1 -0
- package/src/backend/express/start-express-app/index.d.ts +1 -0
- package/src/backend/express/start-express-app/index.js +1 -0
- package/src/backend/express/start-express-app/type.d.ts +2 -0
- package/src/backend/express/start-express-app/util.d.ts +2 -0
- package/src/backend/express/start-express-app/util.js +8 -0
- package/src/backend/message-broker/index.d.ts +4 -0
- package/src/backend/message-broker/index.js +4 -0
- package/src/backend/message-broker/log-custom-error/index.d.ts +1 -0
- package/src/backend/message-broker/log-custom-error/index.js +1 -0
- package/src/backend/message-broker/log-custom-error/type.d.ts +2 -0
- package/src/backend/message-broker/log-custom-error/util.d.ts +2 -0
- package/src/backend/message-broker/log-custom-error/util.js +2 -0
- package/src/backend/message-broker/message-broker/config.d.ts +4 -0
- package/src/backend/message-broker/message-broker/config.js +4 -0
- package/src/backend/message-broker/message-broker/index.d.ts +3 -0
- package/src/backend/message-broker/message-broker/index.js +3 -0
- package/src/backend/message-broker/message-broker/singleton.d.ts +7 -0
- package/src/backend/message-broker/message-broker/singleton.js +70 -0
- package/src/backend/message-broker/message-broker/type.d.ts +12 -0
- package/src/backend/message-broker/message-broker-queue-name/type.d.ts +2 -0
- package/src/backend/message-broker/message-broker-refresh-cache/index.d.ts +2 -0
- package/src/backend/message-broker/message-broker-refresh-cache/index.js +2 -0
- package/src/backend/message-broker/message-broker-refresh-cache/refresh-cache/index.d.ts +1 -0
- package/src/backend/message-broker/message-broker-refresh-cache/refresh-cache/index.js +1 -0
- package/src/backend/message-broker/message-broker-refresh-cache/refresh-cache/type.d.ts +2 -0
- package/src/backend/message-broker/message-broker-refresh-cache/refresh-cache/util.d.ts +2 -0
- package/src/backend/message-broker/message-broker-refresh-cache/refresh-cache/util.js +6 -0
- package/src/backend/message-broker/message-broker-refresh-cache/type.d.ts +4 -0
- package/src/dictionary/dictionary/config.js +1 -1
- package/src/dictionary/translation-id/index.d.ts +5 -0
- package/src/dictionary/translation-id/index.js +5 -0
- package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/index.d.ts +0 -1
- package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/index.js +0 -1
- package/src/error/custom-error/console-custom-error/index.d.ts +2 -1
- package/src/error/custom-error/console-custom-error/index.js +10 -1
- package/src/helper/promise-all/index.d.ts +12 -1
- package/src/helper/promise-all/index.js +24 -1
- package/src/index.d.ts +1 -12
- package/src/index.js +1 -12
- package/src/page/index.d.ts +3 -2
- package/src/page/index.js +3 -2
- package/src/type/index.d.ts +1 -1
- package/src/type/index.js +1 -1
- package/src/type/null/index.d.ts +1 -0
- package/src/type/null/index.js +1 -0
- package/src/type/object/index.d.ts +3 -2
- package/src/type/object/index.js +3 -2
- package/src/type/object/properties-in-object/index.d.ts +1 -0
- package/src/type/object/properties-in-object/index.js +1 -0
- package/src/type/object/{is-object/properties-in-object/index.js → properties-in-object/type-guard.js} +2 -2
- package/src/type/object/property-in-object/index.d.ts +1 -0
- package/src/type/object/property-in-object/index.js +1 -0
- package/src/type/object/{is-object/property-in-object/index.js → property-in-object/type-guard.js} +1 -1
- package/src/type/object/{is-object/object/index.js → type-guard.js} +2 -2
- package/src/type/string/comma-separated/index.d.ts +1 -0
- package/src/type/string/comma-separated/index.js +1 -0
- package/src/type/string/index.d.ts +1 -1
- package/src/type/string/index.js +1 -1
- package/src/auth/type.d.ts +0 -8
- package/src/candle/burning-candle-state/config.d.ts +0 -1
- package/src/candle/burning-candle-state/config.js +0 -1
- package/src/candle/burning-candle-state/type-guard.d.ts +0 -2
- package/src/candle/burning-candle-state/type-guard.js +0 -4
- package/src/candle/burning-candle-state/type.d.ts +0 -2
- package/src/candle/candle-ext-person/index.d.ts +0 -1
- package/src/candle/candle-ext-person/index.js +0 -1
- package/src/candle/candle-ext-person/type.d.ts +0 -4
- package/src/candle/candles-count/type.d.ts +0 -6
- package/src/candle/has-candle-permission/type.d.ts +0 -4
- package/src/candle/has-candle-permission/util.d.ts +0 -2
- package/src/candle/has-candle-permission/util.js +0 -13
- package/src/candle/index.d.ts +0 -4
- package/src/candle/index.js +0 -4
- package/src/cookie/consent/cookie-consent/compose-cookie-consent/type.d.ts +0 -2
- package/src/cookie/consent/cookie-consent/compose-cookie-consent/util.d.ts +0 -2
- package/src/cookie/consent/cookie-consent/compose-cookie-consent/util.js +0 -5
- package/src/cookie/consent/cookie-consent/config.d.ts +0 -3
- package/src/cookie/consent/cookie-consent/config.js +0 -3
- package/src/cookie/consent/cookie-consent/default.d.ts +0 -2
- package/src/cookie/consent/cookie-consent/default.js +0 -3
- package/src/cookie/consent/cookie-consent/index.d.ts +0 -4
- package/src/cookie/consent/cookie-consent/index.js +0 -4
- package/src/cookie/consent/cookie-consent/type.d.ts +0 -9
- package/src/cookie/consent/cookie-consent-key/config.d.ts +0 -2
- package/src/cookie/consent/cookie-consent-key/config.js +0 -2
- package/src/cookie/consent/cookie-consent-key/type.d.ts +0 -2
- package/src/cookie/consent/index.d.ts +0 -2
- package/src/cookie/consent/index.js +0 -2
- package/src/cookie/index.d.ts +0 -1
- package/src/cookie/index.js +0 -1
- package/src/database/index.d.ts +0 -1
- package/src/database/index.js +0 -1
- package/src/database/model/candle/index.d.ts +0 -1
- package/src/database/model/candle/index.js +0 -1
- package/src/database/model/candle/type.d.ts +0 -11
- package/src/database/model/contact/index.d.ts +0 -1
- package/src/database/model/contact/index.js +0 -1
- package/src/database/model/contact/type.d.ts +0 -9
- package/src/database/model/country/index.d.ts +0 -1
- package/src/database/model/country/index.js +0 -1
- package/src/database/model/country/type.d.ts +0 -13
- package/src/database/model/error-log/index.d.ts +0 -1
- package/src/database/model/error-log/index.js +0 -1
- package/src/database/model/error-log/type.d.ts +0 -7
- package/src/database/model/index.d.ts +0 -6
- package/src/database/model/index.js +0 -6
- package/src/database/model/person/index.d.ts +0 -2
- package/src/database/model/person/index.js +0 -2
- package/src/database/model/person/person-image/index.d.ts +0 -1
- package/src/database/model/person/person-image/index.js +0 -1
- package/src/database/model/person/person-image/type.d.ts +0 -10
- package/src/database/model/person/type.d.ts +0 -21
- package/src/database/model/translation/index.d.ts +0 -1
- package/src/database/model/translation/index.js +0 -1
- package/src/date/index.d.ts +0 -1
- package/src/date/index.js +0 -1
- package/src/date/minutes/config.d.ts +0 -8
- package/src/date/minutes/config.js +0 -9
- package/src/dictionary/translation-ids/index.d.ts +0 -5
- package/src/dictionary/translation-ids/index.js +0 -5
- package/src/dictionary/translation-ids/page-translation-ids/candles-page-translation-ids/config.d.ts +0 -1
- package/src/dictionary/translation-ids/page-translation-ids/candles-page-translation-ids/config.js +0 -4
- package/src/dictionary/translation-ids/time/time-abbreviation/index.d.ts +0 -1
- package/src/dictionary/translation-ids/time/time-abbreviation/index.js +0 -1
- package/src/error/custom-error/console-custom-error/util.d.ts +0 -2
- package/src/error/custom-error/console-custom-error/util.js +0 -10
- package/src/filter-sort/filter-sort/candle-filter-sort/domains/index.d.ts +0 -12
- package/src/filter-sort/filter-sort/candle-filter-sort/index.d.ts +0 -1
- package/src/filter-sort/filter-sort/candle-filter-sort/index.js +0 -1
- package/src/filter-sort/filter-sort/index.d.ts +0 -2
- package/src/filter-sort/filter-sort/index.js +0 -2
- package/src/filter-sort/filter-sort/person-filter-sort/domains/index.d.ts +0 -14
- package/src/filter-sort/filter-sort/person-filter-sort/domains/index.js +0 -1
- package/src/filter-sort/filter-sort/person-filter-sort/index.d.ts +0 -1
- package/src/filter-sort/filter-sort/person-filter-sort/index.js +0 -1
- package/src/filter-sort/index.d.ts +0 -4
- package/src/filter-sort/index.js +0 -4
- package/src/filter-sort/sort/domains/index.d.ts +0 -5
- package/src/filter-sort/sort/domains/index.js +0 -1
- package/src/filter-sort/sort/index.d.ts +0 -1
- package/src/filter-sort/sort/index.js +0 -1
- package/src/filter-sort/sort-name/candle-sort-name/configs/index.d.ts +0 -1
- package/src/filter-sort/sort-name/candle-sort-name/configs/index.js +0 -1
- package/src/filter-sort/sort-name/candle-sort-name/domains/index.d.ts +0 -2
- package/src/filter-sort/sort-name/candle-sort-name/domains/index.js +0 -1
- package/src/filter-sort/sort-name/candle-sort-name/index.d.ts +0 -3
- package/src/filter-sort/sort-name/candle-sort-name/index.js +0 -3
- package/src/filter-sort/sort-name/candle-sort-name/type-guards/index.d.ts +0 -1
- package/src/filter-sort/sort-name/candle-sort-name/type-guards/index.js +0 -1
- package/src/filter-sort/sort-name/candle-sort-name/type-guards/is-candle-sort-name/index.d.ts +0 -2
- package/src/filter-sort/sort-name/candle-sort-name/type-guards/is-candle-sort-name/index.js +0 -4
- package/src/filter-sort/sort-name/index.d.ts +0 -2
- package/src/filter-sort/sort-name/index.js +0 -2
- package/src/filter-sort/sort-name/person-sort-name/configs/index.d.ts +0 -1
- package/src/filter-sort/sort-name/person-sort-name/configs/index.js +0 -1
- package/src/filter-sort/sort-name/person-sort-name/domains/index.d.ts +0 -2
- package/src/filter-sort/sort-name/person-sort-name/domains/index.js +0 -1
- package/src/filter-sort/sort-name/person-sort-name/index.d.ts +0 -3
- package/src/filter-sort/sort-name/person-sort-name/index.js +0 -3
- package/src/filter-sort/sort-name/person-sort-name/type-guards/index.d.ts +0 -1
- package/src/filter-sort/sort-name/person-sort-name/type-guards/index.js +0 -1
- package/src/filter-sort/sort-name/person-sort-name/type-guards/is-person-sort-name/index.d.ts +0 -2
- package/src/filter-sort/sort-name/person-sort-name/type-guards/is-person-sort-name/index.js +0 -4
- package/src/filter-sort/sort-order/configs/index.d.ts +0 -1
- package/src/filter-sort/sort-order/configs/index.js +0 -1
- package/src/filter-sort/sort-order/domains/index.d.ts +0 -2
- package/src/filter-sort/sort-order/domains/index.js +0 -1
- package/src/filter-sort/sort-order/index.d.ts +0 -3
- package/src/filter-sort/sort-order/index.js +0 -3
- package/src/filter-sort/sort-order/type-guards/index.d.ts +0 -1
- package/src/filter-sort/sort-order/type-guards/index.js +0 -1
- package/src/filter-sort/sort-order/type-guards/is-sort-order/index.d.ts +0 -2
- package/src/filter-sort/sort-order/type-guards/is-sort-order/index.js +0 -4
- package/src/geographical/county-code/config.d.ts +0 -1
- package/src/geographical/county-code/config.js +0 -248
- package/src/geographical/county-code/index.d.ts +0 -3
- package/src/geographical/county-code/index.js +0 -3
- package/src/geographical/county-code/type-guard.d.ts +0 -2
- package/src/geographical/county-code/type-guard.js +0 -4
- package/src/geographical/county-code/type.d.ts +0 -2
- package/src/geographical/index.d.ts +0 -1
- package/src/geographical/index.js +0 -1
- package/src/helper/promise-all/util.d.ts +0 -12
- package/src/helper/promise-all/util.js +0 -24
- package/src/image/convert-base-64-image/type.d.ts +0 -1
- package/src/image/convert-base-64-image/util.d.ts +0 -2
- package/src/image/convert-base-64-image/util.js +0 -1
- package/src/image/image/index.d.ts +0 -1
- package/src/image/image/index.js +0 -1
- package/src/image/image/type.d.ts +0 -5
- package/src/image/image-dimension/index.d.ts +0 -1
- package/src/image/image-dimension/index.js +0 -1
- package/src/image/image-dimension/type.d.ts +0 -5
- package/src/image/index.d.ts +0 -3
- package/src/image/index.js +0 -3
- package/src/page/page/index.d.ts +0 -3
- package/src/page/page/index.js +0 -3
- package/src/page/page-data/candle-details/index.d.ts +0 -1
- package/src/page/page-data/candle-details/index.js +0 -1
- package/src/page/page-data/candle-details/type.d.ts +0 -6
- package/src/page/page-data/candles-page-data.type.d.ts +0 -7
- package/src/page/page-data/candles-page-data.type.js +0 -1
- package/src/page/page-data/edit-candle/index.d.ts +0 -1
- package/src/page/page-data/edit-candle/index.js +0 -1
- package/src/page/page-data/edit-candle/type.d.ts +0 -8
- package/src/page/page-data/index.d.ts +0 -4
- package/src/page/page-data/index.js +0 -4
- package/src/page/page-data/light-candle/index.d.ts +0 -1
- package/src/page/page-data/light-candle/index.js +0 -1
- package/src/page/page-data/light-candle/type.d.ts +0 -6
- package/src/person/birth-place-country/index.d.ts +0 -1
- package/src/person/birth-place-country/index.js +0 -1
- package/src/person/birth-place-country/type.d.ts +0 -4
- package/src/person/birth-place-country/type.js +0 -1
- package/src/person/index.d.ts +0 -3
- package/src/person/index.js +0 -3
- package/src/person/person-image/index.d.ts +0 -2
- package/src/person/person-image/index.js +0 -2
- package/src/person/person-image/person-image-file-name/config.d.ts +0 -1
- package/src/person/person-image/person-image-file-name/config.js +0 -2
- package/src/person/person-image/person-image-file-name/type.d.ts +0 -2
- package/src/person/person-image/person-image-file-name/type.js +0 -1
- package/src/person/person-image/person-image-width/config.d.ts +0 -1
- package/src/person/person-image/person-image-width/config.js +0 -1
- package/src/person/person-image/person-image-width/type.d.ts +0 -2
- package/src/person/person-image/person-image-width/type.js +0 -1
- package/src/person/persons-count/index.d.ts +0 -1
- package/src/person/persons-count/index.js +0 -1
- package/src/person/persons-count/type.d.ts +0 -3
- package/src/person/persons-count/type.js +0 -1
- package/src/ssr/index.d.ts +0 -1
- package/src/ssr/index.js +0 -1
- package/src/ssr/server-side-props/candle-details-page/index.d.ts +0 -1
- package/src/ssr/server-side-props/candle-details-page/index.js +0 -1
- package/src/ssr/server-side-props/candle-details-page/type.d.ts +0 -11
- package/src/ssr/server-side-props/candle-details-page/type.js +0 -1
- package/src/ssr/server-side-props/candles-page-server-side-props.type.d.ts +0 -13
- package/src/ssr/server-side-props/candles-page-server-side-props.type.js +0 -1
- package/src/ssr/server-side-props/contact-page/index.d.ts +0 -1
- package/src/ssr/server-side-props/contact-page/index.js +0 -1
- package/src/ssr/server-side-props/contact-page/type.d.ts +0 -9
- package/src/ssr/server-side-props/contact-page/type.js +0 -1
- package/src/ssr/server-side-props/cookie-policy-page/index.d.ts +0 -1
- package/src/ssr/server-side-props/cookie-policy-page/index.js +0 -1
- package/src/ssr/server-side-props/cookie-policy-page/type.d.ts +0 -9
- package/src/ssr/server-side-props/cookie-policy-page/type.js +0 -1
- package/src/ssr/server-side-props/edit-candle-page/index.d.ts +0 -1
- package/src/ssr/server-side-props/edit-candle-page/index.js +0 -1
- package/src/ssr/server-side-props/edit-candle-page/type.d.ts +0 -11
- package/src/ssr/server-side-props/edit-candle-page/type.js +0 -1
- package/src/ssr/server-side-props/help-page/index.d.ts +0 -1
- package/src/ssr/server-side-props/help-page/index.js +0 -1
- package/src/ssr/server-side-props/help-page/type.d.ts +0 -9
- package/src/ssr/server-side-props/help-page/type.js +0 -1
- package/src/ssr/server-side-props/index.d.ts +0 -9
- package/src/ssr/server-side-props/index.js +0 -9
- package/src/ssr/server-side-props/light-candle-page/index.d.ts +0 -1
- package/src/ssr/server-side-props/light-candle-page/index.js +0 -1
- package/src/ssr/server-side-props/light-candle-page/type.d.ts +0 -11
- package/src/ssr/server-side-props/light-candle-page/type.js +0 -1
- package/src/ssr/server-side-props/terms-and-conditions-page/index.d.ts +0 -1
- package/src/ssr/server-side-props/terms-and-conditions-page/index.js +0 -1
- package/src/ssr/server-side-props/terms-and-conditions-page/type.d.ts +0 -9
- package/src/ssr/server-side-props/terms-and-conditions-page/type.js +0 -1
- package/src/ssr/server-side-props/type.d.ts +0 -9
- package/src/ssr/server-side-props/type.js +0 -1
- package/src/type/object/add-prefix-to-object-props/type.d.ts +0 -1
- package/src/type/object/add-prefix-to-object-props/type.js +0 -1
- package/src/type/object/add-prefix-to-object-props/util.d.ts +0 -2
- package/src/type/object/add-prefix-to-object-props/util.js +0 -1
- package/src/type/object/is-object/index.d.ts +0 -3
- package/src/type/object/is-object/index.js +0 -3
- /package/src/{filter-sort/filter-sort/candle-filter-sort/domains → _devops/get-project-config/domains/args}/index.js +0 -0
- /package/src/{date/minutes → aws/account-id}/index.d.ts +0 -0
- /package/src/{date/minutes → aws/account-id}/index.js +0 -0
- /package/src/{candle/has-candle-permission → aws/app-config/get-app-config}/index.d.ts +0 -0
- /package/src/{candle/has-candle-permission → aws/app-config/get-app-config}/index.js +0 -0
- /package/src/{cookie/consent/cookie-consent/compose-cookie-consent → aws/cdk/attach-policy}/index.d.ts +0 -0
- /package/src/{cookie/consent/cookie-consent/compose-cookie-consent → aws/cdk/attach-policy}/index.js +0 -0
- /package/src/{auth → aws/cdk/attach-policy}/type.js +0 -0
- /package/src/{image/convert-base-64-image → aws/cdk/compose-cdk-stack}/index.d.ts +0 -0
- /package/src/{image/convert-base-64-image → aws/cdk/compose-cdk-stack}/index.js +0 -0
- /package/src/aws/{aws-region → cdk/compose-cdk-stack}/type.js +0 -0
- /package/src/{type/object/add-prefix-to-object-props → aws/lambda/lambda-arn/compose-lambda-arn}/index.d.ts +0 -0
- /package/src/{type/object/add-prefix-to-object-props → aws/lambda/lambda-arn/compose-lambda-arn}/index.js +0 -0
- /package/src/{candle/burning-candle-state → aws/lambda/lambda-arn/compose-lambda-arn}/type.js +0 -0
- /package/src/{cookie/consent/cookie-consent-key → aws/lambda/lambda-name}/index.d.ts +0 -0
- /package/src/{cookie/consent/cookie-consent-key → aws/lambda/lambda-name}/index.js +0 -0
- /package/src/{candle/candle-ext-person → aws/lambda/lambda-name}/type.js +0 -0
- /package/src/aws/{aws-region → region}/config.d.ts +0 -0
- /package/src/aws/{aws-region → region}/config.js +0 -0
- /package/src/aws/{aws-region → region}/default.d.ts +0 -0
- /package/src/aws/{aws-region → region}/default.js +0 -0
- /package/src/aws/{aws-region → region}/index.d.ts +0 -0
- /package/src/aws/{aws-region → region}/index.js +0 -0
- /package/src/aws/{aws-region → region}/type.d.ts +0 -0
- /package/src/{candle/candles-count → aws/region}/type.js +0 -0
- /package/src/{candle/has-candle-permission → aws/s3/s3-arn/compose-s3-arn}/type.js +0 -0
- /package/src/{cookie/consent/cookie-consent-key → aws/sqs/queue-arn/compose-queue-arn}/type.js +0 -0
- /package/src/{person/person-image/person-image-file-name → aws/sqs/queue-name/cache}/index.d.ts +0 -0
- /package/src/{person/person-image/person-image-file-name → aws/sqs/queue-name/cache}/index.js +0 -0
- /package/src/{cookie/consent/cookie-consent/compose-cookie-consent → aws/sqs/queue-name/cache}/type.js +0 -0
- /package/src/{person/person-image/person-image-width → aws/sqs/queue-name/logger}/index.d.ts +0 -0
- /package/src/{person/person-image/person-image-width → aws/sqs/queue-name/logger}/index.js +0 -0
- /package/src/{cookie/consent/cookie-consent → aws/sqs/queue-name/logger}/type.js +0 -0
- /package/src/{database/model/candle → aws/sqs/queue-name/queue-name}/type.js +0 -0
- /package/src/{database/model/country → backend/cache/cache}/type.js +0 -0
- /package/src/{candle/burning-candle-state → backend/cache/cache-key}/index.d.ts +0 -0
- /package/src/{candle/burning-candle-state → backend/cache/cache-key}/index.js +0 -0
- /package/src/{database/model/contact → backend/cache/cache-key}/type.js +0 -0
- /package/src/{database/model/error-log → backend/database/connect-database}/type.js +0 -0
- /package/src/{database/model/person/person-image → backend/database/model/translation}/type.js +0 -0
- /package/src/{database/model/person → backend/database/mutation/translation/get-translations}/type.js +0 -0
- /package/src/{database/model/translation → backend/dictionary/compose-dictionary}/type.js +0 -0
- /package/src/{geographical/county-code → backend/dictionary/get-excluded-translation-ids}/type.js +0 -0
- /package/src/{image/convert-base-64-image → backend/express/start-express-app}/type.js +0 -0
- /package/src/{image/image-dimension → backend/message-broker/log-custom-error}/type.js +0 -0
- /package/src/{page/page-data/light-candle → backend/message-broker/message-broker}/type.js +0 -0
- /package/src/{auth → backend/message-broker/message-broker-queue-name}/index.d.ts +0 -0
- /package/src/{auth → backend/message-broker/message-broker-queue-name}/index.js +0 -0
- /package/src/{image/image → backend/message-broker/message-broker-queue-name}/type.js +0 -0
- /package/src/{page/page-data/candle-details → backend/message-broker/message-broker-refresh-cache/refresh-cache}/type.js +0 -0
- /package/src/{page/page-data/edit-candle → backend/message-broker/message-broker-refresh-cache}/type.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-card/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-card/config.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-card/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-card/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-cards/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-cards/config.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-cards/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-cards/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-image/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-image/config.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-image/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-image/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-maintenance/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-maintenance/config.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-maintenance/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candle-maintenance/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candles-list/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candles-list/config.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candles-list/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/candles-list/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/candle/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/common-page/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/common-page/config.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/common-page/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/common-page/index.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/add-person-page-translation-ids/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/add-person-page-translation-ids/config.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/add-person-page-translation-ids/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/add-person-page-translation-ids/index.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/edit-person-page-translation-ids/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/edit-person-page-translation-ids/config.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids/candles-page-translation-ids → translation-id/page/edit-person-page-translation-ids}/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids/candles-page-translation-ids → translation-id/page/edit-person-page-translation-ids}/index.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/person-candles-page-translation-ids/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/person-candles-page-translation-ids/config.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids/edit-person-page-translation-ids → translation-id/page/person-candles-page-translation-ids}/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids/edit-person-page-translation-ids → translation-id/page/person-candles-page-translation-ids}/index.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/person-details-page-translation-ids/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/person-details-page-translation-ids/config.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids/person-candles-page-translation-ids → translation-id/page/person-details-page-translation-ids}/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids/person-candles-page-translation-ids → translation-id/page/person-details-page-translation-ids}/index.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/persons-map-page-translation-ids/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/persons-map-page-translation-ids/config.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids/person-details-page-translation-ids → translation-id/page/persons-map-page-translation-ids}/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids/person-details-page-translation-ids → translation-id/page/persons-map-page-translation-ids}/index.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/persons-page-translation-ids/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/persons-page-translation-ids/config.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids/persons-map-page-translation-ids → translation-id/page/persons-page-translation-ids}/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids/persons-map-page-translation-ids → translation-id/page/persons-page-translation-ids}/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/person/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/person/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/person/person-card/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/person/person-card/config.js +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids/persons-page-translation-ids → translation-id/person/person-card}/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids/page-translation-ids/persons-page-translation-ids → translation-id/person/person-card}/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/person/person-cards/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/person/person-cards/config.js +0 -0
- /package/src/dictionary/{translation-ids/person/person-card → translation-id/person/person-cards}/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids/person/person-card → translation-id/person/person-cards}/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/person/person-image/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/person/person-image/config.js +0 -0
- /package/src/dictionary/{translation-ids/person/person-cards → translation-id/person/person-image}/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids/person/person-cards → translation-id/person/person-image}/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/person/person-maintenance/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/person/person-maintenance/config.js +0 -0
- /package/src/dictionary/{translation-ids/person/person-image → translation-id/person/person-maintenance}/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids/person/person-image → translation-id/person/person-maintenance}/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/person/persons-list/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/person/persons-list/config.js +0 -0
- /package/src/dictionary/{translation-ids/person/person-maintenance → translation-id/person/persons-list}/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids/person/person-maintenance → translation-id/person/persons-list}/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/time/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/time/index.js +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/time/time-abbreviation/config.d.ts +0 -0
- /package/src/dictionary/{translation-ids → translation-id}/time/time-abbreviation/config.js +0 -0
- /package/src/dictionary/{translation-ids/person/persons-list → translation-id/time/time-abbreviation}/index.d.ts +0 -0
- /package/src/dictionary/{translation-ids/person/persons-list → translation-id/time/time-abbreviation}/index.js +0 -0
- /package/src/page/{page/config.d.ts → config.d.ts} +0 -0
- /package/src/page/{page/config.js → config.js} +0 -0
- /package/src/page/{page/type-guard.d.ts → type-guard.d.ts} +0 -0
- /package/src/page/{page/type-guard.js → type-guard.js} +0 -0
- /package/src/page/{page/type.d.ts → type.d.ts} +0 -0
- /package/src/page/{page/type.js → type.js} +0 -0
- /package/src/type/{is-null/index.d.ts → null/type-guard.d.ts} +0 -0
- /package/src/type/{is-null/index.js → null/type-guard.js} +0 -0
- /package/src/type/object/{is-object/properties-in-object/index.d.ts → properties-in-object/type-guard.d.ts} +0 -0
- /package/src/type/object/{is-object/property-in-object/index.d.ts → property-in-object/type-guard.d.ts} +0 -0
- /package/src/type/object/{is-object/object/index.d.ts → type-guard.d.ts} +0 -0
- /package/src/type/string/{validate-comma-separated-string → comma-separated}/types.d.ts +0 -0
- /package/src/type/string/{validate-comma-separated-string → comma-separated}/types.js +0 -0
- /package/src/type/string/{validate-comma-separated-string/index.d.ts → comma-separated/validate.d.ts} +0 -0
- /package/src/type/string/{validate-comma-separated-string/index.js → comma-separated/validate.js} +0 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
export const CACHE_KEYS = [
|
2
|
+
'candle-details-page-dictionary-en',
|
3
|
+
'candle-details-page-dictionary-hu',
|
4
|
+
'candles-page-dictionary-en',
|
5
|
+
'candles-page-dictionary-hu',
|
6
|
+
'contact-page-dictionary-en',
|
7
|
+
'contact-page-dictionary-hu',
|
8
|
+
'cookie-policy-page-dictionary-en',
|
9
|
+
'cookie-policy-page-dictionary-hu',
|
10
|
+
'edit-candle-page-dictionary-en',
|
11
|
+
'edit-candle-page-dictionary-hu',
|
12
|
+
'light-candle-page-dictionary-en',
|
13
|
+
'light-candle-page-dictionary-hu',
|
14
|
+
'help-page-dictionary-en',
|
15
|
+
'help-page-dictionary-hu',
|
16
|
+
'terms-and-conditions-page-dictionary-en',
|
17
|
+
'terms-and-conditions-page-dictionary-hu',
|
18
|
+
];
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export type ConnectDatabase = (url: string) => Promise<void>;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import * as mongoose from 'mongoose';
|
2
|
+
export const connectDatabase = async (url) => {
|
3
|
+
try {
|
4
|
+
await mongoose.connect(url);
|
5
|
+
mongoose.connection.on('error', () => {
|
6
|
+
setTimeout(connectDatabase, 5000);
|
7
|
+
});
|
8
|
+
}
|
9
|
+
catch {
|
10
|
+
setTimeout(connectDatabase, 5000);
|
11
|
+
}
|
12
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as mongoose from 'mongoose';
|
2
|
+
import { Translation } from './type.js';
|
3
|
+
export declare const TranslationDbModel: mongoose.Model<Translation & mongoose.Document<unknown, any, any>, {}, {}, {}, mongoose.Document<unknown, {}, Translation & mongoose.Document<unknown, any, any>> & Translation & mongoose.Document<unknown, any, any> & Required<{
|
4
|
+
_id: string;
|
5
|
+
}> & {
|
6
|
+
__v: number;
|
7
|
+
}, any>;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as mongoose from 'mongoose';
|
2
|
+
const TranslationSchema = new mongoose.Schema({
|
3
|
+
id: { type: String },
|
4
|
+
en: { type: String },
|
5
|
+
hu: { type: String },
|
6
|
+
}, { timestamps: true, versionKey: false });
|
7
|
+
export const TranslationDbModel = mongoose.model('translations', TranslationSchema);
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { TranslationId } from '../../../../../dictionary/index.js';
|
2
|
+
import { CustomError } from '../../../../../error/index.js';
|
3
|
+
import { Translation } from '../../../model/translation/index.js';
|
4
|
+
export type GetTranslations = (ids?: TranslationId[]) => Promise<{
|
5
|
+
data: Translation[];
|
6
|
+
} | {
|
7
|
+
customError: CustomError;
|
8
|
+
}>;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { customErrorWorker } from '../../../../../error/index.js';
|
2
|
+
import { TranslationDbModel } from '../../../model/translation/index.js';
|
3
|
+
export const getTranslations = async (ids) => {
|
4
|
+
let query = {};
|
5
|
+
const _customErrorWorker = customErrorWorker({ ids });
|
6
|
+
if (ids) {
|
7
|
+
query = {
|
8
|
+
id: { $in: ids },
|
9
|
+
};
|
10
|
+
}
|
11
|
+
let resp;
|
12
|
+
try {
|
13
|
+
resp = await TranslationDbModel.find(query);
|
14
|
+
}
|
15
|
+
catch (err) {
|
16
|
+
return _customErrorWorker.composeCustomError('Get translations failed', { err, query });
|
17
|
+
}
|
18
|
+
if (ids && resp.length !== ids.length) {
|
19
|
+
return _customErrorWorker.composeCustomError('Missing ids from translations', {
|
20
|
+
info: {
|
21
|
+
missing: ids.filter((it) => !resp.find((it2) => it2.id === it)).join(', '),
|
22
|
+
value: ids,
|
23
|
+
},
|
24
|
+
});
|
25
|
+
}
|
26
|
+
const data = resp.map((it) => ({ ...it, _id: it._id.toString() }));
|
27
|
+
return {
|
28
|
+
data,
|
29
|
+
};
|
30
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Dictionary, Language, TranslationId } from '../../../../../dictionary/index.js';
|
2
|
+
import { CustomError } from '../../../../../error/index.js';
|
3
|
+
export declare const getTranslationsAsDictionary: <T extends TranslationId>(language: Language, ids?: readonly T[]) => Promise<{
|
4
|
+
data: Dictionary;
|
5
|
+
} | {
|
6
|
+
customError: CustomError;
|
7
|
+
}>;
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import { customErrorWorker } from '../../../../../error/index.js';
|
2
|
+
import { TranslationDbModel } from '../../../model/translation/index.js';
|
3
|
+
export const getTranslationsAsDictionary = async (language, ids) => {
|
4
|
+
const aggregates = [];
|
5
|
+
const _customErrorWorker = customErrorWorker({ ids, language });
|
6
|
+
if (ids) {
|
7
|
+
aggregates.push({
|
8
|
+
$match: {
|
9
|
+
id: {
|
10
|
+
$in: ids,
|
11
|
+
},
|
12
|
+
},
|
13
|
+
});
|
14
|
+
}
|
15
|
+
aggregates.push(...[
|
16
|
+
{
|
17
|
+
$project: {
|
18
|
+
id: 1,
|
19
|
+
[language]: 1,
|
20
|
+
},
|
21
|
+
},
|
22
|
+
{
|
23
|
+
$group: {
|
24
|
+
_id: null,
|
25
|
+
root: {
|
26
|
+
$push: {
|
27
|
+
k: '$id',
|
28
|
+
v: `$${language}`,
|
29
|
+
},
|
30
|
+
},
|
31
|
+
},
|
32
|
+
},
|
33
|
+
{
|
34
|
+
$replaceRoot: {
|
35
|
+
newRoot: {
|
36
|
+
$arrayToObject: '$root',
|
37
|
+
},
|
38
|
+
},
|
39
|
+
},
|
40
|
+
]);
|
41
|
+
let data;
|
42
|
+
try {
|
43
|
+
data = await TranslationDbModel.aggregate(aggregates);
|
44
|
+
}
|
45
|
+
catch (err) {
|
46
|
+
return _customErrorWorker.composeCustomError('Get translations failed', { err });
|
47
|
+
}
|
48
|
+
return {
|
49
|
+
data: data[0],
|
50
|
+
};
|
51
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Dictionary, Language } from '../../../dictionary/index.js';
|
2
|
+
import { CustomError } from '../../../error/index.js';
|
3
|
+
import { Page } from '../../../page/index.js';
|
4
|
+
export type ComposeDictionary = (page: Page, language: Language, options?: {
|
5
|
+
isAuthenticated: boolean;
|
6
|
+
}) => Promise<{
|
7
|
+
data: Dictionary;
|
8
|
+
} | {
|
9
|
+
customError: CustomError;
|
10
|
+
}>;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { DICTIONARY_CONFIG } from '../../../dictionary/index.js';
|
2
|
+
import { getTranslationsAsDictionary } from '../../database/mutation/translation/index.js';
|
3
|
+
import { getExcludedTranslationIds } from '../get-excluded-translation-ids/index.js';
|
4
|
+
export const composeDictionary = async (page, language, options) => {
|
5
|
+
let translationIds = [...DICTIONARY_CONFIG[page].translationIds];
|
6
|
+
const excludedIds = getExcludedTranslationIds(page, options);
|
7
|
+
translationIds = translationIds.filter((it) => !excludedIds.includes(it));
|
8
|
+
const resp = await getTranslationsAsDictionary(language, translationIds);
|
9
|
+
return resp;
|
10
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { isUndefined } from '../../../type/index.js';
|
2
|
+
export const getExcludedTranslationIds = (page, options) => {
|
3
|
+
const excludedIds = [`pageMenu.${page}`];
|
4
|
+
if (options) {
|
5
|
+
const { isAuthenticated } = options;
|
6
|
+
if (isUndefined(isAuthenticated))
|
7
|
+
excludedIds.push(isAuthenticated ? 'login' : 'logout');
|
8
|
+
}
|
9
|
+
return excludedIds;
|
10
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './start-express-app/util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './start-express-app/util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { MessageBrokerQueueName } from '../message-broker-queue-name/index.js';
|
2
|
+
import { MessageBroker } from './index.js';
|
3
|
+
export declare const MessageBrokerSingleton: {
|
4
|
+
init: (url: string) => void;
|
5
|
+
listenQueue: <T extends MessageBrokerQueueName>(queue: T, onMessage: (message: MessageBroker[T]) => void) => Promise<void>;
|
6
|
+
sendMessage: <T extends MessageBrokerQueueName>(queueName: T, message: MessageBroker[T]) => Promise<void>;
|
7
|
+
};
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import amqp from 'amqplib';
|
2
|
+
import { consoleCustomError, customErrorWorker } from '../../../error/index.js';
|
3
|
+
export const MessageBrokerSingleton = (() => {
|
4
|
+
let _channel;
|
5
|
+
let _connection;
|
6
|
+
let _errorMessage = 'Initializing MessageBroker';
|
7
|
+
let _url;
|
8
|
+
let _customErrorWorker;
|
9
|
+
const checkErrorStatus = () => {
|
10
|
+
if (_errorMessage) {
|
11
|
+
return _customErrorWorker.composeCustomError(_errorMessage);
|
12
|
+
}
|
13
|
+
return;
|
14
|
+
};
|
15
|
+
const connect = async () => {
|
16
|
+
try {
|
17
|
+
_connection = await amqp.connect(_url);
|
18
|
+
_connection.on('error', (_err) => {
|
19
|
+
handleError(_err);
|
20
|
+
});
|
21
|
+
_channel = await _connection.createChannel();
|
22
|
+
_errorMessage = null;
|
23
|
+
}
|
24
|
+
catch (err) {
|
25
|
+
handleError(err);
|
26
|
+
}
|
27
|
+
};
|
28
|
+
const handleError = (err) => {
|
29
|
+
_customErrorWorker.addInfo({ err });
|
30
|
+
_errorMessage = 'Error connect Rabbitmq';
|
31
|
+
setTimeout(connect, 10000);
|
32
|
+
};
|
33
|
+
const init = (url) => {
|
34
|
+
_url = url;
|
35
|
+
_customErrorWorker = customErrorWorker({ url });
|
36
|
+
connect();
|
37
|
+
};
|
38
|
+
const listenQueue = async (queue, onMessage) => {
|
39
|
+
const resp = checkErrorStatus();
|
40
|
+
if (resp) {
|
41
|
+
consoleCustomError(resp.customError);
|
42
|
+
console.error('QUEUE:', queue);
|
43
|
+
setTimeout(() => listenQueue(queue, onMessage), 10000);
|
44
|
+
return;
|
45
|
+
}
|
46
|
+
await _channel.assertQueue(queue, { durable: true });
|
47
|
+
_channel.consume(queue, (msg) => {
|
48
|
+
if (msg) {
|
49
|
+
onMessage(JSON.parse(msg.content.toString()));
|
50
|
+
_channel.ack(msg);
|
51
|
+
}
|
52
|
+
});
|
53
|
+
};
|
54
|
+
const sendMessage = async (queueName, message) => {
|
55
|
+
const resp = checkErrorStatus();
|
56
|
+
if (resp) {
|
57
|
+
consoleCustomError(resp.customError);
|
58
|
+
console.error('QUEUE:', queueName);
|
59
|
+
console.error('MESSAGE:', message);
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
await _channel.assertQueue(queueName, { durable: true });
|
63
|
+
_channel.sendToQueue(queueName, Buffer.from(JSON.stringify(message)));
|
64
|
+
};
|
65
|
+
return {
|
66
|
+
init,
|
67
|
+
listenQueue,
|
68
|
+
sendMessage,
|
69
|
+
};
|
70
|
+
})();
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { MessageBrokerRefreshCache } from '../message-broker-refresh-cache/index.js';
|
2
|
+
import { MessageBrokerQueueName } from '../message-broker-queue-name/index.js';
|
3
|
+
import { MESSAGE_BROKER_CONFIG } from './config.js';
|
4
|
+
import { CustomError } from '../../../error/index.js';
|
5
|
+
export type MessageBroker = {
|
6
|
+
[key in MessageBrokerQueueName]: TypeMap[(typeof MESSAGE_BROKER_CONFIG)[key]];
|
7
|
+
};
|
8
|
+
interface TypeMap {
|
9
|
+
'MessageBrokerRefreshCache | null': MessageBrokerRefreshCache | null;
|
10
|
+
CustomError: CustomError;
|
11
|
+
}
|
12
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { CANDLE_CARDS_TRANSLATION_IDS, CANDLE_IMAGE_TRANSLATION_IDS, CANDLE_MAINTENANCE_TRANSLATION_IDS, CANDLES_LIST_TRANSLATION_IDS, COMMON_PAGE_TRANSLATION_IDS, PERSON_CARDS_TRANSLATION_IDS, PERSON_IMAGE_TRANSLATION_IDS, } from '../translation-
|
1
|
+
import { CANDLE_CARDS_TRANSLATION_IDS, CANDLE_IMAGE_TRANSLATION_IDS, CANDLE_MAINTENANCE_TRANSLATION_IDS, CANDLES_LIST_TRANSLATION_IDS, COMMON_PAGE_TRANSLATION_IDS, PERSON_CARDS_TRANSLATION_IDS, PERSON_IMAGE_TRANSLATION_IDS, } from '../translation-id/index.js';
|
2
2
|
export const DICTIONARY_CONFIG = {
|
3
3
|
'candle-details-page': {
|
4
4
|
translationIds: [
|
package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/index.d.ts
RENAMED
@@ -1,5 +1,4 @@
|
|
1
1
|
export * from './add-person-page-translation-ids/index.js';
|
2
|
-
export * from './candles-page-translation-ids/index.js';
|
3
2
|
export * from './edit-person-page-translation-ids/index.js';
|
4
3
|
export * from './person-candles-page-translation-ids/index.js';
|
5
4
|
export * from './person-details-page-translation-ids/index.js';
|
package/src/dictionary/{translation-ids/page-translation-ids → translation-id/page}/index.js
RENAMED
@@ -1,5 +1,4 @@
|
|
1
1
|
export * from './add-person-page-translation-ids/index.js';
|
2
|
-
export * from './candles-page-translation-ids/index.js';
|
3
2
|
export * from './edit-person-page-translation-ids/index.js';
|
4
3
|
export * from './person-candles-page-translation-ids/index.js';
|
5
4
|
export * from './person-details-page-translation-ids/index.js';
|
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
import { CustomError } from '../type.js';
|
2
|
+
export declare const consoleCustomError: (customError: CustomError) => void;
|
@@ -1 +1,10 @@
|
|
1
|
-
export
|
1
|
+
export const consoleCustomError = (customError) => {
|
2
|
+
console.error('***ERROR***:', customError.message);
|
3
|
+
console.error('ID:', customError.id);
|
4
|
+
if (customError.projectName) {
|
5
|
+
console.error('PROJECT_NAME:', customError.projectName);
|
6
|
+
}
|
7
|
+
if (customError.info) {
|
8
|
+
console.error('INFO:', customError.info);
|
9
|
+
}
|
10
|
+
};
|
@@ -1 +1,12 @@
|
|
1
|
-
|
1
|
+
import { CustomError } from '../../error/index.js';
|
2
|
+
export declare const promiseAll: <T>(promises: Promise<{
|
3
|
+
customError: CustomError;
|
4
|
+
} | {
|
5
|
+
data: unknown;
|
6
|
+
}>[], keys?: string[]) => Promise<{
|
7
|
+
customErrors: {
|
8
|
+
customError: CustomError;
|
9
|
+
}[];
|
10
|
+
} | {
|
11
|
+
data: T;
|
12
|
+
}>;
|