mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 07:33:17 +00:00
Merge branch 'master' into reduce-setup-monorepo
This commit is contained in:
commit
36393b9594
@ -22,6 +22,7 @@
|
||||
* [Deployment](guides/deployment.md)
|
||||
* [File Upload](guides/upload.md)
|
||||
* [Filters](guides/filters.md)
|
||||
* [GraphQL](guides/graphql.md)
|
||||
* [Internationalization](guides/i18n.md)
|
||||
* [Models](guides/models.md)
|
||||
* [Policies](guides/policies.md)
|
||||
|
||||
@ -28,7 +28,7 @@ By default, the [Shadow CRUD](#shadow-crud) feature is enabled and the GraphQL i
|
||||
|
||||
### Query API
|
||||
|
||||
In the section, we assume that the Shadow CRUD](#shadow-crud) feature is enabled. For each model, the plugin auto-generates queries which just fit to your needs.
|
||||
In the section, we assume that the [Shadow CRUD](#shadow-crud) feature is enabled. For each model, the plugin auto-generates queries which just fit to your needs.
|
||||
|
||||
##### Fetch a single entry
|
||||
|
||||
|
||||
@ -13,6 +13,12 @@ This will create two files located at `./api/user/models`:
|
||||
|
||||
> Note: when you create a new API using the CLI (`strapi generate:api <name>`), a model is automatically created.
|
||||
|
||||
## Model Information
|
||||
The info key on the model-json states information about the model. This information is used in the admin interface, when showing the model.
|
||||
- `name`: The name of the model, as shown in admin interface.
|
||||
- `description`: The description of the model.
|
||||
- `mainField`: Determines which model-attribute is shown when displaying the model.
|
||||
|
||||
## Define the attributes
|
||||
|
||||
The following types are currently available:
|
||||
@ -59,7 +65,8 @@ To improve the Developer eXperience when developing or using the administration
|
||||
"connection": "default",
|
||||
"info": {
|
||||
"name": "user",
|
||||
"description": "This represents the User Model"
|
||||
"description": "This represents the User Model",
|
||||
"mainField": "email"
|
||||
},
|
||||
"attributes": {
|
||||
"firstname": {
|
||||
|
||||
@ -0,0 +1,96 @@
|
||||
# Migrating from 3.0.0-alpha.11 to 3.0.0-alpha.12
|
||||
|
||||
This migration guide is a mix of migrations from 3.0.0-alpha.11.1 to 3.0.0-alpha.11.2, 3.0.0-alpha.11.2 to 3.0.0-alpha.11.3 and from 3.0.0-alpha.11.3 to 3.0.0-alpha.12.
|
||||
|
||||
> Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
Install Strapi `alpha.12` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.12 -g`.
|
||||
|
||||
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
|
||||
|
||||
## Configurations
|
||||
|
||||
You will have to update just 1 file: `package.json`
|
||||
|
||||
- Edit the Strapi's dependencies version: (move Strapi's dependencies to `3.0.0-alpha.12` version) in `package.json` file
|
||||
|
||||
```json
|
||||
{
|
||||
"dependencies": {
|
||||
"lodash": "4.x.x",
|
||||
"strapi": "3.0.0-alpha.12",
|
||||
"strapi-mongoose": "3.0.0-alpha.12"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Update the Admin
|
||||
|
||||
Delete your old admin folder and replace it by the new one.
|
||||
|
||||
|
||||
## Update the Plugins
|
||||
|
||||
Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one.
|
||||
|
||||
Then, delete your old `plugins` folder and replace it by the new one.
|
||||
|
||||
## Update roles
|
||||
|
||||
> This update is if you come from version before alpha-11.2
|
||||
|
||||
Update `type` of `Guest` role to `public` in your database. You can also update name and description:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Public",
|
||||
"description": "Default role given to unauthenticated user.",
|
||||
"type": "public"
|
||||
}
|
||||
```
|
||||
|
||||
Create Authenticated role:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Authenticated",
|
||||
"description": "Default role given to authenticated user.",
|
||||
"type": "authenticated"
|
||||
}
|
||||
```
|
||||
|
||||
In `Users & Permissions > Advanced` in admin panel update default role to `Authenticated`
|
||||
|
||||
You also will have to reset your roles permissions.
|
||||
|
||||
### Update bookshelf filters
|
||||
|
||||
> This update is if you come from version before alpha-11.3
|
||||
|
||||
You will have to replace your `fetchAll` services queries of your generated API:
|
||||
|
||||
```js
|
||||
_.forEach(convertedParams.where, (where, key) => {
|
||||
if (_.isArray(where.value)) {
|
||||
for (const value in where.value) {
|
||||
qb[value ? 'where' : 'orWhere'](key, where.symbol, where.value[value])
|
||||
}
|
||||
} else {
|
||||
qb.where(key, where.symbol, where.value);
|
||||
}
|
||||
});
|
||||
|
||||
if (convertedParams.sort) {
|
||||
qb.orderBy(convertedParams.sort.key, convertedParams.sort.order);
|
||||
}
|
||||
|
||||
qb.offset(convertedParams.start);
|
||||
|
||||
qb.limit(convertedParams.limit);
|
||||
```
|
||||
|
||||
That's all, you have now upgraded to Strapi `alpha.12`.
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"devDependencies": {
|
||||
"assert": "~1.3.0",
|
||||
"babel-eslint": "^6.1.2",
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
"app.components.HomePage.button.quickStart": "START THE QUICK START TUTORIAL",
|
||||
"app.components.HomePage.button.blog": "SEE MORE ON THE BLOG",
|
||||
"app.components.HomePage.support": "SUPPORT US",
|
||||
"app.components.HomePage.support.content": "By buying the T-shirt (25€), it will allow us to continue our work on the project to give you the best possible experience!",
|
||||
"app.components.HomePage.support.content": "By buying the T-shirt, it will allow us to continue our work on the project to give you the best possible experience!",
|
||||
"app.components.HomePage.support.link": "GET YOUR T-SHIRT NOW",
|
||||
|
||||
"app.components.BlockLink.documentation": "Read the documentation",
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
"app.components.HomePage.button.quickStart": "VOIR LE QUICK START TUTORIEL",
|
||||
"app.components.HomePage.button.blog": "VOIR PLUS D'ARTICLES SUR LE BLOG",
|
||||
"app.components.HomePage.support": "SUPPORT US",
|
||||
"app.components.HomePage.support.content": "En achetant notre T-shirt (25€), vous nous aidez à poursuivre à maintenir le projet pour que nous puissions vous donner la meilleure expérience possible!",
|
||||
"app.components.HomePage.support.content": "En achetant notre T-shirt, vous nous aidez à poursuivre à maintenir le projet pour que nous puissions vous donner la meilleure expérience possible!",
|
||||
"app.components.HomePage.support.link": "OBTENEZ VOTRE T-SHIRT!",
|
||||
|
||||
"app.components.BlockLink.documentation": "Voir la documentation",
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
"app.components.HomePage.createBlock.content.tutorial": "\u0020руководство.",
|
||||
"app.components.HomePage.button.quickStart": "ОЗНАКОМТЕСЬ С РУКОВОДСТВОМ ПО БЫСТРОМУ СТАРТУ",
|
||||
"app.components.HomePage.support": "ПОДДЕРЖИТЕ НАС",
|
||||
"app.components.HomePage.support.content": "Купите футболку (25€), это поможет нам продолжать работу над проектом, чтобы предоставить вам наилучшее из возможных решений!",
|
||||
"app.components.HomePage.support.content": "Купите футболку, это поможет нам продолжать работу над проектом, чтобы предоставить вам наилучшее из возможных решений!",
|
||||
"app.components.HomePage.support.link": "ЗАКАЗАТЬ НАШУ ФУТБОЛКУ СЕЙЧАС",
|
||||
|
||||
"app.components.BlockLink.documentation": "Прочитать документацию",
|
||||
|
||||
@ -54,7 +54,7 @@ module.exports = {
|
||||
|
||||
strapi.log.info(`Installing ${plugin}...`);
|
||||
|
||||
exec(`node ${strapiBin} install ${plugin} ${port === '4000' ? '--dev' : ''}`);
|
||||
exec(`node "${strapiBin}" install ${plugin} ${port === '4000' ? '--dev' : ''}`);
|
||||
|
||||
ctx.send({ ok: true });
|
||||
|
||||
@ -87,7 +87,7 @@ module.exports = {
|
||||
strapi.reload.isWatching = false;
|
||||
|
||||
strapi.log.info(`Uninstalling ${plugin}...`);
|
||||
exec(`node ${strapiBin} uninstall ${plugin}`);
|
||||
exec(`node "${strapiBin}" uninstall ${plugin}`);
|
||||
|
||||
ctx.send({ ok: true });
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-admin",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Strapi Admin",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -29,8 +29,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"sanitize.css": "^4.1.0",
|
||||
"strapi-helper-plugin": "3.0.0-alpha.11.3",
|
||||
"strapi-utils": "3.0.0-alpha.11.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.12",
|
||||
"strapi-utils": "3.0.0-alpha.12"
|
||||
},
|
||||
"author": {
|
||||
"name": "Strapi",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-bookshelf",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Bookshelf hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
@ -19,8 +19,8 @@
|
||||
"bookshelf": "^0.12.1",
|
||||
"lodash": "^4.17.4",
|
||||
"pluralize": "^6.0.0",
|
||||
"strapi-knex": "3.0.0-alpha.11.3",
|
||||
"strapi-utils": "3.0.0-alpha.11.3"
|
||||
"strapi-knex": "3.0.0-alpha.12",
|
||||
"strapi-utils": "3.0.0-alpha.12"
|
||||
},
|
||||
"strapi": {
|
||||
"isHook": true,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-ejs",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "EJS hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-admin",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"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.11.3"
|
||||
"strapi-admin": "3.0.0-alpha.12"
|
||||
},
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-api",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Generate an API for a Strapi application.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-controller",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Generate a controller for a Strapi API.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-model",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Generate a model for a Strapi API.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"csrf": {
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"key": "_csrf",
|
||||
"secret": "_csrfSecret"
|
||||
},
|
||||
@ -50,7 +50,8 @@
|
||||
"headers": [
|
||||
"Content-Type",
|
||||
"Authorization",
|
||||
"X-Frame-Options"
|
||||
"X-Frame-Options",
|
||||
"Origin"
|
||||
]
|
||||
},
|
||||
"ip": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"session": {
|
||||
"enabled": false,
|
||||
"enabled": true,
|
||||
"client": "cookie",
|
||||
"key": "strapi.sid",
|
||||
"prefix": "strapi:sess:",
|
||||
@ -12,7 +12,7 @@
|
||||
"rolling": false
|
||||
},
|
||||
"logger": {
|
||||
"level": "silent",
|
||||
"level": "info",
|
||||
"exposeInContext": true,
|
||||
"requests": false
|
||||
},
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"csrf": {
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"key": "_csrf",
|
||||
"secret": "_csrfSecret"
|
||||
},
|
||||
@ -50,7 +50,8 @@
|
||||
"headers": [
|
||||
"Content-Type",
|
||||
"Authorization",
|
||||
"X-Frame-Options"
|
||||
"X-Frame-Options",
|
||||
"Origin"
|
||||
]
|
||||
},
|
||||
"ip": {
|
||||
|
||||
@ -16,6 +16,19 @@ const uuid = require('uuid/v4');
|
||||
module.exports = scope => {
|
||||
const cliPkg = scope.strapiPackageJSON || {};
|
||||
|
||||
// Let us install additional dependencies on a specific version.
|
||||
// Ex: it allows us to install the right version of knex.
|
||||
const additionalsDependencies = _.isArray(scope.additionalsDependencies) ?
|
||||
scope.additionalsDependencies.reduce((acc, current) => {
|
||||
const pkg = current.split('@');
|
||||
const name = pkg[0];
|
||||
const version = pkg[1] || 'latest';
|
||||
|
||||
acc[name] = name.indexOf('strapi') !== -1 ? getDependencyVersion(cliPkg, 'strapi') : version;
|
||||
|
||||
return acc;
|
||||
}, {}) : {};
|
||||
|
||||
// Finally, return the JSON.
|
||||
return _.merge(scope.appPackageJSON || {}, {
|
||||
'name': scope.name,
|
||||
@ -37,12 +50,13 @@ module.exports = scope => {
|
||||
'eslint-plugin-import': '^2.2.0',
|
||||
'eslint-plugin-react': '^6.8.0'
|
||||
},
|
||||
'dependencies': {
|
||||
'dependencies': Object.assign({}, {
|
||||
'lodash': '4.x.x',
|
||||
'strapi': getDependencyVersion(cliPkg, 'strapi'),
|
||||
[scope.client.connector]: getDependencyVersion(cliPkg, 'strapi'),
|
||||
}, additionalsDependencies, {
|
||||
[scope.client.module]: scope.client.version
|
||||
},
|
||||
}),
|
||||
'author': {
|
||||
'name': scope.author || 'A Strapi developer',
|
||||
'email': scope.email || '',
|
||||
|
||||
@ -35,8 +35,8 @@ module.exports = (scope, cb) => {
|
||||
|
||||
const availableDependencies = [];
|
||||
const dependencies = _.get(packageJSON, 'dependencies');
|
||||
const strapiDependencies = Object.keys(dependencies).filter(key => key.indexOf('strapi') !== -1 && key.indexOf('strapi-bookshelf') === -1);
|
||||
const othersDependencies = Object.keys(dependencies).filter(key => key.indexOf('strapi') === -1 || key.indexOf('strapi-bookshelf') !== -1);
|
||||
const strapiDependencies = Object.keys(dependencies).filter(key => key.indexOf('strapi') !== -1);
|
||||
const othersDependencies = Object.keys(dependencies).filter(key => key.indexOf('strapi') === -1);
|
||||
|
||||
// Verify if the dependencies are available into the global
|
||||
_.forEach(strapiDependencies, (key) => {
|
||||
@ -56,6 +56,7 @@ module.exports = (scope, cb) => {
|
||||
logger.info('Installing dependencies...');
|
||||
if (!_.isEmpty(othersDependencies)) {
|
||||
npm.install({
|
||||
dir: scope.rootPath,
|
||||
dependencies: othersDependencies,
|
||||
loglevel: 'silent',
|
||||
production: true,
|
||||
@ -123,14 +124,14 @@ module.exports = (scope, cb) => {
|
||||
|
||||
if (dependency.global) {
|
||||
try {
|
||||
fs.accessSync(dependency.path, fs.constants.W_OK | fs.constants.F_OK);
|
||||
fs.accessSync(dependency.path, fs.constants.R_OK | fs.constants.F_OK);
|
||||
fs.symlinkSync(dependency.path, path.resolve(scope.rootPath, 'node_modules', dependency.key), 'dir');
|
||||
} catch (e) {
|
||||
// Silent.
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
fs.accessSync(path.resolve(scope.strapiRoot, 'node_modules', dependency.key), fs.constants.W_OK | fs.constants.F_OK);
|
||||
fs.accessSync(path.resolve(scope.strapiRoot, 'node_modules', dependency.key), fs.constants.R_OK | fs.constants.F_OK);
|
||||
fs.symlinkSync(path.resolve(scope.strapiRoot, 'node_modules', dependency.key), path.resolve(scope.rootPath, 'node_modules', dependency.key), 'dir');
|
||||
} catch (e) {
|
||||
// Silent.
|
||||
|
||||
@ -232,14 +232,26 @@ module.exports = (scope, cb) => {
|
||||
}),
|
||||
new Promise(resolve => {
|
||||
let cmd = `npm install --prefix "${scope.tmpPath}" ${scope.client.connector}@alpha`;
|
||||
|
||||
if (scope.client.module) {
|
||||
cmd += ` ${scope.client.module}`;
|
||||
}
|
||||
|
||||
if (scope.developerMode === true && scope.client.connector === 'strapi-bookshelf') {
|
||||
cmd += ` strapi-knex@alpha`;
|
||||
|
||||
scope.additionalsDependencies = ['strapi-knex', 'knex'];
|
||||
}
|
||||
|
||||
exec(cmd, () => {
|
||||
if (scope.client.module) {
|
||||
const lock = require(path.join(`${scope.tmpPath}`,`/node_modules/`,`${scope.client.module}/package.json`));
|
||||
scope.client.version = lock.version;
|
||||
|
||||
if (scope.developerMode === true && scope.client.connector === 'strapi-bookshelf') {
|
||||
const knexVersion = require(path.join(`${scope.tmpPath}`,`/node_modules/`,`knex/package.json`));
|
||||
scope.additionalsDependencies[1] = `knex@${knexVersion.version || 'latest'}`;
|
||||
}
|
||||
}
|
||||
|
||||
resolve();
|
||||
|
||||
@ -68,6 +68,11 @@ module.exports = {
|
||||
// Empty public directory.
|
||||
'public/uploads': {
|
||||
folder: {}
|
||||
},
|
||||
|
||||
// Empty node_modules directory.
|
||||
'node_modules': {
|
||||
folder: {}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-new",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Generate a new Strapi application.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
@ -18,7 +18,7 @@
|
||||
"get-installed-path": "^3.0.1",
|
||||
"inquirer": "^4.0.2",
|
||||
"lodash": "^4.17.4",
|
||||
"strapi-utils": "3.0.0-alpha.11.3",
|
||||
"strapi-utils": "3.0.0-alpha.12",
|
||||
"uuid": "^3.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-plugin",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Generate an plugin for a Strapi application.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-policy",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Generate a policy for a Strapi API.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-service",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Generate a service for a Strapi API.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"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.11.3"
|
||||
"strapi-utils": "3.0.0-alpha.12"
|
||||
},
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-helper-plugin",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Helper for Strapi plugins development",
|
||||
"engines": {
|
||||
"node": ">= 9.0.0",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-knex",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Knex hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-middleware-views",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Views hook to enable server-side rendering for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-mongoose",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Mongoose hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
@ -19,7 +19,7 @@
|
||||
"mongoose": "^5.0.4",
|
||||
"mongoose-float": "^1.0.2",
|
||||
"pluralize": "^6.0.0",
|
||||
"strapi-utils": "3.0.0-alpha.11.3"
|
||||
"strapi-utils": "3.0.0-alpha.12"
|
||||
},
|
||||
"strapi": {
|
||||
"isHook": true
|
||||
|
||||
@ -142,7 +142,7 @@ export class ListPage extends React.Component {
|
||||
const { history, listPage: { params } } = this.props;
|
||||
const search =
|
||||
e.target.name === 'params.limit'
|
||||
? `page=${params.currentPage}&limit=${e.target.value}&sort=${params.sort}&source=${this.getSource()}`
|
||||
? `page=${params.page}&limit=${e.target.value}&sort=${params.sort}&source=${this.getSource()}`
|
||||
: `page=${e.target.value}&limit=${params.limit}&sort=${params.sort}&source=${this.getSource()}`;
|
||||
this.props.history.push({
|
||||
pathname: history.pathname,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-plugin-content-manager",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "A powerful UI to easily manage your data.",
|
||||
"strapi": {
|
||||
"name": "Content Manager",
|
||||
@ -24,7 +24,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"react-select": "^1.0.0-rc.5",
|
||||
"strapi-helper-plugin": "3.0.0-alpha.11.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.12"
|
||||
},
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-plugin-content-type-builder",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Strapi plugin to create content type (API).",
|
||||
"strapi": {
|
||||
"name": "Content Type Builder",
|
||||
@ -24,11 +24,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"pluralize": "^7.0.0",
|
||||
"strapi-generate": "3.0.0-alpha.11.3",
|
||||
"strapi-generate-api": "3.0.0-alpha.11.3"
|
||||
"strapi-generate": "3.0.0-alpha.12",
|
||||
"strapi-generate-api": "3.0.0-alpha.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"strapi-helper-plugin": "3.0.0-alpha.11.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.12"
|
||||
},
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-plugin-email",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "This is the description of the plugin.",
|
||||
"strapi": {
|
||||
"name": "Email",
|
||||
@ -26,7 +26,7 @@
|
||||
"sendmail": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"strapi-helper-plugin": "3.0.0-alpha.11.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.12"
|
||||
},
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-plugin-graphql",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "This is the description of the plugin.",
|
||||
"strapi": {
|
||||
"name": "graphql",
|
||||
@ -28,7 +28,7 @@
|
||||
"graphql-tools": "^2.23.1",
|
||||
"graphql-type-json": "^0.2.0",
|
||||
"pluralize": "^7.0.0",
|
||||
"strapi-utils": "3.0.0-alpha.11.3"
|
||||
"strapi-utils": "3.0.0-alpha.12"
|
||||
},
|
||||
"author": {
|
||||
"name": "A Strapi developer",
|
||||
|
||||
@ -41,6 +41,11 @@ module.exports = {
|
||||
const info = (_.isString(description[attribute]) ? description[attribute] : _.get(description[attribute], 'description')) || _.get(model, `attributes.${attribute}.description`);
|
||||
const deprecated = _.get(description[attribute], 'deprecated') || _.get(model, `attributes.${attribute}.deprecated`);
|
||||
|
||||
// Snakecase an attribute when we find a dash.
|
||||
if (attribute.indexOf('-') !== -1) {
|
||||
line = ` ${_.snakeCase(attribute)}: ${_.trim(split[1])}`;
|
||||
}
|
||||
|
||||
if (info) {
|
||||
line = ` """\n ${info}\n """\n${line}`;
|
||||
}
|
||||
@ -64,6 +69,11 @@ module.exports = {
|
||||
const info = _.get(description[attribute], 'description');
|
||||
const deprecated = _.get(description[attribute], 'deprecated');
|
||||
|
||||
// Snakecase an attribute when we find a dash.
|
||||
if (attribute.indexOf('-') !== -1) {
|
||||
line = ` ${_.snakeCase(attribute)}(${_.trim(split[1])}`;
|
||||
}
|
||||
|
||||
if (info) {
|
||||
line = ` """\n ${info}\n """\n${line}`;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-plugin-settings-manager",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Strapi plugin to manage settings.",
|
||||
"strapi": {
|
||||
"name": "Settings Manager",
|
||||
@ -25,7 +25,7 @@
|
||||
"devDependencies": {
|
||||
"flag-icon-css": "^2.8.0",
|
||||
"react-select": "^1.0.0-rc.5",
|
||||
"strapi-helper-plugin": "3.0.0-alpha.11.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.12"
|
||||
},
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
|
||||
@ -34,8 +34,8 @@ module.exports = async cb => {
|
||||
size text,
|
||||
url text,
|
||||
provider text,
|
||||
updated_at ${Model.client === 'pg' ? 'timestamp with time zone' : 'timestamp'},
|
||||
created_at ${Model.client === 'pg' ? 'timestamp with time zone' : 'timestamp'}
|
||||
updated_at ${Model.client === 'pg' ? 'timestamp with time zone' : 'timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'},
|
||||
created_at ${Model.client === 'pg' ? 'timestamp with time zone' : 'timestamp DEFAULT CURRENT_TIMESTAMP'}
|
||||
);
|
||||
|
||||
CREATE TABLE ${quote}upload_file_morph${quote} (
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-plugin-upload",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "This is the description of the plugin.",
|
||||
"strapi": {
|
||||
"name": "Files Upload",
|
||||
@ -24,12 +24,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"react-copy-to-clipboard": "^5.0.1",
|
||||
"strapi-upload-local": "3.0.0-alpha.11.3",
|
||||
"strapi-upload-local": "3.0.0-alpha.12",
|
||||
"stream-to-array": "^2.3.0",
|
||||
"uuid": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"strapi-helper-plugin": "3.0.0-alpha.11.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.12"
|
||||
},
|
||||
"author": {
|
||||
"name": "A Strapi developer",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-plugin-users-permissions",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Protect your API with a full-authentication process based on JWT",
|
||||
"strapi": {
|
||||
"name": "Roles & Permissions",
|
||||
@ -32,7 +32,7 @@
|
||||
"uuid": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"strapi-helper-plugin": "3.0.0-alpha.11.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.12"
|
||||
},
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
|
||||
@ -460,8 +460,8 @@ CREATE TABLE ${quote}${details[currentModel].tableName}${quote} (
|
||||
role ${details[currentModel].client === 'pg' ? 'integer' : 'int'},
|
||||
${quote}resetPasswordToken${quote} text,
|
||||
password text,
|
||||
updated_at ${details[currentModel].client === 'pg' ? 'timestamp with time zone' : 'timestamp'},
|
||||
created_at ${details[currentModel].client === 'pg' ? 'timestamp with time zone' : 'timestamp'}
|
||||
updated_at ${details[currentModel].client === 'pg' ? 'timestamp with time zone' : 'timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'},
|
||||
created_at ${details[currentModel].client === 'pg' ? 'timestamp with time zone' : 'timestamp DEFAULT CURRENT_TIMESTAMP'}
|
||||
);`);
|
||||
break;
|
||||
case 'role':
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-redis",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"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.11.3"
|
||||
"strapi-utils": "3.0.0-alpha.12"
|
||||
},
|
||||
"strapi": {
|
||||
"isHook": true
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-upload-aws-s3",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "AWS S3 provider for strapi upload",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-upload-cloudinary",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Cloudinary provider for strapi upload",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-upload-local",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Local provider for strapi upload",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-utils",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"description": "Shared utilities for the Strapi packages",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
||||
@ -24,7 +24,7 @@ try {
|
||||
// Check if path is existing.
|
||||
fs.accessSync(adminDirPath, fs.constants.R_OK | fs.constants.W_OK);
|
||||
|
||||
const install = exec(`cd ${adminDirPath} && npm install --prod --ignore-scripts`, {
|
||||
const install = exec(`cd "${adminDirPath}" && npm install --prod --ignore-scripts`, {
|
||||
silent: true
|
||||
});
|
||||
|
||||
@ -35,8 +35,8 @@ try {
|
||||
|
||||
console.log('✅ Success');
|
||||
console.log('');
|
||||
} catch (err) {
|
||||
if (err.code === 'ENOENT') {
|
||||
} catch (e) {
|
||||
if (e.code === 'ENOENT') {
|
||||
console.log('✅ Success');
|
||||
console.log('');
|
||||
|
||||
@ -60,7 +60,7 @@ try {
|
||||
console.log('📦 Installing packages...');
|
||||
|
||||
try {
|
||||
const install = exec(`cd ${pluginPath} && npm install --prod --ignore-scripts`, {
|
||||
const install = exec(`cd "${pluginPath}" && npm install --prod --ignore-scripts`, {
|
||||
silent: true
|
||||
});
|
||||
|
||||
@ -76,7 +76,7 @@ try {
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
if (err.code === 'ENOENT') {
|
||||
if (e.code === 'ENOENT') {
|
||||
console.log('✅ Success');
|
||||
console.log('');
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi",
|
||||
"version": "3.0.0-alpha.11.3",
|
||||
"version": "3.0.0-alpha.12",
|
||||
"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.11.3",
|
||||
"strapi-generate-admin": "3.0.0-alpha.11.3",
|
||||
"strapi-generate-api": "3.0.0-alpha.11.3",
|
||||
"strapi-generate-new": "3.0.0-alpha.11.3",
|
||||
"strapi-generate-plugin": "3.0.0-alpha.11.3",
|
||||
"strapi-generate-policy": "3.0.0-alpha.11.3",
|
||||
"strapi-generate-service": "3.0.0-alpha.11.3",
|
||||
"strapi-utils": "3.0.0-alpha.11.3"
|
||||
"strapi-generate": "3.0.0-alpha.12",
|
||||
"strapi-generate-admin": "3.0.0-alpha.12",
|
||||
"strapi-generate-api": "3.0.0-alpha.12",
|
||||
"strapi-generate-new": "3.0.0-alpha.12",
|
||||
"strapi-generate-plugin": "3.0.0-alpha.12",
|
||||
"strapi-generate-policy": "3.0.0-alpha.12",
|
||||
"strapi-generate-service": "3.0.0-alpha.12",
|
||||
"strapi-utils": "3.0.0-alpha.12"
|
||||
},
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user