From 6549313a54e7fede18cfa170df82c29f511d76d7 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sat, 12 Aug 2023 09:39:41 +0100 Subject: No more API build step --- api/_env.js | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 api/_env.js (limited to 'api/_env.js') diff --git a/api/_env.js b/api/_env.js deleted file mode 100644 index 409a6df..0000000 --- a/api/_env.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var path_1 = __importDefault(require("path")); -var dotenv_1 = __importDefault(require("dotenv")); -// Parsing the env file. -dotenv_1.default.config({ path: path_1.default.resolve(__dirname, '../.env') }); -var ENV = { - PAYPAL_LIVE_CLIENT_ID: 1, - PAYPAL_LIVE_SECRET: 1, - PAYPAL_SANDBOX_CLIENT_ID: 1, - PAYPAL_SANDBOX_SECRET: 1, - ENVIRONMENT: 1, -}; -var env = process.env; -var sanitisedEnvEntries = Object.keys(ENV) - .map(function (key) { - var value = env[key]; - if (!value) { - throw new Error("Environment not configured correctly. ".concat(key, " was not defined.")); - } - if (key === 'ENVIRONMENT') { - if (!['dev', 'prod'].includes(value)) { - throw new Error("\n Environment not configured correctly. ".concat(key, " must be\n either 'dev' or 'prod', but '").concat(value, "' was provided.\n ")); - } - } - return [key, value]; -}); -var sanitisedEnv = Object.fromEntries(sanitisedEnvEntries); -exports.default = sanitisedEnv; -//# sourceMappingURL=_env.js.map \ No newline at end of file -- cgit v1.2.3