@toa.io/storages.mongodb 1.0.0-alpha.33 → 1.0.0-alpha.331

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 ADDED
@@ -0,0 +1,365 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [1.0.0-alpha.331](https://github.com/toa-io/toa/compare/v1.0.0-alpha.330...v1.0.0-alpha.331) (2026-10-16)
7
+
8
+ **Note:** Version bump only for package @toa.io/storages.mongodb
9
+
10
+
11
+
12
+
13
+
14
+ # [1.0.0-alpha.330](https://github.com/toa-io/toa/compare/v1.0.0-alpha.329...v1.0.0-alpha.330) (2026-10-15)
15
+
16
+ **Note:** Version bump only for package @toa.io/storages.mongodb
17
+
18
+
19
+
20
+
21
+
22
+ # [1.0.0-alpha.329](https://github.com/toa-io/toa/compare/v1.0.0-alpha.328...v1.0.0-alpha.329) (2026-10-11)
23
+
24
+ **Note:** Version bump only for package @toa.io/storages.mongodb
25
+
26
+
27
+
28
+
29
+
30
+ # [1.0.0-alpha.328](https://github.com/toa-io/toa/compare/v1.0.0-alpha.327...v1.0.0-alpha.328) (2026-10-10)
31
+
32
+ **Note:** Version bump only for package @toa.io/storages.mongodb
33
+
34
+
35
+
36
+
37
+
38
+ # [1.0.0-alpha.327](https://github.com/toa-io/toa/compare/v1.0.0-alpha.326...v1.0.0-alpha.327) (2026-10-10)
39
+
40
+ ### Bug Fixes
41
+
42
+ * **storages.mongodb:** pass a deleted record by when an effect gets or creates ([0cea640](https://github.com/toa-io/toa/commit/0cea6405021c8230e9b68a0f3086ff610332b34d))
43
+
44
+
45
+ # [1.0.0-alpha.326](https://github.com/toa-io/toa/compare/v1.0.0-alpha.325...v1.0.0-alpha.326) (2026-10-06)
46
+
47
+ ### Features
48
+
49
+ * **core:** parse criteria with [@toa](https://github.com/toa).io/rsql ([c4dc9f4](https://github.com/toa-io/toa/commit/c4dc9f41ca2719ac66607c5b14e9ead678baa740))
50
+
51
+
52
+ # [1.0.0-alpha.325](https://github.com/toa-io/toa/compare/v1.0.0-alpha.324...v1.0.0-alpha.325) (2026-10-02)
53
+
54
+ ### Bug Fixes
55
+
56
+ * **storages.mongodb:** kill the cursor of a stream's position whatever type its id comes as ([71c799e](https://github.com/toa-io/toa/commit/71c799ec3694a41cc32890d9e21bb42573b96395))
57
+
58
+
59
+ # [1.0.0-alpha.324](https://github.com/toa-io/toa/compare/v1.0.0-alpha.323...v1.0.0-alpha.324) (2026-10-02)
60
+
61
+ **Note:** Version bump only for package @toa.io/storages.mongodb
62
+
63
+
64
+
65
+
66
+
67
+ # [1.0.0-alpha.323](https://github.com/toa-io/toa/compare/v1.0.0-alpha.322...v1.0.0-alpha.323) (2026-10-01)
68
+
69
+ ### Bug Fixes
70
+
71
+ * **storages.mongodb:** store the moments an assignment sets as dates ([240102d](https://github.com/toa-io/toa/commit/240102db5b218e0b0a3a7b097c77852e749e76ef))
72
+
73
+
74
+ # [1.0.0-alpha.322](https://github.com/toa-io/toa/compare/v1.0.0-alpha.321...v1.0.0-alpha.322) (2026-09-29)
75
+
76
+ **Note:** Version bump only for package @toa.io/storages.mongodb
77
+
78
+
79
+
80
+
81
+
82
+ # [1.0.0-alpha.321](https://github.com/toa-io/toa/compare/v1.0.0-alpha.320...v1.0.0-alpha.321) (2026-09-28)
83
+
84
+ ### Bug Fixes
85
+
86
+ * **storages.mongodb:** commit a set of entries all or nothing ([dafecf0](https://github.com/toa-io/toa/commit/dafecf096bac99c4aca5b697a0d7d9f6f6d82daf))
87
+
88
+
89
+ # [1.0.0-alpha.320](https://github.com/toa-io/toa/compare/v1.0.0-alpha.319...v1.0.0-alpha.320) (2026-09-28)
90
+
91
+ ### Features
92
+
93
+ * page a stream by CREATED, and stop it after its first page ([038dc52](https://github.com/toa-io/toa/commit/038dc52f2db1a4dd58c6ec58a00de8914b3d38a3))
94
+
95
+
96
+ # [1.0.0-alpha.319](https://github.com/toa-io/toa/compare/v1.0.0-alpha.318...v1.0.0-alpha.319) (2026-09-27)
97
+
98
+ ### Features
99
+
100
+ * **storages.mongodb:** read a set and its changes from a token ([d0a8955](https://github.com/toa-io/toa/commit/d0a8955683b7566e704f7e9cde69f67272c7be1b))
101
+
102
+
103
+ # [1.0.0-alpha.318](https://github.com/toa-io/toa/compare/v1.0.0-alpha.317...v1.0.0-alpha.318) (2026-09-23)
104
+
105
+ **Note:** Version bump only for package @toa.io/storages.mongodb
106
+
107
+
108
+
109
+
110
+
111
+ # [1.0.0-alpha.317](https://github.com/toa-io/toa/compare/v1.0.0-alpha.316...v1.0.0-alpha.317) (2026-09-23)
112
+
113
+ **Note:** Version bump only for package @toa.io/storages.mongodb
114
+
115
+
116
+
117
+
118
+
119
+ # [1.0.0-alpha.316](https://github.com/toa-io/toa/compare/v1.0.0-alpha.315...v1.0.0-alpha.316) (2026-09-23)
120
+
121
+ **Note:** Version bump only for package @toa.io/storages.mongodb
122
+
123
+
124
+
125
+
126
+
127
+ # [1.0.0-alpha.315](https://github.com/toa-io/toa/compare/v1.0.0-alpha.314...v1.0.0-alpha.315) (2026-09-23)
128
+
129
+ **Note:** Version bump only for package @toa.io/storages.mongodb
130
+
131
+
132
+
133
+
134
+
135
+ # [1.0.0-alpha.314](https://github.com/toa-io/toa/compare/v1.0.0-alpha.313...v1.0.0-alpha.314) (2026-09-19)
136
+
137
+ * feat(core)!: let an operation state how long its calls are remembered ([af177c2](https://github.com/toa-io/toa/commit/af177c2ab3d00d475840b5ef9e612f04e82b72bd))
138
+
139
+ ### BREAKING CHANGES
140
+
141
+ * `inbox.retention` under 600 is refused. See
142
+ migrations/313.md.
143
+
144
+
145
+ # [1.0.0-alpha.313](https://github.com/toa-io/toa/compare/v1.0.0-alpha.312...v1.0.0-alpha.313) (2026-09-18)
146
+
147
+ **Note:** Version bump only for package @toa.io/storages.mongodb
148
+
149
+
150
+
151
+
152
+
153
+ # [1.0.0-alpha.312](https://github.com/toa-io/toa/compare/v1.0.0-alpha.311...v1.0.0-alpha.312) (2026-09-18)
154
+
155
+ **Note:** Version bump only for package @toa.io/storages.mongodb
156
+
157
+
158
+
159
+
160
+
161
+ # [1.0.0-alpha.311](https://github.com/toa-io/toa/compare/v1.0.0-alpha.310...v1.0.0-alpha.311) (2026-09-17)
162
+
163
+ ### Features
164
+
165
+ * name the database after the scope ([4d7203f](https://github.com/toa-io/toa/commit/4d7203fd18828895272a9dae76e351d92b49277f))
166
+
167
+
168
+ # [1.0.0-alpha.310](https://github.com/toa-io/toa/compare/v1.0.0-alpha.309...v1.0.0-alpha.310) (2026-09-16)
169
+
170
+ **Note:** Version bump only for package @toa.io/storages.mongodb
171
+
172
+
173
+
174
+
175
+
176
+ # [1.0.0-alpha.309](https://github.com/toa-io/toa/compare/v1.0.0-alpha.308...v1.0.0-alpha.309) (2026-09-16)
177
+
178
+ **Note:** Version bump only for package @toa.io/storages.mongodb
179
+
180
+
181
+
182
+
183
+
184
+ # [1.0.0-alpha.308](https://github.com/toa-io/toa/compare/v1.0.0-alpha.307...v1.0.0-alpha.308) (2026-09-15)
185
+
186
+ **Note:** Version bump only for package @toa.io/storages.mongodb
187
+
188
+
189
+
190
+
191
+
192
+ # [1.0.0-alpha.307](https://github.com/toa-io/toa/compare/v1.0.0-alpha.306...v1.0.0-alpha.307) (2026-09-15)
193
+
194
+ **Note:** Version bump only for package @toa.io/storages.mongodb
195
+
196
+
197
+
198
+
199
+
200
+ # [1.0.0-alpha.306](https://github.com/toa-io/toa/compare/v1.0.0-alpha.305...v1.0.0-alpha.306) (2026-09-14)
201
+
202
+ **Note:** Version bump only for package @toa.io/storages.mongodb
203
+
204
+
205
+
206
+
207
+
208
+ # [1.0.0-alpha.305](https://github.com/toa-io/toa/compare/v1.0.0-alpha.304...v1.0.0-alpha.305) (2026-09-13)
209
+
210
+ **Note:** Version bump only for package @toa.io/storages.mongodb
211
+
212
+
213
+
214
+
215
+
216
+ # [1.0.0-alpha.304](https://github.com/toa-io/toa/compare/v1.0.0-alpha.303...v1.0.0-alpha.304) (2026-09-13)
217
+
218
+ **Note:** Version bump only for package @toa.io/storages.mongodb
219
+
220
+
221
+
222
+
223
+
224
+ # [1.0.0-alpha.303](https://github.com/toa-io/toa/compare/v1.0.0-alpha.302...v1.0.0-alpha.303) (2026-09-12)
225
+
226
+ ### Features
227
+
228
+ * **metrics:** measure storage, stash, blob storages and fetch ([252298b](https://github.com/toa-io/toa/commit/252298bb9f34421694da4ee89742d62b47c39dfb))
229
+
230
+ ### Performance Improvements
231
+
232
+ * **storages.mongodb:** rename a record's _id to id in place ([4aeb2a1](https://github.com/toa-io/toa/commit/4aeb2a1d61f7f2b0ddab203b5887152e8917ef7f))
233
+
234
+
235
+ # [1.0.0-alpha.302](https://github.com/toa-io/toa/compare/v1.0.0-alpha.301...v1.0.0-alpha.302) (2026-09-11)
236
+
237
+ **Note:** Version bump only for package @toa.io/storages.mongodb
238
+
239
+
240
+
241
+
242
+
243
+ # [1.0.0-alpha.301](https://github.com/toa-io/toa/compare/v1.0.0-alpha.300...v1.0.0-alpha.301) (2026-09-11)
244
+
245
+ **Note:** Version bump only for package @toa.io/storages.mongodb
246
+
247
+
248
+
249
+
250
+
251
+ # [1.0.0-alpha.300](https://github.com/toa-io/toa/compare/v1.0.0-alpha.299...v1.0.0-alpha.300) (2026-09-11)
252
+
253
+ * feat(core)!: an operation may ask to run once ([dca616c](https://github.com/toa-io/toa/commit/dca616cb380a7a389e277875d3bd5ca55a6e4d45))
254
+
255
+ ### Bug Fixes
256
+
257
+ * **extensions:** what a factory remembers does not outlive the tree it was made for ([dd36631](https://github.com/toa-io/toa/commit/dd3663160f500eadfb701bf840ef3741a2d075f0))
258
+
259
+ ### Features
260
+
261
+ * **core:** an assignment may ask to run once as well ([10fbcbd](https://github.com/toa-io/toa/commit/10fbcbd86a5e82960e65f62c09d0a465ae8d0353))
262
+
263
+ ### BREAKING CHANGES
264
+
265
+ * `Storage.store`, `.upsert` and `.ensure` take one more
266
+ argument, and `Storage` has two more members. A connector that ignores them
267
+ works exactly as it did; a component that asks it for `once` is refused at
268
+ boot. See migrations/299.md.
269
+
270
+
271
+ # [1.0.0-alpha.299](https://github.com/toa-io/toa/compare/v1.0.0-alpha.298...v1.0.0-alpha.299) (2026-09-10)
272
+
273
+ ### Features
274
+
275
+ * **core:** a record carries the region that wrote it ([13ed187](https://github.com/toa-io/toa/commit/13ed187604f06dec66feec2e26ccf9dae30bb048))
276
+ * **core:** an outbox row is published to destinations ([cfb77b4](https://github.com/toa-io/toa/commit/cfb77b4826ff0f9560769a0996981e143d6525af))
277
+
278
+
279
+ # [1.0.0-alpha.298](https://github.com/toa-io/toa/compare/v1.0.0-alpha.297...v1.0.0-alpha.298) (2026-09-08)
280
+
281
+ **Note:** Version bump only for package @toa.io/storages.mongodb
282
+
283
+
284
+
285
+
286
+
287
+ # [1.0.0-alpha.297](https://github.com/toa-io/toa/compare/v1.0.0-alpha.296...v1.0.0-alpha.297) (2026-09-08)
288
+
289
+ **Note:** Version bump only for package @toa.io/storages.mongodb
290
+
291
+
292
+
293
+
294
+
295
+ # [1.0.0-alpha.296](https://github.com/toa-io/toa/compare/v1.0.0-alpha.295...v1.0.0-alpha.296) (2026-09-08)
296
+
297
+ **Note:** Version bump only for package @toa.io/storages.mongodb
298
+
299
+
300
+
301
+
302
+
303
+ # [1.0.0-alpha.295](https://github.com/toa-io/toa/compare/v1.0.0-alpha.294...v1.0.0-alpha.295) (2026-09-07)
304
+
305
+ **Note:** Version bump only for package @toa.io/storages.mongodb
306
+
307
+
308
+
309
+
310
+
311
+ # [1.0.0-alpha.294](https://github.com/toa-io/toa/compare/v1.0.0-alpha.293...v1.0.0-alpha.294) (2026-09-07)
312
+
313
+ **Note:** Version bump only for package @toa.io/storages.mongodb
314
+
315
+
316
+
317
+
318
+
319
+ # [1.0.0-alpha.293](https://github.com/toa-io/toa/compare/v1.0.0-alpha.292...v1.0.0-alpha.293) (2026-09-07)
320
+
321
+ **Note:** Version bump only for package @toa.io/storages.mongodb
322
+
323
+
324
+
325
+
326
+
327
+ # [1.0.0-alpha.292](https://github.com/toa-io/toa/compare/v1.0.0-alpha.291...v1.0.0-alpha.292) (2026-09-07)
328
+
329
+ ### Features
330
+
331
+ * **definitions:** what a package declares is read from one package ([7052341](https://github.com/toa-io/toa/commit/70523411b5d9e2b204c999aa02365173f3bb518d))
332
+
333
+
334
+ # [1.0.0-alpha.291](https://github.com/toa-io/toa/compare/v1.0.0-alpha.290...v1.0.0-alpha.291) (2026-09-07)
335
+
336
+ **Note:** Version bump only for package @toa.io/storages.mongodb
337
+
338
+
339
+
340
+
341
+
342
+ # [1.0.0-alpha.289](https://github.com/toa-io/toa/compare/v1.0.0-alpha.288...v1.0.0-alpha.289) (2026-09-07)
343
+
344
+ * A deploy moves only what changed, and a component sees none of the runtime's environment (#1073) ([f38e3db](https://github.com/toa-io/toa/commit/f38e3db533f24db866c57bfa1ef294eff1eaf499)), closes [#1073](https://github.com/toa-io/toa/issues/1073) [#1064](https://github.com/toa-io/toa/issues/1064) [#1066](https://github.com/toa-io/toa/issues/1066) [#1067](https://github.com/toa-io/toa/issues/1067) [#1068](https://github.com/toa-io/toa/issues/1068) [#1069](https://github.com/toa-io/toa/issues/1069) [#1071](https://github.com/toa-io/toa/issues/1071) [#1070](https://github.com/toa-io/toa/issues/1070) [#1072](https://github.com/toa-io/toa/issues/1072)
345
+
346
+ ### BREAKING CHANGES
347
+
348
+ * a component that read `process.env.TOA_*` reads `context` instead;
349
+ `echo(input)` no longer substitutes from the environment; a bash operation sees no
350
+ `TOA_*`; images no longer set `USER node` — see migrations/289.md.
351
+
352
+
353
+ # [1.0.0-alpha.288](https://github.com/toa-io/toa/compare/v1.0.0-alpha.287...v1.0.0-alpha.288) (2026-09-06)
354
+
355
+ **Note:** Version bump only for package @toa.io/storages.mongodb
356
+
357
+
358
+
359
+
360
+
361
+ # [1.0.0-alpha.287](https://github.com/toa-io/toa/compare/v1.0.0-alpha.286...v1.0.0-alpha.287) (2026-09-06)
362
+
363
+ ### Features
364
+
365
+ * **mongodb:** a migration says what it is doing ([a917a81](https://github.com/toa-io/toa/commit/a917a81fdc94eb23fd73182c0edf891e6b2df843))
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@toa.io/storages.mongodb",
3
- "version": "1.0.0-alpha.33",
3
+ "version": "1.0.0-alpha.331",
4
+ "type": "module",
4
5
  "description": "Toa MongoDB Storage Connector",
5
6
  "author": "temich <tema.gurtovoy@gmail.com>",
6
7
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -19,13 +20,13 @@
19
20
  "test": "echo \"Error: run tests from root\" && exit 1"
20
21
  },
21
22
  "dependencies": {
22
- "@toa.io/console": "1.0.0-alpha.33",
23
- "@toa.io/conveyor": "1.0.0-alpha.33",
24
- "@toa.io/core": "1.0.0-alpha.33",
25
- "@toa.io/generic": "1.0.0-alpha.33",
26
- "@toa.io/pointer": "1.0.0-alpha.33",
27
- "mongodb": "6.3.0",
28
- "saslprep": "1.0.3"
23
+ "@toa.io/conveyor": "1.0.0-alpha.330",
24
+ "@toa.io/core": "1.0.0-alpha.330",
25
+ "@toa.io/definitions": "1.0.0-alpha.331",
26
+ "@toa.io/generic": "1.0.0-alpha.330",
27
+ "@toa.io/pointer": "1.0.0-alpha.330",
28
+ "mongodb": "7.7.0",
29
+ "openspan": "1.0.0-alpha.330"
29
30
  },
30
- "gitHead": "ef81cea49d8f8b3b248adaba62d4548bbeb39f80"
31
+ "gitHead": "e7020d160910ca4f0c2ff9040b3cbb4fca8ea41f"
31
32
  }
package/readme.md ADDED
@@ -0,0 +1,38 @@
1
+ # MongoDB Storage
2
+
3
+ ## Tracing
4
+
5
+ Commands are recorded as `client` spans within the trace of the current invocation.
6
+
7
+ Spans are named `{command} {collection}` and carry `db.*` attributes following the
8
+ [OpenTelemetry semantic conventions](https://opentelemetry.io/docs/specs/semconv/database/mongodb/):
9
+ `db.system`, `db.namespace`, `db.collection.name`, `db.operation.name`.
10
+
11
+ Commands executed outside of a sampled trace context (e.g. index management on startup)
12
+ and internal driver commands (`hello`, `ping`, authentication) are not recorded.
13
+
14
+ Monitoring is client-side only and does not affect the MongoDB server. Span recording
15
+ adds no waiting to the query path: exporting is buffered and happens in the background.
16
+
17
+ ## Stream tokens
18
+
19
+ A [stream](/documentation/collections.md) ends with a token of changes where two things hold:
20
+
21
+ - **MongoDB runs as a replica set**, which it does wherever there is an outbox.
22
+ - **The collection keeps images** of what a record was before each change, which is how a change
23
+ that takes an entry out of the collection is told from a change outside it. They cost a copy of every
24
+ changed record for as long as the oplog holds it, so a collection keeps them only by a
25
+ [migration](/documentation/component/declaration.md#migrations):
26
+
27
+ ```yaml
28
+ # migrations/0003-images.yaml
29
+ - images: true
30
+ ```
31
+
32
+ `- images: false` stops keeping them, and a token issued before is then refused with `410`.
33
+
34
+ A token lasts as long as the oplog of the replica set holds the point it names — its window, which
35
+ the size of the oplog and the rate of writes decide.
36
+
37
+ A read from a token scans the oplog from the point it names: it costs what the whole replica set
38
+ wrote since, whatever of it concerns the collection.