From 67e2104ba52b72fb833b2a5f0b83f860c76570eb Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 29 Jun 2020 13:04:26 -0400 Subject: [PATCH 01/17] fix(email): malformed json --- .../documentation/1.0.0/overrides/email-Email.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-plugin-email/documentation/1.0.0/overrides/email-Email.json b/packages/strapi-plugin-email/documentation/1.0.0/overrides/email-Email.json index 397c733296..6ece5f0874 100644 --- a/packages/strapi-plugin-email/documentation/1.0.0/overrides/email-Email.json +++ b/packages/strapi-plugin-email/documentation/1.0.0/overrides/email-Email.json @@ -31,7 +31,7 @@ }, "replyTo": { "type": "string", - "format": "email" + "format": "email", "example": "user4@example.com" }, "subject": { From b8271dd403ed7f0846ca1007161356e3e2a6068c Mon Sep 17 00:00:00 2001 From: Akhil Mohan Date: Thu, 9 Jul 2020 20:00:25 +0530 Subject: [PATCH 02/17] Fix broken link install plugin popup (#6698) * fixed broken link New link for documentation that pops up as overlay in Strapi. (plugin install blocker) * updated the requested change for fix broken link --- .../lib/src/components/OverlayBlocker/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-helper-plugin/lib/src/components/OverlayBlocker/index.js b/packages/strapi-helper-plugin/lib/src/components/OverlayBlocker/index.js index 7a02ff9a62..7f4a312650 100644 --- a/packages/strapi-helper-plugin/lib/src/components/OverlayBlocker/index.js +++ b/packages/strapi-helper-plugin/lib/src/components/OverlayBlocker/index.js @@ -73,7 +73,7 @@ class OverlayBlocker extends React.Component {
From f3e078caf6e599faa7b3c73fe1bfc20df41badcd Mon Sep 17 00:00:00 2001 From: "Kim, Harim" Date: Thu, 9 Jul 2020 23:32:05 +0900 Subject: [PATCH 03/17] Add logic to change file name to migration script, add additional description of file name (#6793) Signed-off-by: harimkims --- .../migration-guide-beta.19-to-beta.20.md | 12 ++++++++++++ .../migration-guide-beta.19-to-beta.20.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/docs/3.0.0-beta.x/migration-guide/migration-guide-beta.19-to-beta.20.md b/docs/3.0.0-beta.x/migration-guide/migration-guide-beta.19-to-beta.20.md index e171494367..59c90b63f2 100644 --- a/docs/3.0.0-beta.x/migration-guide/migration-guide-beta.19-to-beta.20.md +++ b/docs/3.0.0-beta.x/migration-guide/migration-guide-beta.19-to-beta.20.md @@ -187,6 +187,15 @@ while (fileCursor.hasNext()) { ); } }); + + if (el.name) { + var splitName = el.name.split('.'); + var name = splitName[0]; + var ext = splitName[1]; + if (ext) { + db.getCollection('upload_file').updateOne({ _id: el._id }, { $set: { name: name } }); + } + } } ``` @@ -208,6 +217,9 @@ var models = { Finally you can load this script in your mongo shell and run it. +Note that after migration the `name` field of the files you uploaded will be replaced with a name without an extension. +If you were displaying the file name including the extension on the front end, you might have to show the extension separately through the `ext` field. + Once your migration is done you can delete the `export.js` and `models.json` files from your project. You are all set ! ## Rebuilding your administration panel diff --git a/docs/v3.x/migration-guide/migration-guide-beta.19-to-beta.20.md b/docs/v3.x/migration-guide/migration-guide-beta.19-to-beta.20.md index 3d365f2d6a..b7497c3131 100644 --- a/docs/v3.x/migration-guide/migration-guide-beta.19-to-beta.20.md +++ b/docs/v3.x/migration-guide/migration-guide-beta.19-to-beta.20.md @@ -187,6 +187,15 @@ while (fileCursor.hasNext()) { ); } }); + + if (el.name) { + var splitName = el.name.split('.'); + var name = splitName[0]; + var ext = splitName[1]; + if (ext) { + db.getCollection('upload_file').updateOne({ _id: el._id }, { $set: { name: name } }); + } + } } ``` @@ -208,6 +217,9 @@ var models = { Finally you can load this script in your mongo shell and run it. +Note that after migration the `name` field of the files you uploaded will be replaced with a name without an extension. +If you were displaying the file name including the extension on the front end, you might have to show the extension separately through the `ext` field. + Once your migration is done you can delete the `export.js` and `models.json` files from your project. You are all set ! ## Rebuilding your administration panel From 39284d196b6d5a46bff44355c8aa0a3ac6c0a9e4 Mon Sep 17 00:00:00 2001 From: MattieBelt Date: Tue, 14 Jul 2020 12:40:06 +0200 Subject: [PATCH 04/17] Fix all lowercase action name Signed-off-by: MattieBelt --- .../services/UsersPermissions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-plugin-users-permissions/services/UsersPermissions.js b/packages/strapi-plugin-users-permissions/services/UsersPermissions.js index 1d7a6f61f9..e630414443 100644 --- a/packages/strapi-plugin-users-permissions/services/UsersPermissions.js +++ b/packages/strapi-plugin-users-permissions/services/UsersPermissions.js @@ -22,7 +22,7 @@ const DEFAULT_PERMISSIONS = [ type: 'users-permissions', roleType: 'public', }, - { action: 'resetPassword', controller: 'auth', type: 'users-permissions', roleType: 'public' }, + { action: 'resetpassword', controller: 'auth', type: 'users-permissions', roleType: 'public' }, { action: 'init', controller: 'userspermissions', type: null, roleType: null }, { action: 'me', controller: 'user', type: 'users-permissions', roleType: null }, { action: 'autoreload', controller: null, type: null, roleType: null }, From ba6753f21aa9ac87c038675dfbadef42ec42ef34 Mon Sep 17 00:00:00 2001 From: Diogo Correia Date: Wed, 15 Jul 2020 08:54:27 +0100 Subject: [PATCH 05/17] Make jwt not required for register mutation (#6716) Signed-off-by: Diogo Correia --- .../strapi-plugin-users-permissions/config/schema.graphql.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-plugin-users-permissions/config/schema.graphql.js b/packages/strapi-plugin-users-permissions/config/schema.graphql.js index 07b8d7f6ce..233de2ef9d 100644 --- a/packages/strapi-plugin-users-permissions/config/schema.graphql.js +++ b/packages/strapi-plugin-users-permissions/config/schema.graphql.js @@ -49,7 +49,7 @@ module.exports = { } type UsersPermissionsLoginPayload { - jwt: String! + jwt: String user: UsersPermissionsMe! } From f496970cbf1e3c726711088d80f66d59db3c1e45 Mon Sep 17 00:00:00 2001 From: Nusrath Khan Date: Wed, 15 Jul 2020 18:04:57 +0200 Subject: [PATCH 06/17] fix: remove misleading documentation (#6927) removes misleading documentation around which fields on the USER model can be used in the email templates --- docs/v3.x/plugins/users-permissions.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/v3.x/plugins/users-permissions.md b/docs/v3.x/plugins/users-permissions.md index 87cab5110e..69d4c3c173 100644 --- a/docs/v3.x/plugins/users-permissions.md +++ b/docs/v3.x/plugins/users-permissions.md @@ -748,7 +748,6 @@ You can update these templates under **Plugins** > **Roles & Permissions** > **E - `USER` (object) - `username` - `email` - - ...and any other field that you added manually in the model. - `TOKEN` corresponds to the token generated to be able to reset the password. - `URL` is the link where the user will be redirected after clicking on it in the email. @@ -757,7 +756,6 @@ You can update these templates under **Plugins** > **Roles & Permissions** > **E - `USER` (object) - `username` - `email` - - ...and any other field that you added manually in the model. - `CODE` corresponds to the CODE generated to be able confirm the user email. - `URL` is the Strapi backend URL that confirms the code (by default `/auth/email-confirmation`). From c587bda5225bf98074c3ca2f315da7b0c0154076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20D=C3=B6rig?= Date: Wed, 15 Jul 2020 18:33:07 +0200 Subject: [PATCH 07/17] Fix wrong flag for Swedish (#6926) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix wrong flag for Swedish language Signed-off-by: Vincent Dörig * Add test case Signed-off-by: Vincent Dörig --- .../admin/src/containers/LocaleToggle/index.js | 2 ++ .../src/containers/LocaleToggle/tests/index.test.js | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/packages/strapi-admin/admin/src/containers/LocaleToggle/index.js b/packages/strapi-admin/admin/src/containers/LocaleToggle/index.js index 5fe8be3a26..985dc5d199 100644 --- a/packages/strapi-admin/admin/src/containers/LocaleToggle/index.js +++ b/packages/strapi-admin/admin/src/containers/LocaleToggle/index.js @@ -49,6 +49,8 @@ export class LocaleToggle extends React.Component { return 'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/cz.svg'; case 'ms': return 'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/my.svg'; + case 'sv': + return 'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/se.svg'; default: return `https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/${locale}.svg`; } diff --git a/packages/strapi-admin/admin/src/containers/LocaleToggle/tests/index.test.js b/packages/strapi-admin/admin/src/containers/LocaleToggle/tests/index.test.js index 350722fa44..5df3dc0a7b 100644 --- a/packages/strapi-admin/admin/src/containers/LocaleToggle/tests/index.test.js +++ b/packages/strapi-admin/admin/src/containers/LocaleToggle/tests/index.test.js @@ -117,6 +117,15 @@ describe('', () => { ); }); + it('should return the se flag', () => { + const renderedComponent = shallow(); + const { getFlagUrl } = renderedComponent.instance(); + + expect(getFlagUrl('sv')).toEqual( + 'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/se.svg' + ); + }); + it('should return the locale flag', () => { const renderedComponent = shallow(); const { getFlagUrl } = renderedComponent.instance(); From eb272e996ca3a7445dba6e4eba00b01374c9c952 Mon Sep 17 00:00:00 2001 From: gp27 Date: Thu, 16 Jul 2020 08:45:44 +0200 Subject: [PATCH 08/17] - fix in graphql type builder (#6075) a required attribute that has a default value it's now not required in the input schema used for entities creation Signed-off-by: Gadi Piperno Corcos Co-authored-by: Gadi Piperno Corcos --- packages/strapi-plugin-graphql/services/type-builder.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/type-builder.js b/packages/strapi-plugin-graphql/services/type-builder.js index 45943e8d69..5fcdd53e81 100644 --- a/packages/strapi-plugin-graphql/services/type-builder.js +++ b/packages/strapi-plugin-graphql/services/type-builder.js @@ -71,8 +71,10 @@ module.exports = { break; } - if (attribute.required && action !== 'update') { - type += '!'; + if (attribute.required) { + if (rootType !== 'mutation' || (action !== 'update' && attribute.default === undefined)) { + type += '!'; + } } return type; From 36ab6144cbab61737add5af18632cee06d2c7081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Bari=C4=8Di=C4=8D?= Date: Thu, 16 Jul 2020 09:01:08 +0200 Subject: [PATCH 09/17] Add ENV to allow hiding startup message (#6348) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add ENV to allow hiding startup message Signed-off-by: Peter Baričič * Rename ENV Signed-off-by: Peter Baričič * Revert the logic Signed-off-by: Peter Baričič * Update docs with startup ENVs Signed-off-by: Peter Baričič Co-authored-by: Peter Baričič Co-authored-by: Alexandre BODIN --- docs/v3.x/cli/CLI.md | 9 +++++++++ packages/strapi/lib/Strapi.js | 15 +++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/v3.x/cli/CLI.md b/docs/v3.x/cli/CLI.md index 4bd06ec74f..4e5e74f19e 100644 --- a/docs/v3.x/cli/CLI.md +++ b/docs/v3.x/cli/CLI.md @@ -61,6 +61,15 @@ Start a Strapi application with autoReload disabled. This commands is there to run a Strapi application without restarts and file writes (aimed at production usage). Certain features are disabled in the `strapi start` mode because they require application restarts. +Allowed environment variables: +| Property | Description | Type | Default | +| --------- | ----------- | ----- | ------- | +| STRAPI_HIDE_STARTUP_MESSAGE | If `true` then Strapi will not show startup message on boot. Values can be `true` or `false` | string | `false` | +| STRAPI_LOG_LEVEL | Values can be 'fatal', 'error', 'warn', 'info', 'debug', 'trace' | string | `debug` | +| STRAPI_LOG_TIMESTAMP | Enables or disables the inclusion of a timestamp in the log message. Values can be `true` or `false` | string | `false`| +| STRAPI_LOG_FORCE_COLOR | Values can be `true` or `false` | string | `true` | +| STRAPI_LOG_PRETTY_PRINT | If pino-pretty module will be used to format logs. Values can be `true` or `false` | string | `true` | + ## strapi build Builds your admin panel. diff --git a/packages/strapi/lib/Strapi.js b/packages/strapi/lib/Strapi.js index 2b720d3d53..73d15ee55c 100644 --- a/packages/strapi/lib/Strapi.js +++ b/packages/strapi/lib/Strapi.js @@ -188,10 +188,17 @@ class Strapi { // Is the project initialised? const isInitialised = await utils.isInitialised(this); - if (!isInitialised) { - this.logFirstStartupMessage(); - } else { - this.logStartupMessage(); + // Should the startup message be displayed? + const hideStartupMessage = process.env.STRAPI_HIDE_STARTUP_MESSAGE + ? process.env.STRAPI_HIDE_STARTUP_MESSAGE === 'true' + : false; + + if (hideStartupMessage === false) { + if (!isInitialised) { + this.logFirstStartupMessage(); + } else { + this.logStartupMessage(); + } } // Emit started event. From 580102f0a5e968c7a937711d74ebf897944b6a47 Mon Sep 17 00:00:00 2001 From: Shahein Moussavi Date: Thu, 16 Jul 2020 03:09:59 -0400 Subject: [PATCH 10/17] Make Strapi GraphQL an implementing service for Federation (#6146) * Add Strapi GraphQL to Apollo Federation as implementation Signed-off-by: Shahein Moussavi * updated graphql plugin documentation for federation Signed-off-by: Shahein Moussavi * Creating separate package while waiting for Strapi PR acceptance Signed-off-by: Shahein Moussavi * v3.1.0-beta.0 Signed-off-by: Shahein Moussavi * Accidentally pushed bad changes Signed-off-by: Shahein Moussavi * used lodash for config variable for consistency, updated comment to be more descriptive Signed-off-by: Shahein Moussavi --- docs/3.0.0-beta.x/plugins/graphql.md | 5 ++++- .../config/settings.json | 3 ++- .../hooks/graphql/index.js | 14 +++++++++++-- packages/strapi-plugin-graphql/package.json | 1 + .../services/schema-generator.js | 10 ++++++++-- yarn.lock | 20 +++++++++++++++++++ 6 files changed, 47 insertions(+), 6 deletions(-) diff --git a/docs/3.0.0-beta.x/plugins/graphql.md b/docs/3.0.0-beta.x/plugins/graphql.md index 0d25a248ea..fa89ef5f4a 100644 --- a/docs/3.0.0-beta.x/plugins/graphql.md +++ b/docs/3.0.0-beta.x/plugins/graphql.md @@ -48,6 +48,8 @@ Security limits on maximum number of items in your response by default is limite You can also enable the Apollo server tracing feature, which is supported by the playground to track the response time of each part of your query. To enable this feature just change/add the `"tracing": true` option in the GraphQL settings file. You can read more about the tracing feature from Apollo [here](https://www.apollographql.com/docs/apollo-server/federation/metrics/). +You can also enable Strapi as an implementing service for Apollo Federation, which allows you to set up Strapi as a service behind an Apollo Federation API gateway and allows you to add Strapi to a single exposed data graph across your organization. You can read more about Apollo Federation [here](https://www.apollographql.com/docs/apollo-server/federation/introduction/). + You can edit these configurations by creating following file. **Path —** `./extensions/graphql/config/settings.json`. @@ -59,7 +61,8 @@ You can edit these configurations by creating following file. "shadowCRUD": true, "playgroundAlways": false, "depthLimit": 7, - "amountLimit": 100 + "amountLimit": 100, + "federation": false } ``` diff --git a/packages/strapi-plugin-graphql/config/settings.json b/packages/strapi-plugin-graphql/config/settings.json index 07ddc3fdcc..74050ccc4d 100644 --- a/packages/strapi-plugin-graphql/config/settings.json +++ b/packages/strapi-plugin-graphql/config/settings.json @@ -5,5 +5,6 @@ "playgroundAlways": false, "depthLimit": 7, "amountLimit": 100, - "shareEnabled": false + "shareEnabled": false, + "federation": false } diff --git a/packages/strapi-plugin-graphql/hooks/graphql/index.js b/packages/strapi-plugin-graphql/hooks/graphql/index.js index cea48dc270..ee5f2e324d 100644 --- a/packages/strapi-plugin-graphql/hooks/graphql/index.js +++ b/packages/strapi-plugin-graphql/hooks/graphql/index.js @@ -7,6 +7,7 @@ // Public node modules. const _ = require('lodash'); const { ApolloServer } = require('apollo-server-koa'); +const { buildFederatedSchema } = require('@apollo/federation'); const depthLimit = require('graphql-depth-limit'); const loadConfigs = require('./load-config'); @@ -84,9 +85,18 @@ module.exports = strapi => { return; } + // Get federation config + const isFederated = _.get(strapi.plugins.graphql, 'config.federation', false); + const schemaDef = {}; + if (isFederated) { + schemaDef.schema = buildFederatedSchema([{ typeDefs, resolvers }]); + } else { + schemaDef.typeDefs = typeDefs; + schemaDef.resolvers = resolvers; + } + const serverParams = { - typeDefs, - resolvers, + ...schemaDef, context: ({ ctx }) => { // Initiliase loaders for this request. // TODO: set loaders in the context not globally diff --git a/packages/strapi-plugin-graphql/package.json b/packages/strapi-plugin-graphql/package.json index f170144db7..324f69be11 100644 --- a/packages/strapi-plugin-graphql/package.json +++ b/packages/strapi-plugin-graphql/package.json @@ -11,6 +11,7 @@ "test": "echo \"no tests yet\"" }, "dependencies": { + "@apollo/federation": "^0.15.0", "apollo-server-koa": "2.9.12", "dataloader": "^1.4.0", "glob": "^7.1.4", diff --git a/packages/strapi-plugin-graphql/services/schema-generator.js b/packages/strapi-plugin-graphql/services/schema-generator.js index 5c4b8a31f5..3d9103d0d3 100644 --- a/packages/strapi-plugin-graphql/services/schema-generator.js +++ b/packages/strapi-plugin-graphql/services/schema-generator.js @@ -90,8 +90,14 @@ const generateSchema = () => { writeGenerateSchema(graphql.printSchema(schema)); } - // Remove custom scalar (like Upload); - typeDefs = Types.removeCustomScalar(typeDefs, resolvers); + // Remove custom scalar (like Upload), if not using Federation + // Federation requires scalar Upload defined in typeDefs to use + // buildFederatedSchema() + // (https://www.apollographql.com/docs/apollo-server/federation/implementing-services/) + const isFederated = _.get(strapi.plugins.graphql, 'config.federation', false); + if (!isFederated) { + typeDefs = Types.removeCustomScalar(typeDefs, resolvers); + } return { typeDefs: gql(typeDefs), diff --git a/yarn.lock b/yarn.lock index e4b10a508a..27a7696365 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,16 @@ # yarn lockfile v1 +"@apollo/federation@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@apollo/federation/-/federation-0.15.0.tgz#385f9fd4473e7ec1c3dbd251f80a054d47e28614" + integrity sha512-L6n41obKc0fLQdZ0uSHhHRJNCIAxZ5uDeqQON+Q+ewiUfS3XetCCf/cGpiiL50TIY/n8Bvh5ZPWLMTtP0tyw5g== + dependencies: + apollo-graphql "^0.4.0" + apollo-server-env "^2.4.3" + core-js "^3.4.0" + lodash.xorby "^4.7.0" + "@apollo/protobufjs@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@apollo/protobufjs/-/protobufjs-1.0.3.tgz#02c655aedd4ba7c7f64cbc3d2b1dd9a000a391ba" @@ -5708,6 +5718,11 @@ core-js@^3.0.1, core-js@^3.2.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647" integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw== +core-js@^3.4.0: + version "3.6.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" + integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== + core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -11405,6 +11420,11 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= +lodash.xorby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.xorby/-/lodash.xorby-4.7.0.tgz#9c19a6f9f063a6eb53dd03c1b6871799801463d7" + integrity sha1-nBmm+fBjputT3QPBtocXmYAUY9c= + lodash@4.17.12: version "4.17.12" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.12.tgz#a712c74fdc31f7ecb20fe44f157d802d208097ef" From baa034e1c05a3a1b8a21304b0c43c72be6766cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20GEORGET?= Date: Thu, 16 Jul 2020 11:07:39 +0200 Subject: [PATCH 11/17] Add noRun property in global scope (#7030) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Georget --- packages/strapi-generate-new/lib/utils/usage.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/strapi-generate-new/lib/utils/usage.js b/packages/strapi-generate-new/lib/utils/usage.js index 4e47c75dc3..64539988af 100644 --- a/packages/strapi-generate-new/lib/utils/usage.js +++ b/packages/strapi-generate-new/lib/utils/usage.js @@ -94,6 +94,7 @@ function trackUsage({ event, scope, error }) { version: scope.strapiVersion, docker: scope.docker, useYarn: scope.useYarn.toString(), + noRun: (scope.runQuickstartApp !== true).toString(), }, }); } catch (err) { From 3fbf9902d5a91a8f2dd5d42d4a7a9d588aa021ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1r=20Do=C4=9Fan?= Date: Thu, 16 Jul 2020 09:13:36 +0000 Subject: [PATCH 12/17] Update parameters.md (#6987) --- docs/3.0.0-beta.x/content-api/parameters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.0.0-beta.x/content-api/parameters.md b/docs/3.0.0-beta.x/content-api/parameters.md index d4b4a3a3e2..f7212d1412 100644 --- a/docs/3.0.0-beta.x/content-api/parameters.md +++ b/docs/3.0.0-beta.x/content-api/parameters.md @@ -59,7 +59,7 @@ If you use the same operator (except for in and nin) the values will be used to If you want to use `AND` for your query you will have to create a custom query by using the [Query](../concepts/queries.md) documentation. -Strapi doesn't support the `AND` opperator for now. +Strapi doesn't support the `AND` operator for now. ::: From a43b14e25068e6778b61ca11703e64f1821e81e2 Mon Sep 17 00:00:00 2001 From: Nick Hayden Date: Thu, 16 Jul 2020 19:18:48 +1000 Subject: [PATCH 13/17] FIX - Update regex error value for English translation (#6976) Co-authored-by: Nick Hayden --- .../strapi-helper-plugin/lib/src/testUtils/commonTrads.json | 2 +- .../admin/src/translations/en.json | 2 +- test/config/front/testUtils/commonTrads.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/strapi-helper-plugin/lib/src/testUtils/commonTrads.json b/packages/strapi-helper-plugin/lib/src/testUtils/commonTrads.json index 823b69517d..b56fec41c8 100644 --- a/packages/strapi-helper-plugin/lib/src/testUtils/commonTrads.json +++ b/packages/strapi-helper-plugin/lib/src/testUtils/commonTrads.json @@ -116,7 +116,7 @@ "components.Input.error.validation.min": "The value is too low.", "components.Input.error.validation.minLength": "The value is too short.", "components.Input.error.validation.minSupMax": "Can't be superior", - "components.Input.error.validation.regex": "The value not match the regex.", + "components.Input.error.validation.regex": "The value does not match the regex.", "components.Input.error.validation.required": "This value is required.", "components.ListRow.empty": "There is no data to be shown.", "components.OverlayBlocker.description": "You're using a feature that needs the server to restart. Please wait until the server is up.", diff --git a/packages/strapi-plugin-content-manager/admin/src/translations/en.json b/packages/strapi-plugin-content-manager/admin/src/translations/en.json index fc4edf904d..8368ecfb42 100644 --- a/packages/strapi-plugin-content-manager/admin/src/translations/en.json +++ b/packages/strapi-plugin-content-manager/admin/src/translations/en.json @@ -121,7 +121,7 @@ "error.validation.min": "The value is too low.", "error.validation.minLength": "The value is too short.", "error.validation.minSupMax": "Can't be superior", - "error.validation.regex": "The value not match the regex.", + "error.validation.regex": "The value does not match the regex.", "error.validation.required": "This value input is required.", "form.Input.bulkActions": "Enable bulk actions", diff --git a/test/config/front/testUtils/commonTrads.json b/test/config/front/testUtils/commonTrads.json index 0a3f916ba6..5a0c47f3c3 100644 --- a/test/config/front/testUtils/commonTrads.json +++ b/test/config/front/testUtils/commonTrads.json @@ -116,7 +116,7 @@ "components.Input.error.validation.min": "The value is too low.", "components.Input.error.validation.minLength": "The value is too short.", "components.Input.error.validation.minSupMax": "Can't be superior", - "components.Input.error.validation.regex": "The value not match the regex.", + "components.Input.error.validation.regex": "The value does not match the regex.", "components.Input.error.validation.required": "This value is required.", "components.ListRow.empty": "There is no data to be shown.", "components.OverlayBlocker.description": "You're using a feature that needs the server to restart. Please wait until the server is up.", From 1d5e3947f09c423410adb6c202b0e91e30b73c3b Mon Sep 17 00:00:00 2001 From: umutbozdag Date: Thu, 16 Jul 2020 12:23:13 +0300 Subject: [PATCH 14/17] =?UTF-8?q?#6954=20Possible=20mistake=20about=20data?= =?UTF-8?q?base=20file=20name=20in=20the=20docs=20(version=20=E2=80=A6=20(?= =?UTF-8?q?#6957)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * #6954 Possible mistake about database file name in the docs (version 3.x) * Update docs/v3.x/guides/databases.md Co-authored-by: Mattias van den Belt Co-authored-by: Mattias van den Belt --- docs/v3.x/guides/databases.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/v3.x/guides/databases.md b/docs/v3.x/guides/databases.md index 83bab3bfd3..5828827578 100644 --- a/docs/v3.x/guides/databases.md +++ b/docs/v3.x/guides/databases.md @@ -311,7 +311,7 @@ Please note the `` after your `username`. In this example, after `mong #### 5. Update and replace your existing `/database.js` config file for the appropriate environment (development | production). -Replace the contents of `/database.json` with the following and replace **< password >** with the password of the user of your database you created earlier: +Replace the contents of `/database.js` with the following and replace **< password >** with the password of the user of your database you created earlier: `Path: ./config/database.js`. @@ -339,9 +339,9 @@ DATABASE_URI=mongodb://paulbocuse:@strapidatabase-shard-00-00-fxxx6c.m ``` ::: warning NOTE -The above configuration will create a database called `strapi`, the _default database_ Strapi sets for any **MongoDB** database. If you would like to name your database something else, add the following **key:value pair** into your **"settings":** located in your `database.json` file. +The above configuration will create a database called `strapi`, the _default database_ Strapi sets for any **MongoDB** database. If you would like to name your database something else, add the following **key:value pair** into your **settings:** located in your `database.js` file. -`"database": "my-database-name"` +`database: 'my-database-name'` ::: From 5145148da140e74f20a438c6def1d03f2887462f Mon Sep 17 00:00:00 2001 From: Gil Fewster Date: Thu, 16 Jul 2020 19:24:32 +1000 Subject: [PATCH 15/17] Fixes: broken link to deployment page (#6934) Signed-off-by: Gil Fewster --- docs/v3.x/getting-started/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/v3.x/getting-started/installation.md b/docs/v3.x/getting-started/installation.md index 6ce3fe0b81..41b2102072 100644 --- a/docs/v3.x/getting-started/installation.md +++ b/docs/v3.x/getting-started/installation.md @@ -52,4 +52,4 @@ ### Deployment guides -For a more detailed overview of deployment please see the [related documentation](./deployment). +For a more detailed overview of deployment please see the [related documentation](./deployment.md). From b2d4fbfb12f899d6d43d75fa911e0845e31a35e2 Mon Sep 17 00:00:00 2001 From: Nikolaj Ivancic Date: Thu, 16 Jul 2020 06:48:05 -0400 Subject: [PATCH 16/17] Update configurations.md (#6731) --- docs/v3.x/concepts/configurations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/v3.x/concepts/configurations.md b/docs/v3.x/concepts/configurations.md index 14fc757b76..44a8c42043 100644 --- a/docs/v3.x/concepts/configurations.md +++ b/docs/v3.x/concepts/configurations.md @@ -111,7 +111,7 @@ env.date('VAR', new Date()); ## Environments -What if you need to specific static configurations for specific environments and using environment variables becomes tedious? +What if you need specific static configurations for specific environments and using environment variables becomes tedious? Strapi configurations can also be created per environment in `./config/env/{env}/{filename}`. These configurations will be merged into the base configurations defined in the `./config` folder. The environment is based on the `NODE_ENV` environment variable (defaults to `development`). From 9a6de2a5620e043f8497ab2377c4da3ff6b4400d Mon Sep 17 00:00:00 2001 From: Emmanuel Mahuni Date: Thu, 16 Jul 2020 14:02:50 +0200 Subject: [PATCH 17/17] Update migration-guide-beta.20-to-3.0.0.md (#6750) I did everything but noticed that the documentation isn't clear about hooks. I literally moved contents of the hook.json file to a new file hook.js without the settings key and nothing worked until I moved into settings key as specified in the hooks section. --- .../migration-guide-beta.20-to-3.0.0.md | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/v3.x/migration-guide/migration-guide-beta.20-to-3.0.0.md b/docs/v3.x/migration-guide/migration-guide-beta.20-to-3.0.0.md index 1e61f84f5f..c020579ed4 100644 --- a/docs/v3.x/migration-guide/migration-guide-beta.20-to-3.0.0.md +++ b/docs/v3.x/migration-guide/migration-guide-beta.20-to-3.0.0.md @@ -98,7 +98,33 @@ If you never configured any middlewares you can delete the file all together. Yo We applied the same logic from the `middleware` configuration to the `hook` configuration. -First you can create a file `./config/hook.js`, and you can move the content of `./config/hook.json` into it. +First you can create a file `./config/hook.js`, and you can move the content of `./config/hook.json` into it. Hooks should be placed under settings key eg: +```js +module.exports = { + timeout: 10000, + load: { + before: ['hook-1', 'hook-2'], + order: [ + "Define the hooks' load order by putting their names in this array in the right order", + ], + after: ['hook-3', 'hook4'], + }, + settings: { + 'hook-1': { + enabled: true + }, + 'hook-2': { + enabled: true + }, + 'hook-3': { + enabled: true + }, + 'hook4': { + enabled: true + }, + }, +}; +``` ::: tip If you never configured any hook you can delete the file all together. You can also only set the configurations you want to customize and leave the others out.