mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Remove deprecated TIME constant (#11740)
This commit is contained in:
@@ -110,25 +110,12 @@ export const UM_FIX_INSTRUCTION =
|
||||
'Please fix the database by running ./packages/cli/bin/n8n user-management:reset';
|
||||
|
||||
/**
|
||||
* Units of time in milliseconds
|
||||
* @deprecated Please use constants.Time instead.
|
||||
*/
|
||||
export const TIME = {
|
||||
SECOND: 1000,
|
||||
MINUTE: 60 * 1000,
|
||||
HOUR: 60 * 60 * 1000,
|
||||
DAY: 24 * 60 * 60 * 1000,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* Convert time from any unit to any other unit
|
||||
*
|
||||
* Please amend conversions as necessary.
|
||||
* Eventually this will superseed `TIME` above
|
||||
* Convert time from any time unit to any other unit
|
||||
*/
|
||||
export const Time = {
|
||||
milliseconds: {
|
||||
toMinutes: 1 / (60 * 1000),
|
||||
toSeconds: 1 / 1000,
|
||||
},
|
||||
seconds: {
|
||||
toMilliseconds: 1000,
|
||||
@@ -150,9 +137,9 @@ export const MIN_PASSWORD_CHAR_LENGTH = 8;
|
||||
|
||||
export const MAX_PASSWORD_CHAR_LENGTH = 64;
|
||||
|
||||
export const TEST_WEBHOOK_TIMEOUT = 2 * TIME.MINUTE;
|
||||
export const TEST_WEBHOOK_TIMEOUT = 2 * Time.minutes.toMilliseconds;
|
||||
|
||||
export const TEST_WEBHOOK_TIMEOUT_BUFFER = 30 * TIME.SECOND;
|
||||
export const TEST_WEBHOOK_TIMEOUT_BUFFER = 30 * Time.seconds.toMilliseconds;
|
||||
|
||||
export const GENERIC_OAUTH2_CREDENTIALS_WITH_EDITABLE_SCOPE = [
|
||||
'oAuth2Api',
|
||||
|
||||
Reference in New Issue
Block a user