@dnax/core 0.21.0 → 0.21.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/driver/mongo/rest.ts +12 -0
- package/package.json +1 -1
- package/types/arktype.ts +1 -0
- package/types/index.ts +1 -0
- package/utils/index.ts +1 -1
package/driver/mongo/rest.ts
CHANGED
|
@@ -204,6 +204,7 @@ class useRest {
|
|
|
204
204
|
if (col?.hooks?.beforeOperation && useHook) {
|
|
205
205
|
await col.hooks.beforeOperation({
|
|
206
206
|
io: Cfg.io,
|
|
207
|
+
error: fn.error,
|
|
207
208
|
sharedData: sharedData,
|
|
208
209
|
pipeline: pipeline,
|
|
209
210
|
c: this.#c,
|
|
@@ -278,6 +279,7 @@ class useRest {
|
|
|
278
279
|
await col.hooks.beforeOperation({
|
|
279
280
|
sharedData: sharedData,
|
|
280
281
|
io: Cfg.io,
|
|
282
|
+
error: fn.error,
|
|
281
283
|
data: data,
|
|
282
284
|
c: this.#c,
|
|
283
285
|
driver: "mongodb",
|
|
@@ -399,6 +401,7 @@ class useRest {
|
|
|
399
401
|
if (col?.hooks?.beforeOperation && useHook) {
|
|
400
402
|
await col.hooks.beforeOperation({
|
|
401
403
|
sharedData: sharedData,
|
|
404
|
+
error: fn.error,
|
|
402
405
|
data: toJson(data),
|
|
403
406
|
io: Cfg.io,
|
|
404
407
|
c: this.#c,
|
|
@@ -575,6 +578,7 @@ class useRest {
|
|
|
575
578
|
await col.hooks.beforeOperation({
|
|
576
579
|
sharedData: sharedData,
|
|
577
580
|
c: this.#c,
|
|
581
|
+
error: fn.error,
|
|
578
582
|
driver: "mongodb",
|
|
579
583
|
io: Cfg.io,
|
|
580
584
|
action: "find",
|
|
@@ -701,6 +705,7 @@ class useRest {
|
|
|
701
705
|
await col.hooks.beforeOperation({
|
|
702
706
|
sharedData: sharedData,
|
|
703
707
|
c: this.#c,
|
|
708
|
+
error: fn.error,
|
|
704
709
|
driver: "mongodb",
|
|
705
710
|
io: Cfg.io,
|
|
706
711
|
action: "find",
|
|
@@ -811,6 +816,7 @@ class useRest {
|
|
|
811
816
|
sharedData: sharedData,
|
|
812
817
|
id: id,
|
|
813
818
|
io: Cfg.io,
|
|
819
|
+
error: fn.error,
|
|
814
820
|
c: this.#c,
|
|
815
821
|
driver: "mongodb",
|
|
816
822
|
action: "findOne",
|
|
@@ -926,6 +932,7 @@ class useRest {
|
|
|
926
932
|
sharedData: sharedData,
|
|
927
933
|
id: id,
|
|
928
934
|
io: Cfg.io,
|
|
935
|
+
error: fn.error,
|
|
929
936
|
c: this.#c,
|
|
930
937
|
driver: "mongodb",
|
|
931
938
|
action: "updateOne",
|
|
@@ -1083,6 +1090,7 @@ class useRest {
|
|
|
1083
1090
|
sharedData: sharedData,
|
|
1084
1091
|
filter: filter || {},
|
|
1085
1092
|
c: this.#c,
|
|
1093
|
+
error: fn.error,
|
|
1086
1094
|
io: Cfg.io,
|
|
1087
1095
|
driver: "mongodb",
|
|
1088
1096
|
action: "findOneAndUpdate",
|
|
@@ -1202,6 +1210,7 @@ class useRest {
|
|
|
1202
1210
|
sharedData: sharedData,
|
|
1203
1211
|
ids: ids,
|
|
1204
1212
|
c: this.#c,
|
|
1213
|
+
error: fn.error,
|
|
1205
1214
|
driver: "mongodb",
|
|
1206
1215
|
io: Cfg.io,
|
|
1207
1216
|
action: "updateMany",
|
|
@@ -1367,6 +1376,8 @@ class useRest {
|
|
|
1367
1376
|
c: this.#c,
|
|
1368
1377
|
io: Cfg.io,
|
|
1369
1378
|
driver: "mongodb",
|
|
1379
|
+
error: fn.error,
|
|
1380
|
+
|
|
1370
1381
|
action: "deleteOne",
|
|
1371
1382
|
session: sessionStorage(),
|
|
1372
1383
|
rest: new useRest({
|
|
@@ -1468,6 +1479,7 @@ class useRest {
|
|
|
1468
1479
|
ids: ids,
|
|
1469
1480
|
c: this.#c,
|
|
1470
1481
|
driver: "mongodb",
|
|
1482
|
+
error: fn.error,
|
|
1471
1483
|
io: Cfg.io,
|
|
1472
1484
|
action: "deleteMany",
|
|
1473
1485
|
session: sessionStorage(),
|
package/package.json
CHANGED
package/types/arktype.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { type } from "arktype";
|
package/types/index.ts
CHANGED
package/utils/index.ts
CHANGED