From 091057464d70f032f4463bcb573c25bdc09cc318 Mon Sep 17 00:00:00 2001 From: Blake Byrnes Date: Sat, 20 Apr 2024 14:32:02 -0400 Subject: [PATCH] chore: load env files for client --- client/env.ts | 9 +++++++++ client/index.ts | 1 + 2 files changed, 10 insertions(+) create mode 100644 client/env.ts diff --git a/client/env.ts b/client/env.ts new file mode 100644 index 000000000..bde333f61 --- /dev/null +++ b/client/env.ts @@ -0,0 +1,9 @@ +import { loadEnv, parseEnvPath } from '@ulixee/commons/lib/envUtils'; +import * as Path from 'path'; + +loadEnv(Path.join(__dirname, '..', 'core')); +loadEnv(Path.join(__dirname, '..', 'hero-core')); + +const env = process.env; + +if (env.ULX_DATA_DIR) env.ULX_DATA_DIR = parseEnvPath(env.ULX_DATA_DIR); diff --git a/client/index.ts b/client/index.ts index f6e464006..fbdf75b4e 100644 --- a/client/index.ts +++ b/client/index.ts @@ -32,6 +32,7 @@ import { Command } from './interfaces/IInteractions'; import { Hero, HeroReplay, FrameEnvironment, Tab, Resource, WebsocketResource } from './lib/extendables'; import ConnectionToHeroCore from './connections/ConnectionToHeroCore'; import DetachedElement from './lib/DetachedElement'; +import './env'; export default Hero;