@nymphjs/client 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.
Files changed (74) hide show
  1. package/CHANGELOG.md +456 -0
  2. package/README.md +7 -7
  3. package/asyncitertest.js +53 -0
  4. package/dist/Entity.d.ts +156 -0
  5. package/dist/Entity.js +598 -0
  6. package/dist/Entity.js.map +1 -0
  7. package/dist/Entity.types.d.ts +218 -0
  8. package/dist/Entity.types.js +2 -0
  9. package/dist/Entity.types.js.map +1 -0
  10. package/dist/EntityWeakCache.d.ts +6 -0
  11. package/dist/EntityWeakCache.js +27 -0
  12. package/dist/EntityWeakCache.js.map +1 -0
  13. package/dist/HttpRequester.d.ts +78 -0
  14. package/dist/HttpRequester.js +365 -0
  15. package/dist/HttpRequester.js.map +1 -0
  16. package/dist/Nymph.d.ts +116 -0
  17. package/dist/Nymph.js +459 -0
  18. package/dist/Nymph.js.map +1 -0
  19. package/dist/Nymph.types.d.ts +177 -0
  20. package/dist/Nymph.types.js +2 -0
  21. package/dist/Nymph.types.js.map +1 -0
  22. package/dist/PubSub.d.ts +63 -0
  23. package/dist/PubSub.js +599 -0
  24. package/dist/PubSub.js.map +1 -0
  25. package/dist/PubSub.types.d.ts +31 -0
  26. package/dist/PubSub.types.js +2 -0
  27. package/dist/PubSub.types.js.map +1 -0
  28. package/dist/entityRefresh.d.ts +5 -0
  29. package/dist/entityRefresh.js +75 -0
  30. package/dist/entityRefresh.js.map +1 -0
  31. package/dist/index.d.ts +13 -0
  32. package/dist/index.js +13 -2
  33. package/dist/index.js.map +1 -1
  34. package/dist/utils.d.ts +8 -0
  35. package/dist/utils.js +93 -0
  36. package/dist/utils.js.map +1 -0
  37. package/jest.config.js +11 -2
  38. package/lib/Entity.d.ts +112 -8
  39. package/lib/Entity.js +159 -77
  40. package/lib/Entity.js.map +1 -1
  41. package/lib/Entity.types.d.ts +144 -9
  42. package/lib/EntityWeakCache.js +3 -2
  43. package/lib/EntityWeakCache.js.map +1 -1
  44. package/lib/HttpRequester.d.ts +44 -8
  45. package/lib/HttpRequester.js +236 -21
  46. package/lib/HttpRequester.js.map +1 -1
  47. package/lib/Nymph.d.ts +43 -11
  48. package/lib/Nymph.js +102 -19
  49. package/lib/Nymph.js.map +1 -1
  50. package/lib/Nymph.types.d.ts +73 -1
  51. package/lib/PubSub.d.ts +15 -9
  52. package/lib/PubSub.js +148 -87
  53. package/lib/PubSub.js.map +1 -1
  54. package/lib/PubSub.types.d.ts +6 -1
  55. package/lib/entityRefresh.js +16 -0
  56. package/lib/entityRefresh.js.map +1 -1
  57. package/lib/utils.js +11 -0
  58. package/lib/utils.js.map +1 -1
  59. package/package.json +23 -27
  60. package/src/Entity.ts +171 -108
  61. package/src/Entity.types.ts +29 -47
  62. package/src/EntityWeakCache.ts +8 -6
  63. package/src/HttpRequester.ts +308 -35
  64. package/src/Nymph.ts +212 -96
  65. package/src/Nymph.types.ts +51 -2
  66. package/src/PubSub.ts +214 -141
  67. package/src/PubSub.types.ts +10 -5
  68. package/src/entityRefresh.ts +6 -6
  69. package/src/index.ts +10 -10
  70. package/src/utils.ts +12 -5
  71. package/tsconfig.json +6 -4
  72. package/typedoc.json +4 -0
  73. package/dist/index.js.LICENSE.txt +0 -8
  74. package/webpack.config.js +0 -28
