From 3d7dacef70b9bab234b34566b8df402088de82d3 Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Fri, 16 Nov 2018 15:53:00 +0100 Subject: [PATCH 01/36] Apply options on Mongoose instance --- packages/strapi-hook-mongoose/lib/index.js | 2 +- .../models/User.settings.json | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/strapi-hook-mongoose/lib/index.js b/packages/strapi-hook-mongoose/lib/index.js index b2cc899a6a..bd7b50924c 100644 --- a/packages/strapi-hook-mongoose/lib/index.js +++ b/packages/strapi-hook-mongoose/lib/index.js @@ -88,7 +88,7 @@ module.exports = function (strapi) { return cb(errMsg); } - Object.keys(options, key => instance.set(key, options[key])); + Object.keys(options).map(key => instance.set(key, options[key])); const mountModels = (models, target, plugin = false) => { if (!target) return; diff --git a/packages/strapi-plugin-users-permissions/models/User.settings.json b/packages/strapi-plugin-users-permissions/models/User.settings.json index 654352c22c..2ecac99d65 100644 --- a/packages/strapi-plugin-users-permissions/models/User.settings.json +++ b/packages/strapi-plugin-users-permissions/models/User.settings.json @@ -37,7 +37,7 @@ "type": "boolean", "default": false, "configurable": false - }, + }, "blocked": { "type": "boolean", "default": false, @@ -48,6 +48,10 @@ "via": "users", "plugin": "users-permissions", "configurable": false + }, + "products": { + "collection": "product", + "via": "users" } } -} +} \ No newline at end of file From a30c7844a94a7dbaeaf0989abc95222037bcd3a7 Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Mon, 19 Nov 2018 16:58:16 +0100 Subject: [PATCH 02/36] Generate generic dataloader for manyToMany relationships --- .../services/Resolvers.js | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/packages/strapi-plugin-graphql/services/Resolvers.js b/packages/strapi-plugin-graphql/services/Resolvers.js index 8c117334f6..69b936c524 100644 --- a/packages/strapi-plugin-graphql/services/Resolvers.js +++ b/packages/strapi-plugin-graphql/services/Resolvers.js @@ -7,6 +7,7 @@ */ const _ = require('lodash'); +const DataLoader = require('dataloader'); const pluralize = require('pluralize'); const Aggregator = require('./Aggregator'); const Query = require('./Query.js'); @@ -361,6 +362,14 @@ module.exports = { default: } + // TODO: + // - For each association, I've to create a loader. + // - Each loader only return one kind of data (user, product or category). + // - Each loader should only execute one request. + // - Maybe, I should create specific loader to handle `where` condition like this https://github.com/facebook/dataloader/blob/master/examples/Knex.md + + this.loaders[association.collection || association.model] = this.createLoader(association.collection || association.model, association.plugin); + _.merge(acc.resolver[globalId], { [association.alias]: async (obj, options) => { // eslint-disable-line no-unused-vars @@ -412,6 +421,11 @@ module.exports = { [ref.primaryKey]: arrayOfIds, ...where.where, }).where; + + if (this.loaders[association.collection || association.model]) { + // return this.loaders[association.collection].load({ ids: arrayOfIds, query: queryOpts.query }); + return arrayOfIds.map(id => this.loaders[association.collection || association.model].load({ ids: arrayOfIds, options: queryOpts })); + } break; // falls through } @@ -446,4 +460,72 @@ module.exports = { return acc; }, initialState); }, + + loaders: {}, + + createLoader: function(model) { + return new DataLoader(keys => { + return new Promise(async (resolve, reject) => { + try { + const { ids, options } = this.extractQueries(keys); + console.log(ids); + const request = await strapi.plugins['content-manager'].services['contentmanager'].fetchAll({ model }, { + ...query, + query: { + _id: _.uniq(ids.map(x => x.toString())) + }, + populate: [] + }); + + const entries = request && request.toJSON ? request.toJSON() : request; + const data = ids.map(id => entries.find(x => (x.id || x._id) == id)); + + resolve(data); + } catch (e) { + reject(e); + } + }); + }, { + cacheKeyFn: (key) => { + return _.isObjectLike(key) ? JSON.stringify(_.cloneDeep(key)) : key; + } + }) + }, + + extractQueries: function(keys) { + const queries = []; + const queriesOptions = []; + + console.log(keys); + + keys.forEach((current, index) => { + if (index < 1) { + queries.push(current.ids); + queriesOptions.push(current.query); + } + + // Find similar query. + const indexQueriesOptions = queriesOptions.findIndex(queryOption => _.isEqual(queryOption, current.query)); + + if (indexQueriesOptions) { + // Push to this query the new IDs to fetch. + queries[indexQueriesOptions].push(...current.ids); + } else { + // Create new query in the query. + // Note: The query and the query options have the same index in both arrays. + queries.push(current.ids); + queriesOptions.push(current.query); + } + }); + + console.log(queries); + console.log(queriesOptions); + + // const ids = _.uniq(_.flatten(keys.map(query => query.ids.map(x => x.toString())))); + + + return { + ids + } + } }; From 402d1fb4b6727b6e09eece0f33828ad035d14023 Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Wed, 21 Nov 2018 19:37:19 +0100 Subject: [PATCH 03/36] Map result to retrieve data from loaders --- packages/strapi-generate-admin/package.json | 4 +- packages/strapi-generate-api/package.json | 2 +- packages/strapi-generate-new/package.json | 4 +- packages/strapi-generate/package.json | 4 +- packages/strapi-helper-plugin/package.json | 2 +- packages/strapi-hook-bookshelf/package.json | 6 +- packages/strapi-hook-knex/package.json | 2 +- packages/strapi-hook-mongoose/package.json | 4 +- packages/strapi-lint/package.json | 2 +- .../package.json | 4 +- .../package.json | 8 +- packages/strapi-plugin-email/package.json | 4 +- packages/strapi-plugin-graphql/package.json | 5 +- .../services/Resolvers.js | 76 +++++++++++-------- .../package.json | 4 +- packages/strapi-plugin-upload/package.json | 4 +- .../package.json | 4 +- packages/strapi-utils/package.json | 2 +- 18 files changed, 76 insertions(+), 65 deletions(-) diff --git a/packages/strapi-generate-admin/package.json b/packages/strapi-generate-admin/package.json index 753028126d..8a48e7d9ce 100644 --- a/packages/strapi-generate-admin/package.json +++ b/packages/strapi-generate-admin/package.json @@ -15,7 +15,7 @@ "dependencies": { "fs-extra": "^4.0.1", "lodash": "^4.17.5", - "strapi-admin": "3.0.0-alpha.14.5", + "strapi-admin": "file:../strapi-admin", "strapi-utils": "3.0.0-alpha.14.5" }, "author": { @@ -42,4 +42,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-generate-api/package.json b/packages/strapi-generate-api/package.json index 578b7f715f..02da03c389 100644 --- a/packages/strapi-generate-api/package.json +++ b/packages/strapi-generate-api/package.json @@ -43,4 +43,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-generate-new/package.json b/packages/strapi-generate-new/package.json index 1aa3398e36..203af317b6 100644 --- a/packages/strapi-generate-new/package.json +++ b/packages/strapi-generate-new/package.json @@ -19,7 +19,7 @@ "listr": "^0.14.1", "lodash": "^4.17.5", "ora": "^2.1.0", - "strapi-utils": "3.0.0-alpha.14.5", + "strapi-utils": "file:../strapi-utils", "uuid": "^3.1.0" }, "scripts": { @@ -49,4 +49,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-generate/package.json b/packages/strapi-generate/package.json index a2265da64e..dff2af0a40 100644 --- a/packages/strapi-generate/package.json +++ b/packages/strapi-generate/package.json @@ -17,7 +17,7 @@ "fs-extra": "^4.0.0", "lodash": "^4.17.5", "reportback": "^2.0.1", - "strapi-utils": "3.0.0-alpha.14.5" + "strapi-utils": "file:../strapi-utils" }, "author": { "name": "Strapi team", @@ -43,4 +43,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-helper-plugin/package.json b/packages/strapi-helper-plugin/package.json index 65cbb948e7..0b5c708302 100644 --- a/packages/strapi-helper-plugin/package.json +++ b/packages/strapi-helper-plugin/package.json @@ -106,4 +106,4 @@ "webpack-hot-middleware": "^2.18.2", "whatwg-fetch": "^2.0.3" } -} \ No newline at end of file +} diff --git a/packages/strapi-hook-bookshelf/package.json b/packages/strapi-hook-bookshelf/package.json index fcc26d0293..5f960ff120 100644 --- a/packages/strapi-hook-bookshelf/package.json +++ b/packages/strapi-hook-bookshelf/package.json @@ -21,8 +21,8 @@ "lodash": "^4.17.5", "pluralize": "^6.0.0", "rimraf": "^2.6.2", - "strapi-hook-knex": "3.0.0-alpha.14.5", - "strapi-utils": "3.0.0-alpha.14.5" + "strapi-hook-knex": "file:../strapi-hook-knex", + "strapi-utils": "file:../strapi-utils" }, "strapi": { "dependencies": [ @@ -56,4 +56,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-hook-knex/package.json b/packages/strapi-hook-knex/package.json index 7fce5ffa12..4f035d2d68 100644 --- a/packages/strapi-hook-knex/package.json +++ b/packages/strapi-hook-knex/package.json @@ -43,4 +43,4 @@ "npm": ">= 5.0.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-hook-mongoose/package.json b/packages/strapi-hook-mongoose/package.json index 3e97436bd1..3aec083ca0 100644 --- a/packages/strapi-hook-mongoose/package.json +++ b/packages/strapi-hook-mongoose/package.json @@ -20,7 +20,7 @@ "mongoose-float": "^1.0.2", "pluralize": "^6.0.0", "rimraf": "^2.6.2", - "strapi-utils": "3.0.0-alpha.14.5" + "strapi-utils": "file:../strapi-utils" }, "author": { "email": "hi@strapi.io", @@ -46,4 +46,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-lint/package.json b/packages/strapi-lint/package.json index 595cd71f48..e734c706cf 100644 --- a/packages/strapi-lint/package.json +++ b/packages/strapi-lint/package.json @@ -41,4 +41,4 @@ "babel-eslint": "^8.2.3", "prettier": "^1.12.1" } -} \ No newline at end of file +} diff --git a/packages/strapi-plugin-content-manager/package.json b/packages/strapi-plugin-content-manager/package.json index 00ebdc6394..aaaae8c4cf 100644 --- a/packages/strapi-plugin-content-manager/package.json +++ b/packages/strapi-plugin-content-manager/package.json @@ -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.5" + "strapi-helper-plugin": "file:../strapi-helper-plugin" }, "dependencies": { "pluralize": "^7.0.0" @@ -52,4 +52,4 @@ "npm": ">= 5.0.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-plugin-content-type-builder/package.json b/packages/strapi-plugin-content-type-builder/package.json index 69a70e73b1..0fcf03602a 100644 --- a/packages/strapi-plugin-content-type-builder/package.json +++ b/packages/strapi-plugin-content-type-builder/package.json @@ -24,11 +24,11 @@ "dependencies": { "immutable": "^3.8.2", "pluralize": "^7.0.0", - "strapi-generate": "3.0.0-alpha.14.5", - "strapi-generate-api": "3.0.0-alpha.14.5" + "strapi-generate": "file:../strapi-generate", + "strapi-generate-api": "file:../strapi-generate-api" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.14.5" + "strapi-helper-plugin": "file:../strapi-helper-plugin" }, "author": { "name": "Strapi team", @@ -51,4 +51,4 @@ "npm": ">= 5.0.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-plugin-email/package.json b/packages/strapi-plugin-email/package.json index 47c9f0f0ff..1e2f840de4 100644 --- a/packages/strapi-plugin-email/package.json +++ b/packages/strapi-plugin-email/package.json @@ -22,11 +22,11 @@ "prepublishOnly": "IS_MONOREPO=true npm run build" }, "dependencies": { - "strapi-provider-email-sendmail": "3.0.0-alpha.14.5" + "strapi-provider-email-sendmail": "file:../strapi-provider-email-sendmail" }, "devDependencies": { "react-copy-to-clipboard": "5.0.1", - "strapi-helper-plugin": "3.0.0-alpha.14.5" + "strapi-helper-plugin": "file:../strapi-helper-plugin" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-graphql/package.json b/packages/strapi-plugin-graphql/package.json index 8f1e94b9a8..6ab19fbb70 100644 --- a/packages/strapi-plugin-graphql/package.json +++ b/packages/strapi-plugin-graphql/package.json @@ -22,13 +22,14 @@ }, "dependencies": { "apollo-server-koa": "^2.0.7", + "dataloader": "^1.4.0", "glob": "^7.1.3", "graphql": "^14.0.2", "graphql-depth-limit": "^1.1.0", "graphql-playground-middleware-koa": "^1.6.4", "graphql-tools": "^3.1.1", - "graphql-type-json": "^0.2.1", "graphql-type-datetime": "^0.2.2", + "graphql-type-json": "^0.2.1", "pluralize": "^7.0.0", "strapi-utils": "3.0.0-alpha.14.5" }, @@ -49,4 +50,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-plugin-graphql/services/Resolvers.js b/packages/strapi-plugin-graphql/services/Resolvers.js index 399527fd96..bd5b1cf357 100644 --- a/packages/strapi-plugin-graphql/services/Resolvers.js +++ b/packages/strapi-plugin-graphql/services/Resolvers.js @@ -424,7 +424,7 @@ module.exports = { if (this.loaders[association.collection || association.model]) { // return this.loaders[association.collection].load({ ids: arrayOfIds, query: queryOpts.query }); - return arrayOfIds.map(id => this.loaders[association.collection || association.model].load({ ids: arrayOfIds, options: queryOpts })); + return this.loaders[association.collection || association.model].load({ ids: arrayOfIds, options: queryOpts }); } break; // falls through @@ -467,18 +467,18 @@ module.exports = { return new DataLoader(keys => { return new Promise(async (resolve, reject) => { try { - const { ids, options } = this.extractQueries(keys); - console.log(ids); - const request = await strapi.plugins['content-manager'].services['contentmanager'].fetchAll({ model }, { - ...query, - query: { - _id: _.uniq(ids.map(x => x.toString())) - }, - populate: [] - }); + const { queriesIds, queriesOptions, map } = this.extractQueries(_.cloneDeep(keys)); - const entries = request && request.toJSON ? request.toJSON() : request; - const data = ids.map(id => entries.find(x => (x.id || x._id) == id)); + const executeQueries = await Promise.all(queriesIds.map((ids, index) => this.makeQuery(model, ids, queriesOptions[index]))); + + const data = keys.map((query, index) => { + const indexResults = map.findIndex(queryMap => queryMap.indexOf(index) !== -1); + const results = executeQueries[indexResults]; + + return query.ids.map(id => + results.find(entry => (entry._id || entry.id || '').toString() === id.toString()) + ); + }); resolve(data); } catch (e) { @@ -489,43 +489,53 @@ module.exports = { cacheKeyFn: (key) => { return _.isObjectLike(key) ? JSON.stringify(_.cloneDeep(key)) : key; } - }) + }); + }, + + makeQuery: async function(model, ids, queryOptions) { + const request = await strapi.plugins['content-manager'].services['contentmanager'].fetchAll({ model }, { + ...queryOptions, + query: { + _id: _.uniq(ids.map(x => x.toString())) + }, + populate: [] + }); + + const entries = request && request.toJSON ? request.toJSON() : request; + + return entries; }, extractQueries: function(keys) { - const queries = []; + const queriesIds = []; const queriesOptions = []; - - console.log(keys); + const map = [[]]; // { : [queries] } keys.forEach((current, index) => { - if (index < 1) { - queries.push(current.ids); - queriesOptions.push(current.query); - } + const { query, ...options } = current.options; // Find similar query. - const indexQueriesOptions = queriesOptions.findIndex(queryOption => _.isEqual(queryOption, current.query)); + const indexQueriesOptions = queriesOptions.findIndex(queryOption => _.isEqual(queryOption, options)); - if (indexQueriesOptions) { + if (indexQueriesOptions !== -1) { // Push to this query the new IDs to fetch. - queries[indexQueriesOptions].push(...current.ids); + queriesIds[indexQueriesOptions].push(...current.ids); + map[indexQueriesOptions].push(index); } else { // Create new query in the query. // Note: The query and the query options have the same index in both arrays. - queries.push(current.ids); - queriesOptions.push(current.query); + queriesIds.push(current.ids); + queriesOptions.push(options); + + map[queriesIds.length - 1] = []; + map[queriesIds.length - 1].push(index); } }); - console.log(queries); - console.log(queriesOptions); - - // const ids = _.uniq(_.flatten(keys.map(query => query.ids.map(x => x.toString())))); - - return { - ids - } + queriesIds, + queriesOptions, + map + }; } }; diff --git a/packages/strapi-plugin-settings-manager/package.json b/packages/strapi-plugin-settings-manager/package.json index 81d670c3c5..109047e835 100644 --- a/packages/strapi-plugin-settings-manager/package.json +++ b/packages/strapi-plugin-settings-manager/package.json @@ -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.5" + "strapi-helper-plugin": "file:../strapi-helper-plugin" }, "author": { "name": "Strapi team", @@ -48,4 +48,4 @@ "npm": ">= 5.0.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-plugin-upload/package.json b/packages/strapi-plugin-upload/package.json index 76c576a467..d49ffa8bb8 100644 --- a/packages/strapi-plugin-upload/package.json +++ b/packages/strapi-plugin-upload/package.json @@ -23,12 +23,12 @@ }, "dependencies": { "react-copy-to-clipboard": "^5.0.1", - "strapi-provider-upload-local": "3.0.0-alpha.14.5", + "strapi-provider-upload-local": "file:../strapi-provider-upload-local", "stream-to-array": "^2.3.0", "uuid": "^3.2.1" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.14.5" + "strapi-helper-plugin": "file:../strapi-helper-plugin" }, "author": { "name": "A Strapi developer", diff --git a/packages/strapi-plugin-users-permissions/package.json b/packages/strapi-plugin-users-permissions/package.json index 513d5d0b1c..d101500696 100644 --- a/packages/strapi-plugin-users-permissions/package.json +++ b/packages/strapi-plugin-users-permissions/package.json @@ -32,7 +32,7 @@ "uuid": "^3.1.0" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.14.5" + "strapi-helper-plugin": "file:../strapi-helper-plugin" }, "author": { "name": "Strapi team", @@ -55,4 +55,4 @@ "npm": ">= 5.0.0" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/packages/strapi-utils/package.json b/packages/strapi-utils/package.json index 30b0a1a980..ebeb9f076f 100644 --- a/packages/strapi-utils/package.json +++ b/packages/strapi-utils/package.json @@ -49,4 +49,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} \ No newline at end of file +} From 0074ca63044d3303023eb538c5d292e1082aeab3 Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Thu, 22 Nov 2018 16:40:52 +0100 Subject: [PATCH 04/36] Refactoring loaders and put logic in a different file --- .../strapi-plugin-graphql/services/Loaders.js | 110 ++++++++++++++++++ .../services/Resolvers.js | 106 ++--------------- 2 files changed, 121 insertions(+), 95 deletions(-) create mode 100644 packages/strapi-plugin-graphql/services/Loaders.js diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js new file mode 100644 index 0000000000..a07c08b626 --- /dev/null +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -0,0 +1,110 @@ +'use strict'; + +/** + * Loaders.js service + * + * @description: A set of functions similar to controller's actions to avoid code duplication. + */ + +const _ = require('lodash'); +const DataLoader = require('dataloader'); + +module.exports = { + loaders: {}, + + createLoader: function(model) { + this.loaders[model] = new DataLoader(keys => { + return new Promise(async (resolve, reject) => { + try { + // Extract queries from keys and merge similar queries. + const { queries, map } = this.extractQueries(model, _.cloneDeep(keys)); + // Run queries in parallel. + const results = await Promise.all(queries.map((query) => this.makeQuery(model, query))); + // Use to match initial queries order. + resolve(this.mapData(model, keys, map, results)); + } catch (e) { + reject(e); + } + }); + }, { + cacheKeyFn: (key) => { + return _.isObjectLike(key) ? JSON.stringify(_.cloneDeep(key)) : key; + } + }); + }, + + mapData: function(model, originalMap, map, results) { + // Use map to re-dispatch data correctly based on initial keys. + return originalMap.map((query, index) => { + // Find the index of where we should extract the results. + const indexResults = map.findIndex(queryMap => queryMap.indexOf(index) !== -1); + const data = results[indexResults]; + + // Retrieving referring model. + const ref = this.retrieveModel(model, query.options.source); + // Extracting ids from original request to map with query results. + const ids = query.options.query[ref.primaryKey]; + + return ids.map(id => + data.find(entry => (entry._id || entry.id || '').toString() === id.toString()) + ); + }); + }, + + makeQuery: async function(model, query = {}) { + // Retrieve refering model. + const ref = this.retrieveModel(model, _.get(query.options, 'source')); + // Run query and remove duplicated ID. + const request = await strapi.plugins['content-manager'].services['contentmanager'].fetchAll({ model }, { + ...query.options, + query: { + [ref.primaryKey]: _.uniq(query.ids.map(x => x.toString())) + }, + populate: [] + }); + + return request && request.toJSON ? request.toJSON() : request; + }, + + retrieveModel: function(model, source) { + // Retrieve refering model. + return source ? + strapi.plugins[source].models[model]: + strapi.models[model]; + }, + + extractQueries: function(model, keys) { + const queries = []; + const map = []; + + keys.forEach((current, index) => { + // Extract query options. + const { query, ...options } = current.options; + // Retrieving referring model. + const ref = this.retrieveModel(model, options.source); + + // Find similar query. + const indexQueries = queries.findIndex(query => _.isEqual(query.options, options)); + + if (indexQueries !== -1) { + // Push to the same query the new IDs to fetch. + queries[indexQueries].ids.push(...query[ref.primaryKey]); + map[indexQueries].push(index); + } else { + // Create new query in the query. + queries.push({ + ids: query[ref.primaryKey], + options: options + }); + + map[queries.length - 1 > 0 ? queries.length - 1 : 0] = []; + map[queries.length - 1].push(index); + } + }); + + return { + queries, + map + }; + } +}; \ No newline at end of file diff --git a/packages/strapi-plugin-graphql/services/Resolvers.js b/packages/strapi-plugin-graphql/services/Resolvers.js index bd5b1cf357..df9081d380 100644 --- a/packages/strapi-plugin-graphql/services/Resolvers.js +++ b/packages/strapi-plugin-graphql/services/Resolvers.js @@ -7,9 +7,9 @@ */ const _ = require('lodash'); -const DataLoader = require('dataloader'); const pluralize = require('pluralize'); const Aggregator = require('./Aggregator'); +const Loaders = require('./Loaders'); const Query = require('./Query.js'); const Mutation = require('./Mutation.js'); const Types = require('./Types.js'); @@ -362,13 +362,8 @@ module.exports = { default: } - // TODO: - // - For each association, I've to create a loader. - // - Each loader only return one kind of data (user, product or category). - // - Each loader should only execute one request. - // - Maybe, I should create specific loader to handle `where` condition like this https://github.com/facebook/dataloader/blob/master/examples/Knex.md - - this.loaders[association.collection || association.model] = this.createLoader(association.collection || association.model, association.plugin); + // Create dynamic dataloader for query batching and caching. + Loaders.createLoader(association.collection || association.model, association.plugin); _.merge(acc.resolver[globalId], { [association.alias]: async (obj, options) => { @@ -421,11 +416,6 @@ module.exports = { [ref.primaryKey]: arrayOfIds, ...where.where, }).where; - - if (this.loaders[association.collection || association.model]) { - // return this.loaders[association.collection].load({ ids: arrayOfIds, query: queryOpts.query }); - return this.loaders[association.collection || association.model].load({ ids: arrayOfIds, options: queryOpts }); - } break; // falls through } @@ -447,95 +437,21 @@ module.exports = { ){ queryOpts.query.id.symbol = 'IN'; } + + return association.model ? + resolvers.fetch(params, association.plugin, []): + Loaders.loaders[association.collection || association.model].load({ options: queryOpts }); - const value = await (association.model - ? resolvers.fetch(params, association.plugin, []) - : resolvers.fetchAll(params, { ...queryOpts, populate: [] })); + // const value = await (association.model + // ? resolvers.fetch(params, association.plugin, []) + // : resolvers.fetchAll(params, { ...queryOpts, populate: [] })); - return value && value.toJSON ? value.toJSON() : value; + // return value && value.toJSON ? value.toJSON() : value; }, }); }); return acc; }, initialState); - }, - - loaders: {}, - - createLoader: function(model) { - return new DataLoader(keys => { - return new Promise(async (resolve, reject) => { - try { - const { queriesIds, queriesOptions, map } = this.extractQueries(_.cloneDeep(keys)); - - const executeQueries = await Promise.all(queriesIds.map((ids, index) => this.makeQuery(model, ids, queriesOptions[index]))); - - const data = keys.map((query, index) => { - const indexResults = map.findIndex(queryMap => queryMap.indexOf(index) !== -1); - const results = executeQueries[indexResults]; - - return query.ids.map(id => - results.find(entry => (entry._id || entry.id || '').toString() === id.toString()) - ); - }); - - resolve(data); - } catch (e) { - reject(e); - } - }); - }, { - cacheKeyFn: (key) => { - return _.isObjectLike(key) ? JSON.stringify(_.cloneDeep(key)) : key; - } - }); - }, - - makeQuery: async function(model, ids, queryOptions) { - const request = await strapi.plugins['content-manager'].services['contentmanager'].fetchAll({ model }, { - ...queryOptions, - query: { - _id: _.uniq(ids.map(x => x.toString())) - }, - populate: [] - }); - - const entries = request && request.toJSON ? request.toJSON() : request; - - return entries; - }, - - extractQueries: function(keys) { - const queriesIds = []; - const queriesOptions = []; - const map = [[]]; // { : [queries] } - - keys.forEach((current, index) => { - const { query, ...options } = current.options; - - // Find similar query. - const indexQueriesOptions = queriesOptions.findIndex(queryOption => _.isEqual(queryOption, options)); - - if (indexQueriesOptions !== -1) { - // Push to this query the new IDs to fetch. - queriesIds[indexQueriesOptions].push(...current.ids); - map[indexQueriesOptions].push(index); - } else { - // Create new query in the query. - // Note: The query and the query options have the same index in both arrays. - queriesIds.push(current.ids); - queriesOptions.push(options); - - map[queriesIds.length - 1] = []; - map[queriesIds.length - 1].push(index); - } - }); - - return { - queriesIds, - queriesOptions, - map - }; } }; From f833622e193fb0b02d97ed53d9fc5641d2633aed Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Thu, 22 Nov 2018 17:33:51 +0100 Subject: [PATCH 05/36] Filter undefined results --- packages/strapi-plugin-graphql/services/Loaders.js | 10 ++++++---- packages/strapi-plugin-graphql/services/Resolvers.js | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js index a07c08b626..e642b042cc 100644 --- a/packages/strapi-plugin-graphql/services/Loaders.js +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -21,7 +21,9 @@ module.exports = { // Run queries in parallel. const results = await Promise.all(queries.map((query) => this.makeQuery(model, query))); // Use to match initial queries order. - resolve(this.mapData(model, keys, map, results)); + const data = this.mapData(model, keys, map, results); + + resolve(data); } catch (e) { reject(e); } @@ -45,9 +47,9 @@ module.exports = { // Extracting ids from original request to map with query results. const ids = query.options.query[ref.primaryKey]; - return ids.map(id => - data.find(entry => (entry._id || entry.id || '').toString() === id.toString()) - ); + return ids + .map(id => data.find(entry => (entry._id || entry.id || '').toString() === id.toString())) + .filter(entry => entry !== undefined); }); }, diff --git a/packages/strapi-plugin-graphql/services/Resolvers.js b/packages/strapi-plugin-graphql/services/Resolvers.js index df9081d380..51473a57a7 100644 --- a/packages/strapi-plugin-graphql/services/Resolvers.js +++ b/packages/strapi-plugin-graphql/services/Resolvers.js @@ -439,7 +439,7 @@ module.exports = { } return association.model ? - resolvers.fetch(params, association.plugin, []): + Loaders.loaders[association.collection || association.model].load({ params, options: queryOpts, single: true }): Loaders.loaders[association.collection || association.model].load({ options: queryOpts }); // const value = await (association.model From 21d21dfc8f0dc92aad6b7a5be1f8d8ee056e36d6 Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Thu, 22 Nov 2018 18:32:33 +0100 Subject: [PATCH 06/36] Handle single fetch & allow override of default auto-population --- .../templates/bookshelf/service.template | 2 +- .../templates/mongoose/service.template | 2 +- packages/strapi-hook-bookshelf/lib/index.js | 4 ++++ packages/strapi-hook-mongoose/lib/index.js | 4 ++++ .../controllers/ContentManager.js | 2 +- .../strapi-plugin-graphql/services/Loaders.js | 17 +++++++++++++---- .../strapi-plugin-graphql/services/Query.js | 3 +++ .../strapi-plugin-graphql/services/Resolvers.js | 6 +++--- packages/strapi-utils/lib/models.js | 2 +- 9 files changed, 31 insertions(+), 11 deletions(-) diff --git a/packages/strapi-generate-api/templates/bookshelf/service.template b/packages/strapi-generate-api/templates/bookshelf/service.template index 90657eb78c..f7d6bbedde 100644 --- a/packages/strapi-generate-api/templates/bookshelf/service.template +++ b/packages/strapi-generate-api/templates/bookshelf/service.template @@ -46,7 +46,7 @@ module.exports = { qb.offset(filters.start); qb.limit(filters.limit); }).fetchAll({ - withRelated: populate + withRelated: filters.populate || populate }); }, diff --git a/packages/strapi-generate-api/templates/mongoose/service.template b/packages/strapi-generate-api/templates/mongoose/service.template index f5de552e9d..bf41c3a199 100644 --- a/packages/strapi-generate-api/templates/mongoose/service.template +++ b/packages/strapi-generate-api/templates/mongoose/service.template @@ -32,7 +32,7 @@ module.exports = { .sort(filters.sort) .skip(filters.start) .limit(filters.limit) - .populate(populate); + .populate(filters.populate || populate); }, /** diff --git a/packages/strapi-hook-bookshelf/lib/index.js b/packages/strapi-hook-bookshelf/lib/index.js index efd8b33b75..c2edce93e3 100644 --- a/packages/strapi-hook-bookshelf/lib/index.js +++ b/packages/strapi-hook-bookshelf/lib/index.js @@ -1064,6 +1064,10 @@ module.exports = function(strapi) { result.key = 'limit'; result.value = parseFloat(value); break; + case '_populate': + result.key = 'populate'; + result.value = value; + break; case '_contains': case '_containss': result.key = `where.${key}`; diff --git a/packages/strapi-hook-mongoose/lib/index.js b/packages/strapi-hook-mongoose/lib/index.js index bd7b50924c..11fc5d2c8f 100644 --- a/packages/strapi-hook-mongoose/lib/index.js +++ b/packages/strapi-hook-mongoose/lib/index.js @@ -500,6 +500,10 @@ module.exports = function (strapi) { result.key = `limit`; result.value = parseFloat(value); break; + case '_populate': + result.key = `populate`; + result.value = value; + break; case '_contains': result.key = `where.${key}`; result.value = { diff --git a/packages/strapi-plugin-content-manager/controllers/ContentManager.js b/packages/strapi-plugin-content-manager/controllers/ContentManager.js index 7a580cf982..2b74601141 100644 --- a/packages/strapi-plugin-content-manager/controllers/ContentManager.js +++ b/packages/strapi-plugin-content-manager/controllers/ContentManager.js @@ -28,7 +28,7 @@ module.exports = { return; } - + // Default list with filters or not. ctx.body = await strapi.plugins['content-manager'].services['contentmanager'].fetchAll(ctx.params, ctx.request.query); }, diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js index e642b042cc..17ac00b5e0 100644 --- a/packages/strapi-plugin-graphql/services/Loaders.js +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -44,11 +44,18 @@ module.exports = { // Retrieving referring model. const ref = this.retrieveModel(model, query.options.source); + + + if (query.single) { + // Return object instead of array for one-to-many relationship. + return data.find(entry => (entry._id || entry.id || '').toString() === query.params[ref.primaryKey].toString()); + } + // Extracting ids from original request to map with query results. const ids = query.options.query[ref.primaryKey]; return ids - .map(id => data.find(entry => (entry._id || entry.id || '').toString() === id.toString())) + .map(id => data.find(entry => entry[ref.primaryKey].toString() === id.toString())) .filter(entry => entry !== undefined); }); }, @@ -81,7 +88,9 @@ module.exports = { keys.forEach((current, index) => { // Extract query options. - const { query, ...options } = current.options; + const { single = false, params = {} } = current; + const { query = {}, ...options } = current.options; + // Retrieving referring model. const ref = this.retrieveModel(model, options.source); @@ -90,12 +99,12 @@ module.exports = { if (indexQueries !== -1) { // Push to the same query the new IDs to fetch. - queries[indexQueries].ids.push(...query[ref.primaryKey]); + queries[indexQueries].ids.push(...(single ? [params[ref.primaryKey]] : query[ref.primaryKey])); map[indexQueries].push(index); } else { // Create new query in the query. queries.push({ - ids: query[ref.primaryKey], + ids: single ? [params[ref.primaryKey]] : query[ref.primaryKey], options: options }); diff --git a/packages/strapi-plugin-graphql/services/Query.js b/packages/strapi-plugin-graphql/services/Query.js index 32a5c16e34..15a49a67fd 100644 --- a/packages/strapi-plugin-graphql/services/Query.js +++ b/packages/strapi-plugin-graphql/services/Query.js @@ -258,6 +258,9 @@ module.exports = { if (_.isFunction(resolver)) { context.query = this.convertToParams(options); context.params = this.amountLimiting(options); + + // Avoid population. + context.query._populate = []; if (isController) { const values = await resolver.call(null, context); diff --git a/packages/strapi-plugin-graphql/services/Resolvers.js b/packages/strapi-plugin-graphql/services/Resolvers.js index 51473a57a7..aaab8ac318 100644 --- a/packages/strapi-plugin-graphql/services/Resolvers.js +++ b/packages/strapi-plugin-graphql/services/Resolvers.js @@ -383,7 +383,7 @@ module.exports = { : strapi.models[params.model]; if (association.type === 'model') { - params.id = _.get(obj, [association.alias, ref.primaryKey], obj[association.alias]); + params[ref.primaryKey] = _.get(obj, [association.alias, ref.primaryKey], obj[association.alias]); } else { // Apply optional arguments to make more precise nested request. const convertedParams = strapi.utils.models.convertParams( @@ -439,8 +439,8 @@ module.exports = { } return association.model ? - Loaders.loaders[association.collection || association.model].load({ params, options: queryOpts, single: true }): - Loaders.loaders[association.collection || association.model].load({ options: queryOpts }); + {} || Loaders.loaders[association.collection || association.model].load({ params, options: queryOpts, single: true }): + [] || Loaders.loaders[association.collection || association.model].load({ options: queryOpts }); // const value = await (association.model // ? resolvers.fetch(params, association.plugin, []) diff --git a/packages/strapi-utils/lib/models.js b/packages/strapi-utils/lib/models.js index f690a032b1..66c20a428c 100644 --- a/packages/strapi-utils/lib/models.js +++ b/packages/strapi-utils/lib/models.js @@ -480,7 +480,7 @@ module.exports = { formattedValue = value; } - if (_.includes(['_start', '_limit'], key)) { + if (_.includes(['_start', '_limit', '_populate'], key)) { result = convertor(formattedValue, key); } else if (key === '_sort') { const [attr, order = 'ASC'] = formattedValue.split(':'); From bdc9b4b0d87d5c8acc51804d7a0b93bf4b8d36b7 Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Thu, 22 Nov 2018 19:57:26 +0100 Subject: [PATCH 07/36] Handle oneToMany relationship --- .../strapi-plugin-graphql/services/Loaders.js | 53 ++++++++++++++----- .../services/Resolvers.js | 15 ++---- 2 files changed, 44 insertions(+), 24 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js index 17ac00b5e0..7a792f52cc 100644 --- a/packages/strapi-plugin-graphql/services/Loaders.js +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -45,14 +45,29 @@ module.exports = { // Retrieving referring model. const ref = this.retrieveModel(model, query.options.source); - if (query.single) { // Return object instead of array for one-to-many relationship. return data.find(entry => (entry._id || entry.id || '').toString() === query.params[ref.primaryKey].toString()); } // Extracting ids from original request to map with query results. - const ids = query.options.query[ref.primaryKey]; + const ids = (() => { + if ( _.get(query.options, `query.${ref.primaryKey}`)) { + return _.get(query.options, `query.${ref.primaryKey}`); + } + + // Single object to retrieve (one-to-many). + const alias = _.first(Object.keys(query.options.query)); + + return { + alias, + value: _.get(query.options, `query.${alias}`) + }; + })(); + + if (!_.isArray(ids)) { + return data.filter(entry => entry[ids.alias].toString() === ids.value.toString()); + } return ids .map(id => data.find(entry => entry[ref.primaryKey].toString() === id.toString())) @@ -62,15 +77,16 @@ module.exports = { makeQuery: async function(model, query = {}) { // Retrieve refering model. - const ref = this.retrieveModel(model, _.get(query.options, 'source')); - // Run query and remove duplicated ID. - const request = await strapi.plugins['content-manager'].services['contentmanager'].fetchAll({ model }, { + const params = { ...query.options, - query: { - [ref.primaryKey]: _.uniq(query.ids.map(x => x.toString())) - }, - populate: [] - }); + populate: [], + query: {} + }; + + params.query[query.alias] = _.uniq(query.ids.map(x => x.toString())) ; + + // Run query and remove duplicated ID. + const request = await strapi.plugins['content-manager'].services['contentmanager'].fetchAll({ model }, params); return request && request.toJSON ? request.toJSON() : request; }, @@ -88,7 +104,7 @@ module.exports = { keys.forEach((current, index) => { // Extract query options. - const { single = false, params = {} } = current; + const { single = false, params = {}, association } = current; const { query = {}, ...options } = current.options; // Retrieving referring model. @@ -97,15 +113,24 @@ module.exports = { // Find similar query. const indexQueries = queries.findIndex(query => _.isEqual(query.options, options)); + const ids = (() => { + if (single) { + return [params[ref.primaryKey]]; + } + + return _.isArray(query[ref.primaryKey]) ? query[ref.primaryKey] : [query[association.via]]; + })(); + if (indexQueries !== -1) { // Push to the same query the new IDs to fetch. - queries[indexQueries].ids.push(...(single ? [params[ref.primaryKey]] : query[ref.primaryKey])); + queries[indexQueries].ids.push(...ids); map[indexQueries].push(index); } else { // Create new query in the query. queries.push({ - ids: single ? [params[ref.primaryKey]] : query[ref.primaryKey], - options: options + ids, + options, + alias: _.first(Object.keys(query)) }); map[queries.length - 1 > 0 ? queries.length - 1 : 0] = []; diff --git a/packages/strapi-plugin-graphql/services/Resolvers.js b/packages/strapi-plugin-graphql/services/Resolvers.js index aaab8ac318..daeeb69b8f 100644 --- a/packages/strapi-plugin-graphql/services/Resolvers.js +++ b/packages/strapi-plugin-graphql/services/Resolvers.js @@ -400,6 +400,7 @@ module.exports = { // Skip. queryOpts.skip = convertedParams.start; + switch (association.nature) { case 'manyToMany': { @@ -434,19 +435,13 @@ module.exports = { queryOpts.query.hasOwnProperty('id') && queryOpts.query.id.hasOwnProperty('value') && Array.isArray(queryOpts.query.id.value) - ){ + ) { queryOpts.query.id.symbol = 'IN'; } - + return association.model ? - {} || Loaders.loaders[association.collection || association.model].load({ params, options: queryOpts, single: true }): - [] || Loaders.loaders[association.collection || association.model].load({ options: queryOpts }); - - // const value = await (association.model - // ? resolvers.fetch(params, association.plugin, []) - // : resolvers.fetchAll(params, { ...queryOpts, populate: [] })); - - // return value && value.toJSON ? value.toJSON() : value; + Loaders.loaders[association.collection || association.model].load({ params, options: queryOpts, single: true }): + Loaders.loaders[association.collection || association.model].load({ options: queryOpts, association }); }, }); }); From 639c635885c01d0bc4d98fec95968c5f911cea20 Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Fri, 23 Nov 2018 17:33:41 +0100 Subject: [PATCH 08/36] Use the PK of referring model as an alias --- packages/strapi-plugin-graphql/services/Loaders.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js index 7a792f52cc..1e733a820b 100644 --- a/packages/strapi-plugin-graphql/services/Loaders.js +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -76,7 +76,7 @@ module.exports = { }, makeQuery: async function(model, query = {}) { - // Retrieve refering model. + // Construct parameters object sent to the Content Manager service. const params = { ...query.options, populate: [], @@ -130,7 +130,7 @@ module.exports = { queries.push({ ids, options, - alias: _.first(Object.keys(query)) + alias: _.first(Object.keys(query)) || ref.primaryKey }); map[queries.length - 1 > 0 ? queries.length - 1 : 0] = []; From 4e23e872edca76c3fa369ab546a5b27a96db1b7a Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Fri, 23 Nov 2018 17:46:43 +0100 Subject: [PATCH 09/36] Support one-to-one relationship with DataLoader --- packages/strapi-plugin-graphql/services/Loaders.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js index 1e733a820b..24bb103534 100644 --- a/packages/strapi-plugin-graphql/services/Loaders.js +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -47,7 +47,7 @@ module.exports = { if (query.single) { // Return object instead of array for one-to-many relationship. - return data.find(entry => (entry._id || entry.id || '').toString() === query.params[ref.primaryKey].toString()); + return data.find(entry => entry[ref.primaryKey].toString() === (query.params[ref.primaryKey] || '').toString()); } // Extracting ids from original request to map with query results. @@ -64,7 +64,7 @@ module.exports = { value: _.get(query.options, `query.${alias}`) }; })(); - + if (!_.isArray(ids)) { return data.filter(entry => entry[ids.alias].toString() === ids.value.toString()); } @@ -83,7 +83,7 @@ module.exports = { query: {} }; - params.query[query.alias] = _.uniq(query.ids.map(x => x.toString())) ; + params.query[query.alias] = _.uniq(query.ids.filter(x => !_.isEmpty(x)).map(x => x.toString())) ; // Run query and remove duplicated ID. const request = await strapi.plugins['content-manager'].services['contentmanager'].fetchAll({ model }, params); From 6fd3319f18f33045b2d2ca7bb8f7b5f1deadb945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Mon, 26 Nov 2018 17:36:49 +0100 Subject: [PATCH 10/36] Generate different input for edit mutation --- .../strapi-plugin-graphql/services/Types.js | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Types.js b/packages/strapi-plugin-graphql/services/Types.js index 1bf6a4c770..602c02b9d8 100644 --- a/packages/strapi-plugin-graphql/services/Types.js +++ b/packages/strapi-plugin-graphql/services/Types.js @@ -29,6 +29,7 @@ module.exports = { modelName = '', attributeName = '', rootType = 'query', + action = '' }) { // Type if (definition.type) { @@ -62,7 +63,7 @@ module.exports = { break; } - if (definition.required) { + if (definition.required && action !== 'update') { type += '!'; } @@ -202,6 +203,21 @@ module.exports = { }) .join('\n')} } + + input edit${inputName} { + ${Object.keys(model.attributes) + .filter(attribute => model.attributes[attribute].private !== true) + .map(attribute => { + return `${attribute}: ${this.convertType({ + definition: model.attributes[attribute], + modelName: globalId, + attributeName: attribute, + rootType: 'mutation', + action: 'update' + })}`; + }) + .join('\n')} + } `; /* eslint-enable */ }, @@ -224,7 +240,7 @@ module.exports = { `; case 'update': return ` - input ${type}${inputName} { where: InputID, data: ${inputName} } + input ${type}${inputName} { where: InputID, data: edit${inputName} } type ${type}${payloadName} { ${pluralize.singular(name)}: ${ model.globalId } } From 143f92a338cb6030e03f06f6b9c027e018099935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Mon, 26 Nov 2018 18:32:35 +0100 Subject: [PATCH 11/36] Follow generated GraphQL input to return data --- packages/strapi-generate-admin/package.json | 4 +- packages/strapi-generate-api/package.json | 2 +- packages/strapi-generate-new/package.json | 4 +- packages/strapi-generate/package.json | 4 +- packages/strapi-helper-plugin/package.json | 2 +- packages/strapi-hook-bookshelf/package.json | 6 +-- packages/strapi-hook-knex/package.json | 2 +- packages/strapi-hook-mongoose/package.json | 4 +- packages/strapi-lint/package.json | 2 +- .../package.json | 4 +- .../package.json | 8 ++-- packages/strapi-plugin-email/package.json | 6 +-- packages/strapi-plugin-graphql/package.json | 2 +- .../strapi-plugin-graphql/services/Schema.js | 4 +- .../package.json | 4 +- packages/strapi-plugin-upload/package.json | 6 +-- .../config/schema.graphql | 46 ++++++++++++++++++- .../package.json | 4 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../strapi-provider-upload-local/package.json | 2 +- .../package.json | 2 +- packages/strapi-utils/package.json | 2 +- 27 files changed, 89 insertions(+), 43 deletions(-) diff --git a/packages/strapi-generate-admin/package.json b/packages/strapi-generate-admin/package.json index 8a48e7d9ce..753028126d 100644 --- a/packages/strapi-generate-admin/package.json +++ b/packages/strapi-generate-admin/package.json @@ -15,7 +15,7 @@ "dependencies": { "fs-extra": "^4.0.1", "lodash": "^4.17.5", - "strapi-admin": "file:../strapi-admin", + "strapi-admin": "3.0.0-alpha.14.5", "strapi-utils": "3.0.0-alpha.14.5" }, "author": { @@ -42,4 +42,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-generate-api/package.json b/packages/strapi-generate-api/package.json index 02da03c389..578b7f715f 100644 --- a/packages/strapi-generate-api/package.json +++ b/packages/strapi-generate-api/package.json @@ -43,4 +43,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-generate-new/package.json b/packages/strapi-generate-new/package.json index 203af317b6..1aa3398e36 100644 --- a/packages/strapi-generate-new/package.json +++ b/packages/strapi-generate-new/package.json @@ -19,7 +19,7 @@ "listr": "^0.14.1", "lodash": "^4.17.5", "ora": "^2.1.0", - "strapi-utils": "file:../strapi-utils", + "strapi-utils": "3.0.0-alpha.14.5", "uuid": "^3.1.0" }, "scripts": { @@ -49,4 +49,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-generate/package.json b/packages/strapi-generate/package.json index dff2af0a40..a2265da64e 100644 --- a/packages/strapi-generate/package.json +++ b/packages/strapi-generate/package.json @@ -17,7 +17,7 @@ "fs-extra": "^4.0.0", "lodash": "^4.17.5", "reportback": "^2.0.1", - "strapi-utils": "file:../strapi-utils" + "strapi-utils": "3.0.0-alpha.14.5" }, "author": { "name": "Strapi team", @@ -43,4 +43,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-helper-plugin/package.json b/packages/strapi-helper-plugin/package.json index 0b5c708302..65cbb948e7 100644 --- a/packages/strapi-helper-plugin/package.json +++ b/packages/strapi-helper-plugin/package.json @@ -106,4 +106,4 @@ "webpack-hot-middleware": "^2.18.2", "whatwg-fetch": "^2.0.3" } -} +} \ No newline at end of file diff --git a/packages/strapi-hook-bookshelf/package.json b/packages/strapi-hook-bookshelf/package.json index 5f960ff120..fcc26d0293 100644 --- a/packages/strapi-hook-bookshelf/package.json +++ b/packages/strapi-hook-bookshelf/package.json @@ -21,8 +21,8 @@ "lodash": "^4.17.5", "pluralize": "^6.0.0", "rimraf": "^2.6.2", - "strapi-hook-knex": "file:../strapi-hook-knex", - "strapi-utils": "file:../strapi-utils" + "strapi-hook-knex": "3.0.0-alpha.14.5", + "strapi-utils": "3.0.0-alpha.14.5" }, "strapi": { "dependencies": [ @@ -56,4 +56,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-hook-knex/package.json b/packages/strapi-hook-knex/package.json index 4f035d2d68..7fce5ffa12 100644 --- a/packages/strapi-hook-knex/package.json +++ b/packages/strapi-hook-knex/package.json @@ -43,4 +43,4 @@ "npm": ">= 5.0.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-hook-mongoose/package.json b/packages/strapi-hook-mongoose/package.json index 3aec083ca0..3e97436bd1 100644 --- a/packages/strapi-hook-mongoose/package.json +++ b/packages/strapi-hook-mongoose/package.json @@ -20,7 +20,7 @@ "mongoose-float": "^1.0.2", "pluralize": "^6.0.0", "rimraf": "^2.6.2", - "strapi-utils": "file:../strapi-utils" + "strapi-utils": "3.0.0-alpha.14.5" }, "author": { "email": "hi@strapi.io", @@ -46,4 +46,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-lint/package.json b/packages/strapi-lint/package.json index e734c706cf..595cd71f48 100644 --- a/packages/strapi-lint/package.json +++ b/packages/strapi-lint/package.json @@ -41,4 +41,4 @@ "babel-eslint": "^8.2.3", "prettier": "^1.12.1" } -} +} \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/package.json b/packages/strapi-plugin-content-manager/package.json index aaaae8c4cf..00ebdc6394 100644 --- a/packages/strapi-plugin-content-manager/package.json +++ b/packages/strapi-plugin-content-manager/package.json @@ -26,7 +26,7 @@ "draft-js": "^0.10.5", "react-select": "^1.2.1", "showdown": "^1.8.6", - "strapi-helper-plugin": "file:../strapi-helper-plugin" + "strapi-helper-plugin": "3.0.0-alpha.14.5" }, "dependencies": { "pluralize": "^7.0.0" @@ -52,4 +52,4 @@ "npm": ">= 5.0.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-plugin-content-type-builder/package.json b/packages/strapi-plugin-content-type-builder/package.json index 0fcf03602a..69a70e73b1 100644 --- a/packages/strapi-plugin-content-type-builder/package.json +++ b/packages/strapi-plugin-content-type-builder/package.json @@ -24,11 +24,11 @@ "dependencies": { "immutable": "^3.8.2", "pluralize": "^7.0.0", - "strapi-generate": "file:../strapi-generate", - "strapi-generate-api": "file:../strapi-generate-api" + "strapi-generate": "3.0.0-alpha.14.5", + "strapi-generate-api": "3.0.0-alpha.14.5" }, "devDependencies": { - "strapi-helper-plugin": "file:../strapi-helper-plugin" + "strapi-helper-plugin": "3.0.0-alpha.14.5" }, "author": { "name": "Strapi team", @@ -51,4 +51,4 @@ "npm": ">= 5.0.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-plugin-email/package.json b/packages/strapi-plugin-email/package.json index 1e2f840de4..fdcd00416b 100644 --- a/packages/strapi-plugin-email/package.json +++ b/packages/strapi-plugin-email/package.json @@ -22,11 +22,11 @@ "prepublishOnly": "IS_MONOREPO=true npm run build" }, "dependencies": { - "strapi-provider-email-sendmail": "file:../strapi-provider-email-sendmail" + "strapi-provider-email-sendmail": "3.0.0-alpha.14.5" }, "devDependencies": { "react-copy-to-clipboard": "5.0.1", - "strapi-helper-plugin": "file:../strapi-helper-plugin" + "strapi-helper-plugin": "3.0.0-alpha.14.5" }, "author": { "name": "Strapi team", @@ -49,4 +49,4 @@ "npm": ">= 5.0.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-plugin-graphql/package.json b/packages/strapi-plugin-graphql/package.json index 6ab19fbb70..9dbe69acd0 100644 --- a/packages/strapi-plugin-graphql/package.json +++ b/packages/strapi-plugin-graphql/package.json @@ -50,4 +50,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-plugin-graphql/services/Schema.js b/packages/strapi-plugin-graphql/services/Schema.js index d13249e3ed..ede76b7db6 100644 --- a/packages/strapi-plugin-graphql/services/Schema.js +++ b/packages/strapi-plugin-graphql/services/Schema.js @@ -63,7 +63,7 @@ module.exports = { }) .join('\n'); } else if (type === 'query' || type === 'mutation') { - return lines + const test = lines .map((line, index) => { if (['{', '}'].includes(line)) { return ''; @@ -90,6 +90,8 @@ module.exports = { return line; }) .join('\n'); + + return test; } return lines diff --git a/packages/strapi-plugin-settings-manager/package.json b/packages/strapi-plugin-settings-manager/package.json index 109047e835..81d670c3c5 100644 --- a/packages/strapi-plugin-settings-manager/package.json +++ b/packages/strapi-plugin-settings-manager/package.json @@ -25,7 +25,7 @@ "devDependencies": { "flag-icon-css": "^2.8.0", "react-select": "^1.0.0-rc.5", - "strapi-helper-plugin": "file:../strapi-helper-plugin" + "strapi-helper-plugin": "3.0.0-alpha.14.5" }, "author": { "name": "Strapi team", @@ -48,4 +48,4 @@ "npm": ">= 5.0.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-plugin-upload/package.json b/packages/strapi-plugin-upload/package.json index d49ffa8bb8..849229487d 100644 --- a/packages/strapi-plugin-upload/package.json +++ b/packages/strapi-plugin-upload/package.json @@ -23,12 +23,12 @@ }, "dependencies": { "react-copy-to-clipboard": "^5.0.1", - "strapi-provider-upload-local": "file:../strapi-provider-upload-local", + "strapi-provider-upload-local": "3.0.0-alpha.14.5", "stream-to-array": "^2.3.0", "uuid": "^3.2.1" }, "devDependencies": { - "strapi-helper-plugin": "file:../strapi-helper-plugin" + "strapi-helper-plugin": "3.0.0-alpha.14.5" }, "author": { "name": "A Strapi developer", @@ -47,4 +47,4 @@ "npm": ">= 3.0.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-plugin-users-permissions/config/schema.graphql b/packages/strapi-plugin-users-permissions/config/schema.graphql index c6209fd599..21bb8c4ca0 100644 --- a/packages/strapi-plugin-users-permissions/config/schema.graphql +++ b/packages/strapi-plugin-users-permissions/config/schema.graphql @@ -1,3 +1,5 @@ +const _ = require('lodash'); + module.exports = { type: { UsersPermissionsPermission: false // Make this type NOT queriable. @@ -63,7 +65,7 @@ module.exports = { description: 'Update an existing role', resolverOf: 'UsersPermissions.updateRole', resolver: async (obj, options, ctx) => { - await strapi.plugins['users-permissions'].controllers.userspermissions.updateRole(ctx); + await strapi.plugins['users-permissions'].controllers.userspermissions.updateRole(ctx.params, ctx.body); return { ok: true }; } @@ -76,6 +78,48 @@ module.exports = { return { ok: true }; } + }, + createUser: { + description: 'Create a new user', + resolverOf: 'User.create', + resolver: async (obj, options, { context }) => { + context.params = _.toPlainObject(options.input.where); + context.request.body = _.toPlainObject(options.input.data); + + await strapi.plugins['users-permissions'].controllers.user.create(context); + + return { + user: context.body + }; + } + }, + updateUser: { + description: 'Update an existing user', + resolverOf: 'User.update', + resolver: async (obj, options, { context }) => { + context.params = _.toPlainObject(options.input.where); + context.request.body = _.toPlainObject(options.input.data); + + await strapi.plugins['users-permissions'].controllers.user.update(context); + + return { + user: context.body + }; + } + }, + deleteUser: { + description: 'Delete an existing user', + resolverOf: 'User.destroy', + resolver: async (obj, options, { context }) => { + context.params = _.toPlainObject(options.input.where); + context.request.body = _.toPlainObject(options.input.data); + + await strapi.plugins['users-permissions'].controllers.user.delete(context); + + return { + user: context.body + }; + } } } } diff --git a/packages/strapi-plugin-users-permissions/package.json b/packages/strapi-plugin-users-permissions/package.json index d101500696..513d5d0b1c 100644 --- a/packages/strapi-plugin-users-permissions/package.json +++ b/packages/strapi-plugin-users-permissions/package.json @@ -32,7 +32,7 @@ "uuid": "^3.1.0" }, "devDependencies": { - "strapi-helper-plugin": "file:../strapi-helper-plugin" + "strapi-helper-plugin": "3.0.0-alpha.14.5" }, "author": { "name": "Strapi team", @@ -55,4 +55,4 @@ "npm": ">= 5.0.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-provider-email-amazon-ses/package.json b/packages/strapi-provider-email-amazon-ses/package.json index a28935b21b..bd0b308c13 100644 --- a/packages/strapi-provider-email-amazon-ses/package.json +++ b/packages/strapi-provider-email-amazon-ses/package.json @@ -39,4 +39,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-provider-email-mailgun/package.json b/packages/strapi-provider-email-mailgun/package.json index 0df48e93bc..e3a5c23561 100644 --- a/packages/strapi-provider-email-mailgun/package.json +++ b/packages/strapi-provider-email-mailgun/package.json @@ -42,4 +42,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-provider-email-sendgrid/package.json b/packages/strapi-provider-email-sendgrid/package.json index 37014367fa..bda2fe3145 100644 --- a/packages/strapi-provider-email-sendgrid/package.json +++ b/packages/strapi-provider-email-sendgrid/package.json @@ -42,4 +42,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-provider-email-sendmail/package.json b/packages/strapi-provider-email-sendmail/package.json index 25fa7fb62f..f4fa0cdd19 100644 --- a/packages/strapi-provider-email-sendmail/package.json +++ b/packages/strapi-provider-email-sendmail/package.json @@ -41,4 +41,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-provider-upload-aws-s3/package.json b/packages/strapi-provider-upload-aws-s3/package.json index c47840adb0..0b6b9a6a07 100644 --- a/packages/strapi-provider-upload-aws-s3/package.json +++ b/packages/strapi-provider-upload-aws-s3/package.json @@ -43,4 +43,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-provider-upload-cloudinary/package.json b/packages/strapi-provider-upload-cloudinary/package.json index cdd2fb5aa7..8b448dd016 100644 --- a/packages/strapi-provider-upload-cloudinary/package.json +++ b/packages/strapi-provider-upload-cloudinary/package.json @@ -43,4 +43,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-provider-upload-local/package.json b/packages/strapi-provider-upload-local/package.json index 873627d833..f20fbd8f83 100644 --- a/packages/strapi-provider-upload-local/package.json +++ b/packages/strapi-provider-upload-local/package.json @@ -39,4 +39,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-provider-upload-rackspace/package.json b/packages/strapi-provider-upload-rackspace/package.json index ca74f7fa13..923773db82 100644 --- a/packages/strapi-provider-upload-rackspace/package.json +++ b/packages/strapi-provider-upload-rackspace/package.json @@ -13,4 +13,4 @@ "pkgcloud": "^1.5.0", "streamifier": "^0.1.1" } -} +} \ No newline at end of file diff --git a/packages/strapi-utils/package.json b/packages/strapi-utils/package.json index ebeb9f076f..30b0a1a980 100644 --- a/packages/strapi-utils/package.json +++ b/packages/strapi-utils/package.json @@ -49,4 +49,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file From 9e0faf9b5cb5d11b6b31d2e76f70690d71b8b0f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Tue, 27 Nov 2018 14:54:34 +0100 Subject: [PATCH 12/36] Fix deleteUser mutation for Mongoose and Bookshelf --- .../config/queries/mongoose.js | 4 ++-- .../services/ContentManager.js | 4 ++++ .../config/schema.graphql | 12 ++++++++++-- .../controllers/User.js | 2 ++ .../strapi-plugin-users-permissions/services/User.js | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/packages/strapi-plugin-content-manager/config/queries/mongoose.js b/packages/strapi-plugin-content-manager/config/queries/mongoose.js index c80dbd7fbe..27a4ca6ad8 100644 --- a/packages/strapi-plugin-content-manager/config/queries/mongoose.js +++ b/packages/strapi-plugin-content-manager/config/queries/mongoose.js @@ -143,8 +143,8 @@ module.exports = { delete: async function (params) { // Delete entry. return this - .remove({ - [this.primaryKey]: params.id + .findOneAndDelete({ + [this.primaryKey]: params.id, }); }, diff --git a/packages/strapi-plugin-content-manager/services/ContentManager.js b/packages/strapi-plugin-content-manager/services/ContentManager.js index 082d7c30c3..d3bfd7ae44 100644 --- a/packages/strapi-plugin-content-manager/services/ContentManager.js +++ b/packages/strapi-plugin-content-manager/services/ContentManager.js @@ -161,6 +161,10 @@ module.exports = { id: params.id }); + if (!response) { + throw `This resource doesn't exist.`; + } + params[primaryKey] = response[primaryKey]; params.values = Object.keys(JSON.parse(JSON.stringify(response))).reduce((acc, current) => { const association = (strapi.models[params.model] || strapi.plugins[source].models[params.model]).associations.filter(x => x.alias === current)[0]; diff --git a/packages/strapi-plugin-users-permissions/config/schema.graphql b/packages/strapi-plugin-users-permissions/config/schema.graphql index 21bb8c4ca0..2c16949447 100644 --- a/packages/strapi-plugin-users-permissions/config/schema.graphql +++ b/packages/strapi-plugin-users-permissions/config/schema.graphql @@ -111,13 +111,21 @@ module.exports = { description: 'Delete an existing user', resolverOf: 'User.destroy', resolver: async (obj, options, { context }) => { + // Set parameters to context. context.params = _.toPlainObject(options.input.where); context.request.body = _.toPlainObject(options.input.data); - await strapi.plugins['users-permissions'].controllers.user.delete(context); + // Retrieve user to be able to return it because + // Bookshelf doesn't return the row once deleted. + await strapi.plugins['users-permissions'].controllers.user.findOne(context); + // Assign result to user. + const user = context.body; + + // Run destroy query. + await strapi.plugins['users-permissions'].controllers.user.destroy(context); return { - user: context.body + user }; } } diff --git a/packages/strapi-plugin-users-permissions/controllers/User.js b/packages/strapi-plugin-users-permissions/controllers/User.js index 8098ee9519..745d5ef555 100644 --- a/packages/strapi-plugin-users-permissions/controllers/User.js +++ b/packages/strapi-plugin-users-permissions/controllers/User.js @@ -162,6 +162,8 @@ module.exports = { destroy: async (ctx) => { const data = await strapi.plugins['users-permissions'].services.user.remove(ctx.params); + + console.log(data); // Send 200 `ok` ctx.send(data); diff --git a/packages/strapi-plugin-users-permissions/services/User.js b/packages/strapi-plugin-users-permissions/services/User.js index 6fe8ea83bd..56f4cb63f0 100644 --- a/packages/strapi-plugin-users-permissions/services/User.js +++ b/packages/strapi-plugin-users-permissions/services/User.js @@ -109,7 +109,7 @@ module.exports = { params.model = 'user'; params.id = (params._id || params.id); - await strapi.plugins['content-manager'].services['contentmanager'].delete(params, {source: 'users-permissions'}); + return await strapi.plugins['content-manager'].services['contentmanager'].delete(params, {source: 'users-permissions'}); } return strapi.query('user', 'users-permissions').delete(params); From 540e1bccf8127f4ce0d7da27196260571c474aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Tue, 27 Nov 2018 14:59:28 +0100 Subject: [PATCH 13/36] Allow private attribute into input definition --- packages/strapi-plugin-graphql/services/Types.js | 2 -- .../strapi-plugin-users-permissions/config/schema.graphql | 6 +++--- .../strapi-plugin-users-permissions/controllers/User.js | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Types.js b/packages/strapi-plugin-graphql/services/Types.js index 602c02b9d8..2e1e5f9834 100644 --- a/packages/strapi-plugin-graphql/services/Types.js +++ b/packages/strapi-plugin-graphql/services/Types.js @@ -192,7 +192,6 @@ module.exports = { return ` input ${inputName} { ${Object.keys(model.attributes) - .filter(attribute => model.attributes[attribute].private !== true) .map(attribute => { return `${attribute}: ${this.convertType({ definition: model.attributes[attribute], @@ -206,7 +205,6 @@ module.exports = { input edit${inputName} { ${Object.keys(model.attributes) - .filter(attribute => model.attributes[attribute].private !== true) .map(attribute => { return `${attribute}: ${this.convertType({ definition: model.attributes[attribute], diff --git a/packages/strapi-plugin-users-permissions/config/schema.graphql b/packages/strapi-plugin-users-permissions/config/schema.graphql index 2c16949447..817788c4b2 100644 --- a/packages/strapi-plugin-users-permissions/config/schema.graphql +++ b/packages/strapi-plugin-users-permissions/config/schema.graphql @@ -89,7 +89,7 @@ module.exports = { await strapi.plugins['users-permissions'].controllers.user.create(context); return { - user: context.body + user: context.body.toJSON ? context.body.toJSON() : context.body }; } }, @@ -103,7 +103,7 @@ module.exports = { await strapi.plugins['users-permissions'].controllers.user.update(context); return { - user: context.body + user: context.body.toJSON ? context.body.toJSON() : context.body }; } }, @@ -119,7 +119,7 @@ module.exports = { // Bookshelf doesn't return the row once deleted. await strapi.plugins['users-permissions'].controllers.user.findOne(context); // Assign result to user. - const user = context.body; + const user = context.body.toJSON ? context.body.toJSON() : context.body; // Run destroy query. await strapi.plugins['users-permissions'].controllers.user.destroy(context); diff --git a/packages/strapi-plugin-users-permissions/controllers/User.js b/packages/strapi-plugin-users-permissions/controllers/User.js index 745d5ef555..3f31a0701f 100644 --- a/packages/strapi-plugin-users-permissions/controllers/User.js +++ b/packages/strapi-plugin-users-permissions/controllers/User.js @@ -95,6 +95,7 @@ module.exports = { try { const data = await strapi.plugins['users-permissions'].services.user.add(ctx.request.body); + // Send 201 `created` ctx.created(data); } catch(error) { From e1ce257d2fff7c3ff60fcc728c774c00bfac1de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Thu, 6 Dec 2018 18:11:53 +0100 Subject: [PATCH 14/36] Revert codebase and apply limit, skip, start and sort parameters --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 4 +- .travis.yml | 2 +- CONTRIBUTING.md | 2 +- README.md | 17 + docs/3.x.x/getting-started/installation.md | 2 +- docs/3.x.x/guides/filters.md | 8 +- docs/3.x.x/guides/graphql.md | 10 +- package.json | 6 +- .../admin/src/config/manifest.json | 2 +- .../admin/src/translations/zh.json | 143 +++++--- packages/strapi-admin/package.json | 10 +- packages/strapi-generate-admin/package.json | 10 +- packages/strapi-generate-api/package.json | 6 +- .../templates/bookshelf/service.template | 28 +- .../templates/mongoose/service.template | 29 +- .../strapi-generate-controller/package.json | 6 +- packages/strapi-generate-model/package.json | 6 +- .../strapi-generate-new/json/package.json.js | 5 +- packages/strapi-generate-new/package.json | 8 +- .../json/package.json.js | 4 +- packages/strapi-generate-plugin/package.json | 6 +- packages/strapi-generate-policy/package.json | 6 +- packages/strapi-generate-service/package.json | 6 +- packages/strapi-generate/package.json | 8 +- packages/strapi-helper-plugin/package.json | 6 +- packages/strapi-hook-bookshelf/lib/index.js | 46 ++- .../strapi-hook-bookshelf/lib/relations.js | 83 ----- packages/strapi-hook-bookshelf/package.json | 10 +- packages/strapi-hook-ejs/package.json | 6 +- packages/strapi-hook-knex/package.json | 6 +- packages/strapi-hook-mongoose/lib/index.js | 8 - .../strapi-hook-mongoose/lib/relations.js | 147 +------- .../strapi-hook-mongoose/lib/utils/index.js | 12 - packages/strapi-hook-mongoose/package.json | 10 +- packages/strapi-hook-redis/package.json | 8 +- .../lib/internals/eslint/front/.eslintrc.json | 34 +- .../internals/prettier/front/.prettierrc.js | 1 - packages/strapi-lint/package.json | 6 +- packages/strapi-middleware-views/package.json | 6 +- .../src/containers/SettingsPage/index.js | 18 +- .../admin/src/translations/zh.json | 100 ++++-- .../package.json | 8 +- .../admin/src/translations/ru.json | 32 +- .../admin/src/translations/zh.json | 98 +++--- .../package.json | 12 +- .../admin/src/translations/zh.json | 11 +- .../config/functions/bootstrap.js | 3 +- packages/strapi-plugin-email/package.json | 10 +- .../config/settings.json | 3 +- packages/strapi-plugin-graphql/package.json | 8 +- .../strapi-plugin-graphql/services/Loaders.js | 23 +- .../strapi-plugin-graphql/services/Query.js | 49 +-- .../services/Resolvers.js | 30 +- .../strapi-plugin-graphql/services/Schema.js | 4 +- .../admin/src/translations/zh.json | 146 ++++---- .../package.json | 8 +- .../admin/src/translations/zh.json | 14 +- .../config/functions/bootstrap.js | 3 +- packages/strapi-plugin-upload/package.json | 10 +- .../admin/src/translations/zh.json | 155 +++++---- .../config/queries/bookshelf.js | 25 +- .../config/queries/mongoose.js | 24 +- .../controllers/User.js | 2 - .../models/User.settings.json | 4 - .../package.json | 10 +- .../services/User.js | 1 - .../package.json | 6 +- .../package.json | 6 +- .../package.json | 6 +- .../package.json | 6 +- .../package.json | 6 +- .../lib/index.js | 2 +- .../package.json | 6 +- .../strapi-provider-upload-local/package.json | 6 +- .../package.json | 2 +- packages/strapi-utils/lib/models.js | 329 ++++-------------- packages/strapi-utils/package.json | 7 +- packages/strapi/package.json | 26 +- 78 files changed, 812 insertions(+), 1130 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md index f6804ba870..8850f9c3e5 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -18,8 +18,8 @@ about: Create a report to help us improve 🤔. **Informations** -- **Node.js version**: -- **npm version**: +- **Node.js version**: +- **NPM version**: - **Strapi version**: - **Database**: - **Operating system**: diff --git a/.travis.yml b/.travis.yml index f1a1a823dd..b07a232a92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,8 @@ git: language: node_js node_js: - - "9" - "10" + - "11" before_install: - export CHROME_BIN=chromium-browser diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d29e21e6e3..0fbdca6cce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ This project and everyone participating in it is governed by the [Strapi Code of Strapi is open-source under the [MIT license](https://github.com/strapi/strapi/blob/master/LICENSE.md). All the work done is available on GitHub. The core team and the contributors send pull requests which go through the same validation process. -Every user can send a feature request using the [issues](https://github.com/strapi/strapi/issues/new?template=FEATURE_REQUEST.md) on GitHub. Feel free to upvote 👍 [existing feature request](https://github.com/strapi/strapi/issues?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+feature+request+%F0%9F%99%8F%22) +Every user can send a feature request using the [issues](https://github.com/strapi/strapi/issues/new?template=FEATURE_REQUEST.md) on GitHub. Feel free to upvote 👍 [existing feature request](https://portal.productboard.com/strapi) ## Repository Organization We made the choice to use a monorepo design such as [React](https://github.com/facebook/react/tree/master/packages), [Babel](https://github.com/babel/babel/tree/master/packages), [Meteor](https://github.com/meteor/meteor/tree/devel/packages) or [Ember](https://github.com/emberjs/ember.js/tree/master/packages) do. It allows the community to easily maintain the whole ecosystem up-to-date and consistent. diff --git a/README.md b/README.md index 0c16132e52..abdada932e 100644 --- a/README.md +++ b/README.md @@ -44,10 +44,21 @@ #### 🖐 Requirements +Operating system: + * Ubuntu/Debian + * CentOS/RHEL + * MacOS + * Windows - [WSL Only](https://github.com/strapi/strapi/wiki/Frequently-Asked-Questions#windows) + * Docker - [Docker-Repo](https://github.com/strapi/strapi-docker) + +**Please note that Strapi may work on other Operating Systems, but are not tested at this time.** + Node: * NodeJS >= 10.x * NPM >= 6.x +**Please note that right now Node 11 is not Officially supported, and the current Node LTS (v10) should be used.** + Database: * MongoDB >= 3.x * MySQL >= 5.6 @@ -141,6 +152,12 @@ Follow our [migration guides](https://github.com/strapi/strapi/wiki) on the wiki Check out our [roadmap](https://portal.productboard.com/strapi) to get informed by the latest feature released and the upcoming ones. You can also give us insights and vote for a specific feature. +## Sponsors + +[Become a sponsor](https://opencollective.com/strapi#sponsor) and get your logo on our README on GitHub with a link to your site. + + + ## License [MIT License](LICENSE.md) Copyright (c) 2015-2018 [Strapi Solutions](https://strapi.io/). diff --git a/docs/3.x.x/getting-started/installation.md b/docs/3.x.x/getting-started/installation.md index 178d63f486..821079ca66 100644 --- a/docs/3.x.x/getting-started/installation.md +++ b/docs/3.x.x/getting-started/installation.md @@ -13,7 +13,7 @@ Please make sure your computer/server meets the following requirements: - The database of your choice: - [MongoDB](https://www.mongodb.com/) >= 3.x: MongoDB is a powerful document store. Installation guide [here](https://www.mongodb.com/download-center?j#community). - [MySQL](https://www.mysql.com/) >= 5.6: MySQL is an open-source relational database management system. Installation guide [here](https://dev.mysql.com/downloads/). - - [MariaDB](https://mariadb.org/) >= 10.1: MarialDB is a fork of MySQL and is guaranteed to stay open source. Installation guide [here](https://mariadb.org/download/). + - [MariaDB](https://mariadb.org/) >= 10.1: MariaDB is a fork of MySQL and is guaranteed to stay open source. Installation guide [here](https://mariadb.org/download/). - [PostgreSQL](https://www.postgresql.org/) >= 10: PostgreSQL is an open-source object-relational database management system. Installation guide [here](https://www.postgresql.org/download/). ## Setup diff --git a/docs/3.x.x/guides/filters.md b/docs/3.x.x/guides/filters.md index 9f58b56029..d4ae7c3039 100644 --- a/docs/3.x.x/guides/filters.md +++ b/docs/3.x.x/guides/filters.md @@ -37,13 +37,7 @@ Find products having a price equal or greater than `3`. `GET /products?price_gte=3` -#### Relations - You can also use filters into a relation attribute which will be applied to the first level of the request. - Find users having written a post named `Title`. - `GET /users?posts.name=Title` - Find posts written by a user having more than 12 years old. - `GET /posts?author.age_gt=12` - > Note: You can't use filter to have specific results inside relation, like "Find users and only their posts older than yesterday" as example. If you need it, you can modify or create your own service ou use [GraphQL](./graphql.md#query-api). + > Note: You can't use filter to have specific results inside relation, like "Find users and only their posts older than yesterday" as example. If you need it, you can modify or create your own service or use [GraphQL](./graphql.md#query-api). > Warning: this filter isn't available for `upload` plugin diff --git a/docs/3.x.x/guides/graphql.md b/docs/3.x.x/guides/graphql.md index 8468089f03..8383970cf8 100644 --- a/docs/3.x.x/guides/graphql.md +++ b/docs/3.x.x/guides/graphql.md @@ -18,7 +18,11 @@ Then, start your app and open your browser at [http://localhost:1337/graphql](ht ## Configurations -By default, the [Shadow CRUD](#shadow-crud) feature is enabled and the GraphQL is set to `/graphql`. You can edit these configurations in the following files. +By default, the [Shadow CRUD](#shadow-crud) feature is enabled and the GraphQL is set to `/graphql`. The Playground is enabled by default for both the development and staging environments, however it is disabled in production. By changing the config option `playgroundAlways` to true, you can enable it. + +Security limits on maximum number of items in your response by default is limited to 100, however you can change this on the following config option `amountLimit`. This should only be changed after careful consideration of the drawbacks of a large query which can cause what would basically be a DDoS (Distributed Denial of Service). And may cause abnormal load on your Strapi server, as well as your database server. + +You can edit these configurations in the following files. **Path —** `./plugins/graphql/config/settings.json`. @@ -26,7 +30,9 @@ By default, the [Shadow CRUD](#shadow-crud) feature is enabled and the GraphQL i { "endpoint": "/graphql", "shadowCRUD": true, - "depthLimit": 7 + "playgroundAlways": false, + "depthLimit": 7, + "amountLimit": 100 } ``` diff --git a/package.json b/package.json index 10b573923e..a028eece9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "3.0.0-alpha.14.5", + "version": "3.0.0-alpha.16", "dependencies": {}, "devDependencies": { "assert": "~1.3.0", @@ -59,8 +59,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.0.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } diff --git a/packages/strapi-admin/admin/src/config/manifest.json b/packages/strapi-admin/admin/src/config/manifest.json index 66bf73c2e8..1e45e10be3 100644 --- a/packages/strapi-admin/admin/src/config/manifest.json +++ b/packages/strapi-admin/admin/src/config/manifest.json @@ -1 +1 @@ -{"name":"vendor_lib","content":{"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_export.js":{"id":0,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_an-object.js":{"id":1,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_global.js":{"id":2,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_fails.js":{"id":3,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_is-object.js":{"id":4,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_wks.js":{"id":5,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_descriptors.js":{"id":6,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-dp.js":{"id":7,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-length.js":{"id":8,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-object.js":{"id":9,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_a-function.js":{"id":10,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_hide.js":{"id":11,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_redefine.js":{"id":12,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-html.js":{"id":13,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_has.js":{"id":14,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-iobject.js":{"id":15,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-gopd.js":{"id":16,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-gpo.js":{"id":17,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_core.js":{"id":18,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_ctx.js":{"id":19,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_cof.js":{"id":20,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_strict-method.js":{"id":21,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react/index.js":{"id":22,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-primitive.js":{"id":23,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_defined.js":{"id":24,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-integer.js":{"id":25,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-sap.js":{"id":26,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-methods.js":{"id":27,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_typed-array.js":{"id":28,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_metadata.js":{"id":29,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/prop-types/index.js":{"id":30,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_meta.js":{"id":31,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_library.js":{"id":32,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_add-to-unscopables.js":{"id":33,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_property-desc.js":{"id":34,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_uid.js":{"id":35,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-keys.js":{"id":36,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-absolute-index.js":{"id":37,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-create.js":{"id":38,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-gopn.js":{"id":39,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_set-species.js":{"id":40,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_an-instance.js":{"id":41,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_for-of.js":{"id":42,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_redefine-all.js":{"id":43,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_set-to-string-tag.js":{"id":44,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-trim.js":{"id":45,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iterators.js":{"id":46,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_validate-collection.js":{"id":47,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iobject.js":{"id":48,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-pie.js":{"id":49,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_classof.js":{"id":50,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-dom/index.js":{"id":51,"meta":{}},"./strapi-helper-plugin/node_modules/webpack/buildin/global.js":{"id":52,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_shared.js":{"id":53,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-includes.js":{"id":54,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-gops.js":{"id":55,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_is-array.js":{"id":56,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_is-regexp.js":{"id":57,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iter-detect.js":{"id":58,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_flags.js":{"id":59,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_fix-re-wks.js":{"id":60,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_species-constructor.js":{"id":61,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_user-agent.js":{"id":62,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_collection.js":{"id":63,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_typed.js":{"id":64,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-forced-pam.js":{"id":65,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_set-collection-of.js":{"id":66,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_set-collection-from.js":{"id":67,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_dom-create.js":{"id":68,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_wks-define.js":{"id":69,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_shared-key.js":{"id":70,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_enum-bug-keys.js":{"id":71,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_html.js":{"id":72,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_set-proto.js":{"id":73,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-ws.js":{"id":74,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_inherit-if-required.js":{"id":75,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-repeat.js":{"id":76,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_math-sign.js":{"id":77,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_math-expm1.js":{"id":78,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-at.js":{"id":79,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iter-define.js":{"id":80,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iter-create.js":{"id":81,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-context.js":{"id":82,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_fails-is-regexp.js":{"id":83,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_is-array-iter.js":{"id":84,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_create-property.js":{"id":85,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/core.get-iterator-method.js":{"id":86,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-species-create.js":{"id":87,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-fill.js":{"id":88,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.iterator.js":{"id":89,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_task.js":{"id":90,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_microtask.js":{"id":91,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_new-promise-capability.js":{"id":92,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_typed-buffer.js":{"id":93,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/object-assign/index.js":{"id":94,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat/src/main.js":{"id":95,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat/src/utils.js":{"id":96,"meta":{"harmonyModule":true},"exports":["hop","extend"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/Transition.js":{"id":97,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-lifecycles-compat/react-lifecycles-compat.cjs.js":{"id":98,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/utils/PropTypes.js":{"id":99,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/TransitionGroup.js":{"id":100,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_ie8-dom-define.js":{"id":101,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_wks-ext.js":{"id":102,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-keys-internal.js":{"id":103,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-dps.js":{"id":104,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-gopn-ext.js":{"id":105,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-assign.js":{"id":106,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_bind.js":{"id":107,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_invoke.js":{"id":108,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_parse-int.js":{"id":109,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_parse-float.js":{"id":110,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_a-number-value.js":{"id":111,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_is-integer.js":{"id":112,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_math-log1p.js":{"id":113,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_math-fround.js":{"id":114,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iter-call.js":{"id":115,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-reduce.js":{"id":116,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-copy-within.js":{"id":117,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iter-step.js":{"id":118,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.flags.js":{"id":119,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_perform.js":{"id":120,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_promise-resolve.js":{"id":121,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.map.js":{"id":122,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_collection-strong.js":{"id":123,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.set.js":{"id":124,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.weak-map.js":{"id":125,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_collection-weak.js":{"id":126,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-index.js":{"id":127,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_own-keys.js":{"id":128,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_flatten-into-array.js":{"id":129,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-pad.js":{"id":130,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-to-array.js":{"id":131,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_collection-to-json.js":{"id":132,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-from-iterable.js":{"id":133,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_math-scale.js":{"id":134,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react/cjs/react.production.min.js":{"id":136,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-dom/cjs/react-dom.production.min.js":{"id":137,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/scheduler/index.js":{"id":138,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/scheduler/cjs/scheduler.production.min.js":{"id":139,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-intl/lib/index.es.js":{"id":140,"meta":{"harmonyModule":true},"exports":["addLocaleData","intlShape","injectIntl","defineMessages","IntlProvider","FormattedDate","FormattedTime","FormattedRelative","FormattedNumber","FormattedPlural","FormattedMessage","FormattedHTMLMessage"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat/src/core.js":{"id":142,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat/src/es5.js":{"id":143,"meta":{"harmonyModule":true},"exports":["defineProperty","objCreate"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat/src/compiler.js":{"id":144,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat-parser/src/parser.js":{"id":145,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat/src/en.js":{"id":146,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-relativeformat/src/main.js":{"id":147,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-relativeformat/src/core.js":{"id":148,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-relativeformat/src/diff.js":{"id":149,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-relativeformat/src/es5.js":{"id":150,"meta":{"harmonyModule":true},"exports":["defineProperty","objCreate","arrIndexOf","isArray","dateNow"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-relativeformat/src/en.js":{"id":151,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/prop-types/factoryWithThrowingShims.js":{"id":152,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/prop-types/lib/ReactPropTypesSecret.js":{"id":153,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":{"id":154,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/invariant/browser.js":{"id":155,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-format-cache/src/memoizer.js":{"id":156,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-format-cache/src/es5.js":{"id":157,"meta":{"harmonyModule":true},"exports":["bind","defineProperty","objCreate"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/reactstrap/dist/reactstrap.es.js":{"id":158,"meta":{"harmonyModule":true},"exports":["Alert","Container","Row","Col","Navbar","NavbarBrand","NavbarToggler","Nav","NavItem","NavDropdown","NavLink","Breadcrumb","BreadcrumbItem","Button","ButtonDropdown","ButtonGroup","ButtonToolbar","Dropdown","DropdownItem","DropdownMenu","DropdownToggle","Fade","Badge","Card","CardLink","CardGroup","CardDeck","CardColumns","CardBody","CardBlock","CardFooter","CardHeader","CardImg","CardImgOverlay","Carousel","UncontrolledCarousel","CarouselControl","CarouselItem","CarouselIndicators","CarouselCaption","CardSubtitle","CardText","CardTitle","Popover","PopoverContent","PopoverBody","PopoverTitle","PopoverHeader","Progress","Modal","ModalHeader","ModalBody","ModalFooter","PopperContent","PopperTargetHelper","Tooltip","Table","ListGroup","Form","FormFeedback","FormGroup","FormText","Input","InputGroup","InputGroupAddon","InputGroupButton","InputGroupButtonDropdown","InputGroupText","Label","Media","Pagination","PaginationItem","PaginationLink","TabContent","TabPane","Jumbotron","Collapse","ListGroupItem","ListGroupItemText","ListGroupItemHeading","UncontrolledAlert","UncontrolledButtonDropdown","UncontrolledDropdown","UncontrolledNavDropdown","UncontrolledTooltip","Util"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/classnames/index.js":{"id":159,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/lodash.isfunction/index.js":{"id":160,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/lodash.isobject/index.js":{"id":161,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-popper/dist/react-popper.js":{"id":162,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/lodash.tonumber/index.js":{"id":163,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/index.js":{"id":164,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/CSSTransition.js":{"id":165,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/dom-helpers/class/addClass.js":{"id":166,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/@babel/runtime/helpers/interopRequireDefault.js":{"id":167,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/dom-helpers/class/hasClass.js":{"id":168,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/dom-helpers/class/removeClass.js":{"id":169,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/ReplaceTransition.js":{"id":170,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/utils/ChildMapping.js":{"id":171,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/immutable/dist/immutable.js":{"id":172,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/lodash/lodash.js":{"id":173,"meta":{}},"./strapi-helper-plugin/node_modules/webpack/buildin/module.js":{"id":174,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/babel-polyfill/lib/index.js":{"id":175,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/shim.js":{"id":176,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.symbol.js":{"id":177,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_enum-keys.js":{"id":178,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.create.js":{"id":179,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.define-property.js":{"id":180,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.define-properties.js":{"id":181,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js":{"id":182,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.get-prototype-of.js":{"id":183,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.keys.js":{"id":184,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.get-own-property-names.js":{"id":185,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.freeze.js":{"id":186,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.seal.js":{"id":187,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.prevent-extensions.js":{"id":188,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.is-frozen.js":{"id":189,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.is-sealed.js":{"id":190,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.is-extensible.js":{"id":191,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.assign.js":{"id":192,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.is.js":{"id":193,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_same-value.js":{"id":194,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.set-prototype-of.js":{"id":195,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.to-string.js":{"id":196,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.function.bind.js":{"id":197,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.function.name.js":{"id":198,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.function.has-instance.js":{"id":199,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.parse-int.js":{"id":200,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.parse-float.js":{"id":201,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.constructor.js":{"id":202,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.to-fixed.js":{"id":203,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.to-precision.js":{"id":204,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.epsilon.js":{"id":205,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.is-finite.js":{"id":206,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.is-integer.js":{"id":207,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.is-nan.js":{"id":208,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.is-safe-integer.js":{"id":209,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.max-safe-integer.js":{"id":210,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.min-safe-integer.js":{"id":211,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.parse-float.js":{"id":212,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.parse-int.js":{"id":213,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.acosh.js":{"id":214,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.asinh.js":{"id":215,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.atanh.js":{"id":216,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.cbrt.js":{"id":217,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.clz32.js":{"id":218,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.cosh.js":{"id":219,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.expm1.js":{"id":220,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.fround.js":{"id":221,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.hypot.js":{"id":222,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.imul.js":{"id":223,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.log10.js":{"id":224,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.log1p.js":{"id":225,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.log2.js":{"id":226,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.sign.js":{"id":227,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.sinh.js":{"id":228,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.tanh.js":{"id":229,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.trunc.js":{"id":230,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.from-code-point.js":{"id":231,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.raw.js":{"id":232,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.trim.js":{"id":233,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.iterator.js":{"id":234,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.code-point-at.js":{"id":235,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.ends-with.js":{"id":236,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.includes.js":{"id":237,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.repeat.js":{"id":238,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.starts-with.js":{"id":239,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.anchor.js":{"id":240,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.big.js":{"id":241,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.blink.js":{"id":242,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.bold.js":{"id":243,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.fixed.js":{"id":244,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.fontcolor.js":{"id":245,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.fontsize.js":{"id":246,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.italics.js":{"id":247,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.link.js":{"id":248,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.small.js":{"id":249,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.strike.js":{"id":250,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.sub.js":{"id":251,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.sup.js":{"id":252,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.date.now.js":{"id":253,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.date.to-json.js":{"id":254,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.date.to-iso-string.js":{"id":255,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_date-to-iso-string.js":{"id":256,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.date.to-string.js":{"id":257,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.date.to-primitive.js":{"id":258,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_date-to-primitive.js":{"id":259,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.is-array.js":{"id":260,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.from.js":{"id":261,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.of.js":{"id":262,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.join.js":{"id":263,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.slice.js":{"id":264,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.sort.js":{"id":265,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.for-each.js":{"id":266,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-species-constructor.js":{"id":267,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.map.js":{"id":268,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.filter.js":{"id":269,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.some.js":{"id":270,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.every.js":{"id":271,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.reduce.js":{"id":272,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.reduce-right.js":{"id":273,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.index-of.js":{"id":274,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.last-index-of.js":{"id":275,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.copy-within.js":{"id":276,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.fill.js":{"id":277,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.find.js":{"id":278,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.find-index.js":{"id":279,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.species.js":{"id":280,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.constructor.js":{"id":281,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.to-string.js":{"id":282,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.match.js":{"id":283,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.replace.js":{"id":284,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.search.js":{"id":285,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.split.js":{"id":286,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.promise.js":{"id":287,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.weak-set.js":{"id":288,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.array-buffer.js":{"id":289,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.data-view.js":{"id":290,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.int8-array.js":{"id":291,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.uint8-array.js":{"id":292,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js":{"id":293,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.int16-array.js":{"id":294,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.uint16-array.js":{"id":295,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.int32-array.js":{"id":296,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.uint32-array.js":{"id":297,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.float32-array.js":{"id":298,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.float64-array.js":{"id":299,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.apply.js":{"id":300,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.construct.js":{"id":301,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.define-property.js":{"id":302,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.delete-property.js":{"id":303,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.enumerate.js":{"id":304,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.get.js":{"id":305,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js":{"id":306,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.get-prototype-of.js":{"id":307,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.has.js":{"id":308,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.is-extensible.js":{"id":309,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.own-keys.js":{"id":310,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.prevent-extensions.js":{"id":311,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.set.js":{"id":312,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.set-prototype-of.js":{"id":313,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.array.includes.js":{"id":314,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.array.flat-map.js":{"id":315,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.array.flatten.js":{"id":316,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.string.at.js":{"id":317,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.string.pad-start.js":{"id":318,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.string.pad-end.js":{"id":319,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.string.trim-left.js":{"id":320,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.string.trim-right.js":{"id":321,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.string.match-all.js":{"id":322,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.symbol.async-iterator.js":{"id":323,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.symbol.observable.js":{"id":324,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js":{"id":325,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.values.js":{"id":326,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.entries.js":{"id":327,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.define-getter.js":{"id":328,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.define-setter.js":{"id":329,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.lookup-getter.js":{"id":330,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.lookup-setter.js":{"id":331,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.map.to-json.js":{"id":332,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.set.to-json.js":{"id":333,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.map.of.js":{"id":334,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.set.of.js":{"id":335,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.weak-map.of.js":{"id":336,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.weak-set.of.js":{"id":337,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.map.from.js":{"id":338,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.set.from.js":{"id":339,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.weak-map.from.js":{"id":340,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.weak-set.from.js":{"id":341,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.global.js":{"id":342,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.system.global.js":{"id":343,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.error.is-error.js":{"id":344,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.clamp.js":{"id":345,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.deg-per-rad.js":{"id":346,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.degrees.js":{"id":347,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.fscale.js":{"id":348,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.iaddh.js":{"id":349,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.isubh.js":{"id":350,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.imulh.js":{"id":351,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.rad-per-deg.js":{"id":352,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.radians.js":{"id":353,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.scale.js":{"id":354,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.umulh.js":{"id":355,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.signbit.js":{"id":356,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.promise.finally.js":{"id":357,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.promise.try.js":{"id":358,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.define-metadata.js":{"id":359,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.delete-metadata.js":{"id":360,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.get-metadata.js":{"id":361,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js":{"id":362,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.get-own-metadata.js":{"id":363,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js":{"id":364,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.has-metadata.js":{"id":365,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.has-own-metadata.js":{"id":366,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.metadata.js":{"id":367,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.asap.js":{"id":368,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.observable.js":{"id":369,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/web.timers.js":{"id":370,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/web.immediate.js":{"id":371,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/web.dom.iterable.js":{"id":372,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/babel-polyfill/node_modules/regenerator-runtime/runtime.js":{"id":373,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/fn/regexp/escape.js":{"id":374,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/core.regexp.escape.js":{"id":375,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_replacer.js":{"id":376,"meta":{}}}} +{"name":"vendor_lib","content":{"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_export.js":{"id":0,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_an-object.js":{"id":1,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_global.js":{"id":2,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_fails.js":{"id":3,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_is-object.js":{"id":4,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_wks.js":{"id":5,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_descriptors.js":{"id":6,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-dp.js":{"id":7,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-length.js":{"id":8,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-object.js":{"id":9,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_a-function.js":{"id":10,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_hide.js":{"id":11,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_redefine.js":{"id":12,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-html.js":{"id":13,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_has.js":{"id":14,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-iobject.js":{"id":15,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-gopd.js":{"id":16,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-gpo.js":{"id":17,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_core.js":{"id":18,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_ctx.js":{"id":19,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_cof.js":{"id":20,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_strict-method.js":{"id":21,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react/index.js":{"id":22,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-primitive.js":{"id":23,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_defined.js":{"id":24,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-integer.js":{"id":25,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-sap.js":{"id":26,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-methods.js":{"id":27,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_typed-array.js":{"id":28,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_metadata.js":{"id":29,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/prop-types/index.js":{"id":30,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_meta.js":{"id":31,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_library.js":{"id":32,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_add-to-unscopables.js":{"id":33,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_property-desc.js":{"id":34,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_uid.js":{"id":35,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-keys.js":{"id":36,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-absolute-index.js":{"id":37,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-create.js":{"id":38,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-gopn.js":{"id":39,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_set-species.js":{"id":40,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_an-instance.js":{"id":41,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_for-of.js":{"id":42,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_redefine-all.js":{"id":43,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_set-to-string-tag.js":{"id":44,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-trim.js":{"id":45,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iterators.js":{"id":46,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_validate-collection.js":{"id":47,"meta":{}},"./strapi-helper-plugin/node_modules/webpack/buildin/global.js":{"id":48,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iobject.js":{"id":49,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-pie.js":{"id":50,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_classof.js":{"id":51,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-dom/index.js":{"id":52,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_shared.js":{"id":53,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-includes.js":{"id":54,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-gops.js":{"id":55,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_is-array.js":{"id":56,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_is-regexp.js":{"id":57,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iter-detect.js":{"id":58,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_flags.js":{"id":59,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_fix-re-wks.js":{"id":60,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_species-constructor.js":{"id":61,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_user-agent.js":{"id":62,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_collection.js":{"id":63,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_typed.js":{"id":64,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-forced-pam.js":{"id":65,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_set-collection-of.js":{"id":66,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_set-collection-from.js":{"id":67,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_dom-create.js":{"id":68,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_wks-define.js":{"id":69,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_shared-key.js":{"id":70,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_enum-bug-keys.js":{"id":71,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_html.js":{"id":72,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_set-proto.js":{"id":73,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-ws.js":{"id":74,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_inherit-if-required.js":{"id":75,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-repeat.js":{"id":76,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_math-sign.js":{"id":77,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_math-expm1.js":{"id":78,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-at.js":{"id":79,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iter-define.js":{"id":80,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iter-create.js":{"id":81,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-context.js":{"id":82,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_fails-is-regexp.js":{"id":83,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_is-array-iter.js":{"id":84,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_create-property.js":{"id":85,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/core.get-iterator-method.js":{"id":86,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-species-create.js":{"id":87,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-fill.js":{"id":88,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.iterator.js":{"id":89,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_task.js":{"id":90,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_microtask.js":{"id":91,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_new-promise-capability.js":{"id":92,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_typed-buffer.js":{"id":93,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/object-assign/index.js":{"id":94,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat/src/main.js":{"id":95,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat/src/utils.js":{"id":96,"meta":{"harmonyModule":true},"exports":["hop","extend"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/Transition.js":{"id":97,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-lifecycles-compat/react-lifecycles-compat.cjs.js":{"id":98,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/utils/PropTypes.js":{"id":99,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/TransitionGroup.js":{"id":100,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_ie8-dom-define.js":{"id":101,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_wks-ext.js":{"id":102,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-keys-internal.js":{"id":103,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-dps.js":{"id":104,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-gopn-ext.js":{"id":105,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-assign.js":{"id":106,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_bind.js":{"id":107,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_invoke.js":{"id":108,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_parse-int.js":{"id":109,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_parse-float.js":{"id":110,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_a-number-value.js":{"id":111,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_is-integer.js":{"id":112,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_math-log1p.js":{"id":113,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_math-fround.js":{"id":114,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iter-call.js":{"id":115,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-reduce.js":{"id":116,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-copy-within.js":{"id":117,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_iter-step.js":{"id":118,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.flags.js":{"id":119,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_perform.js":{"id":120,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_promise-resolve.js":{"id":121,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.map.js":{"id":122,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_collection-strong.js":{"id":123,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.set.js":{"id":124,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.weak-map.js":{"id":125,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_collection-weak.js":{"id":126,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_to-index.js":{"id":127,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_own-keys.js":{"id":128,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_flatten-into-array.js":{"id":129,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_string-pad.js":{"id":130,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_object-to-array.js":{"id":131,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_collection-to-json.js":{"id":132,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-from-iterable.js":{"id":133,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_math-scale.js":{"id":134,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react/cjs/react.production.min.js":{"id":136,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-dom/cjs/react-dom.production.min.js":{"id":137,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/scheduler/index.js":{"id":138,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/scheduler/cjs/scheduler.production.min.js":{"id":139,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-intl/lib/index.es.js":{"id":140,"meta":{"harmonyModule":true},"exports":["addLocaleData","intlShape","injectIntl","defineMessages","IntlProvider","FormattedDate","FormattedTime","FormattedRelative","FormattedNumber","FormattedPlural","FormattedMessage","FormattedHTMLMessage"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat/src/core.js":{"id":142,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat/src/es5.js":{"id":143,"meta":{"harmonyModule":true},"exports":["defineProperty","objCreate"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat/src/compiler.js":{"id":144,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat-parser/src/parser.js":{"id":145,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-messageformat/src/en.js":{"id":146,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-relativeformat/src/main.js":{"id":147,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-relativeformat/src/core.js":{"id":148,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-relativeformat/src/diff.js":{"id":149,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-relativeformat/src/es5.js":{"id":150,"meta":{"harmonyModule":true},"exports":["defineProperty","objCreate","arrIndexOf","isArray","dateNow"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-relativeformat/src/en.js":{"id":151,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/prop-types/factoryWithThrowingShims.js":{"id":152,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/prop-types/lib/ReactPropTypesSecret.js":{"id":153,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":{"id":154,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/invariant/browser.js":{"id":155,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-format-cache/src/memoizer.js":{"id":156,"meta":{"harmonyModule":true},"exports":["default"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/intl-format-cache/src/es5.js":{"id":157,"meta":{"harmonyModule":true},"exports":["bind","defineProperty","objCreate"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/reactstrap/dist/reactstrap.es.js":{"id":158,"meta":{"harmonyModule":true},"exports":["Alert","Container","Row","Col","Navbar","NavbarBrand","NavbarToggler","Nav","NavItem","NavDropdown","NavLink","Breadcrumb","BreadcrumbItem","Button","ButtonDropdown","ButtonGroup","ButtonToolbar","Dropdown","DropdownItem","DropdownMenu","DropdownToggle","Fade","Badge","Card","CardLink","CardGroup","CardDeck","CardColumns","CardBody","CardBlock","CardFooter","CardHeader","CardImg","CardImgOverlay","Carousel","UncontrolledCarousel","CarouselControl","CarouselItem","CarouselIndicators","CarouselCaption","CardSubtitle","CardText","CardTitle","Popover","PopoverContent","PopoverBody","PopoverTitle","PopoverHeader","Progress","Modal","ModalHeader","ModalBody","ModalFooter","PopperContent","PopperTargetHelper","Tooltip","Table","ListGroup","Form","FormFeedback","FormGroup","FormText","Input","InputGroup","InputGroupAddon","InputGroupButton","InputGroupButtonDropdown","InputGroupText","Label","Media","Pagination","PaginationItem","PaginationLink","TabContent","TabPane","Jumbotron","Collapse","ListGroupItem","ListGroupItemText","ListGroupItemHeading","UncontrolledAlert","UncontrolledButtonDropdown","UncontrolledDropdown","UncontrolledNavDropdown","UncontrolledTooltip","Util"]},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/classnames/index.js":{"id":159,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/lodash.isfunction/index.js":{"id":160,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/lodash.isobject/index.js":{"id":161,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-popper/dist/react-popper.js":{"id":162,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/lodash.tonumber/index.js":{"id":163,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/index.js":{"id":164,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/CSSTransition.js":{"id":165,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/dom-helpers/class/addClass.js":{"id":166,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/@babel/runtime/helpers/interopRequireDefault.js":{"id":167,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/dom-helpers/class/hasClass.js":{"id":168,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/dom-helpers/class/removeClass.js":{"id":169,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/ReplaceTransition.js":{"id":170,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/react-transition-group/utils/ChildMapping.js":{"id":171,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/immutable/dist/immutable.js":{"id":172,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/lodash/lodash.js":{"id":173,"meta":{}},"./strapi-helper-plugin/node_modules/webpack/buildin/module.js":{"id":174,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/babel-polyfill/lib/index.js":{"id":175,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/shim.js":{"id":176,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.symbol.js":{"id":177,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_enum-keys.js":{"id":178,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.create.js":{"id":179,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.define-property.js":{"id":180,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.define-properties.js":{"id":181,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js":{"id":182,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.get-prototype-of.js":{"id":183,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.keys.js":{"id":184,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.get-own-property-names.js":{"id":185,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.freeze.js":{"id":186,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.seal.js":{"id":187,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.prevent-extensions.js":{"id":188,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.is-frozen.js":{"id":189,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.is-sealed.js":{"id":190,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.is-extensible.js":{"id":191,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.assign.js":{"id":192,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.is.js":{"id":193,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_same-value.js":{"id":194,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.set-prototype-of.js":{"id":195,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.object.to-string.js":{"id":196,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.function.bind.js":{"id":197,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.function.name.js":{"id":198,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.function.has-instance.js":{"id":199,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.parse-int.js":{"id":200,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.parse-float.js":{"id":201,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.constructor.js":{"id":202,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.to-fixed.js":{"id":203,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.to-precision.js":{"id":204,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.epsilon.js":{"id":205,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.is-finite.js":{"id":206,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.is-integer.js":{"id":207,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.is-nan.js":{"id":208,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.is-safe-integer.js":{"id":209,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.max-safe-integer.js":{"id":210,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.min-safe-integer.js":{"id":211,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.parse-float.js":{"id":212,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.number.parse-int.js":{"id":213,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.acosh.js":{"id":214,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.asinh.js":{"id":215,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.atanh.js":{"id":216,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.cbrt.js":{"id":217,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.clz32.js":{"id":218,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.cosh.js":{"id":219,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.expm1.js":{"id":220,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.fround.js":{"id":221,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.hypot.js":{"id":222,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.imul.js":{"id":223,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.log10.js":{"id":224,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.log1p.js":{"id":225,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.log2.js":{"id":226,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.sign.js":{"id":227,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.sinh.js":{"id":228,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.tanh.js":{"id":229,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.math.trunc.js":{"id":230,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.from-code-point.js":{"id":231,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.raw.js":{"id":232,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.trim.js":{"id":233,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.iterator.js":{"id":234,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.code-point-at.js":{"id":235,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.ends-with.js":{"id":236,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.includes.js":{"id":237,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.repeat.js":{"id":238,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.starts-with.js":{"id":239,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.anchor.js":{"id":240,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.big.js":{"id":241,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.blink.js":{"id":242,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.bold.js":{"id":243,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.fixed.js":{"id":244,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.fontcolor.js":{"id":245,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.fontsize.js":{"id":246,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.italics.js":{"id":247,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.link.js":{"id":248,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.small.js":{"id":249,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.strike.js":{"id":250,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.sub.js":{"id":251,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.string.sup.js":{"id":252,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.date.now.js":{"id":253,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.date.to-json.js":{"id":254,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.date.to-iso-string.js":{"id":255,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_date-to-iso-string.js":{"id":256,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.date.to-string.js":{"id":257,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.date.to-primitive.js":{"id":258,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_date-to-primitive.js":{"id":259,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.is-array.js":{"id":260,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.from.js":{"id":261,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.of.js":{"id":262,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.join.js":{"id":263,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.slice.js":{"id":264,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.sort.js":{"id":265,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.for-each.js":{"id":266,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_array-species-constructor.js":{"id":267,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.map.js":{"id":268,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.filter.js":{"id":269,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.some.js":{"id":270,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.every.js":{"id":271,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.reduce.js":{"id":272,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.reduce-right.js":{"id":273,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.index-of.js":{"id":274,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.last-index-of.js":{"id":275,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.copy-within.js":{"id":276,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.fill.js":{"id":277,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.find.js":{"id":278,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.find-index.js":{"id":279,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.array.species.js":{"id":280,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.constructor.js":{"id":281,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.to-string.js":{"id":282,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.match.js":{"id":283,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.replace.js":{"id":284,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.search.js":{"id":285,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.regexp.split.js":{"id":286,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.promise.js":{"id":287,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.weak-set.js":{"id":288,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.array-buffer.js":{"id":289,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.data-view.js":{"id":290,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.int8-array.js":{"id":291,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.uint8-array.js":{"id":292,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js":{"id":293,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.int16-array.js":{"id":294,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.uint16-array.js":{"id":295,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.int32-array.js":{"id":296,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.uint32-array.js":{"id":297,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.float32-array.js":{"id":298,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.typed.float64-array.js":{"id":299,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.apply.js":{"id":300,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.construct.js":{"id":301,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.define-property.js":{"id":302,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.delete-property.js":{"id":303,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.enumerate.js":{"id":304,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.get.js":{"id":305,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js":{"id":306,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.get-prototype-of.js":{"id":307,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.has.js":{"id":308,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.is-extensible.js":{"id":309,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.own-keys.js":{"id":310,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.prevent-extensions.js":{"id":311,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.set.js":{"id":312,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es6.reflect.set-prototype-of.js":{"id":313,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.array.includes.js":{"id":314,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.array.flat-map.js":{"id":315,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.array.flatten.js":{"id":316,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.string.at.js":{"id":317,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.string.pad-start.js":{"id":318,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.string.pad-end.js":{"id":319,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.string.trim-left.js":{"id":320,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.string.trim-right.js":{"id":321,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.string.match-all.js":{"id":322,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.symbol.async-iterator.js":{"id":323,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.symbol.observable.js":{"id":324,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js":{"id":325,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.values.js":{"id":326,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.entries.js":{"id":327,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.define-getter.js":{"id":328,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.define-setter.js":{"id":329,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.lookup-getter.js":{"id":330,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.object.lookup-setter.js":{"id":331,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.map.to-json.js":{"id":332,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.set.to-json.js":{"id":333,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.map.of.js":{"id":334,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.set.of.js":{"id":335,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.weak-map.of.js":{"id":336,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.weak-set.of.js":{"id":337,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.map.from.js":{"id":338,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.set.from.js":{"id":339,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.weak-map.from.js":{"id":340,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.weak-set.from.js":{"id":341,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.global.js":{"id":342,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.system.global.js":{"id":343,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.error.is-error.js":{"id":344,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.clamp.js":{"id":345,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.deg-per-rad.js":{"id":346,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.degrees.js":{"id":347,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.fscale.js":{"id":348,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.iaddh.js":{"id":349,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.isubh.js":{"id":350,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.imulh.js":{"id":351,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.rad-per-deg.js":{"id":352,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.radians.js":{"id":353,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.scale.js":{"id":354,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.umulh.js":{"id":355,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.math.signbit.js":{"id":356,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.promise.finally.js":{"id":357,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.promise.try.js":{"id":358,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.define-metadata.js":{"id":359,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.delete-metadata.js":{"id":360,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.get-metadata.js":{"id":361,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js":{"id":362,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.get-own-metadata.js":{"id":363,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js":{"id":364,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.has-metadata.js":{"id":365,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.has-own-metadata.js":{"id":366,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.reflect.metadata.js":{"id":367,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.asap.js":{"id":368,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/es7.observable.js":{"id":369,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/web.timers.js":{"id":370,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/web.immediate.js":{"id":371,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/web.dom.iterable.js":{"id":372,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/babel-polyfill/node_modules/regenerator-runtime/runtime.js":{"id":373,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/fn/regexp/escape.js":{"id":374,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/core.regexp.escape.js":{"id":375,"meta":{}},"./strapi-admin/node_modules/strapi-helper-plugin/node_modules/core-js/modules/_replacer.js":{"id":376,"meta":{}}}} \ No newline at end of file diff --git a/packages/strapi-admin/admin/src/translations/zh.json b/packages/strapi-admin/admin/src/translations/zh.json index af81295981..d00b103c4f 100644 --- a/packages/strapi-admin/admin/src/translations/zh.json +++ b/packages/strapi-admin/admin/src/translations/zh.json @@ -1,39 +1,65 @@ { - "Auth & Permissions": "認證 & 權限", - "Content Manager": "內容管理", + "Analytics": "分析器", + "Content Manager": "資料管理", "Content Type Builder": "建立和更新資料結構", - "Email": "Email", - "New entry": "新入口", + "Email": "電子郵件", + "Files Upload": "檔案上傳", + "HomePage.notification.newsLetter.success": "成功訂閱電子報", + "New entry": "新增項目", "Password": "密碼", - "Provider": "供應商", - "ResetPasswordToken": "重設密碼的 Token", - "Role": "權限", + "Provider": "提供者", + "ResetPasswordToken": "密碼重設令符", + "Role": "身份", + "Roles & Permissions": "身份與權限", "Settings Manager": "管理設定", "Username": "使用者名稱", + "Users": "Users", + "Users & Permissions": "使用者與權限", + "app.components.BlockLink.code": "範例", + "app.components.BlockLink.code.content": "透過社群所開發的專案學習", + "app.components.BlockLink.documentation": "閱讀文件", + "app.components.BlockLink.documentation.content": "了解其中的觀念、參考指南以及教學。", + "app.components.Button.cancel": "取消", + "app.components.Button.save": "儲存", "app.components.ComingSoonPage.comingSoon": "即將推出", "app.components.ComingSoonPage.featuresNotAvailable": "這個功能正在開發中", - "app.components.DownloadInfo.download": "正在下載...", - "app.components.DownloadInfo.text": "請稍等幾分鐘,謝謝您的耐心。", - "app.components.HomePage.create": "Create your first Content Type", - "app.components.HomePage.createBlock.content.first": "The ", - "app.components.HomePage.createBlock.content.second": " plugin will help you to define the data structure of your models. If you’re new here, we highly recommend you to follow our ", - "app.components.HomePage.createBlock.content.tutorial": " tutorial.", - "app.components.HomePage.welcome": "歡迎回來!", - "app.components.HomePage.welcomeBlock.content": "We are happy to have you as one of community member. We are constantly looking for feedback so feel free to send us DM on ", - "app.components.HomePage.welcomeBlock.content.issues": "issues", - "app.components.HomePage.welcomeBlock.content.raise": " or raise ", - "app.components.ImgPreview.hint": "將您要上傳的檔案拖拉到這個框框,或是瀏覽檔案", + "app.components.DownloadInfo.download": "下載中...", + "app.components.DownloadInfo.text": "請稍候幾分鐘,謝謝。", + "app.components.EmptyAttributes.title": "這裡還沒有任何項目", + "app.components.HomePage.button.blog": "到部落格上閱讀更多", + "app.components.HomePage.button.quickStart": "開始新手教學", + "app.components.HomePage.community": "探索開發社群", + "app.components.HomePage.community.content": "在不同的社群中與其他成員、貢獻者以及開發者討論。", + "app.components.HomePage.create": "建立您的第一個資料結構", + "app.components.HomePage.createBlock.content.first": " ", + "app.components.HomePage.createBlock.content.second": " 這個擴充功能可以幫助您定義自己的資料結構。如果您是第一次使用,我們推薦您先閱讀 ", + "app.components.HomePage.createBlock.content.tutorial": " 教學。", + "app.components.HomePage.cta": "送出", + "app.components.HomePage.newsLetter": "訂閱電子報以獲得 Strapi 的最新訊息", + "app.components.HomePage.support": "支持我們", + "app.components.HomePage.support.content": "藉由購買T恤,可以讓我們繼續開發這個專案並給您更佳的使用者體驗!", + "app.components.HomePage.support.link": "立刻購買", + "app.components.HomePage.welcome": "歡迎加入!", + "app.components.HomePage.welcome.again": "歡迎回來! ", + "app.components.HomePage.welcomeBlock.content": "我們很高興您能成為我們社群的一份子。我們隨時歡迎您的意見,因此不要吝嗇於發訊息到 ", + "app.components.HomePage.welcomeBlock.content.again": "希望您在您的專案中有所進展... 隨時歡迎您來看看 Strapi 的新功能。我們正在盡最大的努力依照您的建議改進這個產品。", + "app.components.HomePage.welcomeBlock.content.issues": "問題。", + "app.components.HomePage.welcomeBlock.content.raise": "或是回報", + "app.components.ImgPreview.hint": "將您要上傳的檔案拖曳到此區域,或是瀏覽檔案", "app.components.ImgPreview.hint.browse": "瀏覽", - "app.components.InputFile.newFile": "增加新檔案 {browse}", - "app.components.InputFileDetails.open": "Open in a new tab", + "app.components.InputFile.newFile": "增加新檔案", + "app.components.InputFileDetails.open": "在新分頁中開啟", + "app.components.InputFileDetails.originalName": "原始名稱:", + "app.components.InputFileDetails.remove": "移除檔案", + "app.components.InputFileDetails.size": "大小:", "app.components.InstallPluginPage.InputSearch.label": " ", - "app.components.InstallPluginPage.InputSearch.placeholder": "搜尋擴充功能... (範例: 使用者認證)", + "app.components.InstallPluginPage.InputSearch.placeholder": "搜尋擴充功能... (範例: authentication)", "app.components.InstallPluginPage.description": "輕鬆擴充您的應用程式", "app.components.InstallPluginPage.helmet": "市集 - 擴充功能", - "app.components.InstallPluginPage.plugin.support-us.description": "透過購買 Strapi T-shirt 來支持我們。這些資金將幫助我們繼續努力打造更好的產品和使用者體驗。", + "app.components.InstallPluginPage.plugin.support-us.description": "透過購買 Strapi T-shirt 來支持我們。這些資金將幫助我們繼續努力打造更好的產品和使用者體驗!", "app.components.InstallPluginPage.title": "市集 - 擴充功能", "app.components.InstallPluginPopup.downloads": "下載", - "app.components.InstallPluginPopup.navLink.avis": "avis", + "app.components.InstallPluginPopup.navLink.avis": "視圖", "app.components.InstallPluginPopup.navLink.changelog": "更新紀錄", "app.components.InstallPluginPopup.navLink.description": "說明", "app.components.InstallPluginPopup.navLink.faq": "常見問題", @@ -50,14 +76,14 @@ "app.components.ListPluginsPage.helmet.title": "擴充功能列表", "app.components.ListPluginsPage.title": "擴充功能", "app.components.NotFoundPage.back": "回到主頁", - "app.components.NotFoundPage.description": "沒有結果", + "app.components.NotFoundPage.description": "找不到此頁面", "app.components.Official": "官方", "app.components.PluginCard.Button.label.download": "下載", - "app.components.PluginCard.Button.label.install": "已經安裝", + "app.components.PluginCard.Button.label.install": "已安裝", "app.components.PluginCard.Button.label.support": "幫助我們", - "app.components.PluginCard.compatible": "相容您的應用程式", + "app.components.PluginCard.compatible": "與您的專案相容", "app.components.PluginCard.compatibleCommunity": "相容社群", - "app.components.PluginCard.more-details": "更多細節", + "app.components.PluginCard.more-details": "顯示更多", "app.components.PluginCard.price.free": "免費", "app.components.listPlugins.button": "安裝新的擴充功能", "app.components.listPlugins.title.none": "目前沒有安裝任何擴充功能", @@ -67,46 +93,49 @@ "app.utils.SelectOption.defaultMessage": " ", "app.utils.defaultMessage": " ", "app.utils.placeholder.defaultMessage": " ", - "components.AutoReloadBlocker.description": "打開此檔案來安裝功能", - "components.AutoReloadBlocker.header": "需要這個擴充功能才能重新整理", + "components.AutoReloadBlocker.description": "開啟以下的檔案來啟動此功能", + "components.AutoReloadBlocker.header": "這個擴充功能需要自動重新整理功能才能載入", "components.ErrorBoundary.title": "有錯誤發生...", "components.Input.error.attribute.key.taken": "這個數值已經存在了", "components.Input.error.attribute.sameKeyAndName": "不能等於", "components.Input.error.attribute.taken": "這個欄位名稱已經存在了", "components.Input.error.contentTypeName.taken": "這個名稱已經存在了", "components.Input.error.custom-error": "{errorMessage} ", - "components.Input.error.validation.email": "請輸入有效 Email", - "components.Input.error.validation.max": "這個數值太高了", - "components.Input.error.validation.maxLength": "這個數值太長了", - "components.Input.error.validation.min": "這個數值太低了", - "components.Input.error.validation.minLength": "這個數值太短了", - "components.Input.error.validation.minSupMax": "不能高過", - "components.Input.error.validation.regex": "此欄位沒有對應到 regex", - "components.Input.error.validation.required": "此欄位必填", + "components.Input.error.validation.email": "請輸入有效的電子郵件地址", + "components.Input.error.validation.json": "非法的JSON格式", + "components.Input.error.validation.max": "數值過高", + "components.Input.error.validation.maxLength": "長度過長", + "components.Input.error.validation.min": "數值過低", + "components.Input.error.validation.minLength": "長度不足", + "components.Input.error.validation.minSupMax": "不能高於最大值", + "components.Input.error.validation.regex": "此欄位無法與正規表達式批配", + "components.Input.error.validation.required": "必填欄位", "components.ListRow.empty": "沒有資料可以顯示", - "components.OverlayBlocker.description": "您正在使用的功能需要重新啟動,請等到重新啟動完成。", - "components.OverlayBlocker.title": "等候回應...", - "components.PageFooter.select": "個數(頁)", + "components.OverlayBlocker.description": "您正在使用的功能需要重新啟動,請等待重新啟動完成。", + "components.OverlayBlocker.title": "等待重新啟動中...", + "components.PageFooter.select": "項目/頁", "components.ProductionBlocker.description": "為了安全起見,我們需要在其他環境關閉這個擴充功能", "components.ProductionBlocker.header": "這個擴充功能只能在開發環境中使用", - "components.Wysiwyg.ToggleMode.markdown": "Switch to markdown", - "components.Wysiwyg.ToggleMode.preview": "Switch to preview", - "components.Wysiwyg.collapse": "Collapse", - "components.Wysiwyg.selectOptions.H1": "Title H1", - "components.Wysiwyg.selectOptions.H2": "Title H2", - "components.Wysiwyg.selectOptions.H3": "Title H3", - "components.Wysiwyg.selectOptions.H4": "Title H4", - "components.Wysiwyg.selectOptions.H5": "Title H5", - "components.Wysiwyg.selectOptions.H6": "Title H6", - "components.Wysiwyg.selectOptions.title": "Add a title", - "components.WysiwygBottomControls.charactersIndicators": "characters", - "components.WysiwygBottomControls.fullscreen": "Expand", - "components.WysiwygBottomControls.uploadFiles": "Attach files by dragging & dropping, {browse}, or pasting from the clipboard.", - "components.WysiwygBottomControls.uploadFiles.browse": "selecting them", + "components.Wysiwyg.ToggleMode.markdown": "切換到編輯模式", + "components.Wysiwyg.ToggleMode.preview": "切換到預覽模式", + "components.Wysiwyg.collapse": "折疊", + "components.Wysiwyg.selectOptions.H1": "標題1", + "components.Wysiwyg.selectOptions.H2": "標題2", + "components.Wysiwyg.selectOptions.H3": "標題3", + "components.Wysiwyg.selectOptions.H4": "標題4", + "components.Wysiwyg.selectOptions.H5": "標題5", + "components.Wysiwyg.selectOptions.H6": "標題6", + "components.Wysiwyg.selectOptions.title": "新增標題", + "components.WysiwygBottomControls.charactersIndicators": "字元", + "components.WysiwygBottomControls.fullscreen": "展開", + "components.WysiwygBottomControls.uploadFiles": "拖曳檔案、從剪貼簿貼上或 {browse}.", + "components.WysiwygBottomControls.uploadFiles.browse": "選擇檔案", "components.popUpWarning.button.cancel": "取消", "components.popUpWarning.button.confirm": "確認", - "components.popUpWarning.message": "您確定要刪除這個嗎?", + "components.popUpWarning.message": "您確定要刪除此項目嗎?", "components.popUpWarning.title": "請確認", - "notification.error": "有錯誤發生了", - "request.error.model.unknown": "這個資料不存在" + "notification.error": "發生錯誤", + "notification.error.layout": "無法取得佈局", + "request.error.model.unknown": "不存在的資料", + "app.utils.delete": "刪除" } \ No newline at end of file diff --git a/packages/strapi-admin/package.json b/packages/strapi-admin/package.json index df45a68a17..ad11c0f3bd 100644 --- a/packages/strapi-admin/package.json +++ b/packages/strapi-admin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-admin", - "version": "3.0.0-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Strapi Admin", "repository": { "type": "git", @@ -31,8 +31,8 @@ }, "devDependencies": { "sanitize.css": "^4.1.0", - "strapi-helper-plugin": "3.0.0-alpha.14.5", - "strapi-utils": "3.0.0-alpha.14.5" + "strapi-helper-plugin": "3.0.0-alpha.16", + "strapi-utils": "3.0.0-alpha.16" }, "author": { "name": "Strapi", @@ -47,8 +47,8 @@ } ], "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.0.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-generate-admin/package.json b/packages/strapi-generate-admin/package.json index 753028126d..87ed73b76a 100644 --- a/packages/strapi-generate-admin/package.json +++ b/packages/strapi-generate-admin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-admin", - "version": "3.0.0-alpha.14.5", + "version": "3.0.0-alpha.16", "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.5", - "strapi-utils": "3.0.0-alpha.14.5" + "strapi-admin": "3.0.0-alpha.16", + "strapi-utils": "3.0.0-alpha.16" }, "author": { "email": "hi@strapi.io", @@ -38,8 +38,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-generate-api/package.json b/packages/strapi-generate-api/package.json index 578b7f715f..d86041e9a7 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Generate an API for a Strapi application.", "homepage": "http://strapi.io", "keywords": [ @@ -39,8 +39,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-generate-api/templates/bookshelf/service.template b/packages/strapi-generate-api/templates/bookshelf/service.template index a1e517a75c..a2e1495add 100644 --- a/packages/strapi-generate-api/templates/bookshelf/service.template +++ b/packages/strapi-generate-api/templates/bookshelf/service.template @@ -1,5 +1,4 @@ 'use strict'; -/* global <%= globalID %> */ /** * <%= filename %> service @@ -10,6 +9,9 @@ // Public dependencies. const _ = require('lodash'); +// Strapi utilities. +const utils = require('strapi-hook-bookshelf/lib/utils/'); + module.exports = { /** @@ -19,8 +21,6 @@ module.exports = { */ fetchAll: (params) => { - // Get model hook - const hook = strapi.hook[<%= globalID %>.orm]; // Convert `params` object to filters compatible with Bookshelf. const filters = strapi.utils.models.convertParams('<%= globalID.toLowerCase() %>', params); // Select field to populate. @@ -29,18 +29,22 @@ module.exports = { .map(ast => ast.alias); return <%= globalID %>.query(function(qb) { - // Generate match stage. - hook.load().generateMatchStage(qb)(<%= globalID %>, filters); - - if (_.has(filters, 'start')) qb.offset(filters.start); - if (_.has(filters, 'limit')) qb.limit(filters.limit); - if (!_.isEmpty(filters.sort)) { - if (filters.sort.key) { - qb.orderBy(filters.sort.key, filters.sort.order); + _.forEach(filters.where, (where, key) => { + if (_.isArray(where.value) && where.symbol !== 'IN') { + for (const value in where.value) { + qb[value ? 'where' : 'orWhere'](key, where.symbol, where.value[value]) + } } else { - qb.orderBy(filters.sort); + qb.where(key, where.symbol, where.value); } + }); + + if (filters.sort) { + qb.orderBy(filters.sort.key, filters.sort.order); } + + qb.offset(filters.start); + qb.limit(filters.limit); }).fetchAll({ withRelated: filters.populate || populate }); diff --git a/packages/strapi-generate-api/templates/mongoose/service.template b/packages/strapi-generate-api/templates/mongoose/service.template index 2f24aa2916..f5de552e9d 100644 --- a/packages/strapi-generate-api/templates/mongoose/service.template +++ b/packages/strapi-generate-api/templates/mongoose/service.template @@ -1,5 +1,4 @@ 'use strict'; -/* global <%= globalID %> */ /** * <%= filename %> service @@ -10,8 +9,6 @@ // Public dependencies. const _ = require('lodash'); -const { models: { mergeStages } } = require('strapi-utils'); - module.exports = { /** @@ -20,24 +17,22 @@ module.exports = { * @return {Promise} */ - fetchAll: (params, next, { populate } = {}) => { + fetchAll: (params) => { // Convert `params` object to filters compatible with Mongo. const filters = strapi.utils.models.convertParams('<%= globalID.toLowerCase() %>', params); - const hook = strapi.hook[<%= globalID %>.orm]; - // Generate stages. - const populateStage = hook.load().generateLookupStage(<%= globalID %>, { whitelistedPopulate: populate }); // Nested-Population - const matchStage = hook.load().generateMatchStage(<%= globalID %>, filters); // Nested relation filter - const aggregateStages = mergeStages(filters.populate || populateStage, matchStage); + // Select field to populate. + const populate = <%= globalID %>.associations + .filter(ast => ast.autoPopulate !== false) + .map(ast => ast.alias) + .join(' '); - const result = <%= globalID %>.aggregate(aggregateStages) + return <%= globalID %> + .find() + .where(filters.where) + .sort(filters.sort) .skip(filters.start) - .limit(filters.limit); - - if (_.has(filters, 'start')) result.skip(filters.start); - if (_.has(filters, 'limit')) result.limit(filters.limit); - if (!_.isEmpty(filters.sort)) result.sort(filters.sort); - - return result; + .limit(filters.limit) + .populate(populate); }, /** diff --git a/packages/strapi-generate-controller/package.json b/packages/strapi-generate-controller/package.json index 327ea828ba..58e12f82a3 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Generate a controller for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ @@ -39,8 +39,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-generate-model/package.json b/packages/strapi-generate-model/package.json index f3e58fcd31..24fb869952 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Generate a model for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ @@ -39,8 +39,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-generate-new/json/package.json.js b/packages/strapi-generate-new/json/package.json.js index bf0db4aa63..2a2e0c2cf6 100644 --- a/packages/strapi-generate-new/json/package.json.js +++ b/packages/strapi-generate-new/json/package.json.js @@ -56,7 +56,6 @@ module.exports = scope => { 'dependencies': Object.assign({}, { 'lodash': '^4.17.5', 'strapi': getDependencyVersion(cliPkg, 'strapi'), - 'strapi-utils': getDependencyVersion(cliPkg, 'strapi'), [scope.client.connector]: getDependencyVersion(cliPkg, 'strapi'), }, additionalsDependencies, { [scope.client.module]: scope.client.version @@ -76,8 +75,8 @@ module.exports = scope => { 'uuid': uuid() }, 'engines': { - 'node': '>= 9.0.0', - 'npm': '>= 5.0.0' + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, 'license': scope.license || 'MIT' }); diff --git a/packages/strapi-generate-new/package.json b/packages/strapi-generate-new/package.json index 1aa3398e36..b5d2735dee 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-alpha.14.5", + "version": "3.0.0-alpha.16", "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.5", + "strapi-utils": "3.0.0-alpha.16", "uuid": "^3.1.0" }, "scripts": { @@ -45,8 +45,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-generate-plugin/json/package.json.js b/packages/strapi-generate-plugin/json/package.json.js index 6e988da000..7f067a0a75 100644 --- a/packages/strapi-generate-plugin/json/package.json.js +++ b/packages/strapi-generate-plugin/json/package.json.js @@ -55,8 +55,8 @@ module.exports = scope => { 'url': scope.website || '' }], 'engines': { - 'node': '>= 9.0.0', - 'npm': '>= 5.3.0' + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, 'license': scope.license || 'MIT' }); diff --git a/packages/strapi-generate-plugin/package.json b/packages/strapi-generate-plugin/package.json index 3579ff8e67..eb4394fc5c 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Generate an plugin for a Strapi application.", "homepage": "http://strapi.io", "keywords": [ @@ -40,8 +40,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-generate-policy/package.json b/packages/strapi-generate-policy/package.json index 113a98fd22..86e20b974c 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Generate a policy for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ @@ -39,8 +39,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-generate-service/package.json b/packages/strapi-generate-service/package.json index 22a089c12c..f71e6ee635 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Generate a service for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ @@ -39,8 +39,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-generate/package.json b/packages/strapi-generate/package.json index a2265da64e..43f439d68f 100644 --- a/packages/strapi-generate/package.json +++ b/packages/strapi-generate/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate", - "version": "3.0.0-alpha.14.5", + "version": "3.0.0-alpha.16", "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.5" + "strapi-utils": "3.0.0-alpha.16" }, "author": { "name": "Strapi team", @@ -39,8 +39,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-helper-plugin/package.json b/packages/strapi-helper-plugin/package.json index 57cf60a598..3cf7c4ddc3 100644 --- a/packages/strapi-helper-plugin/package.json +++ b/packages/strapi-helper-plugin/package.json @@ -1,10 +1,10 @@ { "name": "strapi-helper-plugin", - "version": "3.0.0-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Helper for Strapi plugins development", "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-hook-bookshelf/lib/index.js b/packages/strapi-hook-bookshelf/lib/index.js index ce26bd5e8c..c207feb579 100644 --- a/packages/strapi-hook-bookshelf/lib/index.js +++ b/packages/strapi-hook-bookshelf/lib/index.js @@ -677,11 +677,24 @@ module.exports = function(strapi) { } }; - const table = _.get(manyRelations, 'collectionName') - || utilsModels.getCollectionName( - collection.attributes[manyRelations.via], - manyRelations - ); + const table = _.get(manyRelations, 'collectionName') || + _.map( + _.sortBy( + [ + collection.attributes[ + manyRelations.via + ], + manyRelations + ], + 'collection' + ), + table => { + return _.snakeCase( + // eslint-disable-next-line prefer-template + pluralize.plural(table.collection) + ' ' + pluralize.plural(table.via) + ); + } + ).join('__'); await handler(table, attributes); } @@ -800,11 +813,24 @@ module.exports = function(strapi) { strapi.plugins[details.plugin].models[details.collection]: strapi.models[details.collection]; - const collectionName = _.get(details, 'collectionName') - || utilsModels.getCollectionName( - collection.attributes[details.via], - details, - ); + const collectionName = _.get(details, 'collectionName') || + _.map( + _.sortBy( + [ + collection.attributes[ + details.via + ], + details + ], + 'collection' + ), + table => { + return _.snakeCase( + // eslint-disable-next-line prefer-template + pluralize.plural(table.collection) + ' ' + pluralize.plural(table.via) + ); + } + ).join('__'); const relationship = _.clone( collection.attributes[details.via] diff --git a/packages/strapi-hook-bookshelf/lib/relations.js b/packages/strapi-hook-bookshelf/lib/relations.js index f97818cdf4..550c928b23 100644 --- a/packages/strapi-hook-bookshelf/lib/relations.js +++ b/packages/strapi-hook-bookshelf/lib/relations.js @@ -35,89 +35,6 @@ module.exports = { return _.get(strapi.plugins, [plugin, 'models', model]) || _.get(strapi, ['models', model]) || undefined; }, - generateMatchStage: function (qb) { - return (strapiModel, filters) => { - if (!filters) { - return undefined; - } - - // 1st level deep filter - if (filters.where) { - this.generateMatchStage(qb)(strapiModel, { relations: filters.where }); - } - - // 2nd+ level deep filter - _.forEach(filters.relations, (value, key) => { - if (key !== 'relations') { - const association = strapiModel.associations.find(a => a.alias === key); - if (!association) { - const fieldKey = `${strapiModel.collectionName}.${key}`; - if (_.isArray(value.value) && value.symbol !== 'IN') { - for (let value in value.value) { - if (typeof value === 'string') { - value = { - value, - symbol: '=' - }; - } - qb[value ? 'where' : 'orWhere'](fieldKey, value.symbol, value.value[value]); - } - } else { - if (typeof value === 'string') { - value = { - value, - symbol: '=' - }; - } - qb.where(fieldKey, value.symbol, value.value); - } - } else { - const model = association.plugin ? - strapi.plugins[association.plugin].models[association.model || association.collection] : - strapi.models[association.model || association.collection]; - const relationTable = model.collectionName; - - qb.distinct(); - - if (association.nature === 'manyToMany') { - // Join on both ends - qb.innerJoin( - association.tableCollectionName, - `${association.tableCollectionName}.${strapiModel.info.name}_${strapiModel.primaryKey}`, - `${strapiModel.collectionName}.${strapiModel.primaryKey}`, - ); - - qb.innerJoin( - relationTable, - `${association.tableCollectionName}.${strapiModel.attributes[key].attribute}_${strapiModel.attributes[key].column}`, - `${relationTable}.${model.primaryKey}`, - ); - } else { - const externalKey = association.type === 'collection' - ? `${relationTable}.${association.via}` - : `${relationTable}.${model.primaryKey}`; - - const internalKey = association.type === 'collection' - ? `${strapiModel.collectionName}.${strapiModel.primaryKey}` - : `${strapiModel.collectionName}.${association.alias}`; - - qb.innerJoin(relationTable, externalKey, internalKey); - } - - if (_.isPlainObject(value)) { - this.generateMatchStage(qb)( - model, - { relations: value.value } - ); - } - } - } else { - this.generateMatchStage(qb)(strapiModel, { relations: value }); - } - }); - }; - }, - findOne: async function (params, populate) { const record = await this .forge({ diff --git a/packages/strapi-hook-bookshelf/package.json b/packages/strapi-hook-bookshelf/package.json index fcc26d0293..fa0b9ff630 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Bookshelf hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -21,8 +21,8 @@ "lodash": "^4.17.5", "pluralize": "^6.0.0", "rimraf": "^2.6.2", - "strapi-hook-knex": "3.0.0-alpha.14.5", - "strapi-utils": "3.0.0-alpha.14.5" + "strapi-hook-knex": "3.0.0-alpha.16", + "strapi-utils": "3.0.0-alpha.16" }, "strapi": { "dependencies": [ @@ -52,8 +52,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-hook-ejs/package.json b/packages/strapi-hook-ejs/package.json index 9f1585353c..a086e4ea3c 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "EJS hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -39,8 +39,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-hook-knex/package.json b/packages/strapi-hook-knex/package.json index 7fce5ffa12..ea15ab3937 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Knex hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -39,8 +39,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.0.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-hook-mongoose/lib/index.js b/packages/strapi-hook-mongoose/lib/index.js index 7343621f5b..0ad1bca3e0 100644 --- a/packages/strapi-hook-mongoose/lib/index.js +++ b/packages/strapi-hook-mongoose/lib/index.js @@ -17,7 +17,6 @@ const { models: utilsModels } = require('strapi-utils'); // Local helpers. const utils = require('./utils/'); -const _utils = utils(); const relations = require('./relations'); @@ -526,13 +525,6 @@ module.exports = function (strapi) { } return result; - }, - - postProcessValue: (value) => { - if (_.isArray(value)) { - return value.map(_utils.valueToId); - } - return _utils.valueToId(value); } }, relations); diff --git a/packages/strapi-hook-mongoose/lib/relations.js b/packages/strapi-hook-mongoose/lib/relations.js index 9f37eb035d..a2db86576c 100644 --- a/packages/strapi-hook-mongoose/lib/relations.js +++ b/packages/strapi-hook-mongoose/lib/relations.js @@ -10,156 +10,11 @@ const _ = require('lodash'); // Utils const { models: { getValuePrimaryKey } } = require('strapi-utils'); - -const buildTempFieldPath = field => { - return `__${field}`; -}; - -const restoreRealFieldPath = (field, prefix) => { - return `${prefix}${field}`; -}; - module.exports = { getModel: function (model, plugin) { return _.get(strapi.plugins, [plugin, 'models', model]) || _.get(strapi, ['models', model]) || undefined; }, - generateLookupStage: function (strapiModel, { whitelistedPopulate = null, prefixPath = '' } = {}) { - return strapiModel.associations - .filter(ast => { - if (whitelistedPopulate) { - return _.includes(whitelistedPopulate, ast.alias); - } - return ast.autoPopulate; - }) - .reduce((acc, ast) => { - const model = ast.plugin - ? strapi.plugins[ast.plugin].models[ast.collection || ast.model] - : strapi.models[ast.collection || ast.model]; - - const from = model.collectionName; - const isDominantAssociation = - (ast.dominant && ast.nature === 'manyToMany') || !!ast.model; - - const _localField = - !isDominantAssociation || ast.via === 'related' ? '_id' : ast.alias; - - const localField = `${prefixPath}${_localField}`; - - const foreignField = ast.filter - ? `${ast.via}.ref` - : isDominantAssociation - ? '_id' - : ast.via; - - // Add the juncture like the `.populate()` function - const asTempPath = buildTempFieldPath(ast.alias, prefixPath); - const asRealPath = restoreRealFieldPath(ast.alias, prefixPath); - acc.push({ - $lookup: { - from, - localField, - foreignField, - as: asTempPath, - }, - }); - - // Unwind the relation's result if only one is expected - if (ast.type === 'model') { - acc.push({ - $unwind: { - path: `$${asTempPath}`, - preserveNullAndEmptyArrays: true, - }, - }); - } - - // Preserve relation field if it is empty - acc.push({ - $addFields: { - [asRealPath]: { - $ifNull: [`$${asTempPath}`, null], - }, - }, - }); - - // Remove temp field - acc.push({ - $project: { - [asTempPath]: 0, - }, - }); - - return acc; - }, []); - }, - - generateMatchStage: function (strapiModel, filters, { prefixPath = '' } = {}) { - if (!filters) { - return undefined; - } - - let acc = []; - - // 1st level deep filter - if (filters.where) { - acc.push( - ...this.generateMatchStage( - strapiModel, - { relations: filters.where }, - { prefixPath } - ) - ); - } - - // 2nd+ level deep filter - _.forEach(filters.relations, (value, key) => { - if (key !== 'relations') { - const nextPrefixedPath = `${prefixPath}${key}.`; - const association = strapiModel.associations.find(a => a.alias === key); - - if (!association) { - acc.push({ - $match: { [`${prefixPath}${key}`]: value }, - }); - } else { - const model = association.plugin - ? strapi.plugins[association.plugin].models[ - association.collection || association.model - ] - : strapi.models[association.collection || association.model]; - - // Generate lookup for this relation - acc.push( - ...this.generateLookupStage(strapiModel, { - whitelistedPopulate: [key], - prefixPath, - }) - ); - - // If it's an object re-run the same function with this new value until having either a primitive value or an array. - if (_.isPlainObject(value)) { - acc.push( - ...this.generateMatchStage( - model, - { relations: value }, - { - prefixPath: nextPrefixedPath, - } - ) - ); - } - } - } else { - acc.push( - ...this.generateMatchStage(strapiModel, { relations: value }, { prefixPath }) - ); - } - }); - - return acc; - }, - update: async function (params) { const virtualFields = []; const response = await this @@ -242,7 +97,7 @@ module.exports = { acc[current] = params.values[current]; } else if (response[current] && _.isArray(response[current]) && current !== 'id') { // Records to add in the relation. - const toAdd = _.differenceWith(params.values[current], response[current], (a, b) => + const toAdd = _.differenceWith(params.values[current], response[current], (a, b) => (a[this.primaryKey] || a).toString() === (b[this.primaryKey] || b).toString() ); diff --git a/packages/strapi-hook-mongoose/lib/utils/index.js b/packages/strapi-hook-mongoose/lib/utils/index.js index 9ee17560c4..b27f27e381 100644 --- a/packages/strapi-hook-mongoose/lib/utils/index.js +++ b/packages/strapi-hook-mongoose/lib/utils/index.js @@ -18,7 +18,6 @@ mongoose.Types.ObjectId.prototype.valueOf = function () { }; module.exports = (mongoose = new Mongoose()) => { - const Decimal = require('mongoose-float').loadType(mongoose, 2); const Float = require('mongoose-float').loadType(mongoose, 20); @@ -55,17 +54,6 @@ module.exports = (mongoose = new Mongoose()) => { return 'String'; default: } - }, - valueToId: function (value) { - return fn.isMongoId(value) - ? mongoose.Types.ObjectId(value) - : value; - }, - isMongoId: function (value) { - // Here we don't use mongoose.Types.ObjectId.isValid method because it's a weird check, - // it returns for instance true for any integer value ¯\_(ツ)_/¯ - const hexadecimal = /^[0-9A-F]+$/i; - return hexadecimal.test(value) && value.length === 24; } }; diff --git a/packages/strapi-hook-mongoose/package.json b/packages/strapi-hook-mongoose/package.json index 3e97436bd1..85e027d60c 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Mongoose hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -17,10 +17,10 @@ "dependencies": { "lodash": "^4.17.5", "mongoose": "^5.2.17", - "mongoose-float": "^1.0.2", + "mongoose-float": "^1.0.3", "pluralize": "^6.0.0", "rimraf": "^2.6.2", - "strapi-utils": "3.0.0-alpha.14.5" + "strapi-utils": "3.0.0-alpha.16" }, "author": { "email": "hi@strapi.io", @@ -42,8 +42,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-hook-redis/package.json b/packages/strapi-hook-redis/package.json index ab53cbf39b..391c68f8bd 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Redis hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -19,7 +19,7 @@ "lodash": "^4.17.5", "rimraf": "^2.6.2", "stack-trace": "0.0.10", - "strapi-utils": "3.0.0-alpha.14.5" + "strapi-utils": "3.0.0-alpha.16" }, "author": { "email": "hi@strapi.io", @@ -41,8 +41,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-lint/lib/internals/eslint/front/.eslintrc.json b/packages/strapi-lint/lib/internals/eslint/front/.eslintrc.json index 01880629f2..9e9c86d242 100644 --- a/packages/strapi-lint/lib/internals/eslint/front/.eslintrc.json +++ b/packages/strapi-lint/lib/internals/eslint/front/.eslintrc.json @@ -1,21 +1,13 @@ { "parser": "babel-eslint", - "extends": [ - "airbnb", - "prettier", - "eslint:recommended" - ], + "extends": ["airbnb", "prettier", "eslint:recommended"], "env": { "browser": true, "node": true, "mocha": true, "es6": true }, - "plugins": [ - "redux-saga", - "react", - "jsx-a11y" - ], + "plugins": ["redux-saga", "react", "jsx-a11y"], "parserOptions": { "ecmaVersion": 7, "sourceType": "module", @@ -25,10 +17,7 @@ } }, "rules": { - "comma-dangle": [ - 2, - "always-multiline" - ], + "comma-dangle": [2, "always-multiline"], "import/newline-after-import": 0, "import/no-dynamic-require": 0, "import/no-extraneous-dependencies": 0, @@ -38,14 +27,7 @@ "import/order": [ "error", { - "groups": [ - "builtin", - "external", - "internal", - "parent", - "sibling", - "index" - ] + "groups": ["builtin", "external", "internal", "parent", "sibling", "index"] } ], "import/imports-first": 2, @@ -53,7 +35,8 @@ 2, 2, { - "SwitchCase": 1 + "SwitchCase": 1, + "ignoredNodes": ["ConditionalExpression"] } ], "jsx-a11y/aria-props": 2, @@ -76,10 +59,7 @@ "class-methods-use-this": 0, "react/forbid-prop-types": 0, "react/react-in-jsx-scope": 0, - "react/jsx-first-prop-new-line": [ - 2, - "multiline" - ], + "react/jsx-first-prop-new-line": [2, "multiline"], "react/jsx-filename-extension": 0, "react/jsx-no-target-blank": 0, "react/no-did-mount-set-state": 0, diff --git a/packages/strapi-lint/lib/internals/prettier/front/.prettierrc.js b/packages/strapi-lint/lib/internals/prettier/front/.prettierrc.js index 16b4581647..7bb6e1e3e5 100644 --- a/packages/strapi-lint/lib/internals/prettier/front/.prettierrc.js +++ b/packages/strapi-lint/lib/internals/prettier/front/.prettierrc.js @@ -5,7 +5,6 @@ module.exports = { printWidth: 110, - parser: 'flow', useTabs: false, singleQuote: true, bracketSpacing: true, diff --git a/packages/strapi-lint/package.json b/packages/strapi-lint/package.json index 595cd71f48..7ed910bb2a 100644 --- a/packages/strapi-lint/package.json +++ b/packages/strapi-lint/package.json @@ -1,6 +1,6 @@ { "name": "strapi-lint", - "version": "3.0.0-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Strapi eslint and prettier configurations", "directories": { "lib": "lib" @@ -14,8 +14,8 @@ "url": "http://strapi.io" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "maintainers": [ { diff --git a/packages/strapi-middleware-views/package.json b/packages/strapi-middleware-views/package.json index 98c77b2523..fe5e2e5a77 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Views middleware to enable server-side rendering for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -39,8 +39,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/SettingsPage/index.js b/packages/strapi-plugin-content-manager/admin/src/containers/SettingsPage/index.js index f3d041871a..e427801d01 100644 --- a/packages/strapi-plugin-content-manager/admin/src/containers/SettingsPage/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/SettingsPage/index.js @@ -1,5 +1,5 @@ /** - * + * * SettingsPage */ @@ -36,23 +36,23 @@ class SettingsPage extends React.PureComponent { componentWillUnmount() { this.props.onReset(); } - + getModels = (data = this.props.schema.models, destination = '/') => { const models = Object.keys(data).reduce((acc, curr) => { if (curr !== 'plugins') { - + if (!data[curr].fields && _.isObject(data[curr])) { - return this.getModels(data[curr], `${destination}${curr}/`); + return acc.concat(this.getModels(data[curr], `${destination}${curr}/`)); } - + return acc.concat([{ name: curr, destination: `${destination}${curr}` }]); - } - - return this.getModels(data[curr], `${destination}${curr}/`); + } + + return acc.concat(this.getModels(data[curr], `${destination}${curr}/`)); }, []); return sortBy( - models.filter(obj => obj.name !== 'permission' && obj.name !== 'role'), + models.filter(obj => !!this.props.schema.layout[obj.name]), ['name'], ); } diff --git a/packages/strapi-plugin-content-manager/admin/src/translations/zh.json b/packages/strapi-plugin-content-manager/admin/src/translations/zh.json index d2cac8b04c..8879b785f4 100644 --- a/packages/strapi-plugin-content-manager/admin/src/translations/zh.json +++ b/packages/strapi-plugin-content-manager/admin/src/translations/zh.json @@ -1,22 +1,64 @@ { "EditRelations.title": "關聯式資料", + "components.AddFilterCTA.add": "過濾器", + "components.AddFilterCTA.hide": "過濾器", + "components.DraggableAttr.edit": "點擊以編輯", + "components.EmptyAttributesBlock.button": "前往設定頁面", + "components.EmptyAttributesBlock.description": "您可以變更設定", + "components.FilterOptions.FILTER_TYPES.=": "等於", + "components.FilterOptions.FILTER_TYPES._contains": "包含", + "components.FilterOptions.FILTER_TYPES._containss": "包含(區分大小寫)", + "components.FilterOptions.FILTER_TYPES._gt": "大於", + "components.FilterOptions.FILTER_TYPES._gte": "大於等於", + "components.FilterOptions.FILTER_TYPES._lt": "小於", + "components.FilterOptions.FILTER_TYPES._lte": "小於等於", + "components.FilterOptions.FILTER_TYPES._ne": "不等於", + "components.FilterOptions.button.apply": "套用", + "components.FiltersPickWrapper.PluginHeader.actions.apply": "套用", + "components.FiltersPickWrapper.PluginHeader.actions.clearAll": "清除", + "components.FiltersPickWrapper.PluginHeader.description": "設定過濾資料的條件", + "components.FiltersPickWrapper.PluginHeader.title.filter": "過濾器", + "components.FiltersPickWrapper.hide": "隱藏", "components.LimitSelect.itemsPerPage": "每個頁面檔案數量", + "components.Search.placeholder": "搜尋...", + "components.TableDelete.delete": "刪除", + "components.TableDelete.entries.plural": "已選取 {number} 個項目", + "components.TableDelete.entries.singular": "已選取 {number} 個項目", + "components.TableEmpty.withFilters": "找不到 {contentType} 依照套用的過濾器...", + "components.TableEmpty.withSearch": "找不到 {contentType} 依照搜尋條件: ({search})...", + "components.TableEmpty.withoutFilter": "找不到 {contentType}...", + "containers.Edit.addAnItem": "新增關聯...", + "containers.Edit.clickToJump": "跳轉到該筆資料", "containers.Edit.delete": "刪除", "containers.Edit.editing": "編輯中...", "containers.Edit.reset": "重設", "containers.Edit.returnList": "回到清單", + "containers.Edit.seeDetails": "詳細資料", "containers.Edit.submit": "儲存", - "containers.Home.introduction": "這個擴充功能還在開發階段,如果要編輯進入點,請去左邊 Menu 對應的連結", - "containers.Home.pluginHeaderDescription": "透過強大的介面來管理您的進入點", + "containers.Home.introduction": "這個擴充功能還在開發階段,如果要編輯項目,請前往左邊選單中對應的連結", + "containers.Home.pluginHeaderDescription": "透過強大的介面來管理您的項目", "containers.Home.pluginHeaderTitle": "內容管理員", - "containers.List.addAnEntry": "增加新的 {entity}", + "containers.List.addAnEntry": "建立新的 {entity}", "containers.List.errorFetchRecords": "錯誤", "containers.List.pluginHeaderDescription": "找到 {label} 筆資料", "containers.List.pluginHeaderDescription.singular": "找到 {label} 筆資料", - "containers.SettingPage.editSettings.description": "Drag & drop the fields to build the layout", - "containers.SettingPage.editSettings.title": "Edit — Settings", - "containers.SettingPage.relations": "Relational fields", - "emptyAttributes.button": "去資料建構頁面", + "containers.ListPage.displayedFields": "顯示欄位", + "containers.SettingPage.addField": "新增欄位", + "containers.SettingPage.addRelationalField": "新增關聯欄位", + "containers.SettingPage.attributes": "屬性", + "containers.SettingPage.attributes.description": "調整欄位的順序", + "containers.SettingPage.editSettings.description": "拖曳欄位以規劃排版", + "containers.SettingPage.editSettings.title": "編輯 — 設定", + "containers.SettingPage.listSettings.description": "調整這個資料類型的選項", + "containers.SettingPage.listSettings.title": "列表 — 設定", + "containers.SettingPage.pluginHeaderDescription": "調整這個資料類型的顯示設定", + "containers.SettingPage.relations": "關聯欄位", + "containers.SettingsPage.Block.contentType.description": "調整指定資料類型的選項", + "containers.SettingsPage.Block.contentType.title": "資料類型", + "containers.SettingsPage.Block.generalSettings.description": "調整資料類型的預設選項", + "containers.SettingsPage.Block.generalSettings.title": "總覽", + "containers.SettingsPage.pluginHeaderDescription": "調整所有資料類型的顯示設定", + "emptyAttributes.button": "前往資料建構頁面", "emptyAttributes.description": "增加您第一個欄位到資料結構", "emptyAttributes.title": "目前還沒有欄位", "error.attribute.key.taken": "這個數值已存在", @@ -31,24 +73,42 @@ "error.records.count": "讀取資料數量時發生錯誤", "error.records.fetch": "讀取資料時發生錯誤", "error.schema.generation": "產生資料結構時發生錯誤", - "error.validation.max": "這個數值太高", - "error.validation.maxLength": "這個數值太長", - "error.validation.min": "這個數值太低", - "error.validation.minLength": "這個數值太短", - "error.validation.minSupMax": "不能大於", - "error.validation.regex": "這個數值和 regex 不符合", - "error.validation.required": "這個數值必填", - "form.Input.description": "Description", - "form.Input.description.placeholder": "Display name in the profile", - "form.Input.disabled": "Editable field", + "error.validation.json": "非法的JSON格式", + "error.validation.max": "數值過高", + "error.validation.maxLength": "長度過長", + "error.validation.min": "數值過低", + "error.validation.minLength": "長度不足", + "error.validation.minSupMax": "不能高於最大值", + "error.validation.regex": "此欄位無法與正規表達式批配", + "error.validation.required": "必填欄位", + "form.Input.bulkActions": "啟用批次操作", + "form.Input.defaultSort": "預設排序設定", + "form.Input.description": "說明", + "form.Input.description.placeholder": "描述這個欄位", + "form.Input.disabled": "可編輯欄位", + "form.Input.filters": "啟用過濾器", + "form.Input.label": "標籤", + "form.Input.label.inputDescription": "這個數值會顯示在表格的標題列名稱", + "form.Input.pageEntries": "每頁項目", + "form.Input.pageEntries.inputDescription": "附註:您可以在每個資料類型的設定頁面中覆寫這些設定。", + "form.Input.placeholder": "佔位符", + "form.Input.placeholder.placeholder": "在文字框中顯示提示訊息", + "form.Input.search": "啟用搜尋功能", + "form.Input.search.field": "允許此欄位被搜尋", + "form.Input.sort.field": "允許以此欄位排序", + "notification.error.displayedFields": "您至少需要顯示一個欄位", "notification.error.relationship.fetch": "讀取關聯資料時發生錯誤", - "pageNotFound": "頁面沒有找到", - "plugin.description.long": "快速瀏覽、編輯、刪除您資料庫的檔案", - "plugin.description.short": "快速瀏覽、編輯、刪除您資料庫的檔案", + "notification.info.SettingPage.disableSort": "您至少需要允許一個欄位被用來排序", + "pageNotFound": "無法找到此頁面", + "plugin.description.long": "快速瀏覽、編輯、刪除資料庫的資料", + "plugin.description.short": "快速瀏覽、編輯、刪除資料庫的資料", "popUpWarning.bodyMessage.contentType.delete": "您確定要刪除這筆資料嗎?", + "popUpWarning.bodyMessage.contentType.delete.all": "您確定要刪除這些資料嗎?", "popUpWarning.button.cancel": "取消", "popUpWarning.button.confirm": "確認", "popUpWarning.title": "請確認", + "popUpWarning.warning.cancelAllSettings": "您確定要放棄變更?", + "popUpWarning.warning.updateAllSettings": "這會更動您的設定", "success.record.delete": "已刪除", "success.record.save": "已儲存" } \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/package.json b/packages/strapi-plugin-content-manager/package.json index 00ebdc6394..8037c816ae 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-alpha.14.5", + "version": "3.0.0-alpha.16", "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.5" + "strapi-helper-plugin": "3.0.0-alpha.16" }, "dependencies": { "pluralize": "^7.0.0" @@ -48,8 +48,8 @@ "url": "git://github.com/strapi/strapi.git" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.0.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-plugin-content-type-builder/admin/src/translations/ru.json b/packages/strapi-plugin-content-type-builder/admin/src/translations/ru.json index 88f7648819..f502b57c58 100644 --- a/packages/strapi-plugin-content-type-builder/admin/src/translations/ru.json +++ b/packages/strapi-plugin-content-type-builder/admin/src/translations/ru.json @@ -40,8 +40,8 @@ "form.attribute.item.enumeration.graphql": "Name override for GraphQL", "form.attribute.item.enumeration.graphql.description": "Allows you to override the default generated name for GraphQL", "form.attribute.item.enumeration.name": "Название", - "form.attribute.item.enumeration.placeholder": "Ex: morning,noon,evening", - "form.attribute.item.enumeration.rules": "Values (separate them with a comma)", + "form.attribute.item.enumeration.placeholder": "Например: morning,noon,evening", + "form.attribute.item.enumeration.rules": "Значения (разделять запятой)", "form.attribute.item.json.name": "Название", "form.attribute.item.maximum": "Максимальное значение", "form.attribute.item.maximumLength": "Максимальная длина", @@ -55,12 +55,12 @@ "form.attribute.item.number.type.float": "float (ex: 3.33333333)", "form.attribute.item.number.type.integer": "integer (ex: 10)", "form.attribute.item.requiredField": "Обязательное поле", - "form.attribute.item.requiredField.description": "Вы не сможете создать запись если это поле останенься пустым", + "form.attribute.item.requiredField.description": "Вы не сможете создать запись, если это поле останется пустым", "form.attribute.item.settings.name": "Настройки", "form.attribute.item.string.name": "Название", "form.attribute.item.textarea.name": "Название", "form.attribute.item.uniqueField": "Уникальное поле", - "form.attribute.item.uniqueField.description": "Вы не сможете создать запись если существует запись с аналогичным содержанием", + "form.attribute.item.uniqueField.description": "Вы не сможете создать запись, если существует запись с аналогичным содержанием", "form.attribute.settings.default": "Стандартное значение", "form.attribute.settings.default.checkboxLabel": "Установить значение — true", "form.button.cancel": "Отменить", @@ -70,14 +70,14 @@ "form.contentType.item.collectionName.inputDescription": "Полезно, когда название вашего Типа Данных и название вашей таблицы различаются", "form.contentType.item.connections": "Соединение", "form.contentType.item.description": "Описание", - "form.contentType.item.description.placeholder": "Добавте ваше короткое описание...", + "form.contentType.item.description.placeholder": "Добавьте ваше короткое описание...", "form.contentType.item.name": "Название", "form.contentType.item.name.description": "Название Типов Данных должны быть уникальными: {link}", "form.contentType.item.name.link.description": "Ознакомьтесь с нашей документацией", "from": "from", - "home.contentTypeBuilder.description": "Создавайте и обновляйте ваш Тип Данных.", + "home.contentTypeBuilder.description": "Создавайте и обновляйте ваши Типы Данных.", "home.contentTypeBuilder.name": "Типы Данных", - "home.emptyAttributes.description": "Добавте первое поле в ваш новый Тип Данных", + "home.emptyAttributes.description": "Добавьте первое поле в ваш новый Тип Данных", "home.emptyAttributes.title": "Пока ни одного поля не создано", "home.emptyContentType.description": "Создайте ваш первый Тип Данных и у вас появится возможность загружать ваши данные при помощи API.", "home.emptyContentType.title": "Нет Типов Данных", @@ -95,36 +95,36 @@ "modelPage.contentType.list.title.including": "включает", "modelPage.contentType.list.title.plural": "поля", "modelPage.contentType.list.title.singular": "поле", - "noTableWarning.description": "Не забудте создать таблицу `{modelName}` в вашей базе данных", + "noTableWarning.description": "Не забудьте создать таблицу `{modelName}` в вашей базе данных", "noTableWarning.infos": "Больше информации", "notification.error.message": "Возникла ошибка", "notification.info.contentType.creating.notSaved": "Пожалуйста сохраните ваш текущий Тип Данных перед тем как создавать новый", - "notification.info.disable": "Это поле в данный момент не редактируемо...😮", + "notification.info.disable": "В данный момент это поле нельзя редактировать...😮", "notification.info.optimized": "Плагин оптимизирован с вашим localstorage", "notification.success.contentTypeDeleted": "Ваш Тип Данных удален", "notification.success.message.contentType.create": "Ваш Тип Данных создан", "notification.success.message.contentType.edit": "Ваш Тип Данных обновлен", "plugin.description.long": "Моделируйте структуру данных вашего API. Создавайте новые поля и связи всего за минуту. Файлы автоматически создаются и обновляются в вашем проекте.", "plugin.description.short": "Моделируйте структуру данных вашего API.", - "popUpForm.attributes.boolean.description": "Yes или no, 1 или 0, true или false", + "popUpForm.attributes.boolean.description": "Да или нет, 1 или 0, true или false", "popUpForm.attributes.boolean.name": "Boolean", "popUpForm.attributes.date.description": "Дата события, рабочие часы", "popUpForm.attributes.date.name": "Date", "popUpForm.attributes.email.description": "Пользовательский email...", "popUpForm.attributes.email.name": "Email", - "popUpForm.attributes.enumeration.description": "List of choices", + "popUpForm.attributes.enumeration.description": "Список вариантов", "popUpForm.attributes.enumeration.name": "Enumeration", "popUpForm.attributes.json.description": "Данные в JSON формате", "popUpForm.attributes.json.name": "JSON", - "popUpForm.attributes.media.description": "Картинки, видео, PDF и другие виды файлов", + "popUpForm.attributes.media.description": "Картинки, видео, PDF и другие файлы", "popUpForm.attributes.media.name": "Media", - "popUpForm.attributes.number.description": "Все что является числом", + "popUpForm.attributes.number.description": "Все, что является числом", "popUpForm.attributes.number.name": "Number", "popUpForm.attributes.password.description": "Пароль пользователя...", "popUpForm.attributes.password.name": "Password", "popUpForm.attributes.relation.description": "Связан с Типом Данных", "popUpForm.attributes.relation.name": "Relation", - "popUpForm.attributes.string.description": "Загаловки, названия, имена, перечень названий", + "popUpForm.attributes.string.description": "Заголовки, названия, имена, перечень названий", "popUpForm.attributes.string.name": "String", "popUpForm.attributes.text.description": "Описания, текстовые параграфы, статьи", "popUpForm.attributes.text.name": "Text", @@ -135,7 +135,7 @@ "popUpForm.edit.contentType.header.title": "Отредактировать Тип Данных", "popUpForm.field": "Поле", "popUpForm.navContainer.advanced": "Расширенные настройки", - "popUpForm.navContainer.base": "Базовый настройки", + "popUpForm.navContainer.base": "Базовые настройки", "popUpForm.navContainer.relation": "Определить связь", "popUpRelation.title": "Связь", "popUpWarning.bodyMessage.attribute.delete": "Вы уверены, что хотите удалить это поле?", @@ -152,6 +152,6 @@ "table.contentType.head.description": "Описание", "table.contentType.head.fields": "Поля", "table.contentType.head.name": "Название", - "table.contentType.title.plural": "Типы Данных доступны", + "table.contentType.title.plural": "Типа Данных доступны", "table.contentType.title.singular": "Тип Данных доступен" } \ No newline at end of file diff --git a/packages/strapi-plugin-content-type-builder/admin/src/translations/zh.json b/packages/strapi-plugin-content-type-builder/admin/src/translations/zh.json index 47c0d9d2b4..b0a0a38dc3 100644 --- a/packages/strapi-plugin-content-type-builder/admin/src/translations/zh.json +++ b/packages/strapi-plugin-content-type-builder/admin/src/translations/zh.json @@ -1,63 +1,68 @@ { - "attribute.WYSIWYG": "Text (WYSIWYG)", - "attribute.boolean": "是/否", + "attribute.WYSIWYG": "文字(WYSIWYG)", + "attribute.boolean": "布林值", "attribute.date": "日期", "attribute.decimal": "浮點數(decimal)", - "attribute.email": "Email", - "attribute.enumeration": "Enumeration", + "attribute.email": "電子郵件地址", + "attribute.enumeration": "列舉", "attribute.float": "浮點數(float)", "attribute.integer": "整數", "attribute.json": "JSON", "attribute.media": "媒體", "attribute.password": "密碼", - "attribute.relation": "關聯其他結構", + "attribute.relation": "關聯", "attribute.string": "字串", "attribute.text": "文字", "button.attributes.add": "增加新的欄位", "button.contentType.add": "增加資料結構", "button.contentType.create": "建立資料結構", "contentType.temporaryDisplay": "(未儲存)", + "error.attribute.forbidden": "這個欄位名稱為保留字", "error.attribute.key.taken": "這個數值已存在", "error.attribute.sameKeyAndName": "不能一樣", "error.attribute.taken": "這個欄位名稱已存在", "error.contentTypeName.taken": "這個名稱已存在", - "error.validation.max": "這個數值太高了", - "error.validation.maxLength": "這個數值太長了", - "error.validation.min": "這個數值太低了", - "error.validation.minLength": "這個數值太短了", - "error.validation.minSupMax": "不能大於", - "error.validation.regex": "這個數值和 regex 不符合", + "error.validation.max": "數值過高", + "error.validation.maxLength": "長度過長", + "error.validation.min": "數值過低", + "error.validation.minLength": "長度過短", + "error.validation.minSupMax": "不能高於最大值", + "error.validation.regex": "此欄位無法與正規表達式批配", "error.validation.required": "必填欄位", + "form.attribute.item.appearance.description": "否則,此欄位將透過基本的文字編輯框進行編輯", + "form.attribute.item.appearance.label": "顯示視覺化編輯器(WYSIWYG)", + "form.attribute.item.appearance.name": "外觀", "form.attribute.item.boolean.name": "名稱", "form.attribute.item.customColumnName": "自訂欄位名稱", - "form.attribute.item.customColumnName.description": "將資料庫欄位名稱以更廣泛的格式重新命名,對 API 回應很有用。", + "form.attribute.item.customColumnName.description": "將資料庫欄位名稱以更易懂的格式重新命名,對 API 回應很有用。", "form.attribute.item.date.name": "名稱", "form.attribute.item.defineRelation.fieldName": "欄位名稱", - "form.attribute.item.enumeration.graphql": "Name override for GraphQL", - "form.attribute.item.enumeration.graphql.description": "Allows you to override the default generated name for GraphQL", + "form.attribute.item.enumeration.graphql": "GraphQL 名稱覆寫", + "form.attribute.item.enumeration.graphql.description": "可以讓您覆寫 GraphQL 的預設名稱", "form.attribute.item.enumeration.name": "名稱", - "form.attribute.item.enumeration.placeholder": "Ex: morning,noon,evening", - "form.attribute.item.enumeration.rules": "Values (separate them with a comma)", + "form.attribute.item.enumeration.placeholder": "例: morning,noon,evening", + "form.attribute.item.enumeration.rules": "選項(以半形逗號分隔)", "form.attribute.item.json.name": "名稱", "form.attribute.item.maximum": "最大數值", "form.attribute.item.maximumLength": "最大長度", + "form.attribute.item.media.multiple": "允許多個檔案", "form.attribute.item.media.name": "名稱", "form.attribute.item.minimum": "最小數值", "form.attribute.item.minimumLength": "最小長度", "form.attribute.item.number.name": "名稱", "form.attribute.item.number.type": "數字格式", - "form.attribute.item.number.type.decimal": "浮點數(decimal) (ex: 2.22)", - "form.attribute.item.number.type.float": "浮點數(float) (ex: 3.33333333)", - "form.attribute.item.number.type.integer": "整數 (ex: 10)", + "form.attribute.item.number.type.decimal": "浮點數(decimal) (例: 2.22)", + "form.attribute.item.number.type.float": "浮點數(float) (例: 3.33333333)", + "form.attribute.item.number.type.integer": "整數 (例: 10)", "form.attribute.item.requiredField": "必填欄位", - "form.attribute.item.requiredField.description": "如果這個欄位留空,您將不能建立進入點。", + "form.attribute.item.requiredField.description": "如果這個欄位留空,您將不能建立項目。", "form.attribute.item.settings.name": "設定", "form.attribute.item.string.name": "名稱", "form.attribute.item.textarea.name": "名稱", "form.attribute.item.uniqueField": "唯一欄位", - "form.attribute.item.uniqueField.description": "如果已存在的進入點有一模一樣的內容,您將不能建立進入點。", - "form.attribute.settings.default": "Default value", - "form.attribute.settings.default.checkboxLabel": "Set to true", + "form.attribute.item.uniqueField.description": "如果已存在的項目有一模一樣的內容,您將不能建立項目。", + "form.attribute.settings.default": "預設值", + "form.attribute.settings.default.checkboxLabel": "設為真", "form.button.cancel": "取消", "form.button.continue": "繼續", "form.button.save": "儲存", @@ -68,13 +73,13 @@ "form.contentType.item.description.placeholder": "請在這裡寫一些說明...", "form.contentType.item.name": "名稱", "form.contentType.item.name.description": "資料結構名稱必須要單數: {link}", - "form.contentType.item.name.link.description": "請看我們的文件", + "form.contentType.item.name.link.description": "請閱讀我們的文件", "from": "從", "home.contentTypeBuilder.description": "建立和更新資料結構.", "home.contentTypeBuilder.name": "資料結構", - "home.emptyAttributes.description": "新增您第一個欄位到您的資料結構", + "home.emptyAttributes.description": "新增您資料結構中的第一個欄位", "home.emptyAttributes.title": "目前沒有任何欄位", - "home.emptyContentType.description": "建立您第一個資料結構,讓您能夠從 API 擷取資料。", + "home.emptyContentType.description": "建立您的第一個資料結構,讓您能夠從 API 擷取資料。", "home.emptyContentType.title": "沒有任何資料結構", "menu.section.contentTypeBuilder.name.plural": "資料結構", "menu.section.contentTypeBuilder.name.singular": "資料結構", @@ -92,38 +97,38 @@ "modelPage.contentType.list.title.singular": "欄位", "noTableWarning.description": "請勿忘記建立在您的資料庫建立 `{modelName}`", "noTableWarning.infos": "更多資訊", - "notification.error.message": "有錯誤發生了", - "notification.info.contentType.creating.notSaved": "建立新的資料結構前,請先儲存現在的。", - "notification.info.disable": "这个字段暂时不可编辑...😮", - "notification.info.optimized": "這個擴充功能使用您的 localstorage 來最佳化", + "notification.error.message": "發生錯誤", + "notification.info.contentType.creating.notSaved": "建立新的資料結構前,請先儲存目前的。", + "notification.info.disable": "這個欄位暫時不可編輯...😮", + "notification.info.optimized": "這個擴充功能使用您的本機儲存空間最佳化", "notification.success.contentTypeDeleted": "這個資料結構被刪除了", "notification.success.message.contentType.create": "您的資料結構已建立", "notification.success.message.contentType.edit": "您的資料結構已更新", - "plugin.description.long": "為您的 API 定義資料結構,使你輕鬆新增欄位和關聯結構,你所做的修改會自動更新專案。", + "plugin.description.long": "為您的 API 定義資料結構,使您輕鬆新增欄位和關聯結構,您所做的修改會自動更新專案。", "plugin.description.short": "為您的 API 定義資料結構", - "popUpForm.attributes.boolean.description": "是或否、1 或 0、真或假", - "popUpForm.attributes.boolean.name": "是/否", - "popUpForm.attributes.date.description": "日期、營業時間", + "popUpForm.attributes.boolean.description": "是或否、1 或 0、真或假...", + "popUpForm.attributes.boolean.name": "布林值", + "popUpForm.attributes.date.description": "日期、營業時間...", "popUpForm.attributes.date.name": "日期", - "popUpForm.attributes.email.description": "使用者的 email...", - "popUpForm.attributes.email.name": "Email", - "popUpForm.attributes.enumeration.description": "List of choices", - "popUpForm.attributes.enumeration.name": "Enumeration", + "popUpForm.attributes.email.description": "使用者的電子郵件地址...", + "popUpForm.attributes.email.name": "電子郵件地址", + "popUpForm.attributes.enumeration.description": "一些選項...", + "popUpForm.attributes.enumeration.name": "列舉", "popUpForm.attributes.json.description": "JSON 格式資料", "popUpForm.attributes.json.name": "JSON", - "popUpForm.attributes.media.description": "圖片、影片、PDF 和其他檔案", + "popUpForm.attributes.media.description": "圖片、影片、PDF 和其他檔案...", "popUpForm.attributes.media.name": "媒體", - "popUpForm.attributes.number.description": "跟數字有關的", + "popUpForm.attributes.number.description": "跟數字有關的...", "popUpForm.attributes.number.name": "數字", "popUpForm.attributes.password.description": "使用者密碼...", "popUpForm.attributes.password.name": "密碼", "popUpForm.attributes.relation.description": "關聯到一個資料結構", - "popUpForm.attributes.relation.name": "關聯其他結構", - "popUpForm.attributes.string.description": "標題、名字、文章段落、名字列表", + "popUpForm.attributes.relation.name": "關聯", + "popUpForm.attributes.string.description": "標題、名字、文章段落、名字列表...", "popUpForm.attributes.string.name": "字串", - "popUpForm.attributes.text.description": "說明、文章片段、作者", + "popUpForm.attributes.text.description": "說明、文章片段、作者...", "popUpForm.attributes.text.name": "文字", - "popUpForm.choose.attributes.header.title": "增加新的Field", + "popUpForm.choose.attributes.header.title": "增加新的欄位", "popUpForm.create": "增加新的", "popUpForm.create.contentType.header.title": "增加新的資料結構", "popUpForm.edit": "編輯", @@ -138,11 +143,12 @@ "popUpWarning.button.cancel": "取消", "popUpWarning.button.confirm": "確認", "popUpWarning.title": "請確認", - "relation.attributeName.placeholder": "Ex: 作者, 類別, tag", + "relation.attributeName.placeholder": "Ex: 作者, 類別, tag...", "relation.manyToMany": "有而且屬於許多", "relation.manyToOne": "有許多", "relation.oneToMany": "屬於許多", - "relation.oneToOne": "有一個", + "relation.oneToOne": "一對一到", + "relation.oneWay": "有一個", "table.contentType.head.description": "說明", "table.contentType.head.fields": "欄位", "table.contentType.head.name": "名稱", diff --git a/packages/strapi-plugin-content-type-builder/package.json b/packages/strapi-plugin-content-type-builder/package.json index 69a70e73b1..371dd0b67c 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-alpha.14.5", + "version": "3.0.0-alpha.16", "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.5", - "strapi-generate-api": "3.0.0-alpha.14.5" + "strapi-generate": "3.0.0-alpha.16", + "strapi-generate-api": "3.0.0-alpha.16" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.14.5" + "strapi-helper-plugin": "3.0.0-alpha.16" }, "author": { "name": "Strapi team", @@ -47,8 +47,8 @@ "url": "git://github.com/strapi/strapi.git" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.0.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-plugin-email/admin/src/translations/zh.json b/packages/strapi-plugin-email/admin/src/translations/zh.json index 123abb7010..d9101fd955 100644 --- a/packages/strapi-plugin-email/admin/src/translations/zh.json +++ b/packages/strapi-plugin-email/admin/src/translations/zh.json @@ -1,4 +1,11 @@ { - "plugin.description.long": "送出", - "plugin.description.short": "送出" + "ConfigPage.description": "設定郵件擴充功能", + "ConfigPage.title": "郵件 - 設定", + "EditForm.Input.number.label": "最大大小 (MB)", + "EditForm.Input.select.inputDescription": "可以使用預設 (Sendmail) 或其他套件寄送郵件", + "EditForm.Input.select.label": "套件", + "EditForm.Input.toggle.label": "啟動寄信功能", + "notification.config.success": "設定已經更新", + "plugin.description.long": "寄送電子郵件", + "plugin.description.short": "寄送電子郵件" } \ No newline at end of file diff --git a/packages/strapi-plugin-email/config/functions/bootstrap.js b/packages/strapi-plugin-email/config/functions/bootstrap.js index 784a00eea5..fa2b34617b 100644 --- a/packages/strapi-plugin-email/config/functions/bootstrap.js +++ b/packages/strapi-plugin-email/config/functions/bootstrap.js @@ -26,7 +26,8 @@ module.exports = async cb => { fs.readdir(path.join(basePath, 'node_modules'), async (err, node_modules) => { // get all email providers const emails = _.filter(node_modules, (node_module) => { - return _.startsWith(node_module, ('strapi-provider-email')); + // DEPRECATED strapi-email-* will be remove in next version + return _.startsWith(node_module, 'strapi-provider-email') || _.startsWith(node_module, 'strapi-email'); }); // mount all providers to get configs diff --git a/packages/strapi-plugin-email/package.json b/packages/strapi-plugin-email/package.json index fdcd00416b..a952fb5cd6 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "This is the description of the plugin.", "strapi": { "name": "Email", @@ -22,11 +22,11 @@ "prepublishOnly": "IS_MONOREPO=true npm run build" }, "dependencies": { - "strapi-provider-email-sendmail": "3.0.0-alpha.14.5" + "strapi-provider-email-sendmail": "3.0.0-alpha.16" }, "devDependencies": { "react-copy-to-clipboard": "5.0.1", - "strapi-helper-plugin": "3.0.0-alpha.14.5" + "strapi-helper-plugin": "3.0.0-alpha.16" }, "author": { "name": "Strapi team", @@ -45,8 +45,8 @@ "url": "git://github.com/strapi/strapi.git" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.0.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-plugin-graphql/config/settings.json b/packages/strapi-plugin-graphql/config/settings.json index deda1e7b90..91c5f96ee4 100644 --- a/packages/strapi-plugin-graphql/config/settings.json +++ b/packages/strapi-plugin-graphql/config/settings.json @@ -2,5 +2,6 @@ "endpoint": "/graphql", "shadowCRUD": true, "playgroundAlways": false, - "depthLimit": 7 + "depthLimit": 7, + "amountLimit": 100 } diff --git a/packages/strapi-plugin-graphql/package.json b/packages/strapi-plugin-graphql/package.json index 9dbe69acd0..ef4b64538b 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "This is the description of the plugin.", "strapi": { "name": "graphql", @@ -31,7 +31,7 @@ "graphql-type-datetime": "^0.2.2", "graphql-type-json": "^0.2.1", "pluralize": "^7.0.0", - "strapi-utils": "3.0.0-alpha.14.5" + "strapi-utils": "3.0.0-alpha.16" }, "author": { "name": "A Strapi developer", @@ -46,8 +46,8 @@ } ], "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js index 93dcb1bd89..72885ee38e 100644 --- a/packages/strapi-plugin-graphql/services/Loaders.js +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -66,12 +66,16 @@ module.exports = { })(); if (!_.isArray(ids)) { - return data.filter(entry => entry[ids.alias].toString() === ids.value.toString()); + return data.filter(entry => entry[ids.alias].toString() === ids.value.toString()).slice(query.options.start, query.options.limit); } - return ids - .map(id => data.find(entry => entry[ref.primaryKey].toString() === id.toString())) - .filter(entry => entry !== undefined); + // Critical: don't touch this part until you truly understand what you're doing. + // The data array takes care of the sorting of the entries. It explains why we are looping from this array and not the `ids` array. + // Then, we're applying the `limit`, `start` and `skip` argument. + return data + .filter(entry => entry !== undefined) + .filter(entry => ids.map(id => id.toString()).includes(entry[ref.primaryKey].toString())) + .slice((query.options.start || query.options.skip), (query.options.start || query.options.skip) + query.options.limit); }); }, @@ -83,13 +87,20 @@ module.exports = { const ref = this.retrieveModel(model, query.options.source); // Construct parameters object sent to the Content Manager service. + // We are faking the `start` and `skip` argument because it doesn't make sense because we are merging different requests in one. + // Note: we're trying to avoid useless populate for performances. Please be careful if you're updating this part. const params = { ...query.options, - populate: ref.associations.filter(a => !a.dominant).map(a => a.alias), - query: {} + populate: ref.associations.filter(a => !a.dominant && _.isEmpty(a.model)).map(a => a.alias), + query: {}, + start: 0, + skip: 0 }; params.query[query.alias] = _.uniq(query.ids.filter(x => !_.isEmpty(x)).map(x => x.toString())); + // However, we're applying a limit based on the number of entries we've to fetch. + // We'll apply the real `skip`, `start` and `limit` parameters during the mapping above. + params.limit = params.query[query.alias].length; // Run query and remove duplicated ID. const request = await strapi.plugins['content-manager'].services['contentmanager'].fetchAll({ model }, params); diff --git a/packages/strapi-plugin-graphql/services/Query.js b/packages/strapi-plugin-graphql/services/Query.js index 4d9eecba0e..46abf41d76 100644 --- a/packages/strapi-plugin-graphql/services/Query.js +++ b/packages/strapi-plugin-graphql/services/Query.js @@ -25,34 +25,17 @@ module.exports = { }, {}); }, - convertToQuery: function(params) { - const result = {}; - - _.forEach(params, (value, key) => { - if (_.isPlainObject(value)) { - const flatObject = this.convertToQuery(value); - _.forEach (flatObject, (_value, _key) => { - result[`${key}.${_key}`] = _value; - }); - } else { - result[key] = value; - } - }); - - return result; - }, - /** * Security to avoid infinite limit. * * @return String */ - amountLimiting: params => { + amountLimiting: (params = {}) => { if (params.limit && params.limit < 0) { params.limit = 0; - } else if (params.limit && params.limit > 100) { - params.limit = 100; + } else if (params.limit && params.limit > _.get(strapi.plugins, 'graphql.config.amountLimit', 100)) { + params.limit = _.get(strapi.plugins, 'graphql.config.amountLimit', 100); } return params; @@ -192,16 +175,13 @@ module.exports = { // Plural. return async (ctx, next) => { - const queryOpts = {}; - queryOpts.params = this.amountLimiting(ctx.params); - queryOpts.query = Object.assign( - {}, - this.convertToParams(_.omit(queryOpts.params, 'where')), - this.convertToQuery(queryOpts.params.where) + ctx.params = this.amountLimiting(ctx.params); + ctx.query = Object.assign( + this.convertToParams(_.omit(ctx.params, 'where')), + ctx.params.where, ); - - // Only populate on non-dominant side. - return controller(Object.assign({}, ctx, queryOpts, { send: ctx.send }), next, { populate: model.associations.filter(a => !a.dominant).map(a => a.alias) }); + + return controller(ctx, next); }; })(); @@ -278,15 +258,10 @@ module.exports = { // Resolver can be a function. Be also a native resolver or a controller's action. if (_.isFunction(resolver)) { - options.populate = model.associations.filter(a => !a.dominant).map(a => a.alias); + // options.populate = model.associations.filter(a => !a.dominant).map(a => a.alias); + context.query = this.convertToParams(options); + context.params = this.amountLimiting(options); - ctx.params = this.amountLimiting(options); - ctx.query = Object.assign( - {}, - this.convertToParams(_.omit(options, 'where')), - this.convertToQuery(options.where), - ); - if (isController) { const values = await resolver.call(null, ctx); diff --git a/packages/strapi-plugin-graphql/services/Resolvers.js b/packages/strapi-plugin-graphql/services/Resolvers.js index c952b1abf0..cd2800e4f3 100644 --- a/packages/strapi-plugin-graphql/services/Resolvers.js +++ b/packages/strapi-plugin-graphql/services/Resolvers.js @@ -367,11 +367,6 @@ module.exports = { _.merge(acc.resolver[globalId], { [association.alias]: async (obj, options) => { - console.log(association.alias, `(${globalId})`); - console.log(obj); - console.log('####'); - - // eslint-disable-line no-unused-vars // Construct parameters object to retrieve the correct related entries. const params = { @@ -387,16 +382,6 @@ module.exports = { ? strapi.plugins[association.plugin].models[params.model] : strapi.models[params.model]; - if (association.type === 'model' && !_.isEmpty(obj[association.alias])) { - // Nested relation has already been fetched - // we don't need to resend a request. - - // Note: we can't apply the same principle on another relation type - // because it won't apply limit, sort, start, etc filters. - return obj[association.alias]; - } - - if (association.type === 'model') { params[ref.primaryKey] = _.get(obj, [association.alias, ref.primaryKey], obj[association.alias]); } else { @@ -431,17 +416,16 @@ module.exports = { [ref.primaryKey]: arrayOfIds } }); - + break; } default: - // Where. - queryOpts.query = strapi.utils.models.convertParams(name, { - // Construct the "where" query to only retrieve entries which are - // related to this entry. - [association.via]: obj[ref.primaryKey], - ...where.where, - }).where; + Object.assign(queryOpts, { + ...queryOpts, + query: { + [association.via]: obj[ref.primaryKey] + } + }); } } diff --git a/packages/strapi-plugin-graphql/services/Schema.js b/packages/strapi-plugin-graphql/services/Schema.js index ede76b7db6..d13249e3ed 100644 --- a/packages/strapi-plugin-graphql/services/Schema.js +++ b/packages/strapi-plugin-graphql/services/Schema.js @@ -63,7 +63,7 @@ module.exports = { }) .join('\n'); } else if (type === 'query' || type === 'mutation') { - const test = lines + return lines .map((line, index) => { if (['{', '}'].includes(line)) { return ''; @@ -90,8 +90,6 @@ module.exports = { return line; }) .join('\n'); - - return test; } return lines diff --git a/packages/strapi-plugin-settings-manager/admin/src/translations/zh.json b/packages/strapi-plugin-settings-manager/admin/src/translations/zh.json index bdab1a0598..13de60771b 100644 --- a/packages/strapi-plugin-settings-manager/admin/src/translations/zh.json +++ b/packages/strapi-plugin-settings-manager/admin/src/translations/zh.json @@ -1,9 +1,9 @@ { - "components.DownloadDb.download": "正在安裝中...", + "components.DownloadDb.download": "安裝中...", "components.DownloadDb.text": "這會需要幾分鐘的時間,感謝您的耐心。", "form.advanced.description": "調整進階設定", - "form.advanced.item.admin": "Admin 控制面板連結", - "form.advanced.item.prefix": "Prefix API", + "form.advanced.item.admin": "管理者控制面板連結", + "form.advanced.item.prefix": "API 前綴", "form.advanced.name": "進階", "form.application.description": "調整您的應用程式設定", "form.application.item.description": "說明", @@ -13,18 +13,20 @@ "form.button.cancel": "取消", "form.button.confirm": "確認", "form.button.save": "儲存", - "form.database.item.client": "Client", - "form.database.item.connector": "Connector", + "form.database.item.authenticationDatabase": "驗證資料庫", + "form.database.item.client": "客戶端", + "form.database.item.connector": "連接器", "form.database.item.database": "資料庫", "form.database.item.default": "設為預設連線", - "form.database.item.host": "Host", + "form.database.item.host": "主機", "form.database.item.name": "連線名稱", "form.database.item.password": "密碼", - "form.database.item.port": "Port", + "form.database.item.port": "連接埠", "form.database.item.provider.mongo": "Mongo", "form.database.item.provider.mysql": "MySQL", "form.database.item.provider.postgres": "PostgresSQL", "form.database.item.provider.redis": "Redis", + "form.database.item.ssl": "SSL", "form.database.item.username": "使用者名稱", "form.databases.description": "根據您的環境來設定資料庫", "form.databases.name": "資料庫", @@ -32,51 +34,56 @@ "form.language.description": "設定語言", "form.language.name": "語言", "form.request.description": "調整請求設定", - "form.request.item.logger": "Logger", - "form.request.item.logger.exposeInContext": "Expose in context", - "form.request.item.logger.level": "Level", + "form.request.item.logger": "日誌", + "form.request.item.logger.exposeInContext": "允許程式碼使用", + "form.request.item.logger.level": "層級", "form.request.item.logger.requests": "請求", - "form.request.item.parser": "Parser", - "form.request.item.parser.multipart": "Parser Multipart", - "form.request.item.prefix": "Prefix", - "form.request.item.prefix.prefix": "Prefix", - "form.request.item.router": "Router", - "form.request.item.router.prefix": "Prefix", + "form.request.item.parser": "解析器", + "form.request.item.parser.multipart": "允許解析 multipart 請求", + "form.request.item.prefix": "前綴", + "form.request.item.prefix.prefix": "前綴", + "form.request.item.router": "路由器", + "form.request.item.router.prefix": "前綴", "form.request.name": "請求", "form.response.description": "調整回應設定", "form.response.item.gzip.enabled": "Gzip", "form.response.item.responseTime.enabled": "回應時間", "form.response.name": "回應", "form.security.description": "調整安全性設定", - "form.security.item.cors": "Cors", - "form.security.item.cors.origin": "Origin", - "form.security.item.csrf": "CSRF", - "form.security.item.csrf.angular": "Angular", + "form.security.item.cors": "跨域資源共享 (Cors)", + "form.security.item.cors.origin": "來源", + "form.security.item.csrf": "跨站請求偽造保護 (CSRF)", + "form.security.item.csrf.angular": "使用 Angular", "form.security.item.csrf.cookie": "Cookie", - "form.security.item.csrf.key": "Key", - "form.security.item.csrf.secret": "Secret", - "form.security.item.hsts": "HOSTS", - "form.security.item.hsts.includeSubDomains": "Include Sub Domain", - "form.security.item.hsts.maxAge": "Max Age", - "form.security.item.hsts.preload": "Preload", - "form.security.item.p3p": "P3P", - "form.security.item.p3p.value": "Value", - "form.security.item.session": "Session", - "form.security.item.session.key": "Secret key", - "form.security.item.session.maxAge": "Maximum age", - "form.security.item.xframe": "Xframe", - "form.security.item.xframe.allow-from": "ALLOW-FROM", - "form.security.item.xframe.deny": "DENY", - "form.security.item.xframe.sameorigin": "SAMEORIGIN", - "form.security.item.xframe.value": "Options", - "form.security.item.xssProtection": "xss Protection", - "form.security.item.xssProtection.mode": "Mode", + "form.security.item.csrf.key": "鍵值", + "form.security.item.csrf.secret": "密鑰鍵值", + "form.security.item.hsts": "強制安全傳輸 (HSTS)", + "form.security.item.hsts.includeSubDomains": "包含子域名", + "form.security.item.hsts.maxAge": "作用期", + "form.security.item.hsts.preload": "預載入", + "form.security.item.p3p": "隱私權偏好平台 (P3P)", + "form.security.item.p3p.value": "值", + "form.security.item.session": "會話", + "form.security.item.session.key": "密鑰", + "form.security.item.session.maxAge": "存活期", + "form.security.item.xframe": "嵌入框架保護 (Xframe)", + "form.security.item.xframe.allow-from": "允許特定網站 (ALLOW-FROM)", + "form.security.item.xframe.deny": "拒絕 (DENY)", + "form.security.item.xframe.sameorigin": "相同網域 (SAMEORIGIN)", + "form.security.item.xframe.value": "選項", + "form.security.item.xssProtection": "跨站指令碼保護 (XSS)", + "form.security.item.xssProtection.mode": "模式", "form.security.name": "安全性", "form.server.description": "調整伺服器設定", - "form.server.item.cron": "Cron", - "form.server.item.host": "Host", - "form.server.item.port": "Port", - "form.server.name": "Server", + "form.server.item.cron": "排程工作", + "form.server.item.host": "主機", + "form.server.item.port": "連接埠", + "form.server.item.proxy": "代理伺服器設定", + "form.server.item.proxy.enable": "啟動代理伺服器", + "form.server.item.proxy.host": "主機", + "form.server.item.proxy.port": "連接埠", + "form.server.item.proxy.ssl": "SSL", + "form.server.name": "伺服器", "language.af": "Afrikaans", "language.af_NA": "Afrikaans (Namibië)", "language.af_ZA": "Afrikaans (Suid-Afrika)", @@ -572,8 +579,8 @@ "language.zu": "isiZulu", "language.zu_ZA": "isiZulu (iNingizimu Afrika)", "list.databases.button.label": "增加新的連線", - "list.databases.title.plural": "個環境連線", - "list.databases.title.singular": "個環境連線", + "list.databases.title.plural": "個連線", + "list.databases.title.singular": "個連線", "list.languages.button.label": "增加一個新的語言", "list.languages.default.languages": "預設語言", "list.languages.set.languages": "設為預設", @@ -586,42 +593,43 @@ "menu.item.request": "請求", "menu.item.response": "回應", "menu.item.security": "安全性", - "menu.item.server": "主機", + "menu.item.server": "伺服器", "menu.section.environments": "環境", "menu.section.global-settings": "全域設定", - "pageNotFound": "Page not found", + "pageNotFound": "找不到此頁面", "plugin.description.long": "只需要幾秒鐘的時間就可以設定好您的專案", "plugin.description.short": "只需要幾秒鐘的時間就可以設定好您的專案", "popUpWarning.danger.ok.message": "我知道", - "popUpWarning.databases.danger.message": "資料結構目前還在綁定這個連線中,如果刪除它,將會發生嚴重錯誤,請小心。", + "popUpWarning.databases.danger.message": "請小心,資料結構目前還在綁定這個連線中,如果刪除它將會發生嚴重錯誤。", "popUpWarning.databases.delete.message": "您確定要刪除這個資料庫嗎?", "popUpWarning.languages.delete.message": "您確定要刪除這個語言嗎?", "popUpWarning.title": "請確認", "request.error.config": "設定檔不存在", - "request.error.database.exist": "這個連線已存在", + "request.error.database.exist": "連線已存在", + "request.error.database.unknow": "不存在的連線", "request.error.environment.required": "環境必須設定", - "request.error.environment.unknow": "環境為未知", - "request.error.languages.exist": "這個語言已存在", - "request.error.languages.incorrect": "這個語言不正確", - "request.error.languages.unknow": "這個語言不存在", - "request.error.type.boolean": "必填 Boolean 欄位", + "request.error.environment.unknow": "不存在的環境", + "request.error.languages.exist": "語言已存在", + "request.error.languages.incorrect": "不正確的語言", + "request.error.languages.unknow": "不存在的語言", + "request.error.type.boolean": "必填布林欄位", "request.error.type.number": "必填數字欄位", - "request.error.type.select": "這個數值必須要在預先設定清單", + "request.error.type.select": "這個數值必須要在預定義清單", "request.error.type.string": "必填文字欄位", - "request.error.validation.max": "這個數值太高", - "request.error.validation.maxLength": "這個數值太長", - "request.error.validation.min": "這個數值太低", - "request.error.validation.minLength": "這個數值太短", - "request.error.validation.regex": "這個數值和 regex 不符合", + "request.error.validation.max": "數值過高", + "request.error.validation.maxLength": "長度過長", + "request.error.validation.min": "數值過低", + "request.error.validation.minLength": "長度過短", + "request.error.validation.regex": "此欄位無法與正規表達式批配", "request.error.validation.required": "必填欄位", - "strapi.notification.error": "有錯誤發生", - "strapi.notification.info.serverRestart": "伺服器將重啟", + "strapi.notification.error": "發生錯誤", + "strapi.notification.info.serverRestart": "伺服器將重新啟動", "strapi.notification.info.settingsEqual": "設定是相同的", - "strapi.notification.success.databaseAdd": "成功新增這個資料庫", - "strapi.notification.success.databaseDelete": "成功刪除這個資料庫", - "strapi.notification.success.databaseDeleted": "已刪除這個資料庫", - "strapi.notification.success.databaseEdit": "已更新這個資料庫設定", - "strapi.notification.success.languageAdd": "成功新增這個語言", - "strapi.notification.success.languageDelete": "成功刪除這個語言", - "strapi.notification.success.settingsEdit": "已更新這個設定" -} \ No newline at end of file + "strapi.notification.success.databaseAdd": "成功新增資料庫", + "strapi.notification.success.databaseDelete": "成功刪除資料庫", + "strapi.notification.success.databaseDeleted": "已刪除資料庫", + "strapi.notification.success.databaseEdit": "已更新資料庫設定", + "strapi.notification.success.languageAdd": "成功新增語言", + "strapi.notification.success.languageDelete": "成功刪除語言", + "strapi.notification.success.settingsEdit": "設定已更新" +} diff --git a/packages/strapi-plugin-settings-manager/package.json b/packages/strapi-plugin-settings-manager/package.json index 81d670c3c5..6173b9965e 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-alpha.14.5", + "version": "3.0.0-alpha.16", "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.5" + "strapi-helper-plugin": "3.0.0-alpha.16" }, "author": { "name": "Strapi team", @@ -44,8 +44,8 @@ "url": "git://github.com/strapi/strapi.git" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.0.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-plugin-upload/admin/src/translations/zh.json b/packages/strapi-plugin-upload/admin/src/translations/zh.json index 80bf2738f6..bc62ae9489 100644 --- a/packages/strapi-plugin-upload/admin/src/translations/zh.json +++ b/packages/strapi-plugin-upload/admin/src/translations/zh.json @@ -1,19 +1,27 @@ { + "ConfigPage.description": "設定上傳擴充套件", + "ConfigPage.title": "上傳 - 設定", + "EditForm.Input.number.label": "檔案大小限制 (MB)", + "EditForm.Input.select.inputDescription": "檔案可以被上傳到您的伺服器或是外部的儲存空間。", + "EditForm.Input.select.label": "儲存空間", + "EditForm.Input.toggle.label": "啟用檔案上傳", "EmptyLi.message": "您目前沒有上傳任何檔案", "EntriesNumber.number": "找到 {number} 個檔案", "EntriesNumber.number.plural": "找到 {number} 個檔案", - "HomePage.InputSearch.placeholder": "尋找檔案...", + "HomePage.InputSearch.placeholder": "搜尋檔案...", "HomePage.description": "查看所有上傳的檔案", "HomePage.title": "上傳", "Li.linkCopied": "連結已複製到剪貼簿", - "ListHeader.hash": "Hash", + "ListHeader.hash": "雜湊碼", "ListHeader.name": "名稱", "ListHeader.related": "關聯到", "ListHeader.size": "大小", "ListHeader.type": "類型", "ListHeader.updated": "已更新", "PluginInputFile.link": "瀏覽", - "PluginInputFile.text": "拖拉您的檔案到這個地方,或是連到 {link} 來上傳", + "PluginInputFile.loading": "正在上傳您的檔案...", + "PluginInputFile.text": "拖曳您的檔案到這個區域,或是 {link} 檔案以上傳", + "notification.config.success": "設定已更新", "notification.delete.success": "檔案已刪除", "notification.dropFile.success": "您的檔案已上傳", "notification.dropFiles.success": "{number} 個檔案已上傳" diff --git a/packages/strapi-plugin-upload/config/functions/bootstrap.js b/packages/strapi-plugin-upload/config/functions/bootstrap.js index d20fd0b657..d437af25e2 100644 --- a/packages/strapi-plugin-upload/config/functions/bootstrap.js +++ b/packages/strapi-plugin-upload/config/functions/bootstrap.js @@ -26,7 +26,8 @@ module.exports = async cb => { fs.readdir(path.join(basePath, 'node_modules'), async (err, node_modules) => { // get all upload provider const uploads = _.filter(node_modules, (node_module) => { - return _.startsWith(node_module, ('strapi-provider-upload')); + // DEPRECATED strapi-upload-* will be remove in next version + return _.startsWith(node_module, 'strapi-provider-upload') || _.startsWith(node_module, 'strapi-upload'); }); // mount all providers to get configs diff --git a/packages/strapi-plugin-upload/package.json b/packages/strapi-plugin-upload/package.json index 849229487d..ffb99cb68e 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-alpha.14.5", + "version": "3.0.0-alpha.16", "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-provider-upload-local": "3.0.0-alpha.14.5", + "strapi-provider-upload-local": "3.0.0-alpha.16", "stream-to-array": "^2.3.0", "uuid": "^3.2.1" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.14.5" + "strapi-helper-plugin": "3.0.0-alpha.16" }, "author": { "name": "A Strapi developer", @@ -43,8 +43,8 @@ } ], "engines": { - "node": ">= 7.0.0", - "npm": ">= 3.0.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-plugin-users-permissions/admin/src/translations/zh.json b/packages/strapi-plugin-users-permissions/admin/src/translations/zh.json index 7bd630c8ab..ccd059cfeb 100644 --- a/packages/strapi-plugin-users-permissions/admin/src/translations/zh.json +++ b/packages/strapi-plugin-users-permissions/admin/src/translations/zh.json @@ -1,26 +1,29 @@ { "Auth.advanced.allow_register": "", - "Auth.form.button.forgot-password": "送出 Email", + "Auth.form.button.forgot-password": "寄送郵件", "Auth.form.button.forgot-password.success": "重寄一次", "Auth.form.button.login": "登入", "Auth.form.button.register": "準備開始", "Auth.form.button.register-success": "重寄一次", "Auth.form.button.reset-password": "更改密碼", - "Auth.form.error.code.provide": "提供的數字不正確", - "Auth.form.error.email.invalid": "Email 格式不正確", - "Auth.form.error.email.provide": "請輸入使用者名稱或 Email", - "Auth.form.error.email.taken": "Email 已被使用", + "Auth.form.error.blocked": "您的帳號已經被系統管理員停用。", + "Auth.form.error.code.provide": "提供的令符不正確", + "Auth.form.error.confirmed": "您的電子郵件地址尚未經過認證。", + "Auth.form.error.email.invalid": "電子郵件地址格式不正確", + "Auth.form.error.email.provide": "請輸入使用者名稱或電子郵件地址", + "Auth.form.error.email.taken": "此電子郵件地址已被使用", "Auth.form.error.invalid": "使用者名稱或密碼不正確", - "Auth.form.error.noAdminAccess": "您將不能進入管理者控制面板", + "Auth.form.error.noAdminAccess": "您不能進入管理者控制面板", "Auth.form.error.params.provide": "密碼不正確", - "Auth.form.error.password.format": "您的密碼不能包含這個符號 `$` 超過三次", - "Auth.form.error.password.local": "這個使用者還沒有設定本地密碼,請使用創建帳號時使用的供應商登入。", - "Auth.form.error.password.matching": "密碼不相符", + "Auth.form.error.password.format": "您的密碼不能包含超過三個 `$` 符號", + "Auth.form.error.password.local": "這個使用者還沒有設定本地密碼,請使用建立帳號時使用的驗證方式登入。", + "Auth.form.error.password.matching": "密碼不符", "Auth.form.error.password.provide": "請輸入您的密碼", - "Auth.form.error.user.not-exist": "這個 Email 不存在", + "Auth.form.error.ratelimit": "過多請求,請稍後再試。", + "Auth.form.error.user.not-exist": "這個電子郵件地址不存在", "Auth.form.error.username.taken": "使用者名稱已被使用", - "Auth.form.forgot-password.email.label": "輸入您的 Email", - "Auth.form.forgot-password.email.label.success": "成功寄出 Email", + "Auth.form.forgot-password.email.label": "輸入您的電子郵件地址", + "Auth.form.forgot-password.email.label.success": "郵件成功寄出", "Auth.form.forgot-password.email.placeholder": "mysuperemail@gmail.com", "Auth.form.header.forgot-password": "strapi", "Auth.form.header.login": "strapi", @@ -30,112 +33,120 @@ "Auth.form.login.rememberMe.label": "記住我", "Auth.form.login.username.label": "使用者名稱", "Auth.form.login.username.placeholder": "John Doe", - "Auth.form.register-success.email.label": "Email 成功寄出", + "Auth.form.register-success.email.label": "郵件成功寄出", "Auth.form.register-success.email.placeholder": "mysuperemail@gmail.com", "Auth.form.register.confirmPassword.label": "確認密碼", "Auth.form.register.email.label": "Email", "Auth.form.register.email.placeholder": "johndoe@gmail.com", + "Auth.form.register.news.label": "當有新功能及改進時通知我。", "Auth.form.register.password.label": "密碼", "Auth.form.register.username.label": "使用者名稱", "Auth.form.register.username.placeholder": "John Doe", - "Auth.header.register.description": "為了完成設定,請創建第一個使用者 (最高權限),請填寫以下欄位。", - "Auth.link.forgot-password": "忘記密碼?", + "Auth.header.register.description": "為了完成設定,請填寫以下欄位以建立第一個最高權限管理者。", + "Auth.link.forgot-password": "忘記密碼了嗎?", "Auth.link.ready": "準備登入了嗎?", "BoundRoute.title": "綁定路徑到", "Controller.input.label": "{label} ", "Controller.selectAll": "全選", - "EditForm.inputSelect.description.role": "It will attach the new authenticated user to the selected role.", + "EditForm.inputSelect.description.role": "將新的驗證使用者加入此身份。", "EditForm.inputSelect.durations.description": "每小時使用者訂閱失敗的數量", "EditForm.inputSelect.durations.label": "時間", - "EditForm.inputSelect.label.role": "Default role for authenticated users", - "EditForm.inputSelect.subscriptions.description": "限制每個 IP 每小時訂閱", - "EditForm.inputSelect.subscriptions.label": "管理訂閱點數", - "EditForm.inputToggle.description.email": "禁止使用者用同一個 Email + 不同的供應商註冊多個帳號", - "EditForm.inputToggle.description.sign-up": "當停用,註冊將被禁止,不管用什麼供應商都沒有人可以訂閱。", - "EditForm.inputToggle.label.email": "一個帳號一個 Email", + "EditForm.inputSelect.label.role": "驗證使用者預設身份", + "EditForm.inputSelect.subscriptions.description": "限制 IP 每小時請求數", + "EditForm.inputSelect.subscriptions.label": "管理請求量", + "EditForm.inputToggle.description.email": "禁止使用者使用同一個電子郵件地址 + 不同的驗證方式註冊多個帳號", + "EditForm.inputToggle.description.email-confirmation": "當啟用後,新註冊的使用者將會收到一封認證郵件。", + "EditForm.inputToggle.description.email-confirmation-redirection": "認證完後後,使用者被重新導向的網址。", + "EditForm.inputToggle.description.sign-up": "當停用後,不論使用任何驗證方式使用者將無法註冊。", + "EditForm.inputToggle.label.email": "電子郵件地址單一帳號限制", + "EditForm.inputToggle.label.email-confirmation": "啟用電子郵件地址驗證", + "EditForm.inputToggle.label.email-confirmation-redirection": "重新導向網址", "EditForm.inputToggle.label.sign-up": "啟用註冊", "EditPage.cancel": "取消", - "EditPage.form.roles": "規則細節", + "EditPage.form.roles": "身份詳細資料", "EditPage.form.roles.label.description": "說明", "EditPage.form.roles.label.name": "名稱", - "EditPage.form.roles.label.users": "和這個規則有關的使用者 ({number})", - "EditPage.form.roles.name.error": "這個數值必填", + "EditPage.form.roles.label.users": "和這個身份有關的使用者 ({number})", + "EditPage.form.roles.name.error": "必填數值", "EditPage.header.description": "{description} ", "EditPage.header.description.create": " ", "EditPage.header.title": "{name} ", - "EditPage.header.title.create": "創建一個規則", + "EditPage.header.title.create": "建立一個身份", "EditPage.notification.permissions.error": "讀取權限時發生錯誤", "EditPage.notification.policies.error": "讀取政策時發生錯誤", - "EditPage.notification.role.error": "讀取規則時發生錯誤", + "EditPage.notification.role.error": "讀取身份時發生錯誤", "EditPage.submit": "儲存", + "Email.template.email_confirmation": "電子郵件地址認證", "Email.template.reset_password": "重設密碼", "Email.template.success_register": "註冊成功", - "Email.template.validation_email": "Email 認證", "HeaderNav.link.advancedSettings": "進階設定", - "HeaderNav.link.emailTemplates": "Email 範本", - "HeaderNav.link.providers": "供應商", - "HeaderNav.link.roles": "規則", - "HomePage.header.description": "為您的使用者設定規則和權限", + "HeaderNav.link.emailTemplates": "郵件範本", + "HeaderNav.link.providers": "驗證方式", + "HeaderNav.link.roles": "身份", + "HomePage.header.description": "為您的使用者設定身份和權限", "HomePage.header.title": "使用者 & 權限", "InputSearch.placeholder": "搜尋使用者", - "List.button.providers": "增加新的供應商", - "List.button.roles": "增加新規則", - "List.title.emailTemplates.plural": "{number} 個 Email 範本可用", - "List.title.emailTemplates.singular": "{number} 個 Email 範本可用", + "List.button.providers": "增加新的驗證方式", + "List.button.roles": "增加新身份", + "List.title.emailTemplates.plural": "{number} 個郵件範本可用", + "List.title.emailTemplates.singular": "{number} 個郵件範本可用", "List.title.providers.disabled.plural": "{number} 已停用", "List.title.providers.disabled.singular": "{number} 已停用", - "List.title.providers.enabled.plural": "{number} 個供應商已啟動", - "List.title.providers.enabled.singular": "{number} 個供應商已啟動", - "List.title.roles.plural": "{number} 個可用規則", - "List.title.roles.singular": "{number} 個可用規則", - "Plugin.permissions.application.description": "定義您所有專案可用的動作", - "Plugin.permissions.plugins.description": "為 {name} 擴充功能定義所有可用的動作", - "Plugins.header.description": "只有路徑綁定的動作顯示在下面", + "List.title.providers.enabled.plural": "{number} 個驗證方式已啟動", + "List.title.providers.enabled.singular": "{number} 個驗證方式已啟動", + "List.title.roles.plural": "{number} 個可用身份", + "List.title.roles.singular": "{number} 個可用身份", + "Plugin.permissions.application.description": "定義您專案中所有可用的操作", + "Plugin.permissions.plugins.description": "為 {name} 擴充功能定義所有可用的操作", + "Plugins.header.description": "只有綁定路徑的操作會顯示在下方", "Plugins.header.title": "權限", "Policies.InputSelect.empty": "無", - "Policies.InputSelect.label": "授權這個動作:", - "Policies.header.hint": "選取應用程式或擴充功能的動作然後點擊齒輪 Icon 來顯示綁定路徑", + "Policies.InputSelect.label": "限制此操作:", + "Policies.header.hint": "選取應用程式或擴充功能的操作然後點擊齒輪圖示以顯示綁定路徑", "Policies.header.title": "進階設定", - "PopUpForm.Email.email_templates.inputDescription": "如果您不確定要怎麼使用變數 {link}", - "PopUpForm.Email.link.documentation": "查詢我們的文件", - "PopUpForm.Email.options.from.email.label": "寄件人 Email", + "PopUpForm.Email.email_templates.inputDescription": "如果您不確定要怎麼使用變數,請 {link}", + "PopUpForm.Email.link.documentation": "閱讀我們的文件", + "PopUpForm.Email.options.from.email.label": "寄件人地址", "PopUpForm.Email.options.from.email.placeholder": "johndoe@gmail.com", "PopUpForm.Email.options.from.name.label": "寄件人名稱", "PopUpForm.Email.options.from.name.placeholder": "John Doe", "PopUpForm.Email.options.message.label": "訊息", - "PopUpForm.Email.options.object.label": "主題", - "PopUpForm.Email.options.response_email.label": "回覆 Email", + "PopUpForm.Email.options.object.label": "主旨", + "PopUpForm.Email.options.response_email.label": "回覆地址", "PopUpForm.Email.options.response_email.placeholder": "johndoe@gmail.com", - "PopUpForm.Email.reset_password.options.message.placeholder": "

