nitro-converter/src/Main.ts

66 lines
2.2 KiB
TypeScript
Raw Normal View History

2021-02-17 06:14:07 +01:00
import 'reflect-metadata';
import { container } from 'tsyringe';
import { Configuration } from './common/config/Configuration';
2021-02-20 05:10:06 +01:00
import { EffectConverter } from './converters/effect/EffectConverter';
2021-02-21 06:27:46 +01:00
import { EffectMapConverter } from './converters/effectmap/EffectMapConverter';
2021-02-18 07:03:08 +01:00
import { FigureConverter } from './converters/figure/FigureConverter';
2021-02-21 06:27:46 +01:00
import { FigureMapConverter } from './converters/figuremap/FigureMapConverter';
2021-02-17 06:14:07 +01:00
import { FurnitureConverter } from './converters/furniture/FurnitureConverter';
2021-02-21 06:27:46 +01:00
import { FurnitureDataConverter } from './converters/furnituredata/FurnitureDataConverter';
2021-02-17 06:14:07 +01:00
import { PetConverter } from './converters/pet/PetConverter';
2021-02-21 06:27:46 +01:00
import { ProductDataConverter } from './converters/productdata/ProductDataConverter';
2021-02-17 06:14:07 +01:00
(async () =>
{
const config = container.resolve(Configuration);
2021-01-28 09:12:04 +01:00
await config.init();
2021-02-21 06:27:46 +01:00
if(config.getBoolean('convert.figuremap'))
{
const figureMapConverter = container.resolve(FigureMapConverter);
await figureMapConverter.convertAsync();
}
if(config.getBoolean('convert.effectmap'))
{
const effectMapConverter = container.resolve(EffectMapConverter);
await effectMapConverter.convertAsync();
}
if(config.getBoolean('convert.furnidata'))
{
const furniDataConverter = container.resolve(FurnitureDataConverter);
await furniDataConverter.convertAsync();
}
if(config.getBoolean('convert.productdata'))
{
const productDataConverter = container.resolve(ProductDataConverter);
await productDataConverter.convertAsync();
}
2021-02-18 07:03:08 +01:00
if(config.getBoolean('convert.figure'))
{
const figureConverter = container.resolve(FigureConverter);
await figureConverter.convertAsync();
}
2021-02-17 06:14:07 +01:00
2021-02-21 06:27:46 +01:00
if(config.getBoolean('convert.effect'))
{
const effectConverter = container.resolve(EffectConverter);
await effectConverter.convertAsync();
}
2021-02-17 06:14:07 +01:00
if(config.getBoolean('convert.furniture'))
{
const furnitureConverter = container.resolve(FurnitureConverter);
await furnitureConverter.convertAsync();
2021-02-02 04:43:38 +01:00
}
2021-02-17 06:14:07 +01:00
if(config.getBoolean('convert.pet'))
{
const petConverter = container.resolve(PetConverter);
await petConverter.convertAsync();
}
2021-02-17 06:14:07 +01:00
})();