mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 19:22:51 +00:00
build: update dependencies
This commit is contained in:
1372
package-lock.json
generated
1372
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
39
package.json
39
package.json
@@ -44,42 +44,41 @@
|
||||
"tslint": "tslint -p tsconfig.json -c tslint.json 'src/**/*.ts'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@krlwlfrt/async-pool": "0.1.0",
|
||||
"@openstapps/logger": "0.3.1",
|
||||
"@krlwlfrt/async-pool": "0.3.0",
|
||||
"@openstapps/logger": "0.4.0",
|
||||
"@types/glob": "7.1.1",
|
||||
"@types/got": "9.4.4",
|
||||
"@types/got": "9.6.9",
|
||||
"@types/mustache": "0.8.32",
|
||||
"@types/node": "10.14.8",
|
||||
"ajv": "6.10.0",
|
||||
"@types/node": "10.17.13",
|
||||
"ajv": "6.11.0",
|
||||
"chai": "4.2.0",
|
||||
"commander": "2.20.0",
|
||||
"commander": "2.20.3",
|
||||
"deepmerge": "3.3.0",
|
||||
"del": "4.1.1",
|
||||
"flatted": "2.0.1",
|
||||
"glob": "7.1.4",
|
||||
"glob": "7.1.6",
|
||||
"got": "9.6.0",
|
||||
"humanize-string": "2.1.0",
|
||||
"jsonschema": "1.2.4",
|
||||
"jsonschema": "1.2.5",
|
||||
"mustache": "3.0.1",
|
||||
"plantuml-encoder": "1.2.5",
|
||||
"plantuml-encoder": "1.4.0",
|
||||
"toposort": "2.0.2",
|
||||
"ts-json-schema-generator": "0.42.0",
|
||||
"ts-node": "8.2.0",
|
||||
"ts-node": "8.6.2",
|
||||
"typedoc": "0.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/configuration": "0.21.0",
|
||||
"@types/chai": "4.1.7",
|
||||
"@openstapps/configuration": "0.22.0",
|
||||
"@types/chai": "4.2.7",
|
||||
"@types/mocha": "5.2.7",
|
||||
"@types/rimraf": "2.0.2",
|
||||
"@types/nock": "10.0.3",
|
||||
"conventional-changelog-cli": "2.0.21",
|
||||
"mocha": "6.1.4",
|
||||
"@types/rimraf": "2.0.3",
|
||||
"conventional-changelog-cli": "2.0.31",
|
||||
"mocha": "6.2.2",
|
||||
"mocha-typescript": "1.1.17",
|
||||
"nock": "10.0.6",
|
||||
"nock": "11.7.2",
|
||||
"prepend-file-cli": "1.0.6",
|
||||
"rimraf": "2.6.3",
|
||||
"tslint": "5.17.0",
|
||||
"typescript": "3.5.1"
|
||||
"rimraf": "2.7.1",
|
||||
"tslint": "5.20.1",
|
||||
"typescript": "3.7.5"
|
||||
}
|
||||
}
|
||||
|
||||
12
src/cli.ts
12
src/cli.ts
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import * as commander from 'commander';
|
||||
import {Command} from 'commander';
|
||||
import {existsSync, readFileSync, writeFileSync} from 'fs';
|
||||
import * as got from 'got';
|
||||
import {join, resolve} from 'path';
|
||||
@@ -38,12 +38,16 @@ import {UMLConfig} from './uml/uml-config';
|
||||
import {validateFiles, writeReport} from './validate';
|
||||
|
||||
// handle unhandled promise rejections
|
||||
process.on('unhandledRejection', async (error: Error) => {
|
||||
await Logger.error(error.message);
|
||||
Logger.info(error.stack);
|
||||
process.on('unhandledRejection', async (reason: unknown) => {
|
||||
if (reason instanceof Error) {
|
||||
await Logger.error(reason.message);
|
||||
Logger.info(reason.stack);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
const commander = new Command('openstapps-core-tools');
|
||||
|
||||
commander
|
||||
.version(JSON.parse(
|
||||
readFileSync(resolve(__dirname, '..', 'package.json'))
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import {existsSync, mkdir, PathLike, readFile, unlink, writeFile} from 'fs';
|
||||
import * as glob from 'glob';
|
||||
import {Glob} from 'glob';
|
||||
import {Schema as JSONSchema, ValidationError} from 'jsonschema';
|
||||
import {platform} from 'os';
|
||||
import {join, sep} from 'path';
|
||||
@@ -23,7 +23,7 @@ import {Application, ProjectReflection} from 'typedoc';
|
||||
import {promisify} from 'util';
|
||||
import {LightweightType} from './uml/model/lightweight-type';
|
||||
|
||||
export const globPromisified = promisify(glob);
|
||||
export const globPromisified = promisify(Glob);
|
||||
export const mkdirPromisified = promisify(mkdir);
|
||||
export const readFilePromisified = promisify(readFile);
|
||||
export const writeFilePromisified = promisify(writeFile);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import * as deepmerge from 'deepmerge';
|
||||
import merge from 'deepmerge';
|
||||
import {stringify} from 'flatted';
|
||||
import {DeclarationReflection, ProjectReflection} from 'typedoc';
|
||||
import {
|
||||
@@ -331,7 +331,7 @@ function handleUnionType(type: UnionType,
|
||||
let out = list[0];
|
||||
|
||||
for (const item of list) {
|
||||
out = deepmerge(out, item);
|
||||
out = merge<ElasticsearchValue>(out, item);
|
||||
}
|
||||
|
||||
return out;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import * as del from 'del';
|
||||
import del from 'del';
|
||||
import {existsSync} from 'fs';
|
||||
import {basename, dirname, join} from 'path';
|
||||
import {cwd} from 'process';
|
||||
@@ -130,7 +130,7 @@ async function getAllTypeDefinitions(): Promise<string[]> {
|
||||
],
|
||||
});
|
||||
|
||||
const promises = fileNames.map(async (fileName) => {
|
||||
const promises = fileNames.map(async (fileName: string) => {
|
||||
return readFilePromisified(fileName, 'utf8');
|
||||
});
|
||||
|
||||
@@ -241,7 +241,7 @@ async function getAllJavaScriptModules(): Promise<JavaScriptModule[]> {
|
||||
],
|
||||
});
|
||||
|
||||
const promises = fileNames.map(async (fileName) => {
|
||||
const promises = fileNames.map(async (fileName: string) => {
|
||||
const fileContent = await readFilePromisified(fileName, 'utf8');
|
||||
const directory = dirname(fileName)
|
||||
.replace(new RegExp(`^${join(cwd(), 'lib')}`), '');
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import * as Ajv from 'ajv';
|
||||
import Ajv from 'ajv';
|
||||
import {Schema as JSONSchema} from 'jsonschema';
|
||||
import {join} from 'path';
|
||||
import {DEFAULT_CONFIG, Definition, SchemaGenerator} from 'ts-json-schema-generator';
|
||||
|
||||
@@ -102,7 +102,7 @@ export async function createDiagramFromString(
|
||||
const url = `${plantUmlBaseURL}/svg/${plantUMLCode}`;
|
||||
let response;
|
||||
try {
|
||||
response = await request(url);
|
||||
response = await request.get(url);
|
||||
const httpOK = 200;
|
||||
if (response.statusCode !== httpOK) {
|
||||
await Logger.error(`Plantuml Server responded with an error.\n${response.statusMessage}`);
|
||||
|
||||
@@ -62,7 +62,7 @@ export class Validator {
|
||||
Logger.log(`Adding schemas from ${schemaDir} to validator.`);
|
||||
|
||||
// tslint:disable-next-line:no-magic-numbers - iterate over schema files
|
||||
await asyncPool(2, schemaFiles, async (file) => {
|
||||
await asyncPool(2, schemaFiles, async (file: string) => {
|
||||
// read schema file
|
||||
const buffer = await readFilePromisified(file);
|
||||
const schema = JSON.parse(buffer.toString());
|
||||
@@ -139,7 +139,7 @@ export async function validateFiles(schemaDir: string, resourcesDir: string): Pr
|
||||
const errors: ExpectableValidationErrors = {};
|
||||
|
||||
// tslint:disable-next-line:no-magic-numbers - iterate over files to test
|
||||
await asyncPool(2, testFiles, async (testFile) => {
|
||||
await asyncPool(2, testFiles, async (testFile: string) => {
|
||||
const testFileName = basename(testFile);
|
||||
|
||||
const buffer = await readFilePromisified(join(resourcesDir, testFileName));
|
||||
@@ -195,6 +195,7 @@ export async function validateFiles(schemaDir: string, resourcesDir: string): Pr
|
||||
name: `expected ${error}`,
|
||||
property: 'unknown',
|
||||
schema: 'undefined',
|
||||
stack: 'undefined',
|
||||
});
|
||||
}
|
||||
} else if (unexpectedErrors === 0) {
|
||||
|
||||
@@ -18,8 +18,10 @@ import {slow, suite, test, timeout} from 'mocha-typescript';
|
||||
import {cwd} from 'process';
|
||||
import {getTsconfigPath} from '../src/common';
|
||||
|
||||
process.on('unhandledRejection', (err) => {
|
||||
Logger.error('UNHANDLED REJECTION', err.stack);
|
||||
process.on('unhandledRejection', (reason: unknown): void => {
|
||||
if (reason instanceof Error) {
|
||||
Logger.error('UNHANDLED REJECTION', reason.stack);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {TestFirstUnion} from './TestUnion';
|
||||
import {TestFirstUnion} from './test-union';
|
||||
|
||||
export class TestClass<T> {
|
||||
test2: T;
|
||||
@@ -12,9 +12,9 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {TestClass, TestSecondClass} from './TestClass';
|
||||
import {TestFirstEnum} from './TestEnum';
|
||||
import {TestThirdUnion} from './TestUnion';
|
||||
import {TestClass, TestSecondClass} from './test-class';
|
||||
import {TestFirstEnum} from './test-enum';
|
||||
import {TestThirdUnion} from './test-union';
|
||||
|
||||
export interface TestInterface {
|
||||
articleBody: string[];
|
||||
@@ -16,7 +16,7 @@ import {expect} from 'chai';
|
||||
import {slow, suite, test, timeout} from 'mocha-typescript';
|
||||
import {getProjectReflection} from '../src/common';
|
||||
import {readDefinitions} from '../src/uml/read-definitions';
|
||||
import {generatedModel} from './model/generatedModel';
|
||||
import {generatedModel} from './model/generated-model';
|
||||
|
||||
@suite(timeout(10000), slow(5000))
|
||||
export class ReadDefinitionsSpec {
|
||||
@@ -18,8 +18,10 @@ import {slow, suite, test, timeout} from 'mocha-typescript';
|
||||
import {join} from 'path';
|
||||
import {Converter, getValidatableTypesFromReflection} from '../src/schema';
|
||||
|
||||
process.on('unhandledRejection', (err) => {
|
||||
Logger.error('UNHANDLED REJECTION', err.stack);
|
||||
process.on('unhandledRejection', (error: unknown) => {
|
||||
if (error instanceof Error) {
|
||||
Logger.error('UNHANDLED REJECTION', error.stack);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
@@ -18,13 +18,15 @@ import {existsSync, mkdirSync, writeFileSync} from 'fs';
|
||||
import {Schema} from 'jsonschema';
|
||||
import {slow, suite, test, timeout} from 'mocha-typescript';
|
||||
import {join} from 'path';
|
||||
import * as rimraf from 'rimraf';
|
||||
import rimraf from 'rimraf';
|
||||
import {Foo} from '../src/resources/foo';
|
||||
import {Converter} from '../src/schema';
|
||||
import {Validator} from '../src/validate';
|
||||
|
||||
process.on('unhandledRejection', (err) => {
|
||||
Logger.error('UNHANDLED REJECTION', err.stack);
|
||||
process.on('unhandledRejection', (err: unknown) => {
|
||||
if (err instanceof Error) {
|
||||
Logger.error('UNHANDLED REJECTION', err.stack);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user