mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
refactor(core): Avoid passing around static state like default timezone (no-changelog) (#7221)
This commit is contained in:
committed by
GitHub
parent
62c096710f
commit
35bb42c1b9
15
packages/workflow/src/GlobalState.ts
Normal file
15
packages/workflow/src/GlobalState.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { deepCopy } from './utils';
|
||||
|
||||
export interface GlobalState {
|
||||
defaultTimezone: string;
|
||||
}
|
||||
|
||||
let globalState: GlobalState = { defaultTimezone: 'America/New_York' };
|
||||
|
||||
export function setGlobalState(state: GlobalState) {
|
||||
globalState = state;
|
||||
}
|
||||
|
||||
export function getGlobalState() {
|
||||
return deepCopy(globalState);
|
||||
}
|
||||
Reference in New Issue
Block a user