Merge branch 'master' into enhancement/middlewares

This commit is contained in:
Aurélien GEORGET 2018-01-10 11:58:01 +01:00 committed by GitHub
commit f4b5c77822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 140 additions and 72 deletions

View File

@ -82,4 +82,4 @@ For general help using Strapi, please refer to [the official Strapi documentatio
## License
[MIT License](LICENSE.md) Copyright (c) 2015-2017 [Strapi Solutions](http://strapi.io/).
[MIT License](LICENSE.md) Copyright (c) 2015-2018 [Strapi Solutions](http://strapi.io/).

View File

@ -16,8 +16,10 @@
* [Table of contents](concepts/concepts.md)
### Guides
* [Authentification](guides/authentification.md)
* [Configurations](configurations/configurations.md)
* [Controllers](guides/controllers.md)
* [Deployment](guides/deployment.md)
* [Filters](guides/filters.md)
* [Internationalization](guides/i18n.md)
* [Models](guides/models.md)
@ -27,8 +29,6 @@
* [Responses](guides/responses.md)
* [Routing](guides/routing.md)
* [Services](guides/services.md)
* [Authentification](guides/authentification.md)
* [Deployment](guides/deployment.md)
### Plugins
* [Quick start](plugins/quick-start.md)

View File

@ -1,6 +1,6 @@
{
"private": true,
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"devDependencies": {
"assert": "~1.3.0",
"babel-eslint": "^6.1.2",

View File

@ -0,0 +1 @@
<svg width="28" height="26" xmlns="http://www.w3.org/2000/svg"><g fill-rule="nonzero" fill="none"><path d="M8.453 12.772c-1.54.047-2.799.656-3.778 1.824h-1.91c-.779 0-1.435-.192-1.967-.577C.266 13.634 0 13.071 0 12.33c0-3.354.59-5.032 1.768-5.032.057 0 .263.1.62.3.356.2.82.401 1.39.605.57.205 1.135.307 1.696.307.636 0 1.268-.11 1.896-.328a7.106 7.106 0 0 0-.072.94c0 1.322.385 2.538 1.155 3.65zm15.266 9.08c0 1.14-.347 2.04-1.04 2.701-.694.66-1.616.99-2.766.99H7.455c-1.15 0-2.072-.33-2.765-.99-.694-.66-1.04-1.56-1.04-2.701 0-.504.016-.995.049-1.475.033-.48.1-.998.2-1.554s.225-1.072.377-1.547c.152-.475.357-.938.613-1.39.257-.45.551-.836.884-1.154a3.718 3.718 0 0 1 1.219-.763 4.28 4.28 0 0 1 1.59-.285c.094 0 .298.102.612.307.314.204.66.432 1.04.684.38.252.89.48 1.526.684a6.264 6.264 0 0 0 1.924.307c.646 0 1.288-.103 1.925-.307.636-.204 1.145-.432 1.525-.684.38-.252.727-.48 1.04-.684.314-.205.518-.307.613-.307.58 0 1.11.095 1.59.285.48.19.886.445 1.218.763.333.318.628.703.884 1.155.257.45.461.914.613 1.39.152.474.278.99.378 1.546.1.556.166 1.074.2 1.554.033.48.05.971.05 1.475zm3.65-9.522c0 .741-.267 1.304-.799 1.69-.532.384-1.188.576-1.967.576h-1.91c-.979-1.168-2.238-1.777-3.777-1.824.77-1.112 1.154-2.328 1.154-3.65 0-.275-.024-.588-.071-.94.627.219 1.259.328 1.896.328.56 0 1.126-.102 1.696-.307a9.374 9.374 0 0 0 1.39-.605c.356-.2.563-.3.62-.3 1.178 0 1.767 1.678 1.767 5.032z" fill="#553D38"/><path d="M9.123 3.65a3.516 3.516 0 0 1-1.07 2.58 3.516 3.516 0 0 1-2.58 1.068 3.516 3.516 0 0 1-2.58-1.069 3.516 3.516 0 0 1-1.068-2.58c0-1.007.356-1.867 1.069-2.58A3.516 3.516 0 0 1 5.474 0C6.48 0 7.34.356 8.054 1.07a3.516 3.516 0 0 1 1.069 2.58zm10.035 5.473c0 1.51-.535 2.8-1.604 3.87-1.069 1.069-2.359 1.603-3.87 1.603-1.51 0-2.8-.534-3.87-1.603-1.069-1.07-1.603-2.36-1.603-3.87 0-1.511.534-2.801 1.603-3.87 1.07-1.07 2.36-1.604 3.87-1.604 1.511 0 2.801.535 3.87 1.604 1.07 1.069 1.604 2.359 1.604 3.87zm6.386-5.474a3.516 3.516 0 0 1-1.07 2.58 3.516 3.516 0 0 1-2.58 1.07 3.516 3.516 0 0 1-2.58-1.07 3.516 3.516 0 0 1-1.068-2.58c0-1.007.356-1.867 1.069-2.58A3.516 3.516 0 0 1 21.895 0c1.007 0 1.867.356 2.58 1.07a3.516 3.516 0 0 1 1.069 2.58z" fill="#EBBF8E"/><path d="M12.496 19.991h2.393v-.897c0-.33-.117-.612-.35-.846a1.153 1.153 0 0 0-.847-.35c-.33 0-.612.116-.846.35-.233.234-.35.516-.35.846v.897zm3.889.45v2.691c0 .125-.044.231-.131.318a.433.433 0 0 1-.318.131h-4.487a.433.433 0 0 1-.318-.13.433.433 0 0 1-.131-.319V20.44c0-.124.044-.23.13-.318a.433.433 0 0 1 .319-.13h.15v-.898c0-.573.205-1.066.616-1.477A2.015 2.015 0 0 1 13.692 17c.574 0 1.066.206 1.477.617.412.411.617.904.617 1.477v.897h.15c.125 0 .23.044.318.131.087.088.13.194.13.318z" fill="#FFF"/></g></svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1 @@
<svg width="35" height="24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M1.148 20.03c.567-7.141 2.974-7.675 7.222-1.604 6.372 9.107 7.533-.667 9.19-2.017" stroke="#FFD2B6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><g fill-rule="nonzero"><path d="M21.313 16.48l1.081-1.082-2.792-2.792-1.081 1.081v1.271h1.52v1.521h1.272zm6.214-11.027c0-.174-.087-.26-.262-.26a.275.275 0 0 0-.202.082l-6.44 6.44a.275.275 0 0 0-.082.202c0 .174.087.261.261.261.08 0 .147-.028.202-.083l6.44-6.44a.275.275 0 0 0 .083-.202zm-.642-2.28l4.943 4.942L21.943 18H17v-4.943l9.885-9.885zM35 4.312c0 .42-.147.776-.44 1.07l-1.972 1.971-4.942-4.942 1.972-1.96A1.412 1.412 0 0 1 30.688 0c.419 0 .78.15 1.08.451l2.792 2.78c.293.31.44.67.44 1.082z" fill="#181D29"/><path d="M35 4.313c0 .42-.147.776-.44 1.07l-1.972 1.971-4.942-4.942 1.972-1.96A1.412 1.412 0 0 1 30.688 0c.419 0 .78.15 1.08.451l2.792 2.78c.293.31.44.67.44 1.082z" fill="#FF84B3"/></g></g></svg>

After

Width:  |  Height:  |  Size: 980 B

View File

@ -0,0 +1 @@
<svg width="22" height="22" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path d="M8.604.607c.317.623.75 1.155 1.298 1.597.549.443 1.16.754 1.835.934l.012.873c.032 1.745-.494 3.166-1.579 4.264-1.084 1.098-2.5 1.647-4.247 1.647-1 0-1.885-.19-2.657-.571a4.852 4.852 0 0 1-1.858-1.567 7.325 7.325 0 0 1-1.055-2.25A9.927 9.927 0 0 1 0 2.832l.5.369c.276.205.528.387.755.547.228.16.468.309.72.448.251.14.438.21.56.21.333 0 .557-.152.67-.455a6.33 6.33 0 0 1 .701-1.383c.264-.381.547-.692.847-.934.3-.242.658-.436 1.073-.584A6.547 6.547 0 0 1 7.08.736c.422-.062.93-.105 1.523-.13z" id="a"/></defs><g fill="none" fill-rule="evenodd"><g transform="translate(0 12)"><mask id="b" fill="#fff"><use xlink:href="#a"/></mask><use fill="#EABE8D" fill-rule="nonzero" xlink:href="#a"/><path d="M10.18.264c4.086 6.335 2.315 9.584-5.314 9.747-7.629.163-6.185-1.797 4.331-5.88l.982-3.867z" fill="#DB1818" mask="url(#b)"/><path d="M10.564.16C11.422 6.26 8.9 9.507 2.998 9.904c-5.902.397-4.484-1.392 4.255-5.367L10.563.16z" fill="#F1D520" mask="url(#b)"/><path d="M10.196-1.556C9.168 5.281 6.272 8.728 1.507 8.786c-4.764.059-3.209-1.83 4.668-5.663l4.021-4.679z" fill="#32B167" mask="url(#b)"/><path d="M9.506-4.516C9.417 2.713 6.99 6.357 2.226 6.414-2.539 6.474-.784 4.262 7.49-.22l2.016-4.295z" fill="#1279EA" mask="url(#b)"/><path d="M9.449-4.392C8.72 1.871 5.974 5.032 1.209 5.09c-4.764.058-3.398-1.712 4.099-5.311l4.14-4.17z" fill="#4C2DCE" mask="url(#b)"/></g><path d="M19.88 0c.564 0 1.058.186 1.482.56.424.372.635.84.635 1.401 0 .505-.181 1.111-.544 1.817-2.679 5.045-4.555 8.06-5.628 9.047-.783.73-1.662 1.095-2.638 1.095-1.017 0-1.89-.37-2.62-1.113-.73-.742-1.096-1.622-1.096-2.64 0-1.027.371-1.877 1.113-2.551L18.306.65c.476-.433 1-.65 1.573-.65z" fill-rule="nonzero" fill="#553D38"/></g></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1 @@
<svg width="54" height="34" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill-rule="nonzero"><path d="M11.392 30.3a1.797 1.797 0 0 0-.22-1.409 1.797 1.797 0 0 0-1.141-.857 1.797 1.797 0 0 0-1.41.22c-.449.27-.734.65-.857 1.142-.122.492-.049.962.22 1.41.27.449.65.734 1.142.857.491.122.961.049 1.41-.22.448-.27.734-.65.856-1.142zm21.224-7.353L8.464 37.459c-.874.525-1.812.663-2.813.413-.983-.245-1.756-.809-2.318-1.692L1.09 32.37c-.548-.86-.695-1.8-.44-2.82.249-1.002.822-1.772 1.72-2.311l24.117-14.492a14.885 14.885 0 0 0 2.02 5.728 14.885 14.885 0 0 0 4.108 4.472z" fill="#181D29"/><path d="M53.663 15.097c-.184.737-.65 1.684-1.401 2.842-1.52 2.31-3.587 3.978-6.2 5.003-2.615 1.024-5.254 1.204-7.918.54-3.497-.872-6.177-2.86-8.043-5.965-1.865-3.105-2.362-6.405-1.49-9.901.871-3.496 2.86-6.177 5.964-8.043 3.105-1.865 6.405-2.362 9.901-1.49 1.096.273 2.205.715 3.328 1.326 1.122.611 2.028 1.304 2.718 2.078.251.283.336.586.256.907-.08.321-.297.548-.651.68l-9.5 2.72-1.584 6.35 4.715 4.397c.109-.033.97-.305 2.582-.816 1.613-.511 3.084-.957 4.414-1.339 1.33-.38 2.08-.55 2.25-.508.283.071.481.22.595.45.113.229.135.485.064.769z" fill="#A1A1A1"/></g><path stroke="#C6C6C6" fill="#D8D8D8" d="M46.521 5.425l3.657 3.41-1.125 4.872-4.781 1.461-3.657-3.41 1.125-4.871z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -27,7 +27,7 @@
color: #ffffff;
font-size: 12px;
line-height: 20px;
background: #E78C29;
background: #0097f7;
border-radius: 3px;
transition: transform .3s ease-in-out;
white-space: pre;

View File

@ -13,6 +13,10 @@ import { FormattedMessage } from 'react-intl';
import Ico from 'components/Ico';
import ListRow from 'components/ListRow';
import PopUpWarning from 'components/PopUpWarning';
import IconAuth from 'assets/icons/icon_auth-permissions.svg';
import IconCtb from 'assets/icons/icon_content-type-builder.svg';
import IconCm from 'assets/icons/icon_content-manager.svg';
import IconSettings from 'assets/icons/icon_settings-manager.svg';
import styles from './styles.scss';
@ -30,13 +34,35 @@ class Row extends React.Component {
this.props.onDeleteClick(e);
}
renderImg = () => {
switch (this.props.plugin.name) {
case 'Auth & Permissions':
return <img src={IconAuth} alt="logo" />;
case 'Content Manager':
return <img src={IconCm} alt="logo" />;
case 'Settings Manager':
return <img src={IconSettings} alt="logo" />;
case 'Content Type Builder':
return <img src={IconCtb} alt="logo" />;
default:
}
}
render() {
const pluginIcon = this.props.plugin.name !== 'Email' ? (
<div className={styles.frame} style={{ marginRight: '30px' }}>
<span className={styles.helper} />{this.renderImg()}
</div>
) : (
<div className={styles.icoContainer} style={{ marginRight: '30px' }}>
<i className={`fa fa-${this.props.plugin.icon}`} />
</div>
);
return (
<ListRow>
<div className={cn("col-md-11", styles.nameWrapper)}>
<div className={styles.icoContainer} style={{ marginRight: '30px' }}>
<i className={`fa fa-${this.props.plugin.icon}`} />
</div>
{pluginIcon}
<div className={styles.pluginContent}>
<span>{this.props.plugin.name} &nbsp;</span>
<FormattedMessage id={this.props.plugin.description} />

View File

@ -31,3 +31,23 @@
display: flex;
justify-content: flex-end;
}
.frame {
width: 70px;
height: 36px;
margin: auto 0;
text-align: center;
border: 1px solid rgba(28,93,231,0.1);
border-radius: 3px;
white-space: nowrap;
> img {
max-height: 36px;
vertical-align: baseline;
}
}
.helper {
display: inline-block;
height: 100%;
vertical-align: middle;
}

View File

@ -1,6 +1,6 @@
{
"name": "strapi-admin",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "Strapi Admin",
"repository": {
"type": "git",
@ -26,8 +26,8 @@
"devDependencies": {
"sanitize.css": "^4.1.0",
"shelljs": "^0.7.8",
"strapi-helper-plugin": "3.0.0-alpha.7.2",
"strapi-utils": "3.0.0-alpha.7.2"
"strapi-helper-plugin": "3.0.0-alpha.7.3",
"strapi-utils": "3.0.0-alpha.7.3"
},
"author": {
"name": "Strapi",
@ -46,4 +46,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "strapi-bookshelf",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "Bookshelf hook for the Strapi framework",
"homepage": "http://strapi.io",
"keywords": [
@ -19,8 +19,8 @@
"bookshelf": "^0.10.3",
"lodash": "^4.17.4",
"pluralize": "^6.0.0",
"strapi-knex": "3.0.0-alpha.7.2",
"strapi-utils": "3.0.0-alpha.7.2"
"strapi-knex": "3.0.0-alpha.7.3",
"strapi-utils": "3.0.0-alpha.7.3"
},
"strapi": {
"isHook": true,
@ -55,4 +55,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "strapi-generate-admin",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "Generate the default admin panel for a Strapi application.",
"homepage": "http://strapi.io",
"keywords": [
@ -15,7 +15,7 @@
"dependencies": {
"fs-extra": "^4.0.1",
"lodash": "^4.17.4",
"strapi-admin": "3.0.0-alpha.7.2"
"strapi-admin": "3.0.0-alpha.7.3"
},
"author": {
"email": "hi@strapi.io",

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "strapi-generate-new",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "Generate a new Strapi application.",
"homepage": "http://strapi.io",
"keywords": [
@ -17,7 +17,7 @@
"fs-extra": "^4.0.0",
"get-installed-path": "^3.0.1",
"lodash": "^4.17.4",
"strapi-utils": "3.0.0-alpha.7.2",
"strapi-utils": "3.0.0-alpha.7.3",
"uuid": "^3.1.0"
},
"scripts": {

View File

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

View File

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

View File

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

View File

@ -233,7 +233,11 @@ function parseTarget(target, scope, cb) {
// try requiring `strapi-generate-<module>` to get the core generator.
if (!subGenerator && !module.match(/^strapi-generate-/)) {
try {
subGenerator = require(path.resolve(process.mainModule.paths[1], 'strapi-generate-' + module));
if (process.mainModule.filename.indexOf('yarn') !== -1) {
subGenerator = require(path.resolve(process.mainModule.paths[2], 'strapi-generate-' + module));
} else {
subGenerator = require(path.resolve(process.mainModule.paths[1], 'strapi-generate-' + module));
}
} catch (e1) {
requireError = e1;
}

View File

@ -1,6 +1,6 @@
{
"name": "strapi-generate",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "Master of ceremonies for the Strapi generators.",
"homepage": "http://strapi.io",
"keywords": [
@ -17,7 +17,7 @@
"fs-extra": "^4.0.0",
"lodash": "^4.17.4",
"reportback": "^2.0.1",
"strapi-utils": "3.0.0-alpha.7.2"
"strapi-utils": "3.0.0-alpha.7.3"
},
"author": {
"name": "Strapi team",

View File

@ -93,7 +93,7 @@
.secondary {
// height: 32px !important;
color: #F64D0A !important;
border: 0.1rem solid #F64D0A;
border: 0.1rem solid #F64D0A !important;
position: relative;
border-radius: 3px;
overflow: hidden;

View File

@ -1,6 +1,6 @@
{
"name": "strapi-helper-plugin",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "Helper for Strapi plugins development",
"engines": {
"node": ">= 8.0.0",

View File

@ -95,7 +95,9 @@ module.exports = strapi => {
charset: _.get(connection.settings, 'charset'),
schema: _.get(connection.settings, 'schema') || 'public',
port: _.get(connection.settings, 'port'),
socket: _.get(connection.settings, 'socketPath')
socket: _.get(connection.settings, 'socketPath'),
ssl: _.get(connection.settings, 'ssl') || false
},
debug: _.get(connection.options, 'debug') || false,
acquireConnectionTimeout: _.get(connection.options, 'acquireConnectionTimeout'),

View File

@ -1,6 +1,6 @@
{
"name": "strapi-knex",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "Knex hook for the Strapi framework",
"homepage": "http://strapi.io",
"keywords": [
@ -46,4 +46,4 @@
"npm": ">= 5.0.0"
},
"license": "MIT"
}
}

View File

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

View File

@ -251,7 +251,7 @@ module.exports = function (strapi) {
const FK = _.find(definition.associations, {alias: name});
const ref = details.plugin ? strapi.plugins[details.plugin].models[details.model].globalId : strapi.models[details.model].globalId;
if (FK && FK.nature !== 'oneToOne' && FK.nature !== 'manyToOne') {
if (FK && FK.nature !== 'oneToOne' && FK.nature !== 'manyToOne' && FK.nature !== 'oneWay') {
definition.loadedModel[name] = {
type: 'virtual',
ref,

View File

@ -1,6 +1,6 @@
{
"name": "strapi-mongoose",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "Mongoose hook for the Strapi framework",
"homepage": "http://strapi.io",
"keywords": [
@ -20,7 +20,7 @@
"mongoose-double": "0.0.1",
"mongoose-float": "^1.0.2",
"pluralize": "^6.0.0",
"strapi-utils": "3.0.0-alpha.7.2"
"strapi-utils": "3.0.0-alpha.7.3"
},
"strapi": {
"isHook": true

View File

@ -35,6 +35,7 @@ class EditFormRelations extends React.Component { // eslint-disable-line react/p
const relations = map(currentSchema.relations, (relation, i) => {
switch (relation.nature) {
case 'oneWay':
case 'oneToOne':
case 'manyToOne':
if (relation.dominant) {

View File

@ -77,6 +77,10 @@ module.exports = {
acc[current] = params.values[current];
} else {
switch (association.nature) {
case 'oneWay':
acc[current] = _.get(params.values[current], this.primaryKey, params.values[current]) || null;
break;
case 'oneToOne':
if (response[current] !== params.values[current]) {
const value = _.isNull(params.values[current]) ? response[current] : params.values;

View File

@ -58,6 +58,10 @@ module.exports = {
acc[current] = params.values[current];
} else {
switch (association.nature) {
case 'oneWay':
acc[current] = _.get(params.values[current], this.primaryKey, params.values[current]) || null;
break;
case 'oneToOne':
if (response[current] !== params.values[current]) {
const value = _.isNull(params.values[current]) ? response[current] : params.values;

View File

@ -70,7 +70,6 @@ module.exports = {
// Create an entry using `queries` system
ctx.body = await strapi.plugins['content-manager'].services['contentmanager'].add(ctx.params, ctx.request.body, source);
} catch(error) {
console.log(error);
ctx.badRequest(null, ctx.request.admin ? [{ messages: [{ id: error.message, field: error.field }] }] : error.message);
}
},

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-content-manager",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "A powerful UI to easily manage your data.",
"engines": {
"node": ">= 8.0.0",
@ -46,6 +46,6 @@
},
"devDependencies": {
"react-select": "^1.0.0-rc.5",
"strapi-helper-plugin": "3.0.0-alpha.7.2"
"strapi-helper-plugin": "3.0.0-alpha.7.3"
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-content-type-builder",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "Strapi plugin to create content type (API).",
"strapi": {
"name": "Content Type Builder",
@ -25,11 +25,11 @@
},
"dependencies": {
"pluralize": "^7.0.0",
"strapi-generate": "3.0.0-alpha.7.2",
"strapi-generate-api": "3.0.0-alpha.7.2"
"strapi-generate": "3.0.0-alpha.7.3",
"strapi-generate-api": "3.0.0-alpha.7.3"
},
"devDependencies": {
"strapi-helper-plugin": "3.0.0-alpha.7.2"
"strapi-helper-plugin": "3.0.0-alpha.7.3"
},
"author": {
"name": "Strapi team",
@ -48,4 +48,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-email",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "This is the description of the plugin.",
"strapi": {
"name": "Email",
@ -27,7 +27,7 @@
"sendmail": "^1.2.0"
},
"devDependencies": {
"strapi-helper-plugin": "3.0.0-alpha.7.2"
"strapi-helper-plugin": "3.0.0-alpha.7.3"
},
"author": {
"name": "A Strapi developer",
@ -46,4 +46,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-settings-manager",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "Strapi plugin to manage settings.",
"strapi": {
"name": "Settings Manager",
@ -26,7 +26,7 @@
"devDependencies": {
"flag-icon-css": "^2.8.0",
"react-select": "^1.0.0-rc.5",
"strapi-helper-plugin": "3.0.0-alpha.7.2"
"strapi-helper-plugin": "3.0.0-alpha.7.3"
},
"author": {
"name": "Strapi team",
@ -45,4 +45,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -6,7 +6,7 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { findIndex, has, includes, isEmpty, map, toLower, upperFirst } from 'lodash';
import { findIndex, has, includes, isEmpty, map, toLower } from 'lodash';
import cn from 'classnames';
import PropTypes from 'prop-types';
@ -77,7 +77,7 @@ class InputSearch extends React.Component { // eslint-disable-line react/prefer-
return (
<div className={cn(styles.inputSearch, 'col-md-6')}>
<label htmlFor={this.props.name}>
<FormattedMessage id={this.props.label} values={upperFirst(this.props.labelValues)} />
<FormattedMessage id={this.props.label} values={this.props.labelValues} />
</label>
<div className={cn('input-group')}>
<span className={cn('input-group-addon', styles.addon)} />

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-users-permissions",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "This is the description of the plugin.",
"strapi": {
"name": "Auth & Permissions",
@ -29,7 +29,7 @@
"uuid": "^3.1.0"
},
"devDependencies": {
"strapi-helper-plugin": "3.0.0-alpha.7.2"
"strapi-helper-plugin": "3.0.0-alpha.7.3"
},
"author": {
"name": "Strapi team",
@ -48,4 +48,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "strapi-redis",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "Redis hook for the Strapi framework",
"homepage": "http://strapi.io",
"keywords": [
@ -18,7 +18,7 @@
"ioredis": "^3.1.2",
"lodash": "^4.17.4",
"stack-trace": "0.0.10",
"strapi-utils": "3.0.0-alpha.7.2"
"strapi-utils": "3.0.0-alpha.7.3"
},
"strapi": {
"isHook": true

View File

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

View File

@ -77,7 +77,11 @@ module.exports = function (plugin, cliArguments) {
fs.accessSync(path.join(pluginPath, '.gitignore'))
} catch (err) {
if (err.code === 'ENOENT') {
fs.copySync(path.resolve(__dirname, '..', 'node_modules', 'strapi-generate-plugin', 'templates', 'gitignore'), path.join(pluginPath, '.gitignore'));
if (process.mainModule.filename.indexOf('yarn') !== -1) {
fs.copySync(path.resolve(__dirname, '..', '..', 'strapi-generate-plugin', 'templates', 'gitignore'), path.join(pluginPath, '.gitignore'));
} else {
fs.copySync(path.resolve(__dirname, '..', 'node_modules', 'strapi-generate-plugin', 'templates', 'gitignore'), path.join(pluginPath, '.gitignore'));
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "strapi",
"version": "3.0.0-alpha.7.2",
"version": "3.0.0-alpha.7.3",
"description": "An open source solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier.",
"homepage": "http://strapi.io",
"keywords": [
@ -55,14 +55,14 @@
"rimraf": "^2.6.2",
"semver": "^5.4.1",
"stack-trace": "0.0.10",
"strapi-generate": "3.0.0-alpha.7.2",
"strapi-generate-admin": "3.0.0-alpha.7.2",
"strapi-generate-api": "3.0.0-alpha.7.2",
"strapi-generate-new": "3.0.0-alpha.7.2",
"strapi-generate-plugin": "3.0.0-alpha.7.2",
"strapi-generate-policy": "3.0.0-alpha.7.2",
"strapi-generate-service": "3.0.0-alpha.7.2",
"strapi-utils": "3.0.0-alpha.7.2"
"strapi-generate": "3.0.0-alpha.7.3",
"strapi-generate-admin": "3.0.0-alpha.7.3",
"strapi-generate-api": "3.0.0-alpha.7.3",
"strapi-generate-new": "3.0.0-alpha.7.3",
"strapi-generate-plugin": "3.0.0-alpha.7.3",
"strapi-generate-policy": "3.0.0-alpha.7.3",
"strapi-generate-service": "3.0.0-alpha.7.3",
"strapi-utils": "3.0.0-alpha.7.3"
},
"author": {
"email": "hi@strapi.io",