UNPKG

1.72 kBTypeScriptView Raw
1import { ServerConnection } from '../serverconnection';
2/**
3 * The build API service manager.
4 */
5export declare class BuildManager {
6 /**
7 * Create a new setting manager.
8 */
9 constructor(options?: BuildManager.IOptions);
10 /**
11 * The server settings used to make API requests.
12 */
13 readonly serverSettings: ServerConnection.ISettings;
14 /**
15 * Test whether the build service is available.
16 */
17 get isAvailable(): boolean;
18 /**
19 * Test whether to check build status automatically.
20 */
21 get shouldCheck(): boolean;
22 /**
23 * Get whether the application should be built.
24 */
25 getStatus(): Promise<BuildManager.IStatus>;
26 /**
27 * Build the application.
28 */
29 build(): Promise<void>;
30 /**
31 * Cancel an active build.
32 */
33 cancel(): Promise<void>;
34 private _url;
35}
36/**
37 * A namespace for `BuildManager` statics.
38 */
39export declare namespace BuildManager {
40 /**
41 * The instantiation options for a setting manager.
42 */
43 interface IOptions {
44 /**
45 * The server settings used to make API requests.
46 */
47 serverSettings?: ServerConnection.ISettings;
48 }
49 /**
50 * The build status response from the server.
51 */
52 interface IStatus {
53 /**
54 * Whether a build is needed.
55 */
56 readonly status: 'stable' | 'needed' | 'building';
57 /**
58 * The message associated with the build status.
59 */
60 readonly message: string;
61 }
62}
63/**
64 * A namespace for builder API interfaces.
65 */
66export declare namespace Builder {
67 /**
68 * The interface for the build manager.
69 */
70 interface IManager extends BuildManager {
71 }
72}