mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-04 20:42:52 +00:00
feat: enable stricter typescript compiler options
This commit is contained in:
@@ -48,16 +48,16 @@ const program = new Command()
|
||||
const options = program.opts();
|
||||
|
||||
// create an instance of the PluginClient
|
||||
const pluginClient = new PluginClient(new HttpClient(), options.backendUrl);
|
||||
const pluginClient = new PluginClient(new HttpClient(), options['backendUrl']);
|
||||
|
||||
// create an instance of your plugin
|
||||
const plugin = new MinimalPlugin(
|
||||
// tslint:disable-next-line:no-magic-numbers
|
||||
Number.parseInt(options.port, 10),
|
||||
options.pluginName,
|
||||
options.url,
|
||||
`/${options.routeName}`,
|
||||
options.backendUrl,
|
||||
Number.parseInt(options['port'], 10),
|
||||
options['pluginName'],
|
||||
options['url'],
|
||||
`/${options['routeName']}`,
|
||||
options['backendUrl'],
|
||||
new Converter(path.resolve(__dirname, '..', 'src', 'plugin', 'protocol')), // an instance of the converter. Required
|
||||
// because your requests and response schemas are defined in the plugin. The path should lead to your request and
|
||||
// response interfaces
|
||||
@@ -69,7 +69,7 @@ const plugin = new MinimalPlugin(
|
||||
pluginClient
|
||||
.registerPlugin(plugin)
|
||||
.then(() => {
|
||||
Logger.ok(`Successfully registered plugin '${options.pluginName}' on /${options.routeName} .`);
|
||||
Logger.ok(`Successfully registered plugin '${options['pluginName']}' on /${options['routeName']} .`);
|
||||
})
|
||||
// eslint-disable-next-line unicorn/prefer-top-level-await
|
||||
.catch((error: Error) => {
|
||||
@@ -81,7 +81,9 @@ for (const signal of [`exit`, `SIGINT`, `SIGUSR1`, `SIGUSR2`, `SIGTERM`]) {
|
||||
pluginClient
|
||||
.unregisterPlugin(plugin)
|
||||
.then(() => {
|
||||
Logger.ok(`Successfully unregistered plugin '${options.pluginName}' from /${options.routeName} .`);
|
||||
Logger.ok(
|
||||
`Successfully unregistered plugin '${options['pluginName']}' from /${options['routeName']} .`,
|
||||
);
|
||||
})
|
||||
.catch((error: Error) => {
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user