@signaldb/core 1.7.2 → 1.8.1
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/dist/.vite/manifest.json +88 -59
- package/dist/AutoFetchCollection.d.ts +3 -3
- package/dist/Collection/Cursor.d.ts +10 -7
- package/dist/Collection/index.d.ts +27 -11
- package/dist/Collection/types.d.ts +1 -0
- package/dist/ReplicatedCollection.d.ts +4 -4
- package/dist/index.cjs.js +26 -27
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +14 -28
- package/dist/index10.cjs.js +265 -0
- package/dist/index10.mjs +263 -28
- package/dist/index11.cjs.js +125 -0
- package/dist/index11.mjs +124 -12
- package/dist/index12.cjs.js +15 -0
- package/dist/index12.mjs +14 -5
- package/dist/index13.cjs.js +23 -0
- package/dist/index13.mjs +22 -133
- package/dist/index14.cjs.js +12 -0
- package/dist/index14.mjs +11 -73
- package/dist/index15.cjs.js +22 -0
- package/dist/index15.mjs +21 -10
- package/dist/index16.cjs.js +33 -0
- package/dist/index16.mjs +32 -27
- package/dist/index17.cjs.js +15 -0
- package/dist/index17.mjs +14 -142
- package/dist/index18.cjs.js +98 -0
- package/dist/index18.mjs +97 -7
- package/dist/index19.cjs.js +11 -0
- package/dist/index19.mjs +10 -41
- package/dist/index2.cjs.js +23 -0
- package/dist/index2.mjs +22 -260
- package/dist/index20.cjs.js +45 -0
- package/dist/index20.mjs +44 -15
- package/dist/index21.cjs.js +45 -0
- package/dist/index21.mjs +44 -26
- package/dist/index22.cjs.js +69 -0
- package/dist/index22.mjs +66 -77
- package/dist/index23.cjs.js +778 -0
- package/dist/index23.mjs +775 -81
- package/dist/index24.cjs.js +11 -0
- package/dist/index24.mjs +10 -18
- package/dist/index25.cjs.js +81 -0
- package/dist/index25.mjs +80 -29
- package/dist/index26.cjs.js +98 -0
- package/dist/index26.mjs +96 -8
- package/dist/index27.cjs.js +154 -0
- package/dist/index27.mjs +153 -7
- package/dist/index28.cjs.js +11 -0
- package/dist/index28.mjs +10 -29
- package/dist/index29.cjs.js +11 -0
- package/dist/index29.mjs +10 -42
- package/dist/index3.cjs.js +19 -0
- package/dist/index3.mjs +18 -788
- package/dist/index4.cjs.js +37 -0
- package/dist/index4.mjs +36 -167
- package/dist/index5.cjs.js +35 -0
- package/dist/index5.mjs +34 -67
- package/dist/index6.cjs.js +47 -0
- package/dist/index6.mjs +46 -5
- package/dist/index7.cjs.js +33 -0
- package/dist/index7.mjs +32 -5
- package/dist/index8.cjs.js +19 -0
- package/dist/index8.mjs +18 -5
- package/dist/index9.cjs.js +139 -0
- package/dist/index9.mjs +138 -5
- package/dist/utils/deepClone.d.ts +1 -1
- package/package.json +3 -3
- package/dist/index.cjs10.js +0 -29
- package/dist/index.cjs11.js +0 -12
- package/dist/index.cjs12.js +0 -5
- package/dist/index.cjs13.js +0 -133
- package/dist/index.cjs14.js +0 -74
- package/dist/index.cjs15.js +0 -10
- package/dist/index.cjs16.js +0 -27
- package/dist/index.cjs17.js +0 -142
- package/dist/index.cjs18.js +0 -7
- package/dist/index.cjs19.js +0 -42
- package/dist/index.cjs2.js +0 -261
- package/dist/index.cjs20.js +0 -15
- package/dist/index.cjs21.js +0 -26
- package/dist/index.cjs22.js +0 -79
- package/dist/index.cjs23.js +0 -84
- package/dist/index.cjs24.js +0 -18
- package/dist/index.cjs25.js +0 -29
- package/dist/index.cjs26.js +0 -9
- package/dist/index.cjs27.js +0 -7
- package/dist/index.cjs28.js +0 -29
- package/dist/index.cjs29.js +0 -42
- package/dist/index.cjs3.js +0 -788
- package/dist/index.cjs4.js +0 -167
- package/dist/index.cjs5.js +0 -68
- package/dist/index.cjs6.js +0 -5
- package/dist/index.cjs7.js +0 -5
- package/dist/index.cjs8.js +0 -5
- package/dist/index.cjs9.js +0 -5
package/dist/index.cjs25.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function set(object, path, value, deleteIfUndefined = false) {
|
|
3
|
-
if (object == null)
|
|
4
|
-
return object;
|
|
5
|
-
const segments = path.split(/[.[\]]/g);
|
|
6
|
-
if (segments[0] === "")
|
|
7
|
-
segments.shift();
|
|
8
|
-
if (segments.at(-1) === "")
|
|
9
|
-
segments.pop();
|
|
10
|
-
const apply = (node) => {
|
|
11
|
-
if (segments.length > 1) {
|
|
12
|
-
const key = segments.shift();
|
|
13
|
-
const nextIsNumber = !Number.isNaN(Number.parseInt(segments[0], 10));
|
|
14
|
-
if (node[key] === void 0) {
|
|
15
|
-
node[key] = nextIsNumber ? [] : {};
|
|
16
|
-
}
|
|
17
|
-
apply(node[key]);
|
|
18
|
-
} else {
|
|
19
|
-
if (deleteIfUndefined && value === void 0) {
|
|
20
|
-
delete node[segments[0]];
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
node[segments[0]] = value;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
apply(object);
|
|
27
|
-
return object;
|
|
28
|
-
}
|
|
29
|
-
module.exports = set;
|
package/dist/index.cjs26.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function uniqueBy(array, fn) {
|
|
3
|
-
const set = /* @__PURE__ */ new Set();
|
|
4
|
-
return array.filter((element) => {
|
|
5
|
-
const value = typeof fn === "function" ? fn(element) : element[fn];
|
|
6
|
-
return !set.has(value) && set.add(value);
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
module.exports = uniqueBy;
|
package/dist/index.cjs27.js
DELETED
package/dist/index.cjs28.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const isFieldExpression = require("./index.cjs29.js");
|
|
3
|
-
const serializeValue = require("./index.cjs20.js");
|
|
4
|
-
function getMatchingKeys(field, selector) {
|
|
5
|
-
const result = { include: null, exclude: null };
|
|
6
|
-
const fieldSelector = selector[field];
|
|
7
|
-
if (fieldSelector instanceof RegExp)
|
|
8
|
-
return result;
|
|
9
|
-
if (fieldSelector == null)
|
|
10
|
-
return result;
|
|
11
|
-
if (isFieldExpression(fieldSelector)) {
|
|
12
|
-
if (fieldSelector.$ne != null) {
|
|
13
|
-
result.exclude = [serializeValue(fieldSelector.$ne)];
|
|
14
|
-
return result;
|
|
15
|
-
}
|
|
16
|
-
if (Array.isArray(fieldSelector.$in) && fieldSelector.$in.length > 0) {
|
|
17
|
-
result.include = fieldSelector.$in.map(serializeValue);
|
|
18
|
-
return result;
|
|
19
|
-
}
|
|
20
|
-
if (Array.isArray(fieldSelector.$nin) && fieldSelector.$nin.length > 0) {
|
|
21
|
-
result.exclude = fieldSelector.$nin.map(serializeValue);
|
|
22
|
-
return result;
|
|
23
|
-
}
|
|
24
|
-
return { include: null, exclude: null };
|
|
25
|
-
}
|
|
26
|
-
result.include = [serializeValue(fieldSelector)];
|
|
27
|
-
return result;
|
|
28
|
-
}
|
|
29
|
-
module.exports = getMatchingKeys;
|
package/dist/index.cjs29.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const expressionKeys = /* @__PURE__ */ 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
|
-
function isFieldExpression(expression) {
|
|
29
|
-
if (typeof expression !== "object" || expression == null) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
const keys = Object.keys(expression);
|
|
33
|
-
if (keys.length === 0) {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
const hasInvalidKeys = keys.some((key) => !expressionKeys.has(key));
|
|
37
|
-
if (hasInvalidKeys)
|
|
38
|
-
return false;
|
|
39
|
-
const hasValidKeys = keys.every((key) => expressionKeys.has(key));
|
|
40
|
-
return hasValidKeys;
|
|
41
|
-
}
|
|
42
|
-
module.exports = isFieldExpression;
|