Merge branch 'master' of github.com:strapi/strapi into add-cypress

This commit is contained in:
soupette 2018-11-16 17:13:14 +01:00
commit fc7ef829a0
75 changed files with 122 additions and 117 deletions

View File

@ -7,6 +7,16 @@ about: Suggest an idea for this project 💡!
<!-- ⚠️ Make sure to browse the opened and closed issues before submitting your issue. -->
**What is the expected behavior?**
<!--
Please also submit your idea on the Strapi Product Board:
https://portal.productboard.com/strapi/tabs/2-under-consideration/submit-idea
If your request on the product board is accepted this feature request issue will be closed,
but will still accept public discussion.
-->
- [ ] **I have created my request on the Product Board before I submitted this issue**
- [ ] **I have looked at all the other requests on the Product Board before I submitted this issue**
**Please describe your feature request:**

View File

@ -26,11 +26,11 @@ By default Strapi provides a local email system. You might want to send email wi
To install a new provider run:
```
$ npm install strapi-email-sendgrid@alpha --save
$ npm install strapi-provider-email-sendgrid@alpha --save
```
We have two providers available `strapi-email-sendgrid` and `strapi-upload-mailgun`, use the alpha tag to install one of them. Then, visit `/admin/plugins/email/configurations/development` on your web browser and configure the provider.
We have two providers available `strapi-provider-email-sendgrid` and `strapi-provider-upload-mailgun`, use the alpha tag to install one of them. Then, visit `/admin/plugins/email/configurations/development` on your web browser and configure the provider.
If you want to create your own, make sure the name starts with `strapi-email-` (duplicating an existing one will be easier to create), modify the `auth` config object and customize the `send` functions.
If you want to create your own, make sure the name starts with `strapi-provider-email-` (duplicating an existing one will be easier to create), modify the `auth` config object and customize the `send` functions.
Check all community providers available on npmjs.org - [Providers list](https://www.npmjs.com/search?q=strapi-email-)
Check all community providers available on npmjs.org - [Providers list](https://www.npmjs.com/search?q=strapi-provider-email-)

View File

@ -672,15 +672,10 @@ module.exports = {
In this example, the policy `isAuthenticated` located in `./plugins/users-permissions/config/policies/isAuthenticated.js` will be executed first. Then, the `isOwner` policy located in the `Post` API `./api/post/config/policies/isOwner.js`. Next, it will execute the `logging` policy located in `./config/policies/logging.js`. Finally, the resolver will be executed.
<<<<<<< HEAD:docs/3.x.x/guides/graphql.md
::: note
There is no custom resolver in that case, so it will execute the default resolver (Post.find) provided by the Shadow CRUD feature.
:::
=======
The same process is applied to the `createPost` mutation.
> Note: There is no custom resolver in that case, so it will execute the default resolver (Post.find) provided by the Shadow CRUD feature.
>>>>>>> 5705158a4368b144541493e08570ce0e93734ed8:docs/3.x.x/en/guides/graphql.md
### Link a query or mutation to a controller action

View File

@ -17,7 +17,7 @@ Please send the request using multipart/form-data encoding
**Parameters**
- `files`: The file(s) to upload. The value(s) can be a Buffer or Stream.
- `path`: (optional): The folder where the file(s) will be uploaded to (only supported on strapi-upload-aws-s3 now).
- `path`: (optional): The folder where the file(s) will be uploaded to (only supported on strapi-provider-upload-aws-s3 now).
- `refId`: (optional): The ID of the entry which the file(s) will be linked to.
- `ref`: (optional): The name of the model which the file(s) will be linked to (see more below).
- `source`: (optional): The name of the plugin where the model is located.
@ -136,11 +136,11 @@ By default Strapi provides a local file upload system. You might want to upload
To install a new provider run:
```
$ npm install strapi-upload-aws-s3@alpha --save
$ npm install strapi-provider-upload-aws-s3@alpha --save
```
We have two providers available `strapi-upload-aws-s3` and `strapi-upload-cloudinary`, use the alpha tag to install one of them. Then, visit `/admin/plugins/upload/configurations/development` on your web browser and configure the provider.
We have two providers available `strapi-provider-upload-aws-s3` and `strapi-provider-upload-cloudinary`, use the alpha tag to install one of them. Then, visit `/admin/plugins/upload/configurations/development` on your web browser and configure the provider.
If you want to create your own, make sure the name starts with `strapi-upload-` (duplicating an existing one will be easier to create), modify the `auth` config object and customize the `upload` and `delete` functions.
If you want to create your own, make sure the name starts with `strapi-provider-upload-` (duplicating an existing one will be easier to create), modify the `auth` config object and customize the `upload` and `delete` functions.
Check all community providers available on npmjs.org - [Providers list](https://www.npmjs.com/search?q=strapi-upload-)
Check all community providers available on npmjs.org - [Providers list](https://www.npmjs.com/search?q=strapi-provider-upload-)

View File

@ -28,19 +28,19 @@
"app.components.EmptyAttributes.title": "Aún no hay campos",
"app.components.HomePage.button.blog": "VER MÁS EN EL BLOG",
"app.components.HomePage.button.quickStart": "INICIAR EL TUTORIAL DE INICIO RÁPIDO",
"app.components.HomePage.community": "Encuentra la comunidad en la web",
"app.components.HomePage.community.content": "Discutir con los miembros del equipo, colaboradores y desarrolladores en diferentes canales.",
"app.components.HomePage.community": "Encuentre la comunidad en la web",
"app.components.HomePage.community.content": "Hable con los miembros del equipo, colaboradores y desarrolladores en diferentes canales.",
"app.components.HomePage.create": "Crea tu primer Tipo de Contenido",
"app.components.HomePage.createBlock.content.first": "El ",
"app.components.HomePage.createBlock.content.second": " le ayudará a definir la estructura de datos de sus modelos. Si eres nuevo aquí, te recomendamos encarecidamente que sigas nuestro ",
"app.components.HomePage.createBlock.content.second": " le ayudará a definir la estructura de datos de sus modelos. Si es nuevo aquí, le recomendamos encarecidamente que siga nuestro ",
"app.components.HomePage.createBlock.content.tutorial": " ",
"app.components.HomePage.cta": "CONFIRMAR",
"app.components.HomePage.newsLetter": "Suscríbase al boletín de noticias para ponerse en contacto con Strapi",
"app.components.HomePage.support": "APÓYANOS",
"app.components.HomePage.support.content": "¡Al comprar la camiseta, nos permitirá continuar nuestro trabajo en el proyecto para darle la mejor experiencia posible!",
"app.components.HomePage.support.link": "CONSIGUE TU CAMISETA AHORA",
"app.components.HomePage.support.link": "CONSIGA SU CAMISETA AHORA",
"app.components.HomePage.welcome": "¡Bienvenido a bordo!",
"app.components.HomePage.welcome.again": "Bienvenido ",
"app.components.HomePage.welcome.again": "¡Bienvenido ",
"app.components.HomePage.welcomeBlock.content": "Estamos felices de tenerlo como miembro de la comunidad. Estamos constantemente en busca de comentarios así que no dude en enviarnos un DM en ",
"app.components.HomePage.welcomeBlock.content.again": "Esperamos que estés progresando en tu proyecto.... Siéntase libre de leer las últimas novedades sobre Strapi. Estamos dando lo mejor de nosotros mismos para mejorar el producto basándonos en sus comentarios.",
"app.components.HomePage.welcomeBlock.content.issues": "problema.",

View File

@ -8,7 +8,7 @@ const _ = require('lodash');
module.exports = {
fetchAll: async (params, query) => {
const { limit, skip, sort, query : request, queryAttribute, source, page, populate = [] } = query; // eslint-disable-line no-unused-vars
const { limit, skip, sort, query : request, queryAttribute, source, populate = [] } = query;
const filters = strapi.utils.models.convertParams(params.model, query);
const where = !_.isEmpty(request) ? request : filters.where;

View File

@ -8,7 +8,7 @@
"attribute.float": "Número flotante",
"attribute.integer": "Número entero",
"attribute.json": "JSON",
"attribute.media": "Medios",
"attribute.media": "Multimedia",
"attribute.password": "Contraseña",
"attribute.relation": "Relación",
"attribute.string": "Cadena de texto",
@ -28,7 +28,7 @@
"error.validation.minLength": "El valor es demasiado corto.",
"error.validation.minSupMax": "No puede ser superior",
"error.validation.regex": "El valor no coincide con el valor de regex.",
"error.validation.required": "Esta entrada de valor es obligatoria.",
"error.validation.required": "Es requerido un valor para este registro.",
"form.attribute.item.appearance.description": "Si no, el valor será editable a través de un campo textarea básico",
"form.attribute.item.appearance.label": "Mostrar como WYSIWYG",
"form.attribute.item.appearance.name": "Apariencia",
@ -41,7 +41,7 @@
"form.attribute.item.enumeration.graphql.description": "Le permite redefinir el nombre generado por defecto para GraphQL",
"form.attribute.item.enumeration.name": "Nombre",
"form.attribute.item.enumeration.placeholder": "Ej: mañana, mediodía, noche",
"form.attribute.item.enumeration.rules": "Valores (sepárelos con una coma)",
"form.attribute.item.enumeration.rules": "Valores (separados con una coma)",
"form.attribute.item.json.name": "Nombre",
"form.attribute.item.maximum": "Valor máximo",
"form.attribute.item.maximumLength": "Longitud máxima",
@ -50,17 +50,17 @@
"form.attribute.item.minimum": "Valor mínimo",
"form.attribute.item.minimumLength": "Longitud mínima",
"form.attribute.item.number.name": "Nombre",
"form.attribute.item.number.type": "Formato de número",
"form.attribute.item.number.type": "Tipo de número",
"form.attribute.item.number.type.decimal": "decimal (ex: 2.22)",
"form.attribute.item.number.type.float": "flotante (ex: 3.3333333333)",
"form.attribute.item.number.type.integer": "entero (ej: 10)",
"form.attribute.item.requiredField": "Campo obligatorio",
"form.attribute.item.requiredField.description": "No podrá crear una entrada si este campo está vacío",
"form.attribute.item.requiredField.description": "No podrá crear un registro si este campo está vacío",
"form.attribute.item.settings.name": "Ajustes",
"form.attribute.item.string.name": "Nombre",
"form.attribute.item.textarea.name": "Nombre",
"form.attribute.item.uniqueField": "Campo único",
"form.attribute.item.uniqueField.description": "No podrá crear una entrada si hay una entrada existente con contenido idéntico",
"form.attribute.item.uniqueField.description": "No podrá crear un registro si ya existe otro registro con el mismo contenido",
"form.attribute.settings.default": "Valor por defecto",
"form.attribute.settings.default.checkboxLabel": "Ajustar a verdadero",
"form.button.cancel": "Cancelar",
@ -117,18 +117,18 @@
"popUpForm.attributes.json.description": "Datos en formato JSON",
"popUpForm.attributes.json.name": "JSON",
"popUpForm.attributes.media.description": "Imágenes, vídeos, PDFs y otros archivos",
"popUpForm.attributes.media.name": "Medios",
"popUpForm.attributes.media.name": "Multimedia",
"popUpForm.attributes.number.description": "Todo lo que es número",
"popUpForm.attributes.number.name": "Número",
"popUpForm.attributes.password.description": "Contraseña de usuario...",
"popUpForm.attributes.password.name": "Contraseña",
"popUpForm.attributes.relation.description": "Se refiere a un Tipo de Contenido",
"popUpForm.attributes.relation.name": "Relación",
"popUpForm.attributes.string.description": "Títulos, nombres, párrafos, lista de nombres",
"popUpForm.attributes.string.description": "Títulos, nombres, enunciados, lista de nombres",
"popUpForm.attributes.string.name": "Cadena de texto",
"popUpForm.attributes.text.description": "Descripciones, párrafos de texto, artículos ",
"popUpForm.attributes.text.description": "Descripciones, párrafos de texto, artículos",
"popUpForm.attributes.text.name": "Texto",
"popUpForm.choose.attributes.header.title": "Añadir Nuevo Campo",
"popUpForm.choose.attributes.header.title": "Añadir nuevo Campo",
"popUpForm.create": "Añadir Nuevo",
"popUpForm.create.contentType.header.title": "Añadir nuevo Tipo de Contenido",
"popUpForm.edit": "Editar",

View File

@ -26,7 +26,7 @@ module.exports = async cb => {
fs.readdir(path.join(basePath, 'node_modules'), async (err, node_modules) => {
// get all email providers
const emails = _.filter(node_modules, (node_module) => {
return _.startsWith(node_module, ('strapi-email'));
return _.startsWith(node_module, ('strapi-provider-email'));
});
// mount all providers to get configs
@ -51,7 +51,7 @@ module.exports = async cb => {
}
} catch (err) {
strapi.log.error(`Can't load ${config.provider} email provider.`);
strapi.log.warn(`Please install strapi-email-${config.provider} --save in ${path.join(strapi.config.appPath, 'plugins', 'email')} folder.`);
strapi.log.warn(`Please install strapi-provider-email-${config.provider} --save in ${path.join(strapi.config.appPath, 'plugins', 'email')} folder.`);
strapi.stop();
}

View File

@ -22,7 +22,7 @@
"prepublishOnly": "IS_MONOREPO=true npm run build"
},
"dependencies": {
"strapi-email-sendmail": "3.0.0-alpha.14.5"
"strapi-provider-email-sendmail": "3.0.0-alpha.14.5"
},
"devDependencies": {
"react-copy-to-clipboard": "5.0.1",
@ -49,4 +49,4 @@
"npm": ">= 5.0.0"
},
"license": "MIT"
}
}

View File

@ -51,7 +51,7 @@ module.exports = {
const provider = _.find(strapi.plugins.email.config.providers, { provider: config.provider });
if (!provider) {
throw new Error(`The provider package isn't installed. Please run \`npm install strapi-email-${config.provider}\``);
throw new Error(`The provider package isn't installed. Please run \`npm install strapi-provider-email-${config.provider}\``);
}
const actions = provider.init(config);

View File

@ -26,7 +26,7 @@ module.exports = async cb => {
fs.readdir(path.join(basePath, 'node_modules'), async (err, node_modules) => {
// get all upload provider
const uploads = _.filter(node_modules, (node_module) => {
return _.startsWith(node_module, ('strapi-upload'));
return _.startsWith(node_module, ('strapi-provider-upload'));
});
// mount all providers to get configs
@ -53,7 +53,7 @@ module.exports = async cb => {
}
} catch (err) {
strapi.log.error(`Can't load ${config.provider} upload provider.`);
strapi.log.warn(`Please install strapi-upload-${config.provider} --save in ${path.join(strapi.config.appPath, 'plugins', 'upload')} folder.`);
strapi.log.warn(`Please install strapi-provider-upload-${config.provider} --save in ${path.join(strapi.config.appPath, 'plugins', 'upload')} folder.`);
strapi.stop();
}

View File

@ -23,7 +23,7 @@
},
"dependencies": {
"react-copy-to-clipboard": "^5.0.1",
"strapi-upload-local": "3.0.0-alpha.14.5",
"strapi-provider-upload-local": "3.0.0-alpha.14.5",
"stream-to-array": "^2.3.0",
"uuid": "^3.2.1"
},
@ -47,4 +47,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -65,7 +65,7 @@ module.exports = {
if (!provider) {
throw new Error(
`The provider package isn't installed. Please run \`npm install strapi-upload-${
`The provider package isn't installed. Please run \`npm install strapi-provider-upload-${
config.provider
}\``,
);

View File

@ -0,0 +1,11 @@
# strapi-provider-email-amazon-ses
## Resources
- [MIT License](LICENSE.md)
## Links
- [Strapi website](http://strapi.io/)
- [Strapi community on Slack](http://slack.strapi.io)
- [Strapi news on Twitter](https://twitter.com/strapijs)

View File

@ -1,5 +1,5 @@
{
"name": "strapi-email-amazon-ses",
"name": "strapi-provider-email-amazon-ses",
"version": "3.0.0-alpha.14.5",
"description": "Amazon SES provider for strapi email",
"homepage": "http://strapi.io",
@ -16,9 +16,6 @@
"dependencies": {
"node-ses": "^2.1.0"
},
"strapi": {
"isProvider": true
},
"author": {
"email": "nikolay@tsenkov.net",
"name": "Nikolay tsenkov"
@ -42,4 +39,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -1,4 +1,4 @@
# strapi-email-sendmail
# strapi-provider-email-sendmail
## Resources

View File

@ -1,5 +1,5 @@
{
"name": "strapi-email-mailgun",
"name": "strapi-provider-email-mailgun",
"version": "3.0.0-alpha.14.5",
"description": "Mailgun provider for strapi email plugin",
"homepage": "http://strapi.io",
@ -42,4 +42,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -1,4 +1,4 @@
# strapi-email-sendmail
# strapi-provider-email-sendmail
## Resources

View File

@ -1,5 +1,5 @@
{
"name": "strapi-email-sendgrid",
"name": "strapi-provider-email-sendgrid",
"version": "3.0.0-alpha.14.5",
"description": "Sendgrid provider for strapi email",
"homepage": "http://strapi.io",
@ -42,4 +42,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -0,0 +1,11 @@
# strapi-provider-email-sendmail
## Resources
- [MIT License](LICENSE.md)
## Links
- [Strapi website](http://strapi.io/)
- [Strapi community on Slack](http://slack.strapi.io)
- [Strapi news on Twitter](https://twitter.com/strapijs)

View File

@ -1,5 +1,5 @@
{
"name": "strapi-email-sendmail",
"name": "strapi-provider-email-sendmail",
"version": "3.0.0-alpha.14.5",
"description": "Sendmail provider for strapi email",
"homepage": "http://strapi.io",
@ -41,4 +41,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -1,4 +1,4 @@
# strapi-email-amazon-ses
# strapi-provider-upload-local
## Resources

View File

@ -1,5 +1,5 @@
{
"name": "strapi-upload-aws-s3",
"name": "strapi-provider-upload-aws-s3",
"version": "3.0.0-alpha.14.5",
"description": "AWS S3 provider for strapi upload",
"homepage": "http://strapi.io",
@ -43,4 +43,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -0,0 +1,11 @@
# strapi-provider-upload-cloudinary
## Resources
- [MIT License](LICENSE.md)
## Links
- [Strapi website](http://strapi.io/)
- [Strapi community on Slack](http://slack.strapi.io)
- [Strapi news on Twitter](https://twitter.com/strapijs)

View File

@ -1,5 +1,5 @@
{
"name": "strapi-upload-cloudinary",
"name": "strapi-provider-upload-cloudinary",
"version": "3.0.0-alpha.14.5",
"description": "Cloudinary provider for strapi upload",
"homepage": "http://strapi.io",
@ -43,4 +43,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -1,4 +1,4 @@
# strapi-email-sendmail
# strapi-provider-upload-local
## Resources

View File

@ -1,5 +1,5 @@
{
"name": "strapi-upload-local",
"name": "strapi-provider-upload-local",
"version": "3.0.0-alpha.14.5",
"description": "Local provider for strapi upload",
"homepage": "http://strapi.io",
@ -39,4 +39,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -0,0 +1,11 @@
# strapi-provider-upload-rackspace
## Resources
- [MIT License](LICENSE.md)
## Links
- [Strapi website](http://strapi.io/)
- [Strapi community on Slack](http://slack.strapi.io)
- [Strapi news on Twitter](https://twitter.com/strapijs)

View File

@ -1,5 +1,5 @@
{
"name": "strapi-upload-rackspace",
"name": "strapi-provider-upload-rackspace",
"version": "3.0.0-alpha.14.5",
"description": "Rackspace provider for strapi upload",
"main": "./lib",
@ -13,4 +13,4 @@
"pkgcloud": "^1.5.0",
"streamifier": "^0.1.1"
}
}
}

View File

@ -1,11 +0,0 @@
# strapi-upload-local
## Resources
- [MIT License](LICENSE.md)
## Links
- [Strapi website](http://strapi.io/)
- [Strapi community on Slack](http://slack.strapi.io)
- [Strapi news on Twitter](https://twitter.com/strapijs)

View File

@ -1,11 +0,0 @@
# strapi-upload-cloudinary
## Resources
- [MIT License](LICENSE.md)
## Links
- [Strapi website](http://strapi.io/)
- [Strapi community on Slack](http://slack.strapi.io)
- [Strapi news on Twitter](https://twitter.com/strapijs)

View File

@ -1,11 +0,0 @@
# strapi-upload-local
## Resources
- [MIT License](LICENSE.md)
## Links
- [Strapi website](http://strapi.io/)
- [Strapi community on Slack](http://slack.strapi.io)
- [Strapi news on Twitter](https://twitter.com/strapijs)

View File

@ -1,11 +0,0 @@
# strapi-upload-rackspace
## Resources
- [MIT License](LICENSE.md)
## Links
- [Strapi website](http://strapi.io/)
- [Strapi community on Slack](http://slack.strapi.io)
- [Strapi news on Twitter](https://twitter.com/strapijs)

View File

@ -12,9 +12,12 @@ module.exports = async function() {
const configuratePlugin = (acc, current, source, name) => {
switch (source) {
case 'host': {
const host = _.get(this.config.environments[current].server, 'admin.build.host').replace(/\/$/, '') || '/';
let host;
if (!host) {
try {
host = _.get(this.config.environments[current].server, 'admin.build.host').replace(/\/$/, '') || '/';
} catch (e) {
throw new Error("You can't use `remote` as a source without set the `host` configuration.");
}

View File

@ -119,17 +119,17 @@ shell.cd('../strapi-plugin-graphql');
watcher('📦 Linking strapi-plugin-graphql...', 'npm link --no-optional', false);
// Plugin services
shell.cd('../strapi-upload-local');
watcher('📦 Linking strapi-upload-local...', 'npm link --no-optional', false);
shell.cd('../strapi-provider-upload-local');
watcher('📦 Linking strapi-provider-upload-local...', 'npm link --no-optional', false);
shell.cd('../strapi-email-sendmail');
watcher('📦 Linking strapi-email-sendmail...', 'npm link --no-optional', false);
shell.cd('../strapi-provider-email-sendmail');
watcher('📦 Linking strapi-provider-email-sendmail...', 'npm link --no-optional', false);
// Plugins with admin
shell.cd('../strapi-plugin-email');
shell.rm('-f', 'package-lock.json');
watcher('', 'npm install ../strapi-helper-plugin --no-optional');
watcher('', 'npm install ../strapi-email-sendmail --no-optional');
watcher('', 'npm install ../strapi-provider-email-sendmail --no-optional');
watcher('📦 Linking strapi-plugin-email...', 'npm link --no-optional', false);
shell.cd('../strapi-plugin-users-permissions');
@ -151,7 +151,7 @@ watcher('📦 Linking strapi-plugin-settings-manager...', 'npm link --no-option
// Plugins with admin and other plugin's dependencies
shell.cd('../strapi-plugin-upload');
watcher('', 'npm install ../strapi-helper-plugin --no-optional');
watcher('', 'npm install ../strapi-upload-local --no-optional');
watcher('', 'npm install ../strapi-provider-upload-local --no-optional');
shell.rm('-f', 'package-lock.json');
watcher('📦 Linking strapi-plugin-upload...', 'npm link --no-optional', false);