@stemy/backend 5.0.7 → 5.0.8
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/esm2020/public_api.mjs +10 -20
- package/esm2020/services/backend-provider.mjs +52 -9
- package/esm2020/services/entities/lazy-asset.mjs +3 -9
- package/esm2020/services/job-manager.mjs +12 -17
- package/fesm2015/stemy-backend.mjs +243 -229
- package/fesm2015/stemy-backend.mjs.map +1 -1
- package/fesm2020/stemy-backend.mjs +239 -222
- package/fesm2020/stemy-backend.mjs.map +1 -1
- package/package.json +1 -1
- package/services/backend-provider.d.ts +13 -4
- package/services/entities/lazy-asset.d.ts +0 -1
- package/services/job-manager.d.ts +3 -2
package/package.json
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Server } from "http";
|
|
3
|
-
import { Express } from "express";
|
|
4
3
|
import { Server as SocketServer } from "socket.io";
|
|
4
|
+
import { Express } from "express";
|
|
5
|
+
import { Configuration } from './configuration';
|
|
6
|
+
import { IDependencyContainer } from '../common-types';
|
|
7
|
+
import { OpenApi } from './open-api';
|
|
5
8
|
export declare class BackendProvider {
|
|
6
|
-
readonly
|
|
7
|
-
|
|
9
|
+
readonly config: Configuration;
|
|
10
|
+
protected container: IDependencyContainer;
|
|
8
11
|
get io(): SocketServer;
|
|
12
|
+
get express(): Express;
|
|
13
|
+
get server(): Server;
|
|
9
14
|
protected ioServer: SocketServer;
|
|
10
|
-
|
|
15
|
+
protected httpServer: Server;
|
|
16
|
+
protected expressApp: Express;
|
|
17
|
+
protected openApi: OpenApi;
|
|
18
|
+
constructor(config: Configuration, container: IDependencyContainer);
|
|
19
|
+
quickStart(): Promise<string>;
|
|
11
20
|
}
|
|
@@ -17,7 +17,6 @@ export declare class LazyAsset extends BaseEntity<ILazyAsset> implements ILazyAs
|
|
|
17
17
|
constructor(id: ObjectId, data: Partial<ILazyAsset>, collection: Collection, logger: Logger, assets: Assets, progresses: Progresses);
|
|
18
18
|
unlink(): Promise<string>;
|
|
19
19
|
startWorking(): void;
|
|
20
|
-
load(): Promise<this>;
|
|
21
20
|
loadAsset(): Promise<IAsset>;
|
|
22
21
|
writeAsset(asset: IAsset): Promise<IAsset>;
|
|
23
22
|
protected startWorkingOnAsset(fromLoad: boolean): Promise<any>;
|
|
@@ -13,7 +13,7 @@ export declare class JobManager {
|
|
|
13
13
|
[name: string]: (jobParams: JobParams, uniqueId: string) => Promise<any>;
|
|
14
14
|
};
|
|
15
15
|
protected messages: Subject<ISocketMessage>;
|
|
16
|
-
protected processing:
|
|
16
|
+
protected processing: Promise<any>;
|
|
17
17
|
protected apiPush: Socket;
|
|
18
18
|
protected apiPull: Socket;
|
|
19
19
|
protected workerPush: Socket;
|
|
@@ -25,7 +25,8 @@ export declare class JobManager {
|
|
|
25
25
|
enqueueWithName(name: string, params?: JobParams): Promise<string>;
|
|
26
26
|
enqueue(jobType: Type<IJob>, params?: JobParams): Promise<string>;
|
|
27
27
|
schedule(minute: JobScheduleTime, hour: JobScheduleTime, dayOfMonth: JobScheduleTime, month: JobScheduleTime, dayOfWeek: JobScheduleTime, jobType: Type<IJob>, params?: JobParams): IJobTask;
|
|
28
|
-
|
|
28
|
+
protected initProcessing(): Promise<void>;
|
|
29
|
+
startProcessing(): Promise<void>;
|
|
29
30
|
tryResolve(jobType: Type<IJob>, params: JobParams): string;
|
|
30
31
|
protected tryResolveFromName(jobName: string, params: JobParams): string;
|
|
31
32
|
protected tryResolveAndInit(jobType: Type<IJob>, params: JobParams): string;
|