@signaldb/core 2.0.0-beta.5 → 2.0.0-beta.7

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 (104) hide show
  1. package/dist/.vite/manifest.json +118 -84
  2. package/dist/AsyncDataAdapter.d.ts +1 -1
  3. package/dist/index.cjs.js +33 -34
  4. package/dist/index.mjs +17 -35
  5. package/dist/index10.cjs.js +23 -0
  6. package/dist/index10.mjs +21 -17
  7. package/dist/index11.cjs.js +45 -0
  8. package/dist/index11.mjs +44 -15
  9. package/dist/index12.cjs.js +22 -0
  10. package/dist/index12.mjs +21 -47
  11. package/dist/index13.cjs.js +45 -0
  12. package/dist/index13.mjs +44 -365
  13. package/dist/index14.cjs.js +86 -0
  14. package/dist/index14.mjs +85 -416
  15. package/dist/index15.cjs.js +15 -0
  16. package/dist/index15.mjs +14 -206
  17. package/dist/index16.cjs.js +136 -0
  18. package/dist/index16.mjs +135 -388
  19. package/dist/index17.cjs.js +47 -0
  20. package/dist/index17.mjs +45 -578
  21. package/dist/index18.cjs.js +15 -0
  22. package/dist/index18.mjs +14 -157
  23. package/dist/index19.cjs.js +23 -0
  24. package/dist/index19.mjs +22 -26
  25. package/dist/index2.cjs.js +33 -0
  26. package/dist/index2.mjs +32 -258
  27. package/dist/index20.cjs.js +37 -0
  28. package/dist/index20.mjs +36 -41
  29. package/dist/index21.cjs.js +35 -0
  30. package/dist/index21.mjs +34 -16
  31. package/dist/index22.cjs.js +25 -0
  32. package/dist/index22.mjs +24 -104
  33. package/dist/index23.cjs.js +19 -0
  34. package/dist/index23.mjs +18 -128
  35. package/dist/index24.cjs.js +342 -0
  36. package/dist/index24.mjs +340 -6
  37. package/dist/index25.cjs.js +519 -0
  38. package/dist/index25.mjs +518 -27
  39. package/dist/index26.cjs.js +11 -0
  40. package/dist/index26.mjs +10 -10
  41. package/dist/index27.cjs.js +11 -0
  42. package/dist/index27.mjs +10 -29
  43. package/dist/index28.cjs.js +90 -0
  44. package/dist/index28.mjs +88 -46
  45. package/dist/index29.cjs.js +370 -0
  46. package/dist/index29.mjs +369 -8
  47. package/dist/index3.cjs.js +19 -0
  48. package/dist/index3.mjs +18 -539
  49. package/dist/index30.cjs.js +72 -0
  50. package/dist/index30.mjs +71 -7
  51. package/dist/index31.cjs.js +191 -0
  52. package/dist/index31.mjs +190 -42
  53. package/dist/index32.cjs.js +21 -0
  54. package/dist/index32.mjs +20 -29
  55. package/dist/index33.cjs.js +336 -0
  56. package/dist/index33.mjs +335 -5
  57. package/dist/index34.cjs.js +539 -0
  58. package/dist/index34.mjs +537 -8
  59. package/dist/index4.cjs.js +150 -0
  60. package/dist/index4.mjs +149 -5
  61. package/dist/index5.cjs.js +254 -0
  62. package/dist/index5.mjs +252 -4
  63. package/dist/index6.cjs.js +125 -0
  64. package/dist/index6.mjs +124 -29
  65. package/dist/index7.cjs.js +33 -0
  66. package/dist/index7.mjs +32 -12
  67. package/dist/index8.cjs.js +12 -0
  68. package/dist/index8.mjs +10 -4
  69. package/dist/index9.cjs.js +11 -0
  70. package/dist/index9.mjs +10 -133
  71. package/package.json +1 -1
  72. package/dist/index.cjs10.js +0 -18
  73. package/dist/index.cjs11.js +0 -15
  74. package/dist/index.cjs12.js +0 -48
  75. package/dist/index.cjs13.js +0 -365
  76. package/dist/index.cjs14.js +0 -416
  77. package/dist/index.cjs15.js +0 -206
  78. package/dist/index.cjs16.js +0 -388
  79. package/dist/index.cjs17.js +0 -579
  80. package/dist/index.cjs18.js +0 -157
  81. package/dist/index.cjs19.js +0 -26
  82. package/dist/index.cjs2.js +0 -259
  83. package/dist/index.cjs20.js +0 -42
  84. package/dist/index.cjs21.js +0 -16
  85. package/dist/index.cjs22.js +0 -104
  86. package/dist/index.cjs23.js +0 -129
  87. package/dist/index.cjs24.js +0 -7
  88. package/dist/index.cjs25.js +0 -27
  89. package/dist/index.cjs26.js +0 -10
  90. package/dist/index.cjs27.js +0 -29
  91. package/dist/index.cjs28.js +0 -46
  92. package/dist/index.cjs29.js +0 -8
  93. package/dist/index.cjs3.js +0 -540
  94. package/dist/index.cjs30.js +0 -7
  95. package/dist/index.cjs31.js +0 -42
  96. package/dist/index.cjs32.js +0 -29
  97. package/dist/index.cjs33.js +0 -5
  98. package/dist/index.cjs34.js +0 -9
  99. package/dist/index.cjs4.js +0 -5
  100. package/dist/index.cjs5.js +0 -5
  101. package/dist/index.cjs6.js +0 -29
  102. package/dist/index.cjs7.js +0 -12
  103. package/dist/index.cjs8.js +0 -5
  104. package/dist/index.cjs9.js +0 -133
