@anjianshi/utils 3.6.0 → 3.6.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/env-node/logging/handlers.js +2 -2
- package/env-service/prisma/extensions/exist.d.ts +1 -1
- package/env-service/prisma/extensions/exist.js +1 -1
- package/env-service/prisma/extensions/find-and-count.d.ts +1 -1
- package/env-service/prisma/extensions/find-and-count.js +1 -1
- package/env-service/prisma/extensions/soft-delete.d.ts +1 -1
- package/env-service/prisma/extensions/soft-delete.js +1 -1
- package/logging/adapt.js +1 -2
- package/package.json +14 -43
|
@@ -115,8 +115,8 @@ export class FileHandler extends LogHandler {
|
|
|
115
115
|
if (this.options.flushInterval === 0 || this.bufferSize >= this.options.flushLength) {
|
|
116
116
|
this.flush();
|
|
117
117
|
}
|
|
118
|
-
else
|
|
119
|
-
this.flushTimeoutId
|
|
118
|
+
else {
|
|
119
|
+
this.flushTimeoutId ??= setTimeout(() => this.flush(), this.options.flushInterval);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
flush(sync) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Prisma } from '@prisma/client/extension';
|
|
1
|
+
import { Prisma } from '@prisma/client/extension.js';
|
|
2
2
|
import { type SoftDeleteQueryArgs } from './soft-delete.js';
|
|
3
3
|
export declare const findAndCount: (client: any) => import("@prisma/client/extension").PrismaClientExtends<import("@prisma/client/runtime/library").InternalArgs<{}, {
|
|
4
4
|
$allModels: {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* 此扩展修改了 Prisma 的原生方法。
|
|
14
14
|
* 为保证其他扩展也应用到修改过的这些方法,此扩展应尽可能放在最前面。
|
|
15
15
|
*/
|
|
16
|
-
import { Prisma } from '@prisma/client/extension';
|
|
16
|
+
import { Prisma } from '@prisma/client/extension.js';
|
|
17
17
|
import type { Operation } from '@prisma/client/runtime/library.js';
|
|
18
18
|
import { type OptionalFields } from '../../../index.js';
|
|
19
19
|
type DeleteArgs<T> = Prisma.Args<T, 'delete'> & {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* 此扩展修改了 Prisma 的原生方法。
|
|
14
14
|
* 为保证其他扩展也应用到修改过的这些方法,此扩展应尽可能放在最前面。
|
|
15
15
|
*/
|
|
16
|
-
import { Prisma } from '@prisma/client/extension';
|
|
16
|
+
import { Prisma } from '@prisma/client/extension.js';
|
|
17
17
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
18
18
|
function getModel(that) {
|
|
19
19
|
const context = Prisma.getExtensionContext(that);
|
package/logging/adapt.js
CHANGED
|
@@ -31,8 +31,7 @@ export function adaptDebugLib(debugLib, enable = '', logger) {
|
|
|
31
31
|
};
|
|
32
32
|
Object.assign(debugLib, emulate);
|
|
33
33
|
// 将 debugLib 日志转发给 logger
|
|
34
|
-
|
|
35
|
-
logger = getLogger('3rd-library');
|
|
34
|
+
logger ??= getLogger('3rd-library');
|
|
36
35
|
debugLib.log = logger.debug.bind(logger);
|
|
37
36
|
if (enable) {
|
|
38
37
|
// 有些库(例如 prisma)重新实现了自己的 debug 库,且模仿 debug 也读取 DEBUG 环境变量。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anjianshi/utils",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"description": "Common JavaScript Utils",
|
|
5
5
|
"homepage": "https://github.com/anjianshi/js-packages/utils",
|
|
6
6
|
"bugs": {
|
|
@@ -23,56 +23,27 @@
|
|
|
23
23
|
"lodash": "^4.17.21"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
+
"@emotion/react": "^11.14.0",
|
|
27
|
+
"@emotion/serialize": "^1.3.3",
|
|
28
|
+
"@emotion/utils": "^1.4.2",
|
|
29
|
+
"@prisma/client": "^6.8.2",
|
|
26
30
|
"@types/lodash": "^4.17.20",
|
|
27
31
|
"@types/node": "^22.16.0",
|
|
28
32
|
"@types/react": "^19.1.8",
|
|
33
|
+
"chalk": "^5.4.1",
|
|
34
|
+
"dayjs": "^1.11.13",
|
|
29
35
|
"dotenv": "^17.0.1",
|
|
30
|
-
"eslint": "^9.
|
|
36
|
+
"eslint": "^9.39.2",
|
|
37
|
+
"react": "^19.1.0",
|
|
31
38
|
"redis": "^5.5.6",
|
|
32
39
|
"typescript": "^5.8.3",
|
|
33
40
|
"vconsole": "^3.15.1",
|
|
34
|
-
"@anjianshi/presets-eslint-
|
|
35
|
-
"@anjianshi/presets-eslint-
|
|
36
|
-
"@anjianshi/presets-eslint-
|
|
37
|
-
"@anjianshi/presets-eslint-
|
|
41
|
+
"@anjianshi/presets-eslint-base": "6.1.0",
|
|
42
|
+
"@anjianshi/presets-eslint-node": "6.1.0",
|
|
43
|
+
"@anjianshi/presets-eslint-react": "6.1.1",
|
|
44
|
+
"@anjianshi/presets-eslint-typescript": "6.1.0",
|
|
38
45
|
"@anjianshi/presets-typescript": "3.2.5",
|
|
39
|
-
"@anjianshi/presets-prettier": "3.0
|
|
40
|
-
},
|
|
41
|
-
"peerDependencies": {
|
|
42
|
-
"@emotion/react": "^11.14.0",
|
|
43
|
-
"@emotion/serialize": "^1.3.3",
|
|
44
|
-
"@emotion/utils": "^1.4.2",
|
|
45
|
-
"@prisma/client": "^6.8.2",
|
|
46
|
-
"chalk": "^5.4.1",
|
|
47
|
-
"dayjs": "^1.11.13",
|
|
48
|
-
"dotenv": "^17.0.1",
|
|
49
|
-
"react": "^19.1.0"
|
|
50
|
-
},
|
|
51
|
-
"peerDependenciesMeta": {
|
|
52
|
-
"@emotion/react": {
|
|
53
|
-
"optional": true
|
|
54
|
-
},
|
|
55
|
-
"@emotion/serialize": {
|
|
56
|
-
"optional": true
|
|
57
|
-
},
|
|
58
|
-
"@emotion/utils": {
|
|
59
|
-
"optional": true
|
|
60
|
-
},
|
|
61
|
-
"@prisma/client": {
|
|
62
|
-
"optional": true
|
|
63
|
-
},
|
|
64
|
-
"chalk": {
|
|
65
|
-
"optional": true
|
|
66
|
-
},
|
|
67
|
-
"dayjs": {
|
|
68
|
-
"optional": true
|
|
69
|
-
},
|
|
70
|
-
"dotenv": {
|
|
71
|
-
"optional": true
|
|
72
|
-
},
|
|
73
|
-
"react": {
|
|
74
|
-
"optional": true
|
|
75
|
-
}
|
|
46
|
+
"@anjianshi/presets-prettier": "3.2.0"
|
|
76
47
|
},
|
|
77
48
|
"prettier": "@anjianshi/presets-prettier/prettierrc"
|
|
78
49
|
}
|