Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@stackone/logger

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stackone/logger - npm Package Compare versions

Comparing version
0.1.7
to
0.1.8
+1
dist/index.cjs
let e=function(e){return e[e.Trace=0]=`Trace`,e[e.Debug=1]=`Debug`,e[e.Info=2]=`Info`,e[e.Warning=3]=`Warning`,e[e.Error=4]=`Error`,e}({});exports.LogLevel=e;
//#region src/types.d.ts
interface ILogger {
debug({
category,
message,
traceId,
context
}: {
category?: string;
message: string;
traceId?: string;
context?: Record<string, unknown>;
}): void;
info({
category,
message,
traceId,
context
}: {
category?: string;
message: string;
traceId?: string;
context?: Record<string, unknown>;
}): void;
warning({
category,
message,
traceId,
error,
code,
context
}: {
category?: string;
message: string;
traceId?: string;
error?: LogError;
code?: string;
context?: Record<string, unknown>;
}): void;
error({
category,
message,
traceId,
error,
code,
context
}: {
category?: string;
message: string;
traceId?: string;
error?: LogError;
code: string;
context?: Record<string, unknown>;
}): void;
}
type LogError = Error & {
response?: {
data?: unknown;
};
context?: Record<string, unknown>;
url?: string;
};
declare enum LogLevel {
Trace = 0,
Debug = 1,
Info = 2,
Warning = 3,
Error = 4,
}
type Log = {
level: LogLevel;
category?: string;
message: string;
traceId?: string;
error?: LogError;
code?: string;
context?: Record<string, unknown>;
};
//#endregion
export { type ILogger, type Log, type LogError, LogLevel };
+1
-1

@@ -80,2 +80,2 @@ //#region src/types.d.ts

//#endregion
export { ILogger, Log, LogError, LogLevel };
export { type ILogger, type Log, type LogError, LogLevel };
{
"name": "@stackone/logger",
"version": "0.1.7",
"version": "0.1.8",
"description": "",
"main": "dist/index.js",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"types": "dist/index.d.cts",
"files": [

@@ -15,5 +15,5 @@ "dist",

".": {
"types": "./dist/index.d.ts",
"types": "./dist/index.d.cts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
"require": "./dist/index.cjs"
},

@@ -38,2 +38,3 @@ "./package.json": "./package.json"

"test:watch": "FORCE_COLOR=1 vitest watch --silent",
"test:typecheck": "tsc --noEmit --project tsconfig.tests.json",
"publish-release": "npm publish --access=public"

@@ -45,5 +46,2 @@ },

"dependencies": {},
"devDependencies": {
"tsdown": "^0.12.9"
},
"tsdown": {

@@ -56,2 +54,2 @@ "dts": true,

}
}
}
//#region src/types.d.ts
interface ILogger {
debug({
category,
message,
traceId,
context
}: {
category?: string;
message: string;
traceId?: string;
context?: Record<string, unknown>;
}): void;
info({
category,
message,
traceId,
context
}: {
category?: string;
message: string;
traceId?: string;
context?: Record<string, unknown>;
}): void;
warning({
category,
message,
traceId,
error,
code,
context
}: {
category?: string;
message: string;
traceId?: string;
error?: LogError;
code?: string;
context?: Record<string, unknown>;
}): void;
error({
category,
message,
traceId,
error,
code,
context
}: {
category?: string;
message: string;
traceId?: string;
error?: LogError;
code: string;
context?: Record<string, unknown>;
}): void;
}
type LogError = Error & {
response?: {
data?: unknown;
};
context?: Record<string, unknown>;
url?: string;
};
declare enum LogLevel {
Trace = 0,
Debug = 1,
Info = 2,
Warning = 3,
Error = 4,
}
type Log = {
level: LogLevel;
category?: string;
message: string;
traceId?: string;
error?: LogError;
code?: string;
context?: Record<string, unknown>;
};
//#endregion
export { ILogger, Log, LogError, LogLevel };
let e=function(e){return e[e.Trace=0]=`Trace`,e[e.Debug=1]=`Debug`,e[e.Info=2]=`Info`,e[e.Warning=3]=`Warning`,e[e.Error=4]=`Error`,e}({});exports.LogLevel=e;