Merge branch 'master' into graphql/mutations-aggregations-decimals

This commit is contained in:
Jason Lei 2018-09-15 19:53:48 +08:00 committed by GitHub
commit a3bdd9b3fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 100 additions and 70 deletions

View File

@ -1,6 +1,6 @@
{
"private": true,
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"dependencies": {},
"devDependencies": {
"assert": "~1.3.0",

View File

@ -1,6 +1,6 @@
{
"name": "strapi-admin",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Strapi Admin",
"repository": {
"type": "git",
@ -31,8 +31,8 @@
},
"devDependencies": {
"sanitize.css": "^4.1.0",
"strapi-helper-plugin": "3.0.0-alpha.14.1",
"strapi-utils": "3.0.0-alpha.14.1"
"strapi-helper-plugin": "3.0.0-alpha.14.1.1",
"strapi-utils": "3.0.0-alpha.14.1.1"
},
"author": {
"name": "Strapi",

View File

@ -1,6 +1,6 @@
{
"name": "strapi-email-amazon-ses",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Amazon SES provider for strapi email",
"homepage": "http://strapi.io",
"keywords": [

View File

@ -1,6 +1,6 @@
{
"name": "strapi-email-mailgun",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Mailgun provider for strapi email plugin",
"homepage": "http://strapi.io",
"keywords": [

View File

@ -1,6 +1,6 @@
{
"name": "strapi-email-sendgrid",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Sendgrid provider for strapi email",
"homepage": "http://strapi.io",
"keywords": [

View File

@ -1,6 +1,6 @@
{
"name": "strapi-email-sendmail",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Sendmail provider for strapi email",
"homepage": "http://strapi.io",
"keywords": [

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "strapi-generate-api",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"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.14.1",
"version": "3.0.0-alpha.14.1.1",
"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.14.1",
"version": "3.0.0-alpha.14.1.1",
"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.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Generate a new Strapi application.",
"homepage": "http://strapi.io",
"keywords": [
@ -19,7 +19,7 @@
"listr": "^0.14.1",
"lodash": "^4.17.5",
"ora": "^2.1.0",
"strapi-utils": "3.0.0-alpha.14.1",
"strapi-utils": "3.0.0-alpha.14.1.1",
"uuid": "^3.1.0"
},
"scripts": {

View File

@ -1,6 +1,6 @@
{
"name": "strapi-generate-plugin",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"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.14.1",
"version": "3.0.0-alpha.14.1.1",
"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.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Generate a service for a Strapi API.",
"homepage": "http://strapi.io",
"keywords": [

View File

@ -1,6 +1,6 @@
{
"name": "strapi-generate",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"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.5",
"reportback": "^2.0.1",
"strapi-utils": "3.0.0-alpha.14.1"
"strapi-utils": "3.0.0-alpha.14.1.1"
},
"author": {
"name": "Strapi team",

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "strapi-hook-bookshelf",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Bookshelf hook for the Strapi framework",
"homepage": "http://strapi.io",
"keywords": [
@ -20,8 +20,8 @@
"inquirer": "^5.2.0",
"lodash": "^4.17.5",
"pluralize": "^6.0.0",
"strapi-hook-knex": "3.0.0-alpha.14.1",
"strapi-utils": "3.0.0-alpha.14.1"
"strapi-hook-knex": "3.0.0-alpha.14.1.1",
"strapi-utils": "3.0.0-alpha.14.1.1"
},
"strapi": {
"dependencies": [

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "strapi-hook-knex",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Knex hook for the Strapi framework",
"homepage": "http://strapi.io",
"keywords": [

View File

@ -1,6 +1,6 @@
{
"name": "strapi-hook-mongoose",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Mongoose hook for the Strapi framework",
"homepage": "http://strapi.io",
"keywords": [
@ -19,7 +19,7 @@
"mongoose": "^5.0.16",
"mongoose-float": "^1.0.2",
"pluralize": "^6.0.0",
"strapi-utils": "3.0.0-alpha.14.1"
"strapi-utils": "3.0.0-alpha.14.1.1"
},
"author": {
"email": "hi@strapi.io",

View File

@ -1,6 +1,6 @@
{
"name": "strapi-hook-redis",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Redis hook for the Strapi framework",
"homepage": "http://strapi.io",
"keywords": [
@ -18,7 +18,7 @@
"ioredis": "^3.1.2",
"lodash": "^4.17.5",
"stack-trace": "0.0.10",
"strapi-utils": "3.0.0-alpha.14.1"
"strapi-utils": "3.0.0-alpha.14.1.1"
},
"author": {
"email": "hi@strapi.io",

View File

@ -1,6 +1,6 @@
{
"name": "strapi-lint",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Strapi eslint and prettier configurations",
"directories": {
"lib": "lib"

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-content-manager",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "A powerful UI to easily manage your data.",
"strapi": {
"name": "Content Manager",
@ -26,7 +26,7 @@
"draft-js": "^0.10.5",
"react-select": "^1.2.1",
"showdown": "^1.8.6",
"strapi-helper-plugin": "3.0.0-alpha.14.1"
"strapi-helper-plugin": "3.0.0-alpha.14.1.1"
},
"dependencies": {
"pluralize": "^7.0.0"

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-content-type-builder",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Strapi plugin to create content type (API).",
"strapi": {
"name": "Content Type Builder",
@ -24,11 +24,11 @@
"dependencies": {
"immutable": "^3.8.2",
"pluralize": "^7.0.0",
"strapi-generate": "3.0.0-alpha.14.1",
"strapi-generate-api": "3.0.0-alpha.14.1"
"strapi-generate": "3.0.0-alpha.14.1.1",
"strapi-generate-api": "3.0.0-alpha.14.1.1"
},
"devDependencies": {
"strapi-helper-plugin": "3.0.0-alpha.14.1"
"strapi-helper-plugin": "3.0.0-alpha.14.1.1"
},
"author": {
"name": "Strapi team",

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-email",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "This is the description of the plugin.",
"strapi": {
"name": "Email",
@ -22,11 +22,11 @@
"prepublishOnly": "IS_MONOREPO=true npm run build"
},
"dependencies": {
"strapi-email-sendmail": "3.0.0-alpha.14.1"
"strapi-email-sendmail": "3.0.0-alpha.14.1.1"
},
"devDependencies": {
"react-copy-to-clipboard": "5.0.1",
"strapi-helper-plugin": "3.0.0-alpha.14.1"
"strapi-helper-plugin": "3.0.0-alpha.14.1.1"
},
"author": {
"name": "Strapi team",

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-graphql",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "This is the description of the plugin.",
"strapi": {
"name": "graphql",
@ -30,7 +30,7 @@
"graphql-type-json": "^0.2.1",
"graphql-type-datetime": "^0.2.2",
"pluralize": "^7.0.0",
"strapi-utils": "3.0.0-alpha.14.1"
"strapi-utils": "3.0.0-alpha.14.1.1"
},
"author": {
"name": "A Strapi developer",

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-settings-manager",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"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.14.1"
"strapi-helper-plugin": "3.0.0-alpha.14.1.1"
},
"author": {
"name": "Strapi team",

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-upload",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "This is the description of the plugin.",
"strapi": {
"name": "Files Upload",
@ -23,12 +23,12 @@
},
"dependencies": {
"react-copy-to-clipboard": "^5.0.1",
"strapi-upload-local": "3.0.0-alpha.14.1",
"strapi-upload-local": "3.0.0-alpha.14.1.1",
"stream-to-array": "^2.3.0",
"uuid": "^3.2.1"
},
"devDependencies": {
"strapi-helper-plugin": "3.0.0-alpha.14.1"
"strapi-helper-plugin": "3.0.0-alpha.14.1.1"
},
"author": {
"name": "A Strapi developer",

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-users-permissions",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"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.14.1"
"strapi-helper-plugin": "3.0.0-alpha.14.1.1"
},
"author": {
"name": "Strapi team",

View File

@ -1,6 +1,6 @@
{
"name": "strapi-upload-aws-s3",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "AWS S3 provider for strapi upload",
"homepage": "http://strapi.io",
"keywords": [

View File

@ -1,6 +1,6 @@
{
"name": "strapi-upload-cloudinary",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Cloudinary provider for strapi upload",
"homepage": "http://strapi.io",
"keywords": [

View File

@ -1,6 +1,6 @@
{
"name": "strapi-upload-local",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Local provider for strapi upload",
"homepage": "http://strapi.io",
"keywords": [

View File

@ -1,6 +1,6 @@
{
"name": "strapi-upload-rackspace",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"description": "Rackspace provider for strapi upload",
"main": "./lib",
"scripts": {

View File

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

View File

@ -382,6 +382,31 @@ const enableHookNestedDependencies = function (name, flattenHooksConfig, force =
}
};
/**
* Allow dynamic config values through
* the native ES6 template string function.
*/
const regex = /\$\{[^()]*\}/g;
const excludeConfigPaths = ['info.scripts'];
const templateConfigurations = function (obj, configPath = '') {
// Allow values which looks like such as
// an ES6 literal string without parenthesis inside (aka function call).
// Exclude config with conflicting syntax (e.g. npm scripts).
return Object.keys(obj).reduce((acc, key) => {
if (isPlainObject(obj[key]) && !isString(obj[key])) {
acc[key] = templateConfigurations(obj[key], `${configPath}.${key}`);
} else if (isString(obj[key])
&& !excludeConfigPaths.includes(configPath.substr(1))
&& obj[key].match(regex) !== null) {
acc[key] = eval('`' + obj[key] + '`'); // eslint-disable-line prefer-template
} else {
acc[key] = obj[key];
}
return acc;
}, {});
};
const isAdminInDevMode = function () {
try {
fs.accessSync(path.resolve(this.config.appPath, 'admin', 'admin', 'build', 'index.html'), fs.constants.R_OK | fs.constants.W_OK);

View File

@ -100,9 +100,14 @@ module.exports = async function() {
// Create `plugins.json` file.
// Don't inject the plugins without an Admin
const existingPlugins = await Object.keys(this.plugins).filter(plugin =>
fs.pathExists(path.resolve(this.config.appPath, 'plugins', plugin, 'admin', 'src', 'containers', 'App')),
);
const existingPlugins = Object.keys(this.plugins).filter(plugin => {
try {
fs.accessSync(path.resolve(this.config.appPath, 'plugins', plugin, 'admin', 'src', 'containers', 'App'));
return true;
} catch(err) {
return false;
}
});
const existingPluginsInfo = existingPlugins.map(id => ({
id,

View File

@ -1,6 +1,6 @@
{
"name": "strapi",
"version": "3.0.0-alpha.14.1",
"version": "3.0.0-alpha.14.1.1",
"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": [
@ -58,16 +58,16 @@
"rimraf": "^2.6.2",
"semver": "^5.4.1",
"stack-trace": "0.0.10",
"strapi-generate": "3.0.0-alpha.14.1",
"strapi-generate-admin": "3.0.0-alpha.14.1",
"strapi-generate-api": "3.0.0-alpha.14.1",
"strapi-generate-controller": "3.0.0-alpha.14.1",
"strapi-generate-model": "3.0.0-alpha.14.1",
"strapi-generate-new": "3.0.0-alpha.14.1",
"strapi-generate-plugin": "3.0.0-alpha.14.1",
"strapi-generate-policy": "3.0.0-alpha.14.1",
"strapi-generate-service": "3.0.0-alpha.14.1",
"strapi-utils": "3.0.0-alpha.14.1"
"strapi-generate": "3.0.0-alpha.14.1.1",
"strapi-generate-admin": "3.0.0-alpha.14.1.1",
"strapi-generate-api": "3.0.0-alpha.14.1.1",
"strapi-generate-controller": "3.0.0-alpha.14.1.1",
"strapi-generate-model": "3.0.0-alpha.14.1.1",
"strapi-generate-new": "3.0.0-alpha.14.1.1",
"strapi-generate-plugin": "3.0.0-alpha.14.1.1",
"strapi-generate-policy": "3.0.0-alpha.14.1.1",
"strapi-generate-service": "3.0.0-alpha.14.1.1",
"strapi-utils": "3.0.0-alpha.14.1.1"
},
"author": {
"email": "hi@strapi.io",