oak-backend-base 3.1.2 → 3.2.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/lib/AppLoader.d.ts +32 -31
- package/lib/AppLoader.js +344 -343
- package/lib/DataSubscriber.d.ts +18 -18
- package/lib/DataSubscriber.js +158 -148
- package/lib/DbStore.d.ts +18 -18
- package/lib/DbStore.js +116 -116
- package/lib/cluster/DataSubscriber.d.ts +18 -0
- package/lib/cluster/DataSubscriber.js +158 -0
- package/lib/cluster/env.d.ts +5 -0
- package/lib/cluster/env.js +41 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +7 -5
- package/lib/polyfill.d.ts +3 -3
- package/package.json +41 -41
package/lib/AppLoader.d.ts
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/base-app-domain';
|
|
3
|
-
import { AppLoader as GeneralAppLoader, EntityDict, OpRecord } from "oak-domain/lib/types";
|
|
4
|
-
import { DbStore } from "./DbStore";
|
|
5
|
-
import { BackendRuntimeContext } from 'oak-frontend-base';
|
|
6
|
-
import { IncomingHttpHeaders, IncomingMessage } from 'http';
|
|
7
|
-
import { Namespace } from 'socket.io';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
private
|
|
11
|
-
private
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
private
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/base-app-domain';
|
|
3
|
+
import { AppLoader as GeneralAppLoader, EntityDict, OpRecord } from "oak-domain/lib/types";
|
|
4
|
+
import { DbStore } from "./DbStore";
|
|
5
|
+
import { BackendRuntimeContext } from 'oak-frontend-base';
|
|
6
|
+
import { IncomingHttpHeaders, IncomingMessage } from 'http';
|
|
7
|
+
import { Namespace } from 'socket.io';
|
|
8
|
+
import { ClusterInfo } from 'oak-domain/lib/types/Cluster';
|
|
9
|
+
export declare class AppLoader<ED extends EntityDict & BaseEntityDict, Cxt extends BackendRuntimeContext<ED>> extends GeneralAppLoader<ED, Cxt> {
|
|
10
|
+
private dbStore;
|
|
11
|
+
private aspectDict;
|
|
12
|
+
private externalDependencies;
|
|
13
|
+
private dataSubscriber?;
|
|
14
|
+
private contextBuilder;
|
|
15
|
+
private requireSth;
|
|
16
|
+
constructor(path: string, contextBuilder: (scene?: string) => (store: DbStore<ED, Cxt>, header?: IncomingHttpHeaders, clusterInfo?: ClusterInfo) => Promise<Cxt>, ns?: Namespace);
|
|
17
|
+
initTriggers(): void;
|
|
18
|
+
startWatchers(): void;
|
|
19
|
+
mount(initialize?: true): Promise<void>;
|
|
20
|
+
unmount(): Promise<void>;
|
|
21
|
+
execAspect(name: string, header?: IncomingHttpHeaders, contextString?: string, params?: any): Promise<{
|
|
22
|
+
opRecords: OpRecord<ED>[];
|
|
23
|
+
result: any;
|
|
24
|
+
message?: string;
|
|
25
|
+
}>;
|
|
26
|
+
initialize(dropIfExists?: boolean): Promise<void>;
|
|
27
|
+
getStore(): DbStore<ED, Cxt>;
|
|
28
|
+
getEndpoints(prefix: string): [string, "get" | "post" | "put" | "delete", string, (params: Record<string, string>, headers: IncomingHttpHeaders, req: IncomingMessage, body?: any) => Promise<any>][];
|
|
29
|
+
startTimers(): void;
|
|
30
|
+
execStartRoutines(): Promise<void>;
|
|
31
|
+
execRoutine(routine: (context: Cxt) => Promise<void>): Promise<void>;
|
|
32
|
+
}
|