@90soft/parse-server-kit 2.6.0 → 2.8.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/README.md +613 -424
- package/dist/database/schema.d.ts +14 -0
- package/dist/database/schema.d.ts.map +1 -1
- package/dist/database/schema.js +2 -1
- package/dist/database/schema.js.map +1 -1
- package/dist/database/versionRegistry.d.ts +35 -0
- package/dist/database/versionRegistry.d.ts.map +1 -0
- package/dist/database/versionRegistry.js +153 -0
- package/dist/database/versionRegistry.js.map +1 -0
- package/dist/database/versionedMongoAdapter.d.ts +51 -0
- package/dist/database/versionedMongoAdapter.d.ts.map +1 -0
- package/dist/database/versionedMongoAdapter.js +131 -0
- package/dist/database/versionedMongoAdapter.js.map +1 -0
- package/dist/decorators/cloudRegistry.d.ts.map +1 -1
- package/dist/decorators/cloudRegistry.js +5 -0
- package/dist/decorators/cloudRegistry.js.map +1 -1
- package/dist/decorators/triggerDecorator.d.ts +8 -0
- package/dist/decorators/triggerDecorator.d.ts.map +1 -1
- package/dist/decorators/triggerDecorator.js +10 -1
- package/dist/decorators/triggerDecorator.js.map +1 -1
- package/dist/decorators/triggerRegistry.d.ts.map +1 -1
- package/dist/decorators/triggerRegistry.js +52 -8
- package/dist/decorators/triggerRegistry.js.map +1 -1
- package/dist/decorators/types/triggerTypes.d.ts +1 -1
- package/dist/decorators/types/triggerTypes.d.ts.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -2
- package/dist/index.js.map +1 -1
- package/dist/middleware/middleware.d.ts.map +1 -1
- package/dist/middleware/middleware.js +34 -1
- package/dist/middleware/middleware.js.map +1 -1
- package/dist/middleware/rateLimit.d.ts.map +1 -1
- package/dist/middleware/rateLimit.js +7 -1
- package/dist/middleware/rateLimit.js.map +1 -1
- package/dist/swagger/index.d.ts +5 -1
- package/dist/swagger/index.d.ts.map +1 -1
- package/dist/swagger/index.js +32 -8
- package/dist/swagger/index.js.map +1 -1
- package/dist/transactions/ambientSession.d.ts +39 -0
- package/dist/transactions/ambientSession.d.ts.map +1 -0
- package/dist/transactions/ambientSession.js +88 -0
- package/dist/transactions/ambientSession.js.map +1 -0
- package/dist/transactions/context.d.ts +86 -0
- package/dist/transactions/context.d.ts.map +1 -0
- package/dist/transactions/context.js +124 -0
- package/dist/transactions/context.js.map +1 -0
- package/dist/utils/dynamicImport.d.ts +22 -1
- package/dist/utils/dynamicImport.d.ts.map +1 -1
- package/dist/utils/dynamicImport.js +13 -4
- package/dist/utils/dynamicImport.js.map +1 -1
- package/dist/utils/helper.d.ts +10 -1
- package/dist/utils/helper.d.ts.map +1 -1
- package/dist/utils/helper.js +10 -1
- package/dist/utils/helper.js.map +1 -1
- package/package.json +75 -54
|
@@ -9,6 +9,19 @@ export interface SchemaConfigOptions {
|
|
|
9
9
|
recreateModifiedFields?: boolean;
|
|
10
10
|
/** Delete fields not in schema. DANGEROUS. Default: false */
|
|
11
11
|
deleteExtraFields?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Keep indexes that this schema does not describe. Default: `true`.
|
|
14
|
+
*
|
|
15
|
+
* `applyAllIndexes()` creates unique, compound, TTL and 2dsphere indexes by
|
|
16
|
+
* talking to the MongoDB driver directly, which means parse-server's schema
|
|
17
|
+
* sync has never heard of them. Left to itself it treats an index it cannot
|
|
18
|
+
* account for as drift and drops it — taking your uniqueness constraints with
|
|
19
|
+
* it, quietly, on a restart.
|
|
20
|
+
*
|
|
21
|
+
* Defaulted to `true` because the alternative loses data integrity by
|
|
22
|
+
* accident. Requires parse-server 8.3+; older servers ignore it.
|
|
23
|
+
*/
|
|
24
|
+
keepUnknownIndexes?: boolean;
|
|
12
25
|
}
|
|
13
26
|
/**
|
|
14
27
|
* Creates Parse Server schema configuration from decorator metadata.
|
|
@@ -51,5 +64,6 @@ export declare function createSchemaConfig(options?: SchemaConfigOptions): {
|
|
|
51
64
|
strict: boolean;
|
|
52
65
|
recreateModifiedFields: boolean;
|
|
53
66
|
deleteExtraFields: boolean;
|
|
67
|
+
keepUnknownIndexes: boolean;
|
|
54
68
|
};
|
|
55
69
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/database/schema.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0EAA0E;IAC1E,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/database/schema.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0EAA0E;IAC1E,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,mBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCnE"}
|
package/dist/database/schema.js
CHANGED
|
@@ -8,7 +8,7 @@ const schemaTypes_1 = require("../decorators/types/schemaTypes");
|
|
|
8
8
|
* Reads all @ParseClass and @ParseField decorators automatically.
|
|
9
9
|
*/
|
|
10
10
|
function createSchemaConfig(options = {}) {
|
|
11
|
-
const { adminRole = 'SuperAdmin', lockSchemas = false, strict = true, recreateModifiedFields = false, deleteExtraFields = false, } = options;
|
|
11
|
+
const { adminRole = 'SuperAdmin', lockSchemas = false, strict = true, recreateModifiedFields = false, deleteExtraFields = false, keepUnknownIndexes = true, } = options;
|
|
12
12
|
return {
|
|
13
13
|
definitions: [
|
|
14
14
|
{
|
|
@@ -33,6 +33,7 @@ function createSchemaConfig(options = {}) {
|
|
|
33
33
|
strict,
|
|
34
34
|
recreateModifiedFields,
|
|
35
35
|
deleteExtraFields,
|
|
36
|
+
keepUnknownIndexes,
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/database/schema.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/database/schema.ts"],"names":[],"mappings":";;AAiCA,gDAoCC;AArED,mEAAkE;AAClE,iEAA2D;AA4B3D;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,UAA+B,EAAE;IAClE,MAAM,EACJ,SAAS,GAAG,YAAY,EACxB,WAAW,GAAG,KAAK,EACnB,MAAM,GAAG,IAAI,EACb,sBAAsB,GAAG,KAAK,EAC9B,iBAAiB,GAAG,KAAK,EACzB,kBAAkB,GAAG,IAAI,GAC1B,GAAG,OAAO,CAAC;IAEZ,OAAO;QACL,WAAW,EAAE;YACX;gBACE,SAAS,EAAE,OAAO;gBAClB,MAAM,EAAE,EAAE;gBACV,qBAAqB,EAAE;oBACrB,IAAI,EAAE,EAAC,CAAC,QAAQ,SAAS,EAAE,CAAC,EAAE,IAAI,EAAC;oBACnC,GAAG,EAAE,EAAC,CAAC,QAAQ,SAAS,EAAE,CAAC,EAAE,IAAI,EAAC;oBAClC,KAAK,EAAE,EAAC,CAAC,QAAQ,SAAS,EAAE,CAAC,EAAE,IAAI,EAAC;oBACpC,MAAM,EAAE,EAAC,CAAC,QAAQ,SAAS,EAAE,CAAC,EAAE,IAAI,EAAC;oBACrC,MAAM,EAAE,EAAC,CAAC,QAAQ,SAAS,EAAE,CAAC,EAAE,IAAI,EAAC;oBACrC,MAAM,EAAE,EAAC,CAAC,QAAQ,SAAS,EAAE,CAAC,EAAE,IAAI,EAAC;oBACrC,eAAe,EAAE,EAAE;iBACpB;aACF;YACD,GAAG,wBAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;gBAC5B,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBACxD,OAAO,IAAA,qCAAmB,EAAC,gBAAgB,CAAC,CAAC;YAC/C,CAAC,CAAC;SACH;QACD,WAAW;QACX,MAAM;QACN,sBAAsB;QACtB,iBAAiB;QACjB,kBAAkB;KACnB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const VersionRegistry: {
|
|
2
|
+
/** The version field of this class, or nothing if it is not versioned. */
|
|
3
|
+
fieldFor(className: string): string | undefined;
|
|
4
|
+
isVersioned(className: string): boolean;
|
|
5
|
+
/** Every versioned class, for tests and for reporting at boot. */
|
|
6
|
+
classNames(): string[];
|
|
7
|
+
/** Told by `createVersionedMongoAdapter`, so `verify` can spot its absence. */
|
|
8
|
+
markAdapterInstalled(): void;
|
|
9
|
+
adapterIsInstalled(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Say so, at boot, if optimistic locking has been asked for but cannot work.
|
|
12
|
+
*
|
|
13
|
+
* `@ParseVersionField` does nothing on its own — the guarding lives in the
|
|
14
|
+
* database adapter. Declare the field, forget the adapter (or run on
|
|
15
|
+
* Postgres, which this does not support), and every save proceeds unguarded
|
|
16
|
+
* with no error and no log: the exact shape of failure a lock is supposed to
|
|
17
|
+
* prevent. This turns that silence into a line in the boot output.
|
|
18
|
+
*
|
|
19
|
+
* Called from `CloudFunctionRegistry.initialize()`, which consumers already
|
|
20
|
+
* run after the server is configured — by then both the models and the
|
|
21
|
+
* adapter are known.
|
|
22
|
+
*/
|
|
23
|
+
verify(): void;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Mark this field as the class's version.
|
|
27
|
+
*
|
|
28
|
+
* Applies `@ParseField` itself, so the field is declared once. Nothing else in
|
|
29
|
+
* the codebase reads or writes it: the adapter increments it on every update,
|
|
30
|
+
* and refuses an update whose asserted version is no longer the current one.
|
|
31
|
+
*/
|
|
32
|
+
export declare function ParseVersionField(options?: {
|
|
33
|
+
description?: string;
|
|
34
|
+
}): (target: object, propertyKey: string | symbol) => void;
|
|
35
|
+
//# sourceMappingURL=versionRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionRegistry.d.ts","sourceRoot":"","sources":["../../src/database/versionRegistry.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,eAAe;IAC1B,0EAA0E;wBACtD,MAAM,GAAG,MAAM,GAAG,SAAS;2BAIxB,MAAM,GAAG,OAAO;IAIvC,kEAAkE;kBACpD,MAAM,EAAE;IAItB,+EAA+E;4BACvD,IAAI;0BAIN,OAAO;IAI7B;;;;;;;;;;;;OAYG;cACO,IAAI;CAmBf,CAAC;AAoDF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,GAAE;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAM,GACnC,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAmBxD"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VersionRegistry = void 0;
|
|
4
|
+
exports.ParseVersionField = ParseVersionField;
|
|
5
|
+
const parseDecorators_1 = require("../decorators/parseDecorators");
|
|
6
|
+
/**
|
|
7
|
+
* Optimistic locking, declared on the field rather than written into functions.
|
|
8
|
+
*
|
|
9
|
+
* Two people reading the same record and both saving is a lost update: the
|
|
10
|
+
* second write silently overwrites the first, and neither is told. Guarding
|
|
11
|
+
* against it in every cloud function means remembering to, every time, forever.
|
|
12
|
+
*
|
|
13
|
+
* `@ParseVersionField()` moves the guard under the endpoints. It does three
|
|
14
|
+
* things:
|
|
15
|
+
*
|
|
16
|
+
* 1. declares the field as a normal `Number` on the schema;
|
|
17
|
+
* 2. records that this class is versioned, and by which field, so the
|
|
18
|
+
* database adapter can find it;
|
|
19
|
+
* 3. makes every object read from the database carry the version it read, so
|
|
20
|
+
* a later save asserts it without anybody asking.
|
|
21
|
+
*
|
|
22
|
+
* The database then does the checking — see `versionedMongoAdapter.ts`. An
|
|
23
|
+
* endpoint neither reads nor writes the field.
|
|
24
|
+
*/
|
|
25
|
+
/** Where a class parks its version field until `@ParseClass` names the class. */
|
|
26
|
+
const PENDING_VERSION_FIELD = Symbol.for('fsm:pendingVersionField');
|
|
27
|
+
/** className → the field that carries its version. */
|
|
28
|
+
const versionedClasses = new Map();
|
|
29
|
+
// `@ParseField` runs before `@ParseClass`, so the field is known before the
|
|
30
|
+
// class name is. This hook is where the two meet.
|
|
31
|
+
(0, parseDecorators_1.onClassRegistered)((className, constructor) => {
|
|
32
|
+
const field = constructor[PENDING_VERSION_FIELD];
|
|
33
|
+
if (field) {
|
|
34
|
+
versionedClasses.set(className, field);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
/** Set once `createVersionedMongoAdapter` has actually built the adapter. */
|
|
38
|
+
let adapterInstalled = false;
|
|
39
|
+
exports.VersionRegistry = {
|
|
40
|
+
/** The version field of this class, or nothing if it is not versioned. */
|
|
41
|
+
fieldFor(className) {
|
|
42
|
+
return versionedClasses.get(className);
|
|
43
|
+
},
|
|
44
|
+
isVersioned(className) {
|
|
45
|
+
return versionedClasses.has(className);
|
|
46
|
+
},
|
|
47
|
+
/** Every versioned class, for tests and for reporting at boot. */
|
|
48
|
+
classNames() {
|
|
49
|
+
return [...versionedClasses.keys()];
|
|
50
|
+
},
|
|
51
|
+
/** Told by `createVersionedMongoAdapter`, so `verify` can spot its absence. */
|
|
52
|
+
markAdapterInstalled() {
|
|
53
|
+
adapterInstalled = true;
|
|
54
|
+
},
|
|
55
|
+
adapterIsInstalled() {
|
|
56
|
+
return adapterInstalled;
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Say so, at boot, if optimistic locking has been asked for but cannot work.
|
|
60
|
+
*
|
|
61
|
+
* `@ParseVersionField` does nothing on its own — the guarding lives in the
|
|
62
|
+
* database adapter. Declare the field, forget the adapter (or run on
|
|
63
|
+
* Postgres, which this does not support), and every save proceeds unguarded
|
|
64
|
+
* with no error and no log: the exact shape of failure a lock is supposed to
|
|
65
|
+
* prevent. This turns that silence into a line in the boot output.
|
|
66
|
+
*
|
|
67
|
+
* Called from `CloudFunctionRegistry.initialize()`, which consumers already
|
|
68
|
+
* run after the server is configured — by then both the models and the
|
|
69
|
+
* adapter are known.
|
|
70
|
+
*/
|
|
71
|
+
verify() {
|
|
72
|
+
const versioned = this.classNames();
|
|
73
|
+
if (versioned.length === 0)
|
|
74
|
+
return;
|
|
75
|
+
if (!adapterInstalled) {
|
|
76
|
+
console.warn(`[Versioning] ${versioned.length} class(es) declare @ParseVersionField ` +
|
|
77
|
+
`(${versioned.join(', ')}), but createVersionedMongoAdapter() was never called. ` +
|
|
78
|
+
'Optimistic locking is INACTIVE — stale saves will overwrite silently. ' +
|
|
79
|
+
'Pass the adapter to ParseServer via `databaseAdapter`, and note that ' +
|
|
80
|
+
'this feature is MongoDB-only.');
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
console.log(`[Versioning] Optimistic locking active on: ${versioned.join(', ')}`);
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Put the version this copy was read at into the payload of every save.
|
|
88
|
+
*
|
|
89
|
+
* A Parse save sends only the fields that changed, and a version nobody touched
|
|
90
|
+
* is not one of them — so the database would have nothing to check against.
|
|
91
|
+
*
|
|
92
|
+
* The hook is the payload rather than the object. Marking the field dirty on
|
|
93
|
+
* read would work too, but it leaves the object permanently dirty, and Parse
|
|
94
|
+
* then serializes it as a bare pointer in a cloud function response — every
|
|
95
|
+
* job in a list would come back as `{__type, className, objectId}` and nothing
|
|
96
|
+
* else. Building the assertion at save time instead touches no state at all.
|
|
97
|
+
*
|
|
98
|
+
* `_getSaveJSON` is what both `save()` and `saveAll()` call to build a request
|
|
99
|
+
* body, which is why an endpoint never has to do this itself.
|
|
100
|
+
*/
|
|
101
|
+
function assertVersionOnSave(prototype, field) {
|
|
102
|
+
const inherited = prototype._getSaveJSON;
|
|
103
|
+
if (typeof inherited !== 'function') {
|
|
104
|
+
// The one place this feature leans on a Parse SDK internal. If the SDK ever
|
|
105
|
+
// moves it, locking would quietly stop asserting anything — so say so here
|
|
106
|
+
// rather than let it degrade in silence.
|
|
107
|
+
console.warn('[Versioning] Parse.Object.prototype._getSaveJSON not found — this Parse ' +
|
|
108
|
+
'SDK version is not compatible with @ParseVersionField. Optimistic ' +
|
|
109
|
+
'locking is INACTIVE for this class; saves will not assert a version.');
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
Object.defineProperty(prototype, '_getSaveJSON', {
|
|
113
|
+
value: function () {
|
|
114
|
+
const body = inherited.call(this);
|
|
115
|
+
// A create has nothing to assert against; the adapter gives it its first
|
|
116
|
+
// version. An object built from an id rather than read has no version to
|
|
117
|
+
// assert, and is simply not protected.
|
|
118
|
+
if (this.id) {
|
|
119
|
+
const version = this.get(field);
|
|
120
|
+
if (typeof version === 'number') {
|
|
121
|
+
body[field] = version;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return body;
|
|
125
|
+
},
|
|
126
|
+
writable: true,
|
|
127
|
+
configurable: true,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Mark this field as the class's version.
|
|
132
|
+
*
|
|
133
|
+
* Applies `@ParseField` itself, so the field is declared once. Nothing else in
|
|
134
|
+
* the codebase reads or writes it: the adapter increments it on every update,
|
|
135
|
+
* and refuses an update whose asserted version is no longer the current one.
|
|
136
|
+
*/
|
|
137
|
+
function ParseVersionField(options = {}) {
|
|
138
|
+
return (target, propertyKey) => {
|
|
139
|
+
const field = String(propertyKey);
|
|
140
|
+
(0, parseDecorators_1.ParseField)({
|
|
141
|
+
type: 'Number',
|
|
142
|
+
// Set by the adapter when the row is created, so a caller never supplies
|
|
143
|
+
// one and a create that omits it is not a validation failure.
|
|
144
|
+
required: false,
|
|
145
|
+
description: options.description ??
|
|
146
|
+
'Row version. Incremented on every update; a save asserting a stale one is refused',
|
|
147
|
+
})(target, propertyKey);
|
|
148
|
+
const constructor = target.constructor;
|
|
149
|
+
constructor[PENDING_VERSION_FIELD] = field;
|
|
150
|
+
assertVersionOnSave(target, field);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=versionRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionRegistry.js","sourceRoot":"","sources":["../../src/database/versionRegistry.ts"],"names":[],"mappings":";;;AA6JA,8CAqBC;AAlLD,mEAA4E;AAE5E;;;;;;;;;;;;;;;;;;GAkBG;AAEH,iFAAiF;AACjF,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;AAEpE,sDAAsD;AACtD,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEnD,4EAA4E;AAC5E,kDAAkD;AAClD,IAAA,mCAAiB,EAAC,CAAC,SAAS,EAAE,WAAW,EAAE,EAAE;IAC3C,MAAM,KAAK,GAAI,WAAiD,CAC9D,qBAAqB,CACtB,CAAC;IACF,IAAI,KAAK,EAAE,CAAC;QACV,gBAAgB,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,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.
|
|
3
|
+
*
|
|
4
|
+
* Shared with the transaction layer deliberately: losing an optimistic lock and
|
|
5
|
+
* losing a transaction's race are the same event to whoever is looking at it.
|
|
6
|
+
*/
|
|
7
|
+
export declare const VERSION_CONFLICT: number;
|
|
8
|
+
export declare const VERSION_CONFLICT_MESSAGE = "Somebody else changed this while you were working on it. Open it again and redo your change.";
|
|
9
|
+
export type MongoAdapterConstructor = new (options: unknown) => {
|
|
10
|
+
_adaptiveCollection(className: string): Promise<{
|
|
11
|
+
_mongoCollection: Record<string, unknown>;
|
|
12
|
+
}>;
|
|
13
|
+
connect(): Promise<unknown>;
|
|
14
|
+
createTransactionalSession(): Promise<unknown>;
|
|
15
|
+
commitTransactionalSession(session: unknown): Promise<unknown>;
|
|
16
|
+
abortTransactionalSession(session: unknown): Promise<unknown>;
|
|
17
|
+
findOneAndUpdate(className: string, schema: unknown, query: Record<string, unknown>, update: Record<string, unknown>, transactionalSession?: unknown): Promise<unknown>;
|
|
18
|
+
createObject(className: string, schema: unknown, object: Record<string, unknown>, transactionalSession?: unknown): Promise<unknown>;
|
|
19
|
+
find(className: string, schema: unknown, query: Record<string, unknown>, options: Record<string, unknown>): Promise<unknown[]>;
|
|
20
|
+
};
|
|
21
|
+
/** What `createVersionedMongoAdapter` hands back, structurally. */
|
|
22
|
+
export type VersionedMongoAdapter = InstanceType<MongoAdapterConstructor>;
|
|
23
|
+
/**
|
|
24
|
+
* The database adapter that makes `@ParseVersionField` mean something.
|
|
25
|
+
*
|
|
26
|
+
* Parse turns an object update into exactly one `findOneAndUpdate`, so that is
|
|
27
|
+
* the one place where a conditional write can be made to cover every save in
|
|
28
|
+
* the system — cloud function, trigger or REST — without a single endpoint
|
|
29
|
+
* knowing about it.
|
|
30
|
+
*
|
|
31
|
+
* For a versioned class it does two things to the update Parse built:
|
|
32
|
+
*
|
|
33
|
+
* - moves the asserted version out of the update and into the **filter**, so
|
|
34
|
+
* the write only lands if the row is still at the version the caller read;
|
|
35
|
+
* - replaces it with an increment, so the row always moves on and the next
|
|
36
|
+
* reader gets a fresh number.
|
|
37
|
+
*
|
|
38
|
+
* When the filter matches nothing it asks whether the row exists at all, so a
|
|
39
|
+
* lost race is reported as a conflict and a genuinely missing row still reads
|
|
40
|
+
* as missing.
|
|
41
|
+
*
|
|
42
|
+
* Only the single-object path is guarded. `updateObjectsByQuery` (a `many`
|
|
43
|
+
* update) and `upsertOneObject` are untouched: neither is reached by an object
|
|
44
|
+
* save, and a bulk update has no one version to assert.
|
|
45
|
+
*
|
|
46
|
+
* It carries the ambient transaction too. Both jobs meet in the same place for
|
|
47
|
+
* the same reason: this is the one point every write in the system passes
|
|
48
|
+
* through, whichever endpoint, trigger or SDK call started it.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createVersionedMongoAdapter(options: unknown): VersionedMongoAdapter;
|
|
51
|
+
//# sourceMappingURL=versionedMongoAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionedMongoAdapter.d.ts","sourceRoot":"","sources":["../../src/database/versionedMongoAdapter.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,QAAW,CAAC;AACzC,eAAO,MAAM,wBAAwB,iGAAmB,CAAC;AAEzD,MAAM,MAAM,uBAAuB,GAAG,KAAK,OAAO,EAAE,OAAO,KAAK;IAC9D,mBAAmB,CACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAC,CAAC,CAAC;IACxD,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5B,0BAA0B,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/D,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9D,gBAAgB,CACd,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,oBAAoB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,YAAY,CACV,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,oBAAoB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CACvB,CAAC;AAEF,mEAAmE;AACnE,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAC;AAkB1E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,GACf,qBAAqB,CAwHvB"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VERSION_CONFLICT_MESSAGE = exports.VERSION_CONFLICT = void 0;
|
|
4
|
+
exports.createVersionedMongoAdapter = createVersionedMongoAdapter;
|
|
5
|
+
const ambientSession_1 = require("../transactions/ambientSession");
|
|
6
|
+
const context_1 = require("../transactions/context");
|
|
7
|
+
const versionRegistry_1 = require("./versionRegistry");
|
|
8
|
+
/**
|
|
9
|
+
* A save that lost a race, under the one code every conflict reports.
|
|
10
|
+
*
|
|
11
|
+
* Shared with the transaction layer deliberately: losing an optimistic lock and
|
|
12
|
+
* losing a transaction's race are the same event to whoever is looking at it.
|
|
13
|
+
*/
|
|
14
|
+
exports.VERSION_CONFLICT = context_1.CONFLICT;
|
|
15
|
+
exports.VERSION_CONFLICT_MESSAGE = context_1.CONFLICT_MESSAGE;
|
|
16
|
+
/**
|
|
17
|
+
* Load the adapter Parse Server ships with, to extend rather than replace.
|
|
18
|
+
*
|
|
19
|
+
* Required lazily so the class is only built when the server is being
|
|
20
|
+
* configured — importing `parse-server` at module load would pull the whole
|
|
21
|
+
* server into every unit test that touches a model.
|
|
22
|
+
*/
|
|
23
|
+
function baseAdapter() {
|
|
24
|
+
// Not exported from the package root, only from its own module.
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
26
|
+
const { MongoStorageAdapter, } = require('parse-server/lib/Adapters/Storage/Mongo/MongoStorageAdapter');
|
|
27
|
+
return MongoStorageAdapter;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The database adapter that makes `@ParseVersionField` mean something.
|
|
31
|
+
*
|
|
32
|
+
* Parse turns an object update into exactly one `findOneAndUpdate`, so that is
|
|
33
|
+
* the one place where a conditional write can be made to cover every save in
|
|
34
|
+
* the system — cloud function, trigger or REST — without a single endpoint
|
|
35
|
+
* knowing about it.
|
|
36
|
+
*
|
|
37
|
+
* For a versioned class it does two things to the update Parse built:
|
|
38
|
+
*
|
|
39
|
+
* - moves the asserted version out of the update and into the **filter**, so
|
|
40
|
+
* the write only lands if the row is still at the version the caller read;
|
|
41
|
+
* - replaces it with an increment, so the row always moves on and the next
|
|
42
|
+
* reader gets a fresh number.
|
|
43
|
+
*
|
|
44
|
+
* When the filter matches nothing it asks whether the row exists at all, so a
|
|
45
|
+
* lost race is reported as a conflict and a genuinely missing row still reads
|
|
46
|
+
* as missing.
|
|
47
|
+
*
|
|
48
|
+
* Only the single-object path is guarded. `updateObjectsByQuery` (a `many`
|
|
49
|
+
* update) and `upsertOneObject` are untouched: neither is reached by an object
|
|
50
|
+
* save, and a bulk update has no one version to assert.
|
|
51
|
+
*
|
|
52
|
+
* It carries the ambient transaction too. Both jobs meet in the same place for
|
|
53
|
+
* the same reason: this is the one point every write in the system passes
|
|
54
|
+
* through, whichever endpoint, trigger or SDK call started it.
|
|
55
|
+
*/
|
|
56
|
+
function createVersionedMongoAdapter(options) {
|
|
57
|
+
const MongoStorageAdapter = baseAdapter();
|
|
58
|
+
// Named differently from the exported `VersionedMongoAdapter` type so the
|
|
59
|
+
// function's declared return type keeps pointing at the public alias.
|
|
60
|
+
class VersionedAdapter extends MongoStorageAdapter {
|
|
61
|
+
async findOneAndUpdate(className, schema, query, update, transactionalSession) {
|
|
62
|
+
const field = versionRegistry_1.VersionRegistry.fieldFor(className);
|
|
63
|
+
if (!field) {
|
|
64
|
+
return super.findOneAndUpdate(className, schema, query, update, transactionalSession);
|
|
65
|
+
}
|
|
66
|
+
// A number here is the caller saying "this is what I read". Anything else
|
|
67
|
+
// — absent, or an operator — is not an assertion, and the row is only
|
|
68
|
+
// moved on.
|
|
69
|
+
const asserted = update[field];
|
|
70
|
+
const hasAssertion = typeof asserted === 'number';
|
|
71
|
+
const guardedUpdate = {
|
|
72
|
+
...update,
|
|
73
|
+
[field]: { __op: 'Increment', amount: 1 },
|
|
74
|
+
};
|
|
75
|
+
const guardedQuery = hasAssertion ? { ...query, [field]: asserted } : query;
|
|
76
|
+
const result = await super.findOneAndUpdate(className, schema, guardedQuery, guardedUpdate, transactionalSession);
|
|
77
|
+
if (result || !hasAssertion)
|
|
78
|
+
return result;
|
|
79
|
+
// Nothing matched. Either somebody moved it on, or it is gone.
|
|
80
|
+
if (await this.rowExists(className, schema, query)) {
|
|
81
|
+
// The typings only admit Parse's own codes; the wire format is a
|
|
82
|
+
// number, and a code of our own is what keeps this distinguishable
|
|
83
|
+
// from every meaning Parse already has.
|
|
84
|
+
throw new Parse.Error(exports.VERSION_CONFLICT, exports.VERSION_CONFLICT_MESSAGE);
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Give a new row its first version.
|
|
90
|
+
*
|
|
91
|
+
* Creates never reach `findOneAndUpdate`, so without this the first update
|
|
92
|
+
* of a row would have nothing to assert against.
|
|
93
|
+
*/
|
|
94
|
+
createObject(className, schema, object, transactionalSession) {
|
|
95
|
+
const field = versionRegistry_1.VersionRegistry.fieldFor(className);
|
|
96
|
+
const versioned = field && typeof object[field] !== 'number'
|
|
97
|
+
? { ...object, [field]: 1 }
|
|
98
|
+
: object;
|
|
99
|
+
return super.createObject(className, schema, versioned, transactionalSession);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Every collection joins whatever transaction its caller is in.
|
|
103
|
+
*
|
|
104
|
+
* The wrapping is per call rather than cached, because `_adaptiveCollection`
|
|
105
|
+
* hands back a fresh wrapper each time — so there is nothing to accumulate
|
|
106
|
+
* proxies on.
|
|
107
|
+
*/
|
|
108
|
+
_adaptiveCollection(className) {
|
|
109
|
+
return super._adaptiveCollection(className).then(collection => {
|
|
110
|
+
if (!ambientSession_1.NO_AMBIENT_TRANSACTION.has(className)) {
|
|
111
|
+
collection._mongoCollection = (0, ambientSession_1.withAmbientSession)(collection._mongoCollection);
|
|
112
|
+
}
|
|
113
|
+
return collection;
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/** Whether the row is there at all, ignoring what version it is at. */
|
|
117
|
+
async rowExists(className, schema, query) {
|
|
118
|
+
const rows = await this.find(className, schema, query, { limit: 1 });
|
|
119
|
+
return rows.length > 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
const instance = new VersionedAdapter(options);
|
|
123
|
+
// What `withTransaction` opens, commits and aborts. It is told the adapter
|
|
124
|
+
// rather than importing one, so it never learns what a session is.
|
|
125
|
+
(0, context_1.useTransactionAdapter)(instance);
|
|
126
|
+
// So a `@ParseVersionField` with no adapter behind it can be reported at boot
|
|
127
|
+
// instead of failing to guard anything in silence.
|
|
128
|
+
versionRegistry_1.VersionRegistry.markAdapterInstalled();
|
|
129
|
+
return instance;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=versionedMongoAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionedMongoAdapter.js","sourceRoot":"","sources":["../../src/database/versionedMongoAdapter.ts"],"names":[],"mappings":";;;AA+FA,kEA0HC;AAzND,mEAGwC;AACxC,qDAIiC;AACjC,uDAAkD;AAElD;;;;;GAKG;AACU,QAAA,gBAAgB,GAAG,kBAAQ,CAAC;AAC5B,QAAA,wBAAwB,GAAG,0BAAgB,CAAC;AAkCzD;;;;;;GAMG;AACH,SAAS,WAAW;IAClB,gEAAgE;IAChE,8DAA8D;IAC9D,MAAM,EACJ,mBAAmB,GACpB,GAAG,OAAO,CAAC,6DAA6D,CAAC,CAAC;IAC3E,OAAO,mBAA8C,CAAC;AACxD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAgB,2BAA2B,CACzC,OAAgB;IAEhB,MAAM,mBAAmB,GAAG,WAAW,EAAE,CAAC;IAE1C,0EAA0E;IAC1E,sEAAsE;IACtE,MAAM,gBAAiB,SAAQ,mBAAmB;QAChD,KAAK,CAAC,gBAAgB,CACpB,SAAiB,EACjB,MAAe,EACf,KAA8B,EAC9B,MAA+B,EAC/B,oBAA8B;YAE9B,MAAM,KAAK,GAAG,iCAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YAClD,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO,KAAK,CAAC,gBAAgB,CAC3B,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,EACN,oBAAoB,CACrB,CAAC;YACJ,CAAC;YAED,0EAA0E;YAC1E,sEAAsE;YACtE,YAAY;YACZ,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAC/B,MAAM,YAAY,GAAG,OAAO,QAAQ,KAAK,QAAQ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jB,OAAO,KAAK,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;gBAC5D,IAAI,CAAC,uCAAsB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;oBAC3C,UAAU,CAAC,gBAAgB,GAAG,IAAA,mCAAkB,EAC9C,UAAU,CAAC,gBAAgB,CAC5B,CAAC;gBACJ,CAAC;gBACD,OAAO,UAAU,CAAC;YACpB,CAAC,CAAC,CAAC;QACL,CAAC;QAED,uEAAuE;QAC/D,KAAK,CAAC,SAAS,CACrB,SAAiB,EACjB,MAAe,EACf,KAA8B;YAE9B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,EAAC,KAAK,EAAE,CAAC,EAAC,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QACzB,CAAC;KACF;IAED,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC/C,2EAA2E;IAC3E,mEAAmE;IACnE,IAAA,+BAAqB,EAAC,QAAQ,CAAC,CAAC;IAChC,8EAA8E;IAC9E,mDAAmD;IACnD,iCAAe,CAAC,oBAAoB,EAAE,CAAC;IACvC,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudRegistry.d.ts","sourceRoot":"","sources":["../../src/decorators/cloudRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"cloudRegistry.d.ts","sourceRoot":"","sources":["../../src/decorators/cloudRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AAIzD,qBAAa,qBAAqB;IAChC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAiD;IAEzE,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,qBAAqB;IAI/C,MAAM,CAAC,YAAY;IAInB,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM;IAI/B,MAAM,CAAC,UAAU;CAclB"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CloudFunctionRegistry = void 0;
|
|
4
4
|
const routeDecorator_1 = require("./routeDecorator");
|
|
5
|
+
const versionRegistry_1 = require("../database/versionRegistry");
|
|
5
6
|
class CloudFunctionRegistry {
|
|
6
7
|
static register(metadata) {
|
|
7
8
|
this.functions.set(metadata.name, metadata);
|
|
@@ -19,6 +20,10 @@ class CloudFunctionRegistry {
|
|
|
19
20
|
});
|
|
20
21
|
// Build entity-based route map after all functions are registered
|
|
21
22
|
routeDecorator_1.RouteRegistry.initialize();
|
|
23
|
+
// Last point at boot where both the models and the database adapter are
|
|
24
|
+
// known, so it is the only place that can tell whether a declared
|
|
25
|
+
// @ParseVersionField actually has anything enforcing it.
|
|
26
|
+
versionRegistry_1.VersionRegistry.verify();
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
exports.CloudFunctionRegistry = CloudFunctionRegistry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudRegistry.js","sourceRoot":"","sources":["../../src/decorators/cloudRegistry.ts"],"names":[],"mappings":";;;AACA,qDAA+C;
|
|
1
|
+
{"version":3,"file":"cloudRegistry.js","sourceRoot":"","sources":["../../src/decorators/cloudRegistry.ts"],"names":[],"mappings":";;;AACA,qDAA+C;AAC/C,iEAA4D;AAE5D,MAAa,qBAAqB;IAGhC,MAAM,CAAC,QAAQ,CAAC,QAA+B;QAC7C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,CAAC,YAAY;QACjB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,IAAY;QAC7B,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,UAAU;QACf,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAChC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAChF,OAAO,CAAC,GAAG,CAAC,8BAA8B,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;QAEH,kEAAkE;QAClE,8BAAa,CAAC,UAAU,EAAE,CAAC;QAE3B,wEAAwE;QACxE,kEAAkE;QAClE,yDAAyD;QACzD,iCAAe,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;;AA5BH,sDA6BC;AA5BgB,+BAAS,GAAuC,IAAI,GAAG,EAAE,CAAC"}
|
|
@@ -9,10 +9,18 @@ export declare const AfterFind: (config?: TriggerConfig) => (target: any, proper
|
|
|
9
9
|
export declare const BeforeLogin: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
10
10
|
export declare const AfterLogin: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
11
11
|
export declare const AfterLogout: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
12
|
+
/** parse-server 8.5+. Runs before a password reset email is sent. */
|
|
13
|
+
export declare const BeforePasswordResetRequest: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
12
14
|
export declare const BeforeSaveFile: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
13
15
|
export declare const AfterSaveFile: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
14
16
|
export declare const BeforeDeleteFile: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
15
17
|
export declare const AfterDeleteFile: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
18
|
+
/** parse-server 8.1+. */
|
|
19
|
+
export declare const BeforeFindFile: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
20
|
+
/** parse-server 8.1+. */
|
|
21
|
+
export declare const AfterFindFile: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
22
|
+
export declare const BeforeSaveConfig: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
23
|
+
export declare const AfterSaveConfig: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
16
24
|
export declare const BeforeConnect: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
17
25
|
export declare const BeforeSubscribe: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
18
26
|
export declare const AfterEvent: (config?: TriggerConfig) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggerDecorator.d.ts","sourceRoot":"","sources":["../../src/decorators/triggerDecorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAC,aAAa,EAAc,MAAM,sBAAsB,CAAC;AA0BhE,eAAO,MAA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aAAa,MAAM,EAAE,YAAY,kBAAkB,uBAsCjB,CAAC;AACrE,eAAO,MAAM,gBAAgB,YAxCF,aAAa,MACnB,QAAQ,GAAG,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,uBAuCX,CAAC;AAC3E,eAAO,MAAM,eAAe,YAzCD,aAAa,MACnB,QAAQ,GAAG,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,uBAwCb,CAAC;AACzE,yBAAyB;AACzB,eAAO,MAAM,cAAc,YA3CA,aAAa,MACnB,QAAQ,GAAG,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,uBA0Cf,CAAC;AACvE,yBAAyB;AACzB,eAAO,MAAM,aAAa,YA7CC,aAAa,MACnB,QAAQ,GAAG,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,uBA4CjB,CAAC;AAGrE,eAAO,MAAM,gBAAgB,YAhDF,aAAa,MACnB,QAAQ,GAAG,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,uBA+CX,CAAC;AAC3E,eAAO,MAAM,eAAe,YAjDD,aAAa,MACnB,QAAQ,GAAG,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,uBAgDb,CAAC;AAGzE,eAAO,MAAM,aAAa,YApDC,aAAa,MACnB,QAAQ,GAAG,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,uBAmDjB,CAAC;AACrE,eAAO,MAAM,eAAe,YArDD,aAAa,MACnB,QAAQ,GAAG,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,uBAoDb,CAAC;AACzE,eAAO,MAAM,UAAU,YAtDI,aAAa,MACnB,QAAQ,GAAG,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,uBAqDvB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AfterEvent = exports.BeforeSubscribe = exports.BeforeConnect = exports.AfterDeleteFile = exports.BeforeDeleteFile = exports.AfterSaveFile = exports.BeforeSaveFile = exports.AfterLogout = exports.AfterLogin = exports.BeforeLogin = exports.AfterFind = exports.BeforeFind = exports.AfterDelete = exports.BeforeDelete = exports.AfterSave = exports.BeforeSave = void 0;
|
|
3
|
+
exports.AfterEvent = exports.BeforeSubscribe = exports.BeforeConnect = exports.AfterSaveConfig = exports.BeforeSaveConfig = exports.AfterFindFile = exports.BeforeFindFile = exports.AfterDeleteFile = exports.BeforeDeleteFile = exports.AfterSaveFile = exports.BeforeSaveFile = exports.BeforePasswordResetRequest = exports.AfterLogout = exports.AfterLogin = exports.BeforeLogin = exports.AfterFind = exports.BeforeFind = exports.AfterDelete = exports.BeforeDelete = exports.AfterSave = exports.BeforeSave = void 0;
|
|
4
4
|
require("reflect-metadata");
|
|
5
5
|
function createTriggerDecorator(type) {
|
|
6
6
|
return function (config = {}) {
|
|
@@ -33,11 +33,20 @@ exports.AfterFind = createTriggerDecorator('afterFind');
|
|
|
33
33
|
exports.BeforeLogin = createTriggerDecorator('beforeLogin');
|
|
34
34
|
exports.AfterLogin = createTriggerDecorator('afterLogin');
|
|
35
35
|
exports.AfterLogout = createTriggerDecorator('afterLogout');
|
|
36
|
+
/** parse-server 8.5+. Runs before a password reset email is sent. */
|
|
37
|
+
exports.BeforePasswordResetRequest = createTriggerDecorator('beforePasswordResetRequest');
|
|
36
38
|
// File triggers
|
|
37
39
|
exports.BeforeSaveFile = createTriggerDecorator('beforeSaveFile');
|
|
38
40
|
exports.AfterSaveFile = createTriggerDecorator('afterSaveFile');
|
|
39
41
|
exports.BeforeDeleteFile = createTriggerDecorator('beforeDeleteFile');
|
|
40
42
|
exports.AfterDeleteFile = createTriggerDecorator('afterDeleteFile');
|
|
43
|
+
/** parse-server 8.1+. */
|
|
44
|
+
exports.BeforeFindFile = createTriggerDecorator('beforeFindFile');
|
|
45
|
+
/** parse-server 8.1+. */
|
|
46
|
+
exports.AfterFindFile = createTriggerDecorator('afterFindFile');
|
|
47
|
+
// Parse Config triggers (parse-server 7.3+)
|
|
48
|
+
exports.BeforeSaveConfig = createTriggerDecorator('beforeSaveConfig');
|
|
49
|
+
exports.AfterSaveConfig = createTriggerDecorator('afterSaveConfig');
|
|
41
50
|
// LiveQuery triggers
|
|
42
51
|
exports.BeforeConnect = createTriggerDecorator('beforeConnect');
|
|
43
52
|
exports.BeforeSubscribe = createTriggerDecorator('beforeSubscribe');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggerDecorator.js","sourceRoot":"","sources":["../../src/decorators/triggerDecorator.ts"],"names":[],"mappings":";;;AAAA,4BAA0B;AAG1B,SAAS,sBAAsB,CAAC,IAAiB;IAC/C,OAAO,UAAU,SAAwB,EAAE;QACzC,OAAO,UAAU,MAAW,EAAE,WAAmB,EAAE,UAA8B;YAC/E,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC;YACjC,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;gBAClC,MAAM,IAAI,KAAK,CAAC,IAAI,IAAI,4CAA4C,CAAC,CAAC;YACxE,CAAC;YAED,MAAM,WAAW,GAAG,OAAO,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;YAC/E,MAAM,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,uBAAuB,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;YACxF,eAAe,CAAC,IAAI,CAAC;gBACnB,IAAI;gBACJ,OAAO;gBACP,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,UAAU,EAAE,MAAM,CAAC,UAAU;aAC9B,CAAC,CAAC;YACH,OAAO,CAAC,cAAc,CAAC,uBAAuB,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC;YAE9E,OAAO,UAAU,CAAC;QACpB,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,kBAAkB;AACL,QAAA,UAAU,GAAG,sBAAsB,CAA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AAC,CAAC;AAC9D,QAAA,eAAe,GAAG,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;AAEzE,qBAAqB;AACR,QAAA,aAAa,GAAG,sBAAsB,CAAC,eAAe,CAAC,CAAC;AACxD,QAAA,eAAe,GAAG,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;AAC5D,QAAA,UAAU,GAAG,sBAAsB,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggerRegistry.d.ts","sourceRoot":"","sources":["../../src/decorators/triggerRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAc,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"triggerRegistry.d.ts","sourceRoot":"","sources":["../../src/decorators/triggerRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAc,MAAM,sBAAsB,CAAC;AAsBlE,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA2C;IAElE,OAAO,CAAC,MAAM,CAAC,MAAM;IAIrB,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAQhD,MAAM,CAAC,WAAW,IAAI,eAAe,EAAE;IAIvC,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,EAAE;IAIhE,MAAM,CAAC,UAAU,IAAI,IAAI;CAqD1B"}
|