Commit ef874e0
feat: implement draft for a Nest.js SDK (#718)
<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->
## This PR
<!-- add the description of the PR here -->
This is a first draft of a Nest.js SDK.
Currently it only handles injecting clients and feature flags.
I also added a context factory for the FeatureFlag decorators to be able
to use request information for the execution context.
### Related Issues
<!-- add here the GitHub issue that this PR resolves if applicable -->
Fixes #705
### Notes
<!-- any additional notes for this PR -->
@toddbaert maybe we can do it as we did with the React SDK, merge this
fast and release as experimental to let people experiment and try out?
### Follow-up Tasks
<!-- anything that is related to this PR but not done here should be
noted under this section -->
<!-- if there is a need for a new issue, please link it here -->
We will have to see if we want to stick with the injected feature flags
being wrapped in an observable.
To me this feels the most idiomatic for Nest.js.
### How to test
Tests for the current functionality are included.
---------
Signed-off-by: Lukas Reining <[email protected]>
Co-authored-by: Henry Chen <[email protected]>
Co-authored-by: Luiz Guilherme Ribeiro <[email protected]>
Co-authored-by: Todd Baert <[email protected]>1 parent c7098c3 commit ef874e0
File tree
16 files changed
+2139
-11
lines changed- packages/nest
- src
- test
16 files changed
+2139
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
| 132 | + | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
157 | 174 | | |
158 | 175 | | |
159 | 176 | | |
| |||
0 commit comments