@syngrisi/syngrisi
Version:
Syngrisi - Visual Testing Tool
73 lines (72 loc) • 3.85 kB
JavaScript
;
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/server/envConfig.ts
var envConfig_exports = {};
__export(envConfig_exports, {
env: () => env
});
module.exports = __toCommonJS(envConfig_exports);
var import_envalid = require("envalid");
var import_crypto = __toESM(require("crypto"));
var import_path = __toESM(require("path"));
var import_dotenv = __toESM(require("dotenv"));
import_dotenv.default.config();
if (!process.env.NODE_ENV) {
process.env.NODE_ENV = "production";
}
var env = (0, import_envalid.cleanEnv)(process.env, {
NODE_ENV: (0, import_envalid.str)({ choices: ["development", "production", "test"] }),
SYNGRISI_DB_URI: (0, import_envalid.str)({ default: "mongodb://127.0.0.1:27017/SyngrisiDb" }),
SYNGRISI_APP_PORT: (0, import_envalid.port)({ default: 3e3 }),
SYNGRISI_IMAGES_PATH: (0, import_envalid.str)({ default: import_path.default.join(process.cwd(), "./.snapshots-images") }),
SYNGRISI_TMP_DIR: (0, import_envalid.str)({ default: import_path.default.join(process.cwd(), ".tmp") }),
SYNGRISI_HTTP_LOG: (0, import_envalid.bool)({ default: false }),
SYNGRISI_COVERAGE: (0, import_envalid.bool)({ default: false }),
SYNGRISI_HOSTNAME: (0, import_envalid.host)({ default: "localhost" }),
SYNGRISI_AUTH: (0, import_envalid.bool)({ default: true }),
SYNGRISI_TEST_MODE: (0, import_envalid.bool)({ default: false }),
SYNGRISI_DISABLE_FIRST_RUN: (0, import_envalid.bool)({ default: false }),
MONGODB_ROOT_USERNAME: (0, import_envalid.str)({ default: "" }),
MONGODB_ROOT_PASSWORD: (0, import_envalid.str)({ default: "" }),
LOGLEVEL: (0, import_envalid.str)({ choices: ["error", "warn", "info", "verbose", "debug", "silly"], default: "debug" }),
SYNGRISI_PAGINATION_SIZE: (0, import_envalid.num)({ default: 50 }),
SYNGRISI_DISABLE_DEV_CORS: (0, import_envalid.bool)({ default: true, devDefault: true }),
SYNGRISI_SESSION_STORE_KEY: (0, import_envalid.str)({ default: import_crypto.default.randomBytes(64).toString("hex") }),
SYNGRISI_LOG_LEVEL: (0, import_envalid.str)({ default: "debug" }),
// trunk features
SYNGRISI_TRUNK_FEATURE_AI_SEVERITY: (0, import_envalid.bool)({ default: false }),
SYNGRISI_AI_KEY: (0, import_envalid.str)({ default: "" }),
OPENAI_API_BASE_URL: (0, import_envalid.str)({ default: "https://api.openai.com/v1" }),
OPENAI_API_KEY: (0, import_envalid.str)({ default: "" })
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
env
});
//# sourceMappingURL=envConfig.js.map