mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 12:17:37 +00:00
fix: cyclical dependencies
Fixes #468 Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
+2
-3
@@ -1,9 +1,8 @@
|
||||
import {banner} from './banner';
|
||||
|
||||
console.log(banner);
|
||||
console.info(banner);
|
||||
|
||||
import {config as config_} from 'dotenv';
|
||||
import {logger} from './logger';
|
||||
import path from 'path';
|
||||
|
||||
config_({path: path.resolve(__dirname, '../.env')});
|
||||
@@ -205,7 +204,7 @@ const proxy = {
|
||||
|
||||
// Check for deprecated configuration values
|
||||
if (process.env.MAX_PRICE) {
|
||||
logger.warn('ℹ MAX_PRICE is deprecated, please use MAX_PRICE_SERIES_{{series}}');
|
||||
console.warn('ℹ MAX_PRICE is deprecated, please use MAX_PRICE_SERIES_{{series}}');
|
||||
}
|
||||
|
||||
const store = {
|
||||
|
||||
@@ -5,22 +5,24 @@ import {sendDiscordMessage} from './discord';
|
||||
import {sendEmail} from './email';
|
||||
import {sendPushbulletNotification} from './pushbullet';
|
||||
import {sendPushoverNotification} from './pushover';
|
||||
import {sendSMS} from './sms';
|
||||
import {sendSlackMessage} from './slack';
|
||||
import {sendSms} from './sms';
|
||||
import {sendTelegramMessage} from './telegram';
|
||||
import {sendTweet} from './twitter';
|
||||
import {sendTwilioMessage} from './twilio';
|
||||
|
||||
export function sendNotification(link: Link, store: Store) {
|
||||
sendEmail(link, store);
|
||||
sendSMS(link, store);
|
||||
// Priority
|
||||
playSound();
|
||||
sendEmail(link, store);
|
||||
sendSms(link, store);
|
||||
sendDesktopNotification(link, store);
|
||||
// Non-priority
|
||||
sendDiscordMessage(link, store);
|
||||
sendSlackMessage(link, store);
|
||||
sendTelegramMessage(link, store);
|
||||
sendTwilioMessage(link, store);
|
||||
sendPushbulletNotification(link, store);
|
||||
sendPushoverNotification(link, store);
|
||||
sendSlackMessage(link, store);
|
||||
sendTelegramMessage(link, store);
|
||||
sendTweet(link, store);
|
||||
sendTwilioMessage(link, store);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ if (config.notifications.phone.number && !config.notifications.email.username) {
|
||||
|
||||
const [email, phone] = [config.notifications.email, config.notifications.phone];
|
||||
|
||||
export function sendSMS(link: Link, store: Store) {
|
||||
export function sendSms(link: Link, store: Store) {
|
||||
if (phone.number) {
|
||||
logger.debug('↗ sending sms');
|
||||
const carrier = phone.carrier;
|
||||
|
||||
Reference in New Issue
Block a user