@sprucelabs/data-stores 19.2.0 → 19.3.0
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/build/databases/MongoDatabase.d.ts +1 -1
- package/build/databases/mongo.types.d.ts +1 -1
- package/build/databases/mongo.types.js +1 -2
- package/build/esm/databases/MongoDatabase.d.ts +1 -1
- package/build/esm/databases/mongo.types.d.ts +1 -1
- package/build/esm/databases/mongo.types.js +1 -1
- package/package.json +5 -7
|
@@ -35,7 +35,7 @@ export default class MongoDatabase implements Database {
|
|
|
35
35
|
syncIndexes(collectionName: string, indexes: string[][]): Promise<void>;
|
|
36
36
|
createUniqueIndex(collection: string, fields: string[]): Promise<void>;
|
|
37
37
|
syncUniqueIndexes(collectionName: string, indexes: string[][]): Promise<void>;
|
|
38
|
-
update(collection: string, query: Record<string, any>, updates: Record<string, any>): Promise<
|
|
38
|
+
update(collection: string, query: Record<string, any>, updates: Record<string, any>): Promise<number>;
|
|
39
39
|
updateOne(collection: string, query: Record<string, any>, updates: Record<string, any>): Promise<Record<string, any>>;
|
|
40
40
|
upsertOne(collection: string, query: Record<string, any>, updates: Record<string, any>): Promise<Record<string, any>>;
|
|
41
41
|
private generateDuplicateFieldsForError;
|
|
@@ -13,7 +13,7 @@ export type WithoutProjection<T> = T & {
|
|
|
13
13
|
fields?: undefined;
|
|
14
14
|
projection?: undefined;
|
|
15
15
|
};
|
|
16
|
-
export { Binary, DBRef, Decimal128, Double, Int32, Long, MaxKey, MinKey,
|
|
16
|
+
export { Binary, DBRef, Decimal128, Double, Int32, Long, MaxKey, MinKey, ObjectId, Timestamp, } from 'bson';
|
|
17
17
|
type NumericTypes = number | Decimal128 | Double | Int32 | Long;
|
|
18
18
|
export type ClientSessionId = unknown;
|
|
19
19
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/// <reference types="node" />
|
|
4
4
|
/// <reference lib="esnext.asynciterable" />
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BsonType = exports.Timestamp = exports.ObjectId = exports.
|
|
6
|
+
exports.BsonType = exports.Timestamp = exports.ObjectId = exports.MinKey = exports.MaxKey = exports.Long = exports.Int32 = exports.Double = exports.Decimal128 = exports.DBRef = exports.Binary = void 0;
|
|
7
7
|
var bson_1 = require("bson");
|
|
8
8
|
Object.defineProperty(exports, "Binary", { enumerable: true, get: function () { return bson_1.Binary; } });
|
|
9
9
|
Object.defineProperty(exports, "DBRef", { enumerable: true, get: function () { return bson_1.DBRef; } });
|
|
@@ -13,7 +13,6 @@ Object.defineProperty(exports, "Int32", { enumerable: true, get: function () { r
|
|
|
13
13
|
Object.defineProperty(exports, "Long", { enumerable: true, get: function () { return bson_1.Long; } });
|
|
14
14
|
Object.defineProperty(exports, "MaxKey", { enumerable: true, get: function () { return bson_1.MaxKey; } });
|
|
15
15
|
Object.defineProperty(exports, "MinKey", { enumerable: true, get: function () { return bson_1.MinKey; } });
|
|
16
|
-
Object.defineProperty(exports, "ObjectID", { enumerable: true, get: function () { return bson_1.ObjectID; } });
|
|
17
16
|
Object.defineProperty(exports, "ObjectId", { enumerable: true, get: function () { return bson_1.ObjectId; } });
|
|
18
17
|
Object.defineProperty(exports, "Timestamp", { enumerable: true, get: function () { return bson_1.Timestamp; } });
|
|
19
18
|
/**
|
|
@@ -35,7 +35,7 @@ export default class MongoDatabase implements Database {
|
|
|
35
35
|
syncIndexes(collectionName: string, indexes: string[][]): Promise<void>;
|
|
36
36
|
createUniqueIndex(collection: string, fields: string[]): Promise<void>;
|
|
37
37
|
syncUniqueIndexes(collectionName: string, indexes: string[][]): Promise<void>;
|
|
38
|
-
update(collection: string, query: Record<string, any>, updates: Record<string, any>): Promise<
|
|
38
|
+
update(collection: string, query: Record<string, any>, updates: Record<string, any>): Promise<number>;
|
|
39
39
|
updateOne(collection: string, query: Record<string, any>, updates: Record<string, any>): Promise<Record<string, any>>;
|
|
40
40
|
upsertOne(collection: string, query: Record<string, any>, updates: Record<string, any>): Promise<Record<string, any>>;
|
|
41
41
|
private generateDuplicateFieldsForError;
|
|
@@ -13,7 +13,7 @@ export type WithoutProjection<T> = T & {
|
|
|
13
13
|
fields?: undefined;
|
|
14
14
|
projection?: undefined;
|
|
15
15
|
};
|
|
16
|
-
export { Binary, DBRef, Decimal128, Double, Int32, Long, MaxKey, MinKey,
|
|
16
|
+
export { Binary, DBRef, Decimal128, Double, Int32, Long, MaxKey, MinKey, ObjectId, Timestamp, } from 'bson';
|
|
17
17
|
type NumericTypes = number | Decimal128 | Double | Int32 | Long;
|
|
18
18
|
export type ClientSessionId = unknown;
|
|
19
19
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
/// <reference lib="esnext.asynciterable" />
|
|
4
|
-
export { Binary, DBRef, Decimal128, Double, Int32, Long, MaxKey, MinKey,
|
|
4
|
+
export { Binary, DBRef, Decimal128, Double, Int32, Long, MaxKey, MinKey, ObjectId, Timestamp, } from 'bson';
|
|
5
5
|
/**
|
|
6
6
|
* Available BSON types
|
|
7
7
|
*
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "19.
|
|
6
|
+
"version": "19.3.0",
|
|
7
7
|
"files": [
|
|
8
8
|
"build/**/*",
|
|
9
9
|
"!build/__tests__",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"module": "./build/esm/index.js",
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"license": "MIT",
|
|
18
|
-
"description": "A way to store data",
|
|
18
|
+
"description": "A standardized way to store data across many storage platforms. This is NOT an ORM. Just a simple adapter layer built to make it easy to work with storage!",
|
|
19
19
|
"keywords": [
|
|
20
20
|
"node",
|
|
21
21
|
"sprucelabs"
|
|
@@ -28,8 +28,6 @@
|
|
|
28
28
|
"namespace": "data-stores",
|
|
29
29
|
"upgradeIgnoreList": [
|
|
30
30
|
"globby",
|
|
31
|
-
"mongodb",
|
|
32
|
-
"@types/mongodb",
|
|
33
31
|
"@types/node",
|
|
34
32
|
"@sprucelabs/spruce-core-schemas",
|
|
35
33
|
"@sprucelabs/spruce-test-fixtures"
|
|
@@ -76,9 +74,9 @@
|
|
|
76
74
|
"@sprucelabs/schema": "^28.5.128",
|
|
77
75
|
"@sprucelabs/spruce-skill-utils": "^28.1.79",
|
|
78
76
|
"globby": "^11.0.4",
|
|
79
|
-
"lodash": "^4.17.21",
|
|
80
77
|
"just-clone": "^6.2.0",
|
|
81
|
-
"
|
|
78
|
+
"lodash": "^4.17.21",
|
|
79
|
+
"mongodb": "^5.0.1",
|
|
82
80
|
"nedb": "^1.8.0"
|
|
83
81
|
},
|
|
84
82
|
"devDependencies": {
|
|
@@ -89,8 +87,8 @@
|
|
|
89
87
|
"@sprucelabs/semantic-release": "^4.0.8",
|
|
90
88
|
"@sprucelabs/test": "^7.7.420",
|
|
91
89
|
"@sprucelabs/test-utils": "^3.3.10",
|
|
92
|
-
"@types/nedb": "^1.8.12",
|
|
93
90
|
"@types/lodash": "^4.14.191",
|
|
91
|
+
"@types/nedb": "^1.8.12",
|
|
94
92
|
"@types/node": "17.0.5",
|
|
95
93
|
"chokidar-cli": "^3.0.0",
|
|
96
94
|
"concurrently": "^7.6.0",
|