Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions libs/providers/config-cat-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ The OpenFeature SDK is required as peer dependency.

The minimum required version of `@openfeature/web-sdk` currently is `1.0.0`.

The minimum required version of `configcat-js-ssr` currently is `8.4.3`.
The minimum required version of `@configcat/sdk` currently is `1.0.1`.

```
$ npm install @openfeature/web-sdk configcat-js-ssr
$ npm install @openfeature/web-sdk @configcat/sdk
```

## Usage

The ConfigCat provider uses the [ConfigCat JavaScript SSR SDK](https://configcat.com/docs/sdk-reference/js-ssr/).
The ConfigCat provider uses the [ConfigCat Browser (JavaScript) SDK](https://configcat.com/docs/sdk-reference/js/browser/).

It can be created by passing the ConfigCat SDK options to ```ConfigCatWebProvider.create```.
The available options can be found in the [ConfigCat JavaScript SSR SDK](https://configcat.com/docs/sdk-reference/js-ssr/#creating-the-configcat-client).
The available options can be found in the [ConfigCat JavaScript SSR SDK](https://configcat.com/docs/sdk-reference/js/browser/#creating-the-configcat-client).

The ConfigCat Web Provider only supports the `AutoPolling` mode because it caches all evaluation data to support synchronous evaluation of feature flags.

Expand Down Expand Up @@ -54,7 +54,7 @@ await OpenFeature.clearProviders();
```javascript
import { OpenFeature } from "@openfeature/web-sdk";
import { ConfigCatWebProvider } from '@openfeature/config-cat-web-provider';
import { createConsoleLogger, LogLevel } from 'configcat-js-ssr';
import { createConsoleLogger, LogLevel } from '@configcat/sdk';

// Create and set the provider.
const provider = ConfigCatWebProvider.create('<sdk_key>', {
Expand Down
240 changes: 217 additions & 23 deletions libs/providers/config-cat-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions libs/providers/config-cat-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
"current-version": "echo $npm_package_version"
},
"peerDependencies": {
"@openfeature/web-sdk": "^1.0.0",
"configcat-js-ssr": "^8.4.3",
"@configcat/sdk": "^1.0.1",
"@openfeature/web-sdk": "^1.0.0"
},
"dependencies": {
"@openfeature/config-cat-core": "0.1.1"
}
}
Loading