@anjianshi/utils 2.4.6 → 2.4.8

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.
@@ -17,5 +17,5 @@ export declare function getPrismaLoggingOptions(debug: boolean): {
17
17
  level: "error";
18
18
  })[];
19
19
  };
20
- export declare function adaptPrismaLogging<T extends PrismalClient>(prisma: T, baseLogger: Logger): void;
20
+ export declare function adaptPrismaLogging<T extends Pick<PrismalClient, '$on'>>(prisma: T, baseLogger: Logger): void;
21
21
  export {};
@@ -1,5 +1,8 @@
1
1
  /**
2
2
  * 对接 Prisma 的日志记录
3
+ *
4
+ * 注意:Prisma 的 debugging 日志是直接输出到 console 的,没有提供处理渠道,所以无法记录进日志文件。
5
+ * 理论上可以重写 console.log/debug... 等方法来实现捕获,但这牵扯面太广,暂不这样做。
3
6
  */
4
7
  import nodeUtil from 'node:util';
5
8
  import chalk from 'chalk';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anjianshi/utils",
3
- "version": "2.4.6",
3
+ "version": "2.4.8",
4
4
  "description": "Common JavaScript Utils",
5
5
  "homepage": "https://github.com/anjianshi/js-packages/utils",
6
6
  "bugs": {
@@ -27,11 +27,11 @@
27
27
  "redis": "^4.7.0",
28
28
  "typescript": "^5.6.3",
29
29
  "vconsole": "^3.15.1",
30
- "@anjianshi/presets-eslint-node": "4.0.8",
31
- "@anjianshi/presets-eslint-react": "4.0.7",
32
- "@anjianshi/presets-eslint-typescript": "5.0.5",
30
+ "@anjianshi/presets-eslint-node": "4.0.9",
31
+ "@anjianshi/presets-eslint-typescript": "5.0.6",
32
+ "@anjianshi/presets-eslint-react": "4.0.8",
33
33
  "@anjianshi/presets-prettier": "3.0.1",
34
- "@anjianshi/presets-typescript": "3.2.2"
34
+ "@anjianshi/presets-typescript": "3.2.3"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@emotion/react": "^11.13.3",