From 76d590d009a9980578034c731361a5d39a1fdf5b Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Mon, 10 Jan 2022 11:39:55 +0100 Subject: [PATCH 01/14] Upgrade docusaurus to 2.0.0.beta.14 from beta.9 --- website/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/package.json b/website/package.json index dda2976bf0..80b7d8c582 100644 --- a/website/package.json +++ b/website/package.json @@ -14,9 +14,9 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.9", - "@docusaurus/plugin-client-redirects": "2.0.0-beta.9", - "@docusaurus/preset-classic": "2.0.0-beta.9", + "@docusaurus/core": "2.0.0-beta.14", + "@docusaurus/plugin-client-redirects": "2.0.0-beta.14", + "@docusaurus/preset-classic": "2.0.0-beta.14", "@docusaurus/remark-plugin-npm2yarn": "2.0.0-beta.14", "@mdx-js/react": "1.6.22", "@svgr/webpack": "6.1.2", From 2488124ac6fab979f76379d92dea5ea4c762b9b8 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 11 Jan 2022 09:16:01 +0100 Subject: [PATCH 02/14] docs(chore): add redirect from '/sdks/community' to '/sdks' --- website/docusaurus.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 3ea88305ef..c629d7dd48 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -146,6 +146,10 @@ module.exports = { to: '/advanced/toggle_variants', from: '/toggle_variants', }, + { + to: '/sdks', + from: '/sdks/community' + } ], createRedirects: function(toPath) { if ( From f404c37f9791726338aae7c97c4c269a3a9af59e Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 11 Jan 2022 09:16:07 +0100 Subject: [PATCH 03/14] docs(chore): Update headings, slight sdk doc restructure. --- website/docs/sdks/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/sdks/index.md b/website/docs/sdks/index.md index e00fda256a..b926d60918 100644 --- a/website/docs/sdks/index.md +++ b/website/docs/sdks/index.md @@ -99,7 +99,7 @@ If you see an item marked with a ❌ that you would find useful, feel free to re | Bootstrap from file | ✅ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | | Custom Bootstrap implementation | ✅ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | -## Clients written by awesome enthusiasts {#clients-written-by-awesome-enthusiasts} +## Community SDKs ❤️ {#community-sdks} Here's some of the fantastic work our community has done to make Unleash work in even more contexts. If you still can't find your favorite language, let us know and we'd love to help you create the client for it! @@ -113,7 +113,7 @@ Here's some of the fantastic work our community has done to make Unleash work in - [uekoetter.dev/unleash-client-dart](https://pub.dev/packages/unleash) (Dart) - _...your implementation for your favorite language._ -### Implement your own SDK {#implement-your-own-sdk} +## Implement your own SDK {#implement-your-own-sdk} If you can't find an SDK that fits your need, you can also develop your own SDK. To make implementation easier, check out these resources: From eb89d4505d615419a78c034c320964dbb976dc8a Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 11 Jan 2022 09:22:30 +0100 Subject: [PATCH 04/14] docs: add link to /sdks/community-sdks This serves two purposes: 1. For people who know the structure, it won't look like anything's missing 2. For people who don't know the structure, it'll make community sdks more discoverable. --- website/sidebars.js | 1 + 1 file changed, 1 insertion(+) diff --git a/website/sidebars.js b/website/sidebars.js index 7a803b4929..269a4e22ac 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -41,6 +41,7 @@ module.exports = { 'sdks/proxy-javascript', 'sdks/proxy-react', 'sdks/proxy-ios', + { type: 'link', label: 'Community SDKs', href: '/sdks#community-sdks'} ], Addons: [ 'addons/index', From e1ba5f2e1160092fed1fd83d17558e38d9de4eb9 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 11 Jan 2022 09:53:06 +0100 Subject: [PATCH 05/14] docs: reuse pre-existing redirect to /sdks --- website/docusaurus.config.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index c629d7dd48..839b40b49a 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -132,6 +132,7 @@ module.exports = { '/user_guide/client-sdk', '/client-sdk', '/user_guide/connect_sdk', + '/sdks/community', ], }, { @@ -146,10 +147,6 @@ module.exports = { to: '/advanced/toggle_variants', from: '/toggle_variants', }, - { - to: '/sdks', - from: '/sdks/community' - } ], createRedirects: function(toPath) { if ( From b2a8bc1655eff7b03285d62bc6de728bd542f835 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 11 Jan 2022 09:26:03 +0100 Subject: [PATCH 06/14] docs: reorder sdks listing in sidebar The previous list order didn't seem to have any reason behind it. This is a suggestion for new order. Index (the introduction) is first, followed by the proxy. Then comes all the official sdks in alphabetic order (punctuation placed before alpha). At the end of the list is the 'community sdks' link. I'm open to suggestions and discussion here, but was working on this list, so thought it could use some love. --- website/sidebars.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/website/sidebars.js b/website/sidebars.js index 269a4e22ac..9b05c794b6 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -29,18 +29,18 @@ module.exports = { ], 'Unleash SDKs': [ 'sdks/index', - 'sdks/java_sdk', - 'sdks/node_sdk', - 'sdks/dot_net_sdk', - 'sdks/go_sdk', - 'sdks/python_sdk', - 'sdks/ruby_sdk', - 'sdks/php_sdk', 'sdks/unleash-proxy', + 'sdks/dot_net_sdk', 'sdks/android_proxy_sdk', - 'sdks/proxy-javascript', - 'sdks/proxy-react', + 'sdks/go_sdk', 'sdks/proxy-ios', + 'sdks/java_sdk', + 'sdks/proxy-javascript', + 'sdks/node_sdk', + 'sdks/php_sdk', + 'sdks/python_sdk', + 'sdks/proxy-react', + 'sdks/ruby_sdk', { type: 'link', label: 'Community SDKs', href: '/sdks#community-sdks'} ], Addons: [ From c3c7e1b4bb02dd40eb92e88f83a451f035f13da8 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 11 Jan 2022 10:35:25 +0100 Subject: [PATCH 07/14] docs: update link to integrations --- website/docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 3ea88305ef..85df56715e 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -31,7 +31,7 @@ module.exports = { activeBaseRegex: '(user_guide|sdks|addons|advanced)', }, { to: 'deploy/getting_started', label: 'Deploy and manage' }, - { to: 'integrations/integrations', label: 'Integrations' }, + { to: 'integrations', label: 'Integrations' }, { to: '/api', label: 'API' }, { href: 'https://www.getunleash.io/plans', From adec5aa25c8270e5a66c019b3b8a1031e73505d9 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 11 Jan 2022 10:36:23 +0100 Subject: [PATCH 08/14] docs: add redirect from old integrations url --- website/docusaurus.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 85df56715e..4b08c86c25 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -146,6 +146,10 @@ module.exports = { to: '/advanced/toggle_variants', from: '/toggle_variants', }, + { + to: '/integrations' + from: '/integrations/integrations' + }, ], createRedirects: function(toPath) { if ( From 29ed242df63015401fe36dab1da0d94f44a854bf Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 11 Jan 2022 10:38:22 +0100 Subject: [PATCH 09/14] docs(fix): add missing commas --- website/docusaurus.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 4b08c86c25..05c6d689f0 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -147,8 +147,8 @@ module.exports = { from: '/toggle_variants', }, { - to: '/integrations' - from: '/integrations/integrations' + to: '/integrations', + from: '/integrations/integrations', }, ], createRedirects: function(toPath) { From 4917287098edd862fba1e82507038307c8fc5bbd Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 11 Jan 2022 10:43:34 +0100 Subject: [PATCH 10/14] fix(docs): fix broken links to addons --- website/docs/addons/addons.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/docs/addons/addons.md b/website/docs/addons/addons.md index f39079fac6..7422ea4a70 100644 --- a/website/docs/addons/addons.md +++ b/website/docs/addons/addons.md @@ -9,10 +9,10 @@ Unleash Addons allows you to extend Unleash with new functionality. Currently, a Currently Unleash support the following Addons out of the box: -- [Webhook](./webhook) - A generic way to post messages from Unleash to third party services. -- [Slack](./slack) - Allows Unleash to post updates to Slack. -- [Microsoft Teams](./teams) - Allows Unleash to post updates to Microsoft Teams. -- [Datadog](./datadog) -allows Unleash to post Updates to Datadog when a feature toggle is updated. +- [Webhook](webhook.md) - A generic way to post messages from Unleash to third party services. +- [Slack](slack.md) - Allows Unleash to post updates to Slack. +- [Microsoft Teams](teams.md) - Allows Unleash to post updates to Microsoft Teams. +- [Datadog](datadog.md) -allows Unleash to post Updates to Datadog when a feature toggle is updated. In future releases we plan to support community built addons. From 4de960188a5eb1154fb09a9f5b42a89d7fbd8d9c Mon Sep 17 00:00:00 2001 From: Renato Arruda Date: Tue, 11 Jan 2022 22:44:14 +0100 Subject: [PATCH 11/14] Update ruby SDK capabilities Ruby sdk now supports remote_address strategy with CIDR syntax Feature can be found in main branch, not in a release yet. --- website/docs/sdks/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/sdks/index.md b/website/docs/sdks/index.md index b926d60918..128a42ae5b 100644 --- a/website/docs/sdks/index.md +++ b/website/docs/sdks/index.md @@ -70,7 +70,7 @@ If you see an item marked with a ❌ that you would find useful, feel free to re | [Gradual rollout: custom stickiness](../user_guide/activation_strategy#customize-stickiness-beta) | ✅ | ✅ | ⭕ | ✅ | ✅ | ✅ | ✅ | ✅ | | [UserID](../user_guide/activation_strategy#userids) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | [IP](../user_guide/activation_strategy#ips) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| [IP](../user_guide/activation_strategy#ips): CIDR syntax | ✅ | ✅ | ✅ | ✅ | ⭕ | ⭕ | ⭕ | ✅ | +| [IP](../user_guide/activation_strategy#ips): CIDR syntax | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | ⭕ | ✅ | | [Hostname](../user_guide/activation_strategy#hostnames) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **Category: [Custom strategies](../advanced/custom_activation_strategy)** | | | | | | | | | | Basic support | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | From 22f78e6745a2af02354b4b7da931c6c37ad04650 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 12 Jan 2022 00:26:35 +0000 Subject: [PATCH 12/14] chore(deps): update dependency supertest to v6.2.1 --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index c2e1610cfc..07bfd65431 100644 --- a/package.json +++ b/package.json @@ -152,7 +152,7 @@ "proxyquire": "2.1.3", "source-map-support": "0.5.21", "superagent": "6.1.0", - "supertest": "6.2.0", + "supertest": "6.2.1", "ts-jest": "27.1.2", "ts-node": "10.4.0", "tsc-watch": "4.6.0", diff --git a/yarn.lock b/yarn.lock index 7ff2b4278a..27303d3932 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6722,10 +6722,10 @@ superagent@6.1.0: readable-stream "^3.6.0" semver "^7.3.2" -superagent@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/superagent/-/superagent-7.0.1.tgz#4c5b8c3501b2c6bf0b2e7b8fd8b342f6d3d12a29" - integrity sha512-2nFiZ2ds29iRFSjZ291vq+AxqUDg8BdFeg/AObJkDpCVJX6IJT8fU7egBOkYwmxPwaDoNrNu8qRDvtAV/7ZTPw== +superagent@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/superagent/-/superagent-7.0.2.tgz#8fa6d283c9e7cd52928b96cf422356019248e8c4" + integrity sha512-2Kx35bZxLLJMBKtuXezxvD0aZQ7l923VwoCn7EtUx+aFxdG7co7PeRIddfrNtvvMuGaLZXA0mKzX+yWRhjrJ7A== dependencies: component-emitter "^1.3.0" cookiejar "^2.1.3" @@ -6739,13 +6739,13 @@ superagent@^7.0.1: readable-stream "^3.6.0" semver "^7.3.5" -supertest@6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/supertest/-/supertest-6.2.0.tgz#5ce9e1603744d79b6620e65d2e16e9dc635244ae" - integrity sha512-JU30iTy0Utm5GbVJvrtt6RHNQECiqVl6KckEVhnR0AoGzFGq0IFMmBXnoTxYy9pM/vgufiPevjxlF39XaKn77Q== +supertest@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/supertest/-/supertest-6.2.1.tgz#add42f1afa661fa5b3083da05c6c964069768e0f" + integrity sha512-2kBKhfZgnPLmjpzB0n7A2ZnEAWTaLXq4bn3EEVY9w8rUpLyIlSusqKKvWA1Cav7hxXBnXGpxBsSeOHj5wQGe1Q== dependencies: methods "^1.1.2" - superagent "^7.0.1" + superagent "^7.0.2" supports-color@^5.3.0: version "5.5.0" From 4a5b3325673f277e335a15334ecf0e0eabbb6909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Wed, 12 Jan 2022 23:22:04 +0100 Subject: [PATCH 13/14] fix: make sure our CSP allow gravatar.com for images --- src/lib/middleware/secure-headers.ts | 3 ++- src/server-dev.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/middleware/secure-headers.ts b/src/lib/middleware/secure-headers.ts index cd5102378b..f674e97989 100644 --- a/src/lib/middleware/secure-headers.ts +++ b/src/lib/middleware/secure-headers.ts @@ -13,7 +13,7 @@ const secureHeaders: (config: IUnleashConfig) => RequestHandler = (config) => { }, contentSecurityPolicy: { directives: { - defaultSrc: ["'self'", 'cdn.getunleash.io'], + defaultSrc: ["'self'", 'cdn.getunleash.io', 'gravatar.com'], fontSrc: [ "'self'", 'cdn.getunleash.io', @@ -37,6 +37,7 @@ const secureHeaders: (config: IUnleashConfig) => RequestHandler = (config) => { ], }, }, + crossOriginEmbedderPolicy: false, }); } return (req, res, next) => { diff --git a/src/server-dev.ts b/src/server-dev.ts index 2d29a49676..f408dfaec2 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -24,6 +24,7 @@ process.nextTick(async () => { }, logLevel: LogLevel.debug, enableOAS: true, + // secureHeaders: true, versionCheck: { enable: false, }, From 18c87cedf6aed028b2050cd13f983ba4d5815b26 Mon Sep 17 00:00:00 2001 From: kakakakakku Date: Thu, 13 Jan 2022 10:39:03 +0900 Subject: [PATCH 14/14] Fixed syntax error for Ruby SDK example --- website/docs/sdks/ruby.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/docs/sdks/ruby.md b/website/docs/sdks/ruby.md index d6ecb969a9..40c87d8eb8 100644 --- a/website/docs/sdks/ruby.md +++ b/website/docs/sdks/ruby.md @@ -5,14 +5,14 @@ title: Ruby SDK > You will need your `API URL` and your `API token` in order to connect the Client SDK to you Unleash instance. You can find this information in the “Admin” section Unleash management UI. [Read more](../user_guide/api-token) -```sh - require 'unleash' +```ruby +require 'unleash' - @unleash = Unleash::Client.new( - url: '', - app_name: 'simple-test', - custom_http_headers = {'Authorization': ''}, - ) +@unleash = Unleash::Client.new( + url: '', + app_name: 'simple-test', + custom_http_headers: {'Authorization': ''}, +) ``` ### Sample usage {#sample-usage}