Merge branch 'master' into fix/4537

This commit is contained in:
Mickael D 2019-12-04 21:55:35 +01:00 committed by GitHub
commit 359fd2bb21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 454 additions and 293 deletions

View File

@ -88,16 +88,16 @@ yarn develop
The server (API) is available at http://localhost:1337 The server (API) is available at http://localhost:1337
**WARNING** ⚠️ If you've followed the recommended setup, you should not be able to reach the administration panel at http://localhost:1337/admin. The built administration panel is available at http://localhost:1337/admin
**Start the administration panel server** **Start the administration panel server for development**
```bash ```bash
cd strapi/packages/strapi-admin cd strapi/packages/strapi-admin
yarn develop yarn develop
``` ```
The administration panel is available at http://localhost:4000/admin The administration panel will be available at http://localhost:4000/admin
**Awesome! You are now able to contribute to Strapi.** **Awesome! You are now able to contribute to Strapi.**

View File

@ -2,8 +2,16 @@ module.exports = {
title: 'Strapi Documentation', title: 'Strapi Documentation',
description: 'The headless CMS developers love.', description: 'The headless CMS developers love.',
base: '/documentation/', base: '/documentation/',
plugins: [
'@vuepress/medium-zoom',
'vuepress-plugin-element-tabs',
[
'@vuepress/google-analytics',
{
ga: 'UA-54313258-1', ga: 'UA-54313258-1',
plugins: ['@vuepress/medium-zoom', 'vuepress-plugin-element-tabs'], },
],
],
head: [ head: [
[ [
'link', 'link',
@ -116,7 +124,7 @@ module.exports = {
}, },
{ {
text: 'Website', text: 'Website',
link: 'https://strapi', link: 'https://strapi.io',
}, },
{ {
text: 'Slack', text: 'Slack',

View File

@ -20,6 +20,18 @@
>{{ $siteTitle }}</span> >{{ $siteTitle }}</span>
</router-link> </router-link>
<span
class="deprecated"
v-if="isAlpha">
Deprecated docs -
<router-link
:to="$localePath"
class="home-link"
>
current version
</router-link>
</span>
<div <div
class="links" class="links"
:style="linksWrapMaxWidth ? { :style="linksWrapMaxWidth ? {
@ -43,7 +55,8 @@ export default {
components: { SidebarButton, NavLinks, AlgoliaSearchBox, SearchBox}, components: { SidebarButton, NavLinks, AlgoliaSearchBox, SearchBox},
data () { data () {
return { return {
linksWrapMaxWidth: null linksWrapMaxWidth: null,
isAlpha: false
} }
}, },
mounted () { mounted () {
@ -59,6 +72,7 @@ export default {
} }
handleLinksWrapWidth() handleLinksWrapWidth()
window.addEventListener('resize', handleLinksWrapWidth, false) window.addEventListener('resize', handleLinksWrapWidth, false)
this.isAlpha = /documentation\/3.0.0-alpha.x/.test(window.location.href)
}, },
computed: { computed: {
algolia () { algolia () {
@ -80,6 +94,12 @@ $navbar-horizontal-padding = 1.5rem
.navbar .navbar
padding $navbar-vertical-padding $navbar-horizontal-padding padding $navbar-vertical-padding $navbar-horizontal-padding
line-height $navbarHeight - 1.4rem line-height $navbarHeight - 1.4rem
.deprecated
padding 0 0.5rem
margin-left 1rem
font-weight 600
background-color #fff3cd
border-radius .25rem
a, span, img a, span, img
display inline-block display inline-block
.logo .logo

View File

@ -97,6 +97,12 @@ strapi(/* {...} */).start();
If you want to host the administration on another server than the API, [please take a look at this dedicated section](../admin-panel/deploy.md). If you want to host the administration on another server than the API, [please take a look at this dedicated section](../admin-panel/deploy.md).
## Docker
In this section, you will not find a specific guide to deploy your app with [Docker](https://www.docker.com/).
We recently updated the [strapi/strapi-docker](https://github.com/strapi/strapi-docker) GitHub repository that contains all informations needed to user Strapi with Docker.
## Amazon AWS ## Amazon AWS
This is a step-by-step guide for deploying a Strapi project to [Amazon AWS EC2](https://aws.amazon.com/ec2/). This guide will connect to an [Amazon AWS RDS](https://aws.amazon.com/rds/) for managing and hosting the database. Optionally, this guide will show you how to connect host and serve images on [Amazon AWS S3](https://aws.amazon.com/s3/). Prior to starting this guide, you should have created a [Strapi project](../getting-started/quick-start.md), to use for deploying on AWS. This is a step-by-step guide for deploying a Strapi project to [Amazon AWS EC2](https://aws.amazon.com/ec2/). This guide will connect to an [Amazon AWS RDS](https://aws.amazon.com/rds/) for managing and hosting the database. Optionally, this guide will show you how to connect host and serve images on [Amazon AWS S3](https://aws.amazon.com/s3/). Prior to starting this guide, you should have created a [Strapi project](../getting-started/quick-start.md), to use for deploying on AWS.
@ -995,7 +1001,7 @@ npm install pm2@latest -g
### The ecosystem.config.js file ### The ecosystem.config.js file
- You will need to configure an `ecosystem.config.js` file. This file will manage the **database connection variables** Strapi needs to connect to your database. The `ecosystem.config.js` will also be used by `pm2` to restart your project whenever any changes are made to files within the Strapi file system itself (such as when an update arrives from GitHub). You can read more about this file [here](https://pm2.io/doc/en/runtime/guide/development-tools/). - You will need to configure an `ecosystem.config.js` file. This file will manage the **database connection variables** Strapi needs to connect to your database. The `ecosystem.config.js` will also be used by `pm2` to restart your project whenever any changes are made to files within the Strapi file system itself (such as when an update arrives from GitHub). You can read more about this file [here](https://pm2.keymetrics.io/docs/usage/pm2-doc-single-page/).
- You will need to open your `nano` editor and then `copy/paste` the following: - You will need to open your `nano` editor and then `copy/paste` the following:

View File

@ -9,6 +9,7 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vuepress/plugin-medium-zoom": "^1.2.0", "@vuepress/plugin-medium-zoom": "^1.2.0",
"@vuepress/plugin-google-analytics": "^1.2.0",
"vuepress": "^1.2.0", "vuepress": "^1.2.0",
"vuepress-plugin-element-tabs": "^0.1.8" "vuepress-plugin-element-tabs": "^0.1.8"
} }

View File

@ -886,6 +886,11 @@
dependencies: dependencies:
lodash.debounce "^4.0.8" lodash.debounce "^4.0.8"
"@vuepress/plugin-google-analytics@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@vuepress/plugin-google-analytics/-/plugin-google-analytics-1.2.0.tgz#54555fd14f01a032c5acff04ecbbe0911577d7d0"
integrity sha512-0zol5D4Efb5GKel7ADO/s65MLtKSLnOEGkeWzuipkWomSQPzP7TJ3+/RcYBnGdyBFHd1BSpTUHGK0b/IGwM3UA==
"@vuepress/plugin-last-updated@^1.2.0": "@vuepress/plugin-last-updated@^1.2.0":
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/@vuepress/plugin-last-updated/-/plugin-last-updated-1.2.0.tgz#7b34065b793848b0482a222b7a6f1b7df3668cdc" resolved "https://registry.yarnpkg.com/@vuepress/plugin-last-updated/-/plugin-last-updated-1.2.0.tgz#7b34065b793848b0482a222b7a6f1b7df3668cdc"

View File

@ -1,7 +1,7 @@
{ {
"name": "getstarted", "name": "getstarted",
"private": true, "private": true,
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "A Strapi application.", "description": "A Strapi application.",
"scripts": { "scripts": {
"develop": "strapi develop", "develop": "strapi develop",
@ -15,22 +15,22 @@
"mysql": "^2.17.1", "mysql": "^2.17.1",
"pg": "^7.10.0", "pg": "^7.10.0",
"sqlite3": "^4.0.6", "sqlite3": "^4.0.6",
"strapi": "3.0.0-beta.17.6", "strapi": "3.0.0-beta.17.8",
"strapi-admin": "3.0.0-beta.17.6", "strapi-admin": "3.0.0-beta.17.8",
"strapi-hook-bookshelf": "3.0.0-beta.17.6", "strapi-hook-bookshelf": "3.0.0-beta.17.8",
"strapi-hook-knex": "3.0.0-beta.17.6", "strapi-hook-knex": "3.0.0-beta.17.8",
"strapi-hook-mongoose": "3.0.0-beta.17.6", "strapi-hook-mongoose": "3.0.0-beta.17.8",
"strapi-middleware-views": "3.0.0-beta.17.6", "strapi-middleware-views": "3.0.0-beta.17.8",
"strapi-plugin-content-manager": "3.0.0-beta.17.6", "strapi-plugin-content-manager": "3.0.0-beta.17.8",
"strapi-plugin-content-type-builder": "3.0.0-beta.17.6", "strapi-plugin-content-type-builder": "3.0.0-beta.17.8",
"strapi-plugin-documentation": "3.0.0-beta.17.6", "strapi-plugin-documentation": "3.0.0-beta.17.8",
"strapi-plugin-email": "3.0.0-beta.17.6", "strapi-plugin-email": "3.0.0-beta.17.8",
"strapi-plugin-graphql": "3.0.0-beta.17.6", "strapi-plugin-graphql": "3.0.0-beta.17.8",
"strapi-plugin-upload": "3.0.0-beta.17.6", "strapi-plugin-upload": "3.0.0-beta.17.8",
"strapi-plugin-users-permissions": "3.0.0-beta.17.6", "strapi-plugin-users-permissions": "3.0.0-beta.17.8",
"strapi-provider-email-mailgun": "3.0.0-beta.17.6", "strapi-provider-email-mailgun": "3.0.0-beta.17.8",
"strapi-provider-upload-aws-s3": "3.0.0-beta.17.6", "strapi-provider-upload-aws-s3": "3.0.0-beta.17.8",
"strapi-utils": "3.0.0-beta.17.6" "strapi-utils": "3.0.0-beta.17.8"
}, },
"strapi": { "strapi": {
"uuid": "getstarted" "uuid": "getstarted"

View File

@ -1,5 +1,5 @@
{ {
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"packages": [ "packages": [
"packages/*", "packages/*",
"examples/*" "examples/*"

View File

@ -1,6 +1,6 @@
{ {
"name": "create-strapi-app", "name": "create-strapi-app",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Generate a new Strapi application.", "description": "Generate a new Strapi application.",
"license": "MIT", "license": "MIT",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
@ -21,7 +21,7 @@
], ],
"dependencies": { "dependencies": {
"commander": "^2.20.0", "commander": "^2.20.0",
"strapi-generate-new": "3.0.0-beta.17.6" "strapi-generate-new": "3.0.0-beta.17.8"
}, },
"scripts": { "scripts": {
"test": "echo \"no tests yet\"" "test": "echo \"no tests yet\""

View File

@ -1,47 +1,47 @@
{ {
"Analytics": "Аналитика", "Analytics": "Аналитика",
"Content Manager": "Редактор контента", "Content Manager": "Редактор контента",
"Content Type Builder": "Типы Контента", "Content Type Builder": "Конструктор типов контента",
"Documentation": "Документация", "Documentation": "Документация",
"Email": "Email", "Email": "E-mail",
"Files Upload": "Загрузка файлов", "Files Upload": "Загрузка файлов",
"HomePage.notification.newsLetter.success": "Успешная подписка на рассылку новостей", "HomePage.notification.newsLetter.success": "Успешная подписка на новостную рассылку",
"New entry": "Новая запись", "New entry": "Новая запись",
"Password": "Пароль", "Password": "Пароль",
"Provider": "Провайдер", "Provider": "Провайдер",
"ResetPasswordToken": "Сбросить токен пароля", "ResetPasswordToken": "Сброс токена пароля",
"Role": "Роль", "Role": "Роль",
"Roles & Permissions": "Роли и доступы", "Roles & Permissions": "Роли и доступы",
"Settings Manager": "Менеджер Настроек", "Settings Manager": "Менеджер Настроек",
"Username": "Имя пользователя", "Username": "Имя пользователя",
"Users": "Пользователи", "Users": "Пользователи",
"Users & Permissions": "Пользователи & Доступы", "Users & Permissions": "Пользователи и доступы",
"app.components.BlockLink.code": "Примеры кода", "app.components.BlockLink.code": "Примеры кода",
"app.components.BlockLink.code.content": "Обучайтесь на реальных проектах, разработанных в сообществе.", "app.components.BlockLink.code.content": "Обучайтесь на реальных проектах, разработанных в сообществе.",
"app.components.BlockLink.documentation": "Прочитать документацию", "app.components.BlockLink.documentation": "Читать документацию",
"app.components.BlockLink.documentation.content": "Ознакомьтесь с концепциями, справочниками и обучающими материалами.", "app.components.BlockLink.documentation.content": "Ознакомьтесь с концепциями, справочниками и обучающими материалами.",
"app.components.Button.cancel": "Отменить", "app.components.Button.cancel": "Отменить",
"app.components.Button.save": "Сохранить", "app.components.Button.save": "Сохранить",
"app.components.ComingSoonPage.comingSoon": "Скоро", "app.components.ComingSoonPage.comingSoon": "Скоро",
"app.components.ComingSoonPage.featuresNotAvailable": "Этот функционал все еще находится в стадии активной разработки.", "app.components.ComingSoonPage.featuresNotAvailable": "Этот функционал все еще находится в активной разработке.",
"app.components.DownloadInfo.download": "Выполняется загрузка...", "app.components.DownloadInfo.download": "Выполняется загрузка...",
"app.components.DownloadInfo.text": "Это может занять около минуты. Спасибо за ваше терпение.", "app.components.DownloadInfo.text": "Это может занять около минуты. Спасибо за ваше терпение.",
"app.components.EmptyAttributes.title": "Пока нет полей", "app.components.EmptyAttributes.title": "Пока нет полей",
"app.components.HomePage.button.blog": "СМОТРИТЕ БОЛЬШЕ В БЛОГЕ", "app.components.HomePage.button.blog": "СМОТРИТЕ БОЛЬШЕ В БЛОГЕ",
"app.components.HomePage.button.quickStart": "ОЗНАКОМИТЬСЯ С РУКОВОДСТВОМ ПО БЫСТРОМУ СТАРТУ", "app.components.HomePage.button.quickStart": "ОЗНАКОМИТЬСЯ С РУКОВОДСТВОМ ПО БЫСТРОМУ СТАРТУ",
"app.components.HomePage.community": "Найдите сообщество в интернете", "app.components.HomePage.community": "Найдите сообщество в интернете",
"app.components.HomePage.community.content": "Обсуждайте с членами команды и разработчиками в разных каналах", "app.components.HomePage.community.content": "Обсуждайте с членами команды и разработчиками в разных каналах.",
"app.components.HomePage.create": "Создайте ваш первый Тип Контента", "app.components.HomePage.create": "Создайте ваш первый Тип Контента",
"app.components.HomePage.createBlock.content.first": " ", "app.components.HomePage.createBlock.content.first": " ",
"app.components.HomePage.createBlock.content.second": " — плагин, который поможет вам определить структуру ваших данных. Если вы новичок, мы настоятельно рекомендуем вам изучить наше ", "app.components.HomePage.createBlock.content.second": " — плагин, который поможет вам определить структуру ваших моделей данных. Если вы новичок, мы настоятельно рекомендуем вам изучить наше ",
"app.components.HomePage.createBlock.content.tutorial": " руководство.", "app.components.HomePage.createBlock.content.tutorial": " руководство.",
"app.components.HomePage.cta": "ПОДПИСАТЬСЯ", "app.components.HomePage.cta": "ПОДТВЕРДИТЬ",
"app.components.HomePage.newsLetter": "Подпишитесь на рассылку, чтобы быть в курсе новостей Strapi", "app.components.HomePage.newsLetter": "Подпишитесь на рассылку, чтобы быть в курсе новостей Strapi",
"app.components.HomePage.support": "ПОДДЕРЖИТЕ НАС", "app.components.HomePage.support": "ПОДДЕРЖИТЕ НАС",
"app.components.HomePage.support.content": "Покупая футболку, вы помогаете нам продолжать работу над проектом и предоставлять вам наилучшее из возможных решений!", "app.components.HomePage.support.content": "Покупая футболку, вы помогаете нам продолжать работу над проектом и предоставлять вам наилучшее из возможных решений!",
"app.components.HomePage.support.link": "ЗАКАЗАТЬ ФУТБОЛКУ СЕЙЧАС", "app.components.HomePage.support.link": "ЗАКАЗАТЬ ФУТБОЛКУ СЕЙЧАС",
"app.components.HomePage.welcome": "Добро пожаловать!", "app.components.HomePage.welcome": "Добро пожаловать на борт!",
"app.components.HomePage.welcome.again": "Добро пожаловать, ", "app.components.HomePage.welcome.again": "Добро пожаловать ",
"app.components.HomePage.welcomeBlock.content": "Мы рады, что вы присоединились к сообществу. Нам необходима обратная связь для развития проекта, поэтому не стесняйтесь писать нам в ", "app.components.HomePage.welcomeBlock.content": "Мы рады, что вы присоединились к сообществу. Нам необходима обратная связь для развития проекта, поэтому не стесняйтесь писать нам в ",
"app.components.HomePage.welcomeBlock.content.again": "Надеемся, что вы делаете успехи в вашем проекте... Следите за последними новостями Strapi. Мы стараемся изо всех сил, чтобы улучшить продукт, основываясь на ваших пожеланиях.", "app.components.HomePage.welcomeBlock.content.again": "Надеемся, что вы делаете успехи в вашем проекте... Следите за последними новостями Strapi. Мы стараемся изо всех сил, чтобы улучшить продукт, основываясь на ваших пожеланиях.",
"app.components.HomePage.welcomeBlock.content.issues": "проблемах.", "app.components.HomePage.welcomeBlock.content.issues": "проблемах.",
@ -50,14 +50,14 @@
"app.components.ImgPreview.hint.browse": "выберите", "app.components.ImgPreview.hint.browse": "выберите",
"app.components.InputFile.newFile": "Добавить новый файл", "app.components.InputFile.newFile": "Добавить новый файл",
"app.components.InputFileDetails.open": "Открыть в новой вкладке", "app.components.InputFileDetails.open": "Открыть в новой вкладке",
"app.components.InputFileDetails.originalName": "Первоначальное название:", "app.components.InputFileDetails.originalName": "Оригинальное название:",
"app.components.InputFileDetails.remove": "Удалить этот файл", "app.components.InputFileDetails.remove": "Удалить этот файл",
"app.components.InputFileDetails.size": "Размер:", "app.components.InputFileDetails.size": "Размер:",
"app.components.InstallPluginPage.Download.title": "Загрузка...", "app.components.InstallPluginPage.Download.title": "Загрузка...",
"app.components.InstallPluginPage.Download.description": "Для загрузки и установки плагина может потребоваться несколько секунд.", "app.components.InstallPluginPage.Download.description": "Для загрузки и установки плагина может потребоваться несколько секунд.",
"app.components.InstallPluginPage.InputSearch.label": " ", "app.components.InstallPluginPage.InputSearch.label": " ",
"app.components.InstallPluginPage.InputSearch.placeholder": "Искать плагин... (ex: authentication)", "app.components.InstallPluginPage.InputSearch.placeholder": "Поиск плагина... (например: аутентификация)",
"app.components.InstallPluginPage.description": "Расширяйте ваше приложение без усилий.", "app.components.InstallPluginPage.description": "Расширяйте ваше приложение без особых усилий.",
"app.components.InstallPluginPage.helmet": "Магазин - Плагины", "app.components.InstallPluginPage.helmet": "Магазин - Плагины",
"app.components.InstallPluginPage.plugin.support-us.description": "Поддержите нас, купив футболку Strapi. Это поможет нам продолжать работу над проектом, чтобы предоставить вам наилучшее из возможных решений!", "app.components.InstallPluginPage.plugin.support-us.description": "Поддержите нас, купив футболку Strapi. Это поможет нам продолжать работу над проектом, чтобы предоставить вам наилучшее из возможных решений!",
"app.components.InstallPluginPage.title": "Магазин - Плагины", "app.components.InstallPluginPage.title": "Магазин - Плагины",
@ -65,9 +65,9 @@
"app.components.InstallPluginPopup.navLink.avis": "avis", "app.components.InstallPluginPopup.navLink.avis": "avis",
"app.components.InstallPluginPopup.navLink.changelog": "журнал изменений", "app.components.InstallPluginPopup.navLink.changelog": "журнал изменений",
"app.components.InstallPluginPopup.navLink.description": "Описание", "app.components.InstallPluginPopup.navLink.description": "Описание",
"app.components.InstallPluginPopup.navLink.faq": "faq", "app.components.InstallPluginPopup.navLink.faq": "ФАК",
"app.components.InstallPluginPopup.navLink.screenshots": "Скриншоты", "app.components.InstallPluginPopup.navLink.screenshots": "Скриншоты",
"app.components.InstallPluginPopup.noDescription": "Нет описания", "app.components.InstallPluginPopup.noDescription": "Нет доступного описания",
"app.components.LeftMenuFooter.documentation": "Документация", "app.components.LeftMenuFooter.documentation": "Документация",
"app.components.LeftMenuFooter.help": "Помощь", "app.components.LeftMenuFooter.help": "Помощь",
"app.components.LeftMenuFooter.poweredBy": "Работает на ", "app.components.LeftMenuFooter.poweredBy": "Работает на ",
@ -77,7 +77,7 @@
"app.components.LeftMenuLinkContainer.listPlugins": "Плагины", "app.components.LeftMenuLinkContainer.listPlugins": "Плагины",
"app.components.LeftMenuLinkContainer.noPluginsInstalled": "Нет установленных плагинов", "app.components.LeftMenuLinkContainer.noPluginsInstalled": "Нет установленных плагинов",
"app.components.LeftMenuLinkContainer.plugins": "Плагины", "app.components.LeftMenuLinkContainer.plugins": "Плагины",
"app.components.ListPluginsPage.description": "Список установленных плагинов.", "app.components.ListPluginsPage.description": "Список установленных плагинов в проекте.",
"app.components.ListPluginsPage.helmet.title": "Список плагинов", "app.components.ListPluginsPage.helmet.title": "Список плагинов",
"app.components.ListPluginsPage.title": "Плагины", "app.components.ListPluginsPage.title": "Плагины",
"app.components.Logout.admin": "Управлять администраторами", "app.components.Logout.admin": "Управлять администраторами",
@ -94,8 +94,8 @@
"app.components.PluginCard.compatible": "Совместимо с вашим приложением", "app.components.PluginCard.compatible": "Совместимо с вашим приложением",
"app.components.PluginCard.compatibleCommunity": "Совместимо с сообществом", "app.components.PluginCard.compatibleCommunity": "Совместимо с сообществом",
"app.components.PluginCard.more-details": "Больше деталей", "app.components.PluginCard.more-details": "Больше деталей",
"app.components.PluginCard.PopUpWarning.install.impossible.autoReload.needed": "Функция автоматической перезагрузки должна быть отключена. Пожалуйста, запустите ваше приложение с помощью `yarn develop`.", "app.components.PluginCard.PopUpWarning.install.impossible.autoReload.needed": "Функция autoReload (автоматической перезагрузки) должна быть отключена. Пожалуйста, запустите ваше приложение с помощью `yarn develop`.",
"app.components.PluginCard.PopUpWarning.install.impossible.environment": "В целях безопасности плагин может быть загружен только в develop-окружении.", "app.components.PluginCard.PopUpWarning.install.impossible.environment": "В целях безопасности плагин может быть загружен только в среде разработки.",
"app.components.PluginCard.PopUpWarning.install.impossible.confirm": "Я понимаю!", "app.components.PluginCard.PopUpWarning.install.impossible.confirm": "Я понимаю!",
"app.components.PluginCard.PopUpWarning.install.impossible.title": "Загрузка невозможна", "app.components.PluginCard.PopUpWarning.install.impossible.title": "Загрузка невозможна",
"app.components.PluginCard.price.free": "Бесплатно", "app.components.PluginCard.price.free": "Бесплатно",
@ -104,7 +104,7 @@
"app.components.listPlugins.title.none": "Нет установленных плагинов", "app.components.listPlugins.title.none": "Нет установленных плагинов",
"app.components.listPlugins.title.plural": "{number} плагинов установлено", "app.components.listPlugins.title.plural": "{number} плагинов установлено",
"app.components.listPlugins.title.singular": "{number} плагин установлен", "app.components.listPlugins.title.singular": "{number} плагин установлен",
"app.components.listPluginsPage.deletePlugin.error": "Возникла ошибка при установке плагина", "app.components.listPluginsPage.deletePlugin.error": "Произошла ошибка при удалении плагина",
"app.utils.SelectOption.defaultMessage": " ", "app.utils.SelectOption.defaultMessage": " ",
"app.utils.defaultMessage": " ", "app.utils.defaultMessage": " ",
"app.utils.placeholder.defaultMessage": " ", "app.utils.placeholder.defaultMessage": " ",
@ -118,23 +118,24 @@
"components.Input.error.custom-error": "{errorMessage} ", "components.Input.error.custom-error": "{errorMessage} ",
"components.Input.error.validation.email": "Это не адрес электронной почты", "components.Input.error.validation.email": "Это не адрес электронной почты",
"components.Input.error.validation.json": "Не соответствует JSON формату", "components.Input.error.validation.json": "Не соответствует JSON формату",
"components.Input.error.validation.max": "Слишком большое.", "components.Input.error.validation.max": "Значение слишком большое.",
"components.Input.error.validation.maxLength": "Слишком длинное.", "components.Input.error.validation.maxLength": "Значение слишком длинное.",
"components.Input.error.validation.min": "Слишком маленькое.", "components.Input.error.validation.min": "Значение слишком маленькое.",
"components.Input.error.validation.minLength": "Слишком короткое.", "components.Input.error.validation.minLength": "Значение слишком короткое.",
"components.Input.error.validation.minSupMax": "Не может быть выше", "components.Input.error.validation.minSupMax": "Не может быть выше",
"components.Input.error.validation.regex": "Не соответствует регулярному выражению.", "components.Input.error.validation.regex": "Значение не соответствует регулярному выражению.",
"components.Input.error.validation.required": "Необходимое поле для заполнения.", "components.Input.error.validation.required": "Обязательное значение.",
"components.InputSelect.option.placeholder": "Выберите здесь",
"components.ListRow.empty": "Нет данных для отображения.", "components.ListRow.empty": "Нет данных для отображения.",
"components.OverlayBlocker.description": "Вы воспользовались функционалом, который требует перезапуска сервера. Пожалуйста, подождите.", "components.OverlayBlocker.description": "Вы воспользовались функционалом, который требует перезапуска сервера. Пожалуйста, подождите, пока сервер не будет запущен.",
"components.OverlayBlocker.description.serverError": "Сервер должен был перезагрузиться, пожалуйста, проверьте ваши логи в терминале.", "components.OverlayBlocker.description.serverError": "Сервер должен был перезагрузиться, пожалуйста, проверьте ваши логи в терминале.",
"components.OverlayBlocker.title": "Ожидание перезапуска...", "components.OverlayBlocker.title": "Ожидание перезапуска...",
"components.OverlayBlocker.title.serverError": "Перезапуск занимает больше времени, чем ожидалось", "components.OverlayBlocker.title.serverError": "Перезапуск занимает больше времени, чем ожидалось",
"components.PageFooter.select": "записей на странице", "components.PageFooter.select": "записей на странице",
"components.ProductionBlocker.description": "Для безопасности мы должны заблокировать его для других вариантов.", "components.ProductionBlocker.description": "В целях безопасности мы должны отключить этот плагин в других средах.",
"components.ProductionBlocker.header": "Этот плагин доступен только на стадии разработки.", "components.ProductionBlocker.header": "Этот плагин доступен только на стадии разработки.",
"components.Wysiwyg.ToggleMode.markdown": "Переключить в режим markdown", "components.Wysiwyg.ToggleMode.markdown": "Переключиться в режим markdown",
"components.Wysiwyg.ToggleMode.preview": "Переключить в режим предпросмотра", "components.Wysiwyg.ToggleMode.preview": "Переключиться в режим предпросмотра",
"components.Wysiwyg.collapse": "Свернуть", "components.Wysiwyg.collapse": "Свернуть",
"components.Wysiwyg.selectOptions.H1": "Заголовок H1", "components.Wysiwyg.selectOptions.H1": "Заголовок H1",
"components.Wysiwyg.selectOptions.H2": "Заголовок H2", "components.Wysiwyg.selectOptions.H2": "Заголовок H2",
@ -143,7 +144,7 @@
"components.Wysiwyg.selectOptions.H5": "Заголовок H5", "components.Wysiwyg.selectOptions.H5": "Заголовок H5",
"components.Wysiwyg.selectOptions.H6": "Заголовок H6", "components.Wysiwyg.selectOptions.H6": "Заголовок H6",
"components.Wysiwyg.selectOptions.title": "Добавить заголовок", "components.Wysiwyg.selectOptions.title": "Добавить заголовок",
"components.WysiwygBottomControls.charactersIndicators": "букв", "components.WysiwygBottomControls.charactersIndicators": "символов",
"components.WysiwygBottomControls.fullscreen": "Развернуть", "components.WysiwygBottomControls.fullscreen": "Развернуть",
"components.WysiwygBottomControls.uploadFiles": "Перетащите файлы в эту область, вставьте из буфера обмена или {browse}.", "components.WysiwygBottomControls.uploadFiles": "Перетащите файлы в эту область, вставьте из буфера обмена или {browse}.",
"components.WysiwygBottomControls.uploadFiles.browse": "выберите их", "components.WysiwygBottomControls.uploadFiles.browse": "выберите их",
@ -155,31 +156,41 @@
"notification.error.layout": "Не удалось получить макет", "notification.error.layout": "Не удалось получить макет",
"request.error.model.unknown": "Модель данных не существует", "request.error.model.unknown": "Модель данных не существует",
"app.utils.delete": "Удалить", "app.utils.delete": "Удалить",
"HomePage.helmet.title": "Домашняя страница",
"HomePage.welcome.congrats": "Поздравляем!",
"HomePage.welcome.congrats.content": "Вы вошли как первый администратор. Чтобы открыть для себя мощные функции, предоставляемые Strapi,",
"HomePage.welcome.congrats.content.bold": "мы рекомендуем вам создать свой первый тип контента.",
"HomePage.community": "Присоединяйтесь к сообществу",
"HomePage.roadmap": "Смотрите нашу дорожную карту",
"HomePage.greetings": "Привет {name}!",
"Auth.advanced.allow_register": "", "Auth.advanced.allow_register": "",
"Auth.privacy-policy-agreement.terms": "условия",
"Auth.privacy-policy-agreement.policy": "политика конфиденциальности",
"Auth.form.button.forgot-password": "Отправить письмо", "Auth.form.button.forgot-password": "Отправить письмо",
"Auth.form.button.forgot-password.success": "Отправить еще раз", "Auth.form.button.forgot-password.success": "Отправить еще раз",
"Auth.form.button.login": "Войти", "Auth.form.button.login": "Войти",
"Auth.form.button.register": "Готов начать", "Auth.form.button.register": "Готов начать",
"Auth.form.button.register-success": "Отправить еще раз", "Auth.form.button.register-success": "Отправить еще раз",
"Auth.form.button.reset-password": "Сменить пароль", "Auth.form.button.reset-password": "Сменить пароль",
"Auth.form.error.blocked": "Ваш аккаунт заблокирован администратором.", "Auth.form.error.blocked": "Ваш аккаунт был заблокирован администратором.",
"Auth.form.error.code.provide": "Неверный код.", "Auth.form.error.code.provide": "Указан неверный код.",
"Auth.form.error.confirmed": "Адрес электронной почты не подтвержден.", "Auth.form.error.confirmed": "Ваш e-mail не подтвержден.",
"Auth.form.error.email.invalid": "Неправильный адрес электронной почты.", "Auth.form.error.email.invalid": "Неправильный e-mail.",
"Auth.form.error.email.provide": "Укажите свое имя пользователя или адрес электронной почты.", "Auth.form.error.email.provide": "Укажите свое имя пользователя или e-mail.",
"Auth.form.error.email.taken": "Данный email уже используется", "Auth.form.error.email.taken": "Данный e-mail уже используется",
"Auth.form.error.invalid": "Неверный логин или пароль.", "Auth.form.error.invalid": "Неверный логин или пароль.",
"Auth.form.error.noAdminAccess": "У вас нет доступа к панели администрирования.", "Auth.form.error.noAdminAccess": "У вас нет доступа к панели администрирования.",
"Auth.form.error.params.provide": "Неправильные параметры.", "Auth.form.error.params.provide": "Предоставлены неверные параметры.",
"Auth.form.error.password.format": "Пароль не может содержать символ `$` больше трех раз.", "Auth.form.error.password.format": "Пароль не может содержать символ `$` больше трех раз.",
"Auth.form.error.password.local": "Этот пользователь никогда не задавал пароль, пожалуйста, войдите в систему через провайдера, используемого при создании учетной записи.", "Auth.form.error.password.local": "Этот пользователь никогда не задавал пароль, пожалуйста, войдите в систему через провайдера, используемого при создании учетной записи.",
"Auth.form.error.password.matching": "Пароль не соответствует.", "Auth.form.error.password.matching": "Пароль не соответствует.",
"Auth.form.error.password.provide": "Укажите свой пароль.", "Auth.form.error.password.provide": "Укажите свой пароль.",
"Auth.form.error.ratelimit": "Слишком много попыток. Пожалуйста, попробуйте позже.", "Auth.form.error.ratelimit": "Слишком много попыток, повторите через минуту",
"Auth.form.error.user.not-exist": "Этот email не существует.", "Auth.form.error.user.not-exist": "Этот e-mail не существует.",
"Auth.form.error.username.taken": "Имя пользователя уже используется", "Auth.form.error.username.taken": "Имя пользователя уже используется",
"Auth.form.forgot-password.email.label": "Введите ваш email", "Auth.form.forgot-password.email.label": "Введите ваш e-mail",
"Auth.form.forgot-password.email.label.success": "Письмо успешно отправлено", "Auth.form.forgot-password.email.label.success": "Письмо успешно отправлено e-mail",
"Auth.form.forgot-password.email.placeholder": "mysuperemail@gmail.com", "Auth.form.forgot-password.email.placeholder": "mysuperemail@gmail.com",
"Auth.form.header.forgot-password": "strapi", "Auth.form.header.forgot-password": "strapi",
"Auth.form.header.login": "strapi", "Auth.form.header.login": "strapi",
@ -189,17 +200,20 @@
"Auth.form.login.rememberMe.label": "Запомнить меня", "Auth.form.login.rememberMe.label": "Запомнить меня",
"Auth.form.login.username.label": "Имя пользователя", "Auth.form.login.username.label": "Имя пользователя",
"Auth.form.login.username.placeholder": "John Doe", "Auth.form.login.username.placeholder": "John Doe",
"Auth.form.register-success.email.label": "Письмо успешно отправлено", "Auth.form.register-success.email.label": "Письмо успешно отправлено e-mail",
"Auth.form.register-success.email.placeholder": "mysuperemail@gmail.com", "Auth.form.register-success.email.placeholder": "mysuperemail@gmail.com",
"Auth.form.register.confirmPassword.label": "Подтверждение пароля", "Auth.form.register.confirmPassword.label": "Подтверждение пароля",
"Auth.form.register.email.label": "Email", "Auth.form.register.email.label": "E-mail",
"Auth.form.register.email.placeholder": "johndoe@gmail.com", "Auth.form.register.email.placeholder": "johndoe@gmail.com",
"Auth.form.register.news.label": "Держите меня в курсе о новых функциях и предстоящих улучшениях (делая это, вы принимаете {terms} и {policy}).",
"Auth.form.register.password.label": "Пароль", "Auth.form.register.password.label": "Пароль",
"Auth.form.register.username.label": "Имя пользователя", "Auth.form.register.username.label": "Имя пользователя",
"Auth.form.register.username.placeholder": "John Doe", "Auth.form.register.username.placeholder": "John Doe",
"Auth.header.register.description": "Для завершения установки и обеспечения безопасности приложения, создайте вашего первого пользователя (root admin), заполнив форму ниже.", "Auth.header.register.description": "Для завершения установки и обеспечения безопасности приложения, создайте вашего первого пользователя (root admin), заполнив форму ниже.",
"Auth.link.forgot-password": "Забыли пароль?", "Auth.link.forgot-password": "Забыли пароль?",
"Auth.link.ready": "Готовы войти?", "Auth.link.ready": "Готовы войти?",
"components.Input.error.password.noMatch": "Пароль не совпадает" "app.containers.App.notification.error.init": "Произошла ошибка при запросе к API",
"components.Input.error.password.noMatch": "Пароль не совпадает",
"form.button.done": "Выполнено",
"notification.form.error.fields": "Форма содержит некоторые ошибки"
} }

View File

@ -66,6 +66,11 @@ module.exports = {
async installPlugin(ctx) { async installPlugin(ctx) {
try { try {
const { plugin } = ctx.request.body; const { plugin } = ctx.request.body;
if (!/^[A-Za-z0-9_-]+$/.test(plugin)) {
return ctx.badRequest('Invalid plugin name');
}
strapi.reload.isWatching = false; strapi.reload.isWatching = false;
strapi.log.info(`Installing ${plugin}...`); strapi.log.info(`Installing ${plugin}...`);
@ -101,6 +106,11 @@ module.exports = {
async uninstallPlugin(ctx) { async uninstallPlugin(ctx) {
try { try {
const { plugin } = ctx.params; const { plugin } = ctx.params;
if (!/^[A-Za-z0-9_-]+$/.test(plugin)) {
return ctx.badRequest('Invalid plugin name');
}
strapi.reload.isWatching = false; strapi.reload.isWatching = false;
strapi.log.info(`Uninstalling ${plugin}...`); strapi.log.info(`Uninstalling ${plugin}...`);

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-admin", "name": "strapi-admin",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Strapi Admin", "description": "Strapi Admin",
"repository": { "repository": {
"type": "git", "type": "git",
@ -69,8 +69,8 @@
"reselect": "^3.0.1", "reselect": "^3.0.1",
"sanitize.css": "^4.1.0", "sanitize.css": "^4.1.0",
"shelljs": "^0.7.8", "shelljs": "^0.7.8",
"strapi-helper-plugin": "3.0.0-beta.17.6", "strapi-helper-plugin": "3.0.0-beta.17.8",
"strapi-utils": "3.0.0-beta.17.6", "strapi-utils": "3.0.0-beta.17.8",
"style-loader": "^0.23.1", "style-loader": "^0.23.1",
"styled-components": "^4.2.0", "styled-components": "^4.2.0",
"terser-webpack-plugin": "^1.2.3", "terser-webpack-plugin": "^1.2.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-generate-api", "name": "strapi-generate-api",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Generate an API for a Strapi application.", "description": "Generate an API for a Strapi application.",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-generate-controller", "name": "strapi-generate-controller",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Generate a controller for a Strapi API.", "description": "Generate a controller for a Strapi API.",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-generate-model", "name": "strapi-generate-model",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Generate a model for a Strapi API.", "description": "Generate a model for a Strapi API.",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -39,6 +39,7 @@ module.exports = (projectDirectory, cliArguments) => {
strapiVersion: require('../package.json').version, strapiVersion: require('../package.json').version,
debug: cliArguments.debug !== undefined, debug: cliArguments.debug !== undefined,
quick: cliArguments.quickstart !== undefined, quick: cliArguments.quickstart !== undefined,
docker: process.env.DOCKER === 'true',
uuid: uuid(), uuid: uuid(),
deviceId: machineIdSync(), deviceId: machineIdSync(),
tmpPath, tmpPath,
@ -65,6 +66,7 @@ module.exports = (projectDirectory, cliArguments) => {
os_release: os.release(), os_release: os.release(),
strapi_version: scope.strapiVersion, strapi_version: scope.strapiVersion,
node_version: process.version, node_version: process.version,
docker: scope.docker,
}; };
Object.keys(tags).forEach(tag => { Object.keys(tags).forEach(tag => {

View File

@ -70,6 +70,7 @@ function trackError({ scope, error }) {
release: os.release(), release: os.release(),
version: scope.strapiVersion, version: scope.strapiVersion,
nodeVersion: process.version, nodeVersion: process.version,
docker: scope.docker,
}, },
}); });
} catch (err) { } catch (err) {
@ -90,6 +91,7 @@ function trackUsage({ event, scope, error }) {
os_release: os.release(), os_release: os.release(),
node_version: process.version, node_version: process.version,
version: scope.strapiVersion, version: scope.strapiVersion,
docker: scope.docker,
}, },
}); });
} catch (err) { } catch (err) {

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-generate-new", "name": "strapi-generate-new",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Generate a new Strapi application.", "description": "Generate a new Strapi application.",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-generate-plugin", "name": "strapi-generate-plugin",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Generate an plugin for a Strapi application.", "description": "Generate an plugin for a Strapi application.",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-generate-policy", "name": "strapi-generate-policy",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Generate a policy for a Strapi API.", "description": "Generate a policy for a Strapi API.",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-generate-service", "name": "strapi-generate-service",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Generate a service for a Strapi API.", "description": "Generate a service for a Strapi API.",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-generate", "name": "strapi-generate",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Master of ceremonies for the Strapi generators.", "description": "Master of ceremonies for the Strapi generators.",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [
@ -20,7 +20,7 @@
"fs-extra": "^8.0.1", "fs-extra": "^8.0.1",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"reportback": "^2.0.2", "reportback": "^2.0.2",
"strapi-utils": "3.0.0-beta.17.6" "strapi-utils": "3.0.0-beta.17.8"
}, },
"author": { "author": {
"name": "Strapi team", "name": "Strapi team",

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-helper-plugin", "name": "strapi-helper-plugin",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Helper for Strapi plugins development", "description": "Helper for Strapi plugins development",
"files": [ "files": [
"dist" "dist"

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-hook-bookshelf", "name": "strapi-hook-bookshelf",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Bookshelf hook for the Strapi framework", "description": "Bookshelf hook for the Strapi framework",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [
@ -22,8 +22,8 @@
"lodash": "^4.17.11", "lodash": "^4.17.11",
"pluralize": "^7.0.0", "pluralize": "^7.0.0",
"rimraf": "^2.6.3", "rimraf": "^2.6.3",
"strapi-hook-knex": "3.0.0-beta.17.6", "strapi-hook-knex": "3.0.0-beta.17.8",
"strapi-utils": "3.0.0-beta.17.6" "strapi-utils": "3.0.0-beta.17.8"
}, },
"strapi": { "strapi": {
"dependencies": [ "dependencies": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-hook-ejs", "name": "strapi-hook-ejs",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "EJS hook for the Strapi framework", "description": "EJS hook for the Strapi framework",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-hook-knex", "name": "strapi-hook-knex",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Knex hook for the Strapi framework", "description": "Knex hook for the Strapi framework",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-hook-mongoose", "name": "strapi-hook-mongoose",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Mongoose hook for the Strapi framework", "description": "Mongoose hook for the Strapi framework",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [
@ -20,7 +20,7 @@
"mongoose-float": "^1.0.4", "mongoose-float": "^1.0.4",
"mongoose-long": "^0.2.1", "mongoose-long": "^0.2.1",
"pluralize": "^7.0.0", "pluralize": "^7.0.0",
"strapi-utils": "3.0.0-beta.17.6" "strapi-utils": "3.0.0-beta.17.8"
}, },
"author": { "author": {
"email": "hi@strapi.io", "email": "hi@strapi.io",

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-hook-redis", "name": "strapi-hook-redis",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Redis hook for the Strapi framework", "description": "Redis hook for the Strapi framework",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [
@ -19,7 +19,7 @@
"lodash": "^4.17.11", "lodash": "^4.17.11",
"rimraf": "^2.6.3", "rimraf": "^2.6.3",
"stack-trace": "0.0.10", "stack-trace": "0.0.10",
"strapi-utils": "3.0.0-beta.17.6" "strapi-utils": "3.0.0-beta.17.8"
}, },
"author": { "author": {
"email": "hi@strapi.io", "email": "hi@strapi.io",

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-middleware-views", "name": "strapi-middleware-views",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Views middleware to enable server-side rendering for the Strapi framework", "description": "Views middleware to enable server-side rendering for the Strapi framework",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-content-manager", "name": "strapi-plugin-content-manager",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "A powerful UI to easily manage your data.", "description": "A powerful UI to easily manage your data.",
"strapi": { "strapi": {
"name": "Content Manager", "name": "Content Manager",
@ -32,8 +32,8 @@
"redux-immutable": "^4.0.0", "redux-immutable": "^4.0.0",
"reselect": "^3.0.1", "reselect": "^3.0.1",
"showdown": "^1.9.0", "showdown": "^1.9.0",
"strapi-helper-plugin": "3.0.0-beta.17.6", "strapi-helper-plugin": "3.0.0-beta.17.8",
"strapi-utils": "3.0.0-beta.17.6", "strapi-utils": "3.0.0-beta.17.8",
"styled-components": "^4.2.0", "styled-components": "^4.2.0",
"yup": "^0.27.0" "yup": "^0.27.0"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-content-type-builder", "name": "strapi-plugin-content-type-builder",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Strapi plugin to create content type (API).", "description": "Strapi plugin to create content type (API).",
"strapi": { "strapi": {
"name": "Content Type Builder", "name": "Content Type Builder",
@ -29,9 +29,9 @@
"redux": "^4.0.1", "redux": "^4.0.1",
"redux-immutable": "^4.0.0", "redux-immutable": "^4.0.0",
"reselect": "^3.0.1", "reselect": "^3.0.1",
"strapi-generate": "3.0.0-beta.17.6", "strapi-generate": "3.0.0-beta.17.8",
"strapi-generate-api": "3.0.0-beta.17.6", "strapi-generate-api": "3.0.0-beta.17.8",
"strapi-helper-plugin": "3.0.0-beta.17.6", "strapi-helper-plugin": "3.0.0-beta.17.8",
"yup": "^0.27.0" "yup": "^0.27.0"
}, },
"author": { "author": {

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-documentation", "name": "strapi-plugin-documentation",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "This is the description of the plugin.", "description": "This is the description of the plugin.",
"strapi": { "strapi": {
"name": "Documentation", "name": "Documentation",
@ -32,7 +32,7 @@
"redux": "^4.0.1", "redux": "^4.0.1",
"redux-immutable": "^4.0.0", "redux-immutable": "^4.0.0",
"reselect": "^4.0.0", "reselect": "^4.0.0",
"strapi-helper-plugin": "3.0.0-beta.17.6", "strapi-helper-plugin": "3.0.0-beta.17.8",
"swagger-ui-dist": "3.22.1" "swagger-ui-dist": "3.22.1"
}, },
"author": { "author": {

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-email", "name": "strapi-plugin-email",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "This is the description of the plugin.", "description": "This is the description of the plugin.",
"strapi": { "strapi": {
"name": "Email", "name": "Email",
@ -12,13 +12,13 @@
"test": "echo \"no tests yet\"" "test": "echo \"no tests yet\""
}, },
"dependencies": { "dependencies": {
"strapi-provider-email-sendmail": "3.0.0-beta.17.6", "strapi-provider-email-sendmail": "3.0.0-beta.17.8",
"strapi-utils": "3.0.0-beta.17.6" "strapi-utils": "3.0.0-beta.17.8"
}, },
"devDependencies": { "devDependencies": {
"react-copy-to-clipboard": "5.0.1", "react-copy-to-clipboard": "5.0.1",
"rimraf": "^2.6.3", "rimraf": "^2.6.3",
"strapi-helper-plugin": "3.0.0-beta.17.6" "strapi-helper-plugin": "3.0.0-beta.17.8"
}, },
"author": { "author": {
"name": "Strapi team", "name": "Strapi team",

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-graphql", "name": "strapi-plugin-graphql",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "This is the description of the plugin.", "description": "This is the description of the plugin.",
"strapi": { "strapi": {
"name": "graphql", "name": "graphql",
@ -23,7 +23,7 @@
"graphql-type-long": "^0.1.1", "graphql-type-long": "^0.1.1",
"koa-compose": "^4.1.0", "koa-compose": "^4.1.0",
"pluralize": "^7.0.0", "pluralize": "^7.0.0",
"strapi-utils": "3.0.0-beta.17.6" "strapi-utils": "3.0.0-beta.17.8"
}, },
"devDependencies": { "devDependencies": {
"cross-env": "^5.2.0", "cross-env": "^5.2.0",

View File

@ -7,6 +7,8 @@
const _ = require('lodash'); const _ = require('lodash');
const pluralize = require('pluralize'); const pluralize = require('pluralize');
const { convertRestQueryParams, buildQuery } = require('strapi-utils'); const { convertRestQueryParams, buildQuery } = require('strapi-utils');
const policyUtils = require('strapi-utils').policy;
const compose = require('koa-compose');
const Schema = require('./Schema.js'); const Schema = require('./Schema.js');
const GraphQLQuery = require('./Query.js'); const GraphQLQuery = require('./Query.js');
@ -470,7 +472,13 @@ const formatConnectionAggregator = function(fields, model, modelName) {
* } * }
* *
*/ */
const formatModelConnectionsGQL = function(fields, model, name, modelResolver) { const formatModelConnectionsGQL = function(
fields,
model,
name,
modelResolver,
plugin
) {
const { globalId } = model; const { globalId } = model;
const connectionGlobalId = `${globalId}Connection`; const connectionGlobalId = `${globalId}Connection`;
@ -501,7 +509,50 @@ const formatModelConnectionsGQL = function(fields, model, name, modelResolver) {
}, },
resolver: { resolver: {
Query: { Query: {
[`${pluralName}Connection`](obj, options, context) { async [`${pluralName}Connection`](obj, options, { context }) {
// need to check
const ctx = Object.assign(_.clone(context), {
request: Object.assign(_.clone(context.request), {
graphql: null,
}),
});
const policiesFn = [
policyUtils.globalPolicy(
undefined,
{
handler: `${name}.find`,
},
undefined,
plugin
),
];
policyUtils.get(
'plugins.users-permissions.permissions',
plugin,
policiesFn,
`GraphQL connection "${name}" `,
name
);
// Execute policies stack.
const policy = await compose(policiesFn)(ctx);
// Policy doesn't always return errors but they update the current context.
if (
_.isError(ctx.request.graphql) ||
_.get(ctx.request.graphql, 'isBoom')
) {
return ctx.request.graphql;
}
// Something went wrong in the policy.
if (policy) {
return policy;
}
return options; return options;
}, },
}, },

View File

@ -167,7 +167,8 @@ const buildAssocResolvers = (model, name, { plugin }) => {
}; };
if ( if (
((association.nature === 'manyToMany' && association.dominant) || ((association.nature === 'manyToMany' &&
association.dominant) ||
association.nature === 'manyWay') && association.nature === 'manyWay') &&
_.has(obj, association.alias) // if populated _.has(obj, association.alias) // if populated
) { ) {
@ -181,7 +182,11 @@ const buildAssocResolvers = (model, name, { plugin }) => {
: [] : []
); );
} else { } else {
_.set(queryOpts, ['query', association.via], obj[ref.primaryKey]); _.set(
queryOpts,
['query', association.via],
obj[ref.primaryKey]
);
} }
} }
@ -190,12 +195,16 @@ const buildAssocResolvers = (model, name, { plugin }) => {
: params.model; : params.model;
return association.model return association.model
? strapi.plugins.graphql.services.loaders.loaders[loaderName].load({ ? strapi.plugins.graphql.services.loaders.loaders[
loaderName
].load({
params, params,
options: queryOpts, options: queryOpts,
single: true, single: true,
}) })
: strapi.plugins.graphql.services.loaders.loaders[loaderName].load({ : strapi.plugins.graphql.services.loaders.loaders[
loaderName
].load({
options: queryOpts, options: queryOpts,
association, association,
}); });
@ -475,7 +484,8 @@ const buildShadowCRUD = (models, plugin) => {
attributes, attributes,
model, model,
name, name,
queries.plural queries.plural,
plugin
); );
if (modelAggregator) { if (modelAggregator) {
acc.definition += modelAggregator.type; acc.definition += modelAggregator.type;

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-upload", "name": "strapi-plugin-upload",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "This is the description of the plugin.", "description": "This is the description of the plugin.",
"strapi": { "strapi": {
"name": "Files Upload", "name": "Files Upload",
@ -23,9 +23,9 @@
"react-router-dom": "^5.0.0", "react-router-dom": "^5.0.0",
"react-transition-group": "^2.5.0", "react-transition-group": "^2.5.0",
"reactstrap": "^5.0.0", "reactstrap": "^5.0.0",
"strapi-helper-plugin": "3.0.0-beta.17.6", "strapi-helper-plugin": "3.0.0-beta.17.8",
"strapi-provider-upload-local": "3.0.0-beta.17.6", "strapi-provider-upload-local": "3.0.0-beta.17.8",
"strapi-utils": "3.0.0-beta.17.6", "strapi-utils": "3.0.0-beta.17.8",
"stream-to-array": "^2.3.0", "stream-to-array": "^2.3.0",
"uuid": "^3.2.1" "uuid": "^3.2.1"
}, },

View File

@ -272,7 +272,22 @@ module.exports = {
}, },
async forgotPassword(ctx) { async forgotPassword(ctx) {
const { email } = ctx.request.body; let { email } = ctx.request.body;
// Check if the provided email is valid or not.
const isEmail = emailRegExp.test(email);
if (isEmail) {
email = email.toLowerCase();
} else {
return ctx.badRequest(
null,
formatError({
id: 'Auth.form.error.email.format',
message: 'Please provide valid email address.',
})
);
}
const pluginStore = await strapi.store({ const pluginStore = await strapi.store({
environment: '', environment: '',
@ -620,7 +635,7 @@ module.exports = {
} }
const user = await strapi.query('user', 'users-permissions').findOne({ const user = await strapi.query('user', 'users-permissions').findOne({
email: params.email email: params.email,
}); });
if (user.confirmed) { if (user.confirmed) {
@ -635,7 +650,9 @@ module.exports = {
_.pick(user.toJSON ? user.toJSON() : user, ['id']) _.pick(user.toJSON ? user.toJSON() : user, ['id'])
); );
const settings = await pluginStore.get({ key: 'email' }).then(storeEmail => { const settings = await pluginStore
.get({ key: 'email' })
.then(storeEmail => {
try { try {
return storeEmail['email_confirmation'].options; return storeEmail['email_confirmation'].options;
} catch (err) { } catch (err) {
@ -643,14 +660,28 @@ module.exports = {
} }
}); });
settings.message = await strapi.plugins['users-permissions'].services.userspermissions.template(settings.message, { settings.message = await strapi.plugins[
'users-permissions'
].services.userspermissions.template(settings.message, {
URL: new URL('/auth/email-confirmation', strapi.config.url).toString(), URL: new URL('/auth/email-confirmation', strapi.config.url).toString(),
USER: _.omit(user.toJSON ? user.toJSON() : user, ['password', 'resetPasswordToken', 'role', 'provider']), USER: _.omit(user.toJSON ? user.toJSON() : user, [
CODE: jwt 'password',
'resetPasswordToken',
'role',
'provider',
]),
CODE: jwt,
}); });
settings.object = await strapi.plugins['users-permissions'].services.userspermissions.template(settings.object, { settings.object = await strapi.plugins[
USER: _.omit(user.toJSON ? user.toJSON() : user, ['password', 'resetPasswordToken', 'role', 'provider']), 'users-permissions'
].services.userspermissions.template(settings.object, {
USER: _.omit(user.toJSON ? user.toJSON() : user, [
'password',
'resetPasswordToken',
'role',
'provider',
]),
}); });
try { try {
@ -663,11 +694,11 @@ module.exports = {
replyTo: settings.response_email, replyTo: settings.response_email,
subject: settings.object, subject: settings.object,
text: settings.message, text: settings.message,
html: settings.message html: settings.message,
}); });
ctx.send({ ctx.send({
email: (user.toJSON ? user.toJSON() : user).email, email: (user.toJSON ? user.toJSON() : user).email,
sent: true sent: true,
}); });
} catch (err) { } catch (err) {
return ctx.badRequest(null, err); return ctx.badRequest(null, err);

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-users-permissions", "name": "strapi-plugin-users-permissions",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Protect your API with a full-authentication process based on JWT", "description": "Protect your API with a full-authentication process based on JWT",
"strapi": { "strapi": {
"name": "Roles & Permissions", "name": "Roles & Permissions",
@ -31,8 +31,8 @@
"reactstrap": "^5.0.0", "reactstrap": "^5.0.0",
"redux-saga": "^0.16.0", "redux-saga": "^0.16.0",
"request": "^2.83.0", "request": "^2.83.0",
"strapi-helper-plugin": "3.0.0-beta.17.6", "strapi-helper-plugin": "3.0.0-beta.17.8",
"strapi-utils": "3.0.0-beta.17.6", "strapi-utils": "3.0.0-beta.17.8",
"uuid": "^3.1.0" "uuid": "^3.1.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -100,12 +100,13 @@ module.exports = {
return await Promise.all(arrayOfPromises); return await Promise.all(arrayOfPromises);
}, },
getPlugins(plugin, lang = 'en') { getPlugins(lang = 'en') {
return new Promise(resolve => { return new Promise(resolve => {
request( request(
{ {
uri: `https://marketplace.strapi.io/plugins?lang=${lang}`, uri: `https://marketplace.strapi.io/plugins?lang=${lang}`,
json: true, json: true,
timeout: 3000,
headers: { headers: {
'cache-control': 'max-age=3600', 'cache-control': 'max-age=3600',
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-provider-email-amazon-ses", "name": "strapi-provider-email-amazon-ses",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Amazon SES provider for strapi email", "description": "Amazon SES provider for strapi email",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-provider-email-mailgun", "name": "strapi-provider-email-mailgun",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Mailgun provider for strapi email plugin", "description": "Mailgun provider for strapi email plugin",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-provider-email-sendgrid", "name": "strapi-provider-email-sendgrid",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Sendgrid provider for strapi email", "description": "Sendgrid provider for strapi email",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-provider-email-sendmail", "name": "strapi-provider-email-sendmail",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Sendmail provider for strapi email", "description": "Sendmail provider for strapi email",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-provider-upload-aws-s3", "name": "strapi-provider-upload-aws-s3",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "AWS S3 provider for strapi upload", "description": "AWS S3 provider for strapi upload",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-provider-upload-cloudinary", "name": "strapi-provider-upload-cloudinary",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Cloudinary provider for strapi upload", "description": "Cloudinary provider for strapi upload",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-provider-upload-local", "name": "strapi-provider-upload-local",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Local provider for strapi upload", "description": "Local provider for strapi upload",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-provider-upload-rackspace", "name": "strapi-provider-upload-rackspace",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Rackspace provider for strapi upload", "description": "Rackspace provider for strapi upload",
"main": "./lib", "main": "./lib",
"keywords": [], "keywords": [],

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-utils", "name": "strapi-utils",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "Shared utilities for the Strapi packages", "description": "Shared utilities for the Strapi packages",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi", "name": "strapi",
"version": "3.0.0-beta.17.6", "version": "3.0.0-beta.17.8",
"description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MongoDB, MySQL, MariaDB, PostgreSQL, SQLite", "description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MongoDB, MySQL, MariaDB, PostgreSQL, SQLite",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"directories": { "directories": {
@ -48,15 +48,15 @@
"resolve-cwd": "^3.0.0", "resolve-cwd": "^3.0.0",
"rimraf": "^2.6.2", "rimraf": "^2.6.2",
"shelljs": "^0.8.3", "shelljs": "^0.8.3",
"strapi-generate": "3.0.0-beta.17.6", "strapi-generate": "3.0.0-beta.17.8",
"strapi-generate-api": "3.0.0-beta.17.6", "strapi-generate-api": "3.0.0-beta.17.8",
"strapi-generate-controller": "3.0.0-beta.17.6", "strapi-generate-controller": "3.0.0-beta.17.8",
"strapi-generate-model": "3.0.0-beta.17.6", "strapi-generate-model": "3.0.0-beta.17.8",
"strapi-generate-new": "3.0.0-beta.17.6", "strapi-generate-new": "3.0.0-beta.17.8",
"strapi-generate-plugin": "3.0.0-beta.17.6", "strapi-generate-plugin": "3.0.0-beta.17.8",
"strapi-generate-policy": "3.0.0-beta.17.6", "strapi-generate-policy": "3.0.0-beta.17.8",
"strapi-generate-service": "3.0.0-beta.17.6", "strapi-generate-service": "3.0.0-beta.17.8",
"strapi-utils": "3.0.0-beta.17.6" "strapi-utils": "3.0.0-beta.17.8"
}, },
"scripts": { "scripts": {
"test": "jest --verbose", "test": "jest --verbose",