@baeta/auth 0.0.0 → 2.0.0-next.15

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +377 -0
  2. package/LICENSE +21 -0
  3. package/README.md +171 -0
  4. package/dist/index.d.ts +204 -0
  5. package/dist/index.js +426 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +66 -2
  8. package/coverage/lcov.info +0 -1084
  9. package/coverage/tmp/coverage-80733-1779319154081-1.json +0 -1
  10. package/coverage/tmp/coverage-80733-1779319154102-0.json +0 -1
  11. package/coverage/tmp/coverage-80734-1779319150108-0.json +0 -1
  12. package/coverage/tmp/coverage-80760-1779319154037-1.json +0 -1
  13. package/coverage/tmp/coverage-80760-1779319154052-0.json +0 -1
  14. package/coverage/tmp/coverage-80769-1779319153341-13.json +0 -1
  15. package/coverage/tmp/coverage-80769-1779319153366-12.json +0 -1
  16. package/coverage/tmp/coverage-80769-1779319153366-15.json +0 -1
  17. package/coverage/tmp/coverage-80769-1779319153377-2.json +0 -1
  18. package/coverage/tmp/coverage-80769-1779319153386-19.json +0 -1
  19. package/coverage/tmp/coverage-80769-1779319153386-5.json +0 -1
  20. package/coverage/tmp/coverage-80769-1779319153392-8.json +0 -1
  21. package/coverage/tmp/coverage-80769-1779319153407-7.json +0 -1
  22. package/coverage/tmp/coverage-80769-1779319153429-21.json +0 -1
  23. package/coverage/tmp/coverage-80769-1779319153447-9.json +0 -1
  24. package/coverage/tmp/coverage-80769-1779319153544-20.json +0 -1
  25. package/coverage/tmp/coverage-80769-1779319153563-4.json +0 -1
  26. package/coverage/tmp/coverage-80769-1779319153765-16.json +0 -1
  27. package/coverage/tmp/coverage-80769-1779319153787-6.json +0 -1
  28. package/coverage/tmp/coverage-80769-1779319153805-17.json +0 -1
  29. package/coverage/tmp/coverage-80769-1779319153816-14.json +0 -1
  30. package/coverage/tmp/coverage-80769-1779319153828-11.json +0 -1
  31. package/coverage/tmp/coverage-80769-1779319153850-3.json +0 -1
  32. package/coverage/tmp/coverage-80769-1779319153897-18.json +0 -1
  33. package/coverage/tmp/coverage-80769-1779319153922-10.json +0 -1
  34. package/coverage/tmp/coverage-80769-1779319153954-0.json +0 -1
  35. package/coverage/tmp/coverage-80769-1779319153963-1.json +0 -1
  36. package/coverage/tmp/coverage-80769-1779319153972-0.json +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,377 @@
