@nymphjs/client 1.0.0-beta.13 → 1.0.0-beta.131

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 (73) hide show
  1. package/CHANGELOG.md +552 -0
  2. package/README.md +12 -8
  3. package/asyncitertest.js +53 -0
  4. package/dist/Entity.d.ts +158 -0
  5. package/dist/Entity.js +643 -0
  6. package/dist/Entity.js.map +1 -0
  7. package/dist/Entity.types.d.ts +216 -0
  8. package/dist/Entity.types.js +2 -0
  9. package/{lib → dist}/EntityWeakCache.d.ts +1 -1
  10. package/{lib → dist}/EntityWeakCache.js +5 -9
  11. package/dist/EntityWeakCache.js.map +1 -0
  12. package/{lib → dist}/HttpRequester.d.ts +18 -4
  13. package/dist/HttpRequester.js +365 -0
  14. package/dist/HttpRequester.js.map +1 -0
  15. package/{lib → dist}/Nymph.d.ts +48 -11
  16. package/{lib → dist}/Nymph.js +172 -56
  17. package/dist/Nymph.js.map +1 -0
  18. package/dist/Nymph.types.d.ts +227 -0
  19. package/dist/Nymph.types.js +45 -0
  20. package/dist/Nymph.types.js.map +1 -0
  21. package/{lib → dist}/PubSub.d.ts +16 -10
  22. package/{lib → dist}/PubSub.js +207 -135
  23. package/dist/PubSub.js.map +1 -0
  24. package/{lib → dist}/PubSub.types.d.ts +19 -6
  25. package/dist/PubSub.types.js +2 -0
  26. package/{lib → dist}/entityRefresh.d.ts +1 -1
  27. package/{lib → dist}/entityRefresh.js +21 -13
  28. package/dist/entityRefresh.js.map +1 -0
  29. package/dist/index.d.ts +13 -0
  30. package/dist/index.js +13 -2
  31. package/dist/index.js.map +1 -1
  32. package/{lib → dist}/utils.d.ts +2 -1
  33. package/dist/utils.js +145 -0
  34. package/dist/utils.js.map +1 -0
  35. package/jest.config.js +31 -5
  36. package/package.json +36 -32
  37. package/src/Entity.ts +361 -247
  38. package/src/Entity.types.ts +37 -57
  39. package/src/EntityWeakCache.ts +8 -6
  40. package/src/HttpRequester.ts +268 -31
  41. package/src/Nymph.ts +203 -96
  42. package/src/Nymph.types.ts +98 -2
  43. package/src/PubSub.ts +264 -181
  44. package/src/PubSub.types.ts +33 -19
  45. package/src/entityRefresh.ts +6 -6
  46. package/src/index.ts +10 -10
  47. package/src/utils.ts +67 -14
  48. package/tsconfig.json +7 -4
  49. package/typedoc.json +4 -0
  50. package/dist/index.js.LICENSE.txt +0 -8
  51. package/lib/Entity.d.ts +0 -51
  52. package/lib/Entity.js +0 -500
  53. package/lib/Entity.js.map +0 -1
  54. package/lib/Entity.types.d.ts +0 -65
  55. package/lib/Entity.types.js +0 -3
  56. package/lib/EntityWeakCache.js.map +0 -1
  57. package/lib/HttpRequester.js +0 -190
  58. package/lib/HttpRequester.js.map +0 -1
  59. package/lib/Nymph.js.map +0 -1
  60. package/lib/Nymph.types.d.ts +0 -98
  61. package/lib/Nymph.types.js +0 -3
  62. package/lib/Nymph.types.js.map +0 -1
  63. package/lib/PubSub.js.map +0 -1
  64. package/lib/PubSub.types.js +0 -3
  65. package/lib/entityRefresh.js.map +0 -1
  66. package/lib/index.d.ts +0 -13
  67. package/lib/index.js +0 -34
  68. package/lib/index.js.map +0 -1
  69. package/lib/utils.js +0 -86
  70. package/lib/utils.js.map +0 -1
  71. package/webpack.config.js +0 -28
  72. /package/{lib → dist}/Entity.types.js.map +0 -0
  73. /package/{lib → dist}/PubSub.types.js.map +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,558 @@
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.131](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.130...v1.0.0-beta.131) (2026-10-20)
7
+
8
+ ### Features
9
+
10
+ - return proxy from places that should, throw errors from proxy on sleeping entity in client ([50d0b56](https://forge.sciactive.com/sciactive/nymphjs/commits/50d0b56fe4ef4fd9aed076ae82c81368ff4c8adb))
11
+
12
+ # [1.0.0-beta.130](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.129...v1.0.0-beta.130) (2026-10-09)
13
+
14
+ **Note:** Version bump only for package @nymphjs/client
15
+
16
+ # [1.0.0-beta.129](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.128...v1.0.0-beta.129) (2026-10-05)
17
+
18
+ ### Features
19
+
20
+ - migrate to built in node sqlite, target es2024 ([d7c78c0](https://forge.sciactive.com/sciactive/nymphjs/commits/d7c78c06072d785b228ff790eb005ab4f84529e9))
21
+
22
+ # [1.0.0-beta.128](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.127...v1.0.0-beta.128) (2026-09-29)
23
+
24
+ ### Bug Fixes
25
+
26
+ - properly walk deeper arrays and objects in ([2a68c6b](https://forge.sciactive.com/sciactive/nymphjs/commits/2a68c6bdef86938eeef66f4660bd7a36c34d63d0))
27
+
28
+ # [1.0.0-beta.127](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.126...v1.0.0-beta.127) (2026-09-24)
29
+
30
+ **Note:** Version bump only for package @nymphjs/client
31
+
32
+ # [1.0.0-beta.126](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.125...v1.0.0-beta.126) (2026-09-24)
33
+
34
+ **Note:** Version bump only for package @nymphjs/client
35
+
36
+ # [1.0.0-beta.125](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.124...v1.0.0-beta.125) (2026-09-24)
37
+
38
+ ### Bug Fixes
39
+
40
+ - client translation errors, pubsub qref translation, entities can contain classes in db now ([2902fe3](https://forge.sciactive.com/sciactive/nymphjs/commits/2902fe3166b456cd0d8012c10991f9a16a4a99bb))
41
+
42
+ # [1.0.0-beta.124](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.123...v1.0.0-beta.124) (2026-09-24)
43
+
44
+ ### Bug Fixes
45
+
46
+ - client class translation in queries and params ([849355c](https://forge.sciactive.com/sciactive/nymphjs/commits/849355c7ad2dfb594415454c2d491b6868508434))
47
+
48
+ # [1.0.0-beta.123](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.122...v1.0.0-beta.123) (2026-09-23)
49
+
50
+ ### Bug Fixes
51
+
52
+ - entities causing issues in selectors from client ([8992ccf](https://forge.sciactive.com/sciactive/nymphjs/commits/8992ccf8c3b386ddeecae9b83c9d798817923469))
53
+
54
+ # [1.0.0-beta.122](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.121...v1.0.0-beta.122) (2026-09-22)
55
+
56
+ ### Bug Fixes
57
+
58
+ - issues causing failing tests and update other tests ([f249bb9](https://forge.sciactive.com/sciactive/nymphjs/commits/f249bb97cfd9edb5559c11c2c1e6c1c8a07af7d8))
59
+
60
+ ### Features
61
+
62
+ - save and delete now throw on errors instead of returning false, refresh throws on db errors ([536db88](https://forge.sciactive.com/sciactive/nymphjs/commits/536db8804ac515cd3e1e9c30b104f674e267916a))
63
+
64
+ # [1.0.0-beta.121](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.120...v1.0.0-beta.121) (2026-09-17)
65
+
66
+ **Note:** Version bump only for package @nymphjs/client
67
+
68
+ # [1.0.0-beta.120](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.119...v1.0.0-beta.120) (2026-09-01)
69
+
70
+ ### Features
71
+
72
+ - support multiple publishes and multiple client messages at a time in pubsub ([dde6e88](https://forge.sciactive.com/sciactive/nymphjs/commits/dde6e88645513a798c5f9a7a1928177cf2d0d13c))
73
+
74
+ # [1.0.0-beta.119](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.118...v1.0.0-beta.119) (2026-08-25)
75
+
76
+ ### Features
77
+
78
+ - limit concurrent queries in postgres transactions to one at a time ([796a41b](https://forge.sciactive.com/sciactive/nymphjs/commits/796a41b128912d61ea4390f556476f9e7b6f3865))
79
+
80
+ # [1.0.0-beta.118](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.117...v1.0.0-beta.118) (2026-08-24)
81
+
82
+ ### Features
83
+
84
+ - update packages and migrate to ts7 ([c1b8eb5](https://forge.sciactive.com/sciactive/nymphjs/commits/c1b8eb5f7dd68436759f8d7b94bc9622511e71fd))
85
+
86
+ # [1.0.0-beta.117](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.116...v1.0.0-beta.117) (2026-04-21)
87
+
88
+ **Note:** Version bump only for package @nymphjs/client
89
+
90
+ # [1.0.0-beta.116](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.115...v1.0.0-beta.116) (2026-04-08)
91
+
92
+ **Note:** Version bump only for package @nymphjs/client
93
+
94
+ # [1.0.0-beta.115](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.114...v1.0.0-beta.115) (2026-04-06)
95
+
96
+ **Note:** Version bump only for package @nymphjs/client
97
+
98
+ # [1.0.0-beta.114](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.113...v1.0.0-beta.114) (2026-04-06)
99
+
100
+ **Note:** Version bump only for package @nymphjs/client
101
+
102
+ # [1.0.0-beta.113](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.112...v1.0.0-beta.113) (2026-04-03)
103
+
104
+ **Note:** Version bump only for package @nymphjs/client
105
+
106
+ # [1.0.0-beta.112](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.111...v1.0.0-beta.112) (2026-04-03)
107
+
108
+ ### Features
109
+
110
+ - add acRequest query option ([600b617](https://forge.sciactive.com/sciactive/nymphjs/commits/600b617692b7ba0824e6ee91c0c9f9c29156fbe3))
111
+
112
+ # [1.0.0-beta.111](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.110...v1.0.0-beta.111) (2026-03-10)
113
+
114
+ **Note:** Version bump only for package @nymphjs/client
115
+
116
+ # [1.0.0-beta.110](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.109...v1.0.0-beta.110) (2026-02-23)
117
+
118
+ **Note:** Version bump only for package @nymphjs/client
119
+
120
+ # [1.0.0-beta.109](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.108...v1.0.0-beta.109) (2026-02-15)
121
+
122
+ **Note:** Version bump only for package @nymphjs/client
123
+
124
+ # [1.0.0-beta.108](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.107...v1.0.0-beta.108) (2026-02-15)
125
+
126
+ **Note:** Version bump only for package @nymphjs/client
127
+
128
+ # [1.0.0-beta.107](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.106...v1.0.0-beta.107) (2026-02-13)
129
+
130
+ ### Features
131
+
132
+ - update packages and fix all new issues ([0e9d17c](https://github.com/sciactive/nymphjs/commit/0e9d17c6e2db12c11bdfb559031719c1b52b5fa1))
133
+
134
+ # [1.0.0-beta.106](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.105...v1.0.0-beta.106) (2025-12-05)
135
+
136
+ **Note:** Version bump only for package @nymphjs/client
137
+
138
+ # [1.0.0-beta.105](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.104...v1.0.0-beta.105) (2025-12-04)
139
+
140
+ ### Features
141
+
142
+ - add a null sort option to not sort the results in a particular order ([898d039](https://github.com/sciactive/nymphjs/commit/898d03981da0ca4ca5f68868584c902e1313c7d8))
143
+
144
+ # [1.0.0-beta.104](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.103...v1.0.0-beta.104) (2025-12-01)
145
+
146
+ **Note:** Version bump only for package @nymphjs/client
147
+
148
+ # [1.0.0-beta.103](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.102...v1.0.0-beta.103) (2025-11-30)
149
+
150
+ **Note:** Version bump only for package @nymphjs/client
151
+
152
+ # [1.0.0-beta.102](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.101...v1.0.0-beta.102) (2025-11-29)
153
+
154
+ **Note:** Version bump only for package @nymphjs/client
155
+
156
+ # [1.0.0-beta.101](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.100...v1.0.0-beta.101) (2025-11-29)
157
+
158
+ **Note:** Version bump only for package @nymphjs/client
159
+
160
+ # [1.0.0-beta.100](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.99...v1.0.0-beta.100) (2025-11-29)
161
+
162
+ **Note:** Version bump only for package @nymphjs/client
163
+
164
+ # [1.0.0-beta.99](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.98...v1.0.0-beta.99) (2025-11-26)
165
+
166
+ ### Features
167
+
168
+ - add full-text-search, but this is interim and will be redesigned ([56333db](https://github.com/sciactive/nymphjs/commit/56333dbe6a25755baed4e108ba4d71b3187fe8d0))
169
+
170
+ # [1.0.0-beta.98](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.97...v1.0.0-beta.98) (2025-10-24)
171
+
172
+ **Note:** Version bump only for package @nymphjs/client
173
+
174
+ # [1.0.0-beta.97](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.96...v1.0.0-beta.97) (2025-10-04)
175
+
176
+ **Note:** Version bump only for package @nymphjs/client
177
+
178
+ # [1.0.0-beta.96](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.95...v1.0.0-beta.96) (2025-09-01)
179
+
180
+ **Note:** Version bump only for package @nymphjs/client
181
+
182
+ # [1.0.0-beta.95](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.94...v1.0.0-beta.95) (2025-08-30)
183
+
184
+ **Note:** Version bump only for package @nymphjs/client
185
+
186
+ # [1.0.0-beta.94](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.93...v1.0.0-beta.94) (2025-08-25)
187
+
188
+ ### Features
189
+
190
+ - add returnNullOnNotFound client option, and some tilmeld domain checks ([20c0207](https://github.com/sciactive/nymphjs/commit/20c0207ef537a948f84f830f1db88d207e1c386b))
191
+
192
+ # [1.0.0-beta.93](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.92...v1.0.0-beta.93) (2025-08-16)
193
+
194
+ **Note:** Version bump only for package @nymphjs/client
195
+
196
+ # [1.0.0-beta.92](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.91...v1.0.0-beta.92) (2025-04-06)
197
+
198
+ **Note:** Version bump only for package @nymphjs/client
199
+
200
+ # [1.0.0-beta.91](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.90...v1.0.0-beta.91) (2025-03-07)
201
+
202
+ **Note:** Version bump only for package @nymphjs/client
203
+
204
+ # [1.0.0-beta.90](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.89...v1.0.0-beta.90) (2025-02-09)
205
+
206
+ **Note:** Version bump only for package @nymphjs/client
207
+
208
+ # [1.0.0-beta.89](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.88...v1.0.0-beta.89) (2025-02-09)
209
+
210
+ **Note:** Version bump only for package @nymphjs/client
211
+
212
+ # [1.0.0-beta.88](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.87...v1.0.0-beta.88) (2025-01-30)
213
+
214
+ **Note:** Version bump only for package @nymphjs/client
215
+
216
+ # [1.0.0-beta.87](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.86...v1.0.0-beta.87) (2025-01-20)
217
+
218
+ ### Features
219
+
220
+ - deprecate node client and allow multiple client instances to each log in own users ([17b42f4](https://github.com/sciactive/nymphjs/commit/17b42f449f2355a3ce896b8e86a47edd660e9277))
221
+
222
+ # [1.0.0-beta.86](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.85...v1.0.0-beta.86) (2024-12-28)
223
+
224
+ ### Bug Fixes
225
+
226
+ - entity search functions handling of null values ([6ac0335](https://github.com/sciactive/nymphjs/commit/6ac0335ecb792979ecfb621395a55b68a607429f))
227
+
228
+ # [1.0.0-beta.85](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.84...v1.0.0-beta.85) (2024-12-27)
229
+
230
+ **Note:** Version bump only for package @nymphjs/client
231
+
232
+ # [1.0.0-beta.84](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.83...v1.0.0-beta.84) (2024-12-21)
233
+
234
+ **Note:** Version bump only for package @nymphjs/client
235
+
236
+ # [1.0.0-beta.83](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.82...v1.0.0-beta.83) (2024-12-20)
237
+
238
+ **Note:** Version bump only for package @nymphjs/client
239
+
240
+ # [1.0.0-beta.82](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.81...v1.0.0-beta.82) (2024-12-15)
241
+
242
+ ### Features
243
+
244
+ - migrate to es modules, upgrade all packages, migrate to Svelte 5 ([3f2b9e5](https://github.com/sciactive/nymphjs/commit/3f2b9e517b39934eddce66601d7fc747fbf3f9e6))
245
+
246
+ # [1.0.0-beta.81](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.80...v1.0.0-beta.81) (2024-09-28)
247
+
248
+ **Note:** Version bump only for package @nymphjs/client
249
+
250
+ # [1.0.0-beta.80](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.79...v1.0.0-beta.80) (2024-09-28)
251
+
252
+ **Note:** Version bump only for package @nymphjs/client
253
+
254
+ # [1.0.0-beta.79](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.78...v1.0.0-beta.79) (2024-09-28)
255
+
256
+ **Note:** Version bump only for package @nymphjs/client
257
+
258
+ # [1.0.0-beta.78](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.77...v1.0.0-beta.78) (2024-09-27)
259
+
260
+ **Note:** Version bump only for package @nymphjs/client
261
+
262
+ # [1.0.0-beta.77](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.76...v1.0.0-beta.77) (2024-09-26)
263
+
264
+ **Note:** Version bump only for package @nymphjs/client
265
+
266
+ # [1.0.0-beta.76](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.75...v1.0.0-beta.76) (2024-09-25)
267
+
268
+ **Note:** Version bump only for package @nymphjs/client
269
+
270
+ # [1.0.0-beta.75](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.74...v1.0.0-beta.75) (2024-09-24)
271
+
272
+ **Note:** Version bump only for package @nymphjs/client
273
+
274
+ # [1.0.0-beta.74](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.73...v1.0.0-beta.74) (2024-09-21)
275
+
276
+ **Note:** Version bump only for package @nymphjs/client
277
+
278
+ # [1.0.0-beta.73](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.72...v1.0.0-beta.73) (2024-09-20)
279
+
280
+ **Note:** Version bump only for package @nymphjs/client
281
+
282
+ # [1.0.0-beta.72](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.71...v1.0.0-beta.72) (2024-09-20)
283
+
284
+ **Note:** Version bump only for package @nymphjs/client
285
+
286
+ # [1.0.0-beta.71](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.70...v1.0.0-beta.71) (2024-09-20)
287
+
288
+ **Note:** Version bump only for package @nymphjs/client
289
+
290
+ # [1.0.0-beta.70](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.69...v1.0.0-beta.70) (2024-09-20)
291
+
292
+ **Note:** Version bump only for package @nymphjs/client
293
+
294
+ # [1.0.0-beta.69](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.68...v1.0.0-beta.69) (2024-09-19)
295
+
296
+ **Note:** Version bump only for package @nymphjs/client
297
+
298
+ # [1.0.0-beta.68](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.67...v1.0.0-beta.68) (2024-09-19)
299
+
300
+ **Note:** Version bump only for package @nymphjs/client
301
+
302
+ # [1.0.0-beta.67](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.66...v1.0.0-beta.67) (2024-09-03)
303
+
304
+ **Note:** Version bump only for package @nymphjs/client
305
+
306
+ # [1.0.0-beta.66](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.65...v1.0.0-beta.66) (2024-08-06)
307
+
308
+ **Note:** Version bump only for package @nymphjs/client
309
+
310
+ # [1.0.0-beta.65](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.64...v1.0.0-beta.65) (2024-08-05)
311
+
312
+ **Note:** Version bump only for package @nymphjs/client
313
+
314
+ # [1.0.0-beta.64](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.63...v1.0.0-beta.64) (2024-08-04)
315
+
316
+ **Note:** Version bump only for package @nymphjs/client
317
+
318
+ # [1.0.0-beta.63](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.62...v1.0.0-beta.63) (2024-06-18)
319
+
320
+ **Note:** Version bump only for package @nymphjs/client
321
+
322
+ # [1.0.0-beta.62](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.61...v1.0.0-beta.62) (2024-06-15)
323
+
324
+ **Note:** Version bump only for package @nymphjs/client
325
+
326
+ # [1.0.0-beta.61](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.60...v1.0.0-beta.61) (2024-06-14)
327
+
328
+ **Note:** Version bump only for package @nymphjs/client
329
+
330
+ # [1.0.0-beta.60](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.59...v1.0.0-beta.60) (2024-06-14)
331
+
332
+ **Note:** Version bump only for package @nymphjs/client
333
+
334
+ # [1.0.0-beta.59](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.58...v1.0.0-beta.59) (2024-06-14)
335
+
336
+ ### Features
337
+
338
+ - add uniqueness constraint feature, refactor some types ([8133d32](https://github.com/sciactive/nymphjs/commit/8133d32b2c04907182dca2e9171b8217ed1b57e4))
339
+
340
+ # [1.0.0-beta.58](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.57...v1.0.0-beta.58) (2024-06-12)
341
+
342
+ **Note:** Version bump only for package @nymphjs/client
343
+
344
+ # [1.0.0-beta.57](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.56...v1.0.0-beta.57) (2024-06-12)
345
+
346
+ **Note:** Version bump only for package @nymphjs/client
347
+
348
+ # [1.0.0-beta.56](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.55...v1.0.0-beta.56) (2024-06-11)
349
+
350
+ ### Features
351
+
352
+ - allow connections where tokens are not renewed ([39071a5](https://github.com/sciactive/nymphjs/commit/39071a545644075190bd8213be25e0a0c46d2b5d))
353
+
354
+ # [1.0.0-beta.55](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.54...v1.0.0-beta.55) (2024-05-26)
355
+
356
+ **Note:** Version bump only for package @nymphjs/client
357
+
358
+ # [1.0.0-beta.54](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.53...v1.0.0-beta.54) (2024-05-26)
359
+
360
+ **Note:** Version bump only for package @nymphjs/client
361
+
362
+ # [1.0.0-beta.53](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.52...v1.0.0-beta.53) (2024-05-26)
363
+
364
+ **Note:** Version bump only for package @nymphjs/client
365
+
366
+ # [1.0.0-beta.52](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.51...v1.0.0-beta.52) (2024-05-25)
367
+
368
+ **Note:** Version bump only for package @nymphjs/client
369
+
370
+ # [1.0.0-beta.51](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2024-04-12)
371
+
372
+ **Note:** Version bump only for package @nymphjs/client
373
+
374
+ # [1.0.0-beta.50](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2024-04-08)
375
+
376
+ **Note:** Version bump only for package @nymphjs/client
377
+
378
+ # [1.0.0-beta.49](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2024-03-04)
379
+
380
+ **Note:** Version bump only for package @nymphjs/client
381
+
382
+ # [1.0.0-beta.48](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2023-11-10)
383
+
384
+ **Note:** Version bump only for package @nymphjs/client
385
+
386
+ # [1.0.0-beta.47](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2023-11-10)
387
+
388
+ **Note:** Version bump only for package @nymphjs/client
389
+
390
+ # [1.0.0-beta.46](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2023-08-29)
391
+
392
+ **Note:** Version bump only for package @nymphjs/client
393
+
394
+ # [1.0.0-beta.45](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2023-07-17)
395
+
396
+ **Note:** Version bump only for package @nymphjs/client
397
+
398
+ # [1.0.0-beta.44](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2023-07-13)
399
+
400
+ **Note:** Version bump only for package @nymphjs/client
401
+
402
+ # [1.0.0-beta.43](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2023-07-12)
403
+
404
+ **Note:** Version bump only for package @nymphjs/client
405
+
406
+ # [1.0.0-beta.42](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2023-07-12)
407
+
408
+ **Note:** Version bump only for package @nymphjs/client
409
+
410
+ # [1.0.0-beta.41](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2023-07-12)
411
+
412
+ ### Features
413
+
414
+ - remove synchronous database queries ([b579fb2](https://github.com/sciactive/nymphjs/commit/b579fb2eacd96cdd1b386a62c5c00cdbb2438f6e))
415
+ - rewrite server side async api to match client side api ([9c537a8](https://github.com/sciactive/nymphjs/commit/9c537a8be49e9b989af0822a4c2236e8c2d20f87))
416
+
417
+ # [1.0.0-beta.40](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2023-07-10)
418
+
419
+ ### Bug Fixes
420
+
421
+ - rewrite updateArray function to fix it ([22185c7](https://github.com/sciactive/nymphjs/commit/22185c7627f6dc616f9d3187ee8c9a383ca71441))
422
+
423
+ # [1.0.0-beta.39](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2023-07-09)
424
+
425
+ ### Bug Fixes
426
+
427
+ - go back to older code for updateArray, but better number handling ([7a58c98](https://github.com/sciactive/nymphjs/commit/7a58c983eac73839544361b4d32fb2dbb0881da2))
428
+
429
+ # [1.0.0-beta.38](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2023-07-09)
430
+
431
+ ### Bug Fixes
432
+
433
+ - pull value from the array in updateArray function ([352d1ea](https://github.com/sciactive/nymphjs/commit/352d1eab0cf8868f672ce0350564eb75ac9d4a45))
434
+ - simplify updateArray code ([348154c](https://github.com/sciactive/nymphjs/commit/348154c4d42b1e2b54bc491c1588a59c7c48984c))
435
+
436
+ # [1.0.0-beta.37](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2023-07-09)
437
+
438
+ ### Bug Fixes
439
+
440
+ - correctly iterate through new arrays on updateArray pubsub method ([27d7cc8](https://github.com/sciactive/nymphjs/commit/27d7cc847d93300e3d76cf6fa528176c3d06ae67))
441
+
442
+ # [1.0.0-beta.36](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2023-07-09)
443
+
444
+ ### Bug Fixes
445
+
446
+ - use code 1000 for closing pubsub connection ([cbd56af](https://github.com/sciactive/nymphjs/commit/cbd56af98d0775dee36025d909a82a0af0633d72))
447
+
448
+ # [1.0.0-beta.35](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2023-06-14)
449
+
450
+ ### Features
451
+
452
+ - add iteratable server call support using event streams ([fa7c1ec](https://github.com/sciactive/nymphjs/commit/fa7c1ec869e1fb52db20c8245e98a681f73dbf83))
453
+
454
+ # [1.0.0-beta.34](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2023-05-13)
455
+
456
+ ### Bug Fixes
457
+
458
+ - subscribeWith making guid null ([dbb38d4](https://github.com/sciactive/nymphjs/commit/dbb38d424f2395bbfa01ab4a0663dcaebf0c7aa7))
459
+
460
+ # [1.0.0-beta.33](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2023-05-13)
461
+
462
+ **Note:** Version bump only for package @nymphjs/client
463
+
464
+ # [1.0.0-beta.32](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2023-05-13)
465
+
466
+ ### Features
467
+
468
+ - issue initial request with pubsub instead of rest on subscribe ([8a232d2](https://github.com/sciactive/nymphjs/commit/8a232d2faeb8622924f9c35a01a8f71a70659bb3))
469
+
470
+ # [1.0.0-beta.31](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2023-05-12)
471
+
472
+ ### Bug Fixes
473
+
474
+ - pubsub client reconnect multiple times issue ([bba0897](https://github.com/sciactive/nymphjs/commit/bba08974fadf318d040f8844a2d583f6bc15b486))
475
+
476
+ # [1.0.0-beta.30](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2023-05-12)
477
+
478
+ ### Features
479
+
480
+ - allow providing getEntityClass with a class instead of string ([ecd64c1](https://github.com/sciactive/nymphjs/commit/ecd64c1bf92e3657889613b76bcc46652f371ead))
481
+
482
+ # [1.0.0-beta.29](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2023-05-08)
483
+
484
+ **Note:** Version bump only for package @nymphjs/client
485
+
486
+ # [1.0.0-beta.28](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2023-05-05)
487
+
488
+ ### Bug Fixes
489
+
490
+ - pubsub client auth ([979d913](https://github.com/sciactive/nymphjs/commit/979d9138abc86c7cef8b80b4f63c519b7b7ded78))
491
+
492
+ # [1.0.0-beta.27](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2023-05-04)
493
+
494
+ **Note:** Version bump only for package @nymphjs/client
495
+
496
+ # [1.0.0-beta.26](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2023-05-04)
497
+
498
+ ### Features
499
+
500
+ - update packages and migrate to mysql2 ([72ad611](https://github.com/sciactive/nymphjs/commit/72ad611bd2bf7bf85c3ba8a3486503d9b50c49d6))
501
+
502
+ # [1.0.0-beta.25](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2023-05-04)
503
+
504
+ ### Features
505
+
506
+ - 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)
507
+
508
+ # [1.0.0-beta.24](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2023-05-02)
509
+
510
+ **Note:** Version bump only for package @nymphjs/client
511
+
512
+ # [1.0.0-beta.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2023-05-02)
513
+
514
+ **Note:** Version bump only for package @nymphjs/client
515
+
516
+ # [1.0.0-beta.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2023-05-01)
517
+
518
+ **Note:** Version bump only for package @nymphjs/client
519
+
520
+ # [1.0.0-beta.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2023-05-01)
521
+
522
+ **Note:** Version bump only for package @nymphjs/client
523
+
524
+ # [1.0.0-beta.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2023-04-30)
525
+
526
+ **Note:** Version bump only for package @nymphjs/client
527
+
528
+ # [1.0.0-beta.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2023-04-29)
529
+
530
+ ### Bug Fixes
531
+
532
+ - some type issues ([ee69d5d](https://github.com/sciactive/nymphjs/commit/ee69d5d73361dacda5745d697df18fafd47810bc))
533
+
534
+ # [1.0.0-beta.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2023-04-27)
535
+
536
+ ### Features
537
+
538
+ - add the ability to switch to a user without their password ([ca4466a](https://github.com/sciactive/nymphjs/commit/ca4466af1704d68905ac087350a8cf151c1072d9))
539
+
540
+ # [1.0.0-beta.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-04-24)
541
+
542
+ **Note:** Version bump only for package @nymphjs/client
543
+
544
+ # [1.0.0-beta.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2023-03-31)
545
+
546
+ **Note:** Version bump only for package @nymphjs/client
547
+
548
+ # [1.0.0-beta.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-23)
549
+
550
+ ### Features
551
+
552
+ - add option to sort results by a property ([16384e7](https://github.com/sciactive/nymphjs/commit/16384e7bdab88abb55ccccabb06ac09f92fa8a03))
553
+
554
+ # [1.0.0-beta.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-17)
555
+
556
+ **Note:** Version bump only for package @nymphjs/client
557
+
6
558
  # [1.0.0-beta.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-16)
7
559
 
8
560
  ### Features
package/README.md CHANGED
@@ -1,8 +1,12 @@
1
1
  # Nymph Client
2
2
 
3
- Powerful object data storage and querying.
3
+ Application Data and Access Framework for Node.js and the browser.
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
+ https://nymph.io/
6
+
7
+ The Nymph Client allows you to query and push data to a Nymph REST server, and subscribe to entities and queries on a Nymph PubSub server and be notified of changes, from the browser or Node.js.
8
+
9
+ For Tilmeld user authentication, be sure to load the [Tilmeld Client](../tilmeld-client/README.md) entities as well.
6
10
 
7
11
  ## Installation
8
12
 
@@ -10,7 +14,7 @@ The Nymph Client allows you to query and push data to a Nymph REST server from t
10
14
  npm install --save @nymphjs/client
11
15
  ```
12
16
 
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)**.
17
+ 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
18
 
15
19
  ## Usage
16
20
 
@@ -18,7 +22,7 @@ Here's an overview:
18
22
 
19
23
  ```ts
20
24
  import { Nymph, PubSub } from '@nymphjs/client';
21
- import TodoClass from 'Todo';
25
+ import TodoClass from './Todo.js';
22
26
 
23
27
  const nymphOptions = {
24
28
  restUrl: 'https://yournymphrestserver/path/to/your/endpoint',
@@ -54,12 +58,12 @@ let todos = [];
54
58
  let userCount = 0;
55
59
  let subscription = pubsub.subscribeEntities(
56
60
  {
57
- class: Todo.class,
61
+ class: Todo,
58
62
  },
59
63
  {
60
64
  type: '&',
61
65
  '!tag': 'archived',
62
- }
66
+ },
63
67
  )(
64
68
  (update) => {
65
69
  // The first time this is called, `update` will be an array of Todo
@@ -77,7 +81,7 @@ let subscription = pubsub.subscribeEntities(
77
81
  // If you provide this callback, the server will send updates of how many
78
82
  // clients are subscribed to this query.
79
83
  userCount = count;
80
- }
84
+ },
81
85
  );
82
86
 
83
87
  // ...
@@ -88,7 +92,7 @@ subscription.unsubscribe();
88
92
 
89
93
  # License
90
94
 
91
- Copyright 2021 SciActive Inc
95
+ Copyright 2021-2026 SciActive Inc
92
96
 
93
97
  Licensed under the Apache License, Version 2.0 (the "License");
94
98
  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
+ })();