diff --git a/package-lock.json b/package-lock.json index a3c1d5d9d..75933e48a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14470,7 +14470,7 @@ }, "packages/client": { "name": "@openfeature/web-sdk", - "version": "0.4.9", + "version": "0.4.10", "license": "Apache-2.0", "devDependencies": { "@openfeature/core": "0.0.23" @@ -14481,7 +14481,7 @@ }, "packages/nest": { "name": "@openfeature/nestjs-sdk", - "version": "0.0.3-experimental", + "version": "0.0.4-experimental", "license": "Apache-2.0", "devDependencies": { "@nestjs/common": "^10.2.10", @@ -14495,26 +14495,27 @@ }, "peerDependencies": { "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0", "@openfeature/server-sdk": ">=1.7.5", - "rxjs": "^6.0.0 || ^7.0.0" + "rxjs": "^6.0.0 || ^7.0.0 || 8.0.0" } }, "packages/react": { "name": "@openfeature/react-sdk", - "version": "0.0.5-experimental", + "version": "0.1.0-experimental", "license": "Apache-2.0", "devDependencies": { "@openfeature/core": "*", "@openfeature/web-sdk": "*" }, "peerDependencies": { - "@openfeature/web-sdk": ">=0.4.0", - "react": ">=18.0.0" + "@openfeature/web-sdk": ">=0.4.10", + "react": ">=16.8.0" } }, "packages/server": { "name": "@openfeature/server-sdk", - "version": "1.9.0", + "version": "1.9.1", "license": "Apache-2.0", "devDependencies": { "@openfeature/core": "0.0.23" diff --git a/packages/nest/README.md b/packages/nest/README.md index c6770aeec..607c86ad7 100644 --- a/packages/nest/README.md +++ b/packages/nest/README.md @@ -15,19 +15,22 @@ Specification - - - Release + + + Release +
codecov + + NPM Download +

-[OpenFeature](https://openfeature.dev) is an open specification that provides a vendor-agnostic, community-driven API -for feature flagging that works with your favorite feature flag management tool. +[OpenFeature](https://openfeature.dev) is an open specification that provides a vendor-agnostic, community-driven API for feature flagging that works with your favorite feature flag management tool or in-house solution. @@ -37,11 +40,11 @@ The OpenFeature NestJS SDK is a package that provides a NestJS wrapper for the [ Capabilities include: -- Provide a NestJS global module to simplify OpenFeature configuration and usage within NestJS; -- Injecting feature flags directly into controller route handlers by using decorators; -- Injecting transaction evaluation context for flag evaluations directly from [execution context](https://docs.nestjs.com/fundamentals/execution-context) (HTTP header values, client IPs, etc.); -- Injecting OpenFeature clients into NestJS services and controllers by using decorators; -- Setting up logging, event handling, hooks and providers directly when registering the module. +- Providing a NestJS global module to simplify OpenFeature configuration and usage within NestJS +- Setting up logging, event handling, hooks and providers directly when registering the module +- Injecting feature flags directly into controller route handlers by using decorators +- Injecting transaction evaluation context for flag evaluations directly from [execution context](https://docs.nestjs.com/fundamentals/execution-context) (HTTP header values, client IPs, etc.) +- Injecting OpenFeature clients into NestJS services and controllers by using decorators ## 🚀 Quick start @@ -146,10 +149,10 @@ export class OpenFeatureTestService { } ``` -## Module aditional information +## Module additional information ### Flag evaluation context injection -Whenever a flag evaluation occurs, context can be provided with information like user e-mail, role, targeting key, etc in order to trigger specific evaluation rules or logic. The `OpenFeatureModule` provides a way to configure context for each request using the `contextFactory` option. -The `contextFactory` is ran in a NestJS interceptor scope to configure the evaluation context and than it is used in every flag evaluation related to this request. +Whenever a flag evaluation occurs, context can be provided with information like user e-mail, role, targeting key, etc. in order to trigger specific evaluation rules or logic. The `OpenFeatureModule` provides a way to configure context for each request using the `contextFactory` option. +The `contextFactory` is run in a NestJS interceptor scope to configure the evaluation context, and then it is used in every flag evaluation related to this request. By default, the interceptor is configured globally, but it can be changed by setting the `useGlobalInterceptor` to `false`. In this case, it is still possible to configure a `contextFactory` that can be injected into route, module or controller bound interceptors. diff --git a/packages/nest/package.json b/packages/nest/package.json index 688d8a8d1..3caa9e16b 100644 --- a/packages/nest/package.json +++ b/packages/nest/package.json @@ -46,8 +46,9 @@ "homepage": "https://github.com/open-feature/js-sdk#readme", "peerDependencies": { "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", - "@openfeature/server-sdk": ">=1.7.5", - "rxjs": "^6.0.0 || ^7.0.0" + "@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0", + "rxjs": "^6.0.0 || ^7.0.0 || 8.0.0", + "@openfeature/server-sdk": ">=1.7.5" }, "devDependencies": { "@nestjs/common": "^10.2.10",