1 |
|
2 | import * as http from 'http';
|
3 | import * as https from 'https';
|
4 | import * as express from 'express';
|
5 | import * as yargs from 'yargs';
|
6 | import { ContributionProvider, MaybePromise, Stopwatch } from '../common';
|
7 | import { CliContribution } from './cli';
|
8 | import { ApplicationPackage } from '@theia/application-package';
|
9 | import { ProcessUtils } from './process-utils';
|
10 | export declare const BackendApplicationServer: unique symbol;
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export interface BackendApplicationServer extends BackendApplicationContribution {
|
17 | }
|
18 | export declare const BackendApplicationContribution: unique symbol;
|
19 |
|
20 |
|
21 |
|
22 | export interface BackendApplicationContribution {
|
23 | |
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | initialize?(): MaybePromise<void>;
|
33 | |
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | configure?(app: express.Application): MaybePromise<void>;
|
46 | |
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | onStart?(server: http.Server | https.Server): MaybePromise<void>;
|
58 | |
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 | onStop?(app?: express.Application): void;
|
65 | }
|
66 | export declare class BackendApplicationCliContribution implements CliContribution {
|
67 | port: number;
|
68 | hostname: string | undefined;
|
69 | ssl: boolean | undefined;
|
70 | cert: string | undefined;
|
71 | certkey: string | undefined;
|
72 | projectPath: string;
|
73 | configure(conf: yargs.Argv): void;
|
74 | setArguments(args: yargs.Arguments): void;
|
75 | protected appProjectPath(): string;
|
76 | }
|
77 |
|
78 |
|
79 |
|
80 | export declare class BackendApplication {
|
81 | protected readonly contributionsProvider: ContributionProvider<BackendApplicationContribution>;
|
82 | protected readonly cliParams: BackendApplicationCliContribution;
|
83 | protected readonly app: express.Application;
|
84 | protected readonly applicationPackage: ApplicationPackage;
|
85 | protected readonly processUtils: ProcessUtils;
|
86 | protected readonly stopwatch: Stopwatch;
|
87 | constructor(contributionsProvider: ContributionProvider<BackendApplicationContribution>, cliParams: BackendApplicationCliContribution);
|
88 | protected initialize(): Promise<void>;
|
89 | protected configure(): Promise<void>;
|
90 | use(...handlers: express.Handler[]): void;
|
91 | start(aPort?: number, aHostname?: string): Promise<http.Server | https.Server>;
|
92 | protected onStop(): void;
|
93 | protected serveGzipped(contentType: string, req: express.Request, res: express.Response, next: express.NextFunction): Promise<void>;
|
94 | protected measure<T>(name: string, fn: () => MaybePromise<T>): Promise<T>;
|
95 | protected handleUncaughtError(error: Error): void;
|
96 | }
|
97 | //# sourceMappingURL=backend-application.d.ts.map |
\ | No newline at end of file |