"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.DefaultMongoURI = void 0; var _parsers = require("./Options/parsers"); const { ParseServerOptions } = require('./Options/Definitions'); const logsFolder = (() => { let folder = './logs/'; if (typeof process !== 'undefined' && process.env.TESTING === '1') { folder = './test_logs/'; } if (process.env.PARSE_SERVER_LOGS_FOLDER) { folder = (0, _parsers.nullParser)(process.env.PARSE_SERVER_LOGS_FOLDER); } return folder; })(); const { verbose, level } = (() => { const verbose = process.env.VERBOSE ? true : false; return { verbose, level: verbose ? 'verbose' : undefined }; })(); const DefinitionDefaults = Object.keys(ParseServerOptions).reduce((memo, key) => { const def = ParseServerOptions[key]; if (Object.prototype.hasOwnProperty.call(def, 'default')) { memo[key] = def.default; } return memo; }, {}); const computedDefaults = { jsonLogs: process.env.JSON_LOGS || false, logsFolder, verbose, level }; var _default = exports.default = Object.assign({}, DefinitionDefaults, computedDefaults); const DefaultMongoURI = exports.DefaultMongoURI = DefinitionDefaults.databaseURI; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcGFyc2VycyIsInJlcXVpcmUiLCJQYXJzZVNlcnZlck9wdGlvbnMiLCJsb2dzRm9sZGVyIiwiZm9sZGVyIiwicHJvY2VzcyIsImVudiIsIlRFU1RJTkciLCJQQVJTRV9TRVJWRVJfTE9HU19GT0xERVIiLCJudWxsUGFyc2VyIiwidmVyYm9zZSIsImxldmVsIiwiVkVSQk9TRSIsInVuZGVmaW5lZCIsIkRlZmluaXRpb25EZWZhdWx0cyIsIk9iamVjdCIsImtleXMiLCJyZWR1Y2UiLCJtZW1vIiwia2V5IiwiZGVmIiwicHJvdG90eXBlIiwiaGFzT3duUHJvcGVydHkiLCJjYWxsIiwiZGVmYXVsdCIsImNvbXB1dGVkRGVmYXVsdHMiLCJqc29uTG9ncyIsIkpTT05fTE9HUyIsIl9kZWZhdWx0IiwiZXhwb3J0cyIsImFzc2lnbiIsIkRlZmF1bH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