1
+ # @baeta/extension-auth
2
+
3
+ ## 2.0.0-next.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Disallow authAfter for mutations by [@andreisergiu98](https://github.com/andreisergiu98) in [#492](https://github.com/andreisergiu98/baeta/pull/492)
8
+
9
+ - Switch to builder pattern for auth scopes and grants by [@andreisergiu98](https://github.com/andreisergiu98) in [#453](https://github.com/andreisergiu98/baeta/pull/453)
10
+
11
+ - Drop Node v23 and v25 by [@andreisergiu98](https://github.com/andreisergiu98) in [#474](https://github.com/andreisergiu98/baeta/pull/474)
12
+
13
+ - Use Map for storing scope resolvers by [@andreisergiu98](https://github.com/andreisergiu98) in [#490](https://github.com/andreisergiu98/baeta/pull/490)
14
+
15
+ - Avoid mutating original error when creating aggregate errors by [@andreisergiu98](https://github.com/andreisergiu98) in [#489](https://github.com/andreisergiu98/baeta/pull/489)
16
+
17
+ - Use resolver result for grant target by [@andreisergiu98](https://github.com/andreisergiu98) in [#453](https://github.com/andreisergiu98/baeta/pull/453)
18
+
19
+ - Drop extensions concept and api in favor of app plugins by [@andreisergiu98](https://github.com/andreisergiu98) in [#428](https://github.com/andreisergiu98/baeta/pull/428)
20
+
21
+ - Make non-finite scope args non-serializble by [@andreisergiu98](https://github.com/andreisergiu98) in [#491](https://github.com/andreisergiu98/baeta/pull/491)
22
+ - Updated dependencies [[`dc89e17`](https://github.com/andreisergiu98/baeta/commit/dc89e1728926f4bd5a5e1351635c38bf8d5938dc), [`efc7a36`](https://github.com/andreisergiu98/baeta/commit/efc7a36b00fbae81ff10bdd5fdebbe7ffcc88913), [`7d0e8b2`](https://github.com/andreisergiu98/baeta/commit/7d0e8b26a4bd58321546366f2b164e168c456532), [`7bce3e4`](https://github.com/andreisergiu98/baeta/commit/7bce3e4c4940782bcb51739797307a6d57c91e7d), [`6cb2888`](https://github.com/andreisergiu98/baeta/commit/6cb2888843a1e52e33e4504dc5582a272c998e2e)]:
23
+ - @baeta/util-log@2.0.0-next.4
24
+ - @baeta/errors@2.0.0-next.15
25
+ - @baeta/core@2.0.0-next.15
26
+
27
+ ## 2.0.0-next.14
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [[`f6f8162`](https://github.com/andreisergiu98/baeta/commit/f6f8162e8393479b47cedf480eb4ec0fd4f8c311)]:
32
+ - @baeta/core@2.0.0-next.14
33
+ - @baeta/errors@2.0.0-next.14
34
+
35
+ ## 2.0.0-next.13
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies [[`3e7a4d7`](https://github.com/andreisergiu98/baeta/commit/3e7a4d71a59543b8a506938f788aec8b5d907776)]:
40
+ - @baeta/core@2.0.0-next.13
41
+ - @baeta/errors@2.0.0-next.13
42
+
43
+ ## 2.0.0-next.12
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies []:
48
+ - @baeta/core@2.0.0-next.12
49
+ - @baeta/errors@2.0.0-next.12
50
+
51
+ ## 2.0.0-next.11
52
+
53
+ ### Patch Changes
54
+
55
+ - Updated dependencies []:
56
+ - @baeta/core@2.0.0-next.11
57
+ - @baeta/errors@2.0.0-next.11
58
+
59
+ ## 2.0.0-next.10
60
+
61
+ ### Patch Changes
62
+
63
+ - [`5607f58`](https://github.com/andreisergiu98/baeta/commit/5607f58827f9a029e3545058895065d40be9f8ab) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Remove unnecessary extra type parameter for subscription builder
64
+
65
+ - Updated dependencies [[`5607f58`](https://github.com/andreisergiu98/baeta/commit/5607f58827f9a029e3545058895065d40be9f8ab)]:
66
+ - @baeta/core@2.0.0-next.10
67
+ - @baeta/errors@2.0.0-next.10
68
+
69
+ ## 2.0.0-next.9
70
+
71
+ ### Patch Changes
72
+
73
+ - Updated dependencies [[`831cfa2`](https://github.com/andreisergiu98/baeta/commit/831cfa2a11445aaf7f2d1a1d7ddf073db9bb8008)]:
74
+ - @baeta/util-log@2.0.0-next.3
75
+ - @baeta/core@2.0.0-next.9
76
+ - @baeta/errors@2.0.0-next.9
77
+
78
+ ## 2.0.0-next.8
79
+
80
+ ### Patch Changes
81
+
82
+ - Updated dependencies [[`2c403a0`](https://github.com/andreisergiu98/baeta/commit/2c403a06fedebf4d55870f37946c70e8e99c3027)]:
83
+ - @baeta/errors@2.0.0-next.8
84
+ - @baeta/core@2.0.0-next.8
85
+
86
+ ## 2.0.0-next.7
87
+
88
+ ### Patch Changes
89
+
90
+ - Updated dependencies []:
91
+ - @baeta/core@2.0.0-next.7
92
+ - @baeta/errors@2.0.0-next.7
93
+
94
+ ## 2.0.0-next.2
95
+
96
+ ### Patch Changes
97
+
98
+ - Fix broken types
99
+
100
+ - Updated dependencies []:
101
+ - @baeta/util-log@2.0.0-next.2
102
+ - @baeta/errors@2.0.0-next.2
103
+ - @baeta/core@2.0.0-next.2
104
+
105
+ ## 2.0.0-next.1
106
+
107
+ ### Patch Changes
108
+
109
+ - Fix release version
110
+
111
+ - Updated dependencies []:
112
+ - @baeta/util-log@2.0.0-next.1
113
+ - @baeta/errors@2.0.0-next.1
114
+ - @baeta/core@2.0.0-next.1
115
+
116
+ ## 2.0.0-next.0
117
+
118
+ ### Major Changes
119
+
120
+ - [#214](https://github.com/andreisergiu98/baeta/pull/214) [`31d1a50`](https://github.com/andreisergiu98/baeta/commit/31d1a509f96535b43ae85d19c770eb1a5f09dc94) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Baeta v2 – major refactor
121
+ - **Side-effect-free type generation & resolver definitions.**
122
+ The types generator and resolver definitions were reworked to be side-effect free, improving type safety.
123
+ - **Stricter type safety.**
124
+ You must now **explicitly define resolvers for every field** during development—breakages that used to surface at runtime are now caught at compile time.
125
+ - **Removed `@baeta/compiler`.**
126
+ Since modern runtimes can execute TypeScript natively, the separate compiler package is no longer needed. Use your runtime’s native TS support or your existing build setup.
127
+ - **Subscriptions update.**
128
+ `@baeta/subscriptions-pubsub` now targets **`graphql-subscriptions` v3**.
129
+
130
+ ### Patch Changes
131
+
132
+ - Updated dependencies [[`31d1a50`](https://github.com/andreisergiu98/baeta/commit/31d1a509f96535b43ae85d19c770eb1a5f09dc94)]:
133
+ - @baeta/util-log@2.0.0-next.0
134
+ - @baeta/errors@2.0.0-next.0
135
+ - @baeta/core@2.0.0-next.0
136
+
137
+ ## 1.0.11
138
+
139
+ ### Patch Changes
140
+
141
+ - Updated dependencies [[`7f3d5ff`](https://github.com/andreisergiu98/baeta/commit/7f3d5ff7cd0871e2f017c86dd29ac7bc02647154)]:
142
+ - @baeta/core@1.0.11
143
+
144
+ ## 1.0.9
145
+
146
+ ### Patch Changes
147
+
148
+ - [`583014f`](https://github.com/andreisergiu98/baeta/commit/583014f0bac810b25d9a8226bda2df4c9039f5e3) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Update dependencies
149
+
150
+ - [#194](https://github.com/andreisergiu98/baeta/pull/194) [`b5b53d3`](https://github.com/andreisergiu98/baeta/commit/b5b53d35d950b2b18014b02d472c401ed4721334) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Refactor extension-auth to accommodate tests
151
+
152
+ - Updated dependencies [[`583014f`](https://github.com/andreisergiu98/baeta/commit/583014f0bac810b25d9a8226bda2df4c9039f5e3), [`b5b53d3`](https://github.com/andreisergiu98/baeta/commit/b5b53d35d950b2b18014b02d472c401ed4721334)]:
153
+ - @baeta/core@1.0.9
154
+ - @baeta/errors@1.0.9
155
+ - @baeta/util-log@1.0.1
156
+
157
+ ## 1.0.8
158
+
159
+ ### Patch Changes
160
+
161
+ - [#189](https://github.com/andreisergiu98/baeta/pull/189) [`d500378`](https://github.com/andreisergiu98/baeta/commit/d500378198e0a9c48298c4242913bca8ad348228) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add jsdocs
162
+
163
+ - Updated dependencies [[`d500378`](https://github.com/andreisergiu98/baeta/commit/d500378198e0a9c48298c4242913bca8ad348228), [`1334c2a`](https://github.com/andreisergiu98/baeta/commit/1334c2a866676c88f0f3d380b22133d81c4e98bc)]:
164
+ - @baeta/core@1.0.8
165
+ - @baeta/errors@1.0.8
166
+ - @baeta/util-log@1.0.0
167
+
168
+ ## 1.0.5
169
+
170
+ ### Patch Changes
171
+
172
+ - [`b59db50`](https://github.com/andreisergiu98/baeta/commit/b59db501a83275ab2d964933080e688a3a5d8820) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add readme
173
+
174
+ - Updated dependencies [[`b59db50`](https://github.com/andreisergiu98/baeta/commit/b59db501a83275ab2d964933080e688a3a5d8820)]:
175
+ - @baeta/core@0.1.5
176
+ - @baeta/errors@0.1.4
177
+ - @baeta/util-log@0.1.3
178
+
179
+ ## 1.0.4
180
+
181
+ ### Patch Changes
182
+
183
+ - [#180](https://github.com/andreisergiu98/baeta/pull/180) [`483c709`](https://github.com/andreisergiu98/baeta/commit/483c70932f815fd114732c00b74f9488d7924c72) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Raise minimum required NodeJS version to 22.12.0. Drop CommonJS builds in favor of the require_esm feature from NodeJS 22.12.0 onwards.
184
+
185
+ - [`de6e89c`](https://github.com/andreisergiu98/baeta/commit/de6e89c1b592e280967c73a4137d24ee56ef1857) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - raise es target to 2024
186
+
187
+ - Updated dependencies [[`483c709`](https://github.com/andreisergiu98/baeta/commit/483c70932f815fd114732c00b74f9488d7924c72), [`de6e89c`](https://github.com/andreisergiu98/baeta/commit/de6e89c1b592e280967c73a4137d24ee56ef1857)]:
188
+ - @baeta/core@0.1.4
189
+ - @baeta/errors@0.1.3
190
+ - @baeta/util-log@0.1.2
191
+
192
+ ## 1.0.3
193
+
194
+ ### Patch Changes
195
+
196
+ - [`c8dea0c`](https://github.com/andreisergiu98/baeta/commit/c8dea0c6a7824039cf4de13a8d2c0b1682ea3d02) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - maintain order of prepended middlewares
197
+
198
+ - Updated dependencies [[`c8dea0c`](https://github.com/andreisergiu98/baeta/commit/c8dea0c6a7824039cf4de13a8d2c0b1682ea3d02)]:
199
+ - @baeta/core@0.1.3
200
+
201
+ ## 1.0.2
202
+
203
+ ### Patch Changes
204
+
205
+ - [`1dbd072`](https://github.com/andreisergiu98/baeta/commit/1dbd072c70f8d6faf469b49bd26b6bf45a9bf6ff) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - fix: return type when returning bool in auth function
206
+
207
+ - Updated dependencies [[`59bbb9c`](https://github.com/andreisergiu98/baeta/commit/59bbb9c4baaf716f27dc251fe7aeb0231e6c5321), [`d77cd8a`](https://github.com/andreisergiu98/baeta/commit/d77cd8a1810fdf72cfbbb08d05c207bbc893c822), [`cf9f094`](https://github.com/andreisergiu98/baeta/commit/cf9f09468f84d99b069eb0f55e1fc207e2a41dd8)]:
208
+ - @baeta/core@0.1.2
209
+ - @baeta/errors@0.1.2
210
+
211
+ ## 1.0.1
212
+
213
+ ### Patch Changes
214
+
215
+ - [#157](https://github.com/andreisergiu98/baeta/pull/157) [`b9638eb`](https://github.com/andreisergiu98/baeta/commit/b9638eb9fb713507efa9821b4f04cc7896a997b1) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - stricter linting, better type safety
216
+
217
+ - [`a3f0e5d`](https://github.com/andreisergiu98/baeta/commit/a3f0e5d03fc9ef21a87d3ec6bf264d0e9707636a) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - fix exports order in package.json
218
+
219
+ - [#161](https://github.com/andreisergiu98/baeta/pull/161) [`cca37dd`](https://github.com/andreisergiu98/baeta/commit/cca37dd7135a2852f1f6e287c46911306bdc8da0) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
220
+
221
+ - Updated dependencies [[`594e47e`](https://github.com/andreisergiu98/baeta/commit/594e47e9ddb0ba7fdb975c48cd8df3af130b5c9e), [`b9638eb`](https://github.com/andreisergiu98/baeta/commit/b9638eb9fb713507efa9821b4f04cc7896a997b1), [`a3f0e5d`](https://github.com/andreisergiu98/baeta/commit/a3f0e5d03fc9ef21a87d3ec6bf264d0e9707636a), [`cca37dd`](https://github.com/andreisergiu98/baeta/commit/cca37dd7135a2852f1f6e287c46911306bdc8da0), [`44a7975`](https://github.com/andreisergiu98/baeta/commit/44a7975a65a1903d2e1aec27d55fed23f193187b), [`b6e87ce`](https://github.com/andreisergiu98/baeta/commit/b6e87ce347406164a9c0fca49172f1d5d4f50f74)]:
222
+ - @baeta/core@0.1.1
223
+ - @baeta/util-log@0.1.1
224
+ - @baeta/errors@0.1.1
225
+
226
+ ## 1.0.0
227
+
228
+ ### Minor Changes
229
+
230
+ - [#156](https://github.com/andreisergiu98/baeta/pull/156) [`01f3c20`](https://github.com/andreisergiu98/baeta/commit/01f3c20365539fad6e8a8694c59a8e86c95784e8) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - raise engine requirement to node >= 22
231
+
232
+ ### Patch Changes
233
+
234
+ - [#152](https://github.com/andreisergiu98/baeta/pull/152) [`d538c79`](https://github.com/andreisergiu98/baeta/commit/d538c7905e6ba96d9f294e2d528f9252e83acbe7) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update formatter
235
+
236
+ - [`4ee6550`](https://github.com/andreisergiu98/baeta/commit/4ee65501cbd7ca8b679b72d034d50c50dd5b2ca1) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - allow extensions to access module
237
+
238
+ - [#145](https://github.com/andreisergiu98/baeta/pull/145) [`08428d4`](https://github.com/andreisergiu98/baeta/commit/08428d4f03b79cab9c116ff7b3a3cf9a0b2620f2) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
239
+
240
+ - Updated dependencies [[`01f3c20`](https://github.com/andreisergiu98/baeta/commit/01f3c20365539fad6e8a8694c59a8e86c95784e8), [`d538c79`](https://github.com/andreisergiu98/baeta/commit/d538c7905e6ba96d9f294e2d528f9252e83acbe7), [`4ee6550`](https://github.com/andreisergiu98/baeta/commit/4ee65501cbd7ca8b679b72d034d50c50dd5b2ca1), [`08428d4`](https://github.com/andreisergiu98/baeta/commit/08428d4f03b79cab9c116ff7b3a3cf9a0b2620f2)]:
241
+ - @baeta/core@0.1.0
242
+ - @baeta/errors@0.1.0
243
+ - @baeta/util-log@0.1.0
244
+
245
+ ## 0.1.6
246
+
247
+ ### Patch Changes
248
+
249
+ - [`65a51d2`](https://github.com/andreisergiu98/baeta/commit/65a51d28fa1f5fde67c749b58911bb0522a756c8) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - fix auth for subscribe
250
+
251
+ - [#139](https://github.com/andreisergiu98/baeta/pull/139) [`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
252
+
253
+ - [#139](https://github.com/andreisergiu98/baeta/pull/139) [`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update typescript
254
+
255
+ - Updated dependencies [[`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4), [`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4)]:
256
+ - @baeta/core@0.0.36
257
+ - @baeta/errors@0.0.7
258
+ - @baeta/util-log@0.0.6
259
+
260
+ ## 0.1.5
261
+
262
+ ### Patch Changes
263
+
264
+ - Updated dependencies [[`325f623`](https://github.com/andreisergiu98/baeta/commit/325f623caa9aab2d6ae45258f214be1d7518396a)]:
265
+ - @baeta/core@0.0.35
266
+
267
+ ## 0.1.4
268
+
269
+ ### Patch Changes
270
+
271
+ - Updated dependencies [[`7313d92`](https://github.com/andreisergiu98/baeta/commit/7313d92b06e164663e4c6164a79f7c1ba4762d7e)]:
272
+ - @baeta/core@0.0.34
273
+
274
+ ## 0.1.3
275
+
276
+ ### Patch Changes
277
+
278
+ - [#128](https://github.com/andreisergiu98/baeta/pull/128) [`534917a`](https://github.com/andreisergiu98/baeta/commit/534917a18e7ed5d788a90a0335a5370d6af8f4a4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
279
+
280
+ - Updated dependencies [[`534917a`](https://github.com/andreisergiu98/baeta/commit/534917a18e7ed5d788a90a0335a5370d6af8f4a4)]:
281
+ - @baeta/core@0.0.33
282
+ - @baeta/errors@0.0.6
283
+ - @baeta/util-log@0.0.5
284
+
285
+ ## 0.1.2
286
+
287
+ ### Patch Changes
288
+
289
+ - [#121](https://github.com/andreisergiu98/baeta/pull/121) [`ceae50d`](https://github.com/andreisergiu98/baeta/commit/ceae50d88e4e59b22c603637620f4fc6b28b2454) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Update Node to v20
290
+
291
+ - Updated dependencies [[`ceae50d`](https://github.com/andreisergiu98/baeta/commit/ceae50d88e4e59b22c603637620f4fc6b28b2454), [`5ab9740`](https://github.com/andreisergiu98/baeta/commit/5ab97405bbdeac3d9baa59cfe9502cdbff101163), [`d94ee47`](https://github.com/andreisergiu98/baeta/commit/d94ee47bc485c541ff011290c4ac6ef0c145c83f)]:
292
+ - @baeta/core@0.0.32
293
+ - @baeta/errors@0.0.5
294
+ - @baeta/util-log@0.0.4
295
+
296
+ ## 0.1.1
297
+
298
+ ### Patch Changes
299
+
300
+ - [#119](https://github.com/andreisergiu98/baeta/pull/119) [`643a2eb`](https://github.com/andreisergiu98/baeta/commit/643a2eb17c2789cd25361ddeede149a0e459e68a) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
301
+
302
+ - Updated dependencies [[`643a2eb`](https://github.com/andreisergiu98/baeta/commit/643a2eb17c2789cd25361ddeede149a0e459e68a)]:
303
+ - @baeta/core@0.0.31
304
+ - @baeta/errors@0.0.4
305
+ - @baeta/util-log@0.0.3
306
+
307
+ ## 0.1.0
308
+
309
+ ### Minor Changes
310
+
311
+ - [#112](https://github.com/andreisergiu98/baeta/pull/112) [`87493ed`](https://github.com/andreisergiu98/baeta/commit/87493edd2bfc9647407c3c4a05ea87b47f8f9a27) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - change default rule to $and for security reasons
312
+
313
+ ## 0.0.7
314
+
315
+ ### Patch Changes
316
+
317
+ - [#102](https://github.com/andreisergiu98/baeta/pull/102) [`c9e37fd`](https://github.com/andreisergiu98/baeta/commit/c9e37fd1d64588fd8eb63facd7eda08c0009470c) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
318
+
319
+ - [#99](https://github.com/andreisergiu98/baeta/pull/99) [`4b88400`](https://github.com/andreisergiu98/baeta/commit/4b88400a314c341e5d75d161c83afa582cea16d3) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - fix: development env check to include stacktrace in errors
320
+
321
+ - [#101](https://github.com/andreisergiu98/baeta/pull/101) [`03d1353`](https://github.com/andreisergiu98/baeta/commit/03d1353bcedf211d3b7dcfbe38132e43422742b1) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - fix grant type being generic
322
+
323
+ - [#102](https://github.com/andreisergiu98/baeta/pull/102) [`c9e37fd`](https://github.com/andreisergiu98/baeta/commit/c9e37fd1d64588fd8eb63facd7eda08c0009470c) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies and builder
324
+
325
+ - [#106](https://github.com/andreisergiu98/baeta/pull/106) [`01788ab`](https://github.com/andreisergiu98/baeta/commit/01788ab04ff6956b2b50186af5bec8ed7ebbe76e) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add compatibility with windows
326
+
327
+ - Updated dependencies [[`c9e37fd`](https://github.com/andreisergiu98/baeta/commit/c9e37fd1d64588fd8eb63facd7eda08c0009470c), [`4b88400`](https://github.com/andreisergiu98/baeta/commit/4b88400a314c341e5d75d161c83afa582cea16d3), [`c9e37fd`](https://github.com/andreisergiu98/baeta/commit/c9e37fd1d64588fd8eb63facd7eda08c0009470c), [`01788ab`](https://github.com/andreisergiu98/baeta/commit/01788ab04ff6956b2b50186af5bec8ed7ebbe76e)]:
328
+ - @baeta/core@0.0.30
329
+ - @baeta/errors@0.0.3
330
+ - @baeta/util-log@0.0.2
331
+
332
+ ## 0.0.6
333
+
334
+ ### Patch Changes
335
+
336
+ - [#69](https://github.com/andreisergiu98/baeta/pull/69) [`3cdd9b3`](https://github.com/andreisergiu98/baeta/commit/3cdd9b30369d21179769a4b8d5f76e326ae6db37) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
337
+
338
+ - [#98](https://github.com/andreisergiu98/baeta/pull/98) [`d2a0a63`](https://github.com/andreisergiu98/baeta/commit/d2a0a6380124fe49199a80bf2e3bed2ceddf8ba6) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - fix(extension-auth): fix default scopes for subscriptions and grant type
339
+
340
+ - [#91](https://github.com/andreisergiu98/baeta/pull/91) [`e0944f6`](https://github.com/andreisergiu98/baeta/commit/e0944f6320e6cf2f0a3d2c9f51edd282bdce0546) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
341
+
342
+ - Updated dependencies [[`3cdd9b3`](https://github.com/andreisergiu98/baeta/commit/3cdd9b30369d21179769a4b8d5f76e326ae6db37), [`e0944f6`](https://github.com/andreisergiu98/baeta/commit/e0944f6320e6cf2f0a3d2c9f51edd282bdce0546)]:
343
+ - @baeta/core@0.0.29
344
+ - @baeta/errors@0.0.2
345
+
346
+ ## 0.0.5
347
+
348
+ ### Patch Changes
349
+
350
+ - Updated dependencies [[`a197f81`](https://github.com/andreisergiu98/baeta/commit/a197f8136b12010ec554123dbfa23574c2c2e0f3)]:
351
+ - @baeta/core@0.0.28
352
+
353
+ ## 0.0.4
354
+
355
+ ### Patch Changes
356
+
357
+ - Updated dependencies [[`d88cca7`](https://github.com/andreisergiu98/baeta/commit/d88cca7c271ce99e6296396e2ada5e3a905f886a), [`d88cca7`](https://github.com/andreisergiu98/baeta/commit/d88cca7c271ce99e6296396e2ada5e3a905f886a), [`d88cca7`](https://github.com/andreisergiu98/baeta/commit/d88cca7c271ce99e6296396e2ada5e3a905f886a)]:
358
+ - @baeta/core@0.0.27
359
+
360
+ ## 0.0.3
361
+
362
+ ### Patch Changes
363
+
364
+ - [#47](https://github.com/andreisergiu98/baeta/pull/47) [`eb7096d`](https://github.com/andreisergiu98/baeta/commit/eb7096d42a53b17bae0a8365eccb795e7ded02e9) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
365
+
366
+ - [#43](https://github.com/andreisergiu98/baeta/pull/43) [`670501b`](https://github.com/andreisergiu98/baeta/commit/670501b2b1cfb1126be3421293b8ccd597c6ffc2) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - bump dependencies
367
+
368
+ - Updated dependencies [[`670501b`](https://github.com/andreisergiu98/baeta/commit/670501b2b1cfb1126be3421293b8ccd597c6ffc2), [`eb7096d`](https://github.com/andreisergiu98/baeta/commit/eb7096d42a53b17bae0a8365eccb795e7ded02e9), [`670501b`](https://github.com/andreisergiu98/baeta/commit/670501b2b1cfb1126be3421293b8ccd597c6ffc2)]:
369
+ - @baeta/core@0.0.26
370
+ - @baeta/errors@0.0.1
371
+
372
+ ## 0.0.2
373
+
374
+ ### Patch Changes
375
+
376
+ - Updated dependencies [[`f122a1e`](https://github.com/andreisergiu98/baeta/commit/f122a1e2970d915ce3c24931d4309db26665c739)]:
377
+ - @baeta/core@0.0.25
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Pampu Andrei
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,171 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/andreisergiu98/baeta/refs/heads/main/website/static/img/logo-baeta.svg" alt="Baeta Logo" width="150"/>
3
+ </p>
4
+
5
+ <div align="center">
6
+ <h1>Baeta</h1>
7
+ <a href="https://www.npmjs.com/package/@baeta/cli"><img src="https://img.shields.io/npm/v/@baeta/cli.svg?style=flat" /></a>
8
+ <a href="https://github.com/andreisergiu98/baeta/actions/workflows/checks.yml"><img src="https://img.shields.io/github/actions/workflow/status/andreisergiu98/baeta/checks.yml" /></a>
9
+ <a href="https://github.com/andreisergiu98/baeta/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" /></a>
10
+ <a href="https://github.com/andreisergiu98/baeta/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" /></a>
11
+ <br />
12
+ <br />
13
+ <a href="https://baeta.io/docs/getting-started/installation">Getting Started</a>
14
+ <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
15
+ <a href="https://www.baeta.io/">Website</a>
16
+ <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
17
+ <a href="https://baeta.io/docs/intro">Docs</a>
18
+ <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
19
+ <a href="https://github.com/andreisergiu98/baeta/tree/main/examples">Examples</a>
20
+ <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
21
+ <a href="https://discord.gg/BHFXHvyj">Discord</a>
22
+ <br />
23
+ <hr />
24
+ </div>
25
+
26
+ # What is Baeta?
27
+
28
+ Building GraphQL APIs shouldn't be complicated. **Baeta** is a modern, modular, open-source GraphQL framework designed with flexibility in mind. It follows a granular approach where you only add what you need, helping developers focus on what matters most - creating powerful, scalable APIs without the boilerplate.
29
+
30
+ ### Key Features
31
+
32
+ - **Modular Architecture**: Organize your API into manageable modules
33
+ - **Schema-First Development**: Define your API contract upfront
34
+ - **Type Safety**: Automatic code generation for type-safe development
35
+ - **Middleware & Directives**: Easy integration of custom behaviors
36
+ - **High Performance**: Built for scalability and efficiency
37
+
38
+ #### And optional app plugins and libraries
39
+
40
+ - **@baeta/auth**: Add powerful scope-based authorization
41
+ - **@baeta/complexity**: Reject resource-exhausting queries with depth, breadth and complexity limits
42
+ - **@baeta/cache**: Type-safe caching with declarative queries and automatic reconciliation
43
+ - ... and more!
44
+
45
+ ## Why use Baeta?
46
+
47
+ Baeta makes it easy to build better GraphQL APIs while staying flexible. Here's how:
48
+
49
+ **Granular and Progressive:** Start small and add features as you need them. Whether you're building a simple API or a complex system, Baeta scales with your needs.
50
+
51
+ **Modular architecture:** Baeta's modular design allows you to organize your GraphQL API into smaller, more manageable modules that can be added or removed as needed. This makes it easier to maintain and scale your API over time.
52
+
53
+ **Schema-first approach:** With Baeta, you define your schema first, and then logic and resolvers. This approach ensures a consistent and well-defined API for your clients and reduces boilerplate code.
54
+
55
+ ## How it Works
56
+
57
+ #### 1. Define your schema
58
+
59
+ ```graphql
60
+ type User {
61
+ id: ID!
62
+ name: String!
63
+ email: String!
64
+ age: Int
65
+ }
66
+
67
+ input UserWhereUnique {
68
+ id: ID
69
+ email: String
70
+ }
71
+
72
+ type Query {
73
+ user(where: UserWhereUnique!): User!
74
+ users: [User!]!
75
+ }
76
+ ```
77
+
78
+ #### 2. Implement your resolvers
79
+
80
+ ```typescript
81
+ import { UserModule } from "./typedef.ts";
82
+
83
+ const { Query } = UserModule;
84
+
85
+ const userQuery = Query.user.resolve(({ args }) => {
86
+ return dataSource.user.find(args.where);
87
+ });
88
+
89
+ const usersQuery = Query.users.resolve(() => {
90
+ return dataSource.user.findMany();
91
+ });
92
+
93
+ export default Query.$fields({
94
+ user: userQuery,
95
+ users: usersQuery,
96
+ });
97
+ ```
98
+
99
+ #### 3. Add authorization
100
+
101
+ ```typescript
102
+ import { auth, rule, scope } from "./lib/auth.ts";
103
+ import { UserModule } from "./typedef.ts";
104
+
105
+ const { Query } = UserModule;
106
+
107
+ const userQuery = Query.user
108
+ .$use(auth(rule.or(scope.isPublic, scope.isLoggedIn)))
109
+ .resolve(async ({ args }) => {
110
+ // ...
111
+ });
112
+ ```
113
+
114
+ #### 4. Add caching
115
+
116
+ ```typescript
117
+ import { createCache, defineQuery } from "@baeta/cache";
118
+ import { redisClient } from "./lib/redis.ts";
119
+
120
+ const { Query, Mutation } = UserModule;
121
+
122
+ export const userCache = createCache(redisClient, {
123
+ name: "UserCache",
124
+ parse: JSON.parse,
125
+ serialize: JSON.stringify,
126
+ })
127
+ .withQueries({
128
+ findUser: defineQuery({
129
+ resolve: async (args: { id: string }) => {
130
+ return dataSource.user.findUnique({ where: args });
131
+ },
132
+ }),
133
+ })
134
+ .build();
135
+
136
+ const userQuery = Query.user.map(({ args }) =>
137
+ userCache.queries.findUser({ id: args.where.id }),
138
+ );
139
+
140
+ const updateUserMutation = Mutation.updateUser
141
+ .$use(async (next) => {
142
+ const user = await next();
143
+ if (user) await userCache.update(user);
144
+ return user;
145
+ })
146
+ .resolve(async ({ args }) => {
147
+ // ...
148
+ });
149
+ ```
150
+
151
+ ## Compatibility
152
+
153
+ Baeta is compatible with all GraphQL servers, which makes it easy to integrate with your existing stack. It works seamlessly with popular GraphQL server libraries such as **Graphql Yoga** and **Apollo Server**, as well as other popular tools like **Prisma**, **Drizzle** and **Kysely**.
154
+
155
+ Baeta's development tools are built for Node.js, but the runtime code is environment-agnostic. This means your Baeta applications can run anywhere JavaScript runs, including:
156
+
157
+ - Deno
158
+ - Cloudflare Workers
159
+ - AWS Lambda
160
+ - Vercel Edge Functions
161
+ - Bun
162
+ - Node.js
163
+ - Any other JavaScript runtime
164
+
165
+ ## Credits
166
+
167
+ Baeta was inspired by several amazing projects and people in the GraphQL ecosystem. Check out our [Credits page](https://baeta.io/docs/credits) to learn more about the individuals and projects that influenced Baeta's development.
168
+
169
+ ## License
170
+
171
+ Baeta is licensed under the [MIT License](./LICENSE).