@tsed/prisma 8.41.0 → 8.41.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.
@@ -19,7 +19,7 @@ export const ScalarTsTypes = {
19
19
  [PrismaScalars.BigInt]: "bigint",
20
20
  [PrismaScalars.DateTime]: "Date",
21
21
  [PrismaScalars.Json]: "any",
22
- [PrismaScalars.Bytes]: "Buffer"
22
+ [PrismaScalars.Bytes]: "Uint8Array<ArrayBuffer>"
23
23
  };
24
24
  export const ScalarJsClasses = {
25
25
  [PrismaScalars.String]: "String",
@@ -35,8 +35,8 @@ export function transformFieldToDecorators(field, ctx) {
35
35
  if (hasCircularRef) {
36
36
  classType = `() => ${classType}`;
37
37
  }
38
- field.model.addImportDeclaration("@tsed/schema", "CollectionOf");
39
- decorators.unshift(createDecorator("CollectionOf", [classType]));
38
+ field.model.addImportDeclaration("@tsed/schema", "ArrayOf");
39
+ decorators.unshift(createDecorator("ArrayOf", [classType]));
40
40
  }
41
41
  if (field.location !== "enumTypes" && !field.isList) {
42
42
  let classType = ScalarJsClasses[field.type] || DmmfModel.symbolName(field.type);
@@ -7,11 +7,7 @@ export function generatePrismaService(project, baseDirPath) {
7
7
  prismaServiceFile.addImportDeclarations([
8
8
  {
9
9
  moduleSpecifier: "@tsed/di",
10
- namedImports: ["Inject", "Injectable", "Configuration", "OnInit", "OnDestroy"]
11
- },
12
- {
13
- moduleSpecifier: "@tsed/logger",
14
- namedImports: ["Logger"]
10
+ namedImports: ["Injectable", "Configuration", "OnInit", "OnDestroy", "logger"]
15
11
  },
16
12
  {
17
13
  moduleSpecifier: resolveExtension("../client/index"),
@@ -33,13 +29,7 @@ export function generatePrismaService(project, baseDirPath) {
33
29
  prismaService.addProperty({
34
30
  name: "logger",
35
31
  scope: Scope.Protected,
36
- type: "Logger",
37
- decorators: [
38
- {
39
- name: "Inject",
40
- arguments: []
41
- }
42
- ]
32
+ initializer: "logger()"
43
33
  });
44
34
  prismaService
45
35
  .addConstructor({
@@ -48,7 +48,7 @@ export function generateRepositories(dmmf, project, baseDirPath) {
48
48
  },
49
49
  {
50
50
  moduleSpecifier: "@tsed/di",
51
- namedImports: ["Injectable", "Inject"]
51
+ namedImports: ["Injectable", "inject"]
52
52
  },
53
53
  {
54
54
  moduleSpecifier: resolveExtension("../services/PrismaService"),
@@ -75,14 +75,8 @@ export function generateRepositories(dmmf, project, baseDirPath) {
75
75
  });
76
76
  repository.addProperty({
77
77
  name: "prisma",
78
- type: "PrismaService",
79
78
  scope: Scope.Protected,
80
- decorators: [
81
- {
82
- name: "Inject",
83
- arguments: []
84
- }
85
- ]
79
+ initializer: "inject(PrismaService)"
86
80
  });
87
81
  repository
88
82
  .addGetAccessor({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/prisma",
3
- "version": "8.41.0",
3
+ "version": "8.41.2",
4
4
  "description": "Generate Ts.ED JsonSchema based on Prisma models",
5
5
  "keywords": [
6
6
  "JsonSchema",
@@ -53,13 +53,13 @@
53
53
  },
54
54
  "devDependencies": {
55
55
  "@prisma/client": "^7.3.0",
56
- "@tsed/barrels": "8.41.0",
57
- "@tsed/core": "8.41.0",
58
- "@tsed/di": "8.41.0",
59
- "@tsed/json-mapper": "8.41.0",
56
+ "@tsed/barrels": "8.41.2",
57
+ "@tsed/core": "8.41.2",
58
+ "@tsed/di": "8.41.2",
59
+ "@tsed/json-mapper": "8.41.2",
60
60
  "@tsed/monorepo-utils": "3.3.3",
61
- "@tsed/schema": "8.41.0",
62
- "@tsed/typescript": "8.41.0",
61
+ "@tsed/schema": "8.41.2",
62
+ "@tsed/typescript": "8.41.2",
63
63
  "@types/change-case": "^2.3.1",
64
64
  "@types/pluralize": "0.0.33",
65
65
  "prisma": "^7.3.0",