baja-lite 1.8.5 → 1.8.7

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.
Files changed (3) hide show
  1. package/package.json +2 -2
  2. package/sql.d.ts +3 -1
  3. package/sql.js +7 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baja-lite",
3
- "version": "1.8.5",
3
+ "version": "1.8.7",
4
4
  "description": "some util for self",
5
5
  "homepage": "https://github.com/void-soul/baja-lite",
6
6
  "repository": {
@@ -43,7 +43,7 @@
43
43
  "pino": "10.3.1",
44
44
  "pino-pretty": "13.1.3",
45
45
  "reflect-metadata": "0.2.2",
46
- "sql-formatter": "15.8.0",
46
+ "sql-formatter": "15.8.1",
47
47
  "sqlstring": "2.3.3",
48
48
  "tslib": "2.8.1"
49
49
  },
package/sql.d.ts CHANGED
@@ -2158,13 +2158,14 @@ export declare function MethodCache<T = any>(config: {
2158
2158
  /** 随着当前用户sesion的清空而一起清空 */
2159
2159
  clearWithSession?: boolean;
2160
2160
  }): (target: T, _propertyKey: string, descriptor: PropertyDescriptor) => void;
2161
- export declare const LOG_LEVELS: ["verbose", "debug", "info", "warn", "error", "fatal"];
2161
+ export declare const LOG_LEVELS: ["verbose", "debug", "info", "log", "warn", "error", "fatal"];
2162
2162
  export type LogLevel = (typeof LOG_LEVELS)[number];
2163
2163
  export interface LoggerService {
2164
2164
  /**
2165
2165
  * Write a 'log' level log.
2166
2166
  */
2167
2167
  log(message: any, ...optionalParams: any[]): any;
2168
+ info(message: any, ...optionalParams: any[]): any;
2168
2169
  /**
2169
2170
  * Write an 'error' level log.
2170
2171
  */
@@ -2195,6 +2196,7 @@ export declare class PrinterLogger implements LoggerService {
2195
2196
  private logger;
2196
2197
  constructor();
2197
2198
  log(message: any, ...optionalParams: any[]): void;
2199
+ info(message: any, ...optionalParams: any[]): void;
2198
2200
  fatal(message: any, ...optionalParams: any[]): void;
2199
2201
  error(message: any, ...optionalParams: any[]): void;
2200
2202
  warn(message: any, ...optionalParams: any[]): void;
package/sql.js CHANGED
@@ -413,8 +413,8 @@ export class Mysql {
413
413
  try {
414
414
  connection = await this.createConnection(SyncMode.Async);
415
415
  if (connection) {
416
- const data = await connection.query(SyncMode.Async, 'SELECT 1 FROM DUAL');
417
- globalThis[_LoggerService].debug?.('keepAlive->', data?.[0]?.[1]);
416
+ await connection.query(SyncMode.Async, 'SELECT 1 FROM DUAL');
417
+ // (globalThis[_LoggerService]! as LoggerService).debug?.('keepAlive->', data?.[0]?.[1]);
418
418
  }
419
419
  }
420
420
  catch (error) {
@@ -731,8 +731,8 @@ export class Postgresql {
731
731
  try {
732
732
  connection = await this.createConnection(SyncMode.Async);
733
733
  if (connection) {
734
- const data = await connection.query(SyncMode.Async, 'SELECT 1 FROM DUAL');
735
- globalThis[_LoggerService].debug?.('keepAlive->', data?.[0]?.[1]);
734
+ await connection.query(SyncMode.Async, 'SELECT 1 FROM DUAL');
735
+ // (globalThis[_LoggerService]! as LoggerService).debug?.('keepAlive->', data?.[0]?.[1]);
736
736
  }
737
737
  }
738
738
  catch (error) {
@@ -5447,6 +5447,9 @@ export class PrinterLogger {
5447
5447
  log(message, ...optionalParams) {
5448
5448
  this.logger.info(message, ...optionalParams);
5449
5449
  }
5450
+ info(message, ...optionalParams) {
5451
+ this.logger.info(message, ...optionalParams);
5452
+ }
5450
5453
  fatal(message, ...optionalParams) {
5451
5454
  this.logger.fatal(message, ...optionalParams);
5452
5455
  }