@punks/backend-core 0.0.84 → 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.
@@ -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 | undefined, prev?: T | undefined) => void) => void;
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 {};
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export declare const csvParse: (data: string | string[] | Buffer, separator?: string) => Record<string, any>[];
3
2
  export interface CsvColumnDefinition<T> {
4
3
  name: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export declare const encodeUtf8: (value: Uint8Array) => string;
3
2
  export declare const decodeUtf8: (value: string) => Buffer;
4
3
  export declare const encodeBase64: (value: Uint8Array) => string;
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 | undefined, prev?: T | undefined) => void) => void;
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,7 +1,7 @@
1
1
  {
2
2
  "name": "@punks/backend-core",
3
- "version": "0.0.84",
4
- "description": "WebPunks Backend Core",
3
+ "version": "0.0.86",
4
+ "description": "Devpunks Backend Core",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "files": [
@@ -19,10 +19,11 @@
19
19
  "type-check": "tsc --noEmit --skipLibCheck"
20
20
  },
21
21
  "keywords": [],
22
- "author": "WebPunks",
22
+ "author": "Devpunks",
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.11.0"
42
+ "winston": "^3.19.0"
42
43
  },
43
44
  "peerDependencies": {
44
- "winston": "^3.11.0"
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"