@sprucelabs/data-stores 28.3.123 → 28.3.124
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.
@@ -15,12 +15,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
15
|
};
|
16
16
|
var _a;
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
18
|
+
const nedb_1 = __importDefault(require("@seald-io/nedb"));
|
18
19
|
const dotenv_1 = __importDefault(require("dotenv"));
|
19
20
|
const get_1 = __importDefault(require("lodash/get"));
|
20
21
|
const isEqual_1 = __importDefault(require("lodash/isEqual"));
|
21
22
|
const isObject_1 = __importDefault(require("lodash/isObject"));
|
22
23
|
const uniqBy_1 = __importDefault(require("lodash/uniqBy"));
|
23
|
-
const nedb_1 = __importDefault(require("nedb"));
|
24
24
|
const SpruceError_1 = __importDefault(require("../errors/SpruceError"));
|
25
25
|
const AbstractMutexer_1 = __importDefault(require("../mutexers/AbstractMutexer"));
|
26
26
|
const generateId_1 = __importDefault(require("../utilities/generateId"));
|
@@ -196,14 +196,18 @@ class NeDbDatabase extends AbstractMutexer_1.default {
|
|
196
196
|
const q = this.prepQuery(query !== null && query !== void 0 ? query : {});
|
197
197
|
const cursor = col.find(q, mapped.projection);
|
198
198
|
if (mapped.sort) {
|
199
|
+
//@ts-ignore
|
199
200
|
cursor.sort(mapped.sort);
|
200
201
|
}
|
201
202
|
if (typeof mapped.limit === 'number') {
|
203
|
+
//@ts-ignore
|
202
204
|
cursor.limit(mapped.limit);
|
203
205
|
}
|
204
206
|
if (mapped.skip) {
|
207
|
+
//@ts-ignore
|
205
208
|
cursor.skip(mapped.skip);
|
206
209
|
}
|
210
|
+
//@ts-ignore
|
207
211
|
cursor.exec((err, results) => {
|
208
212
|
if (err) {
|
209
213
|
reject(err);
|
@@ -19,12 +19,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
19
19
|
return t;
|
20
20
|
};
|
21
21
|
var _a;
|
22
|
+
import Datastore from '@seald-io/nedb';
|
22
23
|
import dotenv from 'dotenv';
|
23
24
|
import get from 'lodash/get.js';
|
24
25
|
import isEqual from 'lodash/isEqual.js';
|
25
26
|
import isObject from 'lodash/isObject.js';
|
26
27
|
import uniqBy from 'lodash/uniqBy.js';
|
27
|
-
import Datastore from 'nedb';
|
28
28
|
import SpruceError from '../errors/SpruceError.js';
|
29
29
|
import AbstractMutexer from '../mutexers/AbstractMutexer.js';
|
30
30
|
import generateId from '../utilities/generateId.js';
|
@@ -221,14 +221,18 @@ export default class NeDbDatabase extends AbstractMutexer {
|
|
221
221
|
const q = this.prepQuery(query !== null && query !== void 0 ? query : {});
|
222
222
|
const cursor = col.find(q, mapped.projection);
|
223
223
|
if (mapped.sort) {
|
224
|
+
//@ts-ignore
|
224
225
|
cursor.sort(mapped.sort);
|
225
226
|
}
|
226
227
|
if (typeof mapped.limit === 'number') {
|
228
|
+
//@ts-ignore
|
227
229
|
cursor.limit(mapped.limit);
|
228
230
|
}
|
229
231
|
if (mapped.skip) {
|
232
|
+
//@ts-ignore
|
230
233
|
cursor.skip(mapped.skip);
|
231
234
|
}
|
235
|
+
//@ts-ignore
|
232
236
|
cursor.exec((err, results) => {
|
233
237
|
if (err) {
|
234
238
|
reject(err);
|
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"publishConfig": {
|
4
4
|
"access": "public"
|
5
5
|
},
|
6
|
-
"version": "28.3.
|
6
|
+
"version": "28.3.124",
|
7
7
|
"files": [
|
8
8
|
"build/**/*",
|
9
9
|
"!build/__tests__",
|
@@ -64,13 +64,14 @@
|
|
64
64
|
"watch.tsc": "tsc -w"
|
65
65
|
},
|
66
66
|
"dependencies": {
|
67
|
+
"@seald-io/nedb": "^4.0.4",
|
67
68
|
"@sprucelabs/error": "^6.0.465",
|
68
69
|
"@sprucelabs/globby": "^2.0.426",
|
69
70
|
"@sprucelabs/schema": "^30.0.483",
|
70
71
|
"@sprucelabs/spruce-skill-utils": "^31.0.533",
|
71
72
|
"just-clone": "^6.2.0",
|
72
|
-
"
|
73
|
-
"
|
73
|
+
"lodash": "^4.17.21",
|
74
|
+
"mongodb": "^6.9.0"
|
74
75
|
},
|
75
76
|
"devDependencies": {
|
76
77
|
"@sprucelabs/esm-postbuild": "^6.0.449",
|
@@ -80,7 +81,6 @@
|
|
80
81
|
"@sprucelabs/test": "^9.0.50",
|
81
82
|
"@sprucelabs/test-utils": "^5.1.414",
|
82
83
|
"@types/lodash": "^4.17.10",
|
83
|
-
"@types/nedb": "^1.8.16",
|
84
84
|
"@types/node": "^22.7.5",
|
85
85
|
"chokidar-cli": "^3.0.0",
|
86
86
|
"concurrently": "^9.0.1",
|