mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-24 17:45:59 +00:00
fix lint.
This commit is contained in:
parent
52294f0094
commit
354def3883
@ -4,10 +4,11 @@ import {
|
||||
ExpressStatic,
|
||||
} from 'CommonServer/utils/Express';
|
||||
import path from 'path';
|
||||
import { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
export const APP_NAME: string = 'admin';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
app.use(ExpressStatic(path.join(__dirname, 'build')));
|
||||
app.use(`/${APP_NAME}`, ExpressStatic(path.join(__dirname, 'build')));
|
||||
|
@ -1,3 +1,5 @@
|
||||
import app from 'CommonServer/Utils/StartServer';
|
||||
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
|
||||
const app: ExpressApplication = Express.getExpressApp();
|
||||
|
||||
export default app;
|
||||
|
@ -1,13 +1,14 @@
|
||||
import {
|
||||
import Express, {
|
||||
ExpressApplication,
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressStatic,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
|
||||
import app from 'CommonServer/Utils/StartServer';
|
||||
|
||||
import path from 'path';
|
||||
|
||||
const app: ExpressApplication = Express.getExpressApp();
|
||||
|
||||
// Set the view engine to ejs
|
||||
app.set('views', path.join(__dirname, 'views'));
|
||||
app.set('view engine', 'ejs');
|
||||
|
@ -1,7 +1,8 @@
|
||||
import App from 'CommonServer/utils/StartServer';
|
||||
import { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
export const APP_NAME: string = 'application';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
import Main from './worker/main';
|
||||
|
||||
|
@ -405,7 +405,7 @@ export default class BaseModel extends BaseEntity {
|
||||
public getPublicCreateableColumns<T extends BaseModel>(type: {
|
||||
new (): T;
|
||||
}): Columns {
|
||||
const obj = new type();
|
||||
const obj: T = new type();
|
||||
const accessControl: Dictionary<AccessControl> =
|
||||
getPublicAccessControlForAllColumns(obj);
|
||||
const columns: Array<string> = [];
|
||||
|
@ -39,13 +39,13 @@ export default class Hostname {
|
||||
}
|
||||
|
||||
public toString(): string {
|
||||
let hostame = this.hostname;
|
||||
let hostame: string = this.hostname;
|
||||
|
||||
if (this.port) {
|
||||
hostame += ':' + this.port.toString();
|
||||
}
|
||||
|
||||
return this.hostname;
|
||||
return hostame;
|
||||
}
|
||||
|
||||
public static fromString(hostname: string): Hostname {
|
||||
|
@ -29,9 +29,17 @@ export default class URL extends DatabaseProperty {
|
||||
this._protocol = v;
|
||||
}
|
||||
|
||||
public constructor(protocol: Protocol, hostname: Hostname, route?: Route) {
|
||||
public constructor(
|
||||
protocol: Protocol,
|
||||
hostname: Hostname | string,
|
||||
route?: Route
|
||||
) {
|
||||
super();
|
||||
this.hostname = hostname;
|
||||
if (hostname instanceof Hostname) {
|
||||
this.hostname = hostname;
|
||||
} else if (typeof hostname === 'string') {
|
||||
this.hostname = Hostname.fromString(hostname);
|
||||
}
|
||||
|
||||
this.protocol = protocol;
|
||||
|
||||
|
@ -4,7 +4,9 @@ import Express, { ExpressApplication } from '../Utils/Express';
|
||||
|
||||
const app: ExpressApplication = Express.getExpressApp();
|
||||
|
||||
export default (appName: string) => {
|
||||
const init: Function = (appName: string): void => {
|
||||
app.use([`/${appName}`, '/'], version);
|
||||
app.use([`/${appName}`, '/'], status);
|
||||
};
|
||||
|
||||
export default init;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { createLogger, format, transports } from 'winston';
|
||||
import { createLogger, format, Logger, transports } from 'winston';
|
||||
|
||||
const { combine, timestamp, errors, colorize, cli } = format;
|
||||
|
||||
const logger = createLogger({
|
||||
const logger: Logger = createLogger({
|
||||
format: combine(
|
||||
colorize(),
|
||||
cli({
|
||||
|
@ -1,11 +1,12 @@
|
||||
import App from 'CommonServer/utils/StartServer';
|
||||
import { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
import Main from './worker/main';
|
||||
|
||||
import cron from 'node-cron';
|
||||
|
||||
export const APP_NAME: string = 'container';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
const cronContainerSecurityStartTime: $TSFixMe = Math.floor(Math.random() * 50);
|
||||
|
||||
|
@ -4,10 +4,11 @@ import {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressStatic,
|
||||
ExpressApplication,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
|
||||
export const APP_NAME: string = 'dashboard';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
app.use(ExpressStatic(path.join(__dirname, 'build')));
|
||||
|
||||
|
@ -3,12 +3,13 @@ import {
|
||||
ExpressResponse,
|
||||
NextFunction,
|
||||
ExpressStatic,
|
||||
ExpressApplication,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
export const APP_NAME: string = 'api';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
import expressRequestId from 'express-request-id';
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
export const APP_NAME: string = 'data-ingestor';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
app.use([`/${APP_NAME}/probe`, '/probe'], require('./api/probe'));
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { ExpressStatic } from 'CommonServer/Utils/Express';
|
||||
import { ExpressStatic. ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
import path from 'path';
|
||||
|
||||
export const APP_NAME: string = 'chart';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
// Set the view engine to ejs
|
||||
app.set('views', path.join(__dirname, 'views'));
|
||||
|
@ -2,6 +2,7 @@ import {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressStatic,
|
||||
ExpressApplication,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
@ -14,7 +15,7 @@ import builder from 'xmlbuilder2';
|
||||
import { XMLBuilder } from 'xmlbuilder2/lib/interfaces';
|
||||
|
||||
export const APP_NAME: string = 'home';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
//View engine setup
|
||||
app.set('views', path.join(__dirname, 'views'));
|
||||
|
@ -4,7 +4,8 @@ import {
|
||||
ExpressStatic,
|
||||
} from 'CommonServer/utils/Express';
|
||||
|
||||
import App from 'CommonServer/utils/StartServer';
|
||||
import { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
import path from 'path';
|
||||
|
||||
@ -13,7 +14,7 @@ import ResponseType from 'Common/Types/api/ResponseType';
|
||||
import Headers from 'Common/Types/API/Headers';
|
||||
|
||||
export const APP_NAME: string = 'home';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
app.set('views', path.join(__dirname, 'views'));
|
||||
app.set('view engine', 'ejs');
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
export const APP_NAME: string = 'integration';
|
||||
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
export default app;
|
||||
|
@ -2,12 +2,13 @@ import {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressStatic,
|
||||
ExpressApplication,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
export const APP_NAME: string = 'licensing';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
import path from 'path';
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import App from 'CommonServer/utils/StartServer';
|
||||
import { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
import http from 'http';
|
||||
http.createServer(app);
|
||||
@ -8,7 +9,7 @@ import Main from './workers/main';
|
||||
import cron from 'node-cron';
|
||||
|
||||
export const APP_NAME: string = 'licensing';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
const cronMinuteStartTime: $TSFixMe = Math.floor(Math.random() * 50);
|
||||
//App Version
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
export const APP_NAME: string = 'mail';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
// API
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
export const APP_NAME: string = 'data-ingestor';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
// API
|
||||
import ProbeAPI from './API/Probe';
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
export const APP_NAME: string = 'realtime';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
app.use('/realtime', require('./api/realtime'));
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
import App from 'CommonServer/utils/StartServer';
|
||||
import { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
import cron from 'node-cron';
|
||||
import main from './workers/main';
|
||||
import ScriptAPI from './api/script';
|
||||
|
||||
export const APP_NAME: string = 'script';
|
||||
const app = App(APP_NAME);
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
app.use(`/${APP_NAME}`, ScriptAPI);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user