@baeta/plugin-prisma 2.0.0-next.0 → 2.0.0-next.10

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/CHANGELOG.md ADDED
@@ -0,0 +1,318 @@
1
+ # @baeta/plugin-prisma
2
+
3
+ ## 2.0.0-next.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @baeta/plugin-exec@2.0.0-next.10
9
+
10
+ ## 2.0.0-next.9
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`831cfa2`](https://github.com/andreisergiu98/baeta/commit/831cfa2a11445aaf7f2d1a1d7ddf073db9bb8008), [`831cfa2`](https://github.com/andreisergiu98/baeta/commit/831cfa2a11445aaf7f2d1a1d7ddf073db9bb8008)]:
15
+ - @baeta/generator-sdk@2.0.0-next.4
16
+ - @baeta/util-path@2.0.0-next.3
17
+ - @baeta/plugin-exec@2.0.0-next.9
18
+
19
+ ## 2.0.0-next.8
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies []:
24
+ - @baeta/plugin-exec@2.0.0-next.8
25
+
26
+ ## 2.0.0-next.7
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies []:
31
+ - @baeta/plugin-exec@2.0.0-next.7
32
+
33
+ ## 2.0.0-next.3
34
+
35
+ ### Patch Changes
36
+
37
+ - Update generator-sdk package
38
+
39
+ - Updated dependencies [[`6de5d15`](https://github.com/andreisergiu98/baeta/commit/6de5d15484d341a1717a1b2f3f45272912e6a886)]:
40
+ - @baeta/generator-sdk@2.0.0-next.3
41
+ - @baeta/plugin-exec@2.0.0-next.3
42
+
43
+ ## 2.0.0-next.2
44
+
45
+ ### Patch Changes
46
+
47
+ - Fix broken types
48
+
49
+ - Updated dependencies []:
50
+ - @baeta/generator-sdk@2.0.0-next.2
51
+ - @baeta/plugin-exec@2.0.0-next.2
52
+ - @baeta/util-path@2.0.0-next.2
53
+
54
+ ## 2.0.0-next.1
55
+
56
+ ### Patch Changes
57
+
58
+ - Fix release version
59
+
60
+ - Updated dependencies []:
61
+ - @baeta/generator-sdk@2.0.0-next.1
62
+ - @baeta/plugin-exec@2.0.0-next.1
63
+ - @baeta/util-path@2.0.0-next.1
64
+
65
+ ## 2.0.0-next.0
66
+
67
+ ### Major Changes
68
+
69
+ - [#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
70
+ - **Side-effect-free type generation & resolver definitions.**
71
+ The types generator and resolver definitions were reworked to be side-effect free, improving type safety.
72
+ - **Stricter type safety.**
73
+ You must now **explicitly define resolvers for every field** during development—breakages that used to surface at runtime are now caught at compile time.
74
+ - **Removed `@baeta/compiler`.**
75
+ 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.
76
+ - **Subscriptions update.**
77
+ `@baeta/subscriptions-pubsub` now targets **`graphql-subscriptions` v3**.
78
+
79
+ ### Patch Changes
80
+
81
+ - Updated dependencies [[`31d1a50`](https://github.com/andreisergiu98/baeta/commit/31d1a509f96535b43ae85d19c770eb1a5f09dc94)]:
82
+ - @baeta/generator-sdk@2.0.0-next.0
83
+ - @baeta/plugin-exec@2.0.0-next.0
84
+ - @baeta/util-path@2.0.0-next.0
85
+
86
+ ## 1.0.11
87
+
88
+ ### Patch Changes
89
+
90
+ - Updated dependencies [[`7cbd2ef`](https://github.com/andreisergiu98/baeta/commit/7cbd2ef5b7697f703e4cc6f8d9612c7d01a10dd1), [`c7b9c05`](https://github.com/andreisergiu98/baeta/commit/c7b9c0523eb9827c99b2bcfc7dbe02f5ef389f21)]:
91
+ - @baeta/generator-sdk@1.0.2
92
+ - @baeta/plugin-exec@1.0.11
93
+
94
+ ## 1.0.9
95
+
96
+ ### Patch Changes
97
+
98
+ - [`583014f`](https://github.com/andreisergiu98/baeta/commit/583014f0bac810b25d9a8226bda2df4c9039f5e3) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Update dependencies
99
+
100
+ - Updated dependencies [[`583014f`](https://github.com/andreisergiu98/baeta/commit/583014f0bac810b25d9a8226bda2df4c9039f5e3)]:
101
+ - @baeta/generator-sdk@1.0.1
102
+ - @baeta/plugin-exec@1.0.9
103
+ - @baeta/util-path@1.0.1
104
+
105
+ ## 1.0.8
106
+
107
+ ### Patch Changes
108
+
109
+ - [#189](https://github.com/andreisergiu98/baeta/pull/189) [`d500378`](https://github.com/andreisergiu98/baeta/commit/d500378198e0a9c48298c4242913bca8ad348228) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add jsdocs
110
+
111
+ - [#165](https://github.com/andreisergiu98/baeta/pull/165) [`1334c2a`](https://github.com/andreisergiu98/baeta/commit/1334c2a866676c88f0f3d380b22133d81c4e98bc) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - mark as stable
112
+
113
+ - Updated dependencies [[`d500378`](https://github.com/andreisergiu98/baeta/commit/d500378198e0a9c48298c4242913bca8ad348228), [`1334c2a`](https://github.com/andreisergiu98/baeta/commit/1334c2a866676c88f0f3d380b22133d81c4e98bc)]:
114
+ - @baeta/generator-sdk@1.0.0
115
+ - @baeta/plugin-exec@1.0.8
116
+ - @baeta/util-path@1.0.0
117
+
118
+ ## 0.1.5
119
+
120
+ ### Patch Changes
121
+
122
+ - Updated dependencies [[`bf2d1a3`](https://github.com/andreisergiu98/baeta/commit/bf2d1a326235e5f34e723a5acc81cd7b974b913b)]:
123
+ - @baeta/generator-sdk@0.1.5
124
+ - @baeta/plugin-exec@0.1.5
125
+
126
+ ## 0.1.4
127
+
128
+ ### Patch Changes
129
+
130
+ - [`b59db50`](https://github.com/andreisergiu98/baeta/commit/b59db501a83275ab2d964933080e688a3a5d8820) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add readme
131
+
132
+ - Updated dependencies [[`b59db50`](https://github.com/andreisergiu98/baeta/commit/b59db501a83275ab2d964933080e688a3a5d8820)]:
133
+ - @baeta/generator-sdk@0.1.4
134
+ - @baeta/plugin-exec@0.1.4
135
+ - @baeta/util-path@0.1.4
136
+
137
+ ## 0.1.3
138
+
139
+ ### Patch Changes
140
+
141
+ - [#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.
142
+
143
+ - [#174](https://github.com/andreisergiu98/baeta/pull/174) [`3f2befb`](https://github.com/andreisergiu98/baeta/commit/3f2befbb4b645e2970727482e970c4e78f0ed598) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - fix skip generate
144
+
145
+ - [`de6e89c`](https://github.com/andreisergiu98/baeta/commit/de6e89c1b592e280967c73a4137d24ee56ef1857) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - raise es target to 2024
146
+
147
+ - Updated dependencies [[`483c709`](https://github.com/andreisergiu98/baeta/commit/483c70932f815fd114732c00b74f9488d7924c72), [`de6e89c`](https://github.com/andreisergiu98/baeta/commit/de6e89c1b592e280967c73a4137d24ee56ef1857)]:
148
+ - @baeta/generator-sdk@0.1.3
149
+ - @baeta/plugin-exec@0.1.3
150
+ - @baeta/util-path@0.1.3
151
+
152
+ ## 0.1.2
153
+
154
+ ### Patch Changes
155
+
156
+ - [#170](https://github.com/andreisergiu98/baeta/pull/170) [`59bbb9c`](https://github.com/andreisergiu98/baeta/commit/59bbb9c4baaf716f27dc251fe7aeb0231e6c5321) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
157
+
158
+ - Updated dependencies [[`e3fb6f8`](https://github.com/andreisergiu98/baeta/commit/e3fb6f877b4b20e248ad79cbaa3655cabe973f6b), [`59bbb9c`](https://github.com/andreisergiu98/baeta/commit/59bbb9c4baaf716f27dc251fe7aeb0231e6c5321)]:
159
+ - @baeta/generator-sdk@0.1.2
160
+ - @baeta/plugin-exec@0.1.2
161
+ - @baeta/util-path@0.1.2
162
+
163
+ ## 0.1.1
164
+
165
+ ### Patch Changes
166
+
167
+ - [`a3f0e5d`](https://github.com/andreisergiu98/baeta/commit/a3f0e5d03fc9ef21a87d3ec6bf264d0e9707636a) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - fix exports order in package.json
168
+
169
+ - [#161](https://github.com/andreisergiu98/baeta/pull/161) [`cca37dd`](https://github.com/andreisergiu98/baeta/commit/cca37dd7135a2852f1f6e287c46911306bdc8da0) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
170
+
171
+ - [#162](https://github.com/andreisergiu98/baeta/pull/162) [`1c42409`](https://github.com/andreisergiu98/baeta/commit/1c424095518f47a057dd8b475c3c634eeb59bb92) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - make generated schema path required
172
+
173
+ - Updated dependencies [[`7f1958c`](https://github.com/andreisergiu98/baeta/commit/7f1958c44d1b9bed473e48c875fdaa7020c434fa), [`b9638eb`](https://github.com/andreisergiu98/baeta/commit/b9638eb9fb713507efa9821b4f04cc7896a997b1), [`fd3a5d2`](https://github.com/andreisergiu98/baeta/commit/fd3a5d27b497aca4b8807155e801b1c1197c5fe2), [`9d8d6a1`](https://github.com/andreisergiu98/baeta/commit/9d8d6a15d63579a2e0bdaa07b7efdcf10aff2492), [`a3f0e5d`](https://github.com/andreisergiu98/baeta/commit/a3f0e5d03fc9ef21a87d3ec6bf264d0e9707636a), [`cca37dd`](https://github.com/andreisergiu98/baeta/commit/cca37dd7135a2852f1f6e287c46911306bdc8da0)]:
174
+ - @baeta/generator-sdk@0.1.1
175
+ - @baeta/plugin-exec@0.1.1
176
+ - @baeta/util-path@0.1.1
177
+
178
+ ## 0.1.0
179
+
180
+ ### Minor Changes
181
+
182
+ - [#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
183
+
184
+ ### Patch Changes
185
+
186
+ - [#152](https://github.com/andreisergiu98/baeta/pull/152) [`d538c79`](https://github.com/andreisergiu98/baeta/commit/d538c7905e6ba96d9f294e2d528f9252e83acbe7) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update formatter
187
+
188
+ - [#145](https://github.com/andreisergiu98/baeta/pull/145) [`08428d4`](https://github.com/andreisergiu98/baeta/commit/08428d4f03b79cab9c116ff7b3a3cf9a0b2620f2) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
189
+
190
+ - Updated dependencies [[`01f3c20`](https://github.com/andreisergiu98/baeta/commit/01f3c20365539fad6e8a8694c59a8e86c95784e8), [`d538c79`](https://github.com/andreisergiu98/baeta/commit/d538c7905e6ba96d9f294e2d528f9252e83acbe7), [`08428d4`](https://github.com/andreisergiu98/baeta/commit/08428d4f03b79cab9c116ff7b3a3cf9a0b2620f2)]:
191
+ - @baeta/generator-sdk@0.1.0
192
+ - @baeta/plugin-exec@0.1.0
193
+ - @baeta/util-path@0.1.0
194
+
195
+ ## 0.0.24
196
+
197
+ ### Patch Changes
198
+
199
+ - [#139](https://github.com/andreisergiu98/baeta/pull/139) [`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
200
+
201
+ - [#139](https://github.com/andreisergiu98/baeta/pull/139) [`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update typescript
202
+
203
+ - Updated dependencies [[`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4), [`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4)]:
204
+ - @baeta/generator-sdk@0.0.14
205
+ - @baeta/plugin-exec@0.0.12
206
+ - @baeta/util-path@0.0.6
207
+
208
+ ## 0.0.23
209
+
210
+ ### Patch Changes
211
+
212
+ - [#128](https://github.com/andreisergiu98/baeta/pull/128) [`534917a`](https://github.com/andreisergiu98/baeta/commit/534917a18e7ed5d788a90a0335a5370d6af8f4a4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
213
+
214
+ - Updated dependencies [[`534917a`](https://github.com/andreisergiu98/baeta/commit/534917a18e7ed5d788a90a0335a5370d6af8f4a4)]:
215
+ - @baeta/generator-sdk@0.0.13
216
+ - @baeta/plugin-exec@0.0.11
217
+ - @baeta/util-path@0.0.5
218
+
219
+ ## 0.0.22
220
+
221
+ ### Patch Changes
222
+
223
+ - [#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
224
+
225
+ - Updated dependencies [[`ceae50d`](https://github.com/andreisergiu98/baeta/commit/ceae50d88e4e59b22c603637620f4fc6b28b2454), [`d94ee47`](https://github.com/andreisergiu98/baeta/commit/d94ee47bc485c541ff011290c4ac6ef0c145c83f)]:
226
+ - @baeta/generator-sdk@0.0.12
227
+ - @baeta/plugin-exec@0.0.10
228
+ - @baeta/util-path@0.0.4
229
+
230
+ ## 0.0.21
231
+
232
+ ### Patch Changes
233
+
234
+ - [#119](https://github.com/andreisergiu98/baeta/pull/119) [`643a2eb`](https://github.com/andreisergiu98/baeta/commit/643a2eb17c2789cd25361ddeede149a0e459e68a) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
235
+
236
+ - Updated dependencies [[`18db339`](https://github.com/andreisergiu98/baeta/commit/18db339719aa309c619372d2161c5fdbc08fa316), [`643a2eb`](https://github.com/andreisergiu98/baeta/commit/643a2eb17c2789cd25361ddeede149a0e459e68a)]:
237
+ - @baeta/generator-sdk@0.0.11
238
+ - @baeta/plugin-exec@0.0.9
239
+ - @baeta/util-path@0.0.3
240
+
241
+ ## 0.0.20
242
+
243
+ ### Patch Changes
244
+
245
+ - [#102](https://github.com/andreisergiu98/baeta/pull/102) [`c9e37fd`](https://github.com/andreisergiu98/baeta/commit/c9e37fd1d64588fd8eb63facd7eda08c0009470c) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
246
+
247
+ - [#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
248
+
249
+ - [#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
250
+
251
+ - Updated dependencies [[`c9e37fd`](https://github.com/andreisergiu98/baeta/commit/c9e37fd1d64588fd8eb63facd7eda08c0009470c), [`c9e37fd`](https://github.com/andreisergiu98/baeta/commit/c9e37fd1d64588fd8eb63facd7eda08c0009470c), [`01788ab`](https://github.com/andreisergiu98/baeta/commit/01788ab04ff6956b2b50186af5bec8ed7ebbe76e)]:
252
+ - @baeta/generator-sdk@0.0.10
253
+ - @baeta/plugin-exec@0.0.8
254
+ - @baeta/util-path@0.0.2
255
+
256
+ ## 0.0.19
257
+
258
+ ### Patch Changes
259
+
260
+ - [#69](https://github.com/andreisergiu98/baeta/pull/69) [`3cdd9b3`](https://github.com/andreisergiu98/baeta/commit/3cdd9b30369d21179769a4b8d5f76e326ae6db37) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
261
+
262
+ - [#91](https://github.com/andreisergiu98/baeta/pull/91) [`e0944f6`](https://github.com/andreisergiu98/baeta/commit/e0944f6320e6cf2f0a3d2c9f51edd282bdce0546) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
263
+
264
+ - Updated dependencies [[`3ff5e54`](https://github.com/andreisergiu98/baeta/commit/3ff5e54f31cf42ba2264b12309338d6e78710722), [`3cdd9b3`](https://github.com/andreisergiu98/baeta/commit/3cdd9b30369d21179769a4b8d5f76e326ae6db37), [`e0944f6`](https://github.com/andreisergiu98/baeta/commit/e0944f6320e6cf2f0a3d2c9f51edd282bdce0546)]:
265
+ - @baeta/generator-sdk@0.0.9
266
+ - @baeta/plugin-exec@0.0.7
267
+
268
+ ## 0.0.18
269
+
270
+ ### Patch Changes
271
+
272
+ - [#66](https://github.com/andreisergiu98/baeta/pull/66) [`9a4a021`](https://github.com/andreisergiu98/baeta/commit/9a4a0214351b70295ce4f7eecaa8c49ab0e1325b) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - replace chokidar with @parcel/watcher
273
+
274
+ - Updated dependencies [[`9a4a021`](https://github.com/andreisergiu98/baeta/commit/9a4a0214351b70295ce4f7eecaa8c49ab0e1325b)]:
275
+ - @baeta/generator-sdk@0.0.8
276
+ - @baeta/plugin-exec@0.0.6
277
+
278
+ ## 0.0.17
279
+
280
+ ### Patch Changes
281
+
282
+ - Updated dependencies [[`6a2dd11`](https://github.com/andreisergiu98/baeta/commit/6a2dd110d6ffd2bff25d9c4501faebb052e0cd40)]:
283
+ - @baeta/plugin-exec@0.0.5
284
+ - @baeta/generator-sdk@0.0.7
285
+
286
+ ## 0.0.16
287
+
288
+ ### Patch Changes
289
+
290
+ - [#47](https://github.com/andreisergiu98/baeta/pull/47) [`eb7096d`](https://github.com/andreisergiu98/baeta/commit/eb7096d42a53b17bae0a8365eccb795e7ded02e9) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
291
+
292
+ - [#43](https://github.com/andreisergiu98/baeta/pull/43) [`670501b`](https://github.com/andreisergiu98/baeta/commit/670501b2b1cfb1126be3421293b8ccd597c6ffc2) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - bump dependencies
293
+
294
+ - Updated dependencies [[`eb7096d`](https://github.com/andreisergiu98/baeta/commit/eb7096d42a53b17bae0a8365eccb795e7ded02e9), [`670501b`](https://github.com/andreisergiu98/baeta/commit/670501b2b1cfb1126be3421293b8ccd597c6ffc2)]:
295
+ - @baeta/generator-sdk@0.0.6
296
+ - @baeta/plugin-exec@0.0.4
297
+
298
+ ## 0.0.15
299
+
300
+ ### Patch Changes
301
+
302
+ - [#40](https://github.com/andreisergiu98/baeta/pull/40) [`9f937f4`](https://github.com/andreisergiu98/baeta/commit/9f937f47d3464a082680047414ee13a76cf6c056) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - normalize config
303
+
304
+ - Updated dependencies [[`9f937f4`](https://github.com/andreisergiu98/baeta/commit/9f937f47d3464a082680047414ee13a76cf6c056), [`9f937f4`](https://github.com/andreisergiu98/baeta/commit/9f937f47d3464a082680047414ee13a76cf6c056)]:
305
+ - @baeta/generator-sdk@0.0.5
306
+ - @baeta/plugin-exec@0.0.3
307
+
308
+ ## 0.0.14
309
+
310
+ ### Patch Changes
311
+
312
+ - [`d1190c1`](https://github.com/andreisergiu98/baeta/commit/d1190c10e3c259c73ddeeb73a4bd312b22bf2ea4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - create cli sdk
313
+ release prisma plugin
314
+ update dependencies
315
+ refactor generator plugins
316
+ - Updated dependencies [[`d1190c1`](https://github.com/andreisergiu98/baeta/commit/d1190c10e3c259c73ddeeb73a4bd312b22bf2ea4)]:
317
+ - @baeta/generator-sdk@0.0.4
318
+ - @baeta/plugin-exec@0.0.2
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  <div align="center">
6
6
  <h1>Baeta</h1>
7
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/testing.yml"><img src="https://img.shields.io/github/actions/workflow/status/andreisergiu98/baeta/testing.yml" /></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
9
  <a href="https://github.com/andreisergiu98/baeta/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" /></a>
10
10
  <a href="https://github.com/andreisergiu98/baeta/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" /></a>
11
11
  <br />
@@ -77,43 +77,68 @@ type Query {
77
77
  #### 2. Implement your resolvers
78
78
 
79
79
  ```typescript
80
- import { getUserModule } from "./typedef";
80
+ import { UserModule } from "./typedef.ts";
81
81
 
82
- const { Query } = getUserModule();
82
+ const { Query } = UserModule;
83
83
 
84
- Query.user(({ args }) => {
84
+ const userQuery = Query.user.resolve(({ args }) => {
85
85
  return dataSource.user.find(args.where);
86
86
  });
87
87
 
88
- Query.users(() => {
88
+ const usersQuery = Query.users.resolve(() => {
89
89
  return dataSource.user.findMany();
90
90
  });
91
+
92
+ Query.$fields({
93
+ user: userQuery,
94
+ users: usersQuery,
95
+ });
91
96
  ```
92
97
 
93
98
  #### 3. Add authorization
94
99
 
95
100
  ```typescript
96
- const { Query, Mutation } = getUserModule();
97
-
98
- Query.users.$auth({
99
- $or: {
100
- isPublic: true,
101
- isLoggedIn: true,
102
- },
103
- });
101
+ import { UserModule } from "./typedef.ts";
102
+
103
+ const { Query } = UserModule;
104
+
105
+ const userQuery = Query.user
106
+ .$auth({
107
+ $or: {
108
+ isPublic: true,
109
+ isLoggedIn: true,
110
+ },
111
+ })
112
+ .resolve(async ({ args }) => {
113
+ // ...
114
+ });
104
115
  ```
105
116
 
106
117
  #### 4. Add caching
107
118
 
108
119
  ```typescript
109
- import { getUserModule } from "./typedef";
110
-
111
- const { User, Query } = getUserModule();
120
+ const { Query, Mutation, User } = UserModule;
112
121
 
113
122
  export const userCache = User.$createCache();
114
123
 
115
- Query.user.$useCache(userCache);
116
- Query.users.$useCache(userCache);
124
+ const userQuery = Query.user
125
+ .$auth({
126
+ // ...
127
+ })
128
+ .$useCache(userCache)
129
+ .resolve(async ({ args }) => {
130
+ // ...
131
+ });
132
+
133
+ const updateUserMutation = Mutation.updateUser
134
+ .$use(async (next) => {
135
+ const user = await next();
136
+ await userCache.save(user);
137
+ return user;
138
+ })
139
+ .resolve(async ({ args }) => {
140
+ // ...
141
+ });
117
142
  ```
118
143
 
119
144
  ## Compatibility
@@ -0,0 +1,42 @@
1
+ import * as _baeta_generator_sdk0 from "@baeta/generator-sdk";
2
+
3
+ //#region lib/options.d.ts
4
+ /**
5
+ * Configuration options for the Prisma plugin
6
+ */
7
+ interface PrismaPluginOptions {
8
+ /**
9
+ * Whether to generate the Prisma client
10
+ * @defaultValue true
11
+ */
12
+ generateClient?: boolean;
13
+ /**
14
+ * Custom command to generate Prisma client
15
+ * @defaultValue 'prisma generate'
16
+ */
17
+ generateCommand?: string;
18
+ /**
19
+ * Path to the Prisma schema file
20
+ * @example 'prisma/schema.prisma'
21
+ */
22
+ prismaSchema: string;
23
+ /**
24
+ * Path to the generated schema file for comparison
25
+ * Used to avoid unnecessary regeneration
26
+ * @example 'node_modules/@prisma/client/schema.prisma'
27
+ */
28
+ generatedSchemaPath: string;
29
+ }
30
+ //#endregion
31
+ //#region index.d.ts
32
+ /**
33
+ * A plugin that manages Prisma client generation in your Baeta project.
34
+ * See https://baeta.io/docs/plugins/prisma
35
+ *
36
+ * @param options - Configuration options for the pagination plugin
37
+ * @returns A Baeta generator plugin
38
+ */
39
+ declare function prismaPlugin(options: PrismaPluginOptions): _baeta_generator_sdk0.GeneratorPluginV1<unknown>[];
40
+ //#endregion
41
+ export { type PrismaPluginOptions, prismaPlugin as default, prismaPlugin };
42
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,53 +1,50 @@
1
- // lib/client-generator.ts
2
- import { readFile } from "fs/promises";
1
+ import { readFile } from "node:fs/promises";
3
2
  import { createExecPlugin } from "@baeta/plugin-exec";
4
3
  import { resolve } from "@baeta/util-path";
4
+
5
+ //#region lib/client-generator.ts
5
6
  async function compareSchemas(cwd, current, generated) {
6
- const [currentSchema, generatedSchema] = await Promise.all([
7
- readFile(resolve(cwd, current), "utf-8"),
8
- readFile(resolve(cwd, generated), "utf-8").catch(() => null)
9
- ]);
10
- return currentSchema.replaceAll(" ", "") === generatedSchema?.replaceAll(" ", "");
7
+ const [currentSchema, generatedSchema] = await Promise.all([readFile(resolve(cwd, current), "utf-8"), readFile(resolve(cwd, generated), "utf-8").catch(() => null)]);
8
+ return currentSchema.replaceAll(" ", "") === generatedSchema?.replaceAll(" ", "");
11
9
  }
12
10
  function createPrismaClientPlugin(options) {
13
- const { prismaSchema, generateCommand, generatedSchemaPath } = options;
14
- return createExecPlugin({
15
- name: "prisma-client",
16
- actionName: "Prisma client",
17
- exec: generateCommand ?? "prisma generate",
18
- watch: (generatorOptions, watcher, reload) => {
19
- const prismaPath = resolve(generatorOptions.cwd, prismaSchema);
20
- const handleChange = (file) => {
21
- if (file.path === prismaPath) {
22
- reload(file);
23
- }
24
- };
25
- watcher.on("update", handleChange);
26
- watcher.on("delete", handleChange);
27
- },
28
- skip: async (ctx) => {
29
- const schema = resolve(ctx.generatorOptions.cwd, prismaSchema);
30
- if (ctx.watching && ctx.changedFile?.path !== schema) {
31
- return true;
32
- }
33
- if (!ctx.watching && generatedSchemaPath) {
34
- return compareSchemas(ctx.generatorOptions.cwd, prismaSchema, generatedSchemaPath);
35
- }
36
- return false;
37
- }
38
- });
11
+ const { prismaSchema, generateCommand, generatedSchemaPath } = options;
12
+ return createExecPlugin({
13
+ name: "prisma-client",
14
+ actionName: "Prisma client",
15
+ exec: generateCommand ?? "prisma generate",
16
+ watch: (generatorOptions, watcher, reload) => {
17
+ const prismaPath = resolve(generatorOptions.cwd, prismaSchema);
18
+ const handleChange = (file) => {
19
+ if (file.path === prismaPath) reload(file);
20
+ };
21
+ watcher.on("update", handleChange);
22
+ watcher.on("delete", handleChange);
23
+ },
24
+ skip: async (ctx) => {
25
+ const schema = resolve(ctx.generatorOptions.cwd, prismaSchema);
26
+ if (ctx.watching && ctx.changedFile?.path !== schema) return true;
27
+ if (!ctx.watching && generatedSchemaPath) return compareSchemas(ctx.generatorOptions.cwd, prismaSchema, generatedSchemaPath);
28
+ return false;
29
+ }
30
+ });
39
31
  }
40
32
 
41
- // index.ts
42
- var index_default = prismaPlugin;
33
+ //#endregion
34
+ //#region index.ts
35
+ var plugin_prisma_default = prismaPlugin;
36
+ /**
37
+ * A plugin that manages Prisma client generation in your Baeta project.
38
+ * See https://baeta.io/docs/plugins/prisma
39
+ *
40
+ * @param options - Configuration options for the pagination plugin
41
+ * @returns A Baeta generator plugin
42
+ */
43
43
  function prismaPlugin(options) {
44
- if (options.generateClient === false) {
45
- return [];
46
- }
47
- return [createPrismaClientPlugin(options)];
44
+ if (options.generateClient === false) return [];
45
+ return [createPrismaClientPlugin(options)];
48
46
  }
49
- export {
50
- index_default as default,
51
- prismaPlugin
52
- };
47
+
48
+ //#endregion
49
+ export { plugin_prisma_default as default, prismaPlugin };
53
50
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/client-generator.ts","../index.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\nimport type { Ctx, WatcherFile } from '@baeta/generator-sdk';\nimport { createExecPlugin } from '@baeta/plugin-exec';\nimport { resolve } from '@baeta/util-path';\nimport type { PrismaPluginOptions } from './options.ts';\n\nasync function compareSchemas(cwd: string, current: string, generated: string) {\n\tconst [currentSchema, generatedSchema] = await Promise.all([\n\t\treadFile(resolve(cwd, current), 'utf-8'),\n\t\treadFile(resolve(cwd, generated), 'utf-8').catch(() => null),\n\t]);\n\treturn currentSchema.replaceAll(' ', '') === generatedSchema?.replaceAll(' ', '');\n}\n\nexport function createPrismaClientPlugin(options: PrismaPluginOptions) {\n\tconst { prismaSchema, generateCommand, generatedSchemaPath } = options;\n\n\treturn createExecPlugin({\n\t\tname: 'prisma-client',\n\t\tactionName: 'Prisma client',\n\t\texec: generateCommand ?? 'prisma generate',\n\t\twatch: (generatorOptions, watcher, reload) => {\n\t\t\tconst prismaPath = resolve(generatorOptions.cwd, prismaSchema);\n\n\t\t\tconst handleChange = (file: WatcherFile) => {\n\t\t\t\tif (file.path === prismaPath) {\n\t\t\t\t\treload(file);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\twatcher.on('update', handleChange);\n\t\t\twatcher.on('delete', handleChange);\n\t\t},\n\t\tskip: async (ctx: Ctx) => {\n\t\t\tconst schema = resolve(ctx.generatorOptions.cwd, prismaSchema);\n\n\t\t\tif (ctx.watching && ctx.changedFile?.path !== schema) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (!ctx.watching && generatedSchemaPath) {\n\t\t\t\treturn compareSchemas(ctx.generatorOptions.cwd, prismaSchema, generatedSchemaPath);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\t});\n}\n","import { createPrismaClientPlugin } from './lib/client-generator.ts';\nimport type { PrismaPluginOptions } from './lib/options.ts';\n\nexport type { PrismaPluginOptions };\nexport default prismaPlugin;\n\n/**\n * A plugin that manages Prisma client generation in your Baeta project.\n * See https://baeta.io/docs/plugins/prisma\n *\n * @param options - Configuration options for the pagination plugin\n * @returns A Baeta generator plugin\n */\nexport function prismaPlugin(options: PrismaPluginOptions) {\n\tif (options.generateClient === false) {\n\t\treturn [];\n\t}\n\treturn [createPrismaClientPlugin(options)];\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AAEzB,SAAS,wBAAwB;AACjC,SAAS,eAAe;AAGxB,eAAe,eAAe,KAAa,SAAiB,WAAmB;AAC9E,QAAM,CAAC,eAAe,eAAe,IAAI,MAAM,QAAQ,IAAI;AAAA,IAC1D,SAAS,QAAQ,KAAK,OAAO,GAAG,OAAO;AAAA,IACvC,SAAS,QAAQ,KAAK,SAAS,GAAG,OAAO,EAAE,MAAM,MAAM,IAAI;AAAA,EAC5D,CAAC;AACD,SAAO,cAAc,WAAW,KAAK,EAAE,MAAM,iBAAiB,WAAW,KAAK,EAAE;AACjF;AAEO,SAAS,yBAAyB,SAA8B;AACtE,QAAM,EAAE,cAAc,iBAAiB,oBAAoB,IAAI;AAE/D,SAAO,iBAAiB;AAAA,IACvB,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,MAAM,mBAAmB;AAAA,IACzB,OAAO,CAAC,kBAAkB,SAAS,WAAW;AAC7C,YAAM,aAAa,QAAQ,iBAAiB,KAAK,YAAY;AAE7D,YAAM,eAAe,CAAC,SAAsB;AAC3C,YAAI,KAAK,SAAS,YAAY;AAC7B,iBAAO,IAAI;AAAA,QACZ;AAAA,MACD;AAEA,cAAQ,GAAG,UAAU,YAAY;AACjC,cAAQ,GAAG,UAAU,YAAY;AAAA,IAClC;AAAA,IACA,MAAM,OAAO,QAAa;AACzB,YAAM,SAAS,QAAQ,IAAI,iBAAiB,KAAK,YAAY;AAE7D,UAAI,IAAI,YAAY,IAAI,aAAa,SAAS,QAAQ;AACrD,eAAO;AAAA,MACR;AAEA,UAAI,CAAC,IAAI,YAAY,qBAAqB;AACzC,eAAO,eAAe,IAAI,iBAAiB,KAAK,cAAc,mBAAmB;AAAA,MAClF;AAEA,aAAO;AAAA,IACR;AAAA,EACD,CAAC;AACF;;;AC3CA,IAAO,gBAAQ;AASR,SAAS,aAAa,SAA8B;AAC1D,MAAI,QAAQ,mBAAmB,OAAO;AACrC,WAAO,CAAC;AAAA,EACT;AACA,SAAO,CAAC,yBAAyB,OAAO,CAAC;AAC1C;","names":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../lib/client-generator.ts","../index.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\nimport type { Ctx, WatcherFile } from '@baeta/generator-sdk';\nimport { createExecPlugin } from '@baeta/plugin-exec';\nimport { resolve } from '@baeta/util-path';\nimport type { PrismaPluginOptions } from './options.ts';\n\nasync function compareSchemas(cwd: string, current: string, generated: string) {\n\tconst [currentSchema, generatedSchema] = await Promise.all([\n\t\treadFile(resolve(cwd, current), 'utf-8'),\n\t\treadFile(resolve(cwd, generated), 'utf-8').catch(() => null),\n\t]);\n\treturn currentSchema.replaceAll(' ', '') === generatedSchema?.replaceAll(' ', '');\n}\n\nexport function createPrismaClientPlugin(options: PrismaPluginOptions) {\n\tconst { prismaSchema, generateCommand, generatedSchemaPath } = options;\n\n\treturn createExecPlugin({\n\t\tname: 'prisma-client',\n\t\tactionName: 'Prisma client',\n\t\texec: generateCommand ?? 'prisma generate',\n\t\twatch: (generatorOptions, watcher, reload) => {\n\t\t\tconst prismaPath = resolve(generatorOptions.cwd, prismaSchema);\n\n\t\t\tconst handleChange = (file: WatcherFile) => {\n\t\t\t\tif (file.path === prismaPath) {\n\t\t\t\t\treload(file);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\twatcher.on('update', handleChange);\n\t\t\twatcher.on('delete', handleChange);\n\t\t},\n\t\tskip: async (ctx: Ctx) => {\n\t\t\tconst schema = resolve(ctx.generatorOptions.cwd, prismaSchema);\n\n\t\t\tif (ctx.watching && ctx.changedFile?.path !== schema) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (!ctx.watching && generatedSchemaPath) {\n\t\t\t\treturn compareSchemas(ctx.generatorOptions.cwd, prismaSchema, generatedSchemaPath);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\t});\n}\n","import { createPrismaClientPlugin } from './lib/client-generator.ts';\nimport type { PrismaPluginOptions } from './lib/options.ts';\n\nexport type { PrismaPluginOptions } from './lib/options.ts';\n\nexport default prismaPlugin;\n\n/**\n * A plugin that manages Prisma client generation in your Baeta project.\n * See https://baeta.io/docs/plugins/prisma\n *\n * @param options - Configuration options for the pagination plugin\n * @returns A Baeta generator plugin\n */\nexport function prismaPlugin(options: PrismaPluginOptions) {\n\tif (options.generateClient === false) {\n\t\treturn [];\n\t}\n\treturn [createPrismaClientPlugin(options)];\n}\n"],"mappings":";;;;;AAMA,eAAe,eAAe,KAAa,SAAiB,WAAmB;CAC9E,MAAM,CAAC,eAAe,mBAAmB,MAAM,QAAQ,IAAI,CAC1D,SAAS,QAAQ,KAAK,QAAQ,EAAE,QAAQ,EACxC,SAAS,QAAQ,KAAK,UAAU,EAAE,QAAQ,CAAC,YAAY,KAAK,CAC5D,CAAC;AACF,QAAO,cAAc,WAAW,KAAK,GAAG,KAAK,iBAAiB,WAAW,KAAK,GAAG;;AAGlF,SAAgB,yBAAyB,SAA8B;CACtE,MAAM,EAAE,cAAc,iBAAiB,wBAAwB;AAE/D,QAAO,iBAAiB;EACvB,MAAM;EACN,YAAY;EACZ,MAAM,mBAAmB;EACzB,QAAQ,kBAAkB,SAAS,WAAW;GAC7C,MAAM,aAAa,QAAQ,iBAAiB,KAAK,aAAa;GAE9D,MAAM,gBAAgB,SAAsB;AAC3C,QAAI,KAAK,SAAS,WACjB,QAAO,KAAK;;AAId,WAAQ,GAAG,UAAU,aAAa;AAClC,WAAQ,GAAG,UAAU,aAAa;;EAEnC,MAAM,OAAO,QAAa;GACzB,MAAM,SAAS,QAAQ,IAAI,iBAAiB,KAAK,aAAa;AAE9D,OAAI,IAAI,YAAY,IAAI,aAAa,SAAS,OAC7C,QAAO;AAGR,OAAI,CAAC,IAAI,YAAY,oBACpB,QAAO,eAAe,IAAI,iBAAiB,KAAK,cAAc,oBAAoB;AAGnF,UAAO;;EAER,CAAC;;;;;ACzCH,4BAAe;;;;;;;;AASf,SAAgB,aAAa,SAA8B;AAC1D,KAAI,QAAQ,mBAAmB,MAC9B,QAAO,EAAE;AAEV,QAAO,CAAC,yBAAyB,QAAQ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baeta/plugin-prisma",
3
- "version": "2.0.0-next.0",
3
+ "version": "2.0.0-next.10",
4
4
  "keywords": [
5
5
  "baeta",
6
6
  "graphql",
@@ -27,8 +27,8 @@
27
27
  "type": "module",
28
28
  "exports": {
29
29
  ".": {
30
- "types": "./index.ts",
31
- "default": "./index.ts"
30
+ "types": "./dist/index.d.ts",
31
+ "default": "./dist/index.js"
32
32
  }
33
33
  },
34
34
  "types": "dist/index.d.ts",
@@ -37,21 +37,29 @@
37
37
  "package.json"
38
38
  ],
39
39
  "scripts": {
40
- "build": "tsup",
41
- "prepack": "prep",
42
- "postpack": "prep --clean",
40
+ "build": "builder build",
41
+ "prepack": "builder prepare",
42
+ "postpack": "builder prepare --clean",
43
+ "test": "builder test",
44
+ "test:circular": "builder test-circular",
43
45
  "types": "tsc --noEmit"
44
46
  },
47
+ "ava": {
48
+ "extensions": {
49
+ "ts": "module"
50
+ }
51
+ },
45
52
  "dependencies": {
46
- "@baeta/generator-sdk": "workspace:^",
47
- "@baeta/plugin-exec": "workspace:^",
48
- "@baeta/util-path": "workspace:^",
53
+ "@baeta/generator-sdk": "^2.0.0-next.4",
54
+ "@baeta/plugin-exec": "^2.0.0-next.10",
55
+ "@baeta/util-path": "^2.0.0-next.3",
49
56
  "execa": "^9.6.0"
50
57
  },
51
58
  "devDependencies": {
52
- "@baeta/builder": "workspace:^",
53
- "@baeta/tsconfig": "workspace:^",
54
- "@types/node": "^22.18.11",
59
+ "@baeta/builder": "^0.0.0",
60
+ "@baeta/testing": "^0.0.0",
61
+ "@baeta/tsconfig": "^0.0.0",
62
+ "@types/node": "^22.19.1",
55
63
  "typescript": "^5.9.3"
56
64
  },
57
65
  "engines": {
@@ -79,4 +87,4 @@
79
87
  "alphabetical-ignoring-documents"
80
88
  ]
81
89
  }
82
- }
90
+ }