@zthun/romulator-api 1.18.4 → 1.19.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/dist/dir/dir.d.ts +1 -0
- package/dist/jobs/jobs-controller.d.mts +8 -0
- package/dist/jobs/jobs-module.d.mts +6 -0
- package/dist/jobs/jobs-repository.d.mts +33 -0
- package/dist/jobs/jobs-service.d.mts +16 -0
- package/dist/main.cjs +449 -129
- package/dist/main.cjs.map +1 -1
- package/dist/main.js +452 -132
- package/dist/main.js.map +1 -1
- package/package.json +13 -13
package/dist/dir/dir.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IZDataRequestQuery } from '@zthun/helpful-query';
|
|
2
|
+
import { IZRomulatorJobsService } from './jobs-service.mjs';
|
|
3
|
+
export declare class ZRomulatorJobsController {
|
|
4
|
+
private readonly _jobs;
|
|
5
|
+
constructor(_jobs: IZRomulatorJobsService);
|
|
6
|
+
list(params: IZDataRequestQuery): Promise<import('@zthun/helpful-query').IZPage<import('@zthun/romulator-client').IZJob>>;
|
|
7
|
+
get(id: string): Promise<import('@zthun/romulator-client').IZJob>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IZJob } from '@zthun/romulator-client';
|
|
2
|
+
export declare const ZRomulatorJobsRepositoryToken: unique symbol;
|
|
3
|
+
/**
|
|
4
|
+
* Represents a repository for job data.
|
|
5
|
+
*/
|
|
6
|
+
export interface IZRomulatorJobsRepository {
|
|
7
|
+
/**
|
|
8
|
+
* Initializes the repository.
|
|
9
|
+
*
|
|
10
|
+
* This will setup the watch of the jobs directory and
|
|
11
|
+
* will then cancel all in progress jobs that cannot
|
|
12
|
+
* be resumed.
|
|
13
|
+
*/
|
|
14
|
+
init(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Gets all jobs in the repository.
|
|
17
|
+
*
|
|
18
|
+
* @returns
|
|
19
|
+
* All jobs that are in the jobs folder.
|
|
20
|
+
* See {@link ZDir.jobs} for the location
|
|
21
|
+
* of the jobs folder.
|
|
22
|
+
*/
|
|
23
|
+
jobs(): Promise<IZJob[]>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The implementation of the IZRomulatorJobsRepository.
|
|
27
|
+
*/
|
|
28
|
+
export declare class ZRomulatorJobsRepository implements IZRomulatorJobsRepository {
|
|
29
|
+
private _files;
|
|
30
|
+
private _stream;
|
|
31
|
+
init(): Promise<void>;
|
|
32
|
+
jobs(): Promise<IZJob[]>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IZDataRequest, IZPage } from '@zthun/helpful-query';
|
|
2
|
+
import { IZLogger } from '@zthun/lumberjacky-log';
|
|
3
|
+
import { IZJob } from '@zthun/romulator-client';
|
|
4
|
+
import { IZRestfulGet } from '@zthun/webigail-rest';
|
|
5
|
+
import { IZRomulatorJobsRepository } from './jobs-repository.mjs';
|
|
6
|
+
export declare const ZRomulatorJobsToken: unique symbol;
|
|
7
|
+
export interface IZRomulatorJobsService extends IZRestfulGet<IZJob> {
|
|
8
|
+
list(req: IZDataRequest): Promise<IZPage<IZJob>>;
|
|
9
|
+
}
|
|
10
|
+
export declare class ZRomulatorJobsService implements IZRomulatorJobsService {
|
|
11
|
+
private _files;
|
|
12
|
+
private _logger;
|
|
13
|
+
constructor(logger: IZLogger, _files: IZRomulatorJobsRepository);
|
|
14
|
+
list(req: IZDataRequest): Promise<IZPage<IZJob>>;
|
|
15
|
+
get(id: string): Promise<IZJob>;
|
|
16
|
+
}
|