mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 08:33:11 +00:00
13
src/cli.ts
13
src/cli.ts
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018 StApps
|
||||
* Copyright (C) 2018-2019 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -15,7 +15,8 @@
|
||||
import * as commander from 'commander';
|
||||
import {existsSync, readFileSync, writeFileSync} from 'fs';
|
||||
import {join, resolve} from 'path';
|
||||
import {getProjectReflection, logger, mkdirPromisified, readFilePromisifed} from './common';
|
||||
import {getProjectReflection, logger, mkdirPromisified, readFilePromisified} from './common';
|
||||
import {pack} from './pack';
|
||||
import {gatherRouteInformation, generateDocumentationForRoute, getNodeMetaInformationMap} from './routes';
|
||||
import {Converter, getValidatableTypesFromReflection} from './schema';
|
||||
import {validateFiles, writeReport} from './validate';
|
||||
@@ -91,7 +92,7 @@ commander
|
||||
|
||||
logger.info(`Using ${corePackageJsonPath} to determine version for schemas.`);
|
||||
|
||||
const buffer = await readFilePromisifed(corePackageJsonPath);
|
||||
const buffer = await readFilePromisified(corePackageJsonPath);
|
||||
const corePackageJson = JSON.parse(buffer.toString());
|
||||
const coreVersion = corePackageJson.version;
|
||||
|
||||
@@ -141,6 +142,12 @@ commander
|
||||
}
|
||||
});
|
||||
|
||||
commander
|
||||
.command('pack')
|
||||
.action(async () => {
|
||||
await pack();
|
||||
});
|
||||
|
||||
commander
|
||||
.parse(process.argv);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user