@openfeature/server-sdk 1.13.5 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/dist/cjs/index.js +365 -282
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/index.js +366 -278
- package/dist/esm/index.js.map +4 -4
- package/dist/types.d.ts +38 -59
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge" />
|
|
17
17
|
</a>
|
|
18
18
|
<!-- x-release-please-start-version -->
|
|
19
|
-
<a href="https://github.com/open-feature/js-sdk/releases/tag/server-sdk-v1.
|
|
20
|
-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.
|
|
19
|
+
<a href="https://github.com/open-feature/js-sdk/releases/tag/server-sdk-v1.15.0">
|
|
20
|
+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.15.0&color=blue&style=for-the-badge" />
|
|
21
21
|
</a>
|
|
22
22
|
<!-- x-release-please-end -->
|
|
23
23
|
<br/>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
|
|
45
45
|
### Requirements
|
|
46
46
|
|
|
47
|
-
- Node.js version
|
|
47
|
+
- Node.js version 18+
|
|
48
48
|
|
|
49
49
|
### Install
|
|
50
50
|
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
npm install --save @openfeature/server-sdk
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
> [!TIP]
|
|
58
|
+
> This SDK is designed to run in Node.JS. If you're interested in browser support, check out the [Web SDK](https://openfeature.dev/docs/reference/technologies/client/web/).
|
|
59
|
+
|
|
57
60
|
#### yarn
|
|
58
61
|
|
|
59
62
|
```sh
|
|
@@ -158,6 +161,9 @@ const requestContext = {
|
|
|
158
161
|
const boolValue = await client.getBooleanValue('some-flag', false, requestContext);
|
|
159
162
|
```
|
|
160
163
|
|
|
164
|
+
Context is merged by the SDK before a flag evaluation occurs.
|
|
165
|
+
The merge order is defined [here](https://openfeature.dev/specification/sections/evaluation-context#requirement-323) in the OpenFeature specification.
|
|
166
|
+
|
|
161
167
|
### Hooks
|
|
162
168
|
|
|
163
169
|
[Hooks](https://openfeature.dev/docs/reference/concepts/hooks) allow for custom logic to be added at well-defined points of the flag evaluation life-cycle.
|