Upgrade packages i.e. wms-core

This commit is contained in:
Alice Gaudon 2020-11-02 18:17:55 +01:00
parent a8bad1c8c1
commit 292e843cd1
6 changed files with 17 additions and 16 deletions

View File

@ -1,4 +1,4 @@
export default { {
app: { app: {
name: 'Example App', name: 'Example App',
contact_email: 'contact@example.net' contact_email: 'contact@example.net'

View File

@ -1,4 +1,4 @@
export default { {
log_level: "DEBUG", log_level: "DEBUG",
db_log_level: "ERROR", db_log_level: "ERROR",
public_url: "https://watch-my.stream", public_url: "https://watch-my.stream",

View File

@ -1,4 +1,4 @@
export default { {
mysql: { mysql: {
host: "localhost", host: "localhost",
user: "root", user: "root",

View File

@ -35,7 +35,7 @@
"@typescript-eslint/parser": "^4.3.0", "@typescript-eslint/parser": "^4.3.0",
"babel-loader": "^8.1.0", "babel-loader": "^8.1.0",
"concurrently": "^5.1.0", "concurrently": "^5.1.0",
"css-loader": "^4.2.2", "css-loader": "^5.0.0",
"eslint": "^7.10.0", "eslint": "^7.10.0",
"feather-icons": "^4.28.0", "feather-icons": "^4.28.0",
"file-loader": "^6.0.0", "file-loader": "^6.0.0",
@ -46,21 +46,20 @@
"imagemin-svgo": "^8.0.0", "imagemin-svgo": "^8.0.0",
"img-loader": "^3.0.1", "img-loader": "^3.0.1",
"jest": "^26.1.0", "jest": "^26.1.0",
"mini-css-extract-plugin": "^0.11.0", "mini-css-extract-plugin": "^1.2.1",
"node-sass": "^4.14.0", "node-sass": "^5.0.0",
"nodemon": "^2.0.3", "nodemon": "^2.0.3",
"sass-loader": "^10.0.1", "sass-loader": "^10.0.1",
"terser-webpack-plugin": "^4.2.2", "terser-webpack-plugin": "^5.0.3",
"ts-jest": "^26.1.1", "ts-jest": "^26.1.1",
"ts-loader": "^8.0.4", "ts-loader": "^8.0.4",
"typescript": "^4.0.2", "typescript": "^4.0.2",
"uglifyjs-webpack-plugin": "^2.2.0", "webpack": "^5.3.2",
"webpack": "^4.43.0", "webpack-cli": "^4.1.0"
"webpack-cli": "^3.3.11"
}, },
"dependencies": { "dependencies": {
"config": "^3.3.1", "config": "^3.3.1",
"express": "^4.17.1", "express": "^4.17.1",
"wms-core": "^0.22.0-rc.24" "wms-core": "^0.22.0"
} }
} }

View File

@ -1,7 +1,6 @@
import Application from "wms-core/Application"; import Application from "wms-core/Application";
import Migration, {MigrationType} from "wms-core/db/Migration"; import Migration, {MigrationType} from "wms-core/db/Migration";
import CreateMigrationsTable from "wms-core/migrations/CreateMigrationsTable"; import CreateMigrationsTable from "wms-core/migrations/CreateMigrationsTable";
import CreateLogsTable from "wms-core/migrations/CreateLogsTable";
import ExpressAppComponent from "wms-core/components/ExpressAppComponent"; import ExpressAppComponent from "wms-core/components/ExpressAppComponent";
import NunjucksComponent from "wms-core/components/NunjucksComponent"; import NunjucksComponent from "wms-core/components/NunjucksComponent";
import MysqlComponent from "wms-core/components/MysqlComponent"; import MysqlComponent from "wms-core/components/MysqlComponent";
@ -18,6 +17,8 @@ import WebSocketServerComponent from "wms-core/components/WebSocketServerCompone
import HomeController from "./controllers/HomeController"; import HomeController from "./controllers/HomeController";
import AutoUpdateComponent from "wms-core/components/AutoUpdateComponent"; import AutoUpdateComponent from "wms-core/components/AutoUpdateComponent";
import packageJson = require('../package.json'); import packageJson = require('../package.json');
import DummyMigration from "wms-core/migrations/DummyMigration";
import DropLegacyLogsTable from "wms-core/migrations/DropLegacyLogsTable";
export default class App extends Application { export default class App extends Application {
public constructor( public constructor(
@ -30,7 +31,8 @@ export default class App extends Application {
protected getMigrations(): MigrationType<Migration>[] { protected getMigrations(): MigrationType<Migration>[] {
return [ return [
CreateMigrationsTable, CreateMigrationsTable,
CreateLogsTable, DummyMigration,
DropLegacyLogsTable,
]; ];
} }

View File

@ -6,15 +6,15 @@ process.env['NODE_CONFIG_DIR'] =
+ delimiter + delimiter
+ (process.env['NODE_CONFIG_DIR'] || __dirname + '/../config/'); + (process.env['NODE_CONFIG_DIR'] || __dirname + '/../config/');
import Logger from "wms-core/Logger"; import {log} from "wms-core/Logger";
import App from "./App"; import App from "./App";
import config from "config"; import config from "config";
(async () => { (async () => {
Logger.debug('Config path:', process.env['NODE_CONFIG_DIR']); log.debug('Config path:', process.env['NODE_CONFIG_DIR']);
const app = new App(config.get<string>('listen_addr'), config.get<number>('port')); const app = new App(config.get<string>('listen_addr'), config.get<number>('port'));
await app.start(); await app.start();
})().catch(err => { })().catch(err => {
Logger.error(err); log.error(err);
}); });