Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@simplism/core

Package Overview
Dependencies
Maintainers
1
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@simplism/core - npm Package Compare versions

Comparing version 10.3.22 to 10.3.48

tsconfig.build.json

2

dist/util/Logger.d.ts

@@ -6,3 +6,3 @@ import { DateTime } from "../type/DateTime";

private static readonly _palletColors;
private static readonly _groupColorMap;
private static readonly _prefixColorMap;
static history: ILoggerHistory[];

@@ -9,0 +9,0 @@ private static readonly _groupMap;

{
"name": "@simplism/core",
"version": "10.3.22",
"version": "10.3.48",
"description": "Simplism Core Package",

@@ -5,0 +5,0 @@ "repository": "github:kslhunter/simplism",

@@ -19,3 +19,3 @@ import {DateTime} from "../type/DateTime";

];
private static readonly _groupColorMap = new Map<string, string>();
private static readonly _prefixColorMap = new Map<string, string>();

@@ -94,3 +94,4 @@ public static history: ILoggerHistory[] = [];

});
} else {
}
else {
this._groupMap.set(groupName, {

@@ -106,3 +107,4 @@ ...Logger._defaultConfig,

this._groupMap.delete(groupName);
} else {
}
else {
this._groupMap.clear();

@@ -133,4 +135,6 @@ }

private _write(severity: LoggerSeverityString, logs: any[]): void {
if (!Logger._groupColorMap.has(this._groupName)) {
Logger._groupColorMap.set(this._groupName, Logger._palletColors[Logger._groupColorMap.size % Logger._palletColors.length]);
if (this._prefix && !Logger._prefixColorMap.has(this._prefix)) {
Logger._prefixColorMap.set(
this._prefix,
Logger._palletColors[Array.from(Logger._prefixColorMap.keys()).length % Logger._palletColors.length]);
}

@@ -154,7 +158,4 @@

// 로그 변환
const convertedLogs = logs.map(item => {
// 색상있으면 색상 빼기
if (typeof item === "string") {
return item.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "");
} else if (item instanceof Error) {
let convertedLogs = logs.map(item => {
if (item instanceof Error) {
return item.stack;

@@ -177,12 +178,4 @@ }

if (this.config.consoleLogSeverities.includes(severity)) {
/*let text = `${log.now} - [${log.severity}] - from ${log.group}`;
if (process.env.NODE_ENV !== "production") {
text += log.at ? " - " + log.at : "";
}
text += `\r\n${log.prefix ? log.prefix + " " : ""}${convertedLogs.join("\r\n")}\r\n`;
const text = `${this.config.color.grey}[${log.now}] ${log.group}\t${this.config.color[severity]}${log.severity.padEnd(5, " ")}\t${log.prefix ? Logger._prefixColorMap.get(log.prefix) + log.prefix + " " : ""}${this.config.color.log}${convertedLogs.join("\r\n")}${this.config.color.log}`;
console.log(text);*/
const text = `${Logger._groupColorMap.get(this._groupName)}${log.group}:\t${this.config.color[severity]}${log.severity.padEnd(5, " ")}\t${this.config.color.log} ${log.prefix ? log.prefix + " " : ""}${convertedLogs.join("\r\n")}`;
// 콘솔 출력

@@ -196,2 +189,11 @@ if (this.config.consoleLogSeverities.includes(severity)) {

if (this.config.fileLogSeverities.includes(severity)) {
convertedLogs = logs.map(item => {
// 색상있으면 색상 빼기
if (typeof item === "string") {
return item.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "");
}
return item;
});
let text = `${log.now} - [${log.severity}] - from ${log.group}`;

@@ -212,3 +214,4 @@ text += log.at ? " - " + log.at : "";

fs.appendFileSync(filePath, `${text}\r\n`, "utf8");
} else {
}
else {
fs.writeFileSync(filePath, `${text}\r\n`, "utf8");

@@ -215,0 +218,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc