This commit is contained in:
Primakov Alexandr Alexandrovich 2022-04-23 20:24:24 +03:00
parent cf260dbdca
commit 26303f95e8
3 changed files with 20 additions and 1 deletions

View File

@ -27,6 +27,7 @@
"author": "",
"license": "MIT",
"dependencies": {
"@ijl/mailer": "^1.1.0",
"@types/cookie-session": "^2.0.44",
"axios": "^0.26.1",
"cookie-session": "^2.0.0",

18
src/mailer.ts Normal file
View File

@ -0,0 +1,18 @@
import { AdminNotificationRequest, addToQueue, configs, init } from '@ijl/mailer'
import pkg from '../package.json'
init({
userName: process.env.SMTP_MAIL_LOGIN,
password: process.env.SMTP_MAIL_PASSWORD,
adminMails: process.env.MAIL_TO_1,
smtpConfig: configs.yandex,
reserveService: 'gmail',
reserveLogin: process.env.MAIL_SERVICE_LOGIN,
reservePasswd: process.env.MAIL_SERVICE_PASS,
queTimer: process.env.RC_MAIL_STEP_TIMER,
})
if (process.env.MAIL_TO_1 && process.env.MODE !== 'dev') {
addToQueue(new AdminNotificationRequest(`Деплой админки v${pkg.version} прошёл успешно`))
}

View File

@ -25,7 +25,7 @@
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
"rootDir": "./src", /* Specify the root folder within your source files. */
"rootDir": ".", /* Specify the root folder within your source files. */
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */