mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
refactor: update dependencies
This commit is contained in:
committed by
Rainer Killinger
parent
edc6e6fad5
commit
9de064756a
@@ -30,7 +30,7 @@ export type RecursivePartial<T> = {
|
||||
*
|
||||
* @param obj Object to delete undefined properties from
|
||||
*/
|
||||
export function deleteUndefinedProperties(obj: unknown) {
|
||||
export function deleteUndefinedProperties(obj: unknown): unknown {
|
||||
// return atomic data types and arrays (recursion anchor)
|
||||
if (typeof obj !== 'object' || Array.isArray(obj)) {
|
||||
return obj;
|
||||
|
||||
@@ -205,7 +205,7 @@ export class SMTP extends VerifiableTransport {
|
||||
const config = {
|
||||
...smtpConfig,
|
||||
// deleting undefined properties so the actual config doesn't get overwritten by undefined values
|
||||
...deleteUndefinedProperties(envConfig),
|
||||
...(deleteUndefinedProperties(envConfig) as object),
|
||||
} as SMTPConfig;
|
||||
|
||||
if (typeof config.host === 'undefined') {
|
||||
|
||||
@@ -12,10 +12,8 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import * as moment from 'moment';
|
||||
import {LogLevel} from '../logger';
|
||||
import {Transformation} from '../transformation';
|
||||
|
||||
/**
|
||||
* Transformation that adds a timestamp to output
|
||||
*/
|
||||
@@ -38,6 +36,7 @@ export class Timestamp implements Transformation {
|
||||
* @param output Output to add timestamp to
|
||||
*/
|
||||
transform(_logLevel: LogLevel, output: string): string {
|
||||
const moment = require('moment');
|
||||
const now = moment();
|
||||
|
||||
return `[${now.format(this.format)}] ${output}`;
|
||||
|
||||
Reference in New Issue
Block a user