ts-patch-mongoose 2.6.1 → 2.6.3
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 +19 -15
- package/dist/cjs/patch.js +25 -20
- package/dist/cjs/patch.js.map +1 -1
- package/dist/cjs/types/em.d.ts +0 -1
- package/dist/cjs/types/em.d.ts.map +1 -1
- package/dist/cjs/types/helpers.d.ts +0 -25
- package/dist/cjs/types/helpers.d.ts.map +1 -1
- package/dist/cjs/types/hooks/delete-hooks.d.ts +0 -25
- package/dist/cjs/types/hooks/delete-hooks.d.ts.map +1 -1
- package/dist/cjs/types/hooks/save-hooks.d.ts +0 -25
- package/dist/cjs/types/hooks/save-hooks.d.ts.map +1 -1
- package/dist/cjs/types/hooks/update-hooks.d.ts +0 -25
- package/dist/cjs/types/hooks/update-hooks.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/IContext.d.ts +0 -25
- package/dist/cjs/types/interfaces/IContext.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/IEvent.d.ts +0 -25
- package/dist/cjs/types/interfaces/IEvent.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/IHistory.d.ts +0 -25
- package/dist/cjs/types/interfaces/IHistory.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/IHookContext.d.ts +0 -25
- package/dist/cjs/types/interfaces/IHookContext.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/IPluginOptions.d.ts +0 -25
- package/dist/cjs/types/interfaces/IPluginOptions.d.ts.map +1 -1
- package/dist/cjs/types/models/History.d.ts +0 -25
- package/dist/cjs/types/models/History.d.ts.map +1 -1
- package/dist/cjs/types/patch.d.ts +2 -29
- package/dist/cjs/types/patch.d.ts.map +1 -1
- package/dist/cjs/types/plugin.d.ts +12 -38
- package/dist/cjs/types/plugin.d.ts.map +1 -1
- package/dist/esm/patch.js +13 -8
- package/dist/esm/patch.js.map +1 -1
- package/dist/esm/types/em.d.ts +0 -1
- package/dist/esm/types/em.d.ts.map +1 -1
- package/dist/esm/types/helpers.d.ts +0 -25
- package/dist/esm/types/helpers.d.ts.map +1 -1
- package/dist/esm/types/hooks/delete-hooks.d.ts +0 -25
- package/dist/esm/types/hooks/delete-hooks.d.ts.map +1 -1
- package/dist/esm/types/hooks/save-hooks.d.ts +0 -25
- package/dist/esm/types/hooks/save-hooks.d.ts.map +1 -1
- package/dist/esm/types/hooks/update-hooks.d.ts +0 -25
- package/dist/esm/types/hooks/update-hooks.d.ts.map +1 -1
- package/dist/esm/types/interfaces/IContext.d.ts +0 -25
- package/dist/esm/types/interfaces/IContext.d.ts.map +1 -1
- package/dist/esm/types/interfaces/IEvent.d.ts +0 -25
- package/dist/esm/types/interfaces/IEvent.d.ts.map +1 -1
- package/dist/esm/types/interfaces/IHistory.d.ts +0 -25
- package/dist/esm/types/interfaces/IHistory.d.ts.map +1 -1
- package/dist/esm/types/interfaces/IHookContext.d.ts +0 -25
- package/dist/esm/types/interfaces/IHookContext.d.ts.map +1 -1
- package/dist/esm/types/interfaces/IPluginOptions.d.ts +0 -25
- package/dist/esm/types/interfaces/IPluginOptions.d.ts.map +1 -1
- package/dist/esm/types/models/History.d.ts +0 -25
- package/dist/esm/types/models/History.d.ts.map +1 -1
- package/dist/esm/types/patch.d.ts +2 -29
- package/dist/esm/types/patch.d.ts.map +1 -1
- package/dist/esm/types/plugin.d.ts +12 -38
- package/dist/esm/types/plugin.d.ts.map +1 -1
- package/package.json +10 -10
- package/src/patch.ts +16 -8
- package/tests/patch.test.ts +7 -3
- package/tests/plugin-event-deleted.test.ts +1 -1
- package/tests/plugin-global.test.ts +20 -20
- package/tests/plugin-omit-all.test.ts +50 -50
- package/tests/plugin-pre-save.test.ts +53 -0
- package/tests/plugin.test.ts +44 -44
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ I need to track changes of mongoose models and save them as patch history (audit
|
|
|
26
26
|
```json
|
|
27
27
|
{
|
|
28
28
|
"node": "18.x || 20.x || 22.x",
|
|
29
|
-
"mongoose": "6.6.x || 7.x || 8.x",
|
|
29
|
+
"mongoose": ">=6.6.x || 7.x || 8.x",
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
@@ -46,25 +46,29 @@ I need to track changes of mongoose models and save them as patch history (audit
|
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
npm install ts-patch-mongoose
|
|
49
|
-
yarn add ts-patch-mongoose
|
|
50
49
|
pnpm add ts-patch-mongoose
|
|
50
|
+
yarn add ts-patch-mongoose
|
|
51
|
+
bun add ts-patch-mongoose
|
|
51
52
|
```
|
|
52
53
|
|
|
53
|
-
- This plugin requires mongoose
|
|
54
|
+
- This plugin requires mongoose `>=6.6.x || 7.x || 8.x` to be installed as a peer dependency
|
|
54
55
|
|
|
55
56
|
```bash
|
|
56
|
-
# For mongoose 6
|
|
57
|
-
npm install mongoose@6
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
pnpm add mongoose@7
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
# For latest mongoose 6
|
|
58
|
+
npm install mongoose@6
|
|
59
|
+
pnpm add mongoose@6
|
|
60
|
+
yarn add mongoose@6
|
|
61
|
+
bun add mongoose@6
|
|
62
|
+
# For latest mongoose 7
|
|
63
|
+
npm install mongoose@7
|
|
64
|
+
pnpm add mongoose@7
|
|
65
|
+
yarn add mongoose@7
|
|
66
|
+
bun add mongoose@7
|
|
67
|
+
# For latest mongoose 8
|
|
68
|
+
npm install mongoose@8
|
|
69
|
+
pnpm add mongoose@8
|
|
70
|
+
yarn add mongoose@8
|
|
71
|
+
bun add mongoose@8
|
|
68
72
|
```
|
|
69
73
|
|
|
70
74
|
## Example
|
package/dist/cjs/patch.js
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getJsonOmit = getJsonOmit;
|
|
4
|
+
exports.getObjectOmit = getObjectOmit;
|
|
5
|
+
exports.getUser = getUser;
|
|
6
|
+
exports.getReason = getReason;
|
|
7
|
+
exports.getMetadata = getMetadata;
|
|
8
|
+
exports.getValue = getValue;
|
|
9
|
+
exports.getData = getData;
|
|
10
|
+
exports.emitEvent = emitEvent;
|
|
11
|
+
exports.bulkPatch = bulkPatch;
|
|
12
|
+
exports.createPatch = createPatch;
|
|
13
|
+
exports.updatePatch = updatePatch;
|
|
14
|
+
exports.deletePatch = deletePatch;
|
|
4
15
|
const tslib_1 = require("tslib");
|
|
5
16
|
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
6
17
|
const omit_deep_1 = tslib_1.__importDefault(require("omit-deep"));
|
|
@@ -10,41 +21,40 @@ const em_1 = tslib_1.__importDefault(require("./em"));
|
|
|
10
21
|
function isPatchHistoryEnabled(opts, context) {
|
|
11
22
|
return !opts.patchHistoryDisabled && !context.ignorePatchHistory;
|
|
12
23
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
let originalObject = JSON.parse(JSON.stringify(original));
|
|
24
|
+
function getJsonOmit(opts, doc) {
|
|
25
|
+
const object = JSON.parse(JSON.stringify(doc));
|
|
16
26
|
if (opts.omit) {
|
|
17
|
-
|
|
18
|
-
originalObject = (0, omit_deep_1.default)(originalObject, opts.omit);
|
|
27
|
+
return (0, omit_deep_1.default)(object, opts.omit);
|
|
19
28
|
}
|
|
20
|
-
return
|
|
29
|
+
return object;
|
|
30
|
+
}
|
|
31
|
+
function getObjectOmit(opts, doc) {
|
|
32
|
+
if (opts.omit) {
|
|
33
|
+
return (0, omit_deep_1.default)(lodash_1.default.isFunction(doc?.toObject) ? doc.toObject() : doc, opts.omit);
|
|
34
|
+
}
|
|
35
|
+
return doc;
|
|
21
36
|
}
|
|
22
|
-
exports.getObjects = getObjects;
|
|
23
37
|
async function getUser(opts) {
|
|
24
38
|
if (lodash_1.default.isFunction(opts.getUser)) {
|
|
25
39
|
return await opts.getUser();
|
|
26
40
|
}
|
|
27
41
|
return undefined;
|
|
28
42
|
}
|
|
29
|
-
exports.getUser = getUser;
|
|
30
43
|
async function getReason(opts) {
|
|
31
44
|
if (lodash_1.default.isFunction(opts.getReason)) {
|
|
32
45
|
return await opts.getReason();
|
|
33
46
|
}
|
|
34
47
|
return undefined;
|
|
35
48
|
}
|
|
36
|
-
exports.getReason = getReason;
|
|
37
49
|
async function getMetadata(opts) {
|
|
38
50
|
if (lodash_1.default.isFunction(opts.getMetadata)) {
|
|
39
51
|
return await opts.getMetadata();
|
|
40
52
|
}
|
|
41
53
|
return undefined;
|
|
42
54
|
}
|
|
43
|
-
exports.getMetadata = getMetadata;
|
|
44
55
|
function getValue(item) {
|
|
45
56
|
return item.status === 'fulfilled' ? item.value : undefined;
|
|
46
57
|
}
|
|
47
|
-
exports.getValue = getValue;
|
|
48
58
|
async function getData(opts) {
|
|
49
59
|
return Promise
|
|
50
60
|
.allSettled([getUser(opts), getReason(opts), getMetadata(opts)])
|
|
@@ -56,13 +66,11 @@ async function getData(opts) {
|
|
|
56
66
|
];
|
|
57
67
|
});
|
|
58
68
|
}
|
|
59
|
-
exports.getData = getData;
|
|
60
69
|
function emitEvent(context, event, data) {
|
|
61
70
|
if (event && !context.ignoreEvent) {
|
|
62
71
|
em_1.default.emit(event, data);
|
|
63
72
|
}
|
|
64
73
|
}
|
|
65
|
-
exports.emitEvent = emitEvent;
|
|
66
74
|
async function bulkPatch(opts, context, eventKey, docsKey) {
|
|
67
75
|
const history = isPatchHistoryEnabled(opts, context);
|
|
68
76
|
const event = opts[eventKey];
|
|
@@ -84,7 +92,7 @@ async function bulkPatch(opts, context, eventKey, docsKey) {
|
|
|
84
92
|
modelName: context.modelName,
|
|
85
93
|
collectionName: context.collectionName,
|
|
86
94
|
collectionId: doc._id,
|
|
87
|
-
doc,
|
|
95
|
+
doc: getObjectOmit(opts, doc),
|
|
88
96
|
user,
|
|
89
97
|
reason,
|
|
90
98
|
metadata,
|
|
@@ -99,14 +107,13 @@ async function bulkPatch(opts, context, eventKey, docsKey) {
|
|
|
99
107
|
}
|
|
100
108
|
}
|
|
101
109
|
}
|
|
102
|
-
exports.bulkPatch = bulkPatch;
|
|
103
110
|
async function createPatch(opts, context) {
|
|
104
111
|
await bulkPatch(opts, context, 'eventCreated', 'createdDocs');
|
|
105
112
|
}
|
|
106
|
-
exports.createPatch = createPatch;
|
|
107
113
|
async function updatePatch(opts, context, current, original) {
|
|
108
114
|
const history = isPatchHistoryEnabled(opts, context);
|
|
109
|
-
const
|
|
115
|
+
const currentObject = getJsonOmit(opts, current);
|
|
116
|
+
const originalObject = getJsonOmit(opts, original);
|
|
110
117
|
if (lodash_1.default.isEmpty(originalObject) || lodash_1.default.isEmpty(currentObject))
|
|
111
118
|
return;
|
|
112
119
|
const patch = fast_json_patch_1.default.compare(originalObject, currentObject, true);
|
|
@@ -133,9 +140,7 @@ async function updatePatch(opts, context, current, original) {
|
|
|
133
140
|
});
|
|
134
141
|
}
|
|
135
142
|
}
|
|
136
|
-
exports.updatePatch = updatePatch;
|
|
137
143
|
async function deletePatch(opts, context) {
|
|
138
144
|
await bulkPatch(opts, context, 'eventDeleted', 'deletedDocs');
|
|
139
145
|
}
|
|
140
|
-
exports.deletePatch = deletePatch;
|
|
141
146
|
//# sourceMappingURL=patch.js.map
|
package/dist/cjs/patch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch.js","sourceRoot":"","sources":["../../src/patch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"patch.js","sourceRoot":"","sources":["../../src/patch.ts"],"names":[],"mappings":";;AAkBA,kCAQC;AAED,sCAOC;AAED,0BAKC;AAED,8BAKC;AAED,kCAKC;AAED,4BAEC;AAED,0BAUC;AAED,8BAIC;AAED,8BAwCC;AAED,kCAEC;AAED,kCAmCC;AAED,kCAEC;;AArKD,4DAAsB;AACtB,kEAA4B;AAC5B,8EAAuC;AASv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AAC,MAAM,CAAC;YACnB,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,YAAY,EAAE,QAAQ,CAAC,GAAqB;YAC5C,KAAK;YACL,IAAI;YACJ,MAAM;YACN,QAAQ;YACR,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,WAAW,CAAI,IAAuB,EAAE,OAAoB;IAChF,MAAM,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,CAAC,CAAA;AAC/D,CAAC"}
|
package/dist/cjs/types/em.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"em.d.ts","sourceRoot":"","sources":["../../../src/em.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"em.d.ts","sourceRoot":"","sources":["../../../src/em.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,QAAQ,CAAA;AAEjC,cAAM,iBAAkB,SAAQ,YAAY;CAAG;AAC/C,QAAA,MAAM,EAAE,mBAA0B,CAAA;AAElC,eAAe,EAAE,CAAA"}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
1
|
import type { QueryOptions, ToObjectOptions } from 'mongoose';
|
|
27
2
|
export declare const isHookIgnored: <T>(options: QueryOptions<T>) => boolean;
|
|
28
3
|
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,GAAI,CAAC,WAAW,YAAY,CAAC,CAAC,CAAC,KAAG,OAE3D,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,eAG7B,CAAA"}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
1
|
import type { Schema } from 'mongoose';
|
|
27
2
|
import type IPluginOptions from '../interfaces/IPluginOptions';
|
|
28
3
|
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,GAAI,CAAC,UAAU,MAAM,CAAC,CAAC,CAAC,QAAQ,cAAc,CAAC,CAAC,CAAC,KAAG,IAuCrF,CAAA"}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
1
|
import type { Schema } from 'mongoose';
|
|
27
2
|
import type IPluginOptions from '../interfaces/IPluginOptions';
|
|
28
3
|
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,GAAI,CAAC,UAAU,MAAM,CAAC,CAAC,CAAC,QAAQ,cAAc,CAAC,CAAC,CAAC,KAAG,IAwBnF,CAAA"}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
1
|
import type { HydratedDocument, Schema, UpdateQuery, UpdateWithAggregationPipeline } from 'mongoose';
|
|
27
2
|
import type IPluginOptions from '../interfaces/IPluginOptions';
|
|
28
3
|
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,GAAI,CAAC,YAAY,gBAAgB,CAAC,CAAC,CAAC,UAAU,WAAW,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAG,gBAAgB,CAAC,CAAC,CAe9I,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,CAAC,eAAe,6BAA6B,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,KAAG;IAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CAiB3K,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,CAAC,UAAU,MAAM,CAAC,CAAC,CAAC,QAAQ,cAAc,CAAC,CAAC,CAAC,KAAG,IAgDrF,CAAA"}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
1
|
import type { HydratedDocument } from 'mongoose';
|
|
27
2
|
interface IContext<T> {
|
|
28
3
|
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"}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
1
|
import type { Operation } from 'fast-json-patch';
|
|
27
2
|
import type { HydratedDocument } from 'mongoose';
|
|
28
3
|
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"}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
1
|
import type { Types } from 'mongoose';
|
|
27
2
|
import type { Operation } from 'fast-json-patch';
|
|
28
3
|
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"}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
1
|
import type { Query } from 'mongoose';
|
|
27
2
|
import type IContext from './IContext';
|
|
28
3
|
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"}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
1
|
import type { HydratedDocument } from 'mongoose';
|
|
27
2
|
export type User = Record<string, unknown>;
|
|
28
3
|
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"}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
1
|
import { Schema } from 'mongoose';
|
|
27
2
|
import type IHistory from '../interfaces/IHistory';
|
|
28
3
|
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"}
|