@nymphjs/client 1.0.0-beta.7 → 1.0.0-beta.70

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,306 @@
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.70](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.69...v1.0.0-beta.70) (2024-09-20)
7
+
8
+ **Note:** Version bump only for package @nymphjs/client
9
+
10
+ # [1.0.0-beta.69](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.68...v1.0.0-beta.69) (2024-09-19)
11
+
12
+ **Note:** Version bump only for package @nymphjs/client
13
+
14
+ # [1.0.0-beta.68](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.67...v1.0.0-beta.68) (2024-09-19)
15
+
16
+ **Note:** Version bump only for package @nymphjs/client
17
+
18
+ # [1.0.0-beta.67](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.66...v1.0.0-beta.67) (2024-09-03)
19
+
20
+ **Note:** Version bump only for package @nymphjs/client
21
+
22
+ # [1.0.0-beta.66](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.65...v1.0.0-beta.66) (2024-08-06)
23
+
24
+ **Note:** Version bump only for package @nymphjs/client
25
+
26
+ # [1.0.0-beta.65](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.64...v1.0.0-beta.65) (2024-08-05)
27
+
28
+ **Note:** Version bump only for package @nymphjs/client
29
+
30
+ # [1.0.0-beta.64](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.63...v1.0.0-beta.64) (2024-08-04)
31
+
32
+ **Note:** Version bump only for package @nymphjs/client
33
+
34
+ # [1.0.0-beta.63](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.62...v1.0.0-beta.63) (2024-06-18)
35
+
36
+ **Note:** Version bump only for package @nymphjs/client
37
+
38
+ # [1.0.0-beta.62](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.61...v1.0.0-beta.62) (2024-06-15)
39
+
40
+ **Note:** Version bump only for package @nymphjs/client
41
+
42
+ # [1.0.0-beta.61](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.60...v1.0.0-beta.61) (2024-06-14)
43
+
44
+ **Note:** Version bump only for package @nymphjs/client
45
+
46
+ # [1.0.0-beta.60](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.59...v1.0.0-beta.60) (2024-06-14)
47
+
48
+ **Note:** Version bump only for package @nymphjs/client
49
+
50
+ # [1.0.0-beta.59](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.58...v1.0.0-beta.59) (2024-06-14)
51
+
52
+ ### Features
53
+
54
+ - add uniqueness constraint feature, refactor some types ([8133d32](https://github.com/sciactive/nymphjs/commit/8133d32b2c04907182dca2e9171b8217ed1b57e4))
55
+
56
+ # [1.0.0-beta.58](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.57...v1.0.0-beta.58) (2024-06-12)
57
+
58
+ **Note:** Version bump only for package @nymphjs/client
59
+
60
+ # [1.0.0-beta.57](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.56...v1.0.0-beta.57) (2024-06-12)
61
+
62
+ **Note:** Version bump only for package @nymphjs/client
63
+
64
+ # [1.0.0-beta.56](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.55...v1.0.0-beta.56) (2024-06-11)
65
+
66
+ ### Features
67
+
68
+ - allow connections where tokens are not renewed ([39071a5](https://github.com/sciactive/nymphjs/commit/39071a545644075190bd8213be25e0a0c46d2b5d))
69
+
70
+ # [1.0.0-beta.55](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.54...v1.0.0-beta.55) (2024-05-26)
71
+
72
+ **Note:** Version bump only for package @nymphjs/client
73
+
74
+ # [1.0.0-beta.54](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.53...v1.0.0-beta.54) (2024-05-26)
75
+
76
+ **Note:** Version bump only for package @nymphjs/client
77
+
78
+ # [1.0.0-beta.53](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.52...v1.0.0-beta.53) (2024-05-26)
79
+
80
+ **Note:** Version bump only for package @nymphjs/client
81
+
82
+ # [1.0.0-beta.52](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.51...v1.0.0-beta.52) (2024-05-25)
83
+
84
+ **Note:** Version bump only for package @nymphjs/client
85
+
86
+ # [1.0.0-beta.51](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2024-04-12)
87
+
88
+ **Note:** Version bump only for package @nymphjs/client
89
+
90
+ # [1.0.0-beta.50](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2024-04-08)
91
+
92
+ **Note:** Version bump only for package @nymphjs/client
93
+
94
+ # [1.0.0-beta.49](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2024-03-04)
95
+
96
+ **Note:** Version bump only for package @nymphjs/client
97
+
98
+ # [1.0.0-beta.48](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2023-11-10)
99
+
100
+ **Note:** Version bump only for package @nymphjs/client
101
+
102
+ # [1.0.0-beta.47](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2023-11-10)
103
+
104
+ **Note:** Version bump only for package @nymphjs/client
105
+
106
+ # [1.0.0-beta.46](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2023-08-29)
107
+
108
+ **Note:** Version bump only for package @nymphjs/client
109
+
110
+ # [1.0.0-beta.45](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2023-07-17)
111
+
112
+ **Note:** Version bump only for package @nymphjs/client
113
+
114
+ # [1.0.0-beta.44](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2023-07-13)
115
+
116
+ **Note:** Version bump only for package @nymphjs/client
117
+
118
+ # [1.0.0-beta.43](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2023-07-12)
119
+
120
+ **Note:** Version bump only for package @nymphjs/client
121
+
122
+ # [1.0.0-beta.42](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2023-07-12)
123
+
124
+ **Note:** Version bump only for package @nymphjs/client
125
+
126
+ # [1.0.0-beta.41](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2023-07-12)
127
+
128
+ ### Features
129
+
130
+ - remove synchronous database queries ([b579fb2](https://github.com/sciactive/nymphjs/commit/b579fb2eacd96cdd1b386a62c5c00cdbb2438f6e))
131
+ - rewrite server side async api to match client side api ([9c537a8](https://github.com/sciactive/nymphjs/commit/9c537a8be49e9b989af0822a4c2236e8c2d20f87))
132
+
133
+ # [1.0.0-beta.40](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2023-07-10)
134
+
135
+ ### Bug Fixes
136
+
137
+ - rewrite updateArray function to fix it ([22185c7](https://github.com/sciactive/nymphjs/commit/22185c7627f6dc616f9d3187ee8c9a383ca71441))
138
+
139
+ # [1.0.0-beta.39](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2023-07-09)
140
+
141
+ ### Bug Fixes
142
+
143
+ - go back to older code for updateArray, but better number handling ([7a58c98](https://github.com/sciactive/nymphjs/commit/7a58c983eac73839544361b4d32fb2dbb0881da2))
144
+
145
+ # [1.0.0-beta.38](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2023-07-09)
146
+
147
+ ### Bug Fixes
148
+
149
+ - pull value from the array in updateArray function ([352d1ea](https://github.com/sciactive/nymphjs/commit/352d1eab0cf8868f672ce0350564eb75ac9d4a45))
150
+ - simplify updateArray code ([348154c](https://github.com/sciactive/nymphjs/commit/348154c4d42b1e2b54bc491c1588a59c7c48984c))
151
+
152
+ # [1.0.0-beta.37](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2023-07-09)
153
+
154
+ ### Bug Fixes
155
+
156
+ - correctly iterate through new arrays on updateArray pubsub method ([27d7cc8](https://github.com/sciactive/nymphjs/commit/27d7cc847d93300e3d76cf6fa528176c3d06ae67))
157
+
158
+ # [1.0.0-beta.36](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2023-07-09)
159
+
160
+ ### Bug Fixes
161
+
162
+ - use code 1000 for closing pubsub connection ([cbd56af](https://github.com/sciactive/nymphjs/commit/cbd56af98d0775dee36025d909a82a0af0633d72))
163
+
164
+ # [1.0.0-beta.35](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2023-06-14)
165
+
166
+ ### Features
167
+
168
+ - add iteratable server call support using event streams ([fa7c1ec](https://github.com/sciactive/nymphjs/commit/fa7c1ec869e1fb52db20c8245e98a681f73dbf83))
169
+
170
+ # [1.0.0-beta.34](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2023-05-13)
171
+
172
+ ### Bug Fixes
173
+
174
+ - subscribeWith making guid null ([dbb38d4](https://github.com/sciactive/nymphjs/commit/dbb38d424f2395bbfa01ab4a0663dcaebf0c7aa7))
175
+
176
+ # [1.0.0-beta.33](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2023-05-13)
177
+
178
+ **Note:** Version bump only for package @nymphjs/client
179
+
180
+ # [1.0.0-beta.32](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2023-05-13)
181
+
182
+ ### Features
183
+
184
+ - issue initial request with pubsub instead of rest on subscribe ([8a232d2](https://github.com/sciactive/nymphjs/commit/8a232d2faeb8622924f9c35a01a8f71a70659bb3))
185
+
186
+ # [1.0.0-beta.31](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2023-05-12)
187
+
188
+ ### Bug Fixes
189
+
190
+ - pubsub client reconnect multiple times issue ([bba0897](https://github.com/sciactive/nymphjs/commit/bba08974fadf318d040f8844a2d583f6bc15b486))
191
+
192
+ # [1.0.0-beta.30](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2023-05-12)
193
+
194
+ ### Features
195
+
196
+ - allow providing getEntityClass with a class instead of string ([ecd64c1](https://github.com/sciactive/nymphjs/commit/ecd64c1bf92e3657889613b76bcc46652f371ead))
197
+
198
+ # [1.0.0-beta.29](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2023-05-08)
199
+
200
+ **Note:** Version bump only for package @nymphjs/client
201
+
202
+ # [1.0.0-beta.28](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2023-05-05)
203
+
204
+ ### Bug Fixes
205
+
206
+ - pubsub client auth ([979d913](https://github.com/sciactive/nymphjs/commit/979d9138abc86c7cef8b80b4f63c519b7b7ded78))
207
+
208
+ # [1.0.0-beta.27](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2023-05-04)
209
+
210
+ **Note:** Version bump only for package @nymphjs/client
211
+
212
+ # [1.0.0-beta.26](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2023-05-04)
213
+
214
+ ### Features
215
+
216
+ - update packages and migrate to mysql2 ([72ad611](https://github.com/sciactive/nymphjs/commit/72ad611bd2bf7bf85c3ba8a3486503d9b50c49d6))
217
+
218
+ # [1.0.0-beta.25](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2023-05-04)
219
+
220
+ ### Features
221
+
222
+ - 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)
223
+
224
+ # [1.0.0-beta.24](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2023-05-02)
225
+
226
+ **Note:** Version bump only for package @nymphjs/client
227
+
228
+ # [1.0.0-beta.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2023-05-02)
229
+
230
+ **Note:** Version bump only for package @nymphjs/client
231
+
232
+ # [1.0.0-beta.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2023-05-01)
233
+
234
+ **Note:** Version bump only for package @nymphjs/client
235
+
236
+ # [1.0.0-beta.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2023-05-01)
237
+
238
+ **Note:** Version bump only for package @nymphjs/client
239
+
240
+ # [1.0.0-beta.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2023-04-30)
241
+
242
+ **Note:** Version bump only for package @nymphjs/client
243
+
244
+ # [1.0.0-beta.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2023-04-29)
245
+
246
+ ### Bug Fixes
247
+
248
+ - some type issues ([ee69d5d](https://github.com/sciactive/nymphjs/commit/ee69d5d73361dacda5745d697df18fafd47810bc))
249
+
250
+ # [1.0.0-beta.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2023-04-27)
251
+
252
+ ### Features
253
+
254
+ - add the ability to switch to a user without their password ([ca4466a](https://github.com/sciactive/nymphjs/commit/ca4466af1704d68905ac087350a8cf151c1072d9))
255
+
256
+ # [1.0.0-beta.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-04-24)
257
+
258
+ **Note:** Version bump only for package @nymphjs/client
259
+
260
+ # [1.0.0-beta.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2023-03-31)
261
+
262
+ **Note:** Version bump only for package @nymphjs/client
263
+
264
+ # [1.0.0-beta.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-23)
265
+
266
+ ### Features
267
+
268
+ - add option to sort results by a property ([16384e7](https://github.com/sciactive/nymphjs/commit/16384e7bdab88abb55ccccabb06ac09f92fa8a03))
269
+
270
+ # [1.0.0-beta.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-17)
271
+
272
+ **Note:** Version bump only for package @nymphjs/client
273
+
274
+ # [1.0.0-beta.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-16)
275
+
276
+ ### Features
277
+
278
+ - add noAutoconnect option to pubsub client ([266e715](https://github.com/sciactive/nymphjs/commit/266e715988b34f3e0d58ac68178677d2086b5160))
279
+
280
+ # [1.0.0-beta.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2023-03-04)
281
+
282
+ **Note:** Version bump only for package @nymphjs/client
283
+
284
+ # [1.0.0-beta.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2023-02-27)
285
+
286
+ ### Features
287
+
288
+ - allow customizing HTTP status codes in response from server called methods ([8c5c3d4](https://github.com/sciactive/nymphjs/commit/8c5c3d4af741edabc1a8947aaebf026ba546c46a))
289
+
290
+ # [1.0.0-beta.10](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2023-01-19)
291
+
292
+ **Note:** Version bump only for package @nymphjs/client
293
+
294
+ # [1.0.0-beta.9](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2023-01-09)
295
+
296
+ ### Bug Fixes
297
+
298
+ - reworked $is and $equals to better work with new instance based classes ([b1f3f0c](https://github.com/sciactive/nymphjs/commit/b1f3f0cca3e2b0dd392cd9da31167a6bd9487b40))
299
+
300
+ # [1.0.0-beta.8](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2023-01-09)
301
+
302
+ ### Features
303
+
304
+ - make entities in nymph client instance specific too ([1029f06](https://github.com/sciactive/nymphjs/commit/1029f061a1ad193e4a8a2dab0186b9a4b517f646))
305
+
6
306
  # [1.0.0-beta.7](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2023-01-05)
7
307
 
8
308
  **Note:** Version bump only for package @nymphjs/client
package/README.md CHANGED
@@ -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';
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
  // ...
@@ -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
+ })();