@@ -1,77 +1,84 @@
1
1
  {
2
2
  "src/AsyncDataAdapter.ts": {
3
- "file": "index.cjs14.js",
3
+ "file": "index29.cjs.js",
4
4
  "name": "AsyncDataAdapter",
5
5
  "src": "src/AsyncDataAdapter.ts",
6
+ "isDynamicEntry": true,
6
7
  "imports": [
8
+ "src/getIndexInfo.ts",
7
9
  "src/utils/deepClone.ts",
10
+ "src/utils/getMatchingKeys.ts",
11
+ "src/utils/isEqual.ts",
8
12
  "src/utils/match.ts",
9
13
  "src/utils/modify.ts",
14
+ "src/utils/project.ts",
10
15
  "src/utils/queryId.ts",
11
- "src/utils/isEqual.ts",
12
- "src/getIndexInfo.ts",
13
- "src/utils/getMatchingKeys.ts",
14
- "src/utils/sortItems.ts",
15
- "src/utils/project.ts"
16
+ "src/utils/sortItems.ts"
16
17
  ]
17
18
  },
18
19
  "src/AutoFetchDataAdapter.ts": {
19
- "file": "index.cjs17.js",
20
+ "file": "index34.cjs.js",
20
21
  "name": "AutoFetchDataAdapter",
21
22
  "src": "src/AutoFetchDataAdapter.ts",
23
+ "isDynamicEntry": true,
22
24
  "imports": [
25
+ "src/getIndexInfo.ts",
23
26
  "src/utils/deepClone.ts",
27
+ "src/utils/getMatchingKeys.ts",
28
+ "src/utils/isEqual.ts",
24
29
  "src/utils/match.ts",
25
30
  "src/utils/modify.ts",
31
+ "src/utils/project.ts",
26
32
  "src/utils/queryId.ts",
27
- "src/utils/isEqual.ts",
28
- "src/getIndexInfo.ts",
29
- "src/utils/getMatchingKeys.ts",
30
- "src/utils/sortItems.ts",
31
- "src/utils/project.ts"
33
+ "src/utils/sortItems.ts"
32
34
  ]
33
35
  },
34
36
  "src/Collection/Cursor.ts": {
35
- "file": "index.cjs2.js",
37
+ "file": "index5.cjs.js",
36
38
  "name": "Collection/Cursor",
37
39
  "src": "src/Collection/Cursor.ts",
40
+ "isDynamicEntry": true,
38
41
  "imports": [
39
42
  "src/Collection/Observer.ts"
40
43
  ]
41
44
  },
42
45
  "src/Collection/Observer.ts": {
43
- "file": "index.cjs18.js",
46
+ "file": "index4.cjs.js",
44
47
  "name": "Collection/Observer",
45
48
  "src": "src/Collection/Observer.ts",
49
+ "isDynamicEntry": true,
46
50
  "imports": [
47
51
  "src/utils/isEqual.ts",
48
52
  "src/utils/uniqueBy.ts"
49
53
  ]
50
54
  },
51
55
  "src/Collection/index.ts": {
52
- "file": "index.cjs3.js",
56
+ "file": "index25.cjs.js",
53
57
  "name": "Collection/index",
54
58
  "src": "src/Collection/index.ts",
59
+ "isDynamicEntry": true,
55
60
  "imports": [
61
+ "src/Collection/Cursor.ts",
62
+ "src/DefaultDataAdapter.ts",
63
+ "src/createIndex.ts",
56
64
  "src/utils/EventEmitter.ts",
57
65
  "src/utils/createSignal.ts",
58
- "src/utils/randomId.ts",
59
- "src/DefaultDataAdapter.ts",
60
- "src/utils/modify.ts",
61
66
  "src/utils/deepClone.ts",
67
+ "src/utils/modify.ts",
62
68
  "src/utils/queryId.ts",
63
- "src/Collection/Cursor.ts"
69
+ "src/utils/randomId.ts"
64
70
  ]
65
71
  },
66
72
  "src/DefaultDataAdapter.ts": {
67
- "file": "index.cjs13.js",
73
+ "file": "index24.cjs.js",
68
74
  "name": "DefaultDataAdapter",
69
75
  "src": "src/DefaultDataAdapter.ts",
76
+ "isDynamicEntry": true,
70
77
  "imports": [
71
78
  "src/createIndex.ts",
72
79
  "src/getIndexInfo.ts",
73
- "src/utils/deepClone.ts",
74
80
  "src/utils/EventEmitter.ts",
81
+ "src/utils/deepClone.ts",
75
82
  "src/utils/isEqual.ts",
76
83
  "src/utils/match.ts",
77
84
  "src/utils/modify.ts",
@@ -82,36 +89,39 @@
82
89
  ]
83
90
  },
84
91
  "src/WorkerDataAdapter.ts": {
85
- "file": "index.cjs15.js",
92
+ "file": "index31.cjs.js",
86
93
  "name": "WorkerDataAdapter",
87
94
  "src": "src/WorkerDataAdapter.ts",
95
+ "isDynamicEntry": true,
88
96
  "imports": [
97
+ "src/utils/batchOnNextTick.ts",
89
98
  "src/utils/queryId.ts",
90
- "src/utils/randomId.ts",
91
- "src/utils/batchOnNextTick.ts"
99
+ "src/utils/randomId.ts"
92
100
  ]
93
101
  },
94
102
  "src/WorkerDataAdapterHost.ts": {
95
- "file": "index.cjs16.js",
103
+ "file": "index33.cjs.js",
96
104
  "name": "WorkerDataAdapterHost",
97
105
  "src": "src/WorkerDataAdapterHost.ts",
106
+ "isDynamicEntry": true,
98
107
  "imports": [
108
+ "src/getIndexInfo.ts",
109
+ "src/utils/compact.ts",
99
110
  "src/utils/deepClone.ts",
111
+ "src/utils/getMatchingKeys.ts",
112
+ "src/utils/isEqual.ts",
100
113
  "src/utils/match.ts",
101
114
  "src/utils/modify.ts",
102
- "src/utils/queryId.ts",
103
- "src/utils/isEqual.ts",
104
- "src/getIndexInfo.ts",
105
- "src/utils/getMatchingKeys.ts",
106
- "src/utils/sortItems.ts",
107
115
  "src/utils/project.ts",
108
- "src/utils/compact.ts"
116
+ "src/utils/queryId.ts",
117
+ "src/utils/sortItems.ts"
109
118
  ]
110
119
  },
111
120
  "src/createIndex.ts": {
112
- "file": "index.cjs22.js",
121
+ "file": "index14.cjs.js",
113
122
  "name": "createIndex",
114
123
  "src": "src/createIndex.ts",
124
+ "isDynamicEntry": true,
115
125
  "imports": [
116
126
  "src/createIndexProvider.ts",
117
127
  "src/utils/get.ts",
@@ -120,24 +130,28 @@
120
130
  ]
121
131
  },
122
132
  "src/createIndexProvider.ts": {
123
- "file": "index.cjs33.js",
133
+ "file": "index9.cjs.js",
124
134
  "name": "createIndexProvider",
125
- "src": "src/createIndexProvider.ts"
135
+ "src": "src/createIndexProvider.ts",
136
+ "isDynamicEntry": true
126
137
  },
127
138
  "src/createReactivityAdapter.ts": {
128
- "file": "index.cjs5.js",
139
+ "file": "index27.cjs.js",
129
140
  "name": "createReactivityAdapter",
130
- "src": "src/createReactivityAdapter.ts"
141
+ "src": "src/createReactivityAdapter.ts",
142
+ "isDynamicEntry": true
131
143
  },
132
144
  "src/createStorageAdapter.ts": {
133
- "file": "index.cjs4.js",
145
+ "file": "index26.cjs.js",
134
146
  "name": "createStorageAdapter",
135
- "src": "src/createStorageAdapter.ts"
147
+ "src": "src/createStorageAdapter.ts",
148
+ "isDynamicEntry": true
136
149
  },
137
150
  "src/getIndexInfo.ts": {
138
- "file": "index.cjs23.js",
151
+ "file": "index16.cjs.js",
139
152
  "name": "getIndexInfo",
140
153
  "src": "src/getIndexInfo.ts",
154
+ "isDynamicEntry": true,
141
155
  "imports": [
142
156
  "src/utils/intersection.ts"
143
157
  ]
@@ -148,136 +162,156 @@
148
162
  "src": "src/index.ts",
149
163
  "isEntry": true,
150
164
  "imports": [
165
+ "src/AsyncDataAdapter.ts",
166
+ "src/AutoFetchDataAdapter.ts",
151
167
  "src/Collection/Cursor.ts",
152
168
  "src/Collection/index.ts",
153
- "src/createStorageAdapter.ts",
169
+ "src/DefaultDataAdapter.ts",
170
+ "src/WorkerDataAdapter.ts",
171
+ "src/WorkerDataAdapterHost.ts",
154
172
  "src/createReactivityAdapter.ts",
173
+ "src/createStorageAdapter.ts",
174
+ "src/utils/EventEmitter.ts",
175
+ "src/utils/get.ts",
155
176
  "src/utils/isEqual.ts",
156
177
  "src/utils/modify.ts",
157
178
  "src/utils/randomId.ts",
158
- "src/utils/EventEmitter.ts",
159
- "src/utils/get.ts",
160
- "src/utils/serializeValue.ts",
161
179
  "src/utils/reactiveOrAsync.ts",
162
- "src/DefaultDataAdapter.ts",
163
- "src/AsyncDataAdapter.ts",
164
- "src/WorkerDataAdapter.ts",
165
- "src/WorkerDataAdapterHost.ts",
166
- "src/AutoFetchDataAdapter.ts"
180
+ "src/utils/serializeValue.ts"
167
181
  ]
168
182
  },
169
183
  "src/utils/EventEmitter.ts": {
170
- "file": "index.cjs9.js",
184
+ "file": "index6.cjs.js",
171
185
  "name": "utils/EventEmitter",
172
- "src": "src/utils/EventEmitter.ts"
186
+ "src": "src/utils/EventEmitter.ts",
187
+ "isDynamicEntry": true
173
188
  },
174
189
  "src/utils/batchOnNextTick.ts": {
175
- "file": "index.cjs28.js",
190
+ "file": "index30.cjs.js",
176
191
  "name": "utils/batchOnNextTick",
177
- "src": "src/utils/batchOnNextTick.ts"
192
+ "src": "src/utils/batchOnNextTick.ts",
193
+ "isDynamicEntry": true
178
194
  },
179
195
  "src/utils/compact.ts": {
180
- "file": "index.cjs29.js",
196
+ "file": "index32.cjs.js",
181
197
  "name": "utils/compact",
182
- "src": "src/utils/compact.ts"
198
+ "src": "src/utils/compact.ts",
199
+ "isDynamicEntry": true
183
200
  },
184
201
  "src/utils/createSignal.ts": {
185
- "file": "index.cjs19.js",
202
+ "file": "index7.cjs.js",
186
203
  "name": "utils/createSignal",
187
- "src": "src/utils/createSignal.ts"
204
+ "src": "src/utils/createSignal.ts",
205
+ "isDynamicEntry": true
188
206
  },
189
207
  "src/utils/deepClone.ts": {
190
- "file": "index.cjs20.js",
208
+ "file": "index17.cjs.js",
191
209
  "name": "utils/deepClone",
192
- "src": "src/utils/deepClone.ts"
210
+ "src": "src/utils/deepClone.ts",
211
+ "isDynamicEntry": true
193
212
  },
194
213
  "src/utils/get.ts": {
195
- "file": "index.cjs10.js",
214
+ "file": "index10.cjs.js",
196
215
  "name": "utils/get",
197
- "src": "src/utils/get.ts"
216
+ "src": "src/utils/get.ts",
217
+ "isDynamicEntry": true
198
218
  },
199
219
  "src/utils/getMatchingKeys.ts": {
200
- "file": "index.cjs27.js",
220
+ "file": "index13.cjs.js",
201
221
  "name": "utils/getMatchingKeys",
202
222
  "src": "src/utils/getMatchingKeys.ts",
223
+ "isDynamicEntry": true,
203
224
  "imports": [
204
225
  "src/utils/isFieldExpression.ts",
205
226
  "src/utils/serializeValue.ts"
206
227
  ]
207
228
  },
208
229
  "src/utils/intersection.ts": {
209
- "file": "index.cjs30.js",
230
+ "file": "index15.cjs.js",
210
231
  "name": "utils/intersection",
211
- "src": "src/utils/intersection.ts"
232
+ "src": "src/utils/intersection.ts",
233
+ "isDynamicEntry": true
212
234
  },
213
235
  "src/utils/isEqual.ts": {
214
- "file": "index.cjs6.js",
236
+ "file": "index2.cjs.js",
215
237
  "name": "utils/isEqual",
216
- "src": "src/utils/isEqual.ts"
238
+ "src": "src/utils/isEqual.ts",
239
+ "isDynamicEntry": true
217
240
  },
218
241
  "src/utils/isFieldExpression.ts": {
219
- "file": "index.cjs31.js",
242
+ "file": "index11.cjs.js",
220
243
  "name": "utils/isFieldExpression",
221
- "src": "src/utils/isFieldExpression.ts"
244
+ "src": "src/utils/isFieldExpression.ts",
245
+ "isDynamicEntry": true
222
246
  },
223
247
  "src/utils/match.ts": {
224
- "file": "index.cjs24.js",
248
+ "file": "index18.cjs.js",
225
249
  "name": "utils/match",
226
- "src": "src/utils/match.ts"
250
+ "src": "src/utils/match.ts",
251
+ "isDynamicEntry": true
227
252
  },
228
253
  "src/utils/modify.ts": {
229
- "file": "index.cjs7.js",
254
+ "file": "index19.cjs.js",
230
255
  "name": "utils/modify",
231
256
  "src": "src/utils/modify.ts",
257
+ "isDynamicEntry": true,
232
258
  "imports": [
233
259
  "src/utils/deepClone.ts"
234
260
  ]
235
261
  },
236
262
  "src/utils/project.ts": {
237
- "file": "index.cjs25.js",
263
+ "file": "index21.cjs.js",
238
264
  "name": "utils/project",
239
265
  "src": "src/utils/project.ts",
266
+ "isDynamicEntry": true,
240
267
  "imports": [
241
268
  "src/utils/get.ts",
242
269
  "src/utils/set.ts"
243
270
  ]
244
271
  },
245
272
  "src/utils/queryId.ts": {
246
- "file": "index.cjs21.js",
273
+ "file": "index22.cjs.js",
247
274
  "name": "utils/queryId",
248
- "src": "src/utils/queryId.ts"
275
+ "src": "src/utils/queryId.ts",
276
+ "isDynamicEntry": true
249
277
  },
250
278
  "src/utils/randomId.ts": {
251
- "file": "index.cjs8.js",
279
+ "file": "index8.cjs.js",
252
280
  "name": "utils/randomId",
253
- "src": "src/utils/randomId.ts"
281
+ "src": "src/utils/randomId.ts",
282
+ "isDynamicEntry": true
254
283
  },
255
284
  "src/utils/reactiveOrAsync.ts": {
256
- "file": "index.cjs12.js",
285
+ "file": "index28.cjs.js",
257
286
  "name": "utils/reactiveOrAsync",
258
- "src": "src/utils/reactiveOrAsync.ts"
287
+ "src": "src/utils/reactiveOrAsync.ts",
288
+ "isDynamicEntry": true
259
289
  },
260
290
  "src/utils/serializeValue.ts": {
261
- "file": "index.cjs11.js",
291
+ "file": "index12.cjs.js",
262
292
  "name": "utils/serializeValue",
263
- "src": "src/utils/serializeValue.ts"
293
+ "src": "src/utils/serializeValue.ts",
294
+ "isDynamicEntry": true
264
295
  },
265
296
  "src/utils/set.ts": {
266
- "file": "index.cjs32.js",
297
+ "file": "index20.cjs.js",
267
298
  "name": "utils/set",
268
- "src": "src/utils/set.ts"
299
+ "src": "src/utils/set.ts",
300
+ "isDynamicEntry": true
269
301
  },
270
302
  "src/utils/sortItems.ts": {
271
- "file": "index.cjs26.js",
303
+ "file": "index23.cjs.js",
272
304
  "name": "utils/sortItems",
273
305
  "src": "src/utils/sortItems.ts",
306
+ "isDynamicEntry": true,
274
307
  "imports": [
275
308
  "src/utils/get.ts"
276
309
  ]
277
310
  },
278
311
  "src/utils/uniqueBy.ts": {
279
- "file": "index.cjs34.js",
312
+ "file": "index3.cjs.js",
280
313
  "name": "utils/uniqueBy",
281
- "src": "src/utils/uniqueBy.ts"
314
+ "src": "src/utils/uniqueBy.ts",
315
+ "isDynamicEntry": true
282
316
  }
283
317
  }
