From ae57390a468941cfa13f1cf26e98a8520399a63a Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Mon, 27 Jun 2022 10:45:16 +0200 Subject: [PATCH 1/4] Bump version number to 4.2.1 (#971) --- docs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/package.json b/docs/package.json index bfbad4338d..2fd21cfa90 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "strapi-docs", - "version": "4.2.0", + "version": "4.2.1", "main": "index.js", "scripts": { "dev": "yarn create:config-file && vuepress dev", From 863fdcdb30e6104ae0ced6b5fa8bdc1e9c113cf3 Mon Sep 17 00:00:00 2001 From: meganelacheny Date: Tue, 28 Jun 2022 09:55:34 +0200 Subject: [PATCH 2/4] Telemetry: updates in "Usage Information" and CLI doc (#974) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Production release 4.2.0 (#937) * Use beta logo * [beta] Add TS command (#800) * Add TS command Signed-off-by: soupette * Use shorter instead of quicker :-) Co-authored-by: Pierre Wizla * [beta] Dark mode: Updates user guide + dev docs (#795) * Document dark mode in user guide * Add note in dev docs about custom theme extension and dark mode * Improve instructions for Interface mode setting in User guide * Add precisions in Dev docs callout for Dark mode * Update admin profile screenshot Co-authored-by: Mégane Lacheny * Slightly update wording for TS flag * Update core store migration * Added APP_KEYS to environmental variables table + fixed spelling error * added link to middlewares documentation * (WIP) Add permissions mapping tables * Fix typo * Added caution call out * Updated the telemetry opt-out method * Update amazon-aws.md: Wrong package mentioned (#830) Line 333 mentioned to run "npm install strapi-provider-upload-aws-s3". Above package is not working. New working package is "@strapi/provider-upload-aws-s3" * Missing information for plugin creation #834 As asked in the bug report here is a PR, unfortunately I am neither sure of where this information is best placed (as it might apply to other part of the framework configuration file as well) nor how to word it properly. * Include APP_KEYS in Heroku Deployment Guide Under title 5. Create your Strapi server config for production Update env/production/server.js to include app -> keys object Include bash command to set APP_KEYS environment variable on Heroku * Added caution callout and small text + formatting revisions * Apply suggestions from code review Co-authored-by: Shaun Brown <97027841+StrapiShaun@users.noreply.github.com> * docs: improve the Laravel Documentation * docs: fix typo in code section * Update azure.md * Finish adding permission mapping tables * Remove typescript from production release * Added migration guide * Added link to 4.1.8 migration guide * add comments for Shaun * updated with Derrick's suggestions * fixed spelling and phrasing * add JWT_SECRET code snippet * Fixed code for config/plugins * Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.0.x-to-4.1.8.md Co-authored-by: DMehaffy * Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.0.x-to-4.1.8.md Co-authored-by: DMehaffy * docs: fix typo (#853) * make render.com hosting guide work with strapi version >= v4.0.6 (#832) * make guide work with strapi v4 - set node version to 12.22.0 because install/build failed with 12.18.4 for i18n plugin. - add APP_KEYS env variable because its required since v4.0.6 * Update render.md Also add API_TOKEN_SALT variable to render.yaml blueprint file. It is needed since 4.1.8 See https://github.com/strapi/strapi/issues/13126 * Add additional commands for Heroku environment variables config (#850) * Add additional commands for Heroku environment variables config * fix typo * add random generation * Fixed phrasing Co-authored-by: Shaun Brown * Fixed config object example code There was one } that wasn't needed * remove API_TOKEN_SALT and APP_KEYS from env table * Update routes.md Fix missing comma * update link style * updated migration guide to match template. * Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.0.x-to-4.1.8.md Co-authored-by: Pierre Wizla * [v4 migration] MongoDB additions to data migration guide (#818) * Add first draft of MongoDB migration instructions (w/o cheatsheet) * Add raw, unedited cheatsheet for MongoDB vs. SQL differences * Add new MongoDB related files to TOC * Update data migration guide introduction * Enhance MongoDB main guide * Add MongoDB vs. SQL cheatsheet * minor cleanup Co-authored-by: derrickmehaffy * Lack one s in the file name middleware.js * Changed time based fields from snake case to camel case * docs: fixed command to start strapi (#870) * Update plugins-extension.md (#876) Correct way to push new routes while extending a plugin * fix: use correct key parameter for azure deploy (#874) Azure CLI uses `--account-key` rather than `--access-key` now * Upload: improve code examples (#806) * Upload: improve code examples * Remove heading inside tab * Merge 2 lines * Format examples as code-group Co-authored-by: Pierre Wizla Co-authored-by: Pierre Wizla * Update services.md (#880) The service name is changed from `api::restaurant.restaurant` to `api::email.email` to avoid confusion. * Remove useless callout (#888) * Force node 14 (#890) * Update latest supported versions & expand docs (#883) * Update amazon-aws.md Update versions to latest supported. Expanded comments on some code blocks * Clarify instruction * Update CONTRIBUTING.md According to the `package.json` from the official Strapi repo, Node 16.x.x is now supported. [Reference](https://github.com/strapi/strapi/blob/e8215ffcd7aefae42a524670923c1cc34837400f/package.json#L124) * Update Node's latest supported version * Update Node's oldest supported version * Remove useless callout (#888) * Force node 14 (#890) * Update CONTRIBUTING.md * Update README.md * Update amazon-aws.md * Update amazon-aws.md * Update amazon-aws.md * Update amazon-aws.md Update versions to latest supported. Expanded comments on some code blocks * Clarify instruction * Update CONTRIBUTING.md According to the `package.json` from the official Strapi repo, Node 16.x.x is now supported. [Reference](https://github.com/strapi/strapi/blob/e8215ffcd7aefae42a524670923c1cc34837400f/package.json#L124) * Update Node's latest supported version * Update Node's oldest supported version * Update CONTRIBUTING.md * Update README.md * Update amazon-aws.md * Update amazon-aws.md * Update amazon-aws.md * Update leftover GraphQL plugin config structure * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md Co-authored-by: Pierre Wizla Co-authored-by: DMehaffy * Fix wrong wording in model information (#887) * Add migration guide to 4.1.10 (#885) * add migration guide to 4.1.10 * Update file name * Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.1.8+-to-4.1.10.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.1.8+-to-4.1.10.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.1.8+-to-4.1.10.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.1.8+-to-4.1.10.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.1.8+-to-4.1.10.md Co-authored-by: Pierre Wizla * Add redirects plugin and rename v4 migration guides to match new std Co-authored-by: Pierre Wizla Co-authored-by: derrickmehaffy * Fix predefined hook's name. (#884) * Strapi-maintained plugins descriptions (#833) * Added content * Added content about plugins * added png files for plugins * added more logo png files * fixed missing file extension * Revised and added content * Revised text and table cleanup * Revised Gatsby preview plugin content * revised intro section * fixed spelling and formatting * Revised Email plugin * Added comment for U&P default deprecation * Added content for Sentry plugin * removed empty line * GraphQL description improvement & Market reference cleanup * added sidebarDepth * Edit introduction * fixed punctuation etc + Mégane's suggestions * Revised the SEO plugin description * Update docs/user-docs/latest/plugins/strapi-plugins.md Co-authored-by: Pierre Wizla * Update docs/user-docs/latest/plugins/strapi-plugins.md Co-authored-by: Pierre Wizla * Update docs/user-docs/latest/plugins/strapi-plugins.md Co-authored-by: Pierre Wizla * Update docs/user-docs/latest/plugins/strapi-plugins.md Co-authored-by: Pierre Wizla * Update docs/user-docs/latest/plugins/strapi-plugins.md Co-authored-by: Pierre Wizla * fixed various issues * Add dark reader-friendly logos * Update docs/user-docs/latest/plugins/strapi-plugins.md Co-authored-by: meganelacheny * Update docs/user-docs/latest/plugins/strapi-plugins.md Co-authored-by: meganelacheny * fixed spelling * Update docs/user-docs/latest/plugins/strapi-plugins.md Co-authored-by: meganelacheny * Delint and small wording fixes * fixed typos and formatting * updated the Gatsby preview plugin details Co-authored-by: Pierre Wizla Co-authored-by: meganelacheny * Remove populateCreatorFields from models (#881) * Add NodeJS link to NODE_ENV=production (#879) * changed env example * add NODE_ENV callout * added Nodejs link to explain NODE_ENV=production * Update table "note" format Co-authored-by: Pierre Wizla * Fix the example code for registering hooks (#877) Code was broken several places: - you need to return an object with the original arguments, not an array - you cannot always write JSX directly in a .js file (according to your configuration) Co-authored-by: Pierre Wizla * Update update-version.md * typo * Update services.md (#896) Just add a missing parentheses in the example code. * Removed the getPlugin part for content-manager Hi, I have updated the docs because it contains an issue on line 122 in the bootstrap function. According to the previous docs the following code was needed: ``` app .getPlugin('content-manager') .injectContentManagerComponent('editView', 'right-links', { name: 'my-compo', Component: () => 'my-compo' }) ``` Instead the right way of doing it and results in working code below. Since there is already a build in function to inject components in the content manager section by calling "injectContentManagerComponent": ``` app.injectContentManagerComponent('editView', 'right-links', { name: 'my-compo', Component: () => 'my-compo' }) ``` * Add caution call out to documentation plugin * Update docs/developer-docs/latest/plugins/documentation.md Great suggestion! Co-authored-by: meganelacheny * Add caution callout above custom routes config (#901) * Add caution callout above custom routes config * Simplify callout wording and make example more explicit Co-authored-by: Pierre Wizla * docs typo (#871) * Configure last-updated plugin output (#905) * Replace logo with SVG version To fix resolution issues pointed out by Aurélien :-) Thanks Daniele Brusca! * Add 2x PNG logo Just in case * Add a tip to content type schema migration page and link to Codemods (#902) * Update content-type-schema.md * Update content-type-schema.md * Update for brevity Co-authored-by: Pierre Wizla * Fix missing closing tip markup + improve wording * Improve wording further for codemods tip * Update populating-fields.md (#913) correct the operator name * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Fix typo Signed-off-by: Derrick Mehaffy * Fix 404 on migration guides * Update node versions * typo in Collection by Field section (#927) * Fix upload example for Node.js (#908) Upload example with Node.js wasn't working out of the box. This change fixes the example. * Update 11ty.md with Strapi v4 (#909) * Update Autocreate Slug with Lifecycles (#910) In Strapi the `./src/api/models` path seems to be replaced this path: `./src/api/[api-name]/content-types/[content-type-name]/lifecycles.js` using the `lifecycles.js` file. I updated the guide to reflect this changes, since doing what the guid suspects has no effect.:) * Fix middleware structure Fixes #886 * Add missing acquireConnectionTimeout config option to database (#929) * Add missing acquireConnectionTimeout config option to database * change ms to milliseconds * Release 4.2.0 to staging (#933) * Logo customization via admin panel (#855) * Write custom logo documentation in user guide * Add new icons * Fix custom logo explanations + add note in dev docs * Fix typos and improve phrasing * Improve callouts * Add precisions in callout * Add screenshot * Improve documentation after reviews * Update screenshot * minor cleanups and rewriting middleware documentation with examples (#912) * minor cleanups and rewriting middleware documentation Signed-off-by: Derrick Mehaffy * finish all the middlewares * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md Co-authored-by: Gabriel <83644514+gpene@users.noreply.github.com> * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md Co-authored-by: Pierre Wizla * Slightly reword code comment * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * more cleanup * Update wording Co-authored-by: Gabriel <83644514+gpene@users.noreply.github.com> Co-authored-by: Pierre Wizla * Digital Ocean app platform deployment guide (#857) * Created new Digital Ocean App Platform deployment guide * Rough outline for deploying on DO-AP * fix top matter * Add server.js/ts and database.js/ts min config snippets * Add postgres dependencies commands & rough DO directions * Added DO config steps * fixed text in callout * fix code snippets and delint * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digital-ocean-app-platform-2022.md Co-authored-by: DMehaffy * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digital-ocean-app-platform-2022.md Co-authored-by: DMehaffy * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digital-ocean-app-platform-2022.md Co-authored-by: DMehaffy * added text for server config and GitHub quickstart link * add GitHub quickstart link and server.js config details * Corrected Digital Ocean to DigitalOcean * Fixed spelling and delint + changed file name * rebase * fix database name * Fixed the first section * change environment variable heading title and clean up section * cleanup caps * change heading level * fixed file path and added server config intro * add pg package link * fixed code blocks * add formatting to App access link * delint * fixed spelling and punctuation * fixed misc formatting * revised deployment section * cleaned up code blocks + misc formatting * fix code typo * fixed code block formatting * improve text * revised intro * code cleanup * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: meganelacheny * Change file name and misc fixes * remove alt file name * delete draft file * added space for "// path" * fixed various things * Rewrite the Strapi project section * fixed the managed database deployment directions * fixed typo * remove text * changed table format * cleaned up text * fixed misc small issues * Edited the managed database section * small wording fix * add link to env table * change casing * small fixes * clarify the saving changes step * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform.md Co-authored-by: DMehaffy * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform.md Co-authored-by: DMehaffy * Update environment variables directions Co-authored-by: DMehaffy Co-authored-by: Pierre Wizla Co-authored-by: meganelacheny * Updates plugins user guide for marketplace providers (#923) * update plugins user guide for marketplace providers * Incorporate feedback * Update installing-plugins-via-marketplace.md * update screenshots * fix typo * crop image * Fix broken links * Update marketplace screenshot * Drop v12 support (#928) * Drop v12 support (>=14.19.1 <=16.x.x) * Update node version in FAQ * Keep v14 as most recommended * Moved middleware list into a table with installed vs required (#936) * Moved middleware list into a table with installed vs required * pr feedback * revert to piwi's vs code extension for tables Co-authored-by: Pierre Wizla * Add callout about templates being reworked (#938) * Update again node version in telemetry docs * Update templates callout title * Bump version number to 4.2.0 * chore: update React docs to function components (#897) Co-authored-by: meganelacheny Co-authored-by: DMehaffy Co-authored-by: Gabriel <83644514+gpene@users.noreply.github.com> Co-authored-by: Shaun Brown <97027841+StrapiShaun@users.noreply.github.com> Co-authored-by: Michaël De Boey * Remove TypeScript code snippets from DigitalOcean deployment guide (#940) * Logo customization via admin panel (#855) * Write custom logo documentation in user guide * Add new icons * Fix custom logo explanations + add note in dev docs * Fix typos and improve phrasing * Improve callouts * Add precisions in callout * Add screenshot * Improve documentation after reviews * Update screenshot * minor cleanups and rewriting middleware documentation with examples (#912) * minor cleanups and rewriting middleware documentation Signed-off-by: Derrick Mehaffy * finish all the middlewares * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md Co-authored-by: Gabriel <83644514+gpene@users.noreply.github.com> * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md Co-authored-by: Pierre Wizla * Slightly reword code comment * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * more cleanup * Update wording Co-authored-by: Gabriel <83644514+gpene@users.noreply.github.com> Co-authored-by: Pierre Wizla * Digital Ocean app platform deployment guide (#857) * Created new Digital Ocean App Platform deployment guide * Rough outline for deploying on DO-AP * fix top matter * Add server.js/ts and database.js/ts min config snippets * Add postgres dependencies commands & rough DO directions * Added DO config steps * fixed text in callout * fix code snippets and delint * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digital-ocean-app-platform-2022.md Co-authored-by: DMehaffy * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digital-ocean-app-platform-2022.md Co-authored-by: DMehaffy * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digital-ocean-app-platform-2022.md Co-authored-by: DMehaffy * added text for server config and GitHub quickstart link * add GitHub quickstart link and server.js config details * Corrected Digital Ocean to DigitalOcean * Fixed spelling and delint + changed file name * rebase * fix database name * Fixed the first section * change environment variable heading title and clean up section * cleanup caps * change heading level * fixed file path and added server config intro * add pg package link * fixed code blocks * add formatting to App access link * delint * fixed spelling and punctuation * fixed misc formatting * revised deployment section * cleaned up code blocks + misc formatting * fix code typo * fixed code block formatting * improve text * revised intro * code cleanup * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: meganelacheny * Change file name and misc fixes * remove alt file name * delete draft file * added space for "// path" * fixed various things * Rewrite the Strapi project section * fixed the managed database deployment directions * fixed typo * remove text * changed table format * cleaned up text * fixed misc small issues * Edited the managed database section * small wording fix * add link to env table * change casing * small fixes * clarify the saving changes step * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform.md Co-authored-by: DMehaffy * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform.md Co-authored-by: DMehaffy * Update environment variables directions Co-authored-by: DMehaffy Co-authored-by: Pierre Wizla Co-authored-by: meganelacheny * Updates plugins user guide for marketplace providers (#923) * update plugins user guide for marketplace providers * Incorporate feedback * Update installing-plugins-via-marketplace.md * update screenshots * fix typo * crop image * Fix broken links * Update marketplace screenshot * Drop v12 support (#928) * Drop v12 support (>=14.19.1 <=16.x.x) * Update node version in FAQ * Keep v14 as most recommended * Moved middleware list into a table with installed vs required (#936) * Moved middleware list into a table with installed vs required * pr feedback * revert to piwi's vs code extension for tables Co-authored-by: Pierre Wizla * Add callout about templates being reworked (#938) * Update again node version in telemetry docs * Update templates callout title * Remove TypeScript code snippets from DigitalOcean deployment guide * remove additional typescript refs Co-authored-by: meganelacheny Co-authored-by: DMehaffy Co-authored-by: Gabriel <83644514+gpene@users.noreply.github.com> Co-authored-by: Pierre Wizla Co-authored-by: Pierre Wizla * Update Marketplace-v4.png (#941) replace marketplace image * Fix upload code example Co-authored-by: Gustav Hansen * Fix code example in upload.md Co-authored-by: derrickmehaffy Co-authored-by: cyril lopez Co-authored-by: Mégane Lacheny Co-authored-by: Shaun Brown Co-authored-by: Dan Siddoway Co-authored-by: Shaun Brown <97027841+StrapiShaun@users.noreply.github.com> Co-authored-by: spreadcharm Co-authored-by: Dimitri Gilbert Co-authored-by: David <64162682+dsfaccini@users.noreply.github.com> Co-authored-by: Daniel Sum Co-authored-by: Mohammed Muqtadir Ahad <50536283+kulahad@users.noreply.github.com> Co-authored-by: Alisan Stoll <23653980+inc-ali@users.noreply.github.com> Co-authored-by: Nico Hofmair Co-authored-by: Adria Lopez Co-authored-by: Elías Leyton Co-authored-by: Thomas PEDOT Co-authored-by: Richard Co-authored-by: NiWA Co-authored-by: Rajat Co-authored-by: Thomas F. K. Jorna Co-authored-by: Gustav Hansen Co-authored-by: Rajat Co-authored-by: André Vital Co-authored-by: Pierre Noël Co-authored-by: horiken Co-authored-by: Pascal Vaccaro Co-authored-by: Grim Co-authored-by: Jean-Baptiste Crestot Co-authored-by: Alejandro Llanes Co-authored-by: Kevin Vugts Co-authored-by: Fabien del Carmen Co-authored-by: alex Co-authored-by: Ignacio Tonoli de Maussion Co-authored-by: Ben <3126319718@qq.com> Co-authored-by: John Skoteiniotis Co-authored-by: arslan Co-authored-by: Guillaume Girou Co-authored-by: derschiw <37687705+derschiw@users.noreply.github.com> Co-authored-by: Gabriel <83644514+gpene@users.noreply.github.com> Co-authored-by: Michaël De Boey * Update Usage Information to mention telemetry:enable command * Update CLI doc with telemetry commands * Add link to Usage Information in CLI doc Co-authored-by: Pierre Wizla Co-authored-by: derrickmehaffy Co-authored-by: cyril lopez Co-authored-by: Shaun Brown Co-authored-by: Dan Siddoway Co-authored-by: Shaun Brown <97027841+StrapiShaun@users.noreply.github.com> Co-authored-by: spreadcharm Co-authored-by: Dimitri Gilbert Co-authored-by: David <64162682+dsfaccini@users.noreply.github.com> Co-authored-by: Daniel Sum Co-authored-by: Mohammed Muqtadir Ahad <50536283+kulahad@users.noreply.github.com> Co-authored-by: Alisan Stoll <23653980+inc-ali@users.noreply.github.com> Co-authored-by: Nico Hofmair Co-authored-by: Adria Lopez Co-authored-by: Elías Leyton Co-authored-by: Thomas PEDOT Co-authored-by: Richard Co-authored-by: NiWA Co-authored-by: Rajat Co-authored-by: Thomas F. K. Jorna Co-authored-by: Gustav Hansen Co-authored-by: Rajat Co-authored-by: André Vital Co-authored-by: Pierre Noël Co-authored-by: horiken Co-authored-by: Pascal Vaccaro Co-authored-by: Grim Co-authored-by: Jean-Baptiste Crestot Co-authored-by: Alejandro Llanes Co-authored-by: Kevin Vugts Co-authored-by: Fabien del Carmen Co-authored-by: alex Co-authored-by: Ignacio Tonoli de Maussion Co-authored-by: Ben <3126319718@qq.com> Co-authored-by: John Skoteiniotis Co-authored-by: arslan Co-authored-by: Guillaume Girou Co-authored-by: derschiw <37687705+derschiw@users.noreply.github.com> Co-authored-by: Gabriel <83644514+gpene@users.noreply.github.com> Co-authored-by: Michaël De Boey Co-authored-by: Pierre Wizla --- .../latest/developer-resources/cli/CLI.md | 16 ++++++++++++++++ .../latest/getting-started/usage-information.md | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/developer-docs/latest/developer-resources/cli/CLI.md b/docs/developer-docs/latest/developer-resources/cli/CLI.md index 872b31d921..c4df7b6094 100644 --- a/docs/developer-docs/latest/developer-resources/cli/CLI.md +++ b/docs/developer-docs/latest/developer-resources/cli/CLI.md @@ -334,6 +334,22 @@ options [--delete-files] Some plugins have admin panel integrations, your admin panel might have to be rebuilt. This can take some time. ::: +## strapi telemetry:disable + +Disable data collection for the project (see [Usage Information](/developer-docs/latest/getting-started/usage-information.md)). + +```bash +strapi telemetry:disable +``` + +## strapi telemetry:enable + +Re-enable data collection for the project after it was disabled (see [Usage Information](/developer-docs/latest/getting-started/usage-information.md)). + +```bash +strapi telemetry:enable +``` + ## strapi console Start the server and eval commands in your application in real time. diff --git a/docs/developer-docs/latest/getting-started/usage-information.md b/docs/developer-docs/latest/getting-started/usage-information.md index 282f374e06..61c2cf0a29 100644 --- a/docs/developer-docs/latest/getting-started/usage-information.md +++ b/docs/developer-docs/latest/getting-started/usage-information.md @@ -68,7 +68,9 @@ yarn strapi telemetry:disable -Alternatively, the `telemetryDisabled: true` flag in the project `package.json` file will also disable data collection. Deleting the flag or setting it to false will re-enable data collection. +Alternatively, the `telemetryDisabled: true` flag in the project `package.json` file will also disable data collection. + +Data collection can later be re-enabled by deleting the flag or setting it to false, or by using the `telemetry:enable` command. ::: note If you have any questions or concerns regarding data collection, please contact us at the following email address [privacy@strapi.io](mailto:privacy@strapi.io). From f28e8e33df0850d7eaabe2790f2ce6d6359a3fc6 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Tue, 28 Jun 2022 11:59:20 +0200 Subject: [PATCH 3/4] Mention admin panel extension through plugins is impossible (#967) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Mention that plugins cannot extend the admin panel for now * Add link to user guide marketplace docs * Rework the content and structure a bit * Update forking → patch-package --- .../latest/development/plugins-extension.md | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/docs/developer-docs/latest/development/plugins-extension.md b/docs/developer-docs/latest/development/plugins-extension.md index 4cc3181314..e09c65b09e 100644 --- a/docs/developer-docs/latest/development/plugins-extension.md +++ b/docs/developer-docs/latest/development/plugins-extension.md @@ -7,7 +7,7 @@ canonicalUrl: https://docs.strapi.io/developer-docs/latest/development/plugins-e # Plugins extension -Strapi comes with [plugins](/developer-docs/latest/plugins/plugins-intro.md) that can be installed from the Marketplace or as npm packages. You can also create your own plugins (see [plugins development](/developer-docs/latest/development/plugins-development.md)) or extend the existing ones. +Strapi comes with [plugins](/developer-docs/latest/plugins/plugins-intro.md) that can be installed from the [Marketplace](/user-docs/latest/plugins/installing-plugins-via-marketplace.md#installing-marketplace-plugins-and-providers) or as npm packages. You can also create your own plugins (see [plugins development](/developer-docs/latest/development/plugins-development.md)) or extend the existing ones. Plugin extensions code is located in the `./src/extensions` folder (see [project structure](/developer-docs/latest/setup-deployment-guides/file-structure.md)). Some plugins automatically create files there, ready to be modified. @@ -16,7 +16,6 @@ Plugin extensions code is located in the `./src/extensions` folder (see [project ```bash /extensions /some-plugin-to-extend - strapi-admin.js strapi-server.js /content-types /some-content-type-to-extend @@ -24,16 +23,26 @@ Plugin extensions code is located in the `./src/extensions` folder (see [project /another-content-type-to-extend model.json /another-plugin-to-extend - strapi-admin.js + strapi-server.js ``` ::: Plugins can be extended in 2 ways: -- [extending the plugin's Content-Types](#extending-a-plugin-s-content-types) +- [extending the plugin's content-types](#extending-a-plugin-s-content-types) - [extending the plugin's interface](#extending-a-plugin-s-interface) (e.g. to add controllers, services, policies, middlewares and more) +::: note +Currently it's not possible to extend the admin panel part of a plugin. Consider using [patch-package](https://www.npmjs.com/package/patch-package) if admin panel customizations are required. +::: + +:::warning +New versions of Strapi are released with [migration guides](/developer-docs/latest/update-migration-guides/migration-guides.md), but these guides might not cover unexpected breaking changes in your plugin extensions. Consider forking a plugin if extensive customizations are required. +::: + +## Extending a plugin's content-types + A plugin's Content-Types can be extended in 2 ways: using the programmatic interface within `strapi-server.js` and by overriding the content-types schemas. The final schema of the content-types depends on the following loading order: @@ -43,20 +52,14 @@ The final schema of the content-types depends on the following loading order: 3. the content-types declarations in the [`content-types` key exported from `strapi-server.js`](/developer-docs/latest/developer-resources/plugin-api-reference/server.md#content-types) 4. the content-types declarations in the [`register()` function](/developer-docs/latest/setup-deployment-guides/configurations/optional/functions.md#register) of the Strapi application -:::warning -New versions of Strapi are released with [migration guides](/developer-docs/latest/update-migration-guides/migration-guides.md), but these guides might not cover unexpected breaking changes in your plugin extensions. Consider forking a plugin if extensive customizations are required. -::: - -## Extending a plugin's Content-Types - -To overwrite a plugin's [Content-Types](/developer-docs/latest/development/backend-customization/models.md): +To overwrite a plugin's [content-types](/developer-docs/latest/development/backend-customization/models.md): 1. _(optional)_ Create the `./src/extensions` folder at the root of the app, if the folder does not already exist. 2. Create a subfolder with the same name as the plugin to be extended. 3. Create a `content-types` subfolder. 4. Inside the `content-types` subfolder, create another subfolder with the same [singularName](/developer-docs/latest/development/backend-customization/models.md#model-information) as the content-type to overwrite. -5. Inside this `content-types/name-of-content-type` subfolder, define the new schema for the Content-Type in a `schema.json` file (see [schema](/developer-docs/latest/development/backend-customization/models.md#model-schema) documentation). -6. _(optional)_ Repeat steps 4 and 5 for each Content-Type to overwrite. +5. Inside this `content-types/name-of-content-type` subfolder, define the new schema for the content-type in a `schema.json` file (see [schema](/developer-docs/latest/development/backend-customization/models.md#model-schema) documentation). +6. _(optional)_ Repeat steps 4 and 5 for each content-type to overwrite. ## Extending a plugin's interface @@ -70,13 +73,11 @@ A plugin's interface can be extended at step 2 (i.e. within `./src/extensions`) ### Within the extensions folder -To extend a plugin's interface using the `./src/extensions` folder: +To extend a plugin's server interface using the `./src/extensions` folder: 1. _(optional)_ Create the `./src/extensions` folder at the root of the app, if the folder does not already exist. 2. Create a subfolder with the same name as the plugin to be extended. -3. Depending on what needs to be extended: - * create a `strapi-server.js` file to extend a plugin's back end using the [Server API](/developer-docs/latest/developer-resources/plugin-api-reference/server.md) - * or create a `strapi-admin.js` file to extend the admin panel with the [Admin Panel API](/developer-docs/latest/developer-resources/plugin-api-reference/admin-panel.md). +3. Create a `strapi-server.js` file to extend a plugin's back end using the [Server API](/developer-docs/latest/developer-resources/plugin-api-reference/server.md). 4. Within this file, define and export a function. The function receives the `plugin` interface as an argument so it can be extended. ::: details Example of backend extension From 86b5fb75ae4c1c3f9c1cfd31385874559839ae92 Mon Sep 17 00:00:00 2001 From: Gustav Hansen Date: Tue, 28 Jun 2022 18:18:05 +0200 Subject: [PATCH 4/4] GraphQL: Improve plugin configuration (#969) * GraphQL: Improve plugin configuration * Improve copy, Capitalize headers, add more options * Graphql: Improve copy * Graphql: cleanup example * Add further improvements to the GraphQL plugin and config. docs * Fix typos * Simplify link call Co-authored-by: Pierre Wizla --- docs/developer-docs/latest/plugins/graphql.md | 43 +++++-------------- .../configurations/optional/plugins.md | 21 ++++++--- 2 files changed, 26 insertions(+), 38 deletions(-) diff --git a/docs/developer-docs/latest/plugins/graphql.md b/docs/developer-docs/latest/plugins/graphql.md index 5e36e079e1..43cd9b04d9 100644 --- a/docs/developer-docs/latest/plugins/graphql.md +++ b/docs/developer-docs/latest/plugins/graphql.md @@ -15,7 +15,7 @@ The [GraphQL API reference](/developer-docs/latest/developer-resources/database- ## Usage -To get started with GraphQL in your app, please install the plugin first. To do that, open your terminal and run the following command: +To get started with GraphQL in your application, please install the plugin first. To do that, open your terminal and run the following command: @@ -33,44 +33,21 @@ yarn strapi install graphql -Then, start your app and open your browser at [http://localhost:1337/graphql](http://localhost:1337/graphql). You should see the interface (**GraphQL Playground**) that will help you to write GraphQL query to explore your data. +Then, start your app and open your browser at [http://localhost:1337/graphql](http://localhost:1337/graphql). You should now be able to access the **GraphQL Playground** that will help you to write your GraphQL queries and mutations. -## Configurations - -By default, the [Shadow CRUD](#shadow-crud) feature is enabled and the GraphQL path 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. - - +:::note +The GraphQL Playground is enabled by default for both the development and staging environments, but disabled in production environments. Set the `playgroundAlways` configuration option to `true` to also enable the GraphQL Playground in production environments (see [plugins configuration documentation](/developer-docs/latest/setup-deployment-guides/configurations/optional/plugins.md#graphql-configuration)). +::: -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. +## Configuration -You can also setup any [Apollo Server options](https://www.apollographql.com/docs/apollo-server/api/apollo-server/#apolloserver) with the `apolloServer` option. For example, you can enable the 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/). +Plugins configuration are defined in the `config/plugins.js` file. This configuration file can include a `graphql.config` object to define specific configurations for the GraphQL plugin (see [plugins configuration documentation](/developer-docs/latest/setup-deployment-guides/configurations/optional/plugins.md#graphql-configuration)). -You can edit these [configurations](/developer-docs/latest/setup-deployment-guides/configurations/optional/plugins.md) by creating the following file: +[Apollo Server](https://www.apollographql.com/docs/apollo-server/api/apollo-server/#apolloserver) options can be set with the `graphql.config.apolloServer` [configuration object](/developer-docs/latest/setup-deployment-guides/configurations/optional/plugins.md#graphql-configuration). Apollo Server options can be used for instance to enable the [tracing feature](https://www.apollographql.com/docs/federation/metrics/), which is supported by the GraphQL playground to track the response time of each part of your query. -:::caution -Please note the setting for GraphQL `tracing` as changed and has been moved to `apolloServer.tracing` +::: caution +The maximum number of items returned by the response is limited to 100 by default. This value can be changed using the `amountLimit` configuration option, but should only be changed after careful consideration: a large query can cause a DDoS (Distributed Denial of Service) and may cause abnormal load on your Strapi server, as well as your database server. ::: - -```js -// path: ./config/plugins.js - -module.exports = { - // - graphql: { - config: { - endpoint: '/graphql', - shadowCRUD: true, - playgroundAlways: false, - depthLimit: 7, - amountLimit: 100, - apolloServer: { - tracing: false, - }, - }, - }, -}; -``` - ## Shadow CRUD To simplify and automate the build of the GraphQL schema, we introduced the Shadow CRUD feature. It automatically generates the type definitions, queries, mutations and resolvers based on your models. diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations/optional/plugins.md b/docs/developer-docs/latest/setup-deployment-guides/configurations/optional/plugins.md index c314ee20f0..166711caed 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations/optional/plugins.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations/optional/plugins.md @@ -44,12 +44,19 @@ If no specific configuration is required, a plugin can also be declared with the ## GraphQL configuration -The [GraphQL plugin](/developer-docs/latest/plugins/graphql.md) has the following specific configuration options: +The [GraphQL plugin](/developer-docs/latest/plugins/graphql.md) has the following specific configuration options that should be declared in a `graphql.config` object. All parameters are optional: -| Parameter | Description | Type | -| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -| `defaultLimit` | Default value for [the `pagination[limit]` parameter](/developer-docs/latest/developer-resources/database-apis-reference/graphql-api.md#pagination-by-offset) used in API calls | `Integer` | -| `maxLimit` | Maximum value for [the `pagination[limit]` parameter](/developer-docs/latest/developer-resources/database-apis-reference/graphql-api.md#pagination-by-offset) used in API calls | `Integer` | +| Parameter | Description | Type | Default | +| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------- | +| `apolloServer` | Additional configuration for [`ApolloServer`](https://www.apollographql.com/docs/apollo-server/api/apollo-server/#apolloserver). | Object | `{}` | +| `artifacts` | Object containing filepaths, defining where to store generated articats. Can include the following properties:
  • `schema`: path to the generated GraphQL schema file
  • `typegen`: path to generated TypeScript types
Only works if `generateArtifacts` is set to `true`. | Object |
  • `schema: false`
  • `typegen: false`
| +| `defaultLimit` | Default value for [the `pagination[limit]` parameter](/developer-docs/latest/developer-resources/database-apis-reference/graphql-api.md#pagination-by-offset) used in API calls | Integer | +| `depthLimit` | Limits the [complexity of GraphQL queries](https://www.npmjs.com/package/graphql-depth-limit). | Integer | `10` | +| `generateArtifacts`| Whether Strapi should automatically generate and output a GraphQL schema file and corresponding TypeScript definitions.

The file system location can be configured through `artifacts`. | Boolean | `false` | +| `maxLimit` | Maximum value for [the `pagination[limit]` parameter](/developer-docs/latest/developer-resources/database-apis-reference/graphql-api.md#pagination-by-offset) used in API calls | Integer | `-1` | +| `playgroundAlways` | Whether the playground should be publicly exposed.

Enabled by default in if `NODE_ENV` is set to `development`. | Boolean | `false` | +| `shadowCRUD` | Whether type definitions for queries, mutations and resolvers based on models should be created automatically (see [Shadow CRUD documentation](/developer-docs/latest/plugins/graphql.md#shadow-crud)). | Boolean | `true` | +| `subscriptions` | Enable GraphQL subscriptions. | Boolean | `false` | ```js // path: ./config/plugins.js @@ -58,8 +65,12 @@ module.exports = () => ({ graphql: { enabled: true, config: { + playgroundAlways: false, defaultLimit: 10, maxLimit: 20 + apolloServer: { + tracing: true, + }, } } })