@tsed/prisma 8.3.0 → 8.3.2
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/lib/esm/generator/generateCode.js +5 -2
- package/lib/esm/generator/generateCode.js.map +1 -1
- package/lib/esm/generator.js +1 -1
- package/lib/types/generator.d.ts +1 -1
- package/package.json +11 -11
- package/readme.md +0 -2
- package/scripts/backup-index.d.mts +1 -1
- package/src/generator/generateCode.ts +5 -2
- package/src/generator.ts +1 -1
- package/vitest.config.mts +2 -2
|
@@ -12,7 +12,8 @@ const baseCompilerOptions = {
|
|
|
12
12
|
module: ModuleKind.ESNext,
|
|
13
13
|
emitDecoratorMetadata: true,
|
|
14
14
|
experimentalDecorators: true,
|
|
15
|
-
esModuleInterop: true
|
|
15
|
+
esModuleInterop: true,
|
|
16
|
+
useDefineForClassFields: false
|
|
16
17
|
};
|
|
17
18
|
export async function generateCode(dmmf, options) {
|
|
18
19
|
const baseDirPath = options.outputDirPath;
|
|
@@ -20,7 +21,9 @@ export async function generateCode(dmmf, options) {
|
|
|
20
21
|
const project = new Project({
|
|
21
22
|
compilerOptions: {
|
|
22
23
|
...baseCompilerOptions,
|
|
23
|
-
...(emitTranspiledCode && {
|
|
24
|
+
...(emitTranspiledCode && {
|
|
25
|
+
declaration: true
|
|
26
|
+
})
|
|
24
27
|
}
|
|
25
28
|
});
|
|
26
29
|
const hasEnum = generateEnums(dmmf, project, baseDirPath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateCode.js","sourceRoot":"","sources":["../../../src/generator/generateCode.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,UAAU,EAAE,OAAO,EAAE,YAAY,EAAC,MAAM,UAAU,CAAC;AAE5E,OAAO,EAAC,mBAAmB,EAAC,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,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/B,CAAC;AAQF,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAmB,EAAE,OAA4B;IAClF,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAC1C,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAE9G,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC;QAC1B,eAAe,EAAE;YACf,GAAG,mBAAmB;YACtB,GAAG,CAAC,kBAAkB,IAAI;gBACxB,WAAW,EAAE,IAAI;aAClB,CAAC;SACH;KACF,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC1D,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACzC,mBAAmB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACnD,qBAAqB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC5C,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IACjD,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAE7C,IAAI,kBAAkB,EAAE,CAAC;QACvB,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
package/lib/esm/generator.js
CHANGED
package/lib/types/generator.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/prisma",
|
|
3
3
|
"description": "Generate Ts.ED JsonSchema based on Prisma models",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.3.
|
|
5
|
+
"version": "8.3.2",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@prisma/client": "^6.0.1",
|
|
43
|
-
"@tsed/barrels": "8.3.
|
|
44
|
-
"@tsed/core": "8.3.
|
|
45
|
-
"@tsed/di": "8.3.
|
|
46
|
-
"@tsed/json-mapper": "8.3.
|
|
43
|
+
"@tsed/barrels": "8.3.2",
|
|
44
|
+
"@tsed/core": "8.3.2",
|
|
45
|
+
"@tsed/di": "8.3.2",
|
|
46
|
+
"@tsed/json-mapper": "8.3.2",
|
|
47
47
|
"@tsed/monorepo-utils": "2.3.9",
|
|
48
|
-
"@tsed/schema": "8.3.
|
|
49
|
-
"@tsed/typescript": "8.3.
|
|
48
|
+
"@tsed/schema": "8.3.2",
|
|
49
|
+
"@tsed/typescript": "8.3.2",
|
|
50
50
|
"@types/change-case": "^2.3.1",
|
|
51
51
|
"@types/pluralize": "0.0.33",
|
|
52
52
|
"eslint": "9.12.0",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@prisma/client": ">=6.0.0",
|
|
59
|
-
"@tsed/core": "8.3.
|
|
60
|
-
"@tsed/di": "8.3.
|
|
61
|
-
"@tsed/json-mapper": "8.3.
|
|
62
|
-
"@tsed/schema": "8.3.
|
|
59
|
+
"@tsed/core": "8.3.2",
|
|
60
|
+
"@tsed/di": "8.3.2",
|
|
61
|
+
"@tsed/json-mapper": "8.3.2",
|
|
62
|
+
"@tsed/schema": "8.3.2"
|
|
63
63
|
},
|
|
64
64
|
"keywords": [
|
|
65
65
|
"TypeScript",
|
package/readme.md
CHANGED
|
@@ -32,8 +32,6 @@ See our [documentation](https://tsed.dev/tutorials/prisma.html) for more informa
|
|
|
32
32
|
|
|
33
33
|
## Contributors
|
|
34
34
|
|
|
35
|
-
Please read [contributing guidelines here](https://tsed.dev/contributing.html)
|
|
36
|
-
|
|
37
35
|
<a href="https://github.com/tsedio/tsed/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
|
|
38
36
|
|
|
39
37
|
## Backers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../.schema";
|
|
1
|
+
export * from "../.schema/index.js";
|
|
@@ -15,7 +15,8 @@ const baseCompilerOptions: CompilerOptions = {
|
|
|
15
15
|
module: ModuleKind.ESNext,
|
|
16
16
|
emitDecoratorMetadata: true,
|
|
17
17
|
experimentalDecorators: true,
|
|
18
|
-
esModuleInterop: true
|
|
18
|
+
esModuleInterop: true,
|
|
19
|
+
useDefineForClassFields: false
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
export interface GenerateCodeOptions {
|
|
@@ -31,7 +32,9 @@ export async function generateCode(dmmf: DMMF.Document, options: GenerateCodeOpt
|
|
|
31
32
|
const project = new Project({
|
|
32
33
|
compilerOptions: {
|
|
33
34
|
...baseCompilerOptions,
|
|
34
|
-
...(emitTranspiledCode && {
|
|
35
|
+
...(emitTranspiledCode && {
|
|
36
|
+
declaration: true
|
|
37
|
+
})
|
|
35
38
|
}
|
|
36
39
|
});
|
|
37
40
|
|
package/src/generator.ts
CHANGED
package/vitest.config.mts
CHANGED