@nymphjs/pubsub 1.0.0-beta.11 → 1.0.0-beta.110
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 +450 -0
- package/README.md +8 -8
- package/dist/PubSub.d.ts +77 -12
- package/dist/PubSub.js +467 -103
- package/dist/PubSub.js.map +1 -1
- package/dist/PubSub.test.js +394 -65
- package/dist/PubSub.test.js.map +1 -1
- package/dist/PubSub.types.d.ts +6 -1
- package/dist/PubSub.types.js +1 -2
- package/dist/conf/d.d.ts +23 -0
- package/dist/conf/d.js +1 -2
- package/dist/conf/defaults.d.ts +1 -1
- package/dist/conf/defaults.js +4 -4
- package/dist/conf/defaults.js.map +1 -1
- package/dist/conf/index.d.ts +2 -2
- package/dist/conf/index.js +2 -8
- package/dist/conf/index.js.map +1 -1
- package/dist/createServer.d.ts +2 -2
- package/dist/createServer.js +14 -15
- package/dist/createServer.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -27
- package/dist/index.js.map +1 -1
- package/jest.config.js +11 -2
- package/package.json +23 -23
- package/src/PubSub.test.ts +467 -101
- package/src/PubSub.ts +548 -286
- package/src/PubSub.types.ts +2 -1
- package/src/conf/defaults.ts +2 -2
- package/src/conf/index.ts +2 -2
- package/src/createServer.ts +8 -8
- package/src/index.ts +4 -4
- package/tsconfig.json +5 -3
- package/typedoc.json +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,456 @@
|
|
|
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.110](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.109...v1.0.0-beta.110) (2026-02-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
9
|
+
|
|
10
|
+
# [1.0.0-beta.109](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.108...v1.0.0-beta.109) (2026-02-15)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
13
|
+
|
|
14
|
+
# [1.0.0-beta.108](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.107...v1.0.0-beta.108) (2026-02-15)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
17
|
+
|
|
18
|
+
# [1.0.0-beta.107](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.106...v1.0.0-beta.107) (2026-02-13)
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
- update packages and fix all new issues ([0e9d17c](https://github.com/sciactive/nymphjs/commit/0e9d17c6e2db12c11bdfb559031719c1b52b5fa1))
|
|
23
|
+
|
|
24
|
+
# [1.0.0-beta.106](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.105...v1.0.0-beta.106) (2025-12-05)
|
|
25
|
+
|
|
26
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
27
|
+
|
|
28
|
+
# [1.0.0-beta.105](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.104...v1.0.0-beta.105) (2025-12-04)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
31
|
+
|
|
32
|
+
# [1.0.0-beta.104](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.103...v1.0.0-beta.104) (2025-12-01)
|
|
33
|
+
|
|
34
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
35
|
+
|
|
36
|
+
# [1.0.0-beta.103](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.102...v1.0.0-beta.103) (2025-11-30)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
39
|
+
|
|
40
|
+
# [1.0.0-beta.102](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.101...v1.0.0-beta.102) (2025-11-29)
|
|
41
|
+
|
|
42
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
43
|
+
|
|
44
|
+
# [1.0.0-beta.101](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.100...v1.0.0-beta.101) (2025-11-29)
|
|
45
|
+
|
|
46
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
47
|
+
|
|
48
|
+
# [1.0.0-beta.100](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.99...v1.0.0-beta.100) (2025-11-29)
|
|
49
|
+
|
|
50
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
51
|
+
|
|
52
|
+
# [1.0.0-beta.99](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.98...v1.0.0-beta.99) (2025-11-26)
|
|
53
|
+
|
|
54
|
+
### Features
|
|
55
|
+
|
|
56
|
+
- add full-text-search, but this is interim and will be redesigned ([56333db](https://github.com/sciactive/nymphjs/commit/56333dbe6a25755baed4e108ba4d71b3187fe8d0))
|
|
57
|
+
- add sciactive tokenizer based full text search ([173c96e](https://github.com/sciactive/nymphjs/commit/173c96e02827e8ca155f55e08f33e8cdef475ab9))
|
|
58
|
+
- clean up old fts code, get ready for new implementation ([e8d7a6d](https://github.com/sciactive/nymphjs/commit/e8d7a6d6c6cdbb3dd74bd3e6a104e02a4caf283b))
|
|
59
|
+
|
|
60
|
+
# [1.0.0-beta.98](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.97...v1.0.0-beta.98) (2025-10-24)
|
|
61
|
+
|
|
62
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
63
|
+
|
|
64
|
+
# [1.0.0-beta.97](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.96...v1.0.0-beta.97) (2025-10-04)
|
|
65
|
+
|
|
66
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
67
|
+
|
|
68
|
+
# [1.0.0-beta.96](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.95...v1.0.0-beta.96) (2025-09-01)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
71
|
+
|
|
72
|
+
# [1.0.0-beta.95](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.94...v1.0.0-beta.95) (2025-08-30)
|
|
73
|
+
|
|
74
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
75
|
+
|
|
76
|
+
# [1.0.0-beta.94](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.93...v1.0.0-beta.94) (2025-08-25)
|
|
77
|
+
|
|
78
|
+
### Features
|
|
79
|
+
|
|
80
|
+
- add returnNullOnNotFound client option, and some tilmeld domain checks ([20c0207](https://github.com/sciactive/nymphjs/commit/20c0207ef537a948f84f830f1db88d207e1c386b))
|
|
81
|
+
|
|
82
|
+
# [1.0.0-beta.93](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.92...v1.0.0-beta.93) (2025-08-16)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
85
|
+
|
|
86
|
+
# [1.0.0-beta.92](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.91...v1.0.0-beta.92) (2025-04-06)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
89
|
+
|
|
90
|
+
# [1.0.0-beta.91](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.90...v1.0.0-beta.91) (2025-03-07)
|
|
91
|
+
|
|
92
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
93
|
+
|
|
94
|
+
# [1.0.0-beta.90](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.89...v1.0.0-beta.90) (2025-02-09)
|
|
95
|
+
|
|
96
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
97
|
+
|
|
98
|
+
# [1.0.0-beta.89](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.88...v1.0.0-beta.89) (2025-02-09)
|
|
99
|
+
|
|
100
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
101
|
+
|
|
102
|
+
# [1.0.0-beta.88](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.87...v1.0.0-beta.88) (2025-01-30)
|
|
103
|
+
|
|
104
|
+
### Bug Fixes
|
|
105
|
+
|
|
106
|
+
- allow removing pubsub publisher ([10fa223](https://github.com/sciactive/nymphjs/commit/10fa22322447d9295ed06413f19b9c86adb4c4ab))
|
|
107
|
+
|
|
108
|
+
# [1.0.0-beta.87](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.86...v1.0.0-beta.87) (2025-01-20)
|
|
109
|
+
|
|
110
|
+
### Features
|
|
111
|
+
|
|
112
|
+
- deprecate node client and allow multiple client instances to each log in own users ([17b42f4](https://github.com/sciactive/nymphjs/commit/17b42f449f2355a3ce896b8e86a47edd660e9277))
|
|
113
|
+
|
|
114
|
+
# [1.0.0-beta.86](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.85...v1.0.0-beta.86) (2024-12-28)
|
|
115
|
+
|
|
116
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
117
|
+
|
|
118
|
+
# [1.0.0-beta.85](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.84...v1.0.0-beta.85) (2024-12-27)
|
|
119
|
+
|
|
120
|
+
### Bug Fixes
|
|
121
|
+
|
|
122
|
+
- inTransaction could incorrectly report transaction state ([a7e2ca5](https://github.com/sciactive/nymphjs/commit/a7e2ca57f5b19e9b5b2a04dcc8b79e3937db20e5))
|
|
123
|
+
|
|
124
|
+
# [1.0.0-beta.84](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.83...v1.0.0-beta.84) (2024-12-21)
|
|
125
|
+
|
|
126
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
127
|
+
|
|
128
|
+
# [1.0.0-beta.83](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.82...v1.0.0-beta.83) (2024-12-20)
|
|
129
|
+
|
|
130
|
+
### Bug Fixes
|
|
131
|
+
|
|
132
|
+
- flaky pubsub tests ([b580f78](https://github.com/sciactive/nymphjs/commit/b580f78461d78c11682dc2bba99dc5a8d82f6f5b))
|
|
133
|
+
|
|
134
|
+
# [1.0.0-beta.82](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.81...v1.0.0-beta.82) (2024-12-15)
|
|
135
|
+
|
|
136
|
+
### Features
|
|
137
|
+
|
|
138
|
+
- migrate to es modules, upgrade all packages, migrate to Svelte 5 ([3f2b9e5](https://github.com/sciactive/nymphjs/commit/3f2b9e517b39934eddce66601d7fc747fbf3f9e6))
|
|
139
|
+
|
|
140
|
+
# [1.0.0-beta.81](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.80...v1.0.0-beta.81) (2024-09-28)
|
|
141
|
+
|
|
142
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
143
|
+
|
|
144
|
+
# [1.0.0-beta.80](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.79...v1.0.0-beta.80) (2024-09-28)
|
|
145
|
+
|
|
146
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
147
|
+
|
|
148
|
+
# [1.0.0-beta.79](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.78...v1.0.0-beta.79) (2024-09-28)
|
|
149
|
+
|
|
150
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
151
|
+
|
|
152
|
+
# [1.0.0-beta.78](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.77...v1.0.0-beta.78) (2024-09-27)
|
|
153
|
+
|
|
154
|
+
### Bug Fixes
|
|
155
|
+
|
|
156
|
+
- flaky test ([8098714](https://github.com/sciactive/nymphjs/commit/8098714026c92c9b97917a766b0f9453b0804699))
|
|
157
|
+
|
|
158
|
+
# [1.0.0-beta.77](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.76...v1.0.0-beta.77) (2024-09-26)
|
|
159
|
+
|
|
160
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
161
|
+
|
|
162
|
+
# [1.0.0-beta.76](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.75...v1.0.0-beta.76) (2024-09-25)
|
|
163
|
+
|
|
164
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
165
|
+
|
|
166
|
+
# [1.0.0-beta.75](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.74...v1.0.0-beta.75) (2024-09-24)
|
|
167
|
+
|
|
168
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
169
|
+
|
|
170
|
+
# [1.0.0-beta.74](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.73...v1.0.0-beta.74) (2024-09-21)
|
|
171
|
+
|
|
172
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
173
|
+
|
|
174
|
+
# [1.0.0-beta.73](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.72...v1.0.0-beta.73) (2024-09-20)
|
|
175
|
+
|
|
176
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
177
|
+
|
|
178
|
+
# [1.0.0-beta.72](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.71...v1.0.0-beta.72) (2024-09-20)
|
|
179
|
+
|
|
180
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
181
|
+
|
|
182
|
+
# [1.0.0-beta.71](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.70...v1.0.0-beta.71) (2024-09-20)
|
|
183
|
+
|
|
184
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
185
|
+
|
|
186
|
+
# [1.0.0-beta.70](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.69...v1.0.0-beta.70) (2024-09-20)
|
|
187
|
+
|
|
188
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
189
|
+
|
|
190
|
+
# [1.0.0-beta.69](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.68...v1.0.0-beta.69) (2024-09-19)
|
|
191
|
+
|
|
192
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
193
|
+
|
|
194
|
+
# [1.0.0-beta.68](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.67...v1.0.0-beta.68) (2024-09-19)
|
|
195
|
+
|
|
196
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
197
|
+
|
|
198
|
+
# [1.0.0-beta.67](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.66...v1.0.0-beta.67) (2024-09-03)
|
|
199
|
+
|
|
200
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
201
|
+
|
|
202
|
+
# [1.0.0-beta.66](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.65...v1.0.0-beta.66) (2024-08-06)
|
|
203
|
+
|
|
204
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
205
|
+
|
|
206
|
+
# [1.0.0-beta.65](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.64...v1.0.0-beta.65) (2024-08-05)
|
|
207
|
+
|
|
208
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
209
|
+
|
|
210
|
+
# [1.0.0-beta.64](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.63...v1.0.0-beta.64) (2024-08-04)
|
|
211
|
+
|
|
212
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
213
|
+
|
|
214
|
+
# [1.0.0-beta.63](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.62...v1.0.0-beta.63) (2024-06-18)
|
|
215
|
+
|
|
216
|
+
### Bug Fixes
|
|
217
|
+
|
|
218
|
+
- undo ts compilation to module change ([84be6d4](https://github.com/sciactive/nymphjs/commit/84be6d434be29f8afd53907d15be2eb77d1736ce))
|
|
219
|
+
|
|
220
|
+
### Features
|
|
221
|
+
|
|
222
|
+
- export data iterator ([b86aa19](https://github.com/sciactive/nymphjs/commit/b86aa19fc77d744b5a683046dfb697fc4746df5c))
|
|
223
|
+
|
|
224
|
+
# [1.0.0-beta.62](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.61...v1.0.0-beta.62) (2024-06-15)
|
|
225
|
+
|
|
226
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
227
|
+
|
|
228
|
+
# [1.0.0-beta.61](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.60...v1.0.0-beta.61) (2024-06-14)
|
|
229
|
+
|
|
230
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
231
|
+
|
|
232
|
+
# [1.0.0-beta.60](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.59...v1.0.0-beta.60) (2024-06-14)
|
|
233
|
+
|
|
234
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
235
|
+
|
|
236
|
+
# [1.0.0-beta.59](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.58...v1.0.0-beta.59) (2024-06-14)
|
|
237
|
+
|
|
238
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
239
|
+
|
|
240
|
+
# [1.0.0-beta.58](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.57...v1.0.0-beta.58) (2024-06-12)
|
|
241
|
+
|
|
242
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
243
|
+
|
|
244
|
+
# [1.0.0-beta.57](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.56...v1.0.0-beta.57) (2024-06-12)
|
|
245
|
+
|
|
246
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
247
|
+
|
|
248
|
+
# [1.0.0-beta.56](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.55...v1.0.0-beta.56) (2024-06-11)
|
|
249
|
+
|
|
250
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
251
|
+
|
|
252
|
+
# [1.0.0-beta.55](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.54...v1.0.0-beta.55) (2024-05-26)
|
|
253
|
+
|
|
254
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
255
|
+
|
|
256
|
+
# [1.0.0-beta.54](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.53...v1.0.0-beta.54) (2024-05-26)
|
|
257
|
+
|
|
258
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
259
|
+
|
|
260
|
+
# [1.0.0-beta.53](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.52...v1.0.0-beta.53) (2024-05-26)
|
|
261
|
+
|
|
262
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
263
|
+
|
|
264
|
+
# [1.0.0-beta.52](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.51...v1.0.0-beta.52) (2024-05-25)
|
|
265
|
+
|
|
266
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
267
|
+
|
|
268
|
+
# [1.0.0-beta.51](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2024-04-12)
|
|
269
|
+
|
|
270
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
271
|
+
|
|
272
|
+
# [1.0.0-beta.50](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2024-04-08)
|
|
273
|
+
|
|
274
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
275
|
+
|
|
276
|
+
# [1.0.0-beta.49](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2024-03-04)
|
|
277
|
+
|
|
278
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
279
|
+
|
|
280
|
+
# [1.0.0-beta.48](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2023-11-10)
|
|
281
|
+
|
|
282
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
283
|
+
|
|
284
|
+
# [1.0.0-beta.47](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2023-11-10)
|
|
285
|
+
|
|
286
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
287
|
+
|
|
288
|
+
# [1.0.0-beta.46](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2023-08-29)
|
|
289
|
+
|
|
290
|
+
### Bug Fixes
|
|
291
|
+
|
|
292
|
+
- make the name even much more correct this time ([8d0b381](https://github.com/sciactive/nymphjs/commit/8d0b3817925ce9b1de21d2f9248f6cdec0f7d3f0))
|
|
293
|
+
|
|
294
|
+
# [1.0.0-beta.45](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2023-07-17)
|
|
295
|
+
|
|
296
|
+
### Bug Fixes
|
|
297
|
+
|
|
298
|
+
- missing pubsub updates when new top level match uses qref with multiple results ([6dc26e2](https://github.com/sciactive/nymphjs/commit/6dc26e280453794ea9ce6c2b77482f85eb62bd23))
|
|
299
|
+
|
|
300
|
+
# [1.0.0-beta.44](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2023-07-13)
|
|
301
|
+
|
|
302
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
303
|
+
|
|
304
|
+
# [1.0.0-beta.43](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2023-07-12)
|
|
305
|
+
|
|
306
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
307
|
+
|
|
308
|
+
# [1.0.0-beta.42](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2023-07-12)
|
|
309
|
+
|
|
310
|
+
### Features
|
|
311
|
+
|
|
312
|
+
- make fillSession async so that gatekeeper can be sync ([fb6def4](https://github.com/sciactive/nymphjs/commit/fb6def45cd031516c9bcd3438f905e2ff881707b))
|
|
313
|
+
|
|
314
|
+
# [1.0.0-beta.41](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2023-07-12)
|
|
315
|
+
|
|
316
|
+
### Features
|
|
317
|
+
|
|
318
|
+
- remove synchronous database queries ([b579fb2](https://github.com/sciactive/nymphjs/commit/b579fb2eacd96cdd1b386a62c5c00cdbb2438f6e))
|
|
319
|
+
|
|
320
|
+
# [1.0.0-beta.40](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2023-07-10)
|
|
321
|
+
|
|
322
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
323
|
+
|
|
324
|
+
# [1.0.0-beta.39](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2023-07-09)
|
|
325
|
+
|
|
326
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
327
|
+
|
|
328
|
+
# [1.0.0-beta.38](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2023-07-09)
|
|
329
|
+
|
|
330
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
331
|
+
|
|
332
|
+
# [1.0.0-beta.37](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2023-07-09)
|
|
333
|
+
|
|
334
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
335
|
+
|
|
336
|
+
# [1.0.0-beta.36](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2023-07-09)
|
|
337
|
+
|
|
338
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
339
|
+
|
|
340
|
+
# [1.0.0-beta.35](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2023-06-14)
|
|
341
|
+
|
|
342
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
343
|
+
|
|
344
|
+
# [1.0.0-beta.34](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2023-05-13)
|
|
345
|
+
|
|
346
|
+
### Bug Fixes
|
|
347
|
+
|
|
348
|
+
- subscribeWith making guid null ([dbb38d4](https://github.com/sciactive/nymphjs/commit/dbb38d424f2395bbfa01ab4a0663dcaebf0c7aa7))
|
|
349
|
+
|
|
350
|
+
# [1.0.0-beta.33](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2023-05-13)
|
|
351
|
+
|
|
352
|
+
### Bug Fixes
|
|
353
|
+
|
|
354
|
+
- don't send initial entities for qref subscriptions ([b07ed5c](https://github.com/sciactive/nymphjs/commit/b07ed5cb0404aa85dd58dc951261a2b4e3d2bcbf))
|
|
355
|
+
|
|
356
|
+
# [1.0.0-beta.32](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2023-05-13)
|
|
357
|
+
|
|
358
|
+
### Features
|
|
359
|
+
|
|
360
|
+
- issue initial request with pubsub instead of rest on subscribe ([8a232d2](https://github.com/sciactive/nymphjs/commit/8a232d2faeb8622924f9c35a01a8f71a70659bb3))
|
|
361
|
+
|
|
362
|
+
# [1.0.0-beta.31](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2023-05-12)
|
|
363
|
+
|
|
364
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
365
|
+
|
|
366
|
+
# [1.0.0-beta.30](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2023-05-12)
|
|
367
|
+
|
|
368
|
+
### Features
|
|
369
|
+
|
|
370
|
+
- allow providing getEntityClass with a class instead of string ([ecd64c1](https://github.com/sciactive/nymphjs/commit/ecd64c1bf92e3657889613b76bcc46652f371ead))
|
|
371
|
+
|
|
372
|
+
# [1.0.0-beta.29](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2023-05-08)
|
|
373
|
+
|
|
374
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
375
|
+
|
|
376
|
+
# [1.0.0-beta.28](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2023-05-05)
|
|
377
|
+
|
|
378
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
379
|
+
|
|
380
|
+
# [1.0.0-beta.27](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2023-05-04)
|
|
381
|
+
|
|
382
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
383
|
+
|
|
384
|
+
# [1.0.0-beta.26](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2023-05-04)
|
|
385
|
+
|
|
386
|
+
### Bug Fixes
|
|
387
|
+
|
|
388
|
+
- broken pubsub test ([99de0e4](https://github.com/sciactive/nymphjs/commit/99de0e4e7a79420bae1c5df5fb8fcbfafe894ace))
|
|
389
|
+
|
|
390
|
+
# [1.0.0-beta.25](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2023-05-04)
|
|
391
|
+
|
|
392
|
+
### Features
|
|
393
|
+
|
|
394
|
+
- 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)
|
|
395
|
+
|
|
396
|
+
# [1.0.0-beta.24](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2023-05-02)
|
|
397
|
+
|
|
398
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
399
|
+
|
|
400
|
+
# [1.0.0-beta.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2023-05-02)
|
|
401
|
+
|
|
402
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
403
|
+
|
|
404
|
+
# [1.0.0-beta.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2023-05-01)
|
|
405
|
+
|
|
406
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
407
|
+
|
|
408
|
+
# [1.0.0-beta.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2023-05-01)
|
|
409
|
+
|
|
410
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
411
|
+
|
|
412
|
+
# [1.0.0-beta.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2023-04-30)
|
|
413
|
+
|
|
414
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
415
|
+
|
|
416
|
+
# [1.0.0-beta.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2023-04-29)
|
|
417
|
+
|
|
418
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
419
|
+
|
|
420
|
+
# [1.0.0-beta.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2023-04-27)
|
|
421
|
+
|
|
422
|
+
### Bug Fixes
|
|
423
|
+
|
|
424
|
+
- small type issues ([b91579c](https://github.com/sciactive/nymphjs/commit/b91579c9c1e96500d903332648f5a93c9a7e7d9b))
|
|
425
|
+
|
|
426
|
+
### Features
|
|
427
|
+
|
|
428
|
+
- add the ability to switch to a user without their password ([ca4466a](https://github.com/sciactive/nymphjs/commit/ca4466af1704d68905ac087350a8cf151c1072d9))
|
|
429
|
+
|
|
430
|
+
# [1.0.0-beta.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-04-24)
|
|
431
|
+
|
|
432
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
433
|
+
|
|
434
|
+
# [1.0.0-beta.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2023-03-31)
|
|
435
|
+
|
|
436
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
437
|
+
|
|
438
|
+
# [1.0.0-beta.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-23)
|
|
439
|
+
|
|
440
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
441
|
+
|
|
442
|
+
# [1.0.0-beta.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-17)
|
|
443
|
+
|
|
444
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
445
|
+
|
|
446
|
+
# [1.0.0-beta.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-16)
|
|
447
|
+
|
|
448
|
+
### Bug Fixes
|
|
449
|
+
|
|
450
|
+
- pubsub publishing changes before transaction is finished ([a918cc1](https://github.com/sciactive/nymphjs/commit/a918cc1451e03015ecce20f1c9bf6ceb62b7dff1))
|
|
451
|
+
|
|
452
|
+
# [1.0.0-beta.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2023-03-04)
|
|
453
|
+
|
|
454
|
+
**Note:** Version bump only for package @nymphjs/pubsub
|
|
455
|
+
|
|
6
456
|
# [1.0.0-beta.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2023-02-27)
|
|
7
457
|
|
|
8
458
|
**Note:** Version bump only for package @nymphjs/pubsub
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ const nymph = new Nymph(
|
|
|
27
27
|
{},
|
|
28
28
|
new SQLite3Driver({
|
|
29
29
|
filename: ':memory:', // Put the correct driver/config here.
|
|
30
|
-
})
|
|
30
|
+
}),
|
|
31
31
|
);
|
|
32
32
|
PubSub.initPublisher(pubSubConfig, nymph);
|
|
33
33
|
```
|
|
@@ -51,7 +51,7 @@ const nymph = new Nymph(
|
|
|
51
51
|
{},
|
|
52
52
|
new SQLite3Driver({
|
|
53
53
|
filename: ':memory:', // Put the correct driver/config here.
|
|
54
|
-
})
|
|
54
|
+
}),
|
|
55
55
|
);
|
|
56
56
|
// Don't forget to do this; even here!
|
|
57
57
|
PubSub.initPublisher(pubSubConfig, nymph);
|
|
@@ -62,8 +62,8 @@ const pubsub = createServer(8080, pubSubConfig, nymph);
|
|
|
62
62
|
If you need to provide custom handling in your server (like TLS), you can use the PubSub class directly and provide it a WebSocket server instance.
|
|
63
63
|
|
|
64
64
|
```ts
|
|
65
|
-
import http from 'http';
|
|
66
|
-
import
|
|
65
|
+
import http from 'node:http';
|
|
66
|
+
import ws from 'websocket';
|
|
67
67
|
import SQLite3Driver from '@nymphjs/driver-sqlite3';
|
|
68
68
|
import { Nymph } from '@nymphjs/nymph';
|
|
69
69
|
import { PubSub } from '@nymphjs/pubsub';
|
|
@@ -81,7 +81,7 @@ const nymph = new Nymph(
|
|
|
81
81
|
{},
|
|
82
82
|
new SQLite3Driver({
|
|
83
83
|
filename: ':memory:', // Put the correct driver/config here.
|
|
84
|
-
})
|
|
84
|
+
}),
|
|
85
85
|
);
|
|
86
86
|
// Don't forget to do this; even here!
|
|
87
87
|
PubSub.initPublisher(pubSubConfig, nymph);
|
|
@@ -95,10 +95,10 @@ const server = http.createServer((_request, response) => {
|
|
|
95
95
|
const listener = server.listen(port, () => {
|
|
96
96
|
console.log(
|
|
97
97
|
new Date().toISOString(),
|
|
98
|
-
`Nymph-PubSub server started listening on port ${port}
|
|
98
|
+
`Nymph-PubSub server started listening on port ${port}.`,
|
|
99
99
|
);
|
|
100
100
|
});
|
|
101
|
-
const wsServer = new
|
|
101
|
+
const wsServer = new ws.server({
|
|
102
102
|
httpServer: listener,
|
|
103
103
|
// You should not use autoAcceptConnections for production
|
|
104
104
|
// applications, as it defeats all standard cross-origin protection
|
|
@@ -117,7 +117,7 @@ See the [config declaration file](src/conf/d.ts).
|
|
|
117
117
|
|
|
118
118
|
# License
|
|
119
119
|
|
|
120
|
-
Copyright 2021 SciActive Inc
|
|
120
|
+
Copyright 2021-2025 SciActive Inc
|
|
121
121
|
|
|
122
122
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
123
123
|
you may not use this file except in compliance with the License.
|
package/dist/PubSub.d.ts
CHANGED
|
@@ -1,39 +1,104 @@
|
|
|
1
1
|
import { Nymph } from '@nymphjs/nymph';
|
|
2
|
-
import
|
|
3
|
-
import { Config } from './conf';
|
|
4
|
-
import type { QuerySubscriptionData } from './PubSub.types';
|
|
2
|
+
import ws from 'websocket';
|
|
3
|
+
import { Config } from './conf/index.js';
|
|
4
|
+
import type { QuerySubscriptionData } from './PubSub.types.js';
|
|
5
|
+
/**
|
|
6
|
+
* A publish/subscribe server for Nymph.
|
|
7
|
+
*
|
|
8
|
+
* Written by Hunter Perrin for SciActive.
|
|
9
|
+
*
|
|
10
|
+
* @author Hunter Perrin <hperrin@gmail.com>
|
|
11
|
+
* @copyright SciActive Inc
|
|
12
|
+
* @see http://nymph.io/
|
|
13
|
+
*/
|
|
5
14
|
export default class PubSub {
|
|
15
|
+
/**
|
|
16
|
+
* The Nymph instance.
|
|
17
|
+
*/
|
|
6
18
|
nymph: Nymph;
|
|
19
|
+
/**
|
|
20
|
+
* The PubSub config.
|
|
21
|
+
*/
|
|
7
22
|
config: Config;
|
|
8
|
-
|
|
23
|
+
/**
|
|
24
|
+
* The WebSocket server.
|
|
25
|
+
*/
|
|
26
|
+
server: ws.server;
|
|
9
27
|
private sessions;
|
|
10
28
|
protected querySubs: {
|
|
11
29
|
[etype: string]: {
|
|
12
|
-
[query: string]: Map<connection, QuerySubscriptionData>;
|
|
30
|
+
[query: string]: Map<ws.connection, QuerySubscriptionData>;
|
|
13
31
|
};
|
|
14
32
|
};
|
|
15
33
|
protected uidSubs: {
|
|
16
|
-
[uidName: string]: Map<connection, {
|
|
34
|
+
[uidName: string]: Map<ws.connection, {
|
|
17
35
|
count: boolean;
|
|
18
36
|
}>;
|
|
19
37
|
};
|
|
20
|
-
static
|
|
38
|
+
protected static transactionPublishes: {
|
|
39
|
+
nymph: Nymph;
|
|
40
|
+
payload: string;
|
|
41
|
+
config: Config;
|
|
42
|
+
}[];
|
|
43
|
+
static initPublisher(config: Partial<Config>, nymph: Nymph): () => void;
|
|
21
44
|
private static publish;
|
|
22
|
-
|
|
45
|
+
private static isOrIsDescendant;
|
|
46
|
+
private static publishTransactionPublishes;
|
|
47
|
+
private static removeTransactionPublishes;
|
|
48
|
+
/**
|
|
49
|
+
* Initialize Nymph PubSub.
|
|
50
|
+
*
|
|
51
|
+
* @param config The PubSub configuration.
|
|
52
|
+
*/
|
|
53
|
+
constructor(config: Partial<Config>, nymph: Nymph, server: ws.server);
|
|
23
54
|
close(): void;
|
|
24
|
-
handleRequest(request: request): void;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
55
|
+
handleRequest(request: ws.request): void;
|
|
56
|
+
/**
|
|
57
|
+
* Handle a message from a client.
|
|
58
|
+
*/
|
|
59
|
+
onMessage(from: ws.connection, msg: ws.Message): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Clean up after users who leave.
|
|
62
|
+
*/
|
|
63
|
+
onClose(conn: ws.connection, description: string): void;
|
|
64
|
+
onError(conn: ws.connection, e: Error): void;
|
|
65
|
+
/**
|
|
66
|
+
* Handle an authentication from a client.
|
|
67
|
+
*/
|
|
28
68
|
private handleAuthentication;
|
|
69
|
+
/**
|
|
70
|
+
* Handle a subscribe or unsubscribe from a client.
|
|
71
|
+
*/
|
|
29
72
|
private handleSubscription;
|
|
73
|
+
/**
|
|
74
|
+
* Handle a subscribe or unsubscribe for a query from a client.
|
|
75
|
+
*/
|
|
30
76
|
private handleSubscriptionQuery;
|
|
77
|
+
/**
|
|
78
|
+
* Handle a subscribe or unsubscribe for a UID from a client.
|
|
79
|
+
*/
|
|
31
80
|
private handleSubscriptionUid;
|
|
81
|
+
/**
|
|
82
|
+
* Handle a publish from a client.
|
|
83
|
+
*/
|
|
32
84
|
private handlePublish;
|
|
85
|
+
/**
|
|
86
|
+
* Handle an entity publish from a client.
|
|
87
|
+
*/
|
|
33
88
|
private handlePublishEntity;
|
|
34
89
|
private updateClient;
|
|
90
|
+
/**
|
|
91
|
+
* Handle a UID publish from a client.
|
|
92
|
+
*/
|
|
35
93
|
private handlePublishUid;
|
|
94
|
+
/**
|
|
95
|
+
* Relay publish data to other servers.
|
|
96
|
+
*/
|
|
36
97
|
private relay;
|
|
37
98
|
private findQRefQueries;
|
|
99
|
+
/**
|
|
100
|
+
* This translates qref selectors into ref selectors using the "current" GUID
|
|
101
|
+
* list in the existing subscriptions.
|
|
102
|
+
*/
|
|
38
103
|
private translateQRefSelectors;
|
|
39
104
|
}
|