oak-backend-base 4.1.18 → 4.1.20
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/lib/AppLoader.d.ts +1 -0
- package/lib/ClusterAppLoader.js +3 -2
- package/package.json +4 -4
package/lib/AppLoader.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare class AppLoader<ED extends EntityDict & BaseEntityDict, Cxt exten
|
|
|
40
40
|
getEndpoints(prefix: string): [string, "post" | "get" | "put" | "delete", string, (params: Record<string, string>, headers: IncomingHttpHeaders, req: IncomingMessage, body?: any) => Promise<{
|
|
41
41
|
headers?: Record<string, string | string[]> | undefined;
|
|
42
42
|
data: any;
|
|
43
|
+
statusCode?: number | undefined;
|
|
43
44
|
}>][];
|
|
44
45
|
protected operateInWatcher<T extends keyof ED>(entity: T, operation: ED[T]['Update'], context: Cxt, singleton?: true): Promise<OperationResult<ED>>;
|
|
45
46
|
protected selectInWatcher<T extends keyof ED>(entity: T, selection: ED[T]['Selection'], context: Cxt, forUpdate?: true, singleton?: true): Promise<Partial<ED[T]["Schema"]>[]>;
|
package/lib/ClusterAppLoader.js
CHANGED
|
@@ -126,8 +126,9 @@ class ClusterAppLoader extends AppLoader_1.AppLoader {
|
|
|
126
126
|
(0, assert_1.default)(!(cs && singleton));
|
|
127
127
|
if (when === 'commit') {
|
|
128
128
|
(0, assert_1.default)(!this.commitTriggers[name], `命名为${name}的trigger出现了多次,请检查`);
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
const needSub = !!(cs || singleton && (0, env_1.getClusterInfo)().instanceId === 0);
|
|
130
|
+
this.commitTriggers[name] = needSub;
|
|
131
|
+
if (needSub) {
|
|
131
132
|
this.sub(name);
|
|
132
133
|
}
|
|
133
134
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oak-backend-base",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.20",
|
|
4
4
|
"description": "oak-backend-base",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"author": {
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"mysql2": "^2.3.3",
|
|
23
23
|
"node-schedule": "^2.1.0",
|
|
24
24
|
"oak-common-aspect": "^3.0.5",
|
|
25
|
-
"oak-db": "^3.3.
|
|
26
|
-
"oak-domain": "^5.1.
|
|
27
|
-
"oak-frontend-base": "^5.3.
|
|
25
|
+
"oak-db": "^3.3.8",
|
|
26
|
+
"oak-domain": "^5.1.26",
|
|
27
|
+
"oak-frontend-base": "^5.3.33",
|
|
28
28
|
"socket.io": "^4.8.1",
|
|
29
29
|
"socket.io-client": "^4.7.2",
|
|
30
30
|
"uuid": "^8.3.2"
|