package/CHANGELOG.md CHANGED
@@ -3,6 +3,462 @@
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/client
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
+ ### Features
13
+
14
+ - add full-text-search, but this is interim and will be redesigned ([56333db](https://github.com/sciactive/nymphjs/commit/56333dbe6a25755baed4e108ba4d71b3187fe8d0))
15
+
16
+ # [1.0.0-beta.98](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.97...v1.0.0-beta.98) (2025-10-24)
17
+
18
+ **Note:** Version bump only for package @nymphjs/client
19
+
20
+ # [1.0.0-beta.97](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.96...v1.0.0-beta.97) (2025-10-04)
21
+
22
+ **Note:** Version bump only for package @nymphjs/client
23
+
24
+ # [1.0.0-beta.96](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.95...v1.0.0-beta.96) (2025-09-01)
25
+
26
+ **Note:** Version bump only for package @nymphjs/client
27
+
28
+ # [1.0.0-beta.95](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.94...v1.0.0-beta.95) (2025-08-30)
29
+
30
+ **Note:** Version bump only for package @nymphjs/client
31
+
32
+ # [1.0.0-beta.94](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.93...v1.0.0-beta.94) (2025-08-25)
33
+
34
+ ### Features
35
+
36
+ - add returnNullOnNotFound client option, and some tilmeld domain checks ([20c0207](https://github.com/sciactive/nymphjs/commit/20c0207ef537a948f84f830f1db88d207e1c386b))
37
+
38
+ # [1.0.0-beta.93](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.92...v1.0.0-beta.93) (2025-08-16)
39
+
40
+ **Note:** Version bump only for package @nymphjs/client
41
+
42
+ # [1.0.0-beta.92](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.91...v1.0.0-beta.92) (2025-04-06)
43
+
44
+ **Note:** Version bump only for package @nymphjs/client
45
+
46
+ # [1.0.0-beta.91](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.90...v1.0.0-beta.91) (2025-03-07)
47
+
48
+ **Note:** Version bump only for package @nymphjs/client
49
+
50
+ # [1.0.0-beta.90](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.89...v1.0.0-beta.90) (2025-02-09)
51
+
52
+ **Note:** Version bump only for package @nymphjs/client
53
+
54
+ # [1.0.0-beta.89](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.88...v1.0.0-beta.89) (2025-02-09)
55
+
56
+ **Note:** Version bump only for package @nymphjs/client
57
+
58
+ # [1.0.0-beta.88](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.87...v1.0.0-beta.88) (2025-01-30)
59
+
60
+ **Note:** Version bump only for package @nymphjs/client
61
+
62
+ # [1.0.0-beta.87](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.86...v1.0.0-beta.87) (2025-01-20)
63
+
64
+ ### Features
65
+
66
+ - deprecate node client and allow multiple client instances to each log in own users ([17b42f4](https://github.com/sciactive/nymphjs/commit/17b42f449f2355a3ce896b8e86a47edd660e9277))
67
+
68
+ # [1.0.0-beta.86](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.85...v1.0.0-beta.86) (2024-12-28)
69
+
70
+ ### Bug Fixes
71
+
72
+ - entity search functions handling of null values ([6ac0335](https://github.com/sciactive/nymphjs/commit/6ac0335ecb792979ecfb621395a55b68a607429f))
73
+
74
+ # [1.0.0-beta.85](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.84...v1.0.0-beta.85) (2024-12-27)
75
+
76
+ **Note:** Version bump only for package @nymphjs/client
77
+
78
+ # [1.0.0-beta.84](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.83...v1.0.0-beta.84) (2024-12-21)
79
+
80
+ **Note:** Version bump only for package @nymphjs/client
81
+
82
+ # [1.0.0-beta.83](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.82...v1.0.0-beta.83) (2024-12-20)
83
+
84
+ **Note:** Version bump only for package @nymphjs/client
85
+
86
+ # [1.0.0-beta.82](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.81...v1.0.0-beta.82) (2024-12-15)
87
+
88
+ ### Features
89
+
90
+ - migrate to es modules, upgrade all packages, migrate to Svelte 5 ([3f2b9e5](https://github.com/sciactive/nymphjs/commit/3f2b9e517b39934eddce66601d7fc747fbf3f9e6))
91
+
92
+ # [1.0.0-beta.81](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.80...v1.0.0-beta.81) (2024-09-28)
93
+
94
+ **Note:** Version bump only for package @nymphjs/client
95
+
96
+ # [1.0.0-beta.80](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.79...v1.0.0-beta.80) (2024-09-28)
97
+
98
+ **Note:** Version bump only for package @nymphjs/client
99
+
100
+ # [1.0.0-beta.79](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.78...v1.0.0-beta.79) (2024-09-28)
101
+
102
+ **Note:** Version bump only for package @nymphjs/client
103
+
104
+ # [1.0.0-beta.78](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.77...v1.0.0-beta.78) (2024-09-27)
105
+
106
+ **Note:** Version bump only for package @nymphjs/client
107
+
108
+ # [1.0.0-beta.77](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.76...v1.0.0-beta.77) (2024-09-26)
109
+
110
+ **Note:** Version bump only for package @nymphjs/client
111
+
112
+ # [1.0.0-beta.76](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.75...v1.0.0-beta.76) (2024-09-25)
113
+
114
+ **Note:** Version bump only for package @nymphjs/client
115
+
116
+ # [1.0.0-beta.75](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.74...v1.0.0-beta.75) (2024-09-24)
117
+
118
+ **Note:** Version bump only for package @nymphjs/client
119
+
120
+ # [1.0.0-beta.74](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.73...v1.0.0-beta.74) (2024-09-21)
121
+
122
+ **Note:** Version bump only for package @nymphjs/client
123
+
124
+ # [1.0.0-beta.73](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.72...v1.0.0-beta.73) (2024-09-20)
125
+
126
+ **Note:** Version bump only for package @nymphjs/client
127
+
128
+ # [1.0.0-beta.72](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.71...v1.0.0-beta.72) (2024-09-20)
129
+
130
+ **Note:** Version bump only for package @nymphjs/client
131
+
132
+ # [1.0.0-beta.71](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.70...v1.0.0-beta.71) (2024-09-20)
133
+
134
+ **Note:** Version bump only for package @nymphjs/client
135
+
136
+ # [1.0.0-beta.70](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.69...v1.0.0-beta.70) (2024-09-20)
137
+
138
+ **Note:** Version bump only for package @nymphjs/client
139
+
140
+ # [1.0.0-beta.69](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.68...v1.0.0-beta.69) (2024-09-19)
141
+
142
+ **Note:** Version bump only for package @nymphjs/client
143
+
144
+ # [1.0.0-beta.68](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.67...v1.0.0-beta.68) (2024-09-19)
145
+
146
+ **Note:** Version bump only for package @nymphjs/client
147
+
148
+ # [1.0.0-beta.67](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.66...v1.0.0-beta.67) (2024-09-03)
149
+
150
+ **Note:** Version bump only for package @nymphjs/client
151
+
152
+ # [1.0.0-beta.66](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.65...v1.0.0-beta.66) (2024-08-06)
153
+
154
+ **Note:** Version bump only for package @nymphjs/client
155
+
156
+ # [1.0.0-beta.65](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.64...v1.0.0-beta.65) (2024-08-05)
157
+
158
+ **Note:** Version bump only for package @nymphjs/client
159
+
160
+ # [1.0.0-beta.64](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.63...v1.0.0-beta.64) (2024-08-04)
161
+
162
+ **Note:** Version bump only for package @nymphjs/client
163
+
164
+ # [1.0.0-beta.63](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.62...v1.0.0-beta.63) (2024-06-18)
165
+
166
+ **Note:** Version bump only for package @nymphjs/client
167
+
168
+ # [1.0.0-beta.62](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.61...v1.0.0-beta.62) (2024-06-15)
169
+
170
+ **Note:** Version bump only for package @nymphjs/client
171
+
172
+ # [1.0.0-beta.61](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.60...v1.0.0-beta.61) (2024-06-14)
173
+
174
+ **Note:** Version bump only for package @nymphjs/client
175
+
176
+ # [1.0.0-beta.60](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.59...v1.0.0-beta.60) (2024-06-14)
177
+
178
+ **Note:** Version bump only for package @nymphjs/client
179
+
180
+ # [1.0.0-beta.59](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.58...v1.0.0-beta.59) (2024-06-14)
181
+
182
+ ### Features
183
+
184
+ - add uniqueness constraint feature, refactor some types ([8133d32](https://github.com/sciactive/nymphjs/commit/8133d32b2c04907182dca2e9171b8217ed1b57e4))
185
+
186
+ # [1.0.0-beta.58](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.57...v1.0.0-beta.58) (2024-06-12)
187
+
188
+ **Note:** Version bump only for package @nymphjs/client
189
+
190
+ # [1.0.0-beta.57](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.56...v1.0.0-beta.57) (2024-06-12)
191
+
192
+ **Note:** Version bump only for package @nymphjs/client
193
+
194
+ # [1.0.0-beta.56](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.55...v1.0.0-beta.56) (2024-06-11)
195
+
196
+ ### Features
197
+
198
+ - allow connections where tokens are not renewed ([39071a5](https://github.com/sciactive/nymphjs/commit/39071a545644075190bd8213be25e0a0c46d2b5d))
199
+
200
+ # [1.0.0-beta.55](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.54...v1.0.0-beta.55) (2024-05-26)
201
+
202
+ **Note:** Version bump only for package @nymphjs/client
203
+
204
+ # [1.0.0-beta.54](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.53...v1.0.0-beta.54) (2024-05-26)
205
+
206
+ **Note:** Version bump only for package @nymphjs/client
207
+
208
+ # [1.0.0-beta.53](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.52...v1.0.0-beta.53) (2024-05-26)
209
+
210
+ **Note:** Version bump only for package @nymphjs/client
211
+
212
+ # [1.0.0-beta.52](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.51...v1.0.0-beta.52) (2024-05-25)
213
+
214
+ **Note:** Version bump only for package @nymphjs/client
215
+
216
+ # [1.0.0-beta.51](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2024-04-12)
217
+
218
+ **Note:** Version bump only for package @nymphjs/client
219
+
220
+ # [1.0.0-beta.50](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2024-04-08)
221
+
222
+ **Note:** Version bump only for package @nymphjs/client
223
+
224
+ # [1.0.0-beta.49](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2024-03-04)
225
+
226
+ **Note:** Version bump only for package @nymphjs/client
227
+
228
+ # [1.0.0-beta.48](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2023-11-10)
229
+
230
+ **Note:** Version bump only for package @nymphjs/client
231
+
232
+ # [1.0.0-beta.47](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2023-11-10)
233
+
234
+ **Note:** Version bump only for package @nymphjs/client
235
+
236
+ # [1.0.0-beta.46](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2023-08-29)
237
+
238
+ **Note:** Version bump only for package @nymphjs/client
239
+
240
+ # [1.0.0-beta.45](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2023-07-17)
241
+
242
+ **Note:** Version bump only for package @nymphjs/client
243
+
244
+ # [1.0.0-beta.44](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2023-07-13)
245
+
246
+ **Note:** Version bump only for package @nymphjs/client
247
+
248
+ # [1.0.0-beta.43](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2023-07-12)
249
+
250
+ **Note:** Version bump only for package @nymphjs/client
251
+
252
+ # [1.0.0-beta.42](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2023-07-12)
253
+
254
+ **Note:** Version bump only for package @nymphjs/client
255
+
256
+ # [1.0.0-beta.41](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2023-07-12)
257
+
258
+ ### Features
259
+
260
+ - remove synchronous database queries ([b579fb2](https://github.com/sciactive/nymphjs/commit/b579fb2eacd96cdd1b386a62c5c00cdbb2438f6e))
261
+ - rewrite server side async api to match client side api ([9c537a8](https://github.com/sciactive/nymphjs/commit/9c537a8be49e9b989af0822a4c2236e8c2d20f87))
262
+
263
+ # [1.0.0-beta.40](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2023-07-10)
264
+
265
+ ### Bug Fixes
266
+
267
+ - rewrite updateArray function to fix it ([22185c7](https://github.com/sciactive/nymphjs/commit/22185c7627f6dc616f9d3187ee8c9a383ca71441))
268
+
269
+ # [1.0.0-beta.39](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2023-07-09)
270
+
271
+ ### Bug Fixes
272
+
273
+ - go back to older code for updateArray, but better number handling ([7a58c98](https://github.com/sciactive/nymphjs/commit/7a58c983eac73839544361b4d32fb2dbb0881da2))
274
+
275
+ # [1.0.0-beta.38](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2023-07-09)
276
+
277
+ ### Bug Fixes
278
+
279
+ - pull value from the array in updateArray function ([352d1ea](https://github.com/sciactive/nymphjs/commit/352d1eab0cf8868f672ce0350564eb75ac9d4a45))
280
+ - simplify updateArray code ([348154c](https://github.com/sciactive/nymphjs/commit/348154c4d42b1e2b54bc491c1588a59c7c48984c))
281
+
282
+ # [1.0.0-beta.37](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2023-07-09)
283
+
284
+ ### Bug Fixes
285
+
286
+ - correctly iterate through new arrays on updateArray pubsub method ([27d7cc8](https://github.com/sciactive/nymphjs/commit/27d7cc847d93300e3d76cf6fa528176c3d06ae67))
287
+
288
+ # [1.0.0-beta.36](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2023-07-09)
289
+
290
+ ### Bug Fixes
291
+
292
+ - use code 1000 for closing pubsub connection ([cbd56af](https://github.com/sciactive/nymphjs/commit/cbd56af98d0775dee36025d909a82a0af0633d72))
293
+
294
+ # [1.0.0-beta.35](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2023-06-14)
295
+
296
+ ### Features
297
+
298
+ - add iteratable server call support using event streams ([fa7c1ec](https://github.com/sciactive/nymphjs/commit/fa7c1ec869e1fb52db20c8245e98a681f73dbf83))
299
+
300
+ # [1.0.0-beta.34](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2023-05-13)
301
+
302
+ ### Bug Fixes
303
+
304
+ - subscribeWith making guid null ([dbb38d4](https://github.com/sciactive/nymphjs/commit/dbb38d424f2395bbfa01ab4a0663dcaebf0c7aa7))
305
+
306
+ # [1.0.0-beta.33](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2023-05-13)
307
+
308
+ **Note:** Version bump only for package @nymphjs/client
309
+
310
+ # [1.0.0-beta.32](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2023-05-13)
311
+
312
+ ### Features
313
+
314
+ - issue initial request with pubsub instead of rest on subscribe ([8a232d2](https://github.com/sciactive/nymphjs/commit/8a232d2faeb8622924f9c35a01a8f71a70659bb3))
315
+
316
+ # [1.0.0-beta.31](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2023-05-12)
317
+
318
+ ### Bug Fixes
319
+
320
+ - pubsub client reconnect multiple times issue ([bba0897](https://github.com/sciactive/nymphjs/commit/bba08974fadf318d040f8844a2d583f6bc15b486))
321
+
322
+ # [1.0.0-beta.30](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2023-05-12)
323
+
324
+ ### Features
325
+
326
+ - allow providing getEntityClass with a class instead of string ([ecd64c1](https://github.com/sciactive/nymphjs/commit/ecd64c1bf92e3657889613b76bcc46652f371ead))
327
+
328
+ # [1.0.0-beta.29](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2023-05-08)
329
+
330
+ **Note:** Version bump only for package @nymphjs/client
331
+
332
+ # [1.0.0-beta.28](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2023-05-05)
333
+
334
+ ### Bug Fixes
335
+
336
+ - pubsub client auth ([979d913](https://github.com/sciactive/nymphjs/commit/979d9138abc86c7cef8b80b4f63c519b7b7ded78))
337
+
338
+ # [1.0.0-beta.27](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2023-05-04)
339
+
340
+ **Note:** Version bump only for package @nymphjs/client
341
+
342
+ # [1.0.0-beta.26](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2023-05-04)
343
+
344
+ ### Features
345
+
346
+ - update packages and migrate to mysql2 ([72ad611](https://github.com/sciactive/nymphjs/commit/72ad611bd2bf7bf85c3ba8a3486503d9b50c49d6))
347
+
348
+ # [1.0.0-beta.25](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2023-05-04)
349
+
350
+ ### Features
351
+
352
+ - 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)
353
+
354
+ # [1.0.0-beta.24](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2023-05-02)
355
+
356
+ **Note:** Version bump only for package @nymphjs/client
357
+
358
+ # [1.0.0-beta.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2023-05-02)
359
+
360
+ **Note:** Version bump only for package @nymphjs/client
361
+
362
+ # [1.0.0-beta.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2023-05-01)
363
+
364
+ **Note:** Version bump only for package @nymphjs/client
365
+
366
+ # [1.0.0-beta.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2023-05-01)
367
+
368
+ **Note:** Version bump only for package @nymphjs/client
369
+
370
+ # [1.0.0-beta.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2023-04-30)
371
+
372
+ **Note:** Version bump only for package @nymphjs/client
373
+
374
+ # [1.0.0-beta.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2023-04-29)
375
+
376
+ ### Bug Fixes
377
+
378
+ - some type issues ([ee69d5d](https://github.com/sciactive/nymphjs/commit/ee69d5d73361dacda5745d697df18fafd47810bc))
379
+
380
+ # [1.0.0-beta.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2023-04-27)
381
+
382
+ ### Features
383
+
384
+ - add the ability to switch to a user without their password ([ca4466a](https://github.com/sciactive/nymphjs/commit/ca4466af1704d68905ac087350a8cf151c1072d9))
385
+
386
+ # [1.0.0-beta.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-04-24)
387
+
388
+ **Note:** Version bump only for package @nymphjs/client
389
+
390
+ # [1.0.0-beta.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2023-03-31)
391
+
392
+ **Note:** Version bump only for package @nymphjs/client
393
+
394
+ # [1.0.0-beta.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-23)
395
+
396
+ ### Features
397
+
398
+ - add option to sort results by a property ([16384e7](https://github.com/sciactive/nymphjs/commit/16384e7bdab88abb55ccccabb06ac09f92fa8a03))
399
+
400
+ # [1.0.0-beta.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-17)
401
+
402
+ **Note:** Version bump only for package @nymphjs/client
403
+
404
+ # [1.0.0-beta.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-16)
405
+
406
+ ### Features
407
+
408
+ - add noAutoconnect option to pubsub client ([266e715](https://github.com/sciactive/nymphjs/commit/266e715988b34f3e0d58ac68178677d2086b5160))
409
+
410
+ # [1.0.0-beta.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2023-03-04)
411
+
412
+ **Note:** Version bump only for package @nymphjs/client
413
+
414
+ # [1.0.0-beta.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2023-02-27)
415
+
416
+ ### Features
417
+
418
+ - allow customizing HTTP status codes in response from server called methods ([8c5c3d4](https://github.com/sciactive/nymphjs/commit/8c5c3d4af741edabc1a8947aaebf026ba546c46a))
419
+
420
+ # [1.0.0-beta.10](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2023-01-19)
421
+
422
+ **Note:** Version bump only for package @nymphjs/client
423
+
424
+ # [1.0.0-beta.9](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2023-01-09)
425
+
426
+ ### Bug Fixes
427
+
428
+ - reworked $is and $equals to better work with new instance based classes ([b1f3f0c](https://github.com/sciactive/nymphjs/commit/b1f3f0cca3e2b0dd392cd9da31167a6bd9487b40))
429
+
430
+ # [1.0.0-beta.8](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2023-01-09)
431
+
432
+ ### Features
433
+
434
+ - make entities in nymph client instance specific too ([1029f06](https://github.com/sciactive/nymphjs/commit/1029f061a1ad193e4a8a2dab0186b9a4b517f646))
435
+
436
+ # [1.0.0-beta.7](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2023-01-05)
437
+
438
+ **Note:** Version bump only for package @nymphjs/client
439
+
440
+ # [1.0.0-beta.6](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.5...v1.0.0-beta.6) (2023-01-05)
441
+
442
+ **Note:** Version bump only for package @nymphjs/client
443
+
444
+ # [1.0.0-beta.5](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-11-24)
445
+
446
+ **Note:** Version bump only for package @nymphjs/client
447
+
448
+ # [1.0.0-beta.4](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2022-11-23)
449
+
450
+ ### Bug Fixes
451
+
452
+ - client entity patch returning opposite result ([c29260c](https://github.com/sciactive/nymphjs/commit/c29260c6c9037134dbf51091810823edcab44b4a))
453
+
454
+ # [1.0.0-beta.3](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2022-11-21)
455
+
456
+ **Note:** Version bump only for package @nymphjs/client
457
+
458
+ # [1.0.0-beta.2](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2022-11-21)
459
+
460
+ **Note:** Version bump only for package @nymphjs/client
461
+
6
462
  # [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
463
 
8
464
  ### Bug Fixes
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Powerful object data storage and querying.
4
4
 
5
- The Nymph Client allows you to query and push data to a Nymph REST server from the browser. You can also subscribe to entities and queries on a Nymph PubSub server and be notified of changes.
5
+ The Nymph Client allows you to query and push data to a Nymph REST server from the browser or Node.js. You can also subscribe to entities and queries on a Nymph PubSub server and be notified of changes.
6
6
 
7
7
  ## Installation
8
8
 
@@ -10,7 +10,7 @@ The Nymph Client allows you to query and push data to a Nymph REST server from t
10
10
  npm install --save @nymphjs/client
11
11
  ```
12
12
 
13
- This package is the Nymph client for browsers. You can find UMD in `dist`, or TS source in `src`. There is also a **[Node.js client](https://github.com/sciactive/nymphjs/packages/client-node)**.
13
+ This package is the Nymph client for browsers and Node.js, but requires at least Node.js 22 to be used in Node. You can find ES modules in `dist`, or TS source in `src`.
14
14
 
15
15
  ## Usage
16
16
 
@@ -18,7 +18,7 @@ Here's an overview:
18
18
 
19
19
  ```ts
20
20
  import { Nymph, PubSub } from '@nymphjs/client';
21
- import Todo from 'Todo';
21
+ import TodoClass from './Todo.js';
22
22
 
23
23
  const nymphOptions = {
24
24
  restUrl: 'https://yournymphrestserver/path/to/your/endpoint',
@@ -26,7 +26,7 @@ const nymphOptions = {
26
26
  };
27
27
  const nymph = new Nymph(nymphOptions);
28
28
  const pubsub = new PubSub(nymphOptions, nymph);
29
- nymph.addEntityClass(Todo);
29
+ const Todo = nymph.addEntityClass(TodoClass);
30
30
 
31
31
  // Now you can use Nymph and PubSub.
32
32
  const myTodo = new Todo();
@@ -59,7 +59,7 @@ let subscription = pubsub.subscribeEntities(
59
59
  {
60
60
  type: '&',
61
61
  '!tag': 'archived',
62
- }
62
+ },
63
63
  )(
64
64
  (update) => {
65
65
  // The first time this is called, `update` will be an array of Todo
@@ -77,7 +77,7 @@ let subscription = pubsub.subscribeEntities(
77
77
  // If you provide this callback, the server will send updates of how many
78
78
  // clients are subscribed to this query.
79
79
  userCount = count;
80
- }
80
+ },
81
81
  );
82
82
 
83
83
  // ...
@@ -88,7 +88,7 @@ subscription.unsubscribe();
88
88
 
89
89
  # License
90
90
 
91
- Copyright 2021 SciActive Inc
91
+ Copyright 2021-2025 SciActive Inc
92
92
 
93
93
  Licensed under the Apache License, Version 2.0 (the "License");
94
94
  you may not use this file except in compliance with the License.
@@ -0,0 +1,53 @@
1
+ async function* iterate() {
2
+ let values = [1, 2, 3];
3
+ let finished = false;
4
+
5
+ let promise = new Promise((resolve) => {
6
+ setTimeout(() => {
7
+ promise = new Promise((resolve) => {
8
+ setTimeout(() => {
9
+ values.push(4);
10
+ promise = new Promise((resolve) => {
11
+ setTimeout(() => {
12
+ values.push(5, 6);
13
+ finished = true;
14
+ resolve();
15
+ }, 3000);
16
+ });
17
+ resolve();
18
+ }, 3000);
19
+ });
20
+ resolve();
21
+ }, 0);
22
+ });
23
+
24
+ const iterable = {
25
+ async *[Symbol.asyncIterator]() {
26
+ do {
27
+ await promise;
28
+
29
+ while (values.length) {
30
+ yield values.shift();
31
+ }
32
+ } while (!finished);
33
+ },
34
+ };
35
+
36
+ yield* iterable;
37
+ }
38
+
39
+ (async () => {
40
+ const iter = iterate();
41
+
42
+ for await (let value of iter) {
43
+ console.log(value);
44
+ }
45
+
46
+ console.log('done');
47
+
48
+ for await (let value of ['a', 'b', 'c']) {
49
+ console.log(value);
50
+ }
51
+
52
+ console.log('done');
53
+ })();