UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

35 lines (34 loc) 1.63 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Settings = exports.AggregationSettings = exports.MONGO_AUTO_INDEX = exports.MONGO_READ_PREFERENCE = exports.MONGO_MAX_TIME_MS = void 0; const aggregation_1 = require("./settings/aggregation"); Object.defineProperty(exports, "AggregationSettings", { enumerable: true, get: function () { return aggregation_1.AggregationSettings; } }); /** * domain settings */ class Settings { /** * 通知設定 */ // public readonly notification: IWebhookSettings; // migrate to SettingRepo(2024-12-11~) constructor(options) { const { abortedTasksWithoutReport, numTryConfirmReserveTransaction, deliverOrderLimit, coa, gmo, movieticketReserve, useExperimentalFeature } = options; this.abortedTasksWithoutReport = abortedTasksWithoutReport; this.numTryConfirmReserveTransaction = numTryConfirmReserveTransaction; this.deliverOrderLimit = deliverOrderLimit; this.coa = coa; this.gmo = gmo; this.movieticketReserve = movieticketReserve; this.useExperimentalFeature = useExperimentalFeature; // this.notification = notification; } } exports.Settings = Settings; exports.MONGO_MAX_TIME_MS = (typeof process.env.MONGO_MAX_TIME_MS === 'string') ? Number(process.env.MONGO_MAX_TIME_MS) // tslint:disable-next-line:no-magic-numbers : 10000; exports.MONGO_READ_PREFERENCE = (typeof process.env.MONGO_READ_PREFERENCE === 'string') ? process.env.MONGO_READ_PREFERENCE : 'primaryPreferred'; exports.MONGO_AUTO_INDEX = process.env.MONGO_AUTO_INDEX === '1';