diff --git a/package-lock.json b/package-lock.json index 1cada24b..c13dba36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -613,9 +613,9 @@ } }, "@openstapps/core-tools": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@openstapps/core-tools/-/core-tools-0.24.2.tgz", - "integrity": "sha512-s57aSgmnESacrHoGCu6/G/dQt/S3+NI/0RhWOMzYB1AgqHGpJ//S3Gdjm8JHoAByrrbt8A17xtKa8dlrvcXW0g==", + "version": "0.24.3", + "resolved": "https://registry.npmjs.org/@openstapps/core-tools/-/core-tools-0.24.3.tgz", + "integrity": "sha512-+3Gdog/e/60FcsDSTweJuwpBAYQLxaJSF07j3qIm3089FL8i4pXBP5et81ezy/eUTX8kTiIgU+tDYodOwfAVvg==", "requires": { "@openstapps/logger": "0.7.0", "ajv": "6.12.6", @@ -2001,9 +2001,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.818", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.818.tgz", - "integrity": "sha512-c/Z9gIr+jDZAR9q+mn40hEc1NharBT+8ejkarjbCDnBNFviI6hvcC5j2ezkAXru//bTnQp5n6iPi0JA83Tla1Q==", + "version": "1.3.820", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.820.tgz", + "integrity": "sha512-5cFwDmo2yzEA9hn55KZ9+cX/b6DSFvpKz8Hb2fiDmriXWB+DBoXKXmncQwNRFBBTlUdsvPHCoy594OoMLAO0Tg==", "dev": true }, "emoji-regex": { diff --git a/package.json b/package.json index 0f00d7d1..a93b149e 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "dependencies": { "@krlwlfrt/async-pool": "0.5.0", "@openstapps/core": "0.49.3", - "@openstapps/core-tools": "0.24.2", + "@openstapps/core-tools": "0.24.3", "@openstapps/logger": "0.7.0", "@types/cli-progress": "3.9.2", "@types/express": "4.17.13", diff --git a/test/plugin-client.spec.ts b/test/plugin-client.spec.ts index 596c555a..f8e9ef2d 100644 --- a/test/plugin-client.spec.ts +++ b/test/plugin-client.spec.ts @@ -20,7 +20,7 @@ import {suite, test, timeout} from '@testdeck/mocha'; import {HttpClient} from '../src/http-client'; import {HttpClientResponse} from '../src/http-client-interface'; import {PluginClient} from '../src/plugin-client'; -import {TestPlugin} from './TestPlugin'; +import {TestPlugin} from './plugin-resources/test-plugin'; chai.use(chaiSpies); diff --git a/test/plugin-resources/test-plugin-response.ts b/test/plugin-resources/test-plugin-response.ts new file mode 100644 index 00000000..eac63bf7 --- /dev/null +++ b/test/plugin-resources/test-plugin-response.ts @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2021 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. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ +/** + * The Response Interface + * + * @validatable + */ + export interface TestPluginResponse { + /** + * Query dummy + */ + query: string; +} diff --git a/test/TestPlugin.ts b/test/plugin-resources/test-plugin.ts similarity index 89% rename from test/TestPlugin.ts rename to test/plugin-resources/test-plugin.ts index dc3b62f7..163ae8c6 100644 --- a/test/TestPlugin.ts +++ b/test/plugin-resources/test-plugin.ts @@ -14,7 +14,7 @@ */ import * as express from 'express'; -import {Plugin} from '../src/plugin'; +import {Plugin} from '../../src/plugin'; /** * A test plugin we use for all the tests @@ -23,8 +23,10 @@ import {Plugin} from '../src/plugin'; * It also serves as kind of a minimal plugin */ export class TestPlugin extends Plugin { + // tslint:disable-next-line: completed-docs prefer-function-over-method protected async onRouteInvoke(_req: express.Request, res: express.Response): Promise { res.json({}); + return undefined; } } diff --git a/test/plugin.spec.ts b/test/plugin.spec.ts index cfc8996e..7bbc548b 100644 --- a/test/plugin.spec.ts +++ b/test/plugin.spec.ts @@ -21,7 +21,7 @@ import {readFileSync} from 'fs'; import {suite, test, timeout} from '@testdeck/mocha'; import {resolve} from 'path'; import {HttpClient} from '../src/http-client'; -import {TestPlugin} from './TestPlugin'; +import {TestPlugin} from './plugin-resources/test-plugin'; chai.use(chaiSpies); @@ -54,7 +54,7 @@ export class PluginSpec { @test async construct() { - const converter = new Converter(__dirname); + const converter = new Converter(__dirname, resolve(__dirname,'plugin-resources','test-plugin-response.ts')); sandbox.on(converter, 'getSchema', (schemaName) => { return {$id: schemaName};