請點這個連結來認證您的 Email

", - "PopUpForm.Email.reset_password.options.object.placeholder": "請確認這個 %APP_NAME% Email 正不正確", - "PopUpForm.Email.success_register.options.message.placeholder": "

請點這個連結來認證您的 Email

", - "PopUpForm.Email.success_register.options.object.placeholder": "請確認這個 %APP_NAME% Email 正不正確", - "PopUpForm.Email.validation_email.options.message.placeholder": "

請點這個連結來認證您的 Email

", - "PopUpForm.Email.validation_email.options.object.placeholder": "請確認這個 %APP_NAME% Email 正不正確", + "PopUpForm.Email.reset_password.options.message.placeholder": "

請點擊這個連結以認證您的電子郵件地址

", + "PopUpForm.Email.reset_password.options.object.placeholder": "請確認這個 %APP_NAME% 地址正不正確", + "PopUpForm.Email.success_register.options.message.placeholder": "

請點擊這個連結以認證您的電子郵件地址

", + "PopUpForm.Email.success_register.options.object.placeholder": "請確認這個 %APP_NAME% 地址正不正確", + "PopUpForm.Email.validation_email.options.message.placeholder": "

請點擊這個連結以認證您的電子郵件地址

", + "PopUpForm.Email.validation_email.options.object.placeholder": "請確認這個 %APP_NAME% 地址正不正確", "PopUpForm.Providers.callback.placeholder": "TEXT", - "PopUpForm.Providers.enabled.description": "如果停用,使用者將無法使用這個供應商", - "PopUpForm.Providers.enabled.label": "啟動", - "PopUpForm.Providers.facebook.providerConfig.redirectURL": "您應用程式的網址在 Facebook 的設定", - "PopUpForm.Providers.github.providerConfig.redirectURL": "您應用程式的網址在 GitHub 的設定", - "PopUpForm.Providers.google.providerConfig.redirectURL": "您應用程式的網址在 Google 的設定", - "PopUpForm.Providers.key.label": "Client ID", + "PopUpForm.Providers.discord.providerConfig.redirectURL": "在 Discord 的設定中填入的重新導向網址", + "PopUpForm.Providers.enabled.description": "如果停用,使用者將無法使用這個驗證方式", + "PopUpForm.Providers.enabled.label": "啟用", + "PopUpForm.Providers.facebook.providerConfig.redirectURL": "在 Facebook 的設定中填入的重新導向網址", + "PopUpForm.Providers.github.providerConfig.redirectURL": "在 GitHub 的設定中填入的重新導向網址", + "PopUpForm.Providers.google.providerConfig.redirectURL": "在 Google 的設定中填入的重新導向網址", + "PopUpForm.Providers.key.label": "客戶端 ID", "PopUpForm.Providers.key.placeholder": "TEXT", - "PopUpForm.Providers.linkedin2.providerConfig.redirectURL": "您應用程式的網址在 Linkedin 的設定", - "PopUpForm.Providers.redirectURL.front-end.label": "您應用程式的網址", - "PopUpForm.Providers.secret.label": "Client Secret", + "PopUpForm.Providers.linkedin2.providerConfig.redirectURL": "在 Linkedin 的設定中填入的重新導向網址", + "PopUpForm.Providers.microsoft.providerConfig.redirectURL": "在 Microsoft 的設定中填入的重新導向網址", + "PopUpForm.Providers.redirectURL.front-end.label": "您應用程式的前端頁面網址", + "PopUpForm.Providers.secret.label": "客戶端密鑰", "PopUpForm.Providers.secret.placeholder": "TEXT", - "PopUpForm.Providers.twitter.providerConfig.redirectURL": "您應用程式的網址在 Twitter 的設定", + "PopUpForm.Providers.twitter.providerConfig.redirectURL": "在 Twitter 的設定中填入的重新導向網址", "PopUpForm.button.cancel": "取消", "PopUpForm.button.save": "儲存", - "PopUpForm.header.add.providers": "新增供應商", - "PopUpForm.header.edit.email-templates": "編輯 Email 範本", - "PopUpForm.header.edit.providers": "編輯 {provider} 供應商", - "PopUpForm.inputSelect.providers.label": "選擇供應商", - "components.Input.error.password.noMatch": "密碼不相符", + "PopUpForm.header.add.providers": "新增驗證方式", + "PopUpForm.header.edit.email-templates": "編輯郵件範本", + "PopUpForm.header.edit.providers": "編輯 {provider} 驗證方式", + "PopUpForm.inputSelect.providers.label": "選擇驗證方式", + "components.Input.error.password.noMatch": "密碼不符", + "components.Input.error.password.length": "密碼長度過短", "notification.error.delete": "刪除項目時發生錯誤", "notification.error.fetch": "讀取資料時發生錯誤", "notification.error.fetchUser": "讀取使用者資料時發生錯誤", - "notification.info.emailSent": "Email 已寄出", + "notification.info.emailSent": "郵件已寄出", "notification.success.delete": "項目已刪除", "notification.success.submit": "設定已更新", "plugin.description.long": "使用 JWT 認證保護您的 API。這個擴充功能也使用 ACL 來讓你管理不同群組使用者的權限。", diff --git a/packages/strapi-plugin-users-permissions/config/queries/bookshelf.js b/packages/strapi-plugin-users-permissions/config/queries/bookshelf.js index 860ac31e09..7ca7e422cd 100644 --- a/packages/strapi-plugin-users-permissions/config/queries/bookshelf.js +++ b/packages/strapi-plugin-users-permissions/config/queries/bookshelf.js @@ -3,14 +3,23 @@ const _ = require('lodash'); module.exports = { find: async function (params = {}, populate) { - const hook = strapi.hook[this.orm]; - const records = await this.query((qb) => { - // Generate match stage. - hook.load().generateMatchStage(qb)(this, params); - - if (_.has(params, 'start')) qb.offset(params.start); - if (_.has(params, 'limit')) qb.limit(params.limit); - if (!_.isEmpty(params.sort)) { + const records = await this.query(function(qb) { + _.forEach(params.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 (params.start) { + qb.offset(params.start); + } + if (params.limit) { + qb.limit(params.limit); + } + if (params.sort) { if (params.sort.key) { qb.orderBy(params.sort.key, params.sort.order); } else { diff --git a/packages/strapi-plugin-users-permissions/config/queries/mongoose.js b/packages/strapi-plugin-users-permissions/config/queries/mongoose.js index 88e988ed95..53ce2cd17a 100644 --- a/packages/strapi-plugin-users-permissions/config/queries/mongoose.js +++ b/packages/strapi-plugin-users-permissions/config/queries/mongoose.js @@ -1,22 +1,14 @@ const _ = require('lodash'); -const { models: { mergeStages } } = require('strapi-utils'); - module.exports = { - find: async function (filters = {}, populate) { - const hook = strapi.hook[this.orm]; - // Generate stages. - const populateStage = hook.load().generateLookupStage(this, { whitelistedPopulate: populate }); // Nested-Population - const matchStage = hook.load().generateMatchStage(this, filters); // Nested relation filter - const aggregateStages = mergeStages(populateStage, matchStage); - - const result = this.aggregate(aggregateStages); - - if (_.has(filters, 'start')) result.skip(filters.start); - if (_.has(filters, 'limit')) result.limit(filters.limit); - if (_.has(filters, 'sort')) result.sort(filters.sort); - - return result; + find: async function (params = {}, populate) { + return this + .find(params.where) + .limit(Number(params.limit)) + .sort(params.sort) + .skip(Number(params.skip)) + .populate(populate || this.associations.map(x => x.alias).join(' ')) + .lean(); }, count: async function (params = {}) { diff --git a/packages/strapi-plugin-users-permissions/controllers/User.js b/packages/strapi-plugin-users-permissions/controllers/User.js index 3f31a0701f..b76d7e6706 100644 --- a/packages/strapi-plugin-users-permissions/controllers/User.js +++ b/packages/strapi-plugin-users-permissions/controllers/User.js @@ -164,8 +164,6 @@ module.exports = { destroy: async (ctx) => { const data = await strapi.plugins['users-permissions'].services.user.remove(ctx.params); - console.log(data); - // Send 200 `ok` ctx.send(data); }, diff --git a/packages/strapi-plugin-users-permissions/models/User.settings.json b/packages/strapi-plugin-users-permissions/models/User.settings.json index 2ecac99d65..665465f2dd 100644 --- a/packages/strapi-plugin-users-permissions/models/User.settings.json +++ b/packages/strapi-plugin-users-permissions/models/User.settings.json @@ -48,10 +48,6 @@ "via": "users", "plugin": "users-permissions", "configurable": false - }, - "products": { - "collection": "product", - "via": "users" } } } \ No newline at end of file diff --git a/packages/strapi-plugin-users-permissions/package.json b/packages/strapi-plugin-users-permissions/package.json index d6616575cd..a58d66451d 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Protect your API with a full-authentication process based on JWT", "strapi": { "name": "Roles & Permissions", @@ -29,11 +29,11 @@ "koa2-ratelimit": "^0.6.1", "purest": "^2.0.1", "request": "^2.83.0", - "strapi-utils": "3.0.0-alpha.14.5", + "strapi-utils": "3.0.0-alpha.16", "uuid": "^3.1.0" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.14.5" + "strapi-helper-plugin": "3.0.0-alpha.16" }, "author": { "name": "Strapi team", @@ -52,8 +52,8 @@ "url": "git://github.com/strapi/strapi.git" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.0.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-plugin-users-permissions/services/User.js b/packages/strapi-plugin-users-permissions/services/User.js index 4ce1947567..56f4cb63f0 100644 --- a/packages/strapi-plugin-users-permissions/services/User.js +++ b/packages/strapi-plugin-users-permissions/services/User.js @@ -74,7 +74,6 @@ module.exports = { */ fetchAll: (params) => { - console.log("PARAMS USER", strapi.utils.models.convertParams('user', params)); return strapi.query('user', 'users-permissions').find(strapi.utils.models.convertParams('user', params)); }, diff --git a/packages/strapi-provider-email-amazon-ses/package.json b/packages/strapi-provider-email-amazon-ses/package.json index bd0b308c13..4166914947 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Amazon SES provider for strapi email", "homepage": "http://strapi.io", "keywords": [ @@ -35,8 +35,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-provider-email-mailgun/package.json b/packages/strapi-provider-email-mailgun/package.json index e3a5c23561..3a303e02ad 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Mailgun provider for strapi email plugin", "homepage": "http://strapi.io", "keywords": [ @@ -38,8 +38,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-provider-email-sendgrid/package.json b/packages/strapi-provider-email-sendgrid/package.json index bda2fe3145..2b702ea5ed 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Sendgrid provider for strapi email", "homepage": "http://strapi.io", "keywords": [ @@ -38,8 +38,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-provider-email-sendmail/package.json b/packages/strapi-provider-email-sendmail/package.json index f4fa0cdd19..65e6fd67db 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Sendmail provider for strapi email", "homepage": "http://strapi.io", "keywords": [ @@ -37,8 +37,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-provider-upload-aws-s3/package.json b/packages/strapi-provider-upload-aws-s3/package.json index 0b6b9a6a07..cabf696b29 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "AWS S3 provider for strapi upload", "homepage": "http://strapi.io", "keywords": [ @@ -39,8 +39,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-provider-upload-cloudinary/lib/index.js b/packages/strapi-provider-upload-cloudinary/lib/index.js index f17d51d690..0b3715dca4 100644 --- a/packages/strapi-provider-upload-cloudinary/lib/index.js +++ b/packages/strapi-provider-upload-cloudinary/lib/index.js @@ -37,7 +37,7 @@ module.exports = { return { upload (file) { return new Promise((resolve, reject) => { - const upload_stream = cloudinary.uploader.upload_stream({}, (err, image) => { + const upload_stream = cloudinary.uploader.upload_stream({ resource_type: "auto" }, (err, image) => { if (err) { return reject(err); } diff --git a/packages/strapi-provider-upload-cloudinary/package.json b/packages/strapi-provider-upload-cloudinary/package.json index 8b448dd016..0b4cb4ba63 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Cloudinary provider for strapi upload", "homepage": "http://strapi.io", "keywords": [ @@ -39,8 +39,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-provider-upload-local/package.json b/packages/strapi-provider-upload-local/package.json index f20fbd8f83..2c2c55b125 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Local provider for strapi upload", "homepage": "http://strapi.io", "keywords": [ @@ -35,8 +35,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi-provider-upload-rackspace/package.json b/packages/strapi-provider-upload-rackspace/package.json index 923773db82..4582e36e36 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-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Rackspace provider for strapi upload", "main": "./lib", "scripts": { diff --git a/packages/strapi-utils/lib/models.js b/packages/strapi-utils/lib/models.js index c718bacd5e..da988e1e98 100644 --- a/packages/strapi-utils/lib/models.js +++ b/packages/strapi-utils/lib/models.js @@ -9,10 +9,11 @@ const path = require('path'); // Public node modules. const _ = require('lodash'); -const pluralize = require('pluralize'); -// Constants -const ORDERS = ['ASC', 'DESC']; +// Following this discussion https://stackoverflow.com/questions/18082/validate-decimal-numbers-in-javascript-isnumeric this function is the best implem to determine if a value is a valid number candidate +const isNumeric = (value) => { + return !_.isObject(value) && !isNaN(parseFloat(value)) && isFinite(value); +}; /* eslint-disable prefer-template */ /* @@ -308,16 +309,6 @@ module.exports = { return _.get(strapi.models, collectionIdentity.toLowerCase() + '.orm'); }, - /** - * Return table name for a collection many-to-many - */ - getCollectionName: (associationA, associationB) => { - return [associationA, associationB] - .sort((a, b) => a.collection < b.collection ? -1 : 1) - .map(table => _.snakeCase(`${pluralize.plural(table.collection)} ${pluralize.plural(table.via)}`)) - .join('__'); - }, - /** * Define associations key to models */ @@ -347,7 +338,7 @@ module.exports = { // Build associations object if (association.hasOwnProperty('collection') && association.collection !== '*') { - const ast = { + definition.associations.push({ alias: key, type: 'collection', collection: association.collection, @@ -357,13 +348,7 @@ module.exports = { dominant: details.dominant !== true, plugin: association.plugin || undefined, filter: details.filter, - }; - - if (infos.nature === 'manyToMany' && definition.orm === 'bookshelf') { - ast.tableCollectionName = this.getCollectionName(association, details); - } - - definition.associations.push(ast); + }); } else if (association.hasOwnProperty('model') && association.model !== '*') { definition.associations.push({ alias: key, @@ -431,32 +416,9 @@ module.exports = { return _.findKey(strapi.models[association.model || association.collection].attributes, {via: attribute}); }, - mergeStages: (...stages) => { - return _.unionWith(...stages, _.isEqual); - }, - - convertParams: function (entity, params) { - const { model, models, convertor, postProcessValue } = this.prepareStage( - entity, - params - ); - - const _filter = this.splitPrimitiveAndRelationValues(params); - - // Execute Steps in the given order - return _.flow([ - this.processValues({ model, models, convertor, postProcessValue }), - this.processPredicates({ model, models, convertor }), - this.processGeneratedResults(), - this.mergeWhereAndRelationPayloads() - ])(_filter); - }, - - prepareStage: function (entity, params) { + convertParams: (entity, params) => { if (!entity) { - throw new Error( - 'You can\'t call the convert params method without passing the model\'s name as a first argument.' - ); + throw new Error('You can\'t call the convert params method without passing the model\'s name as a first argument.'); } // Remove the source params (that can be sent from the ctm plugin) since it is not a filter @@ -464,229 +426,84 @@ module.exports = { delete params.source; } - const modelName = entity.toLowerCase(); - const models = this.getStrapiModels(); - const model = models[modelName]; + const model = entity.toLowerCase(); - if (!model) { - throw new Error(`The model ${modelName} can't be found.`); + const models = _.assign(_.clone(strapi.models), Object.keys(strapi.plugins).reduce((acc, current) => { + _.assign(acc, _.get(strapi.plugins[current], ['models'], {})); + return acc; + }, {})); + + if (!models.hasOwnProperty(model)) { + return this.log.error(`The model ${model} can't be found.`); } - if (!model.orm) { - throw new Error( - `Impossible to determine the ORM used for the model ${modelName}.` - ); + const client = models[model].client; + const connector = models[model].orm; + + if (!connector) { + throw new Error(`Impossible to determine the ORM used for the model ${model}.`); } - const hook = strapi.hook[model.orm]; - const convertor = hook.load().getQueryParams; - const postProcessValue = hook.load().postProcessValue || _.identity; - - return { - models, - model, - hook, - convertor, - postProcessValue, + const convertor = strapi.hook[connector].load().getQueryParams; + const convertParams = { + where: {}, + sort: '', + start: 0, + limit: 100 }; - }, - getStrapiModels: function() { - return { - ...strapi.models, - ...Object.keys(strapi.plugins).reduce( - (acc, pluginName) => ({ - ...acc, - ..._.get(strapi.plugins[pluginName], 'models', {}), - }), - {} - ), - }; - }, - - splitPrimitiveAndRelationValues: function(_query) { - const result = _.reduce( - _query, - (acc, value, key) => { - if (_.startsWith(key, '_')) { - acc[key] = value; - } else if (!_.includes(key, '.')) { - acc.where[key] = value; - } else { - _.set(acc.relations, this.injectRelationInKey(key), value); + _.forEach(params, (value, key) => { + let result; + let formattedValue; + let modelAttributes = models[model]['attributes']; + let fieldType; + // Get the field type to later check if it's a string before number conversion + if (modelAttributes[key]) { + fieldType = modelAttributes[key]['type']; + } else { + // Remove the filter keyword at the end + let splitKey = key.split('_').slice(0,-1); + splitKey = splitKey.join('_'); + if (modelAttributes[splitKey]) { + fieldType = modelAttributes[splitKey]['type']; } - return acc; - }, - { - where: {}, - relations: {}, - sort: '', - start: 0, - limit: 100, } - ); - return result; - }, + // Check if the value is a valid candidate to be converted to a number value + if (fieldType !== 'string') { + formattedValue = isNumeric(value) + ? _.toNumber(value) + : value; + } else { + formattedValue = value; + } - injectRelationInKey: function (key) { - const numberOfRelations = key.match(/\./gi).length - 1; - const relationStrings = _.times(numberOfRelations, _.constant('relations')); - return _.chain(key) - .split('.') - .zip(relationStrings) - .flatten() - .compact() - .join('.') - .value(); - }, + if (_.includes(['_start', '_limit'], key)) { + result = convertor(formattedValue, key); + } else if (key === '_sort') { + const [attr, order = 'ASC'] = formattedValue.split(':'); + result = convertor(order, key, attr); + } else { + const suffix = key.split('_'); + // Mysql stores boolean as 1 or 0 + if (client === 'mysql' && _.get(models, [model, 'attributes', suffix, 'type']) === 'boolean') { + formattedValue = value === 'true' ? '1' : '0'; + } - transformFilter: function (filter, iteratee) { - if (!_.isArray(filter) && !_.isPlainObject(filter)) { - return filter; - } + let type; - return _.transform(filter, (updatedFilter, value, key) => { - const updatedValue = iteratee(value, key); - updatedFilter[key] = this.transformFilter(updatedValue, iteratee); - return updatedFilter; + if (_.includes(['ne', 'lt', 'gt', 'lte', 'gte', 'contains', 'containss', 'in'], _.last(suffix))) { + type = `_${_.last(suffix)}`; + key = _.dropRight(suffix).join('_'); + } else { + type = '='; + } + + result = convertor(formattedValue, type, key); + } + + _.set(convertParams, result.key, result.value); }); - }, - processValues: function ({ model, models, convertor, postProcessValue }) { - return filter => { - let parentModel = model; - return this.transformFilter(filter, (value, key) => { - const field = this.getFieldFromKey(key, parentModel); - if (!field) { - return this.processMeta(value, key, { - field, - client: model.client, - model, - convertor, - }); - } - if (field.collection || field.model) { - parentModel = models[field.collection || field.model]; - } - return postProcessValue( - this.processValue(value, key, { field, client: model.client, model }) - ); - }); - }; - }, - - getFieldFromKey: function (key, model) { - let field; - // Primary key is a unique case because it doesn't belong to the model's attributes - if (key === model.primaryKey) { - field = { - type: 'ID', // Just in case - }; - } else if (model.attributes[key]) { - field = model.attributes[key]; - } else if (typeof key === 'string') { - // Remove the filter keyword at the end - let splitKey = key.split('_').slice(0, -1); - splitKey = splitKey.join('_'); - - if (model.attributes[splitKey]) { - field = model.attributes[splitKey]; - } - } - - return field; - }, - - processValue: function (value, key, { field, client }) { - if (field.type === 'boolean' && client === 'mysql') { - return value === 'true' ? '1' : '0'; - } - - return value; - }, - - processMeta: function (value, key, { convertor, model }) { - if (_.includes(['_start', '_limit', '_populate'], key)) { - return convertor(value, key); - } else if (key === '_sort') { - return this.processSortMeta(value, key, { convertor, model }); - } - - return value; - }, - - processSortMeta: function (value, key, { convertor, model }) { - const [attr, order = 'ASC'] = value.split(':'); - if (!_.includes(ORDERS, order)) { - throw new Error( - `Unkown order value: "${order}", available values are: ${ORDERS.join( - ', ' - )}` - ); - } - - const field = this.getFieldFromKey(attr, model); - if (!field) { - throw new Error(`Unkown field: "${attr}"`); - } - - return convertor(order, key, attr); - }, - - processPredicates: function ({ model, models, convertor }) { - return filter => { - let parentModel = model; - return this.transformFilter(filter, (value, key) => { - const field = this.getFieldFromKey(key, parentModel); - if (!field) { - return value; - } - if (field.collection || field.model) { - parentModel = models[field.collection || field.model]; - } - return this.processCriteriaMeta(value, key, { convertor }); - }); - }; - }, - - processCriteriaMeta: function (value, key, { convertor }) { - let type = '='; - if (key.match(/_{1}(?:ne|lte?|gte?|containss?|in)/)) { - type = key.match(/_{1}(?:ne|lte?|gte?|containss?|in)/)[0]; - key = key.replace(type, ''); - } - return convertor(value, type, key); - }, - - processGeneratedResults: function() { - return filter => { - if (!_.isArray(filter) && !_.isPlainObject(filter)) { - return filter; - } - - return _.transform(filter, (updatedFilter, value, key) => { - // Only set results for object of shape { value, key } - if (_.has(value, 'value') && _.has(value, 'key')) { - const cleanKey = _.replace(value.key, 'where.', ''); - _.set(updatedFilter, cleanKey, this.processGeneratedResults()(value.value)); - } else { - updatedFilter[key] = this.processGeneratedResults()(value); - } - - return updatedFilter; - }); - }; - }, - - mergeWhereAndRelationPayloads: function() { - return filter => { - return { - ...filter, // Normally here we need to omit where key - relations: { - ...filter.where, - relations: filter.relations - } - }; - }; + return convertParams; } }; diff --git a/packages/strapi-utils/package.json b/packages/strapi-utils/package.json index cab3d191fa..4dc3ce5996 100644 --- a/packages/strapi-utils/package.json +++ b/packages/strapi-utils/package.json @@ -1,6 +1,6 @@ { "name": "strapi-utils", - "version": "3.0.0-alpha.14.5", + "version": "3.0.0-alpha.16", "description": "Shared utilities for the Strapi packages", "homepage": "http://strapi.io", "keywords": [ @@ -23,7 +23,6 @@ "knex": "^0.13.0", "lodash": "^4.17.5", "pino": "^4.7.1", - "pluralize": "^7.0.0", "shelljs": "^0.7.7" }, "author": { @@ -46,8 +45,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/strapi/package.json b/packages/strapi/package.json index 31f39eea73..bd4b46ebb1 100644 --- a/packages/strapi/package.json +++ b/packages/strapi/package.json @@ -1,6 +1,6 @@ { "name": "strapi", - "version": "3.0.0-alpha.14.5", + "version": "3.0.0-alpha.16", "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.5", - "strapi-generate-admin": "3.0.0-alpha.14.5", - "strapi-generate-api": "3.0.0-alpha.14.5", - "strapi-generate-controller": "3.0.0-alpha.14.5", - "strapi-generate-model": "3.0.0-alpha.14.5", - "strapi-generate-new": "3.0.0-alpha.14.5", - "strapi-generate-plugin": "3.0.0-alpha.14.5", - "strapi-generate-policy": "3.0.0-alpha.14.5", - "strapi-generate-service": "3.0.0-alpha.14.5", - "strapi-utils": "3.0.0-alpha.14.5" + "strapi-generate": "3.0.0-alpha.16", + "strapi-generate-admin": "3.0.0-alpha.16", + "strapi-generate-api": "3.0.0-alpha.16", + "strapi-generate-controller": "3.0.0-alpha.16", + "strapi-generate-model": "3.0.0-alpha.16", + "strapi-generate-new": "3.0.0-alpha.16", + "strapi-generate-plugin": "3.0.0-alpha.16", + "strapi-generate-policy": "3.0.0-alpha.16", + "strapi-generate-service": "3.0.0-alpha.16", + "strapi-utils": "3.0.0-alpha.16" }, "author": { "email": "hi@strapi.io", @@ -89,8 +89,8 @@ "url": "https://github.com/strapi/strapi/issues" }, "engines": { - "node": ">= 9.0.0", - "npm": ">= 5.3.0" + "node": ">= 10.0.0", + "npm": ">= 6.0.0" }, "preferGlobal": true, "license": "MIT" From ebf9cfdcaa0b6536927af460ea219bfcf3aa6a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Thu, 6 Dec 2018 18:23:56 +0100 Subject: [PATCH 15/36] Handle one-to-many case --- .../strapi-plugin-graphql/services/Loaders.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js index 72885ee38e..1c59ed1811 100644 --- a/packages/strapi-plugin-graphql/services/Loaders.js +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -66,7 +66,9 @@ module.exports = { })(); if (!_.isArray(ids)) { - return data.filter(entry => entry[ids.alias].toString() === ids.value.toString()).slice(query.options.start, query.options.limit); + return data + .filter(entry => entry[ids.alias].toString() === ids.value.toString()) + .slice((query.options.start || query.options.skip), (query.options.start || query.options.skip) + query.options.limit); } // Critical: don't touch this part until you truly understand what you're doing. @@ -87,20 +89,24 @@ module.exports = { const ref = this.retrieveModel(model, query.options.source); // Construct parameters object sent to the Content Manager service. - // We are faking the `start` and `skip` argument because it doesn't make sense because we are merging different requests in one. + // We are faking the `start`, `skip` and `limit` argument because it doesn't make sense because we are merging different requests in one. // Note: we're trying to avoid useless populate for performances. Please be careful if you're updating this part. const params = { ...query.options, populate: ref.associations.filter(a => !a.dominant && _.isEmpty(a.model)).map(a => a.alias), query: {}, start: 0, - skip: 0 + skip: 0, + limit: 500, }; params.query[query.alias] = _.uniq(query.ids.filter(x => !_.isEmpty(x)).map(x => x.toString())); - // However, we're applying a limit based on the number of entries we've to fetch. - // We'll apply the real `skip`, `start` and `limit` parameters during the mapping above. - params.limit = params.query[query.alias].length; + + if (['id', '_id'].includes(query.alias)) { + // However, we're applying a limit based on the number of entries we've to fetch. + // We'll apply the real `skip`, `start` and `limit` parameters during the mapping above. + params.limit = params.query[query.alias].length; + } // Run query and remove duplicated ID. const request = await strapi.plugins['content-manager'].services['contentmanager'].fetchAll({ model }, params); From 53b195c91709cbf8e66e6b86506031439eb0efd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Thu, 6 Dec 2018 19:12:31 +0100 Subject: [PATCH 16/36] Avoid useless population --- .../strapi-generate-api/templates/mongoose/service.template | 2 +- packages/strapi-plugin-graphql/services/Query.js | 4 +++- packages/strapi-utils/lib/models.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/strapi-generate-api/templates/mongoose/service.template b/packages/strapi-generate-api/templates/mongoose/service.template index f5de552e9d..bf41c3a199 100644 --- a/packages/strapi-generate-api/templates/mongoose/service.template +++ b/packages/strapi-generate-api/templates/mongoose/service.template @@ -32,7 +32,7 @@ module.exports = { .sort(filters.sort) .skip(filters.start) .limit(filters.limit) - .populate(populate); + .populate(filters.populate || populate); }, /** diff --git a/packages/strapi-plugin-graphql/services/Query.js b/packages/strapi-plugin-graphql/services/Query.js index 46abf41d76..f4801c243a 100644 --- a/packages/strapi-plugin-graphql/services/Query.js +++ b/packages/strapi-plugin-graphql/services/Query.js @@ -258,10 +258,12 @@ module.exports = { // Resolver can be a function. Be also a native resolver or a controller's action. if (_.isFunction(resolver)) { - // options.populate = model.associations.filter(a => !a.dominant).map(a => a.alias); context.query = this.convertToParams(options); context.params = this.amountLimiting(options); + // Avoid population. + context.query._populate = model.associations.filter(a => !a.dominant && _.isEmpty(a.model)).map(a => a.alias); + if (isController) { const values = await resolver.call(null, ctx); diff --git a/packages/strapi-utils/lib/models.js b/packages/strapi-utils/lib/models.js index da988e1e98..73fa91c995 100644 --- a/packages/strapi-utils/lib/models.js +++ b/packages/strapi-utils/lib/models.js @@ -477,7 +477,7 @@ module.exports = { formattedValue = value; } - if (_.includes(['_start', '_limit'], key)) { + if (_.includes(['_start', '_limit', '_populate'], key)) { result = convertor(formattedValue, key); } else if (key === '_sort') { const [attr, order = 'ASC'] = formattedValue.split(':'); From e1079ce362be253dcef6770bd9072d2f37777d0d Mon Sep 17 00:00:00 2001 From: Paolo Ragone Date: Sat, 5 Jan 2019 09:51:06 +1300 Subject: [PATCH 17/36] Added comment so linting doesn't go crazy on generated service files --- .../strapi-generate-api/templates/bookshelf/service.template | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/strapi-generate-api/templates/bookshelf/service.template b/packages/strapi-generate-api/templates/bookshelf/service.template index c21d5f54a5..a0d1bc496d 100644 --- a/packages/strapi-generate-api/templates/bookshelf/service.template +++ b/packages/strapi-generate-api/templates/bookshelf/service.template @@ -1,3 +1,4 @@ +/* global <%= globalID %> */ 'use strict'; /** From 2df5ecae79bc109a2a7502eef07633be48a1827e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Sat, 5 Jan 2019 18:14:00 +0100 Subject: [PATCH 18/36] Reset loaders on every request to avoid wrong results coming from cache --- .../strapi-plugin-graphql/services/Loaders.js | 22 +++++++++++++++++-- .../strapi-plugin-graphql/services/Query.js | 5 +++++ .../services/Resolvers.js | 3 --- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js index 1c59ed1811..63a3b2f16f 100644 --- a/packages/strapi-plugin-graphql/services/Loaders.js +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -12,8 +12,26 @@ const DataLoader = require('dataloader'); module.exports = { loaders: {}, - createLoader: function(model) { - this.loaders[model] = new DataLoader(keys => { + initializeLoader: function() { + // Create loaders for each relational field (exclude core models). + Object.keys(strapi.models) + .filter(model => model !== 'core_store') + .forEach(model => { + (strapi.models[model].associations || []).forEach(association => this.createLoader(association.collection || association.model, association.plugin)); + }); + + // Reproduce the same pattern for each plugin. + Object.keys(strapi.plugins).forEach(plugin => { + Object.keys(strapi.plugins[plugin].models).forEach(model => { + (strapi.plugins[plugin].models[model].associations || []).forEach(association => this.createLoader(association.collection || association.model, association.plugin)); + }); + }); + }, + + createLoader: function(model, plugin) { + const name = plugin ? `${plugin}__${model}`: model; + + this.loaders[name] = new DataLoader(keys => { return new Promise(async (resolve, reject) => { try { // Extract queries from keys and merge similar queries. diff --git a/packages/strapi-plugin-graphql/services/Query.js b/packages/strapi-plugin-graphql/services/Query.js index f4801c243a..e096881f26 100644 --- a/packages/strapi-plugin-graphql/services/Query.js +++ b/packages/strapi-plugin-graphql/services/Query.js @@ -10,6 +10,8 @@ const _ = require('lodash'); const pluralize = require('pluralize'); const policyUtils = require('strapi-utils').policy; +const Loaders = require('./Loaders'); + module.exports = { /** * Convert parameters to valid filters parameters. @@ -256,6 +258,9 @@ module.exports = { return policy; } + // Initiliase loaders for this request. + Loaders.initializeLoader(); + // Resolver can be a function. Be also a native resolver or a controller's action. if (_.isFunction(resolver)) { context.query = this.convertToParams(options); diff --git a/packages/strapi-plugin-graphql/services/Resolvers.js b/packages/strapi-plugin-graphql/services/Resolvers.js index cd2800e4f3..849b7b9c80 100644 --- a/packages/strapi-plugin-graphql/services/Resolvers.js +++ b/packages/strapi-plugin-graphql/services/Resolvers.js @@ -362,9 +362,6 @@ module.exports = { default: } - // Create dynamic dataloader for query batching and caching. - Loaders.createLoader(association.collection || association.model, association.plugin); - _.merge(acc.resolver[globalId], { [association.alias]: async (obj, options) => { // eslint-disable-line no-unused-vars From 5df5933ec49f91ab450c30fbb35527ae51d616a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Mon, 14 Jan 2019 19:36:35 +0100 Subject: [PATCH 19/36] Fix loader name --- packages/strapi-plugin-graphql/services/Resolvers.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Resolvers.js b/packages/strapi-plugin-graphql/services/Resolvers.js index 849b7b9c80..b38e1ebfad 100644 --- a/packages/strapi-plugin-graphql/services/Resolvers.js +++ b/packages/strapi-plugin-graphql/services/Resolvers.js @@ -434,9 +434,11 @@ module.exports = { queryOpts.query.id.symbol = 'IN'; } + const loaderName = association.plugin ? `${association.plugin}__${params.model}`: params.model; + return association.model ? - Loaders.loaders[association.collection || association.model].load({ params, options: queryOpts, single: true }): - Loaders.loaders[association.collection || association.model].load({ options: queryOpts, association }); + Loaders.loaders[loaderName].load({ params, options: queryOpts, single: true }): + Loaders.loaders[loaderName].load({ options: queryOpts, association }); }, }); }); From 410d4ba7476a7f951b82fe060d5b6f0669e88d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Mon, 14 Jan 2019 19:54:46 +0100 Subject: [PATCH 20/36] Remove blank space --- .../strapi-plugin-content-manager/controllers/ContentManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-plugin-content-manager/controllers/ContentManager.js b/packages/strapi-plugin-content-manager/controllers/ContentManager.js index 2b74601141..7a580cf982 100644 --- a/packages/strapi-plugin-content-manager/controllers/ContentManager.js +++ b/packages/strapi-plugin-content-manager/controllers/ContentManager.js @@ -28,7 +28,7 @@ module.exports = { return; } - + // Default list with filters or not. ctx.body = await strapi.plugins['content-manager'].services['contentmanager'].fetchAll(ctx.params, ctx.request.query); }, From 332cfdacabc137b766505d3a8e02203913e85df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Tue, 15 Jan 2019 17:16:28 +0100 Subject: [PATCH 21/36] Apply PR's feedback --- .../strapi-plugin-graphql/services/Loaders.js | 63 ++++++++++++------- .../strapi-plugin-graphql/services/Query.js | 20 ++---- 2 files changed, 45 insertions(+), 38 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js index 63a3b2f16f..e1d823e0d8 100644 --- a/packages/strapi-plugin-graphql/services/Loaders.js +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -68,25 +68,17 @@ module.exports = { return data.find(entry => entry[ref.primaryKey].toString() === (query.params[ref.primaryKey] || '').toString()); } + // Generate constant for skip parameters. + // Note: we shouldn't support both way of doing this kind of things in the future. + const skip = query.options.start || query.options.skip; + // Extracting ids from original request to map with query results. - const ids = (() => { - if ( _.get(query.options, `query.${ref.primaryKey}`)) { - return _.get(query.options, `query.${ref.primaryKey}`); - } - - // Single object to retrieve (one-to-many). - const alias = _.first(Object.keys(query.options.query)); - - return { - alias, - value: _.get(query.options, `query.${alias}`) - }; - })(); + const ids = this.extractIds(query, ref); if (!_.isArray(ids)) { return data .filter(entry => entry[ids.alias].toString() === ids.value.toString()) - .slice((query.options.start || query.options.skip), (query.options.start || query.options.skip) + query.options.limit); + .slice(skip, skip + query.options.limit); } // Critical: don't touch this part until you truly understand what you're doing. @@ -95,10 +87,24 @@ module.exports = { return data .filter(entry => entry !== undefined) .filter(entry => ids.map(id => id.toString()).includes(entry[ref.primaryKey].toString())) - .slice((query.options.start || query.options.skip), (query.options.start || query.options.skip) + query.options.limit); + .slice(skip, skip + query.options.limit); }); }, + extractIds: (query, ref) => { + if ( _.get(query.options, `query.${ref.primaryKey}`)) { + return _.get(query.options, `query.${ref.primaryKey}`); + } + + // Single object to retrieve (one-to-many). + const alias = _.first(Object.keys(query.options.query)); + + return { + alias, + value: _.get(query.options, `query.${alias}`) + }; + }, + makeQuery: async function(model, query = {}) { if (_.isEmpty(query.ids)) { return []; @@ -109,13 +115,17 @@ module.exports = { // Construct parameters object sent to the Content Manager service. // We are faking the `start`, `skip` and `limit` argument because it doesn't make sense because we are merging different requests in one. // Note: we're trying to avoid useless populate for performances. Please be careful if you're updating this part. + const populate = ref.associations + .filter(association => !association.dominassociationnt && _.isEmpty(association.model)) + .map(association => association.alias); + const params = { ...query.options, - populate: ref.associations.filter(a => !a.dominant && _.isEmpty(a.model)).map(a => a.alias), + populate, query: {}, start: 0, skip: 0, - limit: 500, + limit: 100, }; params.query[query.alias] = _.uniq(query.ids.filter(x => !_.isEmpty(x)).map(x => x.toString())); @@ -145,6 +155,7 @@ module.exports = { keys.forEach((current, index) => { // Extract query options. + // Note: the `single` means that we've only one entry to fetch. const { single = false, params = {}, association } = current; const { query = {}, ...options } = current.options; @@ -154,13 +165,17 @@ module.exports = { // Find similar query. const indexQueries = queries.findIndex(query => _.isEqual(query.options, options)); - const ids = (() => { - if (single) { - return [params[ref.primaryKey]]; - } - - return _.isArray(query[ref.primaryKey]) ? query[ref.primaryKey] : [query[association.via]]; - })(); + // Generate array of IDs to fetch. + const ids = []; + + // Only one entry to fetch. + if (single) { + ids.push(params[ref.primaryKey]); + } else if (_.isArray(query[ref.primaryKey])) { + ids.push(...query[ref.primaryKey]); + } else { + ids.push(query[association.via]); + } if (indexQueries !== -1) { // Push to the same query the new IDs to fetch. diff --git a/packages/strapi-plugin-graphql/services/Query.js b/packages/strapi-plugin-graphql/services/Query.js index 23bf3d8e26..061c9e2160 100644 --- a/packages/strapi-plugin-graphql/services/Query.js +++ b/packages/strapi-plugin-graphql/services/Query.js @@ -167,7 +167,7 @@ module.exports = { return async (ctx, next) => { ctx.params = { ...params, - [model.primaryKey]: ctx.params.id, + [model.primaryKey]: ctx.query[model.primaryKey], }; // Return the controller. @@ -176,15 +176,7 @@ module.exports = { } // Plural. - return async (ctx, next) => { - ctx.params = this.amountLimiting(ctx.params); - ctx.query = Object.assign( - this.convertToParams(_.omit(ctx.params, 'where')), - ctx.params.where, - ); - - return controller(ctx, next); - }; + return controller; })(); // The controller hasn't been found. @@ -233,7 +225,7 @@ module.exports = { ); return async (obj, options = {}, { context }) => { - options = _.toPlainObject(options); + const _options = _.toPlainObject(options); // Hack to be able to handle permissions for each query. const ctx = Object.assign(_.clone(context), { @@ -263,8 +255,8 @@ module.exports = { // Resolver can be a function. Be also a native resolver or a controller's action. if (_.isFunction(resolver)) { - context.query = this.convertToParams(options); - context.params = this.amountLimiting(options); + context.query = this.convertToParams(_options); + context.params = this.amountLimiting(_options); // Avoid population. context.query._populate = model.associations.filter(a => !a.dominant && _.isEmpty(a.model)).map(a => a.alias); @@ -279,7 +271,7 @@ module.exports = { return values && values.toJSON ? values.toJSON() : values; } - return resolver.call(null, obj, options, context); + return resolver.call(null, obj, _options, context); } // Resolver can be a promise. From c8a0e517296c39e173a02f31510437ef835ef02a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Wed, 16 Jan 2019 12:24:29 +0100 Subject: [PATCH 22/36] Fix where constraint in GraphQL query --- .../strapi-plugin-graphql/services/Query.js | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Query.js b/packages/strapi-plugin-graphql/services/Query.js index 061c9e2160..e4804b7784 100644 --- a/packages/strapi-plugin-graphql/services/Query.js +++ b/packages/strapi-plugin-graphql/services/Query.js @@ -225,7 +225,7 @@ module.exports = { ); return async (obj, options = {}, { context }) => { - const _options = _.toPlainObject(options); + const _options = _.cloneDeep(options); // Hack to be able to handle permissions for each query. const ctx = Object.assign(_.clone(context), { @@ -255,11 +255,25 @@ module.exports = { // Resolver can be a function. Be also a native resolver or a controller's action. if (_.isFunction(resolver)) { - context.query = this.convertToParams(_options); - context.params = this.amountLimiting(_options); - - // Avoid population. - context.query._populate = model.associations.filter(a => !a.dominant && _.isEmpty(a.model)).map(a => a.alias); + // Note: we've to used the Object.defineProperties to reset the prototype. It seems that the cloning the context + // cause a lost of the Object prototype. + Object.defineProperties(ctx, { + query: { + value: { + ...this.convertToParams(_.omit(_options, 'where')), + ..._options.where, + // Avoid population. + _populate: model.associations.filter(a => !a.dominant && _.isEmpty(a.model)).map(a => a.alias), + }, + writable: true, + configurable: true + }, + params: { + value: this.convertToParams(this.amountLimiting(_options)), + writable: true, + configurable: true + } + }); if (isController) { const values = await resolver.call(null, ctx); @@ -271,7 +285,7 @@ module.exports = { return values && values.toJSON ? values.toJSON() : values; } - return resolver.call(null, obj, _options, context); + return resolver.call(null, obj, _options, ctx); } // Resolver can be a promise. From 37c942915ef09f3e0a435057fd06d23a57cb6510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abd=C3=B3n=20Rodr=C3=ADguez=20Davila?= Date: Wed, 16 Jan 2019 14:58:50 +0100 Subject: [PATCH 23/36] Avoid write files if production mode --- packages/strapi/lib/core/admin.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/strapi/lib/core/admin.js b/packages/strapi/lib/core/admin.js index 010bffe825..1e2f91aca1 100644 --- a/packages/strapi/lib/core/admin.js +++ b/packages/strapi/lib/core/admin.js @@ -58,13 +58,15 @@ module.exports = function() { $('body').attr('back', `/`); } - fs.writeFile(sourcePath, $.html(), (err) => { - if (err) { - return reject(err); - } + if (!strapi.config.currentEnvironment.server.production) { + fs.writeFile(sourcePath, $.html(), (err) => { + if (err) { + return reject(err); + } - resolve(); - }); + resolve(); + }); + } }); }); }); From 176aa52df02e582ac4c002ce2b9396d57055e021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Wed, 16 Jan 2019 17:26:15 +0100 Subject: [PATCH 24/36] Avoid duplicate loaders --- packages/strapi-plugin-graphql/services/Loaders.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js index e1d823e0d8..657b6d38f9 100644 --- a/packages/strapi-plugin-graphql/services/Loaders.js +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -13,6 +13,8 @@ module.exports = { loaders: {}, initializeLoader: function() { + this.resetLoaders(); + // Create loaders for each relational field (exclude core models). Object.keys(strapi.models) .filter(model => model !== 'core_store') @@ -28,9 +30,17 @@ module.exports = { }); }, + resetLoaders: () => { + this.loaders = {}; + }, + createLoader: function(model, plugin) { const name = plugin ? `${plugin}__${model}`: model; + if (this.loaders[name]) { + return this.loaders[name]; + } + this.loaders[name] = new DataLoader(keys => { return new Promise(async (resolve, reject) => { try { @@ -116,7 +126,7 @@ module.exports = { // We are faking the `start`, `skip` and `limit` argument because it doesn't make sense because we are merging different requests in one. // Note: we're trying to avoid useless populate for performances. Please be careful if you're updating this part. const populate = ref.associations - .filter(association => !association.dominassociationnt && _.isEmpty(association.model)) + .filter(association => !association.dominant && _.isEmpty(association.model)) .map(association => association.alias); const params = { From c9145ae690a1496bade5471ae13cc32539e1ad6f Mon Sep 17 00:00:00 2001 From: Roman Ponomarev Date: Wed, 16 Jan 2019 19:28:18 +0300 Subject: [PATCH 25/36] Update webhooks.md --- docs/3.x.x/guides/webhooks.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/3.x.x/guides/webhooks.md b/docs/3.x.x/guides/webhooks.md index d8103ef950..c6b1b2ff18 100644 --- a/docs/3.x.x/guides/webhooks.md +++ b/docs/3.x.x/guides/webhooks.md @@ -63,10 +63,10 @@ Do the same thing for other environments. #### HTTP call -Now it is time to make the HTTP call. In this example we will use `request` as it is already in the list of Strapi's dependencies. Let's install it: +Now it is time to make the HTTP call. In this example we will use `axios`. Let's install it: ``` -npm i request --save +npm i axios --save ``` Edit `api/yourContentType/models/YourContentType.js`: @@ -76,7 +76,7 @@ Edit `api/yourContentType/models/YourContentType.js`: ```js 'use strict'; -const request = require('request'); +const axios = require('axios'); /** * Lifecycle callbacks for the `Post` model. @@ -119,5 +119,5 @@ So, to trigger an url on delete, please add `request.post(strapi.config.currentE - `delete` action of `plugins/content-manager/services/ContentManager.js` (triggered by the Content Manager). ::: note -Do not forget to require `request` at the top of these files. +Do not forget to require `axios` at the top of these files. ::: From 925438d7b58ec3e03d472bbf1d1f8ffb19d00b3e Mon Sep 17 00:00:00 2001 From: soupette Date: Thu, 17 Jan 2019 17:18:54 +0100 Subject: [PATCH 26/36] Fixes #2541 --- .../admin/src/containers/EditPage/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-plugin-users-permissions/admin/src/containers/EditPage/index.js b/packages/strapi-plugin-users-permissions/admin/src/containers/EditPage/index.js index 72f57a17e9..894027dc90 100644 --- a/packages/strapi-plugin-users-permissions/admin/src/containers/EditPage/index.js +++ b/packages/strapi-plugin-users-permissions/admin/src/containers/EditPage/index.js @@ -110,7 +110,7 @@ export class EditPage extends React.Component { // eslint-disable-line react/pre showLoaderForm = () => { const { editPage: { modifiedData }, match: { params: { actionType } } } = this.props; - return actionType !== 'create' && get(modifiedData, ['name'], '') === ''; + return actionType !== 'create' && isEmpty(modifiedData); } showLoaderPermissions = () => { From f534340ca2083087dc62ffc39e73a7625f02bdb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Fri, 18 Jan 2019 16:08:15 +0100 Subject: [PATCH 27/36] Add listeners to events --- .../strapi-generate-new/json/package.json.js | 4 ++-- packages/strapi-generate-new/lib/after.js | 17 ++++++++++++++++- packages/strapi-generate-new/lib/before.js | 2 ++ packages/strapi-generate-new/package.json | 1 + .../controllers/Auth.js | 5 +++++ 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/packages/strapi-generate-new/json/package.json.js b/packages/strapi-generate-new/json/package.json.js index 2a2e0c2cf6..85376c2872 100644 --- a/packages/strapi-generate-new/json/package.json.js +++ b/packages/strapi-generate-new/json/package.json.js @@ -6,7 +6,7 @@ // Public node modules. const _ = require('lodash'); -const uuid = require('uuid/v4'); + const { packageManager } = require('strapi-utils'); /** @@ -72,7 +72,7 @@ module.exports = scope => { }], 'strapi': { 'packageManager': pkgManager, - 'uuid': uuid() + 'uuid': scope.uuid }, 'engines': { "node": ">= 10.0.0", diff --git a/packages/strapi-generate-new/lib/after.js b/packages/strapi-generate-new/lib/after.js index 82ee83968f..1e7853c2f2 100644 --- a/packages/strapi-generate-new/lib/after.js +++ b/packages/strapi-generate-new/lib/after.js @@ -5,8 +5,8 @@ */ // Node.js core. -const path = require('path'); const { exec, execSync } = require('child_process'); +const path = require('path'); // Public node modules. const _ = require('lodash'); @@ -15,6 +15,7 @@ const fs = require('fs-extra'); const npm = require('enpeem'); const ora = require('ora'); const shell = require('shelljs'); +const request = require('request'); // Logger. const { packageManager } = require('strapi-utils'); @@ -32,6 +33,8 @@ module.exports = (scope, cb) => { console.log(`The app has been connected to the database ${green('successfully')}!`); console.log(); + trackSuccess('didConnectDatabase', scope); + console.log('🏗 Application generation:'); let loader = ora('Copy dashboard').start(); @@ -193,7 +196,19 @@ module.exports = (scope, cb) => { console.log('⚡️ Start application:'); console.log(`$ ${green('strapi start')}`); + trackSuccess('didCreateProject', scope); + cb(); }); } }; + +function trackSuccess(event, scope) { + request + .post('https://analytics.strapi.io/track') + .form({ + event, + uuid: scope.uuid + }) + .on('error', () => {}); +} diff --git a/packages/strapi-generate-new/lib/before.js b/packages/strapi-generate-new/lib/before.js index f8cc961ac8..e71301fa13 100644 --- a/packages/strapi-generate-new/lib/before.js +++ b/packages/strapi-generate-new/lib/before.js @@ -17,6 +17,7 @@ const {cyan} = require('chalk'); const fs = require('fs-extra'); const inquirer = require('inquirer'); const shell = require('shelljs'); +const uuid = require('uuid/v4'); // Logger. const { packageManager } = require('strapi-utils'); @@ -46,6 +47,7 @@ module.exports = (scope, cb) => { // Make changes to the rootPath where the Strapi project will be created. scope.rootPath = path.resolve(process.cwd(), scope.name || ''); scope.tmpPath = path.resolve(os.tmpdir(), `strapi${ crypto.randomBytes(6).toString('hex') }`); + scope.uuid = uuid(); // Ensure we aren't going to inadvertently delete any files. try { diff --git a/packages/strapi-generate-new/package.json b/packages/strapi-generate-new/package.json index 9b9f1ec706..09457e33a1 100644 --- a/packages/strapi-generate-new/package.json +++ b/packages/strapi-generate-new/package.json @@ -19,6 +19,7 @@ "listr": "^0.14.1", "lodash": "^4.17.5", "ora": "^2.1.0", + "request": "^2.88.0", "strapi-utils": "3.0.0-alpha.19", "uuid": "^3.1.0" }, diff --git a/packages/strapi-plugin-users-permissions/controllers/Auth.js b/packages/strapi-plugin-users-permissions/controllers/Auth.js index d4c86ad8a0..b51bf8e652 100644 --- a/packages/strapi-plugin-users-permissions/controllers/Auth.js +++ b/packages/strapi-plugin-users-permissions/controllers/Auth.js @@ -9,6 +9,7 @@ /* eslint-disable no-useless-escape */ const crypto = require('crypto'); const _ = require('lodash'); + const emailRegExp = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; module.exports = { @@ -326,6 +327,10 @@ module.exports = { } } + if (!hasAdmin) { + strapi.emit('didCreateFirstAdmin'); + } + ctx.send({ jwt, user: _.omit(user.toJSON ? user.toJSON() : user, ['password', 'resetPasswordToken']) From 632814caa4ad1e0327ca189476bf492757cfee12 Mon Sep 17 00:00:00 2001 From: Ahmed El Sayegh Date: Mon, 21 Jan 2019 01:12:05 +0200 Subject: [PATCH 28/36] Add public/uploads folder to generated gitignore --- packages/strapi-generate-new/templates/gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/strapi-generate-new/templates/gitignore b/packages/strapi-generate-new/templates/gitignore index bbc04469ce..934cdb00d9 100644 --- a/packages/strapi-generate-new/templates/gitignore +++ b/packages/strapi-generate-new/templates/gitignore @@ -80,6 +80,7 @@ $RECYCLE.BIN/ ssl .idea nbproject +public/uploads ############################ From bb585f4df2ca0595b05d5c8ef9a4fac7ea60a6ec Mon Sep 17 00:00:00 2001 From: Ahmed El Sayegh Date: Tue, 22 Jan 2019 12:19:42 +0200 Subject: [PATCH 29/36] Add gitkeep to public/uploads folder --- packages/strapi-generate-new/templates/gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-generate-new/templates/gitignore b/packages/strapi-generate-new/templates/gitignore index 934cdb00d9..e008e5bfed 100644 --- a/packages/strapi-generate-new/templates/gitignore +++ b/packages/strapi-generate-new/templates/gitignore @@ -80,8 +80,8 @@ $RECYCLE.BIN/ ssl .idea nbproject -public/uploads - +public/uploads/* +!public/uploads/.gitkeep ############################ # Node.js From 54f70da36657b20c1f48a47c8f0ddd93341bf846 Mon Sep 17 00:00:00 2001 From: Ahmed El Sayegh Date: Tue, 22 Jan 2019 12:31:49 +0200 Subject: [PATCH 30/36] Add gitkeep template and target --- packages/strapi-generate-new/lib/index.js | 5 ++++- packages/strapi-generate-new/templates/gitkeep | 0 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 packages/strapi-generate-new/templates/gitkeep diff --git a/packages/strapi-generate-new/lib/index.js b/packages/strapi-generate-new/lib/index.js index 6bfd73646c..7aacf6329b 100644 --- a/packages/strapi-generate-new/lib/index.js +++ b/packages/strapi-generate-new/lib/index.js @@ -66,7 +66,10 @@ module.exports = { 'public/uploads': { folder: {} }, - + // Copy gitkeep into uploads directory. + 'public/uploads/.gitkeep': { + copy: 'gitkeep' + }, // Empty node_modules directory. 'node_modules': { folder: {} diff --git a/packages/strapi-generate-new/templates/gitkeep b/packages/strapi-generate-new/templates/gitkeep new file mode 100644 index 0000000000..e69de29bb2 From b4968697a0b70e5b7c2162efceaf7b5151c4080d Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Tue, 22 Jan 2019 11:41:49 +0100 Subject: [PATCH 31/36] Fix update user email --- packages/strapi-plugin-users-permissions/controllers/User.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-users-permissions/controllers/User.js b/packages/strapi-plugin-users-permissions/controllers/User.js index 7e496e724d..8f1d9d695a 100644 --- a/packages/strapi-plugin-users-permissions/controllers/User.js +++ b/packages/strapi-plugin-users-permissions/controllers/User.js @@ -120,7 +120,7 @@ module.exports = { if (advancedConfigs.unique_email && ctx.request.body.email) { const users = await strapi.plugins['users-permissions'].services.user.fetchAll({ email: ctx.request.body.email }); - if (users && _.find(users, user => (user.id || user._id).toString() !== ctx.params._id)) { + if (users && _.find(users, user => (user.id || user._id).toString() !== (ctx.params.id || ctx.params._id))) { return ctx.badRequest(null, ctx.request.admin ? [{ messages: [{ id: 'Auth.form.error.email.taken', field: ['email'] }] }] : 'Email is already taken.'); } } @@ -140,7 +140,7 @@ module.exports = { email: ctx.request.body.email }); - if (user !== null && (user.id || user._id).toString() !== ctx.params._id) { + if (user !== null && (user.id || user._id).toString() !== (ctx.params.id || ctx.params._id)) { return ctx.badRequest(null, ctx.request.admin ? [{ messages: [{ id: 'Auth.form.error.email.taken', field: ['email'] }] }] : 'Email is already taken.'); } } From 2b37315f07b38dd015ab249d88502876843166b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Tue, 22 Jan 2019 12:16:46 +0100 Subject: [PATCH 32/36] Fix where on relational fields --- packages/strapi-plugin-graphql/services/Loaders.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js index 657b6d38f9..7d208860bc 100644 --- a/packages/strapi-plugin-graphql/services/Loaders.js +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -132,7 +132,7 @@ module.exports = { const params = { ...query.options, populate, - query: {}, + query: query.options.where || {}, start: 0, skip: 0, limit: 100, From 4f2928339ad5c1f9fdcdecd8ba1b54f38a8b8328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Tue, 22 Jan 2019 13:47:44 +0100 Subject: [PATCH 33/36] Reset loaders instead of clearing cache --- packages/strapi-plugin-graphql/services/Loaders.js | 7 ++++++- .../models/User.settings.json | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js index 7d208860bc..5f391c935c 100644 --- a/packages/strapi-plugin-graphql/services/Loaders.js +++ b/packages/strapi-plugin-graphql/services/Loaders.js @@ -30,13 +30,18 @@ module.exports = { }); }, - resetLoaders: () => { + resetLoaders: function () { this.loaders = {}; }, createLoader: function(model, plugin) { const name = plugin ? `${plugin}__${model}`: model; + // Exclude polymorphic from loaders. + if (name === undefined) { + return; + } + if (this.loaders[name]) { return this.loaders[name]; } diff --git a/packages/strapi-plugin-users-permissions/models/User.settings.json b/packages/strapi-plugin-users-permissions/models/User.settings.json index 665465f2dd..69b7aafe1c 100644 --- a/packages/strapi-plugin-users-permissions/models/User.settings.json +++ b/packages/strapi-plugin-users-permissions/models/User.settings.json @@ -49,5 +49,6 @@ "plugin": "users-permissions", "configurable": false } - } + }, + "collectionName": "users-permissions_user" } \ No newline at end of file From 178f77db2b8648c3c7c8b88bcf7b46658450a989 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Tue, 22 Jan 2019 14:31:19 +0100 Subject: [PATCH 34/36] Add migration guide to alpha.20 --- docs/3.x.x/migration-guide/README.md | 1 + .../migration-guide-alpha.19-to-alpha.20.md | 67 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 docs/3.x.x/migration-guide/migration-guide-alpha.19-to-alpha.20.md diff --git a/docs/3.x.x/migration-guide/README.md b/docs/3.x.x/migration-guide/README.md index c46bbaed4d..a2f9ce2ef0 100644 --- a/docs/3.x.x/migration-guide/README.md +++ b/docs/3.x.x/migration-guide/README.md @@ -25,3 +25,4 @@ - [Migration guide from alpha.16 to alpha.17](migration-guide-alpha.16-to-alpha.17.md) - [Migration guide from alpha.17 to alpha.18](migration-guide-alpha.17-to-alpha.18.md) - [Migration guide from alpha.18 to alpha.19](migration-guide-alpha.18-to-alpha.19.md) +- [Migration guide from alpha.19 to alpha.20](migration-guide-alpha.19-to-alpha.20.md) diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.19-to-alpha.20.md b/docs/3.x.x/migration-guide/migration-guide-alpha.19-to-alpha.20.md new file mode 100644 index 0000000000..f4afb99ad6 --- /dev/null +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.19-to-alpha.20.md @@ -0,0 +1,67 @@ +# Migration guide from alpha.19 to alpha.20 + +**Here are the major changes:** + +- Fix email issue on user update +- Improve GraphQL performances + +**Useful links:** +- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.20](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.20) +- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.19...v3.0.0-alpha.20](https://github.com/strapi/strapi/compare/v3.0.0-alpha.19...v3.0.0-alpha.20) + +
+ +::: note +Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process. +::: + +
+ +## Getting started + +Install Strapi `alpha.20` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.20 -g`. + +When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration). + +
+ +## Update node modules + +Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.20` version) of your project. + +Run `npm install strapi@3.0.0-alpha.20 --save` to update your strapi version. + +
+ +## Update the Admin + +::: note +If you performed updates in the Admin, you will have to manually migrate your changes. +::: + +Delete your old admin folder and replace it with the new one. + +
+ +## Update the Plugins + +::: note +If you did a custom update on one of the plugins, you will have to manually migrate your update. +::: + +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. + +Then, delete your old `plugins` folder and replace it with the new one. + +## Update services + +For both bookshelf and mongoose, you will have to update all services of your generated API. + +You will have to update one line of the `fetchAll` function. + +**Mongoose** replace `.populate(populate);` by `.populate(filters.populate || populate);`. +**Bookshelf**: replace `withRelated: populate` by `withRelated: filters.populate || populate`. + +
+ +That's all, you have now upgraded to Strapi `alpha.20`. From 25f21fae42c0ccdd3bfbca21a300942fd936769a Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Tue, 22 Jan 2019 14:31:49 +0100 Subject: [PATCH 35/36] 3.0.0-alpha.20 --- package.json | 2 +- packages/strapi-admin/package.json | 6 ++--- packages/strapi-generate-admin/package.json | 6 ++--- packages/strapi-generate-api/package.json | 2 +- .../strapi-generate-controller/package.json | 2 +- packages/strapi-generate-model/package.json | 2 +- packages/strapi-generate-new/package.json | 4 ++-- packages/strapi-generate-plugin/package.json | 2 +- packages/strapi-generate-policy/package.json | 2 +- packages/strapi-generate-service/package.json | 2 +- packages/strapi-generate/package.json | 4 ++-- packages/strapi-helper-plugin/package.json | 2 +- packages/strapi-hook-bookshelf/package.json | 6 ++--- packages/strapi-hook-ejs/package.json | 2 +- packages/strapi-hook-knex/package.json | 2 +- packages/strapi-hook-mongoose/package.json | 4 ++-- packages/strapi-hook-redis/package.json | 4 ++-- packages/strapi-lint/package.json | 2 +- packages/strapi-middleware-views/package.json | 2 +- .../package.json | 4 ++-- .../package.json | 8 +++---- .../strapi-plugin-documentation/package.json | 4 ++-- packages/strapi-plugin-email/package.json | 6 ++--- packages/strapi-plugin-graphql/package.json | 4 ++-- .../package.json | 4 ++-- packages/strapi-plugin-upload/package.json | 6 ++--- .../package.json | 6 ++--- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../strapi-provider-upload-local/package.json | 2 +- .../package.json | 2 +- packages/strapi-utils/package.json | 2 +- packages/strapi/package.json | 22 +++++++++---------- 37 files changed, 70 insertions(+), 70 deletions(-) diff --git a/package.json b/package.json index 42d22a2447..beeea28f57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "3.0.0-alpha.19", + "version": "3.0.0-alpha.20", "dependencies": {}, "devDependencies": { "assert": "~1.3.0", diff --git a/packages/strapi-admin/package.json b/packages/strapi-admin/package.json index 2299547e38..6f6f8b333b 100644 --- a/packages/strapi-admin/package.json +++ b/packages/strapi-admin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-admin", - "version": "3.0.0-alpha.19", + "version": "3.0.0-alpha.20", "description": "Strapi Admin", "repository": { "type": "git", @@ -31,8 +31,8 @@ }, "devDependencies": { "sanitize.css": "^4.1.0", - "strapi-helper-plugin": "3.0.0-alpha.19", - "strapi-utils": "3.0.0-alpha.19" + "strapi-helper-plugin": "3.0.0-alpha.20", + "strapi-utils": "3.0.0-alpha.20" }, "author": { "name": "Strapi", diff --git a/packages/strapi-generate-admin/package.json b/packages/strapi-generate-admin/package.json index 54de357e79..145b7a9866 100644 --- a/packages/strapi-generate-admin/package.json +++ b/packages/strapi-generate-admin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-admin", - "version": "3.0.0-alpha.19", + "version": "3.0.0-alpha.20", "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.19", - "strapi-utils": "3.0.0-alpha.19" + "strapi-admin": "3.0.0-alpha.20", + "strapi-utils": "3.0.0-alpha.20" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-generate-api/package.json b/packages/strapi-generate-api/package.json index 80b73c7237..faeb114252 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-alpha.19", + "version": "3.0.0-alpha.20", "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 c9cb06ab00..4ef0c0aa99 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-alpha.19", + "version": "3.0.0-alpha.20", "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 10b26801a3..a44a88d1bc 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-alpha.19", + "version": "3.0.0-alpha.20", "description": "Generate a model for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-new/package.json b/packages/strapi-generate-new/package.json index 09457e33a1..616c063e45 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-alpha.19", + "version": "3.0.0-alpha.20", "description": "Generate a new Strapi application.", "homepage": "http://strapi.io", "keywords": [ @@ -20,7 +20,7 @@ "lodash": "^4.17.5", "ora": "^2.1.0", "request": "^2.88.0", - "strapi-utils": "3.0.0-alpha.19", + "strapi-utils": "3.0.0-alpha.20", "uuid": "^3.1.0" }, "scripts": { diff --git a/packages/strapi-generate-plugin/package.json b/packages/strapi-generate-plugin/package.json index 5860f2306a..d4b04355a2 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-alpha.19", + "version": "3.0.0-alpha.20", "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 cea23c27da..26b6064e7b 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-alpha.19", + "version": "3.0.0-alpha.20", "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 fc5a10e61d..85e7d71287 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-alpha.19", + "version": "3.0.0-alpha.20", "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 ff5c256d16..f17ab0a536 100644 --- a/packages/strapi-generate/package.json +++ b/packages/strapi-generate/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate", - "version": "3.0.0-alpha.19", + "version": "3.0.0-alpha.20", "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.19" + "strapi-utils": "3.0.0-alpha.20" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-helper-plugin/package.json b/packages/strapi-helper-plugin/package.json index 25ac5263e7..5753781979 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-alpha.19", + "version": "3.0.0-alpha.20", "description": "Helper for Strapi plugins development", "engines": { "node": ">= 10.0.0", diff --git a/packages/strapi-hook-bookshelf/package.json b/packages/strapi-hook-bookshelf/package.json index e22975a8e6..98ee358cbc 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-alpha.19", + "version": "3.0.0-alpha.20", "description": "Bookshelf hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -21,8 +21,8 @@ "lodash": "^4.17.5", "pluralize": "^6.0.0", "rimraf": "^2.6.2", - "strapi-hook-knex": "3.0.0-alpha.19", - "strapi-utils": "3.0.0-alpha.19" + "strapi-hook-knex": "3.0.0-alpha.20", + "strapi-utils": "3.0.0-alpha.20" }, "strapi": { "dependencies": [ diff --git a/packages/strapi-hook-ejs/package.json b/packages/strapi-hook-ejs/package.json index 2c2c9f1886..329cb493f4 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-alpha.19", + "version": "3.0.0-alpha.20", "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 c6afce30e5..6cc279610b 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-alpha.19", + "version": "3.0.0-alpha.20", "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 f8678381c7..56c5d235e3 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-alpha.19", + "version": "3.0.0-alpha.20", "description": "Mongoose hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -20,7 +20,7 @@ "mongoose-float": "^1.0.3", "pluralize": "^6.0.0", "rimraf": "^2.6.2", - "strapi-utils": "3.0.0-alpha.19" + "strapi-utils": "3.0.0-alpha.20" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-hook-redis/package.json b/packages/strapi-hook-redis/package.json index 964ca648c5..0e4a23d7e6 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-alpha.19", + "version": "3.0.0-alpha.20", "description": "Redis hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -19,7 +19,7 @@ "lodash": "^4.17.5", "rimraf": "^2.6.2", "stack-trace": "0.0.10", - "strapi-utils": "3.0.0-alpha.19" + "strapi-utils": "3.0.0-alpha.20" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-lint/package.json b/packages/strapi-lint/package.json index 9cbc4a447f..afaaba13c1 100644 --- a/packages/strapi-lint/package.json +++ b/packages/strapi-lint/package.json @@ -1,6 +1,6 @@ { "name": "strapi-lint", - "version": "3.0.0-alpha.19", + "version": "3.0.0-alpha.20", "description": "Strapi eslint and prettier configurations", "directories": { "lib": "lib" diff --git a/packages/strapi-middleware-views/package.json b/packages/strapi-middleware-views/package.json index 11fa8372bf..8d0b9b653e 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-alpha.19", + "version": "3.0.0-alpha.20", "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 00b77c04e3..e3f2c79b32 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-alpha.19", + "version": "3.0.0-alpha.20", "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.19" + "strapi-helper-plugin": "3.0.0-alpha.20" }, "dependencies": { "pluralize": "^7.0.0" diff --git a/packages/strapi-plugin-content-type-builder/package.json b/packages/strapi-plugin-content-type-builder/package.json index 9e4fc78981..15d5477248 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-alpha.19", + "version": "3.0.0-alpha.20", "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.19", - "strapi-generate-api": "3.0.0-alpha.19" + "strapi-generate": "3.0.0-alpha.20", + "strapi-generate-api": "3.0.0-alpha.20" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.19" + "strapi-helper-plugin": "3.0.0-alpha.20" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-documentation/package.json b/packages/strapi-plugin-documentation/package.json index 9573370bc6..f352716201 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-alpha.19", + "version": "3.0.0-alpha.20", "description": "This is the description of the plugin.", "strapi": { "name": "Documentation", @@ -29,7 +29,7 @@ "swagger-ui-dist": "^3.18.3-republish2" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.19" + "strapi-helper-plugin": "3.0.0-alpha.20" }, "author": { "name": "soupette", diff --git a/packages/strapi-plugin-email/package.json b/packages/strapi-plugin-email/package.json index 1049aa8d64..e7a6e43d2e 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-alpha.19", + "version": "3.0.0-alpha.20", "description": "This is the description of the plugin.", "strapi": { "name": "Email", @@ -22,11 +22,11 @@ "prepublishOnly": "IS_MONOREPO=true npm run build" }, "dependencies": { - "strapi-provider-email-sendmail": "3.0.0-alpha.19" + "strapi-provider-email-sendmail": "3.0.0-alpha.20" }, "devDependencies": { "react-copy-to-clipboard": "5.0.1", - "strapi-helper-plugin": "3.0.0-alpha.19" + "strapi-helper-plugin": "3.0.0-alpha.20" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-graphql/package.json b/packages/strapi-plugin-graphql/package.json index 86927489bf..257805be1a 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-alpha.19", + "version": "3.0.0-alpha.20", "description": "This is the description of the plugin.", "strapi": { "name": "graphql", @@ -31,7 +31,7 @@ "graphql-type-datetime": "^0.2.2", "graphql-type-json": "^0.2.1", "pluralize": "^7.0.0", - "strapi-utils": "3.0.0-alpha.19" + "strapi-utils": "3.0.0-alpha.20" }, "author": { "name": "A Strapi developer", diff --git a/packages/strapi-plugin-settings-manager/package.json b/packages/strapi-plugin-settings-manager/package.json index 0890a67353..766adf0c13 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-alpha.19", + "version": "3.0.0-alpha.20", "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.19" + "strapi-helper-plugin": "3.0.0-alpha.20" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-upload/package.json b/packages/strapi-plugin-upload/package.json index 9b209cb4c7..ec7617daaa 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-alpha.19", + "version": "3.0.0-alpha.20", "description": "This is the description of the plugin.", "strapi": { "name": "Files Upload", @@ -22,12 +22,12 @@ "prepublishOnly": "IS_MONOREPO=true npm run build" }, "dependencies": { - "strapi-provider-upload-local": "3.0.0-alpha.19", + "strapi-provider-upload-local": "3.0.0-alpha.20", "stream-to-array": "^2.3.0", "uuid": "^3.2.1" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.19" + "strapi-helper-plugin": "3.0.0-alpha.20" }, "author": { "name": "A Strapi developer", diff --git a/packages/strapi-plugin-users-permissions/package.json b/packages/strapi-plugin-users-permissions/package.json index 4b47e26de9..4e8eda289e 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-alpha.19", + "version": "3.0.0-alpha.20", "description": "Protect your API with a full-authentication process based on JWT", "strapi": { "name": "Roles & Permissions", @@ -29,11 +29,11 @@ "koa2-ratelimit": "^0.6.1", "purest": "^2.0.1", "request": "^2.83.0", - "strapi-utils": "3.0.0-alpha.19", + "strapi-utils": "3.0.0-alpha.20", "uuid": "^3.1.0" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.19" + "strapi-helper-plugin": "3.0.0-alpha.20" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-provider-email-amazon-ses/package.json b/packages/strapi-provider-email-amazon-ses/package.json index 50a34dcebd..8e31c7fb68 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-alpha.19", + "version": "3.0.0-alpha.20", "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 3a50c7f4ae..d18977058e 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-alpha.19", + "version": "3.0.0-alpha.20", "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 3ee4e4004b..497925897e 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-alpha.19", + "version": "3.0.0-alpha.20", "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 ff825739be..388d1f8a98 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-alpha.19", + "version": "3.0.0-alpha.20", "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 0706ad7bf9..45e0b33b2f 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-alpha.19", + "version": "3.0.0-alpha.20", "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 adcd163f5e..f19aadc78e 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-alpha.19", + "version": "3.0.0-alpha.20", "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 63a302eea9..a86df28fed 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-alpha.19", + "version": "3.0.0-alpha.20", "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 12e751a8e4..fb2c28825c 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-alpha.19", + "version": "3.0.0-alpha.20", "description": "Rackspace provider for strapi upload", "main": "./lib", "scripts": { diff --git a/packages/strapi-utils/package.json b/packages/strapi-utils/package.json index a7185fd8e9..6ed18986a2 100644 --- a/packages/strapi-utils/package.json +++ b/packages/strapi-utils/package.json @@ -1,6 +1,6 @@ { "name": "strapi-utils", - "version": "3.0.0-alpha.19", + "version": "3.0.0-alpha.20", "description": "Shared utilities for the Strapi packages", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi/package.json b/packages/strapi/package.json index 45977dddba..beba561a5d 100644 --- a/packages/strapi/package.json +++ b/packages/strapi/package.json @@ -1,6 +1,6 @@ { "name": "strapi", - "version": "3.0.0-alpha.19", + "version": "3.0.0-alpha.20", "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": [ @@ -60,16 +60,16 @@ "rimraf": "^2.6.2", "semver": "^5.4.1", "stack-trace": "0.0.10", - "strapi-generate": "3.0.0-alpha.19", - "strapi-generate-admin": "3.0.0-alpha.19", - "strapi-generate-api": "3.0.0-alpha.19", - "strapi-generate-controller": "3.0.0-alpha.19", - "strapi-generate-model": "3.0.0-alpha.19", - "strapi-generate-new": "3.0.0-alpha.19", - "strapi-generate-plugin": "3.0.0-alpha.19", - "strapi-generate-policy": "3.0.0-alpha.19", - "strapi-generate-service": "3.0.0-alpha.19", - "strapi-utils": "3.0.0-alpha.19" + "strapi-generate": "3.0.0-alpha.20", + "strapi-generate-admin": "3.0.0-alpha.20", + "strapi-generate-api": "3.0.0-alpha.20", + "strapi-generate-controller": "3.0.0-alpha.20", + "strapi-generate-model": "3.0.0-alpha.20", + "strapi-generate-new": "3.0.0-alpha.20", + "strapi-generate-plugin": "3.0.0-alpha.20", + "strapi-generate-policy": "3.0.0-alpha.20", + "strapi-generate-service": "3.0.0-alpha.20", + "strapi-utils": "3.0.0-alpha.20" }, "author": { "email": "hi@strapi.io", From 13c54411a9307e4e0b68b53217db568c88028383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abd=C3=B3n=20Rodr=C3=ADguez=20Davila?= Date: Tue, 22 Jan 2019 23:33:09 +0100 Subject: [PATCH 36/36] Fix avoid write files if production mode --- packages/strapi/lib/core/admin.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/strapi/lib/core/admin.js b/packages/strapi/lib/core/admin.js index 1e2f91aca1..57f0b17fc9 100644 --- a/packages/strapi/lib/core/admin.js +++ b/packages/strapi/lib/core/admin.js @@ -66,6 +66,8 @@ module.exports = function() { resolve(); }); + } else { + resolve(); } }); });