@comet/api-generator 8.0.0-beta.5 → 8.0.0-beta.6
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.
|
@@ -451,7 +451,7 @@ function generateService({ generatorOptions, metadata }) {
|
|
|
451
451
|
export class ${classNamePlural}Service {
|
|
452
452
|
${hasPositionProp
|
|
453
453
|
? `constructor(
|
|
454
|
-
|
|
454
|
+
protected readonly entityManager: EntityManager,
|
|
455
455
|
) {}`
|
|
456
456
|
: ""}
|
|
457
457
|
|
|
@@ -682,7 +682,7 @@ function generateNestedEntityResolver({ generatorOptions, metadata }) {
|
|
|
682
682
|
@Resolver(() => ${metadata.className})
|
|
683
683
|
@RequiredPermission(${JSON.stringify(generatorOptions.requiredPermission)}${skipScopeCheck ? `, { skipScopeCheck: true }` : ""})
|
|
684
684
|
export class ${classNameSingular}Resolver {
|
|
685
|
-
${needsBlocksTransformer ? `constructor(
|
|
685
|
+
${needsBlocksTransformer ? `constructor(protected readonly blocksTransformer: BlocksTransformerService) {}` : ""}
|
|
686
686
|
${code}
|
|
687
687
|
}
|
|
688
688
|
`;
|
|
@@ -835,7 +835,7 @@ function generateResolver({ generatorOptions, metadata }) {
|
|
|
835
835
|
@RequiredPermission(${JSON.stringify(generatorOptions.requiredPermission)}${skipScopeCheck ? `, { skipScopeCheck: true }` : ""})
|
|
836
836
|
export class ${classNameSingular}Resolver {
|
|
837
837
|
constructor(
|
|
838
|
-
|
|
838
|
+
protected readonly entityManager: EntityManager,${hasPositionProp ? `protected readonly ${instanceNamePlural}Service: ${classNamePlural}Service,` : ``}
|
|
839
839
|
${needsBlocksTransformer ? `private readonly blocksTransformer: BlocksTransformerService,` : ""}
|
|
840
840
|
) {}
|
|
841
841
|
|
|
@@ -93,8 +93,8 @@ function generateCrudSingle(generatorOptions, metadata) {
|
|
|
93
93
|
@RequiredPermission(${JSON.stringify(generatorOptions.requiredPermission)}${!scopeProp ? `, { skipScopeCheck: true }` : ""})
|
|
94
94
|
export class ${classNameSingular}Resolver {
|
|
95
95
|
constructor(
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
protected readonly entityManager: EntityManager,
|
|
97
|
+
protected readonly ${instanceNamePlural}Service: ${classNamePlural}Service,
|
|
98
98
|
) {}
|
|
99
99
|
|
|
100
100
|
@Query(() => ${metadata.className}, { nullable: true })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comet/api-generator",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"directory": "packages/api/api-generator",
|
|
6
6
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"pluralize": "^8.0.0",
|
|
23
23
|
"ts-morph": "^25.0.1",
|
|
24
24
|
"ts-node": "^10.9.2",
|
|
25
|
-
"@comet/cms-api": "8.0.0-beta.
|
|
25
|
+
"@comet/cms-api": "8.0.0-beta.6"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@mikro-orm/cli": "^6.4.10",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"@mikro-orm/postgresql": "^6.4.10",
|
|
31
31
|
"@nestjs/graphql": "^13.1.0",
|
|
32
32
|
"@types/jest": "^29.5.14",
|
|
33
|
-
"@types/node": "^22.15.
|
|
33
|
+
"@types/node": "^22.15.34",
|
|
34
34
|
"@types/pluralize": "^0.0.33",
|
|
35
|
-
"class-validator": "^0.14.
|
|
35
|
+
"class-validator": "^0.14.2",
|
|
36
36
|
"eslint": "^9.22.0",
|
|
37
37
|
"jest": "^29.7.0",
|
|
38
38
|
"npm-run-all2": "^5.0.2",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"ts-jest": "^29.2.6",
|
|
43
43
|
"typescript": "^5.7.3",
|
|
44
44
|
"uuid": "^11.1.0",
|
|
45
|
-
"@comet/eslint-config": "8.0.0-beta.
|
|
45
|
+
"@comet/eslint-config": "8.0.0-beta.6"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@mikro-orm/cli": "^6.0.0",
|