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
@@ -3,6 +3,7 @@ import dotenv from 'dotenv';
|
||||
import { tmpdir } from 'os';
|
||||
import { mkdirSync, mkdtempSync, readFileSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
import { setGlobalState } from 'n8n-workflow';
|
||||
import { schema } from './schema';
|
||||
import { inTest, inE2ETests } from '@/constants';
|
||||
|
||||
@@ -73,6 +74,10 @@ config.validate({
|
||||
allowed: 'strict',
|
||||
});
|
||||
|
||||
setGlobalState({
|
||||
defaultTimezone: config.getEnv('generic.timezone'),
|
||||
});
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default config;
|
||||
export type Config = typeof config;
|
||||
|
||||
Reference in New Issue
Block a user