diff --git a/.travis.yml b/.travis.yml index f2486aa99c..2d1afd5454 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ install: - npm run setup --debug script: + - npm run lint - npm run doc cache: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e271fe6335..d29e21e6e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,7 @@ If you send a pull request, please do it against the `master` branch. We are dev *** ## Setup Development Environment -To facilitate the contribution, we drastically reduce the amount of commands necessary to install the entire development environment. First of all, you need to check if you're using the recommended versions of Node.js (v8) and npm (v5). +To facilitate the contribution, we drastically reduce the amount of commands necessary to install the entire development environment. First of all, you need to check if you're using the [required versions of Node.js and npm](https://strapi.io/documentation/3.x.x/getting-started/installation.html#requirements) Then, please follow the instructions below: diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 22c6590950..8547f73d70 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -86,6 +86,7 @@ module.exports = { '/3.x.x/guides/responses', '/3.x.x/guides/routing', '/3.x.x/guides/services', + '/3.x.x/guides/webhooks', ], }, { diff --git a/docs/3.x.x/guides/models.md b/docs/3.x.x/guides/models.md index a4cd2841fa..52e04cde51 100644 --- a/docs/3.x.x/guides/models.md +++ b/docs/3.x.x/guides/models.md @@ -25,8 +25,8 @@ The info key on the model-json states information about the model. This informat ## Model options The options key on the model-json states. - - `idAttribute`: This tells the model which attribute to expect as the unique identifier for each database row (typically an auto-incrementing primary key named 'id'). - - `idAttributeType`: Data type of `idAttribute`, accepted list of value bellow: + - `idAttribute`: This tells the model which attribute to expect as the unique identifier for each database row (typically an auto-incrementing primary key named 'id'). _Only valid for strapi-hook-bookshelf_ + - `idAttributeType`: Data type of `idAttribute`, accepted list of value bellow. _Only valid for strapi-hook-bookshelf_ ## Define the attributes diff --git a/docs/3.x.x/guides/webhooks.md b/docs/3.x.x/guides/webhooks.md new file mode 100644 index 0000000000..2c7a47f93b --- /dev/null +++ b/docs/3.x.x/guides/webhooks.md @@ -0,0 +1,121 @@ +# Webhooks + +If you are using a static website generator (or framework with build option) with Strapi (Gatsby, Nuxt, Next, etc.) it is necessary to rebuild it when the content is updated in Strapi. In a Headless CMS, this is typically called a [Webhook feature](https://strapi.io/marketplace/webhooks). Unfortunately it is not available yet in Strapi even if [it has been requested](https://portal.productboard.com/strapi/c/27-webhooks). + +But what we like at Strapi is to help developers. So even if the feature is not developed yet, here is an easy to implement work around! + +### Discovering the lifecycle callbacks 🔍 + +As you may know, every Content Type (aka models) has lifecycle callbacks: functions which are triggered every time an entry is fetched, inserted, updated or deleted. Here is the list: + + - Callbacks on `save` (both triggered on entry creation and update): `beforeSave`, `afterSave`. + - Callbacks on `fetch`: `beforeFetch`, `afterFetch`. + - Callbacks on `fetchAll`: `beforeFetchAll`, `afterFetchAll`. + - Callbacks on `create`: `beforeCreate`, `afterCreate`. + - Callbacks on `update`: `beforeUpdate`, `afterUpdate`. + - Callbacks on `destroy`: `beforeDestroy`, `afterDestroy`. + +All of these functions are available in a file located at `api/yourContentType/models/YourContentType.js`. + +If your goal is to rebuild a static website, the only useful callbacks are `afterCreate`, `afterUpdate` and `afterDestroy`. So, uncomment them, add logs and try to create, update and delete entries from the admin panel. + +*Path: `api/yourContentType/models/YourContentType.js`* + +```js +'use strict'; + +/** + * Lifecycle callbacks for the `Post` model. + */ + +module.exports = { + afterCreate: async (entry) => { + console.log('afterCreate'); + }, + + afterUpdate: async (entry) => { + console.log('afterUpdate'); + }, + + afterDestroy: async (entry) => { + console.log('afterDestroy'); + } +}; +``` + +### Making the HTTP call 🔊 + +We are almost there: the only thing we still need to do is to actually make the HTTP call to the URL which will rebuild the static website. + +#### URL config + +So first of all, let's store this URL in a proper way. To do so, edit `config/environments/development/custom.json`: + +*Path: `config/environments/development/custom.json`* + +```json +{ + "staticWebsiteBuildURL": "https://yourservice.com/" +} +``` + +Do the same thing for other environments. + +#### HTTP call + +Now it is time to make the HTTP call. In this example we will use `request` as it is already in the list of Strapi's dependencies. Let's install it: + +``` +npm i request --save +``` + +Edit `api/yourContentType/models/YourContentType.js`: + +*Path: `api/yourContentType/models/YourContentType.js`* + +```js +'use strict'; + +const request = require('request'); + +/** + * Lifecycle callbacks for the `Post` model. + */ + +module.exports = { + afterCreate: async (entry) => { + axios.post(strapi.config.currentEnvironment.staticWebsiteBuildURL, entry) + .catch(() => { + // Ignore + } + ); + }, + + afterUpdate: async (entry) => { + axios.post(strapi.config.currentEnvironment.staticWebsiteBuildURL, entry) + .catch(() => { + // Ignore + } + ); + }, + + afterDestroy: async (entry) => { + axios.post(strapi.config.currentEnvironment.staticWebsiteBuildURL, entry) + .catch(() => { + // Ignore + } + ); + } +}; +``` + +#### Mongoose limitation + +Until September 2018, `remove` lifecycle callback [was not supported by Mongoose](https://github.com/Automattic/mongoose/issues/3054). This has been added but `strapi-hook-mongoose` is not adapted yet to this update. + +So, to trigger an url on delete, please add `request.post(strapi.config.currentEnvironment.staticWebsiteBuildURL, entry);` in: + + - `remove` action of `api/yourContentType/services/YourContentType.js` (triggered by your public API). + - `delete` action of `plugins/content-manager/services/ContentManager.js` (triggered by the Content Manager). + +*Note: do not forget to require `request` at the top of these files.* diff --git a/docs/package.json b/docs/package.json index 6d8cb38d1e..e2ff078925 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,7 +12,8 @@ "dependencies": { "directory-tree": "^2.1.0", "markdown-it-decorate": "^1.2.2", - "vuepress": "^0.14.2" + "vuepress": "^0.14.2", + "cache-loader": "1.2.2" }, "devDependencies": { "markdown-it-container": "^2.0.0" diff --git a/packages/strapi-admin/admin/src/translations/fr.json b/packages/strapi-admin/admin/src/translations/fr.json index fec7ee627e..7f002a80e8 100644 --- a/packages/strapi-admin/admin/src/translations/fr.json +++ b/packages/strapi-admin/admin/src/translations/fr.json @@ -3,7 +3,7 @@ "Auth & Permissions": "Auth & Permissions", "Content Manager": "Content Manager", "Content Type Builder": "Content Type Builder", - "Email": "Email", + "Email": "E-mail", "Files Upload": "Téléversement de fichiers", "HomePage.notification.newsLetter.success": "Vous avez souscrit à la newsletter", "New entry": "Nouvelle entrée", @@ -20,8 +20,8 @@ "app.components.BlockLink.code.content": "Apprenez en testant les projets développés par la communauté.", "app.components.BlockLink.documentation": "Voir la documentation", "app.components.BlockLink.documentation.content": "Découvrez les concepts, guides et tutoriaux.", - "app.components.Button.cancel": "Cancel", - "app.components.Button.save": "Save", + "app.components.Button.cancel": "Annuler", + "app.components.Button.save": "Sauvegarder", "app.components.ComingSoonPage.comingSoon": "Bientôt disponible", "app.components.ComingSoonPage.featuresNotAvailable": "Cette fonctionnalité est toujours en cours de développement.", "app.components.DownloadInfo.download": "Téléchargement en cours...", @@ -39,32 +39,32 @@ "app.components.HomePage.newsLetter": "Inscrivez-vous à la newsletter pour être contacté à propos de Strapi", "app.components.HomePage.support": "SUPPORT US", "app.components.HomePage.support.content": "En achetant notre T-shirt, vous nous aidez à poursuivre à maintenir le projet pour que nous puissions vous donner la meilleure expérience possible!", - "app.components.HomePage.support.link": "OBTENEZ VOTRE T-SHIRT!", - "app.components.HomePage.welcome": "Bienvenue à bord!", + "app.components.HomePage.support.link": "OBTENEZ VOTRE T-SHIRT !", + "app.components.HomePage.welcome": "Bienvenue à bord !", "app.components.HomePage.welcome.again": "Bienvenue ", "app.components.HomePage.welcomeBlock.content": "Nous sommes heureux de vous compter parmi nos membres. Nous sommes à l'écoute de vos retours alors, n'hésitez pas à nous envoyer des DM sur ", "app.components.HomePage.welcomeBlock.content.again": "Nous espérons que votre projet avance bien... Découvrez les derniers articles à propos de Strapi. Nous faisons de notre mieux pour améliorer le produit selon vos retours.", "app.components.HomePage.welcomeBlock.content.issues": "issues", "app.components.HomePage.welcomeBlock.content.raise": " ou soumetez des ", - "app.components.ImgPreview.hint": "Drag & drop dans cette zone ou {browse} un fichier à télécharger", + "app.components.ImgPreview.hint": "Glissez-déposez dans cette zone ou {browse} un fichier à télécharger", "app.components.ImgPreview.hint.browse": "recherchez", - "app.components.InputFile.newFile": "Ajouter un nouveau fichier", + "app.components.InputFile.newFile": "Ajouter un nouveau fichier", "app.components.InputFileDetails.open": "Ouvrir dans une nouvelle fenêtre", - "app.components.InputFileDetails.originalName": "Nom d'origine:", + "app.components.InputFileDetails.originalName": "Nom d'origine :", "app.components.InputFileDetails.remove": "Supprimer ce fichier", "app.components.InputFileDetails.size": "Taille:", "app.components.InstallPluginPage.InputSearch.label": " ", - "app.components.InstallPluginPage.InputSearch.placeholder": "Recherchez un plugin... (ex: authentification)", + "app.components.InstallPluginPage.InputSearch.placeholder": "Recherchez un plugin... (ex : authentification)", "app.components.InstallPluginPage.description": "Améliorez votre app sans efforts", "app.components.InstallPluginPage.helmet": "Marketplace - Plugins", - "app.components.InstallPluginPage.plugin.support-us.description": "Soutenez-nous en achetant un Strapi tee shirt. Cela nous aidera a continuer de travailler sur le projet pour vous donner la meilleure expérience possible!", + "app.components.InstallPluginPage.plugin.support-us.description": "Soutenez-nous en achetant un t-shirt Strapi. Cela nous aidera a continuer de travailler sur le projet pour vous donner la meilleure expérience possible!", "app.components.InstallPluginPage.title": "Marketplace - Plugins", "app.components.InstallPluginPopup.downloads": "téléchargements", "app.components.InstallPluginPopup.navLink.avis": "avis", "app.components.InstallPluginPopup.navLink.changelog": "changelog", "app.components.InstallPluginPopup.navLink.description": "Description", - "app.components.InstallPluginPopup.navLink.faq": "faq", - "app.components.InstallPluginPopup.navLink.screenshots": "Screenshots", + "app.components.InstallPluginPopup.navLink.faq": "FAQ", + "app.components.InstallPluginPopup.navLink.screenshots": "Captures d'écran", "app.components.InstallPluginPopup.noDescription": "Aucune description disponible", "app.components.LeftMenuFooter.poweredBy": "Propulsé par ", "app.components.LeftMenuLinkContainer.configuration": "Configurations", @@ -82,8 +82,8 @@ "app.components.PluginCard.Button.label.download": "Télécharger", "app.components.PluginCard.Button.label.install": "Déjà installé", "app.components.PluginCard.Button.label.support": "Nous soutenir", - "app.components.PluginCard.compatible": "Compatble avec votre app", - "app.components.PluginCard.compatibleCommunity": "Compatble avec la communauté", + "app.components.PluginCard.compatible": "Compatible avec votre app", + "app.components.PluginCard.compatibleCommunity": "Compatible avec la communauté", "app.components.PluginCard.more-details": "Plus de détails", "app.components.PluginCard.price.free": "Gratuit", "app.components.listPlugins.button": "Ajouter un Nouveau Plugin", @@ -102,13 +102,13 @@ "components.Input.error.attribute.taken": "Ce champ existe déjà", "components.Input.error.contentTypeName.taken": "Ce nom existe déjà", "components.Input.error.custom-error": "{errorMessage} ", - "components.Input.error.validation.email": "Le format n'est pas de type email", + "components.Input.error.validation.email": "Le format n'est pas de type e-mail", "components.Input.error.validation.json": "Le format JSON n'est pas respecté", "components.Input.error.validation.max": "La valeur est trop grande.", "components.Input.error.validation.maxLength": "La valeur est trop longue.", "components.Input.error.validation.min": "La valeur est trop basse.", "components.Input.error.validation.minLength": "La valeur est trop courte.", - "components.Input.error.validation.minSupMax": "Ne peut pas être plus grand", + "components.Input.error.validation.minSupMax": "Ne peut pas être plus grand.", "components.Input.error.validation.regex": "La valeur ne correspond pas au format attendu.", "components.Input.error.validation.required": "Ce champ est obligatoire.", "components.ListRow.empty": "Il n'y a pas de données à afficher.", @@ -118,7 +118,7 @@ "components.ProductionBlocker.description": "Pour des raisons de sécurité il est désactivé dans les autres environnements.", "components.ProductionBlocker.header": "Ce plugin est disponible uniquement en développement.", "components.Wysiwyg.ToggleMode.markdown": "Retour au markdown", - "components.Wysiwyg.ToggleMode.preview": "Voir la preview", + "components.Wysiwyg.ToggleMode.preview": "Voir une prévisualisation", "components.Wysiwyg.collapse": "Fermer", "components.Wysiwyg.selectOptions.H1": "Titre H1", "components.Wysiwyg.selectOptions.H2": "Titre H2", @@ -127,16 +127,16 @@ "components.Wysiwyg.selectOptions.H5": "Titre H5", "components.Wysiwyg.selectOptions.H6": "Titre H6", "components.Wysiwyg.selectOptions.title": "Ajouter un titre", - "components.WysiwygBottomControls.charactersIndicators": "charactères", + "components.WysiwygBottomControls.charactersIndicators": "caractères", "components.WysiwygBottomControls.fullscreen": "Plein écran", - "components.WysiwygBottomControls.uploadFiles": "Ajouter des fichiers en les 'droppant', {browse}, ou en les collant depuis le presse-papier", + "components.WysiwygBottomControls.uploadFiles": "Ajouter des fichiers en les 'glissant-déposant', {browse}, ou en les collant depuis le presse-papier", "components.WysiwygBottomControls.uploadFiles.browse": "en les selectionnant", "components.popUpWarning.button.cancel": "Annuler", "components.popUpWarning.button.confirm": "Confirmer", - "components.popUpWarning.message": "Etes-vous sure de vouloir le supprimer?", + "components.popUpWarning.message": "Etes-vous sure de vouloir le supprimer ?", "components.popUpWarning.title": "Merci de confirmer", "notification.error": "Une erreur est survenue", "notification.error.layout": "Impossible de récupérer le layout de l'admin", "request.error.model.unknown": "Le model n'existe pas", "app.utils.delete": "Supprimer" -} \ No newline at end of file +} diff --git a/packages/strapi-admin/admin/src/translations/pt-BR.json b/packages/strapi-admin/admin/src/translations/pt-BR.json index f2908c6b9b..0c1282247e 100644 --- a/packages/strapi-admin/admin/src/translations/pt-BR.json +++ b/packages/strapi-admin/admin/src/translations/pt-BR.json @@ -25,6 +25,7 @@ "app.components.ComingSoonPage.featuresNotAvailable": "Este recurso está em desenvolvimento", "app.components.DownloadInfo.download": "Transferência em progresso...", "app.components.DownloadInfo.text": "Isto poderá levar alguns minutos. Obrigado pela sua paciência", + "app.components.EmptyAttributes.title": "Ainda não existem campos", "app.components.HomePage.button.blog": "VEJA MAIS NO BLOG", "app.components.HomePage.button.quickStart": "INICIAR TUTORIAL (Quick Start)", "app.components.HomePage.community": "Nossa comunidade na web", @@ -91,6 +92,7 @@ "app.components.listPluginsPage.deletePlugin.error": "Ocorreu um erro ao desinstalar extensão", "app.utils.SelectOption.defaultMessage": " ", "app.utils.defaultMessage": " ", + "app.utils.delete": "Excluir", "app.utils.placeholder.defaultMessage": " ", "components.AutoReloadBlocker.description": "Abra o seguinte arquivo e ative o recurso.", "components.AutoReloadBlocker.header": "Auto recarregamento é necessário para esta extensão.", @@ -136,4 +138,4 @@ "notification.error": "Ocorreu um erro", "notification.error.layout": "Não foi possível recuperar o layout", "request.error.model.unknown": "Este modelo não existe" -} \ No newline at end of file +} diff --git a/packages/strapi-generate-new/lib/after.js b/packages/strapi-generate-new/lib/after.js index 17a8e38092..82ee83968f 100644 --- a/packages/strapi-generate-new/lib/after.js +++ b/packages/strapi-generate-new/lib/after.js @@ -94,8 +94,8 @@ module.exports = (scope, cb) => { }); } else { const alphaDependencies = othersDependencies.map(dep => { - if (_.includes(dep, 'strapi') && !_.includes(dep, '@alpha')) { // We need this for yarn - return `${dep}@alpha`; + if (_.includes(dep, 'strapi')) { // We need this for yarn + return `${dep}@${scope.strapiPackageJSON.version}`; } return dep; diff --git a/packages/strapi-generate-new/lib/before.js b/packages/strapi-generate-new/lib/before.js index 856de0d85d..bc69e93e2e 100644 --- a/packages/strapi-generate-new/lib/before.js +++ b/packages/strapi-generate-new/lib/before.js @@ -225,14 +225,14 @@ module.exports = (scope, cb) => { shell.exec(`mkdir ${scope.tmpPath}`); } - let cmd = `${packageCmd} ${scope.client.connector}@alpha`; + let cmd = `${packageCmd} ${scope.client.connector}@${scope.strapiPackageJSON.version}`; if (scope.client.module) { cmd += ` ${scope.client.module}`; } if (scope.client.connector === 'strapi-hook-bookshelf') { - cmd += ` strapi-hook-knex@alpha`; + cmd += ` strapi-hook-knex@${scope.strapiPackageJSON.version}`; scope.additionalsDependencies = ['strapi-hook-knex', 'knex']; } diff --git a/packages/strapi-plugin-content-manager/admin/src/translations/fr.json b/packages/strapi-plugin-content-manager/admin/src/translations/fr.json index f537f0481f..8218fe12e6 100644 --- a/packages/strapi-plugin-content-manager/admin/src/translations/fr.json +++ b/packages/strapi-plugin-content-manager/admin/src/translations/fr.json @@ -2,7 +2,7 @@ "EditRelations.title": "Données associées", "components.AddFilterCTA.add": "Filtres", "components.AddFilterCTA.hide": "Filtres", - "components.DraggableAttr.edit": "Clicquez pour modifier", + "components.DraggableAttr.edit": "Cliquez pour modifier", "components.EmptyAttributesBlock.button": "Voir la page des configurations", "components.EmptyAttributesBlock.description": "Vous pouvez modifiez vos paramètres", "components.FilterOptions.FILTER_TYPES.=": "est", @@ -46,16 +46,16 @@ "containers.SettingPage.addField": "Ajouter un nouveau champs", "containers.SettingPage.addRelationalField": "Ajouter un nouveau champs relationnel", "containers.SettingPage.attributes": "Attributs", - "containers.SettingPage.attributes.description": "Organiser les attributs du modèle", + "containers.SettingPage.attributes.description": "Organisez les attributs du modèle", "containers.SettingPage.editSettings.description": "Glissez & déposez les champs pour construire le layout", "containers.SettingPage.editSettings.title": "Edit — Paramètres", "containers.SettingPage.listSettings.description": "Configurez les options de ce modèle", "containers.SettingPage.listSettings.title": "Liste — Paramètres", "containers.SettingPage.pluginHeaderDescription": "Configurez les paramètres de ce modèle", "containers.SettingPage.relations": "Champs relationnels", - "containers.SettingsPage.Block.contentType.description": "Configurer les paramètres spécifiques", + "containers.SettingsPage.Block.contentType.description": "Configurez les paramètres spécifiques", "containers.SettingsPage.Block.contentType.title": "Types de contenu", - "containers.SettingsPage.Block.generalSettings.description": "Configurez les options par défault de vos modèles", + "containers.SettingsPage.Block.generalSettings.description": "Configurez les options par défault de vos modèles", "containers.SettingsPage.Block.generalSettings.title": "Général", "containers.SettingsPage.pluginHeaderDescription": "Configurez les paramètres par défaut de vos modèles", "emptyAttributes.button": "Ouvrir le Content Type Builder", @@ -84,17 +84,17 @@ "form.Input.bulkActions": "Autoriser les actions groupées", "form.Input.defaultSort": "Attribut de tri par défault", "form.Input.description": "Description", - "form.Input.description.placeholder": "Afficher le nom dans le profile", + "form.Input.description.placeholder": "Afficher le nom dans le profil", "form.Input.disabled": "Champ editable", "form.Input.filters": "Autoriser les filtres", "form.Input.label": "Label", "form.Input.label.inputDescription": "Cette valeur modifie celle du champs de la table", "form.Input.pageEntries": "Nombre d'entrées par page", - "form.Input.pageEntries.inputDescription": "Note: Vous pouvez modifier ces valeurs par modèle", + "form.Input.pageEntries.inputDescription": "Note : Vous pouvez modifier ces valeurs par modèle", "form.Input.placeholder": "Placeholder", "form.Input.placeholder.placeholder": "Mon super placeholder", - "form.Input.search": "Autoriser la search", - "form.Input.search.field": "Autoriser la search sur ce champs", + "form.Input.search": "Autoriser la recherche", + "form.Input.search.field": "Autoriser la recherche sur ce champs", "form.Input.sort.field": "Autoriser le tri sur ce champs", "notification.error.displayedFields": "Vous devez avoir au moins un champ d'affiché", "notification.error.relationship.fetch": "Une erreur est survenue en récupérant les relations.", @@ -107,8 +107,9 @@ "popUpWarning.button.cancel": "Annuler", "popUpWarning.button.confirm": "Confirmer", "popUpWarning.title": "Confirmation requise", - "popUpWarning.warning.cancelAllSettings": "Êtes-vous sûr de vouloir vos modifications?", + "popUpWarning.warning.cancelAllSettings": "Êtes-vous sûr de vouloir abandonner vos modifications ?", "popUpWarning.warning.updateAllSettings": "Cela modifiera tous vos précédents paramètres.", "success.record.delete": "Supprimé", "success.record.save": "Sauvegardé" -} \ No newline at end of file +} + diff --git a/packages/strapi-plugin-content-manager/admin/src/translations/pt-BR.json b/packages/strapi-plugin-content-manager/admin/src/translations/pt-BR.json index 54dbc6badf..15c12086b3 100644 --- a/packages/strapi-plugin-content-manager/admin/src/translations/pt-BR.json +++ b/packages/strapi-plugin-content-manager/admin/src/translations/pt-BR.json @@ -3,6 +3,8 @@ "components.AddFilterCTA.add": "Filtros", "components.AddFilterCTA.hide": "Filtros", "components.DraggableAttr.edit": "Clique para editar", + "components.EmptyAttributesBlock.button": "Ir para página de configurações", + "components.EmptyAttributesBlock.description": "Você pode alterar suas configurações", "components.FilterOptions.FILTER_TYPES.=": "é", "components.FilterOptions.FILTER_TYPES._contains": "contém", "components.FilterOptions.FILTER_TYPES._containss": "contém (case sensitive)", @@ -25,10 +27,13 @@ "components.TableEmpty.withFilters": "Nenhum {contentType} com os filtros aplicados...", "components.TableEmpty.withSearch": "Nenhum {contentType} encontrado na pesquisa ({search})...", "components.TableEmpty.withoutFilter": "Nenhum {contentType}...", + "containers.Edit.addAnItem": "Adicione um item...", + "containers.Edit.clickToJump": "Clique para pular para o registro", "containers.Edit.delete": "Remove", "containers.Edit.editing": "Editando...", "containers.Edit.reset": "Reiniciar", "containers.Edit.returnList": "Retornar à lista", + "containers.Edit.seeDetails": "Detalhes", "containers.Edit.submit": "Salvar", "containers.Home.introduction": "Para editar seus registros, acesse o link específico no menu à esquerda. Esta extensão não permite editar configurações, ainda está em desenvolvimento.", "containers.Home.pluginHeaderDescription": "Gerencie seus registros através de uma interface poderosa e elegante.", @@ -37,15 +42,17 @@ "containers.List.errorFetchRecords": "Erro", "containers.List.pluginHeaderDescription": "{label} registros encontrados", "containers.List.pluginHeaderDescription.singular": "{label} registro encontrado", + "containers.ListPage.displayedFields": "Campos exibidos", "containers.SettingPage.addField": "Adicionar campo", + "containers.SettingPage.addRelationalField": "Adicionar novo campo relacional", "containers.SettingPage.attributes": "Atributos", "containers.SettingPage.attributes.description": "Define a ordem dos atributos", - "containers.SettingPage.editSettings.description": "Drag & drop the fields to build the layout", - "containers.SettingPage.editSettings.title": "Edit — Settings", + "containers.SettingPage.editSettings.description": "Arraste e solte os campos para construir o layout", + "containers.SettingPage.editSettings.title": "Editar — Configurações", "containers.SettingPage.listSettings.description": "Configure as opções para este Tipo de Conteúdo", "containers.SettingPage.listSettings.title": "Lista — Configurações", "containers.SettingPage.pluginHeaderDescription": "Defina as configurações específicas para este Tipo de Conteúdo", - "containers.SettingPage.relations": "Relational fields", + "containers.SettingPage.relations": "Campos relacionais", "containers.SettingsPage.Block.contentType.description": "Defina as configurações específicas", "containers.SettingsPage.Block.contentType.title": "Tipos de Conteúdo", "containers.SettingsPage.Block.generalSettings.description": "Configure as opções padrões para seu Tipo de Conteúdo", @@ -76,14 +83,20 @@ "error.validation.required": "O valor deste registro é obrigatório.", "form.Input.bulkActions": "Habilitar ações em lote", "form.Input.defaultSort": "Atributo de ordenação padrão", + "form.Input.description": "Descrição", + "form.Input.description.placeholder": "Nome exibido no perfil", + "form.Input.disabled": "Campo editável", "form.Input.filters": "Habilitar filtros", "form.Input.label": "Rótulo", "form.Input.label.inputDescription": "Este valor substitui o rótulo apresentado no cabeçalho da tabela", "form.Input.pageEntries": "Entradas por página", "form.Input.pageEntries.inputDescription": "Nota: Você pode substituir este valor na página de configurações do Tipo de Conteúdo.", + "form.Input.placeholder": "Placeholder", + "form.Input.placeholder.placeholder": "Meu valor incrível", "form.Input.search": "Habilitar busca", "form.Input.search.field": "Habilitar busca neste campo", "form.Input.sort.field": "Habilitar ordenação neste campo", + "notification.error.displayedFields": "Você precisa ao menos um campo exibido", "notification.error.relationship.fetch": "Ocorreu um erro durante a busca da relação.", "notification.info.SettingPage.disableSort": "Você precisa de um atributo com permissão de ordenação", "pageNotFound": "Página não encontrada", @@ -98,4 +111,4 @@ "popUpWarning.warning.updateAllSettings": "Isto irá modificar todas as suas configurações", "success.record.delete": "Removido", "success.record.save": "Salvo" -} \ No newline at end of file +} diff --git a/packages/strapi-plugin-content-manager/config/queries/bookshelf.js b/packages/strapi-plugin-content-manager/config/queries/bookshelf.js index 2ac90f343f..1f422444f5 100644 --- a/packages/strapi-plugin-content-manager/config/queries/bookshelf.js +++ b/packages/strapi-plugin-content-manager/config/queries/bookshelf.js @@ -184,7 +184,7 @@ module.exports = { withRelated: populate || this.associations.map(x => x.alias) }); - const data = record.toJSON ? record.toJSON() : record; + const data = _.get(record, 'toJSON()', record); // Retrieve data manually. if (_.isEmpty(populate)) { diff --git a/packages/strapi-plugin-content-type-builder/admin/src/translations/fr.json b/packages/strapi-plugin-content-type-builder/admin/src/translations/fr.json index b2781793fe..676303da13 100644 --- a/packages/strapi-plugin-content-type-builder/admin/src/translations/fr.json +++ b/packages/strapi-plugin-content-type-builder/admin/src/translations/fr.json @@ -29,18 +29,18 @@ "error.validation.minSupMax": "Ne peut pas être plus grand", "error.validation.regex": "La valeur ne correspond pas au format attendu.", "error.validation.required": "Ce champ est obligatoire.", - "form.attribute.item.appearance.description": "Sinon, il sera editable à partir d'une simple textarea", + "form.attribute.item.appearance.description": "Sinon, il sera editable à partir d'une simple zone de texte", "form.attribute.item.appearance.label": "Editable avec un WYSIWYG", "form.attribute.item.appearance.name": "Apparence", "form.attribute.item.boolean.name": "Nom", - "form.attribute.item.customColumnName": "Nom de colonne custom", + "form.attribute.item.customColumnName": "Nom de colonne personalisée", "form.attribute.item.customColumnName.description": "Pratique pour renommer la colonne de la db dans un format plus comprehensible pour les responses de l'API", "form.attribute.item.date.name": "Nom", "form.attribute.item.defineRelation.fieldName": "Nom du Champ", "form.attribute.item.enumeration.graphql": "Surchage du nom pour GraphQL", "form.attribute.item.enumeration.graphql.description": "Vous permet de remplacer le nom généré par défaut pour GraphQL", "form.attribute.item.enumeration.name": "Nom", - "form.attribute.item.enumeration.placeholder": "Ex: matin,midi,soir", + "form.attribute.item.enumeration.placeholder": "Ex : matin,midi,soir", "form.attribute.item.enumeration.rules": "Valeurs (les séparer par une virgule)", "form.attribute.item.json.name": "Nom", "form.attribute.item.maximum": "Valeur maximum", @@ -64,7 +64,7 @@ "form.attribute.settings.default": "Valeur par défault", "form.attribute.settings.default.checkboxLabel": "Définir à true", "form.button.cancel": "Annuler", - "form.button.continue": "Continue", + "form.button.continue": "Continuer", "form.button.save": "Sauvegarder", "form.contentType.item.collectionName": "Nom de la Collection", "form.contentType.item.collectionName.inputDescription": "Pratique quand le Nom de votre Modèle et de votre table sont différents", @@ -111,7 +111,7 @@ "popUpForm.attributes.date.description": "Date événements, horaires", "popUpForm.attributes.date.name": "Date", "popUpForm.attributes.email.description": "Email utilisateurs", - "popUpForm.attributes.email.name": "Email", + "popUpForm.attributes.email.name": "E-mail", "popUpForm.attributes.enumeration": "Énumération", "popUpForm.attributes.enumeration.description": "Liste de choix", "popUpForm.attributes.enumeration.name": "Énumération", @@ -144,7 +144,7 @@ "popUpWarning.button.cancel": "Annuler", "popUpWarning.button.confirm": "Confirmer", "popUpWarning.title": "Merci de confirmer", - "relation.attributeName.placeholder": "Ex: auteur, catégorie, tag", + "relation.attributeName.placeholder": "Ex : auteur, catégorie, tag", "relation.manyToMany": "a plusieurs", "relation.manyToOne": "a plusieurs", "relation.oneToMany": "appartient a", @@ -155,4 +155,4 @@ "table.contentType.head.name": "Nom", "table.contentType.title.plural": "Modèles sont disponibles", "table.contentType.title.singular": "Modèle est disponible" -} \ No newline at end of file +} diff --git a/packages/strapi-plugin-email/admin/src/translations/fr.json b/packages/strapi-plugin-email/admin/src/translations/fr.json index b632053210..17a1af7a45 100644 --- a/packages/strapi-plugin-email/admin/src/translations/fr.json +++ b/packages/strapi-plugin-email/admin/src/translations/fr.json @@ -4,8 +4,8 @@ "EditForm.Input.number.label": "Taille maximale autorisée (en MB)", "EditForm.Input.select.inputDescription": "Les e-mails peuvent être envoyés avec le fournisseur par défaut (Sendmail) ou un fournisseur externe.", "EditForm.Input.select.label": "Fournisseurs", - "EditForm.Input.toggle.label": "Activer l'envoi de e-mails", + "EditForm.Input.toggle.label": "Activer l'envoi d'e-mails", "notification.config.success": "Les paramètres ont été mis à jour.", "plugin.description.long": "Envoyez des emails", "plugin.description.short": "Envoyez des emails" -} \ No newline at end of file +} diff --git a/packages/strapi-plugin-graphql/hooks/graphql/index.js b/packages/strapi-plugin-graphql/hooks/graphql/index.js index c6872a80f1..7530b4e042 100644 --- a/packages/strapi-plugin-graphql/hooks/graphql/index.js +++ b/packages/strapi-plugin-graphql/hooks/graphql/index.js @@ -35,7 +35,7 @@ module.exports = strapi => { // Load root configurations. new Promise((resolve, reject) => { glob( - './config/*.graphql', + './config/*.graphql?(.js)', { cwd: strapi.config.appPath, }, @@ -54,7 +54,7 @@ module.exports = strapi => { // Load APIs configurations. new Promise((resolve, reject) => { glob( - './api/*/config/*.graphql', + './api/*/config/*.graphql?(.js)', { cwd: strapi.config.appPath, }, @@ -73,7 +73,7 @@ module.exports = strapi => { // Load plugins configurations. new Promise((resolve, reject) => { glob( - './plugins/*/config/*.graphql', + './plugins/*/config/*.graphql?(.js)', { cwd: strapi.config.appPath, }, diff --git a/packages/strapi-plugin-graphql/services/Resolvers.js b/packages/strapi-plugin-graphql/services/Resolvers.js index 45328cc731..7ff4d885ce 100644 --- a/packages/strapi-plugin-graphql/services/Resolvers.js +++ b/packages/strapi-plugin-graphql/services/Resolvers.js @@ -398,7 +398,7 @@ module.exports = { queryOpts.skip = convertedParams.start; switch (association.nature) { - case 'manyToMany': { + case 'manyToMany': if (association.dominant) { const arrayOfIds = (obj[association.alias] || []).map( related => { @@ -413,8 +413,7 @@ module.exports = { [ref.primaryKey]: arrayOfIds, ...where.where, }).where; - } - break; + break; // falls through } default: diff --git a/packages/strapi-plugin-settings-manager/services/SettingsManager.js b/packages/strapi-plugin-settings-manager/services/SettingsManager.js index 8821a267d3..503c94b175 100644 --- a/packages/strapi-plugin-settings-manager/services/SettingsManager.js +++ b/packages/strapi-plugin-settings-manager/services/SettingsManager.js @@ -936,7 +936,7 @@ module.exports = { if (connector && !installedConnector) { strapi.log.info(`Installing ${connector} dependency ...`); - exec('npm', ['install', `${connector}@alpha`]); + exec('npm', ['install', `${connector}@${strapi.config.info.strapi}`]); } if (client && !installedClient) { diff --git a/packages/strapi-plugin-upload/admin/src/translations/fr.json b/packages/strapi-plugin-upload/admin/src/translations/fr.json index 0d0d7931ee..b0e876ab16 100644 --- a/packages/strapi-plugin-upload/admin/src/translations/fr.json +++ b/packages/strapi-plugin-upload/admin/src/translations/fr.json @@ -20,9 +20,9 @@ "ListHeader.updated": "Modifié", "PluginInputFile.link": "recherchez", "PluginInputFile.loading": "Vos fichiers sont en train d'être téléchargés...", - "PluginInputFile.text": "Drag & drop vos fichiers dans cette zone ou {link} un fichier à télécharger", + "PluginInputFile.text": "Glissez-déposez vos fichiers dans cette zone ou {link} un fichier à télécharger", "notification.config.success": "Les paramètres ont été mis à jour.", "notification.delete.success": "Le fichier a bien été supprimé", "notification.dropFile.success": "Votre fichier a été téléchargé", "notification.dropFiles.success": "{number} fichiers ont été téléchargées" -} \ No newline at end of file +} diff --git a/packages/strapi-plugin-users-permissions/admin/src/translations/fr.json b/packages/strapi-plugin-users-permissions/admin/src/translations/fr.json index cb2dda6884..e920f22ebd 100644 --- a/packages/strapi-plugin-users-permissions/admin/src/translations/fr.json +++ b/packages/strapi-plugin-users-permissions/admin/src/translations/fr.json @@ -8,10 +8,10 @@ "Auth.form.button.reset-password": "Changez votre mot de passe", "Auth.form.error.blocked": "Votre compte a été bloqué par l'administrateur.", "Auth.form.error.code.provide": "Le code est incorrect.", - "Auth.form.error.confirmed": "L'email de votre compte n'est pas confirmé.", + "Auth.form.error.confirmed": "L'e-mail de votre compte n'est pas confirmé.", "Auth.form.error.email.invalid": "Cette e-mail n'est pas valide.", "Auth.form.error.email.provide": "Votre identifiant est manquant.", - "Auth.form.error.email.taken": "Cet email est déjà utilisé", + "Auth.form.error.email.taken": "Cet e-mail est déjà utilisé", "Auth.form.error.invalid": "Votre identifiant ou mot de passe est incorrect.", "Auth.form.error.noAdminAccess": "Vous ne pouvez pas accéder à l'administration.", "Auth.form.error.params.provide": "Les informations nos incorrect.", @@ -20,46 +20,46 @@ "Auth.form.error.password.matching": "Les mots de passe ne sont pas identique.", "Auth.form.error.password.provide": "Votre mot de passe est manquant.", "Auth.form.error.ratelimit": "Trop de tentatives, veuillez réessayer dans une minute.", - "Auth.form.error.user.not-exist": "Cette e-mails n'existe pas.", + "Auth.form.error.user.not-exist": "Cette e-mail n'existe pas.", "Auth.form.error.username.taken": "Ce nom est déjà utilisé", - "Auth.form.forgot-password.email.label": "Entrez votre email", - "Auth.form.forgot-password.email.label.success": "Email envoyé avec succès à l'adresse suivante", + "Auth.form.forgot-password.email.label": "Entrez votre e-mail", + "Auth.form.forgot-password.email.label.success": "E-mail envoyé avec succès à l'adresse suivante", "Auth.form.forgot-password.email.placeholder": "mysuperemail@gmail.com", "Auth.form.header.forgot-password": "strapi", "Auth.form.header.login": "strapi", - "Auth.form.header.register": "Bienvenue!", + "Auth.form.header.register": "Bienvenue !", "Auth.form.header.register-success": "strapi", "Auth.form.login.password.label": "Mot de Passe", "Auth.form.login.rememberMe.label": "Se souvenir de moi", - "Auth.form.login.username.label": "Username", + "Auth.form.login.username.label": "Nom d'utilisateur", "Auth.form.login.username.placeholder": "John Doe", - "Auth.form.register-success.email.label": "Email envoyé avec succès à", + "Auth.form.register-success.email.label": "E-mail envoyé avec succès à", "Auth.form.register-success.email.placeholder": "mysuperemail@gmail.com", "Auth.form.register.confirmPassword.label": "Confirmez le Mot de Passe", "Auth.form.register.email.label": "Email", "Auth.form.register.email.placeholder": "johndoe@gmail.com", "Auth.form.register.news.label": "Me tenir au courant des nouvelles fonctionnalités et améliorations à venir.", "Auth.form.register.password.label": "Mot de Passe", - "Auth.form.register.username.label": "Username", + "Auth.form.register.username.label": "Nom d'utilisateur", "Auth.form.register.username.placeholder": "John Doe", "Auth.header.register.description": "Pour finir le setup et sécuriser votre app, merci de créer le premier utilisateur (root admin) en remplissant le formulaire suivant.", - "Auth.link.forgot-password": "Mot de passe oublié?", - "Auth.link.ready": "Prêt à vous connecter?", + "Auth.link.forgot-password": "Mot de passe oublié ?", + "Auth.link.ready": "Prêt à vous connecter ?", "BoundRoute.title": "Route associée à", "Controller.input.label": "{label} ", "Controller.selectAll": "Tout cocher", - "EditForm.inputSelect.description.role": "Choisissez le rôle qui sera lié aux utilisateurs lors de le enregistrement.", - "EditForm.inputSelect.durations.description": "Nombre d'heure pendant lesquelles un utilisateur ne peut souscrire.", - "EditForm.inputSelect.durations.label": "Duration", + "EditForm.inputSelect.description.role": "Choisissez le rôle qui sera lié aux utilisateurs lors de leur enregistrement.", + "EditForm.inputSelect.durations.description": "Nombre d'heure pendant lesquelles un utilisateur ne peut pas s'inscrire.", + "EditForm.inputSelect.durations.label": "Durée", "EditForm.inputSelect.label.role": "Rôle par defaut pour les nouveaux utilisateurs", - "EditForm.inputSelect.subscriptions.description": "Limitez le nombre de souscriptions par IP par heure.", - "EditForm.inputSelect.subscriptions.label": "Quotas de souscriptions", - "EditForm.inputToggle.description.email": "Interdire l'utilisateur de créer de multiple comptes avec la même adresse email avec des providers différents", - "EditForm.inputToggle.description.email-confirmation": "Quand cette option est activée (ON), les nouveaux utilisateurs enregistrés reçoivent un email de confirmation.", - "EditForm.inputToggle.description.email-confirmation-redirection": "Après confirmation de votre email, choisissez où vous allez être redirigé.", + "EditForm.inputSelect.subscriptions.description": "Limitez le nombre d'inscriptions par IP par heure.", + "EditForm.inputSelect.subscriptions.label": "Quotas d'inscriptions", + "EditForm.inputToggle.description.email": "Interdire l'utilisateur de créer de multiple comptes avec la même adresse e-mail avec des providers différents", + "EditForm.inputToggle.description.email-confirmation": "Quand cette option est activée (ON), les nouveaux utilisateurs enregistrés reçoivent un e-mail de confirmation.", + "EditForm.inputToggle.description.email-confirmation-redirection": "Après confirmation de votre e-mail, choisissez où vous allez être redirigé.", "EditForm.inputToggle.description.sign-up": "Quand l'inscription est désactivée (OFF), aucun utilisateur ne peut s'inscrire qu'importe le provider", - "EditForm.inputToggle.label.email": "Un compte par adresse email", - "EditForm.inputToggle.label.email-confirmation": "Activer l'email de confirmation", + "EditForm.inputToggle.label.email": "Un compte par adresse e-mail", + "EditForm.inputToggle.label.email-confirmation": "Activer l'e-mail de confirmation", "EditForm.inputToggle.label.email-confirmation-redirection": "Redirection de l'URL", "EditForm.inputToggle.label.sign-up": "Activer l'inscription", "EditPage.cancel": "Cancel", @@ -79,18 +79,18 @@ "Email.template.email_confirmation": "Confirmation de l'adresse email", "Email.template.reset_password": "Modification de mot de passe", "Email.template.success_register": "Inscription réussie", - "Email.template.validation_email": "Email de validation d'adresse", + "Email.template.validation_email": "E-mail de validation d'adresse", "HeaderNav.link.advancedSettings": "Paramètres avancés", - "HeaderNav.link.emailTemplates": "Templates d'email", + "HeaderNav.link.emailTemplates": "Templates d'e-mail", "HeaderNav.link.providers": "Fournisseurs", "HeaderNav.link.roles": "Rôles & Permissions", "HomePage.header.description": "Définissez les rôles et permissions pour chacun d'eux", "HomePage.header.title": "Roles & Permissions", - "InputSearch.placeholder": "Recherez un utilisateur", - "List.button.providers": "Ajouter Un Nouveau Provider", + "InputSearch.placeholder": "Recherchez un utilisateur", + "List.button.providers": "Ajouter un Nouveau Provider", "List.button.roles": "Ajouter un Nouveau Rôle", - "List.title.emailTemplates.plural": "{number} templates d'email sont disponibles", - "List.title.emailTemplates.singular": "{number} template d'email est disponible", + "List.title.emailTemplates.plural": "{number} templates d'e-mail sont disponibles", + "List.title.emailTemplates.singular": "{number} template d'e-mail est disponible", "List.title.providers.disabled.plural": "{number} indisponibles", "List.title.providers.disabled.singular": "{number} indisponible", "List.title.providers.enabled.plural": "{number} providers sont disponibles et", @@ -106,21 +106,21 @@ "Policies.header.hint": "Sélectionnez les actions de l'application ou d'un plugin et cliquer sur l'icon de paramètres pour voir les routes associées à cette action", "Policies.header.title": "Paramètres avancés", "PopUpForm.Email.email_templates.inputDescription": "Regardez la documentation des variables, {link}", - "PopUpForm.Email.link.documentation": "afin de templeter vos emails", - "PopUpForm.Email.options.from.email.label": "Email de l'envoyeur", + "PopUpForm.Email.link.documentation": "afin de templeter vos e-mails", + "PopUpForm.Email.options.from.email.label": "E-mail de l'envoyeur", "PopUpForm.Email.options.from.email.placeholder": "arthurdupont@gmail.com", "PopUpForm.Email.options.from.name.label": "Nom de l'envoyeur", "PopUpForm.Email.options.from.name.placeholder": "Arthur Dupont", "PopUpForm.Email.options.message.label": "Message", "PopUpForm.Email.options.object.label": "Objet", - "PopUpForm.Email.options.response_email.label": "Email de réponse", + "PopUpForm.Email.options.response_email.label": "E-mail de réponse", "PopUpForm.Email.options.response_email.placeholder": "arthurdupont@gmail.com", "PopUpForm.Email.reset_password.options.message.placeholder": "
Merci de cliquer sur ce lien pour valider votre compte
", - "PopUpForm.Email.reset_password.options.object.placeholder": "Merci de confirmer votre adresse email pour %APP_NAME%", + "PopUpForm.Email.reset_password.options.object.placeholder": "Merci de confirmer votre adresse e-mail pour %APP_NAME%", "PopUpForm.Email.success_register.options.message.placeholder": "Merci de cliquer sur ce lien pour valider votre compte
", - "PopUpForm.Email.success_register.options.object.placeholder": "Merci de confirmer votre adresse email pour %APP_NAME%", + "PopUpForm.Email.success_register.options.object.placeholder": "Merci de confirmer votre adresse e-mail pour %APP_NAME%", "PopUpForm.Email.validation_email.options.message.placeholder": "Merci de cliquer sur ce lien pour valider votre compte
", - "PopUpForm.Email.validation_email.options.object.placeholder": "Merci de confirmer votre adresse email pour %APP_NAME%", + "PopUpForm.Email.validation_email.options.object.placeholder": "Merci de confirmer votre adresse e-mail pour %APP_NAME%", "PopUpForm.Providers.callback.placeholder": "TEXT", "PopUpForm.Providers.discord.providerConfig.redirectURL": "L'URL de redirection à ajouter dans les configurations Discord de votre application", "PopUpForm.Providers.enabled.description": "S'il est désactivé les utilisateurs ne pourront pas utiliser ce provider.", @@ -139,17 +139,17 @@ "PopUpForm.button.cancel": "Annuler", "PopUpForm.button.save": "Sauvegarder", "PopUpForm.header.add.providers": "Ajouter un Nouveau Provider", - "PopUpForm.header.edit.email-templates": "Editer Email Templates", + "PopUpForm.header.edit.email-templates": "Editer E-mail Templates", "PopUpForm.header.edit.providers": "Editer {provider} Provider", "PopUpForm.inputSelect.providers.label": "Sélectionnez le provider", "components.Input.error.password.noMatch": "Le mot de passe ne correspond pas", - "components.Input.error.password.length": "Le password doit contenir au moins 6 caractères", + "components.Input.error.password.length": "Le mot de passe doit contenir au moins 6 caractères", "notification.error.delete": "Une erreur est survenue en essayant de supprimer cet élément", "notification.error.fetch": "Une erreur est survenue en essayant de récupérer les données", "notification.error.fetchUser": "Une erreur est survenue en esssayent de récupérer les users", - "notification.info.emailSent": "L'email a été envoyé", + "notification.info.emailSent": "L'e-mail a été envoyé", "notification.success.delete": "L'élément a bien été supprimé", "notification.success.submit": "Les configurations ont bien été sauvegardés", "plugin.description.long": "Protégez votre API avec un système d'authentification complet basé sur JWT (JSON Web Token). Ce plugin ajoute aussi une stratégie ACL (Access Control Layer) qui vous permet de gérer les permissions entre les groupes d'utilisateurs.", "plugin.description.short": "Protégez votre API avec un système d'authentification complet basé sur JWT" -} \ No newline at end of file +} diff --git a/packages/strapi/lib/index.js b/packages/strapi/lib/index.js index 3008c813ad..a6d0916efe 100644 --- a/packages/strapi/lib/index.js +++ b/packages/strapi/lib/index.js @@ -7,11 +7,10 @@ global.startedAt = Date.now(); * Instantiate and expose a Strapi singleton * (maintains legacy support). */ - module.exports = function(global) { try { return global.strapi = require('./Strapi'); // Strapi instance instanciated } catch (error) { - console.log(error); // eslint-disable-line no-console + console.error(error); } }.call(this, global); diff --git a/packages/strapi/package.json b/packages/strapi/package.json index 304ff315a7..e4d18ac8a4 100644 --- a/packages/strapi/package.json +++ b/packages/strapi/package.json @@ -94,4 +94,4 @@ }, "preferGlobal": true, "license": "MIT" -} \ No newline at end of file +}