From 924e581d5d4adb0c80da8e1da5f5f87214047a24 Mon Sep 17 00:00:00 2001 From: Mattias van den Belt Date: Fri, 24 Sep 2021 10:52:45 +0200 Subject: [PATCH] Update README.md and dependencies --- README.md | 21 ++---- package.json | 2 +- yarn.lock | 206 +++++++++++++++++++++++++-------------------------- 3 files changed, 111 insertions(+), 118 deletions(-) diff --git a/README.md b/README.md index bd17a34..6a6467d 100644 --- a/README.md +++ b/README.md @@ -97,24 +97,19 @@ module.exports = { You can access the algolia javascript client, read the [official documentation](https://www.algolia.com/doc/api-reference/api-methods/) to know more. ```js -/** - * api/my-model/controllers/my-model.js - */ +// api/my-model/controllers/my-model.js module.exports = { async myController(ctx) { - // ... - // https://www.algolia.com/doc/api-reference/api-methods/ - const { client } = strapi.services.algolia - await client.listIndices() + const { client } = strapi.services.algolia; + await client.listIndices(); // ... }, } ``` - ## Hook config To activate and configure the hook, you need to create or update the file `./config/hook.js` in your strapi app. @@ -128,21 +123,19 @@ To activate and configure the hook, you need to create or update the file `./con applicationId: 'ABCDEFGHIJ', apiKey: 'secure_algolia_admin_api_key', debug: true, // default: false - prefix: 'my_own_prefix' // default: Strapi environment (strapi.config.environment) + prefix: 'my_own_prefix', // default: Strapi environment (strapi.config.environment) }, } }; ``` ### Prefix -The default prefix uses `strapi.config.environment`, resulting in for example: 'development_post'. - -A custom prefix can be configured with the `prefix` option in the hook config. - +The default prefix uses `strapi.config.environment`, resulting in for example: 'development_post'. +A custom prefix can be configured with the `prefix` option in the hook config. If you don't want to use any prefix at all, you can configure it with: `prefix: false`. ### Support -- [Strapi community on Slack](http://slack.strapi.io), feel free to DM me (@MattieBelt). +- [Strapi community on Discord](https://discord.strapi.io), feel free to DM me (@MattieBelt). - [GitHub issues](https://github.com/MattieBelt/strapi-hook-algolia/issues) for bugs 🐛, contributions 🔧 or just anything to discuss 💬. ### Resources diff --git a/package.json b/package.json index cd87fe7..0d61f87 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "main": "lib", "dependencies": { - "algoliasearch": "^4.9.1" + "algoliasearch": "^4.10.5" }, "strapi": { "isHook": true diff --git a/yarn.lock b/yarn.lock index 14b0e36..7818836 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,126 +2,126 @@ # yarn lockfile v1 -"@algolia/cache-browser-local-storage@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.9.1.tgz#784e91580dcca00a8280b0905197f5abbbdf4b48" - integrity sha512-bAUU9vKCy45uTTlzJw0LYu1IjoZsmzL6lgjaVFaW1crhX/4P+JD5ReQv3n/wpiXSFaHq1WEO3WyH2g3ymzeipQ== +"@algolia/cache-browser-local-storage@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.10.5.tgz#961cf07cf59955de17af13bd74f7806bd2119553" + integrity sha512-cfX2rEKOtuuljcGI5DMDHClwZHdDqd2nT2Ohsc8aHtBiz6bUxKVyIqxr2gaC6tU8AgPtrTVBzcxCA+UavXpKww== dependencies: - "@algolia/cache-common" "4.9.1" + "@algolia/cache-common" "4.10.5" -"@algolia/cache-common@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.9.1.tgz#2d5f37ba7aab7db76627c4a4fce51a7fd137fa65" - integrity sha512-tcvw4mOfFy44V4ZxDEy9wNGr6vFROZKRpXKTEBgdw/WBn6mX51H1ar4RWtceDEcDU4H5fIv5tsY3ip2hU+fTPg== +"@algolia/cache-common@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.10.5.tgz#9510419e9dfb6d8814582c6b20615196f213a9d6" + integrity sha512-1mClwdmTHll+OnHkG+yeRoFM17kSxDs4qXkjf6rNZhoZGXDvfYLy3YcZ1FX4Kyz0DJv8aroq5RYGBDsWkHj6Tw== -"@algolia/cache-in-memory@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.9.1.tgz#3fd1d67aec804b6cc8439015b8b9c712a45c7ae0" - integrity sha512-IEJrHonvdymW2CnRfJtsTVWyfAH05xPEFkGXGCw00+6JNCj8Dln3TeaRLiaaY1srlyGedkemekQm1/Xb46CGOQ== +"@algolia/cache-in-memory@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.10.5.tgz#de9331cb86734bf7f7624063cdaa639e43509be1" + integrity sha512-+ciQnfIGi5wjMk02XhEY8fmy2pzy+oY1nIIfu8LBOglaSipCRAtjk6WhHc7/KIbXPiYzIwuDbM2K1+YOwSGjwA== dependencies: - "@algolia/cache-common" "4.9.1" + "@algolia/cache-common" "4.10.5" -"@algolia/client-account@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/client-account/-/client-account-4.9.1.tgz#f2c1b3e49de2ee1fca44b8b5e64e1ce0dbdff0db" - integrity sha512-Shpjeuwb7i2LR5QuWREb6UbEQLGB+Pl/J5+wPgILJDP/uWp7jpl0ase9mYNQGKj7TjztpSpQCPZ3dSHPnzZPfw== +"@algolia/client-account@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/client-account/-/client-account-4.10.5.tgz#82f7c330fc5f0625b5b559afe9c6b1aa6722b6cf" + integrity sha512-I9UkSS2glXm7RBZYZIALjBMmXSQbw/fI/djPcBHxiwXIheNIlqIFl2SNPkvihpPF979BSkzjqdJNRPhE1vku3Q== dependencies: - "@algolia/client-common" "4.9.1" - "@algolia/client-search" "4.9.1" - "@algolia/transporter" "4.9.1" - -"@algolia/client-analytics@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-4.9.1.tgz#56972496526910c53c5ce7844f4571efba63eb5f" - integrity sha512-/g6OkOSIA+A0t/tjvbL6iG/zV4El4LPFgv/tcAYHTH27BmlNtnEXw+iFpGjeUlQoPily9WVB3QNLMJkaNwL3HA== + "@algolia/client-common" "4.10.5" + "@algolia/client-search" "4.10.5" + "@algolia/transporter" "4.10.5" + +"@algolia/client-analytics@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-4.10.5.tgz#269e47c9de7e53e9e05e4a2d3c380607c3d2631f" + integrity sha512-h2owwJSkovPxzc+xIsjY1pMl0gj+jdVwP9rcnGjlaTY2fqHbSLrR9yvGyyr6305LvTppxsQnfAbRdE/5Z3eFxw== dependencies: - "@algolia/client-common" "4.9.1" - "@algolia/client-search" "4.9.1" - "@algolia/requester-common" "4.9.1" - "@algolia/transporter" "4.9.1" - -"@algolia/client-common@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.9.1.tgz#ae313b65d3249efcb4fafd2e92ed1fa2fd075482" - integrity sha512-UziRTZ8km3qwoVPIyEre8TV6V+MX7UtbfVqPmSafZ0xu41UUZ+sL56YoKjOXkbKuybeIC9prXMGy/ID5bXkTqg== + "@algolia/client-common" "4.10.5" + "@algolia/client-search" "4.10.5" + "@algolia/requester-common" "4.10.5" + "@algolia/transporter" "4.10.5" + +"@algolia/client-common@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.10.5.tgz#a7d0833796a9a2da68be16be76b6dc3962bf2f18" + integrity sha512-21FAvIai5qm8DVmZHm2Gp4LssQ/a0nWwMchAx+1hIRj1TX7OcdW6oZDPyZ8asQdvTtK7rStQrRnD8a95SCUnzA== dependencies: - "@algolia/requester-common" "4.9.1" - "@algolia/transporter" "4.9.1" + "@algolia/requester-common" "4.10.5" + "@algolia/transporter" "4.10.5" -"@algolia/client-recommendation@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/client-recommendation/-/client-recommendation-4.9.1.tgz#217af2a38d37ab12cf23a419cc9a576af9d15b13" - integrity sha512-Drtvvm1PNIOpYf4HFlkPFstFQ3IsN+TRmxur2F7y6Faplb5ybISa8ithu1tmlTdyTf3A78hQUQjgJet6qD2XZw== +"@algolia/client-personalization@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/client-personalization/-/client-personalization-4.10.5.tgz#78a8fb8161bdbeaa66b400b3283640ef689e155b" + integrity sha512-nH+IyFKBi8tCyzGOanJTbXC5t4dspSovX3+ABfmwKWUYllYzmiQNFUadpb3qo+MLA3jFx5IwBesjneN6dD5o3w== dependencies: - "@algolia/client-common" "4.9.1" - "@algolia/requester-common" "4.9.1" - "@algolia/transporter" "4.9.1" - -"@algolia/client-search@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.9.1.tgz#a2fbc47a1b343dade9a8b06310231d51ff675b1b" - integrity sha512-r9Cw2r8kJr45iYncFDht6EshARghU265wuY8Q8oHrpFHjAziEYdsUOdNmQKbsSH5J3gLjDPx1EI5DzVd6ivn3w== + "@algolia/client-common" "4.10.5" + "@algolia/requester-common" "4.10.5" + "@algolia/transporter" "4.10.5" + +"@algolia/client-search@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.10.5.tgz#47907232a3e4ecf2aa4459b8de17242afd88147c" + integrity sha512-1eQFMz9uodrc5OM+9HeT+hHcfR1E1AsgFWXwyJ9Q3xejA2c1c4eObGgOgC9ZoshuHHdptaTN1m3rexqAxXRDBg== dependencies: - "@algolia/client-common" "4.9.1" - "@algolia/requester-common" "4.9.1" - "@algolia/transporter" "4.9.1" - -"@algolia/logger-common@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.9.1.tgz#3323834095f2916338d2535d2df91c4723ac19f2" - integrity sha512-9mPrbFlFyPT7or/7PXTiJjyOewWB9QRkZKVXkt5zHAUiUzGxmmdpJIGpPv3YQnDur8lXrXaRI0MHXUuIDMY1ng== - -"@algolia/logger-console@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.9.1.tgz#c324ef26843dbed06b44586309331dbb949744ad" - integrity sha512-74VUwjtFjFpjZpi3QoHIPv0kcr3vWUSHX/Vs8PJW3lPsD4CgyhFenQbG9v+ZnyH0JrJwiYTtzfmrVh7IMWZGrQ== + "@algolia/client-common" "4.10.5" + "@algolia/requester-common" "4.10.5" + "@algolia/transporter" "4.10.5" + +"@algolia/logger-common@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.10.5.tgz#cf807107e755ad4a72c5afc787e968ff1196f1cc" + integrity sha512-gRJo9zt1UYP4k3woEmZm4iuEBIQd/FrArIsjzsL/b+ihNoOqIxZKTSuGFU4UUZOEhvmxDReiA4gzvQXG+TMTmA== + +"@algolia/logger-console@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.10.5.tgz#f961a7a7c6718c3f3842fb9b522d47b03b9df8ad" + integrity sha512-4WfIbn4253EDU12u9UiYvz+QTvAXDv39mKNg9xSoMCjKE5szcQxfcSczw2byc6pYhahOJ9PmxPBfs1doqsdTKQ== dependencies: - "@algolia/logger-common" "4.9.1" + "@algolia/logger-common" "4.10.5" -"@algolia/requester-browser-xhr@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.9.1.tgz#0812f3c7c4105a4646c0fba8429b172b2d0e01c5" - integrity sha512-zc46tk5o0ikOAz3uYiRAMxC2iVKAMFKT7nNZnLB5IzT0uqAh7pz/+D/UvIxP4bKmsllpBSnPcpfQF+OI4Ag/BA== +"@algolia/requester-browser-xhr@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.10.5.tgz#7063e3bc6d9c72bc535e1794352eddf47459dfe6" + integrity sha512-53/MURQEqtK+bGdfq4ITSPwTh5hnADU99qzvpAINGQveUFNSFGERipJxHjTJjIrjFz3vxj5kKwjtxDnU6ygO9g== dependencies: - "@algolia/requester-common" "4.9.1" + "@algolia/requester-common" "4.10.5" -"@algolia/requester-common@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.9.1.tgz#50fcf4c7c1ed7ae13159167ac1da2844d036a630" - integrity sha512-9hPgXnlCSbqJqF69M5x5WN3h51Dc+mk/iWNeJSVxExHGvCDfBBZd0v6S15i8q2a9cD1I2RnhMpbnX5BmGtabVA== +"@algolia/requester-common@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.10.5.tgz#52abfbf10b743d26afd3ce20f62771bc393ff4f0" + integrity sha512-UkVa1Oyuj6NPiAEt5ZvrbVopEv1m/mKqjs40KLB+dvfZnNcj+9Fry4Oxnt15HMy/HLORXsx4UwcthAvBuOXE9Q== -"@algolia/requester-node-http@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.9.1.tgz#70054a0aa5643072404fcb68042eec97c7abd1c8" - integrity sha512-vYNVbSCuyrCSCjHBQJk+tLZtWCjvvDf5tSbRJjyJYMqpnXuIuP7gZm24iHil4NPYBhbBj5NU2ZDAhc/gTn75Ag== +"@algolia/requester-node-http@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.10.5.tgz#db7e9ece1fda1b71a28c8e623666aaa096320b5c" + integrity sha512-aNEKVKXL4fiiC+bS7yJwAHdxln81ieBwY3tsMCtM4zF9f5KwCzY2OtN4WKEZa5AAADVcghSAUdyjs4AcGUlO5w== dependencies: - "@algolia/requester-common" "4.9.1" + "@algolia/requester-common" "4.10.5" -"@algolia/transporter@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.9.1.tgz#63ef3d9ae3b6556fa1ff1e6265bbab482bd084b7" - integrity sha512-AbjFfGzX+cAuj7Qyc536OxIQzjFOA5FU2ANGStx8LBH+AKXScwfkx67C05riuaRR5adSCLMSEbVvUscH0nF+6A== +"@algolia/transporter@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.10.5.tgz#9354989f12af3e2ce7d3109a94f519d467a960e0" + integrity sha512-F8DLkmIlvCoMwSCZA3FKHtmdjH3o5clbt0pi2ktFStVNpC6ZDmY307HcK619bKP5xW6h8sVJhcvrLB775D2cyA== dependencies: - "@algolia/cache-common" "4.9.1" - "@algolia/logger-common" "4.9.1" - "@algolia/requester-common" "4.9.1" - -algoliasearch@^4.9.1: - version "4.9.1" - resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.9.1.tgz#1fa8ece3f9808e465226176b88b953801c2274e0" - integrity sha512-EeJUYXzBEhZSsL6tXc3hseLBCtlNLa1MZ4mlMK6EeX38yRjY5vgnFcNNml6uUhlOjvheKxgkKRpPWkxgL8Cqkg== + "@algolia/cache-common" "4.10.5" + "@algolia/logger-common" "4.10.5" + "@algolia/requester-common" "4.10.5" + +algoliasearch@^4.10.5: + version "4.10.5" + resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.10.5.tgz#1faf34a3ae5ac3bef27282eb141251c70c7f5db2" + integrity sha512-KmH2XkiN+8FxhND4nWFbQDkIoU6g2OjfeU9kIv4Lb+EiOOs3Gpp7jvd+JnatsCisAZsnWQdjd7zVlW7I/85QvQ== dependencies: - "@algolia/cache-browser-local-storage" "4.9.1" - "@algolia/cache-common" "4.9.1" - "@algolia/cache-in-memory" "4.9.1" - "@algolia/client-account" "4.9.1" - "@algolia/client-analytics" "4.9.1" - "@algolia/client-common" "4.9.1" - "@algolia/client-recommendation" "4.9.1" - "@algolia/client-search" "4.9.1" - "@algolia/logger-common" "4.9.1" - "@algolia/logger-console" "4.9.1" - "@algolia/requester-browser-xhr" "4.9.1" - "@algolia/requester-common" "4.9.1" - "@algolia/requester-node-http" "4.9.1" - "@algolia/transporter" "4.9.1" + "@algolia/cache-browser-local-storage" "4.10.5" + "@algolia/cache-common" "4.10.5" + "@algolia/cache-in-memory" "4.10.5" + "@algolia/client-account" "4.10.5" + "@algolia/client-analytics" "4.10.5" + "@algolia/client-common" "4.10.5" + "@algolia/client-personalization" "4.10.5" + "@algolia/client-search" "4.10.5" + "@algolia/logger-common" "4.10.5" + "@algolia/logger-console" "4.10.5" + "@algolia/requester-browser-xhr" "4.10.5" + "@algolia/requester-common" "4.10.5" + "@algolia/requester-node-http" "4.10.5" + "@algolia/transporter" "4.10.5"