@punks/backend-core 0.0.85 → 0.0.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +33 -37
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/logging/concrete/consoleLogger.d.ts +5 -0
- package/dist/cjs/types/utils/array.d.ts +1 -1
- package/dist/cjs/types/utils/csv.d.ts +0 -1
- package/dist/cjs/types/utils/encoding.d.ts +0 -1
- package/dist/esm/index.js +33 -37
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/logging/concrete/consoleLogger.d.ts +5 -0
- package/dist/esm/types/utils/array.d.ts +1 -1
- package/dist/esm/types/utils/csv.d.ts +0 -1
- package/dist/esm/types/utils/encoding.d.ts +0 -1
- package/dist/index.d.ts +6 -2
- package/package.json +5 -4
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ILoggerProvider } from "../../abstractions";
|
|
2
|
+
export type ConsoleLoggerSettings = {
|
|
3
|
+
includeOpenTelemetryContext?: boolean;
|
|
4
|
+
};
|
|
2
5
|
export declare class ConsoleLogger implements ILoggerProvider {
|
|
6
|
+
private readonly logger;
|
|
7
|
+
constructor(settings?: ConsoleLoggerSettings);
|
|
3
8
|
debug(loggerName: string, message: string, meta?: any): void;
|
|
4
9
|
info(loggerName: string, message: string, meta?: any): void;
|
|
5
10
|
warn(loggerName: string, message: string, meta?: any): void;
|
|
@@ -21,7 +21,7 @@ export declare const flatten: <T>(array: T[][]) => T[];
|
|
|
21
21
|
export declare const distinct: <T>(values: T[]) => T[];
|
|
22
22
|
export declare const distinctElements: <T>(values: T[], comparer: (value: T) => any) => T[];
|
|
23
23
|
export declare const jsonDistinct: <T>(values: T[]) => T[];
|
|
24
|
-
export declare const iterate: <T>(values: T[], action: (item: T, next?: T
|
|
24
|
+
export declare const iterate: <T>(values: T[], action: (item: T, next?: T, prev?: T) => void) => void;
|
|
25
25
|
export declare const groupBy: <TKey, TValue>(values: TValue[], keySelector: (value: TValue) => TKey) => Map<TKey, TValue[]>;
|
|
26
26
|
export declare const subArrays: <T>(array1: T[], array2: T[], eqFn: (a: T, b: T) => boolean) => T[];
|
|
27
27
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { PortableTextBlock } from '@portabletext/types';
|
|
3
2
|
|
|
4
3
|
interface IResolveServiceOptions {
|
|
@@ -83,7 +82,12 @@ declare class Log {
|
|
|
83
82
|
static getLogger(loggerName: string): ILogger;
|
|
84
83
|
}
|
|
85
84
|
|
|
85
|
+
type ConsoleLoggerSettings = {
|
|
86
|
+
includeOpenTelemetryContext?: boolean;
|
|
87
|
+
};
|
|
86
88
|
declare class ConsoleLogger implements ILoggerProvider {
|
|
89
|
+
private readonly logger;
|
|
90
|
+
constructor(settings?: ConsoleLoggerSettings);
|
|
87
91
|
debug(loggerName: string, message: string, meta?: any): void;
|
|
88
92
|
info(loggerName: string, message: string, meta?: any): void;
|
|
89
93
|
warn(loggerName: string, message: string, meta?: any): void;
|
|
@@ -173,7 +177,7 @@ declare const flatten: <T>(array: T[][]) => T[];
|
|
|
173
177
|
declare const distinct: <T>(values: T[]) => T[];
|
|
174
178
|
declare const distinctElements: <T>(values: T[], comparer: (value: T) => any) => T[];
|
|
175
179
|
declare const jsonDistinct: <T>(values: T[]) => T[];
|
|
176
|
-
declare const iterate: <T>(values: T[], action: (item: T, next?: T
|
|
180
|
+
declare const iterate: <T>(values: T[], action: (item: T, next?: T, prev?: T) => void) => void;
|
|
177
181
|
declare const groupBy: <TKey, TValue>(values: TValue[], keySelector: (value: TValue) => TKey) => Map<TKey, TValue[]>;
|
|
178
182
|
declare const subArrays: <T>(array1: T[], array2: T[], eqFn: (a: T, b: T) => boolean) => T[];
|
|
179
183
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@punks/backend-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.86",
|
|
4
4
|
"description": "Devpunks Backend Core",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"license": "ISC",
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@babel/core": "^7.21.0",
|
|
26
|
+
"@opentelemetry/api": "^1.9.0",
|
|
26
27
|
"@portabletext/types": "^2.0.8",
|
|
27
28
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
28
29
|
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
@@ -38,12 +39,12 @@
|
|
|
38
39
|
"ts-jest": "^29.1.1",
|
|
39
40
|
"tslib": "^2.5.0",
|
|
40
41
|
"typescript": "^5.1.6",
|
|
41
|
-
"winston": "^3.
|
|
42
|
+
"winston": "^3.19.0"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|
|
44
|
-
"winston": "^3.
|
|
45
|
+
"winston": "^3.19.0",
|
|
46
|
+
"@opentelemetry/api": "^1.9.0"
|
|
45
47
|
},
|
|
46
|
-
"dependencies": {},
|
|
47
48
|
"jest": {
|
|
48
49
|
"transform": {
|
|
49
50
|
".(ts|tsx)": "ts-jest"
|