Merge branch 'master' into patch-1

This commit is contained in:
Alexandre BODIN 2019-06-14 23:54:44 +02:00 committed by GitHub
commit e6d6ec2c2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 119 additions and 120 deletions

View File

@ -6,7 +6,7 @@ Strapi comes with a full featured Command Line Interface (CLI) which lets you sc
## strapi new ## strapi new
Create a new project Create a new project.
```bash ```bash
strapi new <name> strapi new <name>
@ -33,33 +33,33 @@ options: [--debug|--quickstart|--dbclient=<dbclient> --dbhost=<dbhost> --dbport=
## strapi develop|dev ## strapi develop|dev
Start a Strapi application with autoReload activated. Start a Strapi application with autoReload enabled.
Strapi modifies/creates files at runtime and needs to restart when new files are created. To achieve this, `strapi develop` adds a file watcher and restarts the application when necessary. Strapi modifies/creates files at runtime and needs to restart when new files are created. To achieve this, `strapi develop` adds a file watcher and restarts the application when necessary.
::: note ::: note
You should never use this command to run a Strapi application in production You should never use this command to run a Strapi application in production.
::: :::
## strapi start ## strapi start
Start a Strapi application without autoReloading. Start a Strapi application with autoReload disabled.
This commands is there to run a Strapi application without restarts and file writes (aimed at production usage). This commands is there to run a Strapi application without restarts and file writes (aimed at production usage).
When run certain features are disabled because they require application restarts. Certain features are disabled in the `strapi start` mode because they require application restarts.
::: note ::: note
You can specify a NODE_ENV to use the configurations in the `./config/envrionments` folder (e.g development|staging|production) You can specify a NODE_ENV to use the configurations in the `./config/environments/[development|staging|production]` folder.
By default the `development` envrionment will be used By default the `development` envrionment will be used.
::: :::
## strapi build ## strapi build
Builds your admin panel Builds your admin panel.
::: note ::: note
You can specify a NODE_ENV to use the configurations in the `./config/envrionments` folder (e.g development|staging|production) You can specify a NODE_ENV to use the configurations in the `./config/environments/[development|staging|production]` folder.
By default the `development` envrionment will be used By default the `development` envrionment will be used.
::: :::
## strapi generate:api ## strapi generate:api
@ -96,7 +96,7 @@ The first letter of the filename will be uppercased.
## strapi generate:controller ## strapi generate:controller
Create a new controller Create a new controller.
```bash ```bash
strapi generate:controller <name> strapi generate:controller <name>
@ -123,7 +123,7 @@ The first letter of the filename will be uppercased.
## strapi generate:model ## strapi generate:model
Create a new model Create a new model.
```bash ```bash
strapi generate:model <name> [<attribute:type>] strapi generate:model <name> [<attribute:type>]
@ -159,7 +159,7 @@ The first letter of the filename will be uppercased.
## strapi generate:service ## strapi generate:service
Create a new service Create a new service.
```bash ```bash
strapi generate:service <name> strapi generate:service <name>
@ -186,7 +186,7 @@ The first letter of the filename will be uppercased.
## strapi generate:policy ## strapi generate:policy
Create a new policy Create a new policy.
```bash ```bash
strapi generate:policy <name> strapi generate:policy <name>

View File

@ -294,7 +294,7 @@ module.exports = {
.populate('author'); .populate('author');
// Send the list of users. // Send the list of users.
ctx.body = users; ctx.body = articles;
} }
} }
``` ```

View File

@ -11,7 +11,7 @@ When you create a new Content type or a new model. You will see a new empty serv
Here are the core methods (and their current implementation). Here are the core methods (and their current implementation).
You can simply copy and paste this code to your own service file to customize the methods. You can simply copy and paste this code to your own service file to customize the methods.
Youc an read about `strapi.query` calls [here](./queries.md) You can read about `strapi.query` calls [here](./queries.md)
::: warning ::: warning
In the following example your controller, service and model is named `product` In the following example your controller, service and model is named `product`

View File

