@soulcraft/brainy 0.40.0 → 0.41.0
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/index.d.ts +2 -1
- package/dist/storage/adapters/optimizedS3Search.d.ts +79 -0
- package/dist/storage/adapters/optimizedS3Search.d.ts.map +1 -0
- package/dist/storage/adapters/s3CompatibleStorage.d.ts +21 -0
- package/dist/storage/adapters/s3CompatibleStorage.d.ts.map +1 -1
- package/dist/storage/baseStorage.d.ts +1 -0
- package/dist/storage/baseStorage.d.ts.map +1 -1
- package/dist/unified.js +304 -101
- package/dist/unified.min.js +991 -991
- package/dist/utils/logger.d.ts +45 -92
- package/dist/utils/logger.d.ts.map +1 -1
- package/package.json +4 -1
package/dist/utils/logger.d.ts
CHANGED
|
@@ -1,99 +1,52 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Centralized logging utility for Brainy
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
* Provides configurable log levels and consistent logging across the codebase
|
|
4
|
+
*/
|
|
5
|
+
export declare enum LogLevel {
|
|
6
|
+
ERROR = 0,
|
|
7
|
+
WARN = 1,
|
|
8
|
+
INFO = 2,
|
|
9
|
+
DEBUG = 3,
|
|
10
|
+
TRACE = 4
|
|
11
|
+
}
|
|
11
12
|
export interface LoggerConfig {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* @default true
|
|
20
|
-
*/
|
|
21
|
-
showPrefix?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Custom prefix for log messages
|
|
24
|
-
* @default 'Brainy'
|
|
25
|
-
*/
|
|
26
|
-
prefix?: string;
|
|
13
|
+
level: LogLevel;
|
|
14
|
+
modules?: {
|
|
15
|
+
[moduleName: string]: LogLevel;
|
|
16
|
+
};
|
|
17
|
+
timestamps?: boolean;
|
|
18
|
+
includeModule?: boolean;
|
|
19
|
+
handler?: (level: LogLevel, module: string, message: string, ...args: any[]) => void;
|
|
27
20
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Log warning messages (always shown, but can be controlled)
|
|
54
|
-
*/
|
|
55
|
-
warn: (message: string, ...args: any[]) => void;
|
|
56
|
-
/**
|
|
57
|
-
* Log error messages (always shown)
|
|
58
|
-
*/
|
|
21
|
+
declare class Logger {
|
|
22
|
+
private static instance;
|
|
23
|
+
private config;
|
|
24
|
+
private constructor();
|
|
25
|
+
static getInstance(): Logger;
|
|
26
|
+
configure(config: Partial<LoggerConfig>): void;
|
|
27
|
+
private shouldLog;
|
|
28
|
+
private formatMessage;
|
|
29
|
+
private log;
|
|
30
|
+
error(module: string, message: string, ...args: any[]): void;
|
|
31
|
+
warn(module: string, message: string, ...args: any[]): void;
|
|
32
|
+
info(module: string, message: string, ...args: any[]): void;
|
|
33
|
+
debug(module: string, message: string, ...args: any[]): void;
|
|
34
|
+
trace(module: string, message: string, ...args: any[]): void;
|
|
35
|
+
createModuleLogger(module: string): {
|
|
36
|
+
error: (message: string, ...args: any[]) => void;
|
|
37
|
+
warn: (message: string, ...args: any[]) => void;
|
|
38
|
+
info: (message: string, ...args: any[]) => void;
|
|
39
|
+
debug: (message: string, ...args: any[]) => void;
|
|
40
|
+
trace: (message: string, ...args: any[]) => void;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export declare const logger: Logger;
|
|
44
|
+
export declare function createModuleLogger(module: string): {
|
|
59
45
|
error: (message: string, ...args: any[]) => void;
|
|
60
|
-
/**
|
|
61
|
-
* Log with custom prefix (only shown when debug mode is enabled)
|
|
62
|
-
*/
|
|
63
|
-
debugWithPrefix: (prefix: string, message: string, ...args: any[]) => void;
|
|
64
|
-
/**
|
|
65
|
-
* Log info with custom prefix (only shown when debug mode is enabled)
|
|
66
|
-
*/
|
|
67
|
-
infoWithPrefix: (prefix: string, message: string, ...args: any[]) => void;
|
|
68
|
-
/**
|
|
69
|
-
* Log warning with custom prefix (controlled by debug mode)
|
|
70
|
-
*/
|
|
71
|
-
warnWithPrefix: (prefix: string, message: string, ...args: any[]) => void;
|
|
72
|
-
/**
|
|
73
|
-
* Log error with custom prefix (always shown)
|
|
74
|
-
*/
|
|
75
|
-
errorWithPrefix: (prefix: string, message: string, ...args: any[]) => void;
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* Legacy console methods for backward compatibility
|
|
79
|
-
* These will respect the debug mode setting
|
|
80
|
-
*/
|
|
81
|
-
export declare const debugConsole: {
|
|
82
|
-
log: (message: string, ...args: any[]) => void;
|
|
83
|
-
debug: (message: string, ...args: any[]) => void;
|
|
84
|
-
info: (message: string, ...args: any[]) => void;
|
|
85
46
|
warn: (message: string, ...args: any[]) => void;
|
|
86
|
-
|
|
47
|
+
info: (message: string, ...args: any[]) => void;
|
|
48
|
+
debug: (message: string, ...args: any[]) => void;
|
|
49
|
+
trace: (message: string, ...args: any[]) => void;
|
|
87
50
|
};
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*/
|
|
91
|
-
export declare function enableDebugMode(): void;
|
|
92
|
-
/**
|
|
93
|
-
* Disable debug mode programmatically
|
|
94
|
-
*/
|
|
95
|
-
export declare function disableDebugMode(): void;
|
|
96
|
-
/**
|
|
97
|
-
* Create a scoped logger with a specific prefix
|
|
98
|
-
*/
|
|
99
|
-
export declare function createScopedLogger(prefix: string): typeof logger;
|
|
51
|
+
export declare function configureLogger(config: Partial<LoggerConfig>): void;
|
|
52
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,KAAK,IAAI;CACV;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,QAAQ,CAAA;IAEf,OAAO,CAAC,EAAE;QACR,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAA;KAC/B,CAAA;IAED,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;CACrF;AAED,cAAM,MAAM;IACV,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAQ;IAC/B,OAAO,CAAC,MAAM,CAIb;IAED,OAAO;IAqBP,MAAM,CAAC,WAAW,IAAI,MAAM;IAO5B,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI;IAI9C,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,aAAa;IAkBrB,OAAO,CAAC,GAAG;IA6BX,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI5D,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI3D,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI3D,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI5D,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAK5D,kBAAkB,CAAC,MAAM,EAAE,MAAM;yBAEZ,MAAM,WAAW,GAAG,EAAE;wBACvB,MAAM,WAAW,GAAG,EAAE;wBACtB,MAAM,WAAW,GAAG,EAAE;yBACrB,MAAM,WAAW,GAAG,EAAE;yBACtB,MAAM,WAAW,GAAG,EAAE;;CAG5C;AAGD,eAAO,MAAM,MAAM,QAAuB,CAAA;AAG1C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM;qBAb1B,MAAM,WAAW,GAAG,EAAE;oBACvB,MAAM,WAAW,GAAG,EAAE;oBACtB,MAAM,WAAW,GAAG,EAAE;qBACrB,MAAM,WAAW,GAAG,EAAE;qBACtB,MAAM,WAAW,GAAG,EAAE;EAW5C;AAGD,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,QAE5D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soulcraft/brainy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "A vector graph database using HNSW indexing with Origin Private File System storage",
|
|
5
5
|
"main": "dist/unified.js",
|
|
6
6
|
"module": "dist/unified.js",
|
|
@@ -48,6 +48,9 @@
|
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": ">=24.4.0"
|
|
50
50
|
},
|
|
51
|
+
"overrides": {
|
|
52
|
+
"form-data": "^4.0.4"
|
|
53
|
+
},
|
|
51
54
|
"scripts": {
|
|
52
55
|
"prebuild": "echo 'Prebuild step - no version generation needed'",
|
|
53
56
|
"build": "BUILD_TYPE=unified rollup -c rollup.config.js",
|