@@ -52,7 +52,7 @@ export default class AsyncDataAdapter implements DataAdapter {
52
52
  /**
53
53
  * After mutations, recompute and push updates for affected active queries
54
54
  * @param collectionName - name of the collection
55
- * @param changedItems - items that were inserted/updated/replaced/removed
55
+ * @param affectedItems - item states before and/or after the mutation
56
56
  */
57
57
  private checkQueryUpdates;
58
58
  private insert;
package/dist/index.cjs.js CHANGED
@@ -1,35 +1,34 @@
1
- "use strict";
2
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const Cursor = require("./index.cjs2.js");
4
- const index = require("./index.cjs3.js");
5
- const createStorageAdapter = require("./index.cjs4.js");
6
- const createReactivityAdapter = require("./index.cjs5.js");
7
- const isEqual = require("./index.cjs6.js");
8
- const modify = require("./index.cjs7.js");
9
- const randomId = require("./index.cjs8.js");
10
- const EventEmitter = require("./index.cjs9.js");
11
- const get = require("./index.cjs10.js");
12
- const serializeValue = require("./index.cjs11.js");
13
- const reactiveOrAsync = require("./index.cjs12.js");
14
- const DefaultDataAdapter = require("./index.cjs13.js");
15
- const AsyncDataAdapter = require("./index.cjs14.js");
16
- const WorkerDataAdapter = require("./index.cjs15.js");
17
- const WorkerDataAdapterHost = require("./index.cjs16.js");
18
- const AutoFetchDataAdapter = require("./index.cjs17.js");
19
- exports.Cursor = Cursor.default;
20
- exports.Collection = index.default;
21
- exports.createStorageAdapter = createStorageAdapter;
22
- exports.createReactivityAdapter = createReactivityAdapter;
23
- exports.isEqual = isEqual;
24
- exports.modify = modify;
25
- exports.randomId = randomId;
26
- exports.EventEmitter = EventEmitter;
27
- exports.get = get;
28
- exports.serializeValue = serializeValue;
29
- exports.reactiveOrAsync = reactiveOrAsync.default;
30
- exports.unwrap = reactiveOrAsync.unwrap;
31
- exports.DefaultDataAdapter = DefaultDataAdapter;
32
- exports.AsyncDataAdapter = AsyncDataAdapter;
33
- exports.WorkerDataAdapter = WorkerDataAdapter;
34
- exports.WorkerDataAdapterHost = WorkerDataAdapterHost;
35
- exports.AutoFetchDataAdapter = AutoFetchDataAdapter;
2
+ const require_isEqual = require("./index2.cjs.js");
3
+ const require_Cursor = require("./index5.cjs.js");
4
+ const require_EventEmitter = require("./index6.cjs.js");
5
+ const require_randomId = require("./index8.cjs.js");
6
+ const require_get = require("./index10.cjs.js");
7
+ const require_serializeValue = require("./index12.cjs.js");
8
+ const require_modify = require("./index19.cjs.js");
9
+ const require_DefaultDataAdapter = require("./index24.cjs.js");
10
+ const require_index = require("./index25.cjs.js");
11
+ const require_createStorageAdapter = require("./index26.cjs.js");
12
+ const require_createReactivityAdapter = require("./index27.cjs.js");
13
+ const require_reactiveOrAsync = require("./index28.cjs.js");
14
+ const require_AsyncDataAdapter = require("./index29.cjs.js");
15
+ const require_WorkerDataAdapter = require("./index31.cjs.js");
16
+ const require_WorkerDataAdapterHost = require("./index33.cjs.js");
17
+ const require_AutoFetchDataAdapter = require("./index34.cjs.js");
18
+ exports.AsyncDataAdapter = require_AsyncDataAdapter.default;
19
+ exports.AutoFetchDataAdapter = require_AutoFetchDataAdapter.default;
20
+ exports.Collection = require_index.default;
21
+ exports.Cursor = require_Cursor.default;
22
+ exports.DefaultDataAdapter = require_DefaultDataAdapter.default;
23
+ exports.EventEmitter = require_EventEmitter.default;
24
+ exports.WorkerDataAdapter = require_WorkerDataAdapter.default;
25
+ exports.WorkerDataAdapterHost = require_WorkerDataAdapterHost.default;
26
+ exports.createReactivityAdapter = require_createReactivityAdapter.default;
27
+ exports.createStorageAdapter = require_createStorageAdapter.default;
28
+ exports.get = require_get.default;
29
+ exports.isEqual = require_isEqual.default;
30
+ exports.modify = require_modify.default;
31
+ exports.randomId = require_randomId.default;
32
+ exports.reactiveOrAsync = require_reactiveOrAsync.default;
33
+ exports.serializeValue = require_serializeValue.default;
34
+ exports.unwrap = require_reactiveOrAsync.unwrap;
package/dist/index.mjs CHANGED
@@ -1,35 +1,17 @@
1
- import { default as default2 } from "./index2.mjs";
2
- import { default as default3 } from "./index3.mjs";
3
- import { default as default4 } from "./index4.mjs";
4
- import { default as default5 } from "./index5.mjs";
5
- import { default as default6 } from "./index6.mjs";
6
- import { default as default7 } from "./index7.mjs";
7
- import { default as default8 } from "./index8.mjs";
8
- import { default as default9 } from "./index9.mjs";
9
- import { default as default10 } from "./index10.mjs";
10
- import { default as default11 } from "./index11.mjs";
11
- import { default as default12, unwrap } from "./index12.mjs";
12
- import { default as default13 } from "./index13.mjs";
13
- import { default as default14 } from "./index14.mjs";
14
- import { default as default15 } from "./index15.mjs";
15
- import { default as default16 } from "./index16.mjs";
16
- import { default as default17 } from "./index17.mjs";
17
- export {
18
- default14 as AsyncDataAdapter,
19
- default17 as AutoFetchDataAdapter,
20
- default3 as Collection,
21
- default2 as Cursor,
22
- default13 as DefaultDataAdapter,
23
- default9 as EventEmitter,
24
- default15 as WorkerDataAdapter,
25
- default16 as WorkerDataAdapterHost,
26
- default5 as createReactivityAdapter,
27
- default4 as createStorageAdapter,
28
- default10 as get,
29
- default6 as isEqual,
30
- default7 as modify,
31
- default8 as randomId,
32
- default12 as reactiveOrAsync,
33
- default11 as serializeValue,
34
- unwrap
35
- };
1
+ import isEqual from "./index2.mjs";
2
+ import Cursor from "./index5.mjs";
3
+ import EventEmitter from "./index6.mjs";
4
+ import randomId from "./index8.mjs";
5
+ import get from "./index10.mjs";
6
+ import serializeValue from "./index12.mjs";
7
+ import modify from "./index19.mjs";
8
+ import DefaultDataAdapter from "./index24.mjs";
9
+ import Collection from "./index25.mjs";
10
+ import createStorageAdapter from "./index26.mjs";
11
+ import createReactivityAdapter from "./index27.mjs";
12
+ import reactiveOrAsync, { unwrap } from "./index28.mjs";
13
+ import AsyncDataAdapter from "./index29.mjs";
14
+ import WorkerDataAdapter from "./index31.mjs";
15
+ import WorkerDataAdapterHost from "./index33.mjs";
16
+ import AutoFetchDataAdapter from "./index34.mjs";
17
+ export { AsyncDataAdapter, AutoFetchDataAdapter, Collection, Cursor, DefaultDataAdapter, EventEmitter, WorkerDataAdapter, WorkerDataAdapterHost, createReactivityAdapter, createStorageAdapter, get, isEqual, modify, randomId, reactiveOrAsync, serializeValue, unwrap };
@@ -0,0 +1,23 @@
1
+ //#region src/utils/get.ts
2
+ /**
3
+ * Retrieves the value at a specified path within an object.
4
+ * Supports dot and bracket notation for navigating nested properties.
5
+ * @template T - The type of the object to retrieve the value from.
6
+ * @param value - The object to navigate.
7
+ * @param path - The path (dot or bracket notation) to the desired value.
8
+ * @returns The value at the specified path, or `undefined` if the path does not exist.
9
+ */
10
+ function get(value, path) {
11
+ const normalized = path.replaceAll(/\[(\w+)\]/g, ".$1");
12
+ if (normalized.includes("..") || normalized.startsWith(".") || normalized.endsWith(".")) return;
13
+ const segments = normalized.split(".");
14
+ let current = value;
15
+ for (const key of segments) {
16
+ if (current == null) return;
17
+ current = current[key];
18
+ }
19
+ if (current === void 0) return;
20
+ return current;
21
+ }
22
+ //#endregion
23
+ exports.default = get;
package/dist/index10.mjs CHANGED
@@ -1,19 +1,23 @@
1
+ //#region src/utils/get.ts
2
+ /**
3
+ * Retrieves the value at a specified path within an object.
4
+ * Supports dot and bracket notation for navigating nested properties.
5
+ * @template T - The type of the object to retrieve the value from.
6
+ * @param value - The object to navigate.
7
+ * @param path - The path (dot or bracket notation) to the desired value.
8
+ * @returns The value at the specified path, or `undefined` if the path does not exist.
9
+ */
1
10
  function get(value, path) {
2
- const normalized = path.replaceAll(/\[(\w+)\]/g, ".$1");
3
- if (normalized.includes("..") || normalized.startsWith(".") || normalized.endsWith(".")) {
4
- return;
5
- }
6
- const segments = normalized.split(".");
7
- let current = value;
8
- for (const key of segments) {
9
- if (current == null)
10
- return;
11
- current = current[key];
12
- }
13
- if (current === void 0)
14
- return;
15
- return current;
11
+ const normalized = path.replaceAll(/\[(\w+)\]/g, ".$1");
12
+ if (normalized.includes("..") || normalized.startsWith(".") || normalized.endsWith(".")) return;
13
+ const segments = normalized.split(".");
14
+ let current = value;
15
+ for (const key of segments) {
16
+ if (current == null) return;
17
+ current = current[key];
18
+ }
19
+ if (current === void 0) return;
20
+ return current;
16
21
  }
17
- export {
18
- get as default
19
- };
22
+ //#endregion
23
+ export { get as default };
@@ -0,0 +1,45 @@
1
+ //#region src/utils/isFieldExpression.ts
2
+ var expressionKeys = new Set([
3
+ "$eq",
4
+ "$gt",
5
+ "$gte",
6
+ "$lt",
7
+ "$lte",
8
+ "$in",
9
+ "$nin",
10
+ "$ne",
11
+ "$exists",
12
+ "$not",
13
+ "$expr",
14
+ "$jsonSchema",
15
+ "$mod",
16
+ "$regex",
17
+ "$options",
18
+ "$text",
19
+ "$where",
20
+ "$all",
21
+ "$elemMatch",
22
+ "$size",
23
+ "$bitsAllClear",
24
+ "$bitsAllSet",
25
+ "$bitsAnyClear",
26
+ "$bitsAnySet"
27
+ ]);
28
+ /**
29
+ * Determines whether a given object is a valid field expression.
30
+ * A field expression is an object containing query operators supported by MongoDB-style queries.
31
+ * @template T - The type of the field expression.
32
+ * @param expression - The object to test.
33
+ * @returns A boolean indicating whether the object is a valid field expression.
34
+ * - `true` if the object contains only recognized query operators.
35
+ * - `false` otherwise.
36
+ */
37
+ function isFieldExpression(expression) {
38
+ if (typeof expression !== "object" || expression == null) return false;
39
+ const keys = Object.keys(expression);
40
+ if (keys.length === 0) return false;
41
+ if (keys.some((key) => !expressionKeys.has(key))) return false;
42
+ return keys.every((key) => expressionKeys.has(key));
43
+ }
44
+ //#endregion
45
+ exports.default = isFieldExpression;