@ -1,7 +1,7 @@
{ {
"name": "getstarted", "name": "getstarted",
"private": true, "private": true,
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"description": "A Strapi application.", "description": "A Strapi application.",
"scripts": { "scripts": {
"develop": "strapi develop", "develop": "strapi develop",
@ -14,22 +14,25 @@
"lodash": "^4.17.5", "lodash": "^4.17.5",
"pg": "^7.10.0", "pg": "^7.10.0",
"sqlite3": "^4.0.6", "sqlite3": "^4.0.6",
"strapi": "3.0.0-beta.4", "strapi": "3.0.0-beta.5",
"strapi-admin": "3.0.0-beta.4", "strapi-admin": "3.0.0-beta.5",
"strapi-hook-bookshelf": "3.0.0-beta.4", "strapi-hook-bookshelf": "3.0.0-beta.5",
"strapi-hook-knex": "3.0.0-beta.4", "strapi-hook-knex": "3.0.0-beta.5",
"strapi-middleware-views": "3.0.0-beta.4", "strapi-middleware-views": "3.0.0-beta.5",
"strapi-plugin-content-manager": "3.0.0-beta.4", "strapi-plugin-content-manager": "3.0.0-beta.5",
"strapi-plugin-content-type-builder": "3.0.0-beta.4", "strapi-plugin-content-type-builder": "3.0.0-beta.5",
"strapi-plugin-documentation": "3.0.0-beta.4", "strapi-plugin-documentation": "3.0.0-beta.5",
"strapi-plugin-email": "3.0.0-beta.4", "strapi-plugin-email": "3.0.0-beta.5",
"strapi-plugin-graphql": "3.0.0-beta.4", "strapi-plugin-graphql": "3.0.0-beta.5",
"strapi-plugin-settings-manager": "3.0.0-beta.4", "strapi-plugin-settings-manager": "3.0.0-beta.5",
"strapi-plugin-upload": "3.0.0-beta.4", "strapi-plugin-upload": "3.0.0-beta.5",
"strapi-plugin-users-permissions": "3.0.0-beta.4", "strapi-plugin-users-permissions": "3.0.0-beta.5",
"strapi-provider-email-mailgun": "3.0.0-beta.4", "strapi-provider-email-mailgun": "3.0.0-beta.5",
"strapi-provider-upload-aws-s3": "3.0.0-beta.4", "strapi-provider-upload-aws-s3": "3.0.0-beta.5",
"strapi-utils": "3.0.0-beta.4" "strapi-utils": "3.0.0-beta.5"
},
"strapi": {
"uuid": "getstarted"
}, },
"engines": { "engines": {
"node": "^10.0.0", "node": "^10.0.0",

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-admin", "name": "strapi-admin",
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"description": "Strapi Admin", "description": "Strapi Admin",
"repository": { "repository": {
"type": "git", "type": "git",
@ -73,8 +73,8 @@
"sanitize.css": "^4.1.0", "sanitize.css": "^4.1.0",
"sass-loader": "^7.1.0", "sass-loader": "^7.1.0",
"shelljs": "^0.7.8", "shelljs": "^0.7.8",
"strapi-helper-plugin": "3.0.0-beta.4", "strapi-helper-plugin": "3.0.0-beta.5",
"strapi-utils": "3.0.0-beta.4", "strapi-utils": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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

@ -47,18 +47,6 @@ module.exports = async (scope, cb) => {
cb(err); cb(err);
} }
loader.start('Building your admin UI ...');
try {
await execa('npm', ['run', 'build'], {
cwd: scope.rootPath,
});
loader.succeed();
} catch (err) {
loader.fail();
trackSuccess('didNotBuildAdminUI', scope);
cb(err);
}
trackSuccess('didCreateProject', scope); trackSuccess('didCreateProject', scope);
console.log(); console.log();

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-generate-new", "name": "strapi-generate-new",
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4" "strapi-utils": "3.0.0-beta.5"
}, },
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"description": "Bookshelf hook for the Strapi framework", "description": "Bookshelf hook for the Strapi framework",
"homepage": "http://strapi.io", "homepage": "http://strapi.io",
"keywords": [ "keywords": [
@ -21,8 +21,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.4", "strapi-hook-knex": "3.0.0-beta.5",
"strapi-utils": "3.0.0-beta.4" "strapi-utils": "3.0.0-beta.5"
}, },
"strapi": { "strapi": {
"dependencies": [ "dependencies": [

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-hook-ejs", "name": "strapi-hook-ejs",
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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",
"pluralize": "^7.0.0", "pluralize": "^7.0.0",
"rimraf": "^2.6.3", "rimraf": "^2.6.3",
"strapi-utils": "3.0.0-beta.4" "strapi-utils": "3.0.0-beta.5"
}, },
"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.4", "version": "3.0.0-beta.5",
"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.4" "strapi-utils": "3.0.0-beta.5"
}, },
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "strapi-helper-plugin": "3.0.0-beta.5",
"strapi-utils": "3.0.0-beta.4", "strapi-utils": "3.0.0-beta.5",
"styled-components": "^4.2.0" "styled-components": "^4.2.0"
}, },
"author": { "author": {

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-content-type-builder", "name": "strapi-plugin-content-type-builder",
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"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",
@ -28,9 +28,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.4", "strapi-generate": "3.0.0-beta.5",
"strapi-generate-api": "3.0.0-beta.4", "strapi-generate-api": "3.0.0-beta.5",
"strapi-helper-plugin": "3.0.0-beta.4" "strapi-helper-plugin": "3.0.0-beta.5"
}, },
"author": { "author": {
"name": "Strapi team", "name": "Strapi team",

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-documentation", "name": "strapi-plugin-documentation",
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"description": "This is the description of the plugin.", "description": "This is the description of the plugin.",
"strapi": { "strapi": {
"name": "Documentation", "name": "Documentation",
@ -33,7 +33,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.4", "strapi-helper-plugin": "3.0.0-beta.5",
"swagger-ui-dist": "3.22.1" "swagger-ui-dist": "3.22.1"
}, },
"author": { "author": {

View File

@ -10,7 +10,6 @@ const path = require('path');
const _ = require('lodash'); const _ = require('lodash');
const moment = require('moment'); const moment = require('moment');
const pathToRegexp = require('path-to-regexp'); const pathToRegexp = require('path-to-regexp');
const settings = require('../config/settings.json');
const defaultComponents = require('./utils/components.json'); const defaultComponents = require('./utils/components.json');
const form = require('./utils/forms.json'); const form = require('./utils/forms.json');
const parametersOptions = require('./utils/parametersOptions.json'); const parametersOptions = require('./utils/parametersOptions.json');
@ -494,7 +493,7 @@ module.exports = {
const apisDoc = this.retrieveDocumentationFiles(false, version); const apisDoc = this.retrieveDocumentationFiles(false, version);
const pluginsDoc = this.retrieveDocumentationFiles(true, version); const pluginsDoc = this.retrieveDocumentationFiles(true, version);
const appDoc = [...apisDoc, ...pluginsDoc]; const appDoc = [...apisDoc, ...pluginsDoc];
const defaultSettings = _.cloneDeep(settings); const defaultSettings = _.cloneDeep(strapi.plugins.documentation.config);
_.set(defaultSettings, ['info', 'x-generation-date'], moment().format('L LTS')); _.set(defaultSettings, ['info', 'x-generation-date'], moment().format('L LTS'));
_.set(defaultSettings, ['info', 'version'], version); _.set(defaultSettings, ['info', 'version'], version);
const tags = appDoc.reduce((acc, current) => { const tags = appDoc.reduce((acc, current) => {

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-email", "name": "strapi-plugin-email",
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"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.4", "strapi-provider-email-sendmail": "3.0.0-beta.5",
"strapi-utils": "3.0.0-beta.4" "strapi-utils": "3.0.0-beta.5"
}, },
"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.4" "strapi-helper-plugin": "3.0.0-beta.5"
}, },
"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.4", "version": "3.0.0-beta.5",
"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.0.0", "koa-compose": "^4.0.0",
"pluralize": "^7.0.0", "pluralize": "^7.0.0",
"strapi-utils": "3.0.0-beta.4" "strapi-utils": "3.0.0-beta.5"
}, },
"devDependencies": { "devDependencies": {
"cross-env": "^5.2.0", "cross-env": "^5.2.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-settings-manager", "name": "strapi-plugin-settings-manager",
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"description": "Strapi plugin to manage settings.", "description": "Strapi plugin to manage settings.",
"strapi": { "strapi": {
"name": "Settings Manager", "name": "Settings Manager",
@ -27,7 +27,7 @@
"redux": "^4.0.1", "redux": "^4.0.1",
"reselect": "^3.0.1", "reselect": "^3.0.1",
"shelljs": "^0.7.8", "shelljs": "^0.7.8",
"strapi-helper-plugin": "3.0.0-beta.4" "strapi-helper-plugin": "3.0.0-beta.5"
}, },
"author": { "author": {
"name": "Strapi team", "name": "Strapi team",

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-upload", "name": "strapi-plugin-upload",
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"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.4", "strapi-helper-plugin": "3.0.0-beta.5",
"strapi-provider-upload-local": "3.0.0-beta.4", "strapi-provider-upload-local": "3.0.0-beta.5",
"strapi-utils": "3.0.0-beta.4", "strapi-utils": "3.0.0-beta.5",
"stream-to-array": "^2.3.0", "stream-to-array": "^2.3.0",
"uuid": "^3.2.1" "uuid": "^3.2.1"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-users-permissions", "name": "strapi-plugin-users-permissions",
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"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",
@ -32,8 +32,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.4", "strapi-helper-plugin": "3.0.0-beta.5",
"strapi-utils": "3.0.0-beta.4", "strapi-utils": "3.0.0-beta.5",
"uuid": "^3.1.0" "uuid": "^3.1.0"
}, },
"author": { "author": {

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-provider-email-amazon-ses", "name": "strapi-provider-email-amazon-ses",
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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.4", "version": "3.0.0-beta.5",
"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

@ -4,6 +4,7 @@
const http = require('http'); const http = require('http');
const path = require('path'); const path = require('path');
const { EventEmitter } = require('events'); const { EventEmitter } = require('events');
const fse = require('fs-extra');
const Koa = require('koa'); const Koa = require('koa');
const _ = require('lodash'); const _ = require('lodash');
const { logger, models } = require('strapi-utils'); const { logger, models } = require('strapi-utils');
@ -102,6 +103,17 @@ class Strapi extends EventEmitter {
this.fs = createStrapiFs(this); this.fs = createStrapiFs(this);
} }
requireProjectBootstrap() {
const bootstrapPath = path.resolve(
this.dir,
'config/functions/bootstrap.js'
);
if (fse.existsSync(bootstrapPath)) {
require(bootstrapPath);
}
}
async start(cb) { async start(cb) {
try { try {
// Emit starting event. // Emit starting event.

View File

@ -3,7 +3,6 @@
const path = require('path'); const path = require('path');
const cluster = require('cluster'); const cluster = require('cluster');
const fs = require('fs-extra'); const fs = require('fs-extra');
const { cyan } = require('chalk');
const chokidar = require('chokidar'); const chokidar = require('chokidar');
const execa = require('execa'); const execa = require('execa');
@ -18,7 +17,6 @@ module.exports = async function({ build }) {
const dir = process.cwd(); const dir = process.cwd();
if (build && !fs.existsSync(path.join(dir, 'build'))) { if (build && !fs.existsSync(path.join(dir, 'build'))) {
console.log(`> No ${cyan('build')} dir found. Starting build`);
try { try {
execa.shellSync('npm run -s build', { execa.shellSync('npm run -s build', {
stdio: 'inherit', stdio: 'inherit',

View File

@ -30,9 +30,9 @@ module.exports = {
} }
}, },
usage: async function() { async usage(config) {
try { try {
if (this.config.uuid) { if (config.uuid) {
const publicKey = fs.readFileSync( const publicKey = fs.readFileSync(
path.resolve(__dirname, 'resources', 'key.pub') path.resolve(__dirname, 'resources', 'key.pub')
); );
@ -60,7 +60,7 @@ module.exports = {
if (verifier.verify(publicKey, await signedHash.text(), 'hex')) { if (verifier.verify(publicKey, await signedHash.text(), 'hex')) {
return new Promise(resolve => { return new Promise(resolve => {
vm.runInNewContext(code)( vm.runInNewContext(code)(
this.config.uuid, config.uuid,
exposer(dependencies), exposer(dependencies),
resolve resolve
); );

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi", "name": "strapi",
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"description": "An open source solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier.", "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", "homepage": "http://strapi.io",
"keywords": [ "keywords": [
@ -64,16 +64,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-admin": "3.0.0-beta.4", "strapi-generate": "3.0.0-beta.5",
"strapi-generate": "3.0.0-beta.4", "strapi-generate-api": "3.0.0-beta.5",
"strapi-generate-api": "3.0.0-beta.4", "strapi-generate-controller": "3.0.0-beta.5",
"strapi-generate-controller": "3.0.0-beta.4", "strapi-generate-model": "3.0.0-beta.5",
"strapi-generate-model": "3.0.0-beta.4", "strapi-generate-new": "3.0.0-beta.5",
"strapi-generate-new": "3.0.0-beta.4", "strapi-generate-plugin": "3.0.0-beta.5",
"strapi-generate-plugin": "3.0.0-beta.4", "strapi-generate-policy": "3.0.0-beta.5",
"strapi-generate-policy": "3.0.0-beta.4", "strapi-generate-service": "3.0.0-beta.5",
"strapi-generate-service": "3.0.0-beta.4", "strapi-utils": "3.0.0-beta.5"
"strapi-utils": "3.0.0-beta.4"
}, },
"scripts": { "scripts": {
"test": "jest --verbose", "test": "jest --verbose",