@candlerip/shared 0.0.143 → 0.0.145
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/aws/s3/s3-url/constants.d.ts +1 -1
- package/aws/s3/s3-url/constants.js +1 -1
- package/aws/s3/s3-url/utils/compose-s3-url/index.js +1 -1
- package/aws/s3/s3-url/utils/compose-s3-url/types.d.ts +1 -1
- package/common/translation/translation-code/page/configs.d.ts +1 -1
- package/common/translation/translation-code/page/configs.js +1 -1
- package/database/mutation/country-translation/utils/get-country-translations-as-dictionary-db/index.js +3 -0
- package/database/mutation/language-translation/utils/get-language-translations-as-dictionary-db/index.js +3 -0
- package/database/mutation/page-translation/utils/get-page-translations-as-dictionary-db/index.js +3 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const S3_URL_TEMPLATE = "https://s3.<AWS_REGION>.amazonaws.com";
|
|
1
|
+
export declare const S3_URL_TEMPLATE = "https://s3.<AWS_REGION>.amazonaws.com/<BUCKET_NAME>";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const S3_URL_TEMPLATE = `https://s3.<AWS_REGION>.amazonaws.com
|
|
1
|
+
export const S3_URL_TEMPLATE = `https://s3.<AWS_REGION>.amazonaws.com/<BUCKET_NAME>`;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { S3_URL_TEMPLATE } from '../../constants.js';
|
|
2
|
-
export const composeS3Url = (awsRegion) => S3_URL_TEMPLATE.replace('<AWS_REGION>', awsRegion);
|
|
2
|
+
export const composeS3Url = (awsRegion, bucketName) => S3_URL_TEMPLATE.replace('<AWS_REGION>', awsRegion).replace('<BUCKET_NAME>', bucketName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type ComposeS3Url = (
|
|
1
|
+
export type ComposeS3Url = (region: string, bucketName: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PAGE_TRANSLATION_CODES: readonly ["acceptAll", "add-person-page", "add-person-page_maintenance_submitError", "add-person-page_maintenance_submitSuccess", "auth_cannotBeChangedLaterWarning", "auth_candleLitWarning", "auth_loginRequired", "author", "burnedCandles", "burnedOutCandle", "burningCandles", "burningEndsAt", "burningStartsAt", "burnsSoFar", "cancel", "candle-details-page", "candle-details-page_deleteCandle_submitError", "candle-details-page_deleteCandle_submitSuccess", "candle-details-page_deleteCandle_question", "candle-details-page_deleteCandle", "candle-details-page_myCandle_submitError", "candle-details-page_myCandle_submitSuccess", "candle-details-page_myCandle_loginRequired", "candle-details-page_myCandle_question", "candle-details-page_myCandle", "candle-details-page_relightCandle_submitError", "candle-details-page_relightCandle_submitSuccess", "candle-details-page_relightCandle_question", "candle-details-page_relightCandle", "candle", "candlesInCount", "candles", "candles-page", "candle_description", "caseSensitive", "contact-page", "contact-page_infoTitle", "contact-page_sendMessage_submitError", "contact-page_sendMessage_submitSuccess", "contact-page_sendMessageTitle", "cookieConsentForm_title", "cookieConsentForm_description", "cookieConsentForm_languageFormDescription", "cookie-policy-page", "count", "createdAt", "customize", "dropZone_acceptedFormats", "dropZone_drapActive", "dropZone_dropZone", "dropZone_sizeLimit", "edit-candle-page", "edit-candle-page_maintenance_submitError", "edit-candle-page_maintenance_submitSuccess", "edit-person-page", "edit-person-page_maintenance_submitError", "edit-person-page_maintenance_submitSuccess", "email", "errorLoadingData", "facebook", "help-page_addPersonRule1", "help-page_addPersonRule2", "help-page_addPersonRule3", "help-page_addPersonRule4", "help-page_addPersonTitle", "help-page_candlesParagraph1", "help-page_candlesParagraph2", "help-page_candlesParagraph3", "help-page_intro", "help-page_lightACandleRule1", "help-page_lightACandleRule2", "help-page_lightACandleTitle", "help-page_personsParagraph", "help-page", "home-page", "home-page_proposal", "home-page_lastLitCandles", "home-page_lastUploadedPersons", "home-page_quickCandleLighting_placeOfTheCandle_placehodler", "home-page_quickCandleLighting", "home-page_statistics", "home-page_welcome_description1", "home-page_welcome_description2", "home-page_welcome", "form_error_date", "form_error_email", "form_error_invalid", "form_error_maxLength", "form_error_message", "form_error_required", "image", "invalidImage", "noMoreImages", "tooBigImage", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "lightACandle", "light-candle-page", "light-candle-page_maintenance_submitError", "light-candle-page_maintenance_submitSuccess", "lightTheCandle", "litName", "loading", "login", "loginPage_login_submitError", "loginPage_login_showPassword", "logout", "map", "message", "modify", "more", "motto1", "motto2", "motto3", "myCandles", "myPersons", "name", "ok", "pageMenu_add-person-page", "pageMenu_candles-page", "pageMenu_contact-page", "pageMenu_cookie-policy-page", "pageMenu_help-page", "pageMenu_persons-page", "pageMenu_persons-map-page", "pageMenu_terms-and-conditions-page", "password", "person", "person_birthDate", "person_birthPlaceCountry", "person_deathDate", "person_description", "person_name", "person-candles-page", "person-candles-page_addCandle_description", "person-details-page", "person-details-page_deletePerson_submitError", "person-details-page_deletePerson_submitSuccess", "person-details-page_deletePerson_question", "person-details-page_deletePerson", "person-details-page_myPerson_submitError", "person-details-page_myPerson_submitSuccess", "person-details-page_myPerson_loginRequired", "person-details-page_myPerson_question", "person-details-page_myPerson", "persons-page", "persons", "personsInCount", "persons-page_addPerson_description", "persons-page_personsList_hasImage", "persons-page_personsList", "persons-map-page_map_description", "persons-map-page", "proposable", "redirecting", "rejectAll", "reset", "save", "savedSuccessfully", "select", "send", "shareOnFacebook", "sort", "subject", "terms-and-conditions-page_applicableLawParagraph", "terms-and-conditions-page_applicableLawTitle", "terms-and-conditions-page_conditionsOfUseParagraph", "terms-and-conditions-page_conditionsOfUseTitle", "terms-and-conditions-page_disputesParagraph", "terms-and-conditions-page_disputesTitle", "terms-and-conditions-page_intellectualPropertyParagraph", "terms-and-conditions-page_intellectualPropertyTitle", "terms-and-conditions-page_intro", "terms-and-conditions-page_limitationAndLiabilityParagraph", "terms-and-conditions-page_limitationAndLiabilityTitle", "terms-and-conditions-page", "terms-and-conditions-page_userAccountsParagraph", "terms-and-conditions-page_userAccountsTitle", "username", "candleNotFound", "personNotFound", "unauthorized", "forbidden", "days", "day", "hours", "hour", "minutes", "minute", "seconds", "second", "no-options", "
|
|
1
|
+
export declare const PAGE_TRANSLATION_CODES: readonly ["acceptAll", "add-person-page", "add-person-page_maintenance_submitError", "add-person-page_maintenance_submitSuccess", "auth_cannotBeChangedLaterWarning", "auth_candleLitWarning", "auth_loginRequired", "author", "burnedCandles", "burnedOutCandle", "burningCandles", "burningEndsAt", "burningStartsAt", "burnsSoFar", "cancel", "candle-details-page", "candle-details-page_deleteCandle_submitError", "candle-details-page_deleteCandle_submitSuccess", "candle-details-page_deleteCandle_question", "candle-details-page_deleteCandle", "candle-details-page_myCandle_submitError", "candle-details-page_myCandle_submitSuccess", "candle-details-page_myCandle_loginRequired", "candle-details-page_myCandle_question", "candle-details-page_myCandle", "candle-details-page_relightCandle_submitError", "candle-details-page_relightCandle_submitSuccess", "candle-details-page_relightCandle_question", "candle-details-page_relightCandle", "candle", "candlesInCount", "candles", "candles-page", "candle_description", "caseSensitive", "contact-page", "contact-page_infoTitle", "contact-page_sendMessage_submitError", "contact-page_sendMessage_submitSuccess", "contact-page_sendMessageTitle", "cookieConsentForm_title", "cookieConsentForm_description", "cookieConsentForm_languageFormDescription", "cookie-policy-page", "count", "createdAt", "customize", "dropZone_acceptedFormats", "dropZone_drapActive", "dropZone_dropZone", "dropZone_sizeLimit", "edit-candle-page", "edit-candle-page_maintenance_submitError", "edit-candle-page_maintenance_submitSuccess", "edit-person-page", "edit-person-page_maintenance_submitError", "edit-person-page_maintenance_submitSuccess", "email", "errorLoadingData", "facebook", "help-page_addPersonRule1", "help-page_addPersonRule2", "help-page_addPersonRule3", "help-page_addPersonRule4", "help-page_addPersonTitle", "help-page_candlesParagraph1", "help-page_candlesParagraph2", "help-page_candlesParagraph3", "help-page_intro", "help-page_lightACandleRule1", "help-page_lightACandleRule2", "help-page_lightACandleTitle", "help-page_personsParagraph", "help-page", "home-page", "home-page_proposal", "home-page_lastLitCandles", "home-page_lastUploadedPersons", "home-page_quickCandleLighting_placeOfTheCandle_placehodler", "home-page_quickCandleLighting", "home-page_statistics", "home-page_welcome_description1", "home-page_welcome_description2", "home-page_welcome", "form_error_date", "form_error_email", "form_error_invalid", "form_error_maxLength", "form_error_message", "form_error_required", "image", "invalidImage", "noMoreImages", "tooBigImage", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "lightACandle", "light-candle-page", "light-candle-page_maintenance_submitError", "light-candle-page_maintenance_submitSuccess", "lightTheCandle", "litName", "loading", "login", "loginPage_login_submitError", "loginPage_login_showPassword", "logout", "map", "message", "modify", "more", "motto1", "motto2", "motto3", "myCandles", "myPersons", "name", "ok", "pageMenu_add-person-page", "pageMenu_candles-page", "pageMenu_contact-page", "pageMenu_cookie-policy-page", "pageMenu_help-page", "pageMenu_persons-page", "pageMenu_persons-map-page", "pageMenu_terms-and-conditions-page", "password", "person", "person_birthDate", "person_birthPlaceCountry", "person_deathDate", "person_description", "person_name", "person-candles-page", "person-candles-page_addCandle_description", "person-details-page", "person-details-page_deletePerson_submitError", "person-details-page_deletePerson_submitSuccess", "person-details-page_deletePerson_question", "person-details-page_deletePerson", "person-details-page_myPerson_submitError", "person-details-page_myPerson_submitSuccess", "person-details-page_myPerson_loginRequired", "person-details-page_myPerson_question", "person-details-page_myPerson", "persons-page", "persons", "personsInCount", "persons-page_addPerson_description", "persons-page_personsList_hasImage", "persons-page_personsList", "persons-map-page_map_description", "persons-map-page", "proposable", "redirecting", "rejectAll", "reset", "save", "savedSuccessfully", "select", "send", "shareOnFacebook", "sort", "subject", "terms-and-conditions-page_applicableLawParagraph", "terms-and-conditions-page_applicableLawTitle", "terms-and-conditions-page_conditionsOfUseParagraph", "terms-and-conditions-page_conditionsOfUseTitle", "terms-and-conditions-page_disputesParagraph", "terms-and-conditions-page_disputesTitle", "terms-and-conditions-page_intellectualPropertyParagraph", "terms-and-conditions-page_intellectualPropertyTitle", "terms-and-conditions-page_intro", "terms-and-conditions-page_limitationAndLiabilityParagraph", "terms-and-conditions-page_limitationAndLiabilityTitle", "terms-and-conditions-page", "terms-and-conditions-page_userAccountsParagraph", "terms-and-conditions-page_userAccountsTitle", "username", "candleNotFound", "personNotFound", "unauthorized", "forbidden", "days", "day", "hours", "hour", "minutes", "minute", "seconds", "second", "no-options", "pageNotFound"];
|
|
@@ -11,6 +11,9 @@ export const getCountryTranslationsAsDictionaryDb = async (language, codes) => {
|
|
|
11
11
|
catch (err) {
|
|
12
12
|
return { customError: composeCustomError('Get country translations failed', { err }) };
|
|
13
13
|
}
|
|
14
|
+
if (data.length === 0) {
|
|
15
|
+
return { customError: composeCustomError('No country translation found') };
|
|
16
|
+
}
|
|
14
17
|
return {
|
|
15
18
|
data: data[0],
|
|
16
19
|
};
|
|
@@ -11,6 +11,9 @@ export const getLanguageTranslationsAsDictionaryDb = async (language, codes) =>
|
|
|
11
11
|
catch (err) {
|
|
12
12
|
return { customError: composeCustomError('Get language translations failed', { err }) };
|
|
13
13
|
}
|
|
14
|
+
if (data.length === 0) {
|
|
15
|
+
return { customError: composeCustomError('No language translation found') };
|
|
16
|
+
}
|
|
14
17
|
return {
|
|
15
18
|
data: data[0],
|
|
16
19
|
};
|
package/database/mutation/page-translation/utils/get-page-translations-as-dictionary-db/index.js
CHANGED
|
@@ -11,6 +11,9 @@ export const getPageTranslationsAsDictionaryDb = async (language, codes) => {
|
|
|
11
11
|
catch (err) {
|
|
12
12
|
return { customError: composeCustomError('Get page translations failed', { err }) };
|
|
13
13
|
}
|
|
14
|
+
if (data.length === 0) {
|
|
15
|
+
return { customError: composeCustomError('No page translation found') };
|
|
16
|
+
}
|
|
14
17
|
return {
|
|
15
18
|
data: data[0],
|
|
16
19
|
};
|