@nymphjs/server 1.0.0-beta.1 → 1.0.0-beta.100

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 CHANGED
@@ -3,6 +3,441 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-beta.100](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.99...v1.0.0-beta.100) (2025-11-29)
7
+
8
+ **Note:** Version bump only for package @nymphjs/server
9
+
10
+ # [1.0.0-beta.99](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.98...v1.0.0-beta.99) (2025-11-26)
11
+
12
+ **Note:** Version bump only for package @nymphjs/server
13
+
14
+ # [1.0.0-beta.98](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.97...v1.0.0-beta.98) (2025-10-24)
15
+
16
+ **Note:** Version bump only for package @nymphjs/server
17
+
18
+ # [1.0.0-beta.97](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.96...v1.0.0-beta.97) (2025-10-04)
19
+
20
+ **Note:** Version bump only for package @nymphjs/server
21
+
22
+ # [1.0.0-beta.96](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.95...v1.0.0-beta.96) (2025-09-01)
23
+
24
+ **Note:** Version bump only for package @nymphjs/server
25
+
26
+ # [1.0.0-beta.95](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.94...v1.0.0-beta.95) (2025-08-30)
27
+
28
+ **Note:** Version bump only for package @nymphjs/server
29
+
30
+ # [1.0.0-beta.94](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.93...v1.0.0-beta.94) (2025-08-25)
31
+
32
+ ### Features
33
+
34
+ - add returnNullOnNotFound client option, and some tilmeld domain checks ([20c0207](https://github.com/sciactive/nymphjs/commit/20c0207ef537a948f84f830f1db88d207e1c386b))
35
+
36
+ # [1.0.0-beta.93](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.92...v1.0.0-beta.93) (2025-08-16)
37
+
38
+ **Note:** Version bump only for package @nymphjs/server
39
+
40
+ # [1.0.0-beta.92](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.91...v1.0.0-beta.92) (2025-04-06)
41
+
42
+ ### Bug Fixes
43
+
44
+ - wait for an event loop after each iteration of server iterator to allow data to flush ([c0822ad](https://github.com/sciactive/nymphjs/commit/c0822ad3b7ebe56eb85915f4d950a9f656c5862a))
45
+
46
+ ### Features
47
+
48
+ - add 'object' return type which returns plain entity data objects ([26a4cd3](https://github.com/sciactive/nymphjs/commit/26a4cd3226145408dc34bff52b1eafe3b046313b))
49
+
50
+ # [1.0.0-beta.91](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.90...v1.0.0-beta.91) (2025-03-07)
51
+
52
+ **Note:** Version bump only for package @nymphjs/server
53
+
54
+ # [1.0.0-beta.90](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.89...v1.0.0-beta.90) (2025-02-09)
55
+
56
+ **Note:** Version bump only for package @nymphjs/server
57
+
58
+ # [1.0.0-beta.89](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.88...v1.0.0-beta.89) (2025-02-09)
59
+
60
+ **Note:** Version bump only for package @nymphjs/server
61
+
62
+ # [1.0.0-beta.88](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.87...v1.0.0-beta.88) (2025-01-30)
63
+
64
+ **Note:** Version bump only for package @nymphjs/server
65
+
66
+ # [1.0.0-beta.87](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.86...v1.0.0-beta.87) (2025-01-20)
67
+
68
+ ### Features
69
+
70
+ - deprecate node client and allow multiple client instances to each log in own users ([17b42f4](https://github.com/sciactive/nymphjs/commit/17b42f449f2355a3ce896b8e86a47edd660e9277))
71
+
72
+ # [1.0.0-beta.86](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.85...v1.0.0-beta.86) (2024-12-28)
73
+
74
+ ### Bug Fixes
75
+
76
+ - entity search functions handling of null values ([6ac0335](https://github.com/sciactive/nymphjs/commit/6ac0335ecb792979ecfb621395a55b68a607429f))
77
+
78
+ # [1.0.0-beta.85](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.84...v1.0.0-beta.85) (2024-12-27)
79
+
80
+ **Note:** Version bump only for package @nymphjs/server
81
+
82
+ # [1.0.0-beta.84](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.83...v1.0.0-beta.84) (2024-12-21)
83
+
84
+ **Note:** Version bump only for package @nymphjs/server
85
+
86
+ # [1.0.0-beta.83](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.82...v1.0.0-beta.83) (2024-12-20)
87
+
88
+ **Note:** Version bump only for package @nymphjs/server
89
+
90
+ # [1.0.0-beta.82](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.81...v1.0.0-beta.82) (2024-12-15)
91
+
92
+ ### Features
93
+
94
+ - migrate to es modules, upgrade all packages, migrate to Svelte 5 ([3f2b9e5](https://github.com/sciactive/nymphjs/commit/3f2b9e517b39934eddce66601d7fc747fbf3f9e6))
95
+
96
+ # [1.0.0-beta.81](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.80...v1.0.0-beta.81) (2024-09-28)
97
+
98
+ **Note:** Version bump only for package @nymphjs/server
99
+
100
+ # [1.0.0-beta.80](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.79...v1.0.0-beta.80) (2024-09-28)
101
+
102
+ **Note:** Version bump only for package @nymphjs/server
103
+
104
+ # [1.0.0-beta.79](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.78...v1.0.0-beta.79) (2024-09-28)
105
+
106
+ **Note:** Version bump only for package @nymphjs/server
107
+
108
+ # [1.0.0-beta.78](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.77...v1.0.0-beta.78) (2024-09-27)
109
+
110
+ **Note:** Version bump only for package @nymphjs/server
111
+
112
+ # [1.0.0-beta.77](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.76...v1.0.0-beta.77) (2024-09-26)
113
+
114
+ **Note:** Version bump only for package @nymphjs/server
115
+
116
+ # [1.0.0-beta.76](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.75...v1.0.0-beta.76) (2024-09-25)
117
+
118
+ **Note:** Version bump only for package @nymphjs/server
119
+
120
+ # [1.0.0-beta.75](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.74...v1.0.0-beta.75) (2024-09-24)
121
+
122
+ **Note:** Version bump only for package @nymphjs/server
123
+
124
+ # [1.0.0-beta.74](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.73...v1.0.0-beta.74) (2024-09-21)
125
+
126
+ **Note:** Version bump only for package @nymphjs/server
127
+
128
+ # [1.0.0-beta.73](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.72...v1.0.0-beta.73) (2024-09-20)
129
+
130
+ **Note:** Version bump only for package @nymphjs/server
131
+
132
+ # [1.0.0-beta.72](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.71...v1.0.0-beta.72) (2024-09-20)
133
+
134
+ **Note:** Version bump only for package @nymphjs/server
135
+
136
+ # [1.0.0-beta.71](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.70...v1.0.0-beta.71) (2024-09-20)
137
+
138
+ **Note:** Version bump only for package @nymphjs/server
139
+
140
+ # [1.0.0-beta.70](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.69...v1.0.0-beta.70) (2024-09-20)
141
+
142
+ **Note:** Version bump only for package @nymphjs/server
143
+
144
+ # [1.0.0-beta.69](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.68...v1.0.0-beta.69) (2024-09-19)
145
+
146
+ **Note:** Version bump only for package @nymphjs/server
147
+
148
+ # [1.0.0-beta.68](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.67...v1.0.0-beta.68) (2024-09-19)
149
+
150
+ **Note:** Version bump only for package @nymphjs/server
151
+
152
+ # [1.0.0-beta.67](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.66...v1.0.0-beta.67) (2024-09-03)
153
+
154
+ **Note:** Version bump only for package @nymphjs/server
155
+
156
+ # [1.0.0-beta.66](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.65...v1.0.0-beta.66) (2024-08-06)
157
+
158
+ **Note:** Version bump only for package @nymphjs/server
159
+
160
+ # [1.0.0-beta.65](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.64...v1.0.0-beta.65) (2024-08-05)
161
+
162
+ **Note:** Version bump only for package @nymphjs/server
163
+
164
+ # [1.0.0-beta.64](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.63...v1.0.0-beta.64) (2024-08-04)
165
+
166
+ **Note:** Version bump only for package @nymphjs/server
167
+
168
+ # [1.0.0-beta.63](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.62...v1.0.0-beta.63) (2024-06-18)
169
+
170
+ ### Bug Fixes
171
+
172
+ - undo ts compilation to module change ([84be6d4](https://github.com/sciactive/nymphjs/commit/84be6d434be29f8afd53907d15be2eb77d1736ce))
173
+
174
+ ### Features
175
+
176
+ - export data iterator ([b86aa19](https://github.com/sciactive/nymphjs/commit/b86aa19fc77d744b5a683046dfb697fc4746df5c))
177
+
178
+ # [1.0.0-beta.62](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.61...v1.0.0-beta.62) (2024-06-15)
179
+
180
+ **Note:** Version bump only for package @nymphjs/server
181
+
182
+ # [1.0.0-beta.61](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.60...v1.0.0-beta.61) (2024-06-14)
183
+
184
+ **Note:** Version bump only for package @nymphjs/server
185
+
186
+ # [1.0.0-beta.60](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.59...v1.0.0-beta.60) (2024-06-14)
187
+
188
+ **Note:** Version bump only for package @nymphjs/server
189
+
190
+ # [1.0.0-beta.59](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.58...v1.0.0-beta.59) (2024-06-14)
191
+
192
+ ### Features
193
+
194
+ - add uniqueness constraint feature, refactor some types ([8133d32](https://github.com/sciactive/nymphjs/commit/8133d32b2c04907182dca2e9171b8217ed1b57e4))
195
+
196
+ # [1.0.0-beta.58](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.57...v1.0.0-beta.58) (2024-06-12)
197
+
198
+ **Note:** Version bump only for package @nymphjs/server
199
+
200
+ # [1.0.0-beta.57](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.56...v1.0.0-beta.57) (2024-06-12)
201
+
202
+ **Note:** Version bump only for package @nymphjs/server
203
+
204
+ # [1.0.0-beta.56](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.55...v1.0.0-beta.56) (2024-06-11)
205
+
206
+ ### Features
207
+
208
+ - allow connections where tokens are not renewed ([39071a5](https://github.com/sciactive/nymphjs/commit/39071a545644075190bd8213be25e0a0c46d2b5d))
209
+
210
+ # [1.0.0-beta.55](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.54...v1.0.0-beta.55) (2024-05-26)
211
+
212
+ **Note:** Version bump only for package @nymphjs/server
213
+
214
+ # [1.0.0-beta.54](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.53...v1.0.0-beta.54) (2024-05-26)
215
+
216
+ **Note:** Version bump only for package @nymphjs/server
217
+
218
+ # [1.0.0-beta.53](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.52...v1.0.0-beta.53) (2024-05-26)
219
+
220
+ **Note:** Version bump only for package @nymphjs/server
221
+
222
+ # [1.0.0-beta.52](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.51...v1.0.0-beta.52) (2024-05-25)
223
+
224
+ **Note:** Version bump only for package @nymphjs/server
225
+
226
+ # [1.0.0-beta.51](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2024-04-12)
227
+
228
+ **Note:** Version bump only for package @nymphjs/server
229
+
230
+ # [1.0.0-beta.50](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2024-04-08)
231
+
232
+ **Note:** Version bump only for package @nymphjs/server
233
+
234
+ # [1.0.0-beta.49](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2024-03-04)
235
+
236
+ **Note:** Version bump only for package @nymphjs/server
237
+
238
+ # [1.0.0-beta.48](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2023-11-10)
239
+
240
+ **Note:** Version bump only for package @nymphjs/server
241
+
242
+ # [1.0.0-beta.47](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2023-11-10)
243
+
244
+ **Note:** Version bump only for package @nymphjs/server
245
+
246
+ # [1.0.0-beta.46](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2023-08-29)
247
+
248
+ **Note:** Version bump only for package @nymphjs/server
249
+
250
+ # [1.0.0-beta.45](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2023-07-17)
251
+
252
+ **Note:** Version bump only for package @nymphjs/server
253
+
254
+ # [1.0.0-beta.44](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2023-07-13)
255
+
256
+ **Note:** Version bump only for package @nymphjs/server
257
+
258
+ # [1.0.0-beta.43](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2023-07-12)
259
+
260
+ **Note:** Version bump only for package @nymphjs/server
261
+
262
+ # [1.0.0-beta.42](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2023-07-12)
263
+
264
+ **Note:** Version bump only for package @nymphjs/server
265
+
266
+ # [1.0.0-beta.41](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2023-07-12)
267
+
268
+ ### Features
269
+
270
+ - remove synchronous database queries ([b579fb2](https://github.com/sciactive/nymphjs/commit/b579fb2eacd96cdd1b386a62c5c00cdbb2438f6e))
271
+ - rewrite server side async api to match client side api ([9c537a8](https://github.com/sciactive/nymphjs/commit/9c537a8be49e9b989af0822a4c2236e8c2d20f87))
272
+
273
+ # [1.0.0-beta.40](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2023-07-10)
274
+
275
+ **Note:** Version bump only for package @nymphjs/server
276
+
277
+ # [1.0.0-beta.39](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2023-07-09)
278
+
279
+ **Note:** Version bump only for package @nymphjs/server
280
+
281
+ # [1.0.0-beta.38](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2023-07-09)
282
+
283
+ **Note:** Version bump only for package @nymphjs/server
284
+
285
+ # [1.0.0-beta.37](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2023-07-09)
286
+
287
+ **Note:** Version bump only for package @nymphjs/server
288
+
289
+ # [1.0.0-beta.36](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2023-07-09)
290
+
291
+ **Note:** Version bump only for package @nymphjs/server
292
+
293
+ # [1.0.0-beta.35](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2023-06-14)
294
+
295
+ ### Features
296
+
297
+ - add iteratable server call support using event streams ([fa7c1ec](https://github.com/sciactive/nymphjs/commit/fa7c1ec869e1fb52db20c8245e98a681f73dbf83))
298
+
299
+ # [1.0.0-beta.34](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2023-05-13)
300
+
301
+ **Note:** Version bump only for package @nymphjs/server
302
+
303
+ # [1.0.0-beta.33](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2023-05-13)
304
+
305
+ **Note:** Version bump only for package @nymphjs/server
306
+
307
+ # [1.0.0-beta.32](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2023-05-13)
308
+
309
+ **Note:** Version bump only for package @nymphjs/server
310
+
311
+ # [1.0.0-beta.31](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2023-05-12)
312
+
313
+ **Note:** Version bump only for package @nymphjs/server
314
+
315
+ # [1.0.0-beta.30](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2023-05-12)
316
+
317
+ **Note:** Version bump only for package @nymphjs/server
318
+
319
+ # [1.0.0-beta.29](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2023-05-08)
320
+
321
+ **Note:** Version bump only for package @nymphjs/server
322
+
323
+ # [1.0.0-beta.28](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2023-05-05)
324
+
325
+ **Note:** Version bump only for package @nymphjs/server
326
+
327
+ # [1.0.0-beta.27](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2023-05-04)
328
+
329
+ **Note:** Version bump only for package @nymphjs/server
330
+
331
+ # [1.0.0-beta.26](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2023-05-04)
332
+
333
+ **Note:** Version bump only for package @nymphjs/server
334
+
335
+ # [1.0.0-beta.25](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2023-05-04)
336
+
337
+ ### Features
338
+
339
+ - add flags to disable rest and pubsub support on an entity class ([52106a3](https://github.com/sciactive/nymphjs/commit/52106a3d44065bcfec40d361344bf1eba59a5136)), closes [#1](https://github.com/sciactive/nymphjs/issues/1)
340
+
341
+ # [1.0.0-beta.24](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2023-05-02)
342
+
343
+ **Note:** Version bump only for package @nymphjs/server
344
+
345
+ # [1.0.0-beta.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2023-05-02)
346
+
347
+ **Note:** Version bump only for package @nymphjs/server
348
+
349
+ # [1.0.0-beta.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2023-05-01)
350
+
351
+ **Note:** Version bump only for package @nymphjs/server
352
+
353
+ # [1.0.0-beta.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2023-05-01)
354
+
355
+ **Note:** Version bump only for package @nymphjs/server
356
+
357
+ # [1.0.0-beta.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2023-04-30)
358
+
359
+ **Note:** Version bump only for package @nymphjs/server
360
+
361
+ # [1.0.0-beta.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2023-04-29)
362
+
363
+ **Note:** Version bump only for package @nymphjs/server
364
+
365
+ # [1.0.0-beta.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2023-04-27)
366
+
367
+ **Note:** Version bump only for package @nymphjs/server
368
+
369
+ # [1.0.0-beta.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-04-24)
370
+
371
+ **Note:** Version bump only for package @nymphjs/server
372
+
373
+ # [1.0.0-beta.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2023-03-31)
374
+
375
+ ### Features
376
+
377
+ - add ability to tell tilmeld to log in a specific user during authentication ([922e145](https://github.com/sciactive/nymphjs/commit/922e1452adae44bed2aa9655be16e19796acb39b))
378
+
379
+ # [1.0.0-beta.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-23)
380
+
381
+ **Note:** Version bump only for package @nymphjs/server
382
+
383
+ # [1.0.0-beta.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-17)
384
+
385
+ **Note:** Version bump only for package @nymphjs/server
386
+
387
+ # [1.0.0-beta.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-16)
388
+
389
+ **Note:** Version bump only for package @nymphjs/server
390
+
391
+ # [1.0.0-beta.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2023-03-04)
392
+
393
+ ### Bug Fixes
394
+
395
+ - make sure all default exports are also named exports ([06da9a6](https://github.com/sciactive/nymphjs/commit/06da9a61d444860f70b7f5b95b824547d9880500))
396
+
397
+ # [1.0.0-beta.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2023-02-27)
398
+
399
+ ### Features
400
+
401
+ - allow customizing HTTP status codes in response from server called methods ([8c5c3d4](https://github.com/sciactive/nymphjs/commit/8c5c3d4af741edabc1a8947aaebf026ba546c46a))
402
+
403
+ # [1.0.0-beta.10](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2023-01-19)
404
+
405
+ **Note:** Version bump only for package @nymphjs/server
406
+
407
+ # [1.0.0-beta.9](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2023-01-09)
408
+
409
+ **Note:** Version bump only for package @nymphjs/server
410
+
411
+ # [1.0.0-beta.8](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2023-01-09)
412
+
413
+ ### Features
414
+
415
+ - make entities in nymph client instance specific too ([1029f06](https://github.com/sciactive/nymphjs/commit/1029f061a1ad193e4a8a2dab0186b9a4b517f646))
416
+
417
+ # [1.0.0-beta.7](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2023-01-05)
418
+
419
+ **Note:** Version bump only for package @nymphjs/server
420
+
421
+ # [1.0.0-beta.6](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.5...v1.0.0-beta.6) (2023-01-05)
422
+
423
+ **Note:** Version bump only for package @nymphjs/server
424
+
425
+ # [1.0.0-beta.5](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-11-24)
426
+
427
+ **Note:** Version bump only for package @nymphjs/server
428
+
429
+ # [1.0.0-beta.4](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2022-11-23)
430
+
431
+ **Note:** Version bump only for package @nymphjs/server
432
+
433
+ # [1.0.0-beta.3](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2022-11-21)
434
+
435
+ **Note:** Version bump only for package @nymphjs/server
436
+
437
+ # [1.0.0-beta.2](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2022-11-21)
438
+
439
+ **Note:** Version bump only for package @nymphjs/server
440
+
6
441
  # [1.0.0-beta.1](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.0...v1.0.0-beta.1) (2022-11-21)
7
442
 
8
443
  ### Bug Fixes
package/README.md CHANGED
@@ -21,16 +21,16 @@ import SQLite3Driver from '@nymphjs/driver-sqlite3';
21
21
  import createServer from '@nymphjs/server';
22
22
 
23
23
  // Import all the entities you will be using on the server.
24
- import MyEntity from './entities/MyEntity';
24
+ import MyEntityClass from './entities/MyEntity';
25
25
 
26
26
  // Configure Nymph.
27
27
  const nymph = new Nymph(
28
28
  {},
29
29
  new SQLite3Driver({
30
30
  filename: ':memory:',
31
- })
31
+ }),
32
32
  );
33
- nymph.addEntityClass(MyEntity);
33
+ const MyEntity = nymph.addEntityClass(MyEntityClass);
34
34
 
35
35
  // Create your Express app.
36
36
  const app = express();
@@ -46,24 +46,96 @@ app.listen(80);
46
46
 
47
47
  You will need to import any entities you use on the server, so they are available to Nymph.
48
48
 
49
- Now you can configure your client using your server's address (and the optional path, if set).
49
+ Now you can configure your **client**, using your server's address (and the optional path, if set).
50
50
 
51
51
  ```ts
52
52
  import { Nymph } from '@nymphjs/client';
53
53
 
54
- import MyEntity from './entities/MyEntityClient';
54
+ import MyEntityClass from './entities/MyEntityClient';
55
55
 
56
56
  const nymph = new Nymph({
57
57
  // You should configure your Express server to
58
58
  // use HTTPS, but you don't have to.
59
59
  restUrl: 'https://mydomain.tld/rest',
60
60
  });
61
- nymph.addEntityClass(MyEntity);
61
+ const MyEntity = nymph.addEntityClass(MyEntityClass);
62
+ ```
63
+
64
+ The REST server will authenticate for you using the Tilmeld auth cookie and XSRF token, but if you need to, you can authenticate in some other way (like OAuth2), and place the user in `response.locals.user`.
65
+
66
+ ```ts
67
+ import express from 'express';
68
+ import { Nymph } from '@nymphjs/nymph';
69
+ import SQLite3Driver from '@nymphjs/driver-sqlite3';
70
+ import { Tilmeld } from '@nymphjs/tilmeld';
71
+ import createServer from '@nymphjs/server';
72
+ import setup from '@nymphjs/tilmeld-setup';
73
+
74
+ // Import all the entities you will be using on the server.
75
+ import MyEntityClass from './entities/MyEntity';
76
+
77
+ // Consfigure Tilmeld.
78
+ const tilmeld = new Tilmeld({
79
+ appName: 'My Awesome App',
80
+ appUrl: 'https://mydomain.tld',
81
+ setupPath: '/user',
82
+ });
83
+
84
+ // Configure Nymph.
85
+ const nymph = new Nymph(
86
+ {},
87
+ new SQLite3Driver({
88
+ filename: ':memory:',
89
+ }),
90
+ tilmeld,
91
+ );
92
+ const MyEntity = nymph.addEntityClass(MyEntityClass);
93
+
94
+ // Create your Express app.
95
+ const app = express();
96
+
97
+ // Authenticate the user manually.
98
+ app.use('/rest', async (request, response, next) => {
99
+ const { User } = tilmeld;
100
+
101
+ try {
102
+ // Somehow authenticate the user...
103
+ const user = await User.factoryUsername(username);
104
+
105
+ if (user.guid != null && user.enabled) {
106
+ response.locals.user = user;
107
+ }
108
+
109
+ next();
110
+ } catch (e: any) {
111
+ response.status(500);
112
+ response.send('Internal server error.');
113
+ }
114
+ });
115
+
116
+ // Create and use the REST server (with an optional path).
117
+ app.use('/rest', createServer(nymph));
118
+
119
+ // Create Tilmeld setup app.
120
+ app.user(
121
+ '/user',
122
+ setup(
123
+ {
124
+ restUrl: 'https://mydomain.tld/rest',
125
+ },
126
+ nymph,
127
+ ),
128
+ );
129
+
130
+ // Do anything else you need to do...
131
+
132
+ // Start your server.
133
+ app.listen(80);
62
134
  ```
63
135
 
64
136
  # License
65
137
 
66
- Copyright 2021 SciActive Inc
138
+ Copyright 2021-2025 SciActive Inc
67
139
 
68
140
  Licensed under the Apache License, Version 2.0 (the "License");
69
141
  you may not use this file except in compliance with the License.
@@ -0,0 +1,5 @@
1
+ export declare class HttpError extends Error {
2
+ status?: number;
3
+ statusText?: string;
4
+ constructor(message: string, status?: number, statusText?: string);
5
+ }
@@ -0,0 +1,11 @@
1
+ export class HttpError extends Error {
2
+ status;
3
+ statusText;
4
+ constructor(message, status, statusText) {
5
+ super(message);
6
+ this.name = 'HttpError';
7
+ this.status = status;
8
+ this.statusText = statusText;
9
+ }
10
+ }
11
+ //# sourceMappingURL=HttpError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../src/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAClC,MAAM,CAAU;IAChB,UAAU,CAAU;IAEpB,YAAY,OAAe,EAAE,MAAe,EAAE,UAAmB;QAC/D,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF"}
@@ -1,30 +1,25 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const express_1 = __importDefault(require("express"));
7
- const driver_sqlite3_1 = __importDefault(require("@nymphjs/driver-sqlite3"));
8
- const nymph_1 = require("@nymphjs/nymph");
9
- const client_node_1 = require("@nymphjs/client-node");
10
- const index_1 = __importDefault(require("./index"));
11
- const testArtifacts_1 = require("./testArtifacts");
1
+ import express from 'express';
2
+ import SQLite3Driver from '@nymphjs/driver-sqlite3';
3
+ import { Nymph as NymphServer } from '@nymphjs/nymph';
4
+ import { Nymph } from '@nymphjs/client';
5
+ import createServer from './index.js';
6
+ import { EmployeeModel as EmployeeModelClass, Employee as EmployeeClass, } from './testArtifacts.js';
12
7
  const sqliteConfig = {
13
8
  filename: ':memory:',
14
9
  };
15
- const nymphServer = new nymph_1.Nymph({}, new driver_sqlite3_1.default(sqliteConfig));
16
- nymphServer.addEntityClass(testArtifacts_1.EmployeeModel);
17
- const app = (0, express_1.default)();
18
- app.use('/test', (0, index_1.default)(nymphServer));
10
+ const nymphServer = new NymphServer({}, new SQLite3Driver(sqliteConfig));
11
+ const EmployeeModel = nymphServer.addEntityClass(EmployeeModelClass);
12
+ const app = express();
13
+ app.use('/test', createServer(nymphServer));
19
14
  const server = app.listen(5081);
20
- const nymph = new client_node_1.Nymph({
15
+ const nymph = new Nymph({
21
16
  restUrl: 'http://localhost:5081/test/',
22
17
  weakCache: true,
23
18
  });
24
- nymph.addEntityClass(testArtifacts_1.Employee);
19
+ const Employee = nymph.addEntityClass(EmployeeClass);
25
20
  describe('Nymph REST Server and Client with Client Weak Ref Cache', () => {
26
21
  async function createJane() {
27
- const jane = await testArtifacts_1.Employee.factory();
22
+ const jane = await Employee.factory();
28
23
  jane.name = 'Jane Doe';
29
24
  jane.current = true;
30
25
  jane.salary = 8000000;
@@ -41,6 +36,7 @@ describe('Nymph REST Server and Client with Client Weak Ref Cache', () => {
41
36
  return jane;
42
37
  }
43
38
  it('change an entity and check weakCache', async () => {
39
+ // @ts-ignore TS doesn't know about WeakRef.
44
40
  if (typeof WeakRef === 'undefined') {
45
41
  throw new Error('You must run this test in an environment that includes WeakRef.');
46
42
  }
@@ -48,8 +44,8 @@ describe('Nymph REST Server and Client with Client Weak Ref Cache', () => {
48
44
  if (employee.guid == null) {
49
45
  throw new Error('Entity is null.');
50
46
  }
51
- const checkA = await testArtifacts_1.Employee.factory(employee.guid);
52
- const checkB = await nymph.getEntity({ class: testArtifacts_1.Employee }, { type: '&', guid: employee.guid });
47
+ const checkA = await Employee.factory(employee.guid);
48
+ const checkB = await nymph.getEntity({ class: Employee }, { type: '&', guid: employee.guid });
53
49
  if (!checkB) {
54
50
  throw new Error("Couldn't fetch entity.");
55
51
  }
@@ -58,7 +54,7 @@ describe('Nymph REST Server and Client with Client Weak Ref Cache', () => {
58
54
  expect(checkB.current).toEqual(false);
59
55
  });
60
56
  afterAll(() => {
61
- server.close();
57
+ server.close(); // avoid jest open handle error
62
58
  });
63
59
  });
64
60
  //# sourceMappingURL=cache.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache.test.js","sourceRoot":"","sources":["../src/cache.test.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAC9B,6EAAoD;AACpD,0CAAsD;AACtD,sDAA6C;AAE7C,oDAAmC;AACnC,mDAA0D;AAE1D,MAAM,YAAY,GAAG;IACnB,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,WAAW,GAAG,IAAI,aAAW,CAAC,EAAE,EAAE,IAAI,wBAAa,CAAC,YAAY,CAAC,CAAC,CAAC;AACzE,WAAW,CAAC,cAAc,CAAC,6BAAa,CAAC,CAAC;AAE1C,MAAM,GAAG,GAAG,IAAA,iBAAO,GAAE,CAAC;AACtB,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,IAAA,eAAY,EAAC,WAAW,CAAC,CAAC,CAAC;AAC5C,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAEhC,MAAM,KAAK,GAAG,IAAI,mBAAK,CAAC;IACtB,OAAO,EAAE,6BAA6B;IACtC,SAAS,EAAE,IAAI;CAChB,CAAC,CAAC;AACH,KAAK,CAAC,cAAc,CAAC,wBAAQ,CAAC,CAAC;AAE/B,QAAQ,CAAC,yDAAyD,EAA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