modality-kit 0.3.1 → 0.4.1

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.js CHANGED
@@ -66,6 +66,8 @@ function formatErrorResponse(errorData, operation, meta) {
66
66
  return JSON.stringify(errorResponse);
67
67
  }
68
68
  // src/util_logger.ts
69
+ var levels = ["debug", "info", "warn", "error", "success"];
70
+
69
71
  class ModalityLogger {
70
72
  options = {};
71
73
  logLevel = "info";
@@ -89,7 +91,6 @@ class ModalityLogger {
89
91
  return now.toISOString();
90
92
  }
91
93
  shouldLog(level) {
92
- const levels = ["debug", "info", "warn", "error", "success"];
93
94
  return levels.indexOf(level) >= levels.indexOf(this.logLevel);
94
95
  }
95
96
  setLogLevel(level) {
@@ -114,6 +115,9 @@ class ModalityLogger {
114
115
  case "success":
115
116
  prefix = "✅";
116
117
  break;
118
+ default:
119
+ prefix = level;
120
+ break;
117
121
  }
118
122
  if (timestamp) {
119
123
  prefix += ` [${timestamp}]`;
@@ -99,4 +99,7 @@ declare const fileEntrySchema: z.ZodObject<{
99
99
  lastModified?: number | null | undefined;
100
100
  }>;
101
101
  export type FileEntryType = z.infer<typeof fileEntrySchema>;
102
+ export interface VSCodeFileEntryType extends FileEntryType {
103
+ position: VSCodePosition;
104
+ }
102
105
  export {};
@@ -2,7 +2,8 @@
2
2
  * Storage Logger for structured logging
3
3
  * Provides consistent logging across storage operations with configurable levels
4
4
  */
5
- export type LogLevel = "debug" | "info" | "warn" | "error" | "success";
5
+ declare const levels: readonly ["debug", "info", "warn", "error", "success"];
6
+ export type LogLevel = (typeof levels)[number];
6
7
  export interface LoggerOptions {
7
8
  timestampFormat?: "iso" | "locale" | false;
8
9
  name?: string;
@@ -16,7 +17,7 @@ export declare class ModalityLogger {
16
17
  private shouldLog;
17
18
  setLogLevel(level: LogLevel): void;
18
19
  private format;
19
- log(level: LogLevel, payload: any, categroy?: string): void;
20
+ log(level: any, payload: any, categroy?: string): void;
20
21
  cook(message: any, data?: any): any;
21
22
  debug(message: string, data?: any): void;
22
23
  info(message: string, data?: any): void;
@@ -25,3 +26,4 @@ export declare class ModalityLogger {
25
26
  success(message: string, data?: any): void;
26
27
  }
27
28
  export declare const getLoggerInstance: typeof ModalityLogger.getInstance;
29
+ export {};
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.1",
2
+ "version": "0.4.1",
3
3
  "name": "modality-kit",
4
4
  "repository": {
5
5
  "type": "git",