diff --git a/docs/3.0.0-beta.x/cli/CLI.md b/docs/3.0.0-beta.x/cli/CLI.md index 68be90962f..c363d82d5b 100644 --- a/docs/3.0.0-beta.x/cli/CLI.md +++ b/docs/3.0.0-beta.x/cli/CLI.md @@ -6,7 +6,7 @@ Strapi comes with a full featured Command Line Interface (CLI) which lets you sc ## strapi new -Create a new project +Create a new project. ```bash strapi new @@ -33,33 +33,33 @@ options: [--debug|--quickstart|--dbclient= --dbhost= --dbport= ## 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. ::: 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 -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). -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 -You can specify a NODE_ENV to use the configurations in the `./config/envrionments` folder (e.g development|staging|production) -By default the `development` envrionment will be used +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. ::: ## strapi build -Builds your admin panel +Builds your admin panel. ::: note -You can specify a NODE_ENV to use the configurations in the `./config/envrionments` folder (e.g development|staging|production) -By default the `development` envrionment will be used +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. ::: ## strapi generate:api @@ -96,7 +96,7 @@ The first letter of the filename will be uppercased. ## strapi generate:controller -Create a new controller +Create a new controller. ```bash strapi generate:controller @@ -123,7 +123,7 @@ The first letter of the filename will be uppercased. ## strapi generate:model -Create a new model +Create a new model. ```bash strapi generate:model [] @@ -159,7 +159,7 @@ The first letter of the filename will be uppercased. ## strapi generate:service -Create a new service +Create a new service. ```bash strapi generate:service @@ -186,7 +186,7 @@ The first letter of the filename will be uppercased. ## strapi generate:policy -Create a new policy +Create a new policy. ```bash strapi generate:policy diff --git a/docs/3.0.0-beta.x/guides/models.md b/docs/3.0.0-beta.x/guides/models.md index df28f7ddec..5cb61e7529 100644 --- a/docs/3.0.0-beta.x/guides/models.md +++ b/docs/3.0.0-beta.x/guides/models.md @@ -294,7 +294,7 @@ module.exports = { .populate('author'); // Send the list of users. - ctx.body = users; + ctx.body = articles; } } ``` diff --git a/docs/3.0.0-beta.x/guides/services.md b/docs/3.0.0-beta.x/guides/services.md index 4d1e3ec78f..d7900a0ce5 100644 --- a/docs/3.0.0-beta.x/guides/services.md +++ b/docs/3.0.0-beta.x/guides/services.md @@ -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). 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 In the following example your controller, service and model is named `product` diff --git a/examples/getstarted/package.json b/examples/getstarted/package.json index 191539b71f..3c9fc114a4 100644 --- a/examples/getstarted/package.json +++ b/examples/getstarted/package.json @@ -1,7 +1,7 @@ { "name": "getstarted", "private": true, - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "A Strapi application.", "scripts": { "develop": "strapi develop", @@ -14,22 +14,25 @@ "lodash": "^4.17.5", "pg": "^7.10.0", "sqlite3": "^4.0.6", - "strapi": "3.0.0-beta.4", - "strapi-admin": "3.0.0-beta.4", - "strapi-hook-bookshelf": "3.0.0-beta.4", - "strapi-hook-knex": "3.0.0-beta.4", - "strapi-middleware-views": "3.0.0-beta.4", - "strapi-plugin-content-manager": "3.0.0-beta.4", - "strapi-plugin-content-type-builder": "3.0.0-beta.4", - "strapi-plugin-documentation": "3.0.0-beta.4", - "strapi-plugin-email": "3.0.0-beta.4", - "strapi-plugin-graphql": "3.0.0-beta.4", - "strapi-plugin-settings-manager": "3.0.0-beta.4", - "strapi-plugin-upload": "3.0.0-beta.4", - "strapi-plugin-users-permissions": "3.0.0-beta.4", - "strapi-provider-email-mailgun": "3.0.0-beta.4", - "strapi-provider-upload-aws-s3": "3.0.0-beta.4", - "strapi-utils": "3.0.0-beta.4" + "strapi": "3.0.0-beta.5", + "strapi-admin": "3.0.0-beta.5", + "strapi-hook-bookshelf": "3.0.0-beta.5", + "strapi-hook-knex": "3.0.0-beta.5", + "strapi-middleware-views": "3.0.0-beta.5", + "strapi-plugin-content-manager": "3.0.0-beta.5", + "strapi-plugin-content-type-builder": "3.0.0-beta.5", + "strapi-plugin-documentation": "3.0.0-beta.5", + "strapi-plugin-email": "3.0.0-beta.5", + "strapi-plugin-graphql": "3.0.0-beta.5", + "strapi-plugin-settings-manager": "3.0.0-beta.5", + "strapi-plugin-upload": "3.0.0-beta.5", + "strapi-plugin-users-permissions": "3.0.0-beta.5", + "strapi-provider-email-mailgun": "3.0.0-beta.5", + "strapi-provider-upload-aws-s3": "3.0.0-beta.5", + "strapi-utils": "3.0.0-beta.5" + }, + "strapi": { + "uuid": "getstarted" }, "engines": { "node": "^10.0.0", diff --git a/lerna.json b/lerna.json index 7d6d96c288..11bb9d9261 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "packages": [ "packages/*", "examples/*" diff --git a/packages/strapi-admin/package.json b/packages/strapi-admin/package.json index acae915b4a..9537be3153 100644 --- a/packages/strapi-admin/package.json +++ b/packages/strapi-admin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-admin", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Strapi Admin", "repository": { "type": "git", @@ -73,8 +73,8 @@ "sanitize.css": "^4.1.0", "sass-loader": "^7.1.0", "shelljs": "^0.7.8", - "strapi-helper-plugin": "3.0.0-beta.4", - "strapi-utils": "3.0.0-beta.4", + "strapi-helper-plugin": "3.0.0-beta.5", + "strapi-utils": "3.0.0-beta.5", "style-loader": "^0.23.1", "styled-components": "^4.2.0", "terser-webpack-plugin": "^1.2.3", diff --git a/packages/strapi-generate-api/package.json b/packages/strapi-generate-api/package.json index 36569d71e6..5fafd44ba5 100644 --- a/packages/strapi-generate-api/package.json +++ b/packages/strapi-generate-api/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-api", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Generate an API for a Strapi application.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-controller/package.json b/packages/strapi-generate-controller/package.json index 9c858cd96e..3f8399b13a 100644 --- a/packages/strapi-generate-controller/package.json +++ b/packages/strapi-generate-controller/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-controller", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Generate a controller for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-model/package.json b/packages/strapi-generate-model/package.json index 252982c57a..838e4593db 100644 --- a/packages/strapi-generate-model/package.json +++ b/packages/strapi-generate-model/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-model", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Generate a model for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-new/lib/after.js b/packages/strapi-generate-new/lib/after.js index 533ae28682..b7f91be635 100644 --- a/packages/strapi-generate-new/lib/after.js +++ b/packages/strapi-generate-new/lib/after.js @@ -47,18 +47,6 @@ module.exports = async (scope, cb) => { 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); console.log(); diff --git a/packages/strapi-generate-new/package.json b/packages/strapi-generate-new/package.json index fd9012723a..ede117db9e 100644 --- a/packages/strapi-generate-new/package.json +++ b/packages/strapi-generate-new/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-new", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Generate a new Strapi application.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-plugin/package.json b/packages/strapi-generate-plugin/package.json index 1d1c7e078f..f2155ae943 100644 --- a/packages/strapi-generate-plugin/package.json +++ b/packages/strapi-generate-plugin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-plugin", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Generate an plugin for a Strapi application.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-policy/package.json b/packages/strapi-generate-policy/package.json index 2fe527744a..83ee1742e5 100644 --- a/packages/strapi-generate-policy/package.json +++ b/packages/strapi-generate-policy/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-policy", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Generate a policy for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-service/package.json b/packages/strapi-generate-service/package.json index 8793649805..e3e149f222 100644 --- a/packages/strapi-generate-service/package.json +++ b/packages/strapi-generate-service/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-service", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Generate a service for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate/package.json b/packages/strapi-generate/package.json index e1b0061a80..4a458f6fac 100644 --- a/packages/strapi-generate/package.json +++ b/packages/strapi-generate/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Master of ceremonies for the Strapi generators.", "homepage": "http://strapi.io", "keywords": [ @@ -20,7 +20,7 @@ "fs-extra": "^8.0.1", "lodash": "^4.17.11", "reportback": "^2.0.2", - "strapi-utils": "3.0.0-beta.4" + "strapi-utils": "3.0.0-beta.5" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-helper-plugin/package.json b/packages/strapi-helper-plugin/package.json index 4be253a5b0..1a8fcebf02 100644 --- a/packages/strapi-helper-plugin/package.json +++ b/packages/strapi-helper-plugin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-helper-plugin", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Helper for Strapi plugins development", "files": [ "dist" diff --git a/packages/strapi-hook-bookshelf/package.json b/packages/strapi-hook-bookshelf/package.json index 76a5e2f778..34c22f2d9c 100644 --- a/packages/strapi-hook-bookshelf/package.json +++ b/packages/strapi-hook-bookshelf/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-bookshelf", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Bookshelf hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -21,8 +21,8 @@ "lodash": "^4.17.11", "pluralize": "^7.0.0", "rimraf": "^2.6.3", - "strapi-hook-knex": "3.0.0-beta.4", - "strapi-utils": "3.0.0-beta.4" + "strapi-hook-knex": "3.0.0-beta.5", + "strapi-utils": "3.0.0-beta.5" }, "strapi": { "dependencies": [ diff --git a/packages/strapi-hook-ejs/package.json b/packages/strapi-hook-ejs/package.json index 9ac57e02c7..e394443ad2 100644 --- a/packages/strapi-hook-ejs/package.json +++ b/packages/strapi-hook-ejs/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-ejs", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "EJS hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-hook-knex/package.json b/packages/strapi-hook-knex/package.json index a429517baa..557750409a 100644 --- a/packages/strapi-hook-knex/package.json +++ b/packages/strapi-hook-knex/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-knex", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Knex hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-hook-mongoose/package.json b/packages/strapi-hook-mongoose/package.json index 9feb13e2bc..ea454f58a7 100644 --- a/packages/strapi-hook-mongoose/package.json +++ b/packages/strapi-hook-mongoose/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-mongoose", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Mongoose hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -20,7 +20,7 @@ "mongoose-float": "^1.0.4", "pluralize": "^7.0.0", "rimraf": "^2.6.3", - "strapi-utils": "3.0.0-beta.4" + "strapi-utils": "3.0.0-beta.5" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-hook-redis/package.json b/packages/strapi-hook-redis/package.json index 253d37f6d8..313f9649f3 100644 --- a/packages/strapi-hook-redis/package.json +++ b/packages/strapi-hook-redis/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-redis", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Redis hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -19,7 +19,7 @@ "lodash": "^4.17.11", "rimraf": "^2.6.3", "stack-trace": "0.0.10", - "strapi-utils": "3.0.0-beta.4" + "strapi-utils": "3.0.0-beta.5" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-middleware-views/package.json b/packages/strapi-middleware-views/package.json index 6348ce4282..2d1ded314f 100644 --- a/packages/strapi-middleware-views/package.json +++ b/packages/strapi-middleware-views/package.json @@ -1,6 +1,6 @@ { "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", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-plugin-content-manager/package.json b/packages/strapi-plugin-content-manager/package.json index b61c4df8d4..12294f7d2e 100644 --- a/packages/strapi-plugin-content-manager/package.json +++ b/packages/strapi-plugin-content-manager/package.json @@ -1,6 +1,6 @@ { "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.", "strapi": { "name": "Content Manager", @@ -32,8 +32,8 @@ "redux-immutable": "^4.0.0", "reselect": "^3.0.1", "showdown": "^1.9.0", - "strapi-helper-plugin": "3.0.0-beta.4", - "strapi-utils": "3.0.0-beta.4", + "strapi-helper-plugin": "3.0.0-beta.5", + "strapi-utils": "3.0.0-beta.5", "styled-components": "^4.2.0" }, "author": { diff --git a/packages/strapi-plugin-content-type-builder/package.json b/packages/strapi-plugin-content-type-builder/package.json index 271ad5723f..b4300287e0 100644 --- a/packages/strapi-plugin-content-type-builder/package.json +++ b/packages/strapi-plugin-content-type-builder/package.json @@ -1,6 +1,6 @@ { "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).", "strapi": { "name": "Content Type Builder", @@ -28,9 +28,9 @@ "redux": "^4.0.1", "redux-immutable": "^4.0.0", "reselect": "^3.0.1", - "strapi-generate": "3.0.0-beta.4", - "strapi-generate-api": "3.0.0-beta.4", - "strapi-helper-plugin": "3.0.0-beta.4" + "strapi-generate": "3.0.0-beta.5", + "strapi-generate-api": "3.0.0-beta.5", + "strapi-helper-plugin": "3.0.0-beta.5" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-documentation/package.json b/packages/strapi-plugin-documentation/package.json index 664ed96c46..5ddedcf150 100755 --- a/packages/strapi-plugin-documentation/package.json +++ b/packages/strapi-plugin-documentation/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-documentation", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "This is the description of the plugin.", "strapi": { "name": "Documentation", @@ -33,7 +33,7 @@ "redux": "^4.0.1", "redux-immutable": "^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" }, "author": { diff --git a/packages/strapi-plugin-documentation/services/Documentation.js b/packages/strapi-plugin-documentation/services/Documentation.js index 1f18253dae..3eb1c6bfbb 100755 --- a/packages/strapi-plugin-documentation/services/Documentation.js +++ b/packages/strapi-plugin-documentation/services/Documentation.js @@ -10,7 +10,6 @@ const path = require('path'); const _ = require('lodash'); const moment = require('moment'); const pathToRegexp = require('path-to-regexp'); -const settings = require('../config/settings.json'); const defaultComponents = require('./utils/components.json'); const form = require('./utils/forms.json'); const parametersOptions = require('./utils/parametersOptions.json'); @@ -494,7 +493,7 @@ module.exports = { const apisDoc = this.retrieveDocumentationFiles(false, version); const pluginsDoc = this.retrieveDocumentationFiles(true, version); 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', 'version'], version); const tags = appDoc.reduce((acc, current) => { diff --git a/packages/strapi-plugin-email/package.json b/packages/strapi-plugin-email/package.json index 938661fe61..2ccae1e668 100644 --- a/packages/strapi-plugin-email/package.json +++ b/packages/strapi-plugin-email/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-email", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "This is the description of the plugin.", "strapi": { "name": "Email", @@ -12,13 +12,13 @@ "test": "echo \"no tests yet\"" }, "dependencies": { - "strapi-provider-email-sendmail": "3.0.0-beta.4", - "strapi-utils": "3.0.0-beta.4" + "strapi-provider-email-sendmail": "3.0.0-beta.5", + "strapi-utils": "3.0.0-beta.5" }, "devDependencies": { "react-copy-to-clipboard": "5.0.1", "rimraf": "^2.6.3", - "strapi-helper-plugin": "3.0.0-beta.4" + "strapi-helper-plugin": "3.0.0-beta.5" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-graphql/package.json b/packages/strapi-plugin-graphql/package.json index b994ca88ae..d6a8128c7e 100644 --- a/packages/strapi-plugin-graphql/package.json +++ b/packages/strapi-plugin-graphql/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-graphql", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "This is the description of the plugin.", "strapi": { "name": "graphql", @@ -23,7 +23,7 @@ "graphql-type-long": "^0.1.1", "koa-compose": "^4.0.0", "pluralize": "^7.0.0", - "strapi-utils": "3.0.0-beta.4" + "strapi-utils": "3.0.0-beta.5" }, "devDependencies": { "cross-env": "^5.2.0", diff --git a/packages/strapi-plugin-settings-manager/package.json b/packages/strapi-plugin-settings-manager/package.json index ae92136844..01e56438a9 100644 --- a/packages/strapi-plugin-settings-manager/package.json +++ b/packages/strapi-plugin-settings-manager/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-settings-manager", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Strapi plugin to manage settings.", "strapi": { "name": "Settings Manager", @@ -27,7 +27,7 @@ "redux": "^4.0.1", "reselect": "^3.0.1", "shelljs": "^0.7.8", - "strapi-helper-plugin": "3.0.0-beta.4" + "strapi-helper-plugin": "3.0.0-beta.5" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-upload/package.json b/packages/strapi-plugin-upload/package.json index 715e3a5ddb..52165638f0 100644 --- a/packages/strapi-plugin-upload/package.json +++ b/packages/strapi-plugin-upload/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-upload", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "This is the description of the plugin.", "strapi": { "name": "Files Upload", @@ -23,9 +23,9 @@ "react-router-dom": "^5.0.0", "react-transition-group": "^2.5.0", "reactstrap": "^5.0.0", - "strapi-helper-plugin": "3.0.0-beta.4", - "strapi-provider-upload-local": "3.0.0-beta.4", - "strapi-utils": "3.0.0-beta.4", + "strapi-helper-plugin": "3.0.0-beta.5", + "strapi-provider-upload-local": "3.0.0-beta.5", + "strapi-utils": "3.0.0-beta.5", "stream-to-array": "^2.3.0", "uuid": "^3.2.1" }, diff --git a/packages/strapi-plugin-users-permissions/package.json b/packages/strapi-plugin-users-permissions/package.json index b836d68d94..7fe50bddaf 100644 --- a/packages/strapi-plugin-users-permissions/package.json +++ b/packages/strapi-plugin-users-permissions/package.json @@ -1,6 +1,6 @@ { "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", "strapi": { "name": "Roles & Permissions", @@ -32,8 +32,8 @@ "reactstrap": "^5.0.0", "redux-saga": "^0.16.0", "request": "^2.83.0", - "strapi-helper-plugin": "3.0.0-beta.4", - "strapi-utils": "3.0.0-beta.4", + "strapi-helper-plugin": "3.0.0-beta.5", + "strapi-utils": "3.0.0-beta.5", "uuid": "^3.1.0" }, "author": { diff --git a/packages/strapi-provider-email-amazon-ses/package.json b/packages/strapi-provider-email-amazon-ses/package.json index 66a6deb5c1..0c2e8e8e66 100644 --- a/packages/strapi-provider-email-amazon-ses/package.json +++ b/packages/strapi-provider-email-amazon-ses/package.json @@ -1,6 +1,6 @@ { "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", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-email-mailgun/package.json b/packages/strapi-provider-email-mailgun/package.json index fdc0e2b6a5..2955c3b42d 100644 --- a/packages/strapi-provider-email-mailgun/package.json +++ b/packages/strapi-provider-email-mailgun/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-email-mailgun", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Mailgun provider for strapi email plugin", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-email-sendgrid/package.json b/packages/strapi-provider-email-sendgrid/package.json index c86034844a..50a0fd5972 100644 --- a/packages/strapi-provider-email-sendgrid/package.json +++ b/packages/strapi-provider-email-sendgrid/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-email-sendgrid", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Sendgrid provider for strapi email", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-email-sendmail/package.json b/packages/strapi-provider-email-sendmail/package.json index 5ffea024a7..e6c64f4c74 100644 --- a/packages/strapi-provider-email-sendmail/package.json +++ b/packages/strapi-provider-email-sendmail/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-email-sendmail", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Sendmail provider for strapi email", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-upload-aws-s3/package.json b/packages/strapi-provider-upload-aws-s3/package.json index dcf5bbc1d9..1abf06fdc5 100644 --- a/packages/strapi-provider-upload-aws-s3/package.json +++ b/packages/strapi-provider-upload-aws-s3/package.json @@ -1,6 +1,6 @@ { "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", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-upload-cloudinary/package.json b/packages/strapi-provider-upload-cloudinary/package.json index aca4dd93d8..2fbed93877 100644 --- a/packages/strapi-provider-upload-cloudinary/package.json +++ b/packages/strapi-provider-upload-cloudinary/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-upload-cloudinary", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Cloudinary provider for strapi upload", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-upload-local/package.json b/packages/strapi-provider-upload-local/package.json index be94fa442c..e8e1def63b 100644 --- a/packages/strapi-provider-upload-local/package.json +++ b/packages/strapi-provider-upload-local/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-upload-local", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Local provider for strapi upload", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-upload-rackspace/package.json b/packages/strapi-provider-upload-rackspace/package.json index d57992d113..5f7b28ef0f 100644 --- a/packages/strapi-provider-upload-rackspace/package.json +++ b/packages/strapi-provider-upload-rackspace/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-upload-rackspace", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Rackspace provider for strapi upload", "main": "./lib", "keywords": [], diff --git a/packages/strapi-utils/package.json b/packages/strapi-utils/package.json index 3a941114c2..6dab5c11c5 100644 --- a/packages/strapi-utils/package.json +++ b/packages/strapi-utils/package.json @@ -1,6 +1,6 @@ { "name": "strapi-utils", - "version": "3.0.0-beta.4", + "version": "3.0.0-beta.5", "description": "Shared utilities for the Strapi packages", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi/lib/Strapi.js b/packages/strapi/lib/Strapi.js index 88a5ddbb65..ad3911547c 100644 --- a/packages/strapi/lib/Strapi.js +++ b/packages/strapi/lib/Strapi.js @@ -4,6 +4,7 @@ const http = require('http'); const path = require('path'); const { EventEmitter } = require('events'); +const fse = require('fs-extra'); const Koa = require('koa'); const _ = require('lodash'); const { logger, models } = require('strapi-utils'); @@ -102,6 +103,17 @@ class Strapi extends EventEmitter { this.fs = createStrapiFs(this); } + requireProjectBootstrap() { + const bootstrapPath = path.resolve( + this.dir, + 'config/functions/bootstrap.js' + ); + + if (fse.existsSync(bootstrapPath)) { + require(bootstrapPath); + } + } + async start(cb) { try { // Emit starting event. diff --git a/packages/strapi/lib/commands/develop.js b/packages/strapi/lib/commands/develop.js index ddf51deee6..2003baf61c 100644 --- a/packages/strapi/lib/commands/develop.js +++ b/packages/strapi/lib/commands/develop.js @@ -3,7 +3,6 @@ const path = require('path'); const cluster = require('cluster'); const fs = require('fs-extra'); -const { cyan } = require('chalk'); const chokidar = require('chokidar'); const execa = require('execa'); @@ -18,7 +17,6 @@ module.exports = async function({ build }) { const dir = process.cwd(); if (build && !fs.existsSync(path.join(dir, 'build'))) { - console.log(`> No ${cyan('build')} dir found. Starting build`); try { execa.shellSync('npm run -s build', { stdio: 'inherit', diff --git a/packages/strapi/lib/utils/index.js b/packages/strapi/lib/utils/index.js index 944a9bcc19..c8a78778c3 100644 --- a/packages/strapi/lib/utils/index.js +++ b/packages/strapi/lib/utils/index.js @@ -30,9 +30,9 @@ module.exports = { } }, - usage: async function() { + async usage(config) { try { - if (this.config.uuid) { + if (config.uuid) { const publicKey = fs.readFileSync( path.resolve(__dirname, 'resources', 'key.pub') ); @@ -60,7 +60,7 @@ module.exports = { if (verifier.verify(publicKey, await signedHash.text(), 'hex')) { return new Promise(resolve => { vm.runInNewContext(code)( - this.config.uuid, + config.uuid, exposer(dependencies), resolve ); diff --git a/packages/strapi/package.json b/packages/strapi/package.json index 274ba262a9..8731cea2e0 100644 --- a/packages/strapi/package.json +++ b/packages/strapi/package.json @@ -1,6 +1,6 @@ { "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.", "homepage": "http://strapi.io", "keywords": [ @@ -64,16 +64,15 @@ "resolve-cwd": "^3.0.0", "rimraf": "^2.6.2", "shelljs": "^0.8.3", - "strapi-admin": "3.0.0-beta.4", - "strapi-generate": "3.0.0-beta.4", - "strapi-generate-api": "3.0.0-beta.4", - "strapi-generate-controller": "3.0.0-beta.4", - "strapi-generate-model": "3.0.0-beta.4", - "strapi-generate-new": "3.0.0-beta.4", - "strapi-generate-plugin": "3.0.0-beta.4", - "strapi-generate-policy": "3.0.0-beta.4", - "strapi-generate-service": "3.0.0-beta.4", - "strapi-utils": "3.0.0-beta.4" + "strapi-generate": "3.0.0-beta.5", + "strapi-generate-api": "3.0.0-beta.5", + "strapi-generate-controller": "3.0.0-beta.5", + "strapi-generate-model": "3.0.0-beta.5", + "strapi-generate-new": "3.0.0-beta.5", + "strapi-generate-plugin": "3.0.0-beta.5", + "strapi-generate-policy": "3.0.0-beta.5", + "strapi-generate-service": "3.0.0-beta.5", + "strapi-utils": "3.0.0-beta.5" }, "scripts": { "test": "jest --verbose",