fix(core): Fix type errors (no-changelog) (#9571)
This commit is contained in:
@@ -66,7 +66,7 @@ export class Queue {
|
||||
: getRedisStandardClient(Redis, clientConfig, (type + '(bull)') as RedisClientType),
|
||||
});
|
||||
|
||||
this.jobQueue.on('global:progress', (jobId, progress: WebhookResponse) => {
|
||||
this.jobQueue.on('global:progress', (_jobId, progress: WebhookResponse) => {
|
||||
this.activeExecutions.resolveResponsePromise(
|
||||
progress.executionId,
|
||||
this.decodeWebhookResponse(progress.response),
|
||||
|
||||
@@ -13,7 +13,6 @@ import type {
|
||||
} from '@/Interfaces';
|
||||
import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData';
|
||||
import { ExecutionRepository } from '@db/repositories/execution.repository';
|
||||
import { OwnershipService } from './services/ownership.service';
|
||||
import { Logger } from '@/Logger';
|
||||
import { ConflictError } from './errors/response-errors/conflict.error';
|
||||
import { NotFoundError } from './errors/response-errors/not-found.error';
|
||||
@@ -26,7 +25,6 @@ export class WaitingWebhooks implements IWebhookManager {
|
||||
protected readonly logger: Logger,
|
||||
private readonly nodeTypes: NodeTypes,
|
||||
private readonly executionRepository: ExecutionRepository,
|
||||
private readonly ownershipService: OwnershipService,
|
||||
) {}
|
||||
|
||||
// TODO: implement `getWebhookMethods` for CORS support
|
||||
|
||||
@@ -385,7 +385,7 @@ export class Worker extends BaseCommand {
|
||||
app.get(
|
||||
'/healthz',
|
||||
|
||||
async (req: express.Request, res: express.Response) => {
|
||||
async (_req: express.Request, res: express.Response) => {
|
||||
this.logger.debug('Health check started!');
|
||||
|
||||
const connection = Db.getConnection();
|
||||
|
||||
@@ -13,7 +13,7 @@ export class TagsController {
|
||||
|
||||
// TODO: move this into a new decorator `@IfEnabled('workflowTagsDisabled')`
|
||||
@Middleware()
|
||||
workflowsEnabledMiddleware(req: Request, res: Response, next: NextFunction) {
|
||||
workflowsEnabledMiddleware(_req: Request, _res: Response, next: NextFunction) {
|
||||
if (this.config.getEnv('workflowTagsDisabled'))
|
||||
throw new BadRequestError('Workflow tags are disabled');
|
||||
next();
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Container } from 'typedi';
|
||||
import { isSourceControlLicensed } from '../sourceControlHelper.ee';
|
||||
import { SourceControlPreferencesService } from '../sourceControlPreferences.service.ee';
|
||||
|
||||
export const sourceControlLicensedAndEnabledMiddleware: RequestHandler = (req, res, next) => {
|
||||
export const sourceControlLicensedAndEnabledMiddleware: RequestHandler = (_req, res, next) => {
|
||||
const sourceControlPreferencesService = Container.get(SourceControlPreferencesService);
|
||||
if (sourceControlPreferencesService.isSourceControlLicensedAndEnabled()) {
|
||||
next();
|
||||
@@ -19,7 +19,7 @@ export const sourceControlLicensedAndEnabledMiddleware: RequestHandler = (req, r
|
||||
}
|
||||
};
|
||||
|
||||
export const sourceControlLicensedMiddleware: RequestHandler = (req, res, next) => {
|
||||
export const sourceControlLicensedMiddleware: RequestHandler = (_req, res, next) => {
|
||||
if (isSourceControlLicensed()) {
|
||||
next();
|
||||
} else {
|
||||
|
||||
@@ -6,7 +6,7 @@ export function islogStreamingLicensed(): boolean {
|
||||
return Container.get(License).isLogStreamingEnabled();
|
||||
}
|
||||
|
||||
export const logStreamingLicensedMiddleware: RequestHandler = (req, res, next) => {
|
||||
export const logStreamingLicensedMiddleware: RequestHandler = (_req, res, next) => {
|
||||
if (islogStreamingLicensed()) {
|
||||
next();
|
||||
} else {
|
||||
|
||||
@@ -17,7 +17,7 @@ const xmlParser = new XmlParser({
|
||||
});
|
||||
|
||||
const payloadSizeMax = config.getEnv('endpoints.payloadSizeMax');
|
||||
export const rawBodyReader: RequestHandler = async (req, res, next) => {
|
||||
export const rawBodyReader: RequestHandler = async (req, _res, next) => {
|
||||
parseIncomingMessage(req);
|
||||
|
||||
req.readRawBody = async () => {
|
||||
@@ -70,7 +70,7 @@ export const parseBody = async (req: Request) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const bodyParser: RequestHandler = async (req, res, next) => {
|
||||
export const bodyParser: RequestHandler = async (req, _res, next) => {
|
||||
await parseBody(req);
|
||||
if (!req.body) req.body = {};
|
||||
next();
|
||||
|
||||
@@ -77,7 +77,7 @@ export class MetricsService extends EventEmitter {
|
||||
}
|
||||
|
||||
mountMetricsEndpoint(app: express.Application) {
|
||||
app.get('/metrics', async (req: express.Request, res: express.Response) => {
|
||||
app.get('/metrics', async (_req: express.Request, res: express.Response) => {
|
||||
const metrics = await promClient.register.metrics();
|
||||
res.setHeader('Content-Type', promClient.register.contentType);
|
||||
res.send(metrics).end();
|
||||
|
||||
@@ -91,4 +91,4 @@ export function rightDiff<T1, T2>(
|
||||
* Can be used to make sure the type is exhausted
|
||||
* in switch statements or if/else chains.
|
||||
*/
|
||||
export const assertNever = (value: never) => {};
|
||||
export const assertNever = (_value: never) => {};
|
||||
|
||||
Reference in New Issue
Block a user