@sprucelabs/data-stores 26.2.3 → 26.2.5
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.
|
@@ -107,7 +107,7 @@ export default class AbstractStore extends AbstractMutexer {
|
|
|
107
107
|
? yield this.willCreate(values)
|
|
108
108
|
: values;
|
|
109
109
|
let { valuesToMixinBeforeCreate, values: nv } = yield this.handleWillCreatePlugins(cleanedValues);
|
|
110
|
-
const newValues =
|
|
110
|
+
const newValues = nv;
|
|
111
111
|
const toSave = this.normalizeBeforeSave(newValues);
|
|
112
112
|
const record = yield this.db.createOne(this.collectionName, Object.assign(Object.assign({}, toSave), valuesToMixinBeforeCreate), {
|
|
113
113
|
primaryFieldNames: this.primaryFieldNames,
|
|
@@ -151,9 +151,9 @@ export default class AbstractStore extends AbstractMutexer {
|
|
|
151
151
|
var _a;
|
|
152
152
|
return __awaiter(this, void 0, void 0, function* () {
|
|
153
153
|
let valuesToMixinBeforeCreate = {};
|
|
154
|
-
let newValues;
|
|
154
|
+
let newValues = values;
|
|
155
155
|
for (const plugin of this.plugins) {
|
|
156
|
-
const r = yield ((_a = plugin.willCreateOne) === null || _a === void 0 ? void 0 : _a.call(plugin,
|
|
156
|
+
const r = yield ((_a = plugin.willCreateOne) === null || _a === void 0 ? void 0 : _a.call(plugin, newValues));
|
|
157
157
|
const { valuesToMixinBeforeCreate: v, newValues: nv } = r !== null && r !== void 0 ? r : {};
|
|
158
158
|
if (nv) {
|
|
159
159
|
newValues = nv;
|
|
@@ -121,7 +121,7 @@ class AbstractStore extends AbstractMutexer_1.default {
|
|
|
121
121
|
? await this.willCreate(values)
|
|
122
122
|
: values;
|
|
123
123
|
let { valuesToMixinBeforeCreate, values: nv } = await this.handleWillCreatePlugins(cleanedValues);
|
|
124
|
-
const newValues =
|
|
124
|
+
const newValues = nv;
|
|
125
125
|
const toSave = this.normalizeBeforeSave(newValues);
|
|
126
126
|
const record = await this.db.createOne(this.collectionName, Object.assign(Object.assign({}, toSave), valuesToMixinBeforeCreate), {
|
|
127
127
|
primaryFieldNames: this.primaryFieldNames,
|
|
@@ -163,9 +163,9 @@ class AbstractStore extends AbstractMutexer_1.default {
|
|
|
163
163
|
async handleWillCreatePlugins(values) {
|
|
164
164
|
var _a;
|
|
165
165
|
let valuesToMixinBeforeCreate = {};
|
|
166
|
-
let newValues;
|
|
166
|
+
let newValues = values;
|
|
167
167
|
for (const plugin of this.plugins) {
|
|
168
|
-
const r = await ((_a = plugin.willCreateOne) === null || _a === void 0 ? void 0 : _a.call(plugin,
|
|
168
|
+
const r = await ((_a = plugin.willCreateOne) === null || _a === void 0 ? void 0 : _a.call(plugin, newValues));
|
|
169
169
|
const { valuesToMixinBeforeCreate: v, newValues: nv } = r !== null && r !== void 0 ? r : {};
|
|
170
170
|
if (nv) {
|
|
171
171
|
newValues = nv;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "26.2.
|
|
6
|
+
"version": "26.2.5",
|
|
7
7
|
"files": [
|
|
8
8
|
"build/**/*",
|
|
9
9
|
"!build/__tests__",
|
|
@@ -70,21 +70,21 @@
|
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@sprucelabs/error": "^5.1.52",
|
|
72
72
|
"@sprucelabs/globby": "^1.0.3",
|
|
73
|
-
"@sprucelabs/schema": "^29.2.
|
|
74
|
-
"@sprucelabs/spruce-skill-utils": "^30.1.
|
|
73
|
+
"@sprucelabs/schema": "^29.2.4",
|
|
74
|
+
"@sprucelabs/spruce-skill-utils": "^30.1.42",
|
|
75
75
|
"just-clone": "^6.2.0",
|
|
76
76
|
"lodash": "^4.17.21",
|
|
77
77
|
"mongodb": "^6.3.0",
|
|
78
78
|
"nedb": "^1.8.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@sprucelabs/esm-postbuild": "^5.0.
|
|
82
|
-
"@sprucelabs/jest-json-reporter": "^7.0.
|
|
81
|
+
"@sprucelabs/esm-postbuild": "^5.0.108",
|
|
82
|
+
"@sprucelabs/jest-json-reporter": "^7.0.133",
|
|
83
83
|
"@sprucelabs/jest-sheets-reporter": "^3.0.26",
|
|
84
|
-
"@sprucelabs/resolve-path-aliases": "^1.1.
|
|
84
|
+
"@sprucelabs/resolve-path-aliases": "^1.1.270",
|
|
85
85
|
"@sprucelabs/semantic-release": "^4.0.8",
|
|
86
86
|
"@sprucelabs/test": "^8.0.35",
|
|
87
|
-
"@sprucelabs/test-utils": "^4.0.
|
|
87
|
+
"@sprucelabs/test-utils": "^4.0.86",
|
|
88
88
|
"@types/lodash": "^4.14.202",
|
|
89
89
|
"@types/nedb": "^1.8.16",
|
|
90
90
|
"@types/node": "^20.10.4",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"jest": "^29.7.0",
|
|
97
97
|
"jest-circus": "^29.7.0",
|
|
98
98
|
"prettier": "^3.1.0",
|
|
99
|
-
"ts-node": "^10.9.
|
|
99
|
+
"ts-node": "^10.9.2",
|
|
100
100
|
"tsc-watch": "^6.0.4",
|
|
101
101
|
"tsconfig-paths": "^4.2.0",
|
|
102
102
|
"typescript": "^5.3.3"
|