mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
⚡ Allow to use execute command with workflows that do not have an ID
This commit is contained in:
@@ -2,7 +2,12 @@
|
|||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import { Command, flags } from '@oclif/command';
|
import { Command, flags } from '@oclif/command';
|
||||||
import { BinaryDataManager, IBinaryDataConfig, UserSettings } from 'n8n-core';
|
import {
|
||||||
|
BinaryDataManager,
|
||||||
|
IBinaryDataConfig,
|
||||||
|
UserSettings,
|
||||||
|
PLACEHOLDER_EMPTY_WORKFLOW_ID,
|
||||||
|
} from 'n8n-core';
|
||||||
import { INode, LoggerProxy } from 'n8n-workflow';
|
import { INode, LoggerProxy } from 'n8n-workflow';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -96,8 +101,8 @@ export class Execute extends Command {
|
|||||||
console.info(`The file "${flags.file}" does not contain valid workflow data.`);
|
console.info(`The file "${flags.file}" does not contain valid workflow data.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
||||||
workflowId = workflowData.id!.toString();
|
workflowId = workflowData.id ? workflowData.id.toString() : PLACEHOLDER_EMPTY_WORKFLOW_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait till the database is ready
|
// Wait till the database is ready
|
||||||
|
|||||||
@@ -6,5 +6,6 @@ export const USER_FOLDER_ENV_OVERWRITE = 'N8N_USER_FOLDER';
|
|||||||
export const USER_SETTINGS_FILE_NAME = 'config';
|
export const USER_SETTINGS_FILE_NAME = 'config';
|
||||||
export const USER_SETTINGS_SUBFOLDER = '.n8n';
|
export const USER_SETTINGS_SUBFOLDER = '.n8n';
|
||||||
export const PLACEHOLDER_EMPTY_EXECUTION_ID = '__UNKOWN__';
|
export const PLACEHOLDER_EMPTY_EXECUTION_ID = '__UNKOWN__';
|
||||||
|
export const PLACEHOLDER_EMPTY_WORKFLOW_ID = '__EMPTY__';
|
||||||
export const TUNNEL_SUBDOMAIN_ENV = 'N8N_TUNNEL_SUBDOMAIN';
|
export const TUNNEL_SUBDOMAIN_ENV = 'N8N_TUNNEL_SUBDOMAIN';
|
||||||
export const WAIT_TIME_UNLIMITED = '3000-01-01T00:00:00.000Z';
|
export const WAIT_TIME_UNLIMITED = '3000-01-01T00:00:00.000Z';
|
||||||
|
|||||||
Reference in New Issue
Block a user