ts-patch-mongoose 2.6.0 → 2.6.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/README.md +1 -1
- package/dist/cjs/types/helpers.d.ts +1 -0
- package/dist/cjs/types/helpers.d.ts.map +1 -1
- package/dist/cjs/types/hooks/delete-hooks.d.ts +1 -0
- package/dist/cjs/types/hooks/delete-hooks.d.ts.map +1 -1
- package/dist/cjs/types/hooks/save-hooks.d.ts +1 -0
- package/dist/cjs/types/hooks/save-hooks.d.ts.map +1 -1
- package/dist/cjs/types/hooks/update-hooks.d.ts +1 -0
- package/dist/cjs/types/hooks/update-hooks.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/IContext.d.ts +1 -0
- package/dist/cjs/types/interfaces/IContext.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/IEvent.d.ts +1 -0
- package/dist/cjs/types/interfaces/IEvent.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/IHistory.d.ts +1 -0
- package/dist/cjs/types/interfaces/IHistory.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/IHookContext.d.ts +1 -0
- package/dist/cjs/types/interfaces/IHookContext.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/IPluginOptions.d.ts +1 -0
- package/dist/cjs/types/interfaces/IPluginOptions.d.ts.map +1 -1
- package/dist/cjs/types/models/History.d.ts +1 -0
- package/dist/cjs/types/models/History.d.ts.map +1 -1
- package/dist/cjs/types/patch.d.ts +1 -0
- package/dist/cjs/types/patch.d.ts.map +1 -1
- package/dist/cjs/types/plugin.d.ts +1 -0
- package/dist/cjs/types/plugin.d.ts.map +1 -1
- package/dist/esm/types/helpers.d.ts +1 -0
- package/dist/esm/types/helpers.d.ts.map +1 -1
- package/dist/esm/types/hooks/delete-hooks.d.ts +1 -0
- package/dist/esm/types/hooks/delete-hooks.d.ts.map +1 -1
- package/dist/esm/types/hooks/save-hooks.d.ts +1 -0
- package/dist/esm/types/hooks/save-hooks.d.ts.map +1 -1
- package/dist/esm/types/hooks/update-hooks.d.ts +1 -0
- package/dist/esm/types/hooks/update-hooks.d.ts.map +1 -1
- package/dist/esm/types/interfaces/IContext.d.ts +1 -0
- package/dist/esm/types/interfaces/IContext.d.ts.map +1 -1
- package/dist/esm/types/interfaces/IEvent.d.ts +1 -0
- package/dist/esm/types/interfaces/IEvent.d.ts.map +1 -1
- package/dist/esm/types/interfaces/IHistory.d.ts +1 -0
- package/dist/esm/types/interfaces/IHistory.d.ts.map +1 -1
- package/dist/esm/types/interfaces/IHookContext.d.ts +1 -0
- package/dist/esm/types/interfaces/IHookContext.d.ts.map +1 -1
- package/dist/esm/types/interfaces/IPluginOptions.d.ts +1 -0
- package/dist/esm/types/interfaces/IPluginOptions.d.ts.map +1 -1
- package/dist/esm/types/models/History.d.ts +1 -0
- package/dist/esm/types/models/History.d.ts.map +1 -1
- package/dist/esm/types/patch.d.ts +1 -0
- package/dist/esm/types/patch.d.ts.map +1 -1
- package/dist/esm/types/plugin.d.ts +1 -0
- package/dist/esm/types/plugin.d.ts.map +1 -1
- package/package.json +14 -13
- package/tests/plugin-event-deleted.test.ts +4 -4
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { QueryOptions, ToObjectOptions } from 'mongoose';
|
|
26
27
|
export declare const isHookIgnored: <T>(options: QueryOptions<T>) => boolean;
|
|
27
28
|
export declare const toObjectOptions: ToObjectOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE7D,eAAO,MAAM,aAAa,eAAgB,aAAa,CAAC,CAAC,KAAG,OAE3D,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,eAG7B,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { Schema } from 'mongoose';
|
|
26
27
|
import type IPluginOptions from '../interfaces/IPluginOptions';
|
|
27
28
|
export declare const deleteHooksInitialize: <T>(schema: Schema<T>, opts: IPluginOptions<T>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/delete-hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/delete-hooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,KAAK,EAAoD,MAAM,EAAE,MAAM,UAAU,CAAA;AACxF,OAAO,KAAK,cAAc,MAAM,8BAA8B,CAAA;AAa9D,eAAO,MAAM,qBAAqB,cAAe,OAAO,CAAC,CAAC,QAAQ,eAAe,CAAC,CAAC,KAAG,IAuCrF,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { Schema } from 'mongoose';
|
|
26
27
|
import type IPluginOptions from '../interfaces/IPluginOptions';
|
|
27
28
|
export declare const saveHooksInitialize: <T>(schema: Schema<T>, opts: IPluginOptions<T>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/save-hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"save-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/save-hooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGA,OAAO,KAAK,EAA2B,MAAM,EAAE,MAAM,UAAU,CAAA;AAC/D,OAAO,KAAK,cAAc,MAAM,8BAA8B,CAAA;AAG9D,eAAO,MAAM,mBAAmB,cAAe,OAAO,CAAC,CAAC,QAAQ,eAAe,CAAC,CAAC,KAAG,IAwBnF,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { HydratedDocument, Schema, UpdateQuery, UpdateWithAggregationPipeline } from 'mongoose';
|
|
26
27
|
import type IPluginOptions from '../interfaces/IPluginOptions';
|
|
27
28
|
export declare const assignUpdate: <T>(document: HydratedDocument<T>, update: UpdateQuery<T>, commands: Record<string, unknown>[]) => HydratedDocument<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/update-hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/update-hooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAkC,MAAM,EAAE,WAAW,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;AACpI,OAAO,KAAK,cAAc,MAAM,8BAA8B,CAAA;AAa9D,eAAO,MAAM,YAAY,gBAAiB,iBAAiB,CAAC,CAAC,UAAU,YAAY,CAAC,CAAC,YAAY,OAAO,MAAM,EAAE,OAAO,CAAC,EAAE,KAAG,iBAAiB,CAAC,CAe9I,CAAA;AAED,eAAO,MAAM,sBAAsB,mBAAoB,6BAA6B,GAAG,YAAY,CAAC,CAAC,GAAG,IAAI,KAAG;IAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IAAC,QAAQ,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CAiB3K,CAAA;AAED,eAAO,MAAM,qBAAqB,cAAe,OAAO,CAAC,CAAC,QAAQ,eAAe,CAAC,CAAC,KAAG,IAgDrF,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { HydratedDocument } from 'mongoose';
|
|
26
27
|
interface IContext<T> {
|
|
27
28
|
op: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IContext.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IContext.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,UAAU,QAAQ,CAAC,CAAC;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAA;IACnC,WAAW,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAA;IACnC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { Operation } from 'fast-json-patch';
|
|
26
27
|
import type { HydratedDocument } from 'mongoose';
|
|
27
28
|
interface IEvent<T> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEvent.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IEvent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IEvent.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IEvent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,UAAU,MAAM,CAAC,CAAC;IAChB,MAAM,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;IAC5B,GAAG,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;IACzB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAA;CACpB;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { Types } from 'mongoose';
|
|
26
27
|
import type { Operation } from 'fast-json-patch';
|
|
27
28
|
interface IHistory {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IHistory.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IHistory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IHistory.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IHistory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAA;CACpB;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { Query } from 'mongoose';
|
|
26
27
|
import type IContext from './IContext';
|
|
27
28
|
type IHookContext<T> = Query<T, T> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IHookContext.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IHookContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IHookContext.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IHookContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AAEtC,KAAK,YAAY,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;CAAE,CAAA;AAE1E,eAAe,YAAY,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { HydratedDocument } from 'mongoose';
|
|
26
27
|
export type User = Record<string, unknown>;
|
|
27
28
|
export type Metadata = Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPluginOptions.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IPluginOptions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IPluginOptions.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IPluginOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAC1C,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE9C,UAAU,cAAc,CAAC,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACpC,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;IAC1C,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAA;IAChD,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3D;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import { Schema } from 'mongoose';
|
|
26
27
|
import type IHistory from '../interfaces/IHistory';
|
|
27
28
|
declare const History: import("mongoose").Model<IHistory, {}, {}, {}, import("mongoose").Document<unknown, {}, IHistory> & IHistory & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"History.d.ts","sourceRoot":"","sources":["../../../../src/models/History.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"History.d.ts","sourceRoot":"","sources":["../../../../src/models/History.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAS,MAAM,UAAU,CAAA;AAExC,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAA;AA4ClD,QAAA,MAAM,OAAO;;;;;;GAA6C,CAAA;AAE1D,eAAe,OAAO,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { HydratedDocument } from 'mongoose';
|
|
26
27
|
import type IEvent from './interfaces/IEvent';
|
|
27
28
|
import type IContext from './interfaces/IContext';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch.d.ts","sourceRoot":"","sources":["../../../src/patch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"patch.d.ts","sourceRoot":"","sources":["../../../src/patch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAS,MAAM,UAAU,CAAA;AAEvD,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAA;AAC7C,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAA;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AASjE,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAAE,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAAC,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;CAAE,CAU7K;AAED,wBAAsB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC,CAKnF;AAED,wBAAsB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAKvF;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAK3F;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAExE;AAED,wBAAsB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,GAAG,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC,CAU/H;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAInG;AAED,wBAAsB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,cAAc,GAAG,cAAc,EAAE,OAAO,EAAE,aAAa,GAAG,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwClL;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjG;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC9J;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjG"}
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/validation" />
|
|
24
24
|
/// <reference types="mongoose/types/virtuals" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
27
|
import type { Schema } from 'mongoose';
|
|
27
28
|
import type IPluginOptions from './interfaces/IPluginOptions';
|
|
28
29
|
export declare const patchEventEmitter: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,OAAO,KAAK,EAA2B,MAAM,EAAE,MAAM,UAAU,CAAA;AAC/D,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAA;AAQ7D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAAK,CAAA;AAQnC,eAAO,MAAM,kBAAkB,cAA8B,OAAO,CAAC,CAAC,QAAQ,eAAe,CAAC,CAAC,KAAG,IA+CjG,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { QueryOptions, ToObjectOptions } from 'mongoose';
|
|
26
27
|
export declare const isHookIgnored: <T>(options: QueryOptions<T>) => boolean;
|
|
27
28
|
export declare const toObjectOptions: ToObjectOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE7D,eAAO,MAAM,aAAa,eAAgB,aAAa,CAAC,CAAC,KAAG,OAE3D,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,eAG7B,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { Schema } from 'mongoose';
|
|
26
27
|
import type IPluginOptions from '../interfaces/IPluginOptions';
|
|
27
28
|
export declare const deleteHooksInitialize: <T>(schema: Schema<T>, opts: IPluginOptions<T>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/delete-hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/delete-hooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,KAAK,EAAoD,MAAM,EAAE,MAAM,UAAU,CAAA;AACxF,OAAO,KAAK,cAAc,MAAM,8BAA8B,CAAA;AAa9D,eAAO,MAAM,qBAAqB,cAAe,OAAO,CAAC,CAAC,QAAQ,eAAe,CAAC,CAAC,KAAG,IAuCrF,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { Schema } from 'mongoose';
|
|
26
27
|
import type IPluginOptions from '../interfaces/IPluginOptions';
|
|
27
28
|
export declare const saveHooksInitialize: <T>(schema: Schema<T>, opts: IPluginOptions<T>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/save-hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"save-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/save-hooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGA,OAAO,KAAK,EAA2B,MAAM,EAAE,MAAM,UAAU,CAAA;AAC/D,OAAO,KAAK,cAAc,MAAM,8BAA8B,CAAA;AAG9D,eAAO,MAAM,mBAAmB,cAAe,OAAO,CAAC,CAAC,QAAQ,eAAe,CAAC,CAAC,KAAG,IAwBnF,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { HydratedDocument, Schema, UpdateQuery, UpdateWithAggregationPipeline } from 'mongoose';
|
|
26
27
|
import type IPluginOptions from '../interfaces/IPluginOptions';
|
|
27
28
|
export declare const assignUpdate: <T>(document: HydratedDocument<T>, update: UpdateQuery<T>, commands: Record<string, unknown>[]) => HydratedDocument<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/update-hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/update-hooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAkC,MAAM,EAAE,WAAW,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;AACpI,OAAO,KAAK,cAAc,MAAM,8BAA8B,CAAA;AAa9D,eAAO,MAAM,YAAY,gBAAiB,iBAAiB,CAAC,CAAC,UAAU,YAAY,CAAC,CAAC,YAAY,OAAO,MAAM,EAAE,OAAO,CAAC,EAAE,KAAG,iBAAiB,CAAC,CAe9I,CAAA;AAED,eAAO,MAAM,sBAAsB,mBAAoB,6BAA6B,GAAG,YAAY,CAAC,CAAC,GAAG,IAAI,KAAG;IAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IAAC,QAAQ,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CAiB3K,CAAA;AAED,eAAO,MAAM,qBAAqB,cAAe,OAAO,CAAC,CAAC,QAAQ,eAAe,CAAC,CAAC,KAAG,IAgDrF,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { HydratedDocument } from 'mongoose';
|
|
26
27
|
interface IContext<T> {
|
|
27
28
|
op: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IContext.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IContext.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,UAAU,QAAQ,CAAC,CAAC;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAA;IACnC,WAAW,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAA;IACnC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { Operation } from 'fast-json-patch';
|
|
26
27
|
import type { HydratedDocument } from 'mongoose';
|
|
27
28
|
interface IEvent<T> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEvent.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IEvent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IEvent.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IEvent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,UAAU,MAAM,CAAC,CAAC;IAChB,MAAM,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;IAC5B,GAAG,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;IACzB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAA;CACpB;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { Types } from 'mongoose';
|
|
26
27
|
import type { Operation } from 'fast-json-patch';
|
|
27
28
|
interface IHistory {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IHistory.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IHistory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IHistory.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IHistory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAA;CACpB;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { Query } from 'mongoose';
|
|
26
27
|
import type IContext from './IContext';
|
|
27
28
|
type IHookContext<T> = Query<T, T> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IHookContext.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IHookContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IHookContext.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IHookContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AAEtC,KAAK,YAAY,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;CAAE,CAAA;AAE1E,eAAe,YAAY,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { HydratedDocument } from 'mongoose';
|
|
26
27
|
export type User = Record<string, unknown>;
|
|
27
28
|
export type Metadata = Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPluginOptions.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IPluginOptions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IPluginOptions.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/IPluginOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAC1C,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE9C,UAAU,cAAc,CAAC,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACpC,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;IAC1C,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAA;IAChD,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3D;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import { Schema } from 'mongoose';
|
|
26
27
|
import type IHistory from '../interfaces/IHistory';
|
|
27
28
|
declare const History: import("mongoose").Model<IHistory, {}, {}, {}, import("mongoose").Document<unknown, {}, IHistory> & IHistory & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"History.d.ts","sourceRoot":"","sources":["../../../../src/models/History.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"History.d.ts","sourceRoot":"","sources":["../../../../src/models/History.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAS,MAAM,UAAU,CAAA;AAExC,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAA;AA4ClD,QAAA,MAAM,OAAO;;;;;;GAA6C,CAAA;AAE1D,eAAe,OAAO,CAAA"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
25
26
|
import type { HydratedDocument } from 'mongoose';
|
|
26
27
|
import type IEvent from './interfaces/IEvent';
|
|
27
28
|
import type IContext from './interfaces/IContext';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch.d.ts","sourceRoot":"","sources":["../../../src/patch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"patch.d.ts","sourceRoot":"","sources":["../../../src/patch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAS,MAAM,UAAU,CAAA;AAEvD,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAA;AAC7C,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAA;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AASjE,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAAE,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAAC,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;CAAE,CAU7K;AAED,wBAAsB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC,CAKnF;AAED,wBAAsB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAKvF;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAK3F;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAExE;AAED,wBAAsB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,GAAG,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC,CAU/H;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAInG;AAED,wBAAsB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,cAAc,GAAG,cAAc,EAAE,OAAO,EAAE,aAAa,GAAG,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwClL;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjG;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC9J;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjG"}
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/validation" />
|
|
24
24
|
/// <reference types="mongoose/types/virtuals" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
27
|
import type { Schema } from 'mongoose';
|
|
27
28
|
import type IPluginOptions from './interfaces/IPluginOptions';
|
|
28
29
|
export declare const patchEventEmitter: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,OAAO,KAAK,EAA2B,MAAM,EAAE,MAAM,UAAU,CAAA;AAC/D,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAA;AAQ7D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAAK,CAAA;AAQnC,eAAO,MAAM,kBAAkB,cAA8B,OAAO,CAAC,CAAC,QAAQ,eAAe,CAAC,CAAC,KAAG,IA+CjG,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-patch-mongoose",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "Patch history & events for mongoose models",
|
|
5
5
|
"author": "Alex Eagle",
|
|
6
6
|
"license": "MIT",
|
|
@@ -81,30 +81,31 @@
|
|
|
81
81
|
"lodash": "4.17.21",
|
|
82
82
|
"omit-deep": "0.3.0",
|
|
83
83
|
"power-assign": "0.2.10",
|
|
84
|
-
"semver": "7.6.
|
|
84
|
+
"semver": "7.6.2"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@shelf/jest-mongodb": "4.2
|
|
88
|
-
"@stylistic/eslint-plugin": "1.
|
|
87
|
+
"@shelf/jest-mongodb": "4.3.2",
|
|
88
|
+
"@stylistic/eslint-plugin": "2.1.0",
|
|
89
89
|
"@swc/cli": "0.3.12",
|
|
90
|
-
"@swc/core": "1.
|
|
91
|
-
"@swc/helpers": "0.5.
|
|
90
|
+
"@swc/core": "1.5.7",
|
|
91
|
+
"@swc/helpers": "0.5.11",
|
|
92
92
|
"@swc/jest": "0.2.36",
|
|
93
93
|
"@swc/register": "0.1.10",
|
|
94
94
|
"@types/jest": "29.5.12",
|
|
95
|
-
"@types/lodash": "4.17.
|
|
95
|
+
"@types/lodash": "4.17.4",
|
|
96
96
|
"@types/node": "20",
|
|
97
|
-
"@
|
|
98
|
-
"@typescript-eslint/
|
|
97
|
+
"@types/semver": "7.5.8",
|
|
98
|
+
"@typescript-eslint/eslint-plugin": "7.9.0",
|
|
99
|
+
"@typescript-eslint/parser": "7.9.0",
|
|
99
100
|
"eslint": "8.57.0",
|
|
100
|
-
"eslint-plugin-jest": "
|
|
101
|
+
"eslint-plugin-jest": "28.5.0",
|
|
101
102
|
"eslint-plugin-jest-formatting": "3.1.0",
|
|
102
|
-
"eslint-plugin-sonarjs": "0.25.
|
|
103
|
+
"eslint-plugin-sonarjs": "0.25.1",
|
|
103
104
|
"jest": "29.7.0",
|
|
104
105
|
"merge": "2.1.1",
|
|
105
|
-
"mongoose": "8.
|
|
106
|
+
"mongoose": "8.4.0",
|
|
106
107
|
"open-cli": "8.0.0",
|
|
107
|
-
"typescript": "5.4.
|
|
108
|
+
"typescript": "5.4.5"
|
|
108
109
|
},
|
|
109
110
|
"peerDependencies": {
|
|
110
111
|
"mongoose": ">=6.6.0 < 9"
|
|
@@ -107,9 +107,9 @@ describe('plugin - event delete & patch history disabled', () => {
|
|
|
107
107
|
const [john] = users
|
|
108
108
|
|
|
109
109
|
if (isMongooseLessThan7) {
|
|
110
|
-
await User.remove({ role: 'user' }, { single: true }).exec()
|
|
110
|
+
await User.remove({ role: 'user', name: 'John' }, { single: true }).exec()
|
|
111
111
|
} else {
|
|
112
|
-
await User.deleteOne({ role: 'user' }).exec()
|
|
112
|
+
await User.deleteOne({ role: 'user', name: 'John' }).exec()
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
const history = await History.find({})
|
|
@@ -314,9 +314,9 @@ describe('plugin - event delete & patch history disabled', () => {
|
|
|
314
314
|
const [john] = users
|
|
315
315
|
|
|
316
316
|
if (isMongooseLessThan7) {
|
|
317
|
-
await User.deleteMany({
|
|
317
|
+
await User.deleteMany({ name: 'John' }, { single: true }).exec()
|
|
318
318
|
} else {
|
|
319
|
-
await User.deleteOne({
|
|
319
|
+
await User.deleteOne({ name: 'John' }).exec()
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
const history = await History.find({})
|