refactor: Upgrade typeorm to 0.3.x (#5151)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-01-13 18:12:22 +01:00
committed by GitHub
parent 6608e69457
commit 0a5ab560b1
85 changed files with 579 additions and 636 deletions

View File

@@ -72,7 +72,7 @@ export class Execute extends Command {
}
let workflowId: string | undefined;
let workflowData: IWorkflowBase | undefined;
let workflowData: IWorkflowBase | null = null;
if (flags.file) {
// Path to workflow is given
try {
@@ -91,7 +91,7 @@ export class Execute extends Command {
// Do a basic check if the data in the file looks right
// TODO: Later check with the help of TypeScript data if it is valid or not
if (
workflowData === undefined ||
workflowData === null ||
workflowData.nodes === undefined ||
workflowData.connections === undefined
) {
@@ -108,8 +108,8 @@ export class Execute extends Command {
if (flags.id) {
// Id of workflow is given
workflowId = flags.id;
workflowData = await Db.collections.Workflow.findOne(workflowId);
if (workflowData === undefined) {
workflowData = await Db.collections.Workflow.findOneBy({ id: workflowId });
if (workflowData === null) {
console.info(`The workflow with the id "${workflowId}" does not exist.`);
process.exit(1);
}