mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
ci: Fix linting issues on master (no-changelog) (#5740)
This commit is contained in:
parent
469ce32957
commit
34d7fcc27e
|
@ -207,7 +207,7 @@ export function hasPackageLoaded(packageName: string): boolean {
|
|||
|
||||
export function removePackageFromMissingList(packageName: string): void {
|
||||
try {
|
||||
const failedPackages = (config.get('nodes.packagesMissing') as string).split(' ');
|
||||
const failedPackages = config.get('nodes.packagesMissing').split(' ');
|
||||
|
||||
const packageFailedToLoad = failedPackages.filter(
|
||||
(packageNameAndVersion) =>
|
||||
|
|
|
@ -158,9 +158,8 @@ export class MessageEventBusLogWriter {
|
|||
sentMessages: [],
|
||||
unfinishedExecutions: {},
|
||||
};
|
||||
const logCount = logHistory
|
||||
? Math.min(config.get('eventBus.logWriter.keepLogCount') as number, logHistory)
|
||||
: (config.get('eventBus.logWriter.keepLogCount') as number);
|
||||
const configLogCount = config.get('eventBus.logWriter.keepLogCount');
|
||||
const logCount = logHistory ? Math.min(configLogCount, logHistory) : configLogCount;
|
||||
for (let i = logCount; i >= 0; i--) {
|
||||
const logFileName = this.getLogFileName(i);
|
||||
if (logFileName) {
|
||||
|
@ -255,9 +254,8 @@ export class MessageEventBusLogWriter {
|
|||
logHistory?: number,
|
||||
): Promise<EventMessageTypes[]> {
|
||||
const result: EventMessageTypes[] = [];
|
||||
const logCount = logHistory
|
||||
? Math.min(config.get('eventBus.logWriter.keepLogCount') as number, logHistory)
|
||||
: (config.get('eventBus.logWriter.keepLogCount') as number);
|
||||
const configLogCount = config.get('eventBus.logWriter.keepLogCount');
|
||||
const logCount = logHistory ? Math.min(configLogCount, logHistory) : configLogCount;
|
||||
for (let i = 0; i < logCount; i++) {
|
||||
const logFileName = this.getLogFileName(i);
|
||||
if (logFileName) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { RequestHandler } from 'express';
|
||||
import type { AuthenticatedRequest } from '../../../requests';
|
||||
import type { AuthenticatedRequest } from '@/requests';
|
||||
import { isSamlLicensed, isSamlLicensedAndEnabled } from '../samlHelpers';
|
||||
|
||||
export const samlLicensedOwnerMiddleware: RequestHandler = (
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import express from 'express';
|
||||
import { Get, Post, RestController } from '../../../decorators';
|
||||
import { Get, Post, RestController } from '@/decorators';
|
||||
import { SamlUrls } from '../constants';
|
||||
import {
|
||||
samlLicensedAndEnabledMiddleware,
|
||||
|
@ -8,15 +8,14 @@ import {
|
|||
} from '../middleware/samlEnabledMiddleware';
|
||||
import { SamlService } from '../saml.service.ee';
|
||||
import { SamlConfiguration } from '../types/requests';
|
||||
import { AuthError, BadRequestError } from '../../../ResponseHelper';
|
||||
import { AuthError, BadRequestError } from '@/ResponseHelper';
|
||||
import { getInitSSOFormView } from '../views/initSsoPost';
|
||||
import { getInitSSOPostView } from '../views/initSsoRedirect';
|
||||
import { issueCookie } from '../../../auth/jwt';
|
||||
import { issueCookie } from '@/auth/jwt';
|
||||
import { validate } from 'class-validator';
|
||||
import type { PostBindingContext } from 'samlify/types/src/entity';
|
||||
import { isSamlLicensedAndEnabled } from '../samlHelpers';
|
||||
import type { SamlLoginBinding } from '../types';
|
||||
import { AuthenticatedRequest } from '../../../requests';
|
||||
import { AuthenticatedRequest } from '@/requests';
|
||||
|
||||
@RestController('/sso/saml')
|
||||
export class SamlController {
|
||||
|
@ -136,8 +135,6 @@ export class SamlController {
|
|||
private async handleInitSSO(res: express.Response) {
|
||||
const result = this.samlService.getLoginRequestUrl();
|
||||
if (result?.binding === 'redirect') {
|
||||
// forced client side redirect through the use of a javascript redirect
|
||||
// return res.send(getInitSSOPostView(result.context));
|
||||
// Return the redirect URL directly
|
||||
return res.send(result.context.context);
|
||||
} else if (result?.binding === 'post') {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { AuthenticatedRequest } from '../../../requests';
|
||||
import type { AuthenticatedRequest } from '@/requests';
|
||||
import type { SamlPreferences } from './samlPreferences';
|
||||
|
||||
export declare namespace SamlConfiguration {
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
import type { BindingContext } from 'samlify/types/src/entity';
|
||||
|
||||
export function getInitSSOPostView(context: BindingContext): string {
|
||||
return `
|
||||
<html></html>
|
||||
<script type="text/javascript">
|
||||
// Automatic redirect
|
||||
(function(){
|
||||
location.href = "${context.context}";
|
||||
})();
|
||||
</script>`;
|
||||
}
|
Loading…
Reference in a new issue