@aomex/prisma 3.30.8-alpha.62.sha-92b25bb → 4.0.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/CHANGELOG.md +19 -0
- package/package.json +17 -22
- package/src/bin.ts +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.0.0](https://github.com/aomex/aomex/compare/v3.30.7...v4.0.0) (2026-11-17)
|
|
7
|
+
|
|
8
|
+
* chore!: 升级依赖至最新 ([9a679fa](https://github.com/aomex/aomex/commit/9a679faf0a4e2b313e8ce9081c1ecc65356b844c))
|
|
9
|
+
* feat(prisma)!: 生成 schema 并通过 definePrismaSchema 作为唯一业务入口 ([7dad8a4](https://github.com/aomex/aomex/commit/7dad8a478eaf3a9b4953aca19c5a2294986a7e36))
|
|
10
|
+
* chore!: 升级至 TypeScript 7 并将构建工具迁移到 tsdown ([a111409](https://github.com/aomex/aomex/commit/a111409021e2ee81ee5fb20ccc75480c9b5fa4c0))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **validator:** 新增 decimal 验证器 ([defac31](https://github.com/aomex/aomex/commit/defac314df697cf5b5cc061ea4ef6ceef1a5186d))
|
|
15
|
+
* **validator:** 验证器规则入口支持传入schema ([7f0be2e](https://github.com/aomex/aomex/commit/7f0be2e027ad8e527989850ca331cde1d31830e0))
|
|
16
|
+
|
|
17
|
+
### BREAKING CHANGES
|
|
18
|
+
|
|
19
|
+
* mongoose 最低版本为v9
|
|
20
|
+
* Node.js 最低版本提升至 `>=24.0.0`。
|
|
21
|
+
* 最低 TypeScript 版本为 7。
|
|
22
|
+
* 请改用 definePrismaSchema(generated) 获取 prismaInput/prismaOutput/prismaEnum
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [3.30.7](https://github.com/aomex/aomex/compare/v3.30.6...v3.30.7) (2026-11-01)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @aomex/prisma
|
package/package.json
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aomex/prisma",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "从prisma表结构生成对应的验证器",
|
|
5
|
-
"repository":
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git@github.com:aomex/aomex.git"
|
|
8
|
+
},
|
|
6
9
|
"homepage": "https://aomex.js.org",
|
|
7
10
|
"license": "MIT",
|
|
8
11
|
"type": "module",
|
|
9
12
|
"sideEffects": false,
|
|
10
|
-
"
|
|
11
|
-
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./package.json": "./package.json"
|
|
12
20
|
},
|
|
13
|
-
"types": "src/index.ts",
|
|
14
|
-
"exports": "./src/index.ts",
|
|
15
21
|
"files": [
|
|
16
22
|
"dist",
|
|
17
23
|
"LICENSE",
|
|
@@ -20,21 +26,10 @@
|
|
|
20
26
|
"CHANGELOG.md"
|
|
21
27
|
],
|
|
22
28
|
"bin": {
|
|
23
|
-
"aomex-prisma": "./
|
|
29
|
+
"aomex-prisma": "./dist/bin.js"
|
|
24
30
|
},
|
|
25
31
|
"publishConfig": {
|
|
26
|
-
"
|
|
27
|
-
"exports": {
|
|
28
|
-
".": {
|
|
29
|
-
"types": "./dist/index.d.ts",
|
|
30
|
-
"import": "./dist/index.js"
|
|
31
|
-
},
|
|
32
|
-
"./package.json": "./package.json"
|
|
33
|
-
},
|
|
34
|
-
"access": "public",
|
|
35
|
-
"bin": {
|
|
36
|
-
"aomex-prisma": "./dist/bin.js"
|
|
37
|
-
}
|
|
32
|
+
"access": "public"
|
|
38
33
|
},
|
|
39
34
|
"peerDependencies": {
|
|
40
35
|
"@aomex/common": "^4.0.0",
|
|
@@ -45,9 +40,9 @@
|
|
|
45
40
|
"prettier": "^3.10.1"
|
|
46
41
|
},
|
|
47
42
|
"devDependencies": {
|
|
48
|
-
"@aomex/common": "
|
|
43
|
+
"@aomex/common": "4.0.0",
|
|
49
44
|
"@prisma/internals": "^7.10.1",
|
|
50
45
|
"prisma": "^7.10.1"
|
|
51
46
|
},
|
|
52
|
-
"
|
|
53
|
-
}
|
|
47
|
+
"scripts": {}
|
|
48
|
+
}
|
package/src/bin.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import cjsPrismaHelper from '@prisma/generator-helper';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { saveTsContent } from './lib/save-ts-content';
|
|
6
|
-
import { transform } from './lib/transform';
|
|
7
|
-
|
|
8
|
-
cjsPrismaHelper.generatorHandler({
|
|
9
|
-
onManifest() {
|
|
10
|
-
return {
|
|
11
|
-
prettyName: 'Prisma aomex rules generator',
|
|
12
|
-
defaultOutput: path.resolve('src', 'generated', 'aomex', 'prisma'),
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
async onGenerate(options) {
|
|
16
|
-
const output = options.generator.output!.value!;
|
|
17
|
-
const tsContent = await transform(options.dmmf);
|
|
18
|
-
await saveTsContent(output, tsContent);
|
|
19
|
-
},
|
|
20
|
-
});
|