fix(editor): Prevent creation of input connections for nodes without input slot (#5425)

* fix(editor): Prevent creation of input connections for nodes without input

* WIP: Workflow checks service and controller

* fix: Created SQLite migration to remove broken connections

* Cleanup & add mysql/posgres migrations

* Linter fixes

* Unify the migration scripts

* Escape migration workflow_entity

* Wrap the migration in try/catch and do not parse nodes and connection if mysql/postgres

* Do migration changes also fro mysql

* refactor: Wrap only the necessary call in try catch block

---------

Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
OlegIvaniv
2023-02-09 16:04:26 +01:00
committed by GitHub
parent d9a4c2c66d
commit 018f8a3510
8 changed files with 301 additions and 26 deletions

View File

@@ -239,6 +239,14 @@ export class Start extends Command {
const { flags } = this.parse(Start);
try {
// Load all node and credential types
const loadNodesAndCredentials = LoadNodesAndCredentials();
await loadNodesAndCredentials.init();
// Add the found types to an instance other parts of the application can use
const nodeTypes = NodeTypes(loadNodesAndCredentials);
const credentialTypes = CredentialTypes(loadNodesAndCredentials);
// Start directly with the init of the database to improve startup time
await Db.init().catch(async (error: Error) =>
exitWithCrash('There was an error initializing DB', error),
@@ -265,18 +273,10 @@ export class Start extends Command {
await Start.generateStaticAssets();
}
// Load all node and credential types
const loadNodesAndCredentials = LoadNodesAndCredentials();
await loadNodesAndCredentials.init();
// Load all external hooks
const externalHooks = ExternalHooks();
await externalHooks.init();
// Add the found types to an instance other parts of the application can use
const nodeTypes = NodeTypes(loadNodesAndCredentials);
const credentialTypes = CredentialTypes(loadNodesAndCredentials);
// Load the credentials overwrites if any exist
CredentialsOverwrites(credentialTypes);