mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-19 08:02:55 +00:00
refactor: update dependencies
This commit is contained in:
11
src/cli.ts
11
src/cli.ts
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
import {SCThingType} from '@openstapps/core';
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import * as commander from 'commander';
|
||||
import {Command} from 'commander';
|
||||
import {readFileSync} from 'fs';
|
||||
import {join} from 'path';
|
||||
import {URL} from 'url';
|
||||
@@ -22,17 +22,18 @@ import {copy} from './copy';
|
||||
import {e2eRun} from './e2e';
|
||||
import {HttpClient} from './http-client';
|
||||
|
||||
process.on('unhandledRejection', async (error) => {
|
||||
await Logger.error('unhandledRejection', error);
|
||||
});
|
||||
|
||||
const pkgJson = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'))
|
||||
.toString());
|
||||
|
||||
const client = new HttpClient();
|
||||
const commander = new Command();
|
||||
|
||||
let actionDone = false;
|
||||
|
||||
process.on('unhandledRejection', async (error) => {
|
||||
await Logger.error('unhandledRejection', error);
|
||||
});
|
||||
|
||||
commander
|
||||
.command('e2e <to>')
|
||||
.description('Run in end to end test mode. Indexing and afterwards retrieving all test files from @openstapp/core to the backend')
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
SCThingUpdateRoute,
|
||||
} from '@openstapps/core';
|
||||
import clone = require('fast-clone');
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment';
|
||||
import {Bulk} from './bulk';
|
||||
import {Client} from './client';
|
||||
import {EmptyBulkError, NamespaceNotDefinedError} from './errors';
|
||||
|
||||
@@ -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 request from 'request';
|
||||
import request from 'request';
|
||||
|
||||
/**
|
||||
* Request options that requires a url
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
import {Converter} from '@openstapps/core-tools/lib/schema';
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import * as express from 'express';
|
||||
import express from 'express';
|
||||
import * as http from 'http';
|
||||
import * as http2 from 'http2';
|
||||
import {Schema} from 'jsonschema';
|
||||
import * as morgan from 'morgan';
|
||||
import morgan from 'morgan';
|
||||
import ErrnoException = NodeJS.ErrnoException;
|
||||
|
||||
/**
|
||||
@@ -143,7 +143,7 @@ export abstract class Plugin {
|
||||
|
||||
this.app.set('env', process.env.NODE_ENV);
|
||||
|
||||
this.app.all('*', async (req, res) => {
|
||||
this.app.all('*', async (req: express.Request, res: express.Response) => {
|
||||
if (this.active) {
|
||||
await this.onRouteInvoke(req, res);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user