From cf0fe5cbbada323e59f53135fa6e770b07abc3f3 Mon Sep 17 00:00:00 2001 From: tresabhi Date: Sat, 9 Sep 2023 03:05:59 +0000 Subject: [PATCH] feat: use dot env --- package.json | 1 + src/core/node/secrets.ts | 4 ++++ yarn.lock | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/package.json b/package.json index 029ea944e..24300049d 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "@resvg/resvg-js": "^2.4.1", "bepaint": "^0.1.0-beta.3", "discord.js": "^14.13.0", + "dotenv": "^16.3.1", "esbuild": "^0.19.2", "express": "^4.18.2", "fuzzysort": "^2.0.4", diff --git a/src/core/node/secrets.ts b/src/core/node/secrets.ts index f3bea2763..2dfa7c091 100644 --- a/src/core/node/secrets.ts +++ b/src/core/node/secrets.ts @@ -1,3 +1,7 @@ +import { config } from 'dotenv'; + +config(); + export const SECRET_KEYS = [ 'DISCORD_TOKEN', 'WARGAMING_APPLICATION_ID', diff --git a/yarn.lock b/yarn.lock index 2a00dc1bd..90a477f3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1429,6 +1429,11 @@ discord.js@^14.13.0: undici "5.22.1" ws "^8.13.0" +dotenv@^16.3.1: + version "16.3.1" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" + integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== + eastasianwidth@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" @@ -2456,6 +2461,7 @@ streamsearch@^1.1.0: integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== "string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0: + name string-width-cjs version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -2484,6 +2490,7 @@ string.prototype.codepointat@^0.2.1: integrity sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg== "strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: + name strip-ansi-cjs version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==