ci: Upgrade eslint, prettier, typescript, and some other dev tooling (no-changelog) (#8895)
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
committed by
GitHub
parent
117b57ccc5
commit
372d5c7d01
@@ -488,7 +488,7 @@ export class InternalHooks {
|
||||
? this.eventBus.sendWorkflowEvent({
|
||||
eventName: 'n8n.workflow.success',
|
||||
payload: sharedEventPayload,
|
||||
})
|
||||
})
|
||||
: this.eventBus.sendWorkflowEvent({
|
||||
eventName: 'n8n.workflow.failed',
|
||||
payload: {
|
||||
@@ -498,7 +498,7 @@ export class InternalHooks {
|
||||
errorNodeId: telemetryProperties.error_node_id?.toString(),
|
||||
errorMessage: telemetryProperties.error_message?.toString(),
|
||||
},
|
||||
}),
|
||||
}),
|
||||
);
|
||||
|
||||
void Promise.all([...promises, this.telemetry.trackWorkflowExecution(telemetryProperties)]);
|
||||
|
||||
@@ -133,7 +133,7 @@ export class LoadNodesAndCredentials {
|
||||
: [
|
||||
...(await glob('n8n-nodes-*', globOptions)),
|
||||
...(await glob('@*/n8n-nodes-*', { ...globOptions, deep: 2 })),
|
||||
];
|
||||
];
|
||||
|
||||
for (const packagePath of installedPackagePaths) {
|
||||
try {
|
||||
|
||||
@@ -108,7 +108,7 @@ export class TestWebhooks implements IWebhookManager {
|
||||
const executionMode = 'manual';
|
||||
const executionId = await WebhookHelpers.executeWebhook(
|
||||
workflow,
|
||||
webhook!,
|
||||
webhook,
|
||||
workflowEntity,
|
||||
workflowStartNode,
|
||||
executionMode,
|
||||
|
||||
@@ -828,7 +828,7 @@ export async function executeWebhook(
|
||||
: new ApplicationError('There was a problem executing the workflow', {
|
||||
level: 'warning',
|
||||
cause: e,
|
||||
});
|
||||
});
|
||||
if (didSendResponse) throw error;
|
||||
responseCallback(error, {});
|
||||
return;
|
||||
|
||||
@@ -19,7 +19,7 @@ type GetPathSegments<Traversable, Filter> = Traversable extends Filter
|
||||
? []
|
||||
: {
|
||||
[K in ValidKeys<Traversable>]: [K, ...GetPathSegments<Traversable[K], Filter>];
|
||||
}[ValidKeys<Traversable>];
|
||||
}[ValidKeys<Traversable>];
|
||||
|
||||
/**
|
||||
* Transform a union of string arrays (path segments) into a union of strings (dotted paths).
|
||||
@@ -31,12 +31,12 @@ type GetPathSegments<Traversable, Filter> = Traversable extends Filter
|
||||
type JoinByDotting<T extends string[]> = T extends [infer F]
|
||||
? F
|
||||
: T extends [infer F, ...infer R]
|
||||
? F extends string
|
||||
? F extends string
|
||||
? R extends string[]
|
||||
? `${F}.${JoinByDotting<R>}`
|
||||
: never
|
||||
: never
|
||||
: string;
|
||||
: string;
|
||||
|
||||
type ToDottedPath<T> = JoinByDotting<RemoveExcess<T>>;
|
||||
|
||||
@@ -64,14 +64,14 @@ type ConfigOptionPath =
|
||||
type ToReturnType<T extends ConfigOptionPath> = T extends NumericPath
|
||||
? number
|
||||
: T extends BooleanPath
|
||||
? boolean
|
||||
: T extends StringLiteralArrayPath
|
||||
? StringLiteralMap[T]
|
||||
: T extends keyof ExceptionPaths
|
||||
? ExceptionPaths[T]
|
||||
: T extends StringPath
|
||||
? string
|
||||
: unknown;
|
||||
? boolean
|
||||
: T extends StringLiteralArrayPath
|
||||
? StringLiteralMap[T]
|
||||
: T extends keyof ExceptionPaths
|
||||
? ExceptionPaths[T]
|
||||
: T extends StringPath
|
||||
? string
|
||||
: unknown;
|
||||
|
||||
type ExceptionPaths = {
|
||||
'queue.bull.redis': object;
|
||||
@@ -86,11 +86,12 @@ type ExceptionPaths = {
|
||||
// string literals map
|
||||
// -----------------------------------
|
||||
|
||||
type GetPathSegmentsWithUnions<T> = T extends ReadonlyArray<infer C>
|
||||
? [C]
|
||||
: {
|
||||
[K in ValidKeys<T>]: [K, ...GetPathSegmentsWithUnions<T[K]>];
|
||||
}[ValidKeys<T>];
|
||||
type GetPathSegmentsWithUnions<T> =
|
||||
T extends ReadonlyArray<infer C>
|
||||
? [C]
|
||||
: {
|
||||
[K in ValidKeys<T>]: [K, ...GetPathSegmentsWithUnions<T[K]>];
|
||||
}[ValidKeys<T>];
|
||||
|
||||
type ToPathUnionPair<T extends string[]> = T extends [...infer Path, infer Union]
|
||||
? Path extends string[]
|
||||
|
||||
@@ -358,7 +358,7 @@ export class CredentialsController {
|
||||
);
|
||||
|
||||
if (newShareeIds.length) {
|
||||
await this.enterpriseCredentialsService.share(trx, credential!, newShareeIds);
|
||||
await this.enterpriseCredentialsService.share(trx, credential, newShareeIds);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -29,15 +29,15 @@ export class CreateLdapEntities1674509946020 implements ReversibleMigration {
|
||||
dbType === 'sqlite'
|
||||
? 'INTEGER PRIMARY KEY AUTOINCREMENT'
|
||||
: dbType === 'postgresdb'
|
||||
? 'SERIAL NOT NULL PRIMARY KEY'
|
||||
: 'INTEGER NOT NULL AUTO_INCREMENT';
|
||||
? 'SERIAL NOT NULL PRIMARY KEY'
|
||||
: 'INTEGER NOT NULL AUTO_INCREMENT';
|
||||
|
||||
const timestampColumn =
|
||||
dbType === 'sqlite'
|
||||
? 'DATETIME NOT NULL'
|
||||
: dbType === 'postgresdb'
|
||||
? 'TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP'
|
||||
: 'DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP';
|
||||
? 'TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP'
|
||||
: 'DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP';
|
||||
|
||||
await runQuery(
|
||||
`CREATE TABLE IF NOT EXISTS ${escape.tableName('auth_provider_sync_history')} (
|
||||
|
||||
@@ -31,7 +31,7 @@ export class InstalledPackagesRepository extends Repository<InstalledPackages> {
|
||||
|
||||
installedPackage.installedNodes = [];
|
||||
|
||||
return loadedNodes.map(async (loadedNode) => {
|
||||
for (const loadedNode of loadedNodes) {
|
||||
const installedNode = this.installedNodesRepository.create({
|
||||
name: nodeTypes[loadedNode.name].type.description.displayName,
|
||||
type: loadedNode.name,
|
||||
@@ -41,8 +41,8 @@ export class InstalledPackagesRepository extends Repository<InstalledPackages> {
|
||||
|
||||
installedPackage.installedNodes.push(installedNode);
|
||||
|
||||
return await manager.save(installedNode);
|
||||
});
|
||||
await manager.save(installedNode);
|
||||
}
|
||||
});
|
||||
|
||||
return installedPackage!;
|
||||
|
||||
@@ -136,7 +136,7 @@ export class WorkflowRepository extends Repository<WorkflowEntity> {
|
||||
updatedAt: true,
|
||||
versionId: true,
|
||||
shared: { userId: true, role: true },
|
||||
};
|
||||
};
|
||||
|
||||
delete select?.ownedBy; // remove non-entity field, handled after query
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export function getLabelsForEvent(event: EventMessageTypes): Record<string, stri
|
||||
credential_type: getLabelValueForCredential(
|
||||
event.payload.credentialType ?? 'unknown',
|
||||
),
|
||||
}
|
||||
}
|
||||
: {};
|
||||
}
|
||||
|
||||
|
||||
@@ -127,11 +127,11 @@ export class CredentialsTester {
|
||||
? {
|
||||
status: 'OK',
|
||||
message: OAUTH2_CREDENTIAL_TEST_SUCCEEDED,
|
||||
}
|
||||
}
|
||||
: {
|
||||
status: 'Error',
|
||||
message: OAUTH2_CREDENTIAL_TEST_FAILED,
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -49,13 +49,12 @@ export function getWorkerCommandReceivedHandler(options: WorkerCommandReceivedHa
|
||||
arch: os.arch(),
|
||||
platform: os.platform(),
|
||||
hostname: os.hostname(),
|
||||
interfaces: Object.values(os.networkInterfaces()).flatMap(
|
||||
(interfaces) =>
|
||||
(interfaces ?? [])?.map((net) => ({
|
||||
family: net.family,
|
||||
address: net.address,
|
||||
internal: net.internal,
|
||||
})),
|
||||
interfaces: Object.values(os.networkInterfaces()).flatMap((interfaces) =>
|
||||
(interfaces ?? [])?.map((net) => ({
|
||||
family: net.family,
|
||||
address: net.address,
|
||||
internal: net.internal,
|
||||
})),
|
||||
),
|
||||
version: N8N_VERSION,
|
||||
},
|
||||
|
||||
@@ -51,7 +51,7 @@ export class WorkflowService {
|
||||
? {
|
||||
workflows: workflows.map((w) => this.ownershipService.addOwnedByAndSharedWith(w)),
|
||||
count,
|
||||
}
|
||||
}
|
||||
: { workflows, count };
|
||||
}
|
||||
|
||||
|
||||
@@ -393,7 +393,7 @@ export class WorkflowsController {
|
||||
|
||||
if (newShareeIds.length) {
|
||||
const users = await this.userRepository.getByIds(trx, newShareeIds);
|
||||
await this.sharedWorkflowRepository.share(trx, workflow!, users);
|
||||
await this.sharedWorkflowRepository.share(trx, workflow, users);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ describe('GET /workflow-history/:workflowId', () => {
|
||||
),
|
||||
);
|
||||
|
||||
const last = versions.sort((a, b) => b.createdAt.valueOf() - a.createdAt.valueOf())[0]! as any;
|
||||
const last = versions.sort((a, b) => b.createdAt.valueOf() - a.createdAt.valueOf())[0] as any;
|
||||
delete last.nodes;
|
||||
delete last.connections;
|
||||
|
||||
@@ -95,7 +95,7 @@ describe('GET /workflow-history/:workflowId', () => {
|
||||
new Array(10).fill(undefined).map(async (_) => await createWorkflowHistoryItem(workflow2.id)),
|
||||
);
|
||||
|
||||
const last = versions.sort((a, b) => b.createdAt.valueOf() - a.createdAt.valueOf())[0]! as any;
|
||||
const last = versions.sort((a, b) => b.createdAt.valueOf() - a.createdAt.valueOf())[0] as any;
|
||||
delete last.nodes;
|
||||
delete last.connections;
|
||||
|
||||
@@ -119,7 +119,7 @@ describe('GET /workflow-history/:workflowId', () => {
|
||||
),
|
||||
);
|
||||
|
||||
const last = versions.sort((a, b) => b.createdAt.valueOf() - a.createdAt.valueOf())[0]! as any;
|
||||
const last = versions.sort((a, b) => b.createdAt.valueOf() - a.createdAt.valueOf())[0] as any;
|
||||
delete last.nodes;
|
||||
delete last.connections;
|
||||
|
||||
@@ -143,7 +143,7 @@ describe('GET /workflow-history/:workflowId', () => {
|
||||
),
|
||||
);
|
||||
|
||||
const last = versions.sort((a, b) => b.createdAt.valueOf() - a.createdAt.valueOf())[5]! as any;
|
||||
const last = versions.sort((a, b) => b.createdAt.valueOf() - a.createdAt.valueOf())[5] as any;
|
||||
delete last.nodes;
|
||||
delete last.connections;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user