mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-03-10 08:42:17 +00:00
fix: build
This commit is contained in:
4457
packages/logger/package-lock.json
generated
4457
packages/logger/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,67 +1,61 @@
|
||||
{
|
||||
"name": "@openstapps/logger",
|
||||
"version": "1.1.1",
|
||||
"description": "A cli logger with colors, loglevels and the possibility to use a transport system for errors",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@gitlab.com:openstapps/logger.git"
|
||||
},
|
||||
"version": "2.1.0",
|
||||
"license": "GPL-3.0-only",
|
||||
"scripts": {
|
||||
"build": "npm run lint && npm run compile",
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'",
|
||||
"check-configuration": "openstapps-configuration",
|
||||
"compile": "rimraf lib && tsc && prepend lib/cli.js '#!/usr/bin/env node\n'",
|
||||
"documentation": "typedoc --name \"@openstapps/logger\" --includeVersion --out docs --readme README.md --listInvalidSymbolLinks --entryPointStrategy expand src",
|
||||
"postversion": "npm run changelog",
|
||||
"prepublishOnly": "npm ci && npm run build",
|
||||
"preversion": "npm run prepublishOnly",
|
||||
"push": "git push && git push origin \"v$npm_package_version\"",
|
||||
"test": "nyc mocha 'test/**/*.spec.ts'",
|
||||
"lint": "eslint --ext .ts src/"
|
||||
},
|
||||
"repository": "git@gitlab.com:openstapps/logger.git",
|
||||
"author": "Karl-Philipp Wulfert <krlwlfrt@gmail.com>",
|
||||
"contributors": [
|
||||
"Anselm Stordeur <anselmstordeur@gmail.com>",
|
||||
"Jovan Krunic <jovan.krunic@gmail.com>",
|
||||
"Rainer Killinger <mail-openstapps@killinger.co>"
|
||||
],
|
||||
"typings": "./lib/logger.d.ts",
|
||||
"main": "./lib/logger.js",
|
||||
"scripts": {
|
||||
"build": "npm run lint && npm run compile",
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'",
|
||||
"check-configuration": "openstapps-configuration",
|
||||
"compile": "rimraf lib && tsc",
|
||||
"documentation": "typedoc --name \"@openstapps/logger\" --includeVersion --out docs --readme README.md --listInvalidSymbolLinks --entryPointStrategy expand src",
|
||||
"lint": "eslint --ext .ts src/",
|
||||
"postversion": "npm run changelog",
|
||||
"prepublishOnly": "npm ci && npm run build",
|
||||
"preversion": "npm run prepublishOnly",
|
||||
"push": "git push && git push origin \"v$npm_package_version\"",
|
||||
"test": "nyc mocha 'test/**/*.spec.ts'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": "14.18.34",
|
||||
"@types/nodemailer": "6.4.6",
|
||||
"@types/node": "18.15.3",
|
||||
"@types/nodemailer": "6.4.7",
|
||||
"chalk": "4.1.2",
|
||||
"flatted": "3.2.7",
|
||||
"moment": "2.29.4",
|
||||
"nodemailer": "6.8.0"
|
||||
"nodemailer": "6.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/configuration": "0.33.0",
|
||||
"@openstapps/eslint-config": "1.1.0",
|
||||
"@openstapps/configuration": "workspace:*",
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
"@testdeck/mocha": "0.3.3",
|
||||
"@types/chai": "4.3.4",
|
||||
"@types/chai-as-promised": "7.1.5",
|
||||
"@types/chai-spies": "1.0.3",
|
||||
"@types/mocha": "10.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "5.42.0",
|
||||
"@typescript-eslint/parser": "5.42.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.49.0",
|
||||
"@typescript-eslint/parser": "5.49.0",
|
||||
"chai": "4.3.7",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"chai-spies": "1.0.0",
|
||||
"conventional-changelog-cli": "2.2.2",
|
||||
"eslint": "8.29.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-jsdoc": "39.6.4",
|
||||
"eslint": "8.33.0",
|
||||
"eslint-config-prettier": "8.6.0",
|
||||
"eslint-plugin-jsdoc": "39.7.4",
|
||||
"eslint-plugin-prettier": "4.2.1",
|
||||
"eslint-plugin-unicorn": "43.0.2",
|
||||
"mocha": "10.1.0",
|
||||
"eslint-plugin-unicorn": "45.0.2",
|
||||
"mocha": "10.2.0",
|
||||
"nyc": "15.1.0",
|
||||
"prepend-file-cli": "1.0.6",
|
||||
"prettier": "2.8.0",
|
||||
"rimraf": "3.0.2",
|
||||
"prettier": "2.8.3",
|
||||
"rimraf": "4.4.0",
|
||||
"ts-node": "10.9.1",
|
||||
"tslint": "6.1.3",
|
||||
"typedoc": "0.22.18",
|
||||
"typescript": "4.4.4"
|
||||
},
|
||||
@@ -91,5 +85,6 @@
|
||||
"ts-node/register"
|
||||
],
|
||||
"statements": 95
|
||||
}
|
||||
},
|
||||
"typings": "./lib/logger.d.ts"
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ export function deleteUndefinedProperties(object: unknown): unknown {
|
||||
* Checks if environment is Node.js
|
||||
*/
|
||||
export function isNodeEnvironment(): boolean {
|
||||
return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
|
||||
return Object.prototype.toString.call(typeof process === 'undefined' ? 0 : process) === '[object process]';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -175,10 +175,12 @@ export class Logger {
|
||||
|
||||
// Fallback to log everything, or not exiting
|
||||
switch (level) {
|
||||
case 'LOG':
|
||||
case 'LOG': {
|
||||
return Logger.logLevelSum;
|
||||
case 'EXIT':
|
||||
}
|
||||
case 'EXIT': {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -191,13 +191,13 @@ export class SMTP extends VerifiableTransport {
|
||||
password: process.env.SMTP_AUTH_PASSWORD,
|
||||
user: process.env.SMTP_AUTH_USER,
|
||||
},
|
||||
cc: typeof process.env.SMTP_CC !== 'undefined' ? (process.env.SMTP_CC as string).split(',') : [],
|
||||
cc: typeof process.env.SMTP_CC === 'undefined' ? [] : (process.env.SMTP_CC as string).split(','),
|
||||
host: process.env.SMTP_HOST,
|
||||
port:
|
||||
typeof process.env.SMTP_PORT !== 'undefined' ? Number.parseInt(process.env.SMTP_PORT, 10) : undefined,
|
||||
typeof process.env.SMTP_PORT === 'undefined' ? undefined : Number.parseInt(process.env.SMTP_PORT, 10),
|
||||
recipients:
|
||||
typeof process.env.SMTP_RECIPIENTS !== 'undefined' ? process.env.SMTP_RECIPIENTS.split(',') : [],
|
||||
secure: typeof process.env.SMTP_SECURE !== 'undefined' ? process.env.SMTP_SECURE === 'true' : false,
|
||||
typeof process.env.SMTP_RECIPIENTS === 'undefined' ? [] : process.env.SMTP_RECIPIENTS.split(','),
|
||||
secure: typeof process.env.SMTP_SECURE === 'undefined' ? false : process.env.SMTP_SECURE === 'true',
|
||||
sender: {
|
||||
mail: process.env.SMTP_SENDER_MAIL,
|
||||
name: process.env.SMTP_SENDER_NAME,
|
||||
@@ -262,14 +262,14 @@ export class SMTP extends VerifiableTransport {
|
||||
throw new Error('Invalid recipients found');
|
||||
}
|
||||
|
||||
if (typeof config.cc !== 'undefined') {
|
||||
if (typeof config.cc === 'undefined') {
|
||||
this.cc = [];
|
||||
} else {
|
||||
if (SMTP.isValidRecipientsList(config.cc)) {
|
||||
this.cc = config.cc;
|
||||
} else {
|
||||
throw new Error('Invalid cc recipients found');
|
||||
}
|
||||
} else {
|
||||
this.cc = [];
|
||||
}
|
||||
|
||||
this.from = config.sender;
|
||||
@@ -284,7 +284,7 @@ export class SMTP extends VerifiableTransport {
|
||||
},
|
||||
host: config.host,
|
||||
port: config.port,
|
||||
secure: typeof config.secure !== 'undefined' ? config.secure : false,
|
||||
secure: typeof config.secure === 'undefined' ? false : config.secure,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ export class SMTP extends VerifiableTransport {
|
||||
return this.sendMail({
|
||||
cc: this.cc,
|
||||
// use an address block if name is available, mail otherwise
|
||||
from: typeof this.from.name !== 'string' ? `${this.from.name} <${this.from.mail}>` : this.from.mail,
|
||||
from: typeof this.from.name === 'string' ? this.from.mail : `${this.from.name} <${this.from.mail}>`,
|
||||
subject: subject,
|
||||
text: message,
|
||||
to: this.recipients,
|
||||
|
||||
Reference in New Issue
Block a user