@vendure/core 2.0.0-next.26 → 2.0.0-next.27
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.
|
@@ -66,6 +66,16 @@ export declare class EventBus implements OnModuleDestroy {
|
|
|
66
66
|
* data related to the event.
|
|
67
67
|
*/
|
|
68
68
|
ofType<T extends VendureEvent>(type: Type<T>): Observable<T>;
|
|
69
|
+
/**
|
|
70
|
+
* @description
|
|
71
|
+
* Returns an RxJS Observable stream of events filtered by a custom predicate.
|
|
72
|
+
* If the event contains a {@link RequestContext} object, the subscriber
|
|
73
|
+
* will only get called after any active database transactions are complete.
|
|
74
|
+
*
|
|
75
|
+
* This means that the subscriber function can safely access all updated
|
|
76
|
+
* data related to the event.
|
|
77
|
+
*/
|
|
78
|
+
filter<T extends VendureEvent>(predicate: (event: VendureEvent) => boolean): Observable<T>;
|
|
69
79
|
/** @internal */
|
|
70
80
|
onModuleDestroy(): any;
|
|
71
81
|
/**
|
|
@@ -85,6 +85,18 @@ let EventBus = class EventBus {
|
|
|
85
85
|
ofType(type) {
|
|
86
86
|
return this.eventStream.asObservable().pipe((0, operators_1.takeUntil)(this.destroy$), (0, operators_1.filter)(e => e.constructor === type), (0, operators_1.mergeMap)(event => this.awaitActiveTransactions(event)), (0, operators_1.filter)(shared_utils_1.notNullOrUndefined));
|
|
87
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* @description
|
|
90
|
+
* Returns an RxJS Observable stream of events filtered by a custom predicate.
|
|
91
|
+
* If the event contains a {@link RequestContext} object, the subscriber
|
|
92
|
+
* will only get called after any active database transactions are complete.
|
|
93
|
+
*
|
|
94
|
+
* This means that the subscriber function can safely access all updated
|
|
95
|
+
* data related to the event.
|
|
96
|
+
*/
|
|
97
|
+
filter(predicate) {
|
|
98
|
+
return this.eventStream.asObservable().pipe((0, operators_1.takeUntil)(this.destroy$), (0, operators_1.filter)(e => predicate(e)), (0, operators_1.mergeMap)(event => this.awaitActiveTransactions(event)), (0, operators_1.filter)(shared_utils_1.notNullOrUndefined));
|
|
99
|
+
}
|
|
88
100
|
/** @internal */
|
|
89
101
|
onModuleDestroy() {
|
|
90
102
|
this.destroy$.next();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-bus.js","sourceRoot":"","sources":["../../src/event-bus/event-bus.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA6D;AAE7D,+BAA2C;AAC3C,8CAA6D;
|
|
1
|
+
{"version":3,"file":"event-bus.js","sourceRoot":"","sources":["../../src/event-bus/event-bus.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA6D;AAE7D,+BAA2C;AAC3C,8CAA6D;AAG7D,mEAAsE;AACtE,mEAA+D;AAC/D,mDAA8D;AAC9D,iFAAyG;AAIzG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0CK;AAEL,IAAa,QAAQ,GAArB,MAAa,QAAQ;IAIjB,YAAoB,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;QAHxD,gBAAW,GAAG,IAAI,cAAO,EAAgB,CAAC;QAC1C,aAAQ,GAAG,IAAI,cAAO,EAAQ,CAAC;IAE4B,CAAC;IAEpE;;;OAGG;IACH,OAAO,CAAyB,KAAQ;QACpC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAyB,IAAa;QACxC,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,IAAI,CACvC,IAAA,qBAAS,EAAC,IAAI,CAAC,QAAQ,CAAC,EACxB,IAAA,kBAAM,EAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,KAAK,IAAI,CAAC,EACnC,IAAA,oBAAQ,EAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,EACtD,IAAA,kBAAM,EA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AAC;YAC9B,OAAQ,UAAkB,CAAC,mCAAuB,CAAC,CAAC;YAEpD,uBAAuB;YACtB,KAAa,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC;YAEjC,OAAO,KAAK,CAAC;SAChB;QAAC,OAAO,CAAM,EAAE;YACb,IAAI,CAAC,YAAY,mDAA0B,EAAE;gBACzC,4DAA4D;gBAC5D,oDAAoD;gBACpD,uDAAuD;gBACvD,OAAO;aACV;YAED,MAAM,CAAC,CAAC;SACX;IACL,CAAC;CACJ,CAAA;AA/GY,QAAQ;IADpB,IAAA,mBAAU,GAAE;qCAKkC,8CAAqB;GAJvD,QAAQ,CA+GpB;AA/GY,4BAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/core",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.27",
|
|
4
4
|
"description": "A modern, headless ecommerce framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@nestjs/testing": "8.3.1",
|
|
51
51
|
"@nestjs/typeorm": "8.0.3",
|
|
52
52
|
"@types/fs-extra": "^9.0.1",
|
|
53
|
-
"@vendure/common": "^2.0.0-next.
|
|
53
|
+
"@vendure/common": "^2.0.0-next.27",
|
|
54
54
|
"apollo-server-express": "3.6.3",
|
|
55
55
|
"bcrypt": "^5.1.0",
|
|
56
56
|
"body-parser": "^1.19.0",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"sqlite3": "^5.0.0",
|
|
102
102
|
"typescript": "4.5.5"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "536e4f83bb0377063ff50684c8c6c08fafb23339"
|
|
105
105
|
}
|