@rafikidota/iroh 0.42.0 → 0.43.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/dist/schematics/crud/files/ts/__name__.controller.ts +2 -2
- package/dist/schematics/crud/files/ts/app/dto/__name__.create.dto.ts +1 -1
- package/dist/schematics/crud/files/ts/app/dto/__name__.view.ts +2 -2
- package/dist/schematics/crud/files/ts/domain/__name__.interface.ts +2 -2
- package/dist/schematics/crud/files/ts/infra/__name__.mapper.ts +2 -2
- package/dist/schematics/crud/files/ts/infra/__name__.persistence.ts +1 -1
- package/dist/schematics/crud/files/ts/test/__name__.controller.spec.ts +9 -2
- package/dist/schematics/crud/files/ts/test/__name__.service.spec.ts +9 -2
- package/dist/schematics/crud/files/ts/test/provider/__name__.typeorm.repository.ts +5 -0
- package/package.json +5 -5
- package/dist/schematics/crud/files/ts/app/dto/index.ts +0 -3
- package/dist/schematics/crud/files/ts/app/index.ts +0 -2
- package/dist/schematics/crud/files/ts/domain/index.ts +0 -2
- package/dist/schematics/crud/files/ts/index.ts +0 -7
- package/dist/schematics/crud/files/ts/infra/index.ts +0 -3
|
@@ -16,8 +16,8 @@ import { SearchDto } from '@rafikidota/iroh';
|
|
|
16
16
|
import { QueryOptionDto } from '@rafikidota/iroh';
|
|
17
17
|
|
|
18
18
|
import { <%= classify(name) %>Service } from './<%= lowerCase(name) %>.service';
|
|
19
|
-
import { <%= classify(name) %>Mapper } from './infra';
|
|
20
|
-
import { Create<%= classify(name) %>Dto } from './app/dto';
|
|
19
|
+
import { <%= classify(name) %>Mapper } from './infra/<%= lowerCase(name) %>.mapper';
|
|
20
|
+
import { Create<%= classify(name) %>Dto } from './app/dto/<%= lowerCase(name) %>.create.dto';
|
|
21
21
|
import { Update<%= classify(name) %>Dto } from './app/dto/<%= lowerCase(name) %>.update.dto';
|
|
22
22
|
import { <%= classify(name) %>View } from './app/dto/<%= lowerCase(name) %>.view';
|
|
23
23
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DtoMapper } from '@rafikidota/iroh';
|
|
2
|
-
import { <%= classify(name) %>Domain } from '../../domain';
|
|
2
|
+
import { <%= classify(name) %>Domain } from '../../domain/<%= lowerCase(name) %>.domain';
|
|
3
3
|
import { New<%= classify(name) %>Props } from '../../domain/<%= lowerCase(name) %>.domain';
|
|
4
4
|
|
|
5
5
|
export class Create<%= classify(name) %>Dto
|
|
@@ -4,8 +4,8 @@ import { OmitType } from '@nestjs/swagger';
|
|
|
4
4
|
import { PartialType } from '@nestjs/swagger';
|
|
5
5
|
import { GenericView } from '@rafikidota/iroh';
|
|
6
6
|
import { Create<%= classify(name) %>Dto } from './<%= lowerCase(name) %>.create.dto';
|
|
7
|
-
import { <%= classify(name) %>Domain } from '../../domain';
|
|
8
|
-
import { I<%= classify(name) %> } from '../../domain';
|
|
7
|
+
import { <%= classify(name) %>Domain } from '../../domain/<%= lowerCase(name) %>.domain';
|
|
8
|
+
import { I<%= classify(name) %> } from '../../domain/<%= lowerCase(name) %>.interface';
|
|
9
9
|
|
|
10
10
|
export class <%= classify(name) %>View
|
|
11
11
|
extends OmitType(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IGenericEntityProps } from '@rafikidota/iroh';
|
|
2
|
-
import { <%= classify(name) %>Persistence } from '../infra';
|
|
2
|
+
import { <%= classify(name) %>Persistence } from '../infra/<%= lowerCase(name) %>.persistence';
|
|
3
3
|
import { <%= classify(name) %>Domain } from './<%= lowerCase(name) %>.domain';
|
|
4
|
-
import { <%= classify(name) %>View } from '../app';
|
|
4
|
+
import { <%= classify(name) %>View } from '../app/dto/<%= lowerCase(name) %>.view';
|
|
5
5
|
|
|
6
6
|
export interface I<%= classify(name) %> extends IGenericEntityProps { }
|
|
7
7
|
|
|
@@ -3,8 +3,8 @@ import { PersistenceFactory } from '@rafikidota/iroh';
|
|
|
3
3
|
import { DomainProps } from '@rafikidota/iroh';
|
|
4
4
|
import { IrohMapper } from '@rafikidota/iroh';
|
|
5
5
|
import { <%= classify(name) %>Persistence } from './<%= lowerCase(name) %>.persistence';
|
|
6
|
-
import { <%= classify(name) %>Domain } from '../domain';
|
|
7
|
-
import { <%= classify(name) %>View } from '../app';
|
|
6
|
+
import { <%= classify(name) %>Domain } from '../domain/<%= lowerCase(name) %>.domain';
|
|
7
|
+
import { <%= classify(name) %>View } from '../app/dto/<%= lowerCase(name) %>.view';
|
|
8
8
|
|
|
9
9
|
const Mapper = IrohMapper<<%= classify(name) %>Persistence, <%= classify(name) %>Domain, <%= classify(name) %>View>;
|
|
10
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Entity } from 'typeorm';
|
|
2
2
|
import { GenericPersistence } from '@rafikidota/iroh';
|
|
3
|
-
import { I<%= classify(name) %> } from '../domain';
|
|
3
|
+
import { I<%= classify(name) %> } from '../domain/<%= lowerCase(name) %>.interface';
|
|
4
4
|
|
|
5
5
|
@Entity('<%= dashToUnderscore(name) %>')
|
|
6
6
|
export class <%= classify(name) %>Persistence extends GenericPersistence implements I<%= classify(name) %> {}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { Test
|
|
1
|
+
import { Test } from '@nestjs/testing';
|
|
2
|
+
import { TestingModule } from '@nestjs/testing';
|
|
2
3
|
import { <%= classify(name) %>Controller } from '../<%= lowerCase(name) %>.controller';
|
|
3
4
|
import { <%= classify(name) %>Service } from '../<%= lowerCase(name) %>.service';
|
|
5
|
+
import { <%= classify(name) %>Repository } from '../infra/<%= lowerCase(name) %>.repository';
|
|
6
|
+
import { <%= classify(name) %>PersistenceRepository } from './provider/<%= lowerCase(name) %>.typeorm.repository';
|
|
4
7
|
|
|
5
8
|
describe('<%= classify(name) %>Controller', () => {
|
|
6
9
|
let controller: <%= classify(name) %>Controller;
|
|
@@ -8,7 +11,11 @@ describe('<%= classify(name) %>Controller', () => {
|
|
|
8
11
|
beforeEach(async () => {
|
|
9
12
|
const module: TestingModule = await Test.createTestingModule({
|
|
10
13
|
controllers: [<%= classify(name) %>Controller],
|
|
11
|
-
providers: [
|
|
14
|
+
providers: [
|
|
15
|
+
<%= classify(name) %>Service,
|
|
16
|
+
<%= classify(name) %>Repository,
|
|
17
|
+
<%= classify(name) %>PersistenceRepository,
|
|
18
|
+
],
|
|
12
19
|
}).compile();
|
|
13
20
|
|
|
14
21
|
controller = module.get<<%= classify(name) %>Controller>(<%= classify(name) %>Controller);
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import { Test
|
|
1
|
+
import { Test } from '@nestjs/testing';
|
|
2
|
+
import { TestingModule } from '@nestjs/testing';
|
|
2
3
|
import { <%= classify(name) %>Service } from '../<%= lowerCase(name) %>.service';
|
|
4
|
+
import { <%= classify(name) %>Repository } from '../infra/<%= lowerCase(name) %>.repository';
|
|
5
|
+
import { <%= classify(name) %>PersistenceRepository } from './provider/<%= lowerCase(name) %>.typeorm.repository';
|
|
3
6
|
|
|
4
7
|
describe('<%= classify(name) %>Service', () => {
|
|
5
8
|
let service: <%= classify(name) %>Service;
|
|
6
9
|
|
|
7
10
|
beforeEach(async () => {
|
|
8
11
|
const module: TestingModule = await Test.createTestingModule({
|
|
9
|
-
|
|
12
|
+
providers: [
|
|
13
|
+
<%= classify(name) %>Service,
|
|
14
|
+
<%= classify(name) %>Repository,
|
|
15
|
+
<%= classify(name) %>PersistenceRepository,
|
|
16
|
+
],
|
|
10
17
|
}).compile();
|
|
11
18
|
|
|
12
19
|
service = module.get<<%= classify(name) %>Service>(<%= classify(name) %>Service);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { getRepositoryToken } from '@nestjs/typeorm';
|
|
2
|
+
import { <%= classify(name) %>Persistence } from '../../infra/<%= lowerCase(name) %>.persistence';
|
|
3
|
+
|
|
4
|
+
const token = getRepositoryToken(<%= classify(name) %>Persistence);
|
|
5
|
+
export const <%= classify(name) %>PersistenceRepository = { provide: token, useValue: {} };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rafikidota/iroh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "Sometimes, the best way to solve your own problems is to help someone else.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@angular-devkit/schematics": "19.2.13",
|
|
35
35
|
"@angular-devkit/schematics-cli": "19.2.13",
|
|
36
36
|
"@eslint/eslintrc": "3.3.1",
|
|
37
|
-
"@eslint/js": "9.
|
|
37
|
+
"@eslint/js": "9.33.0",
|
|
38
38
|
"@nestjs/common": "11.1.6",
|
|
39
39
|
"@nestjs/config": "4.0.2",
|
|
40
40
|
"@nestjs/core": "11.1.6",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"@swc/core": "1.13.3",
|
|
46
46
|
"@swc/helpers": "0.5.17",
|
|
47
47
|
"@types/express": "5.0.3",
|
|
48
|
-
"@types/node": "24.2.
|
|
48
|
+
"@types/node": "24.2.1",
|
|
49
49
|
"@types/uuid": "10.0.0",
|
|
50
50
|
"@typescript-eslint/eslint-plugin": "8.39.0",
|
|
51
51
|
"@typescript-eslint/parser": "8.39.0",
|
|
52
52
|
"class-transformer": "0.5.1",
|
|
53
53
|
"class-validator": "0.14.2",
|
|
54
|
-
"eslint": "9.
|
|
54
|
+
"eslint": "9.33.0",
|
|
55
55
|
"eslint-config-prettier": "10.1.8",
|
|
56
56
|
"eslint-plugin-import": "2.32.0",
|
|
57
57
|
"eslint-plugin-prettier": "5.5.4",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"globals": "16.3.0",
|
|
60
60
|
"husky": "9.1.7",
|
|
61
61
|
"joi": "18.0.0",
|
|
62
|
-
"lint-staged": "16.1.
|
|
62
|
+
"lint-staged": "16.1.5",
|
|
63
63
|
"prettier": "3.6.2",
|
|
64
64
|
"reflect-metadata": "0.2.2",
|
|
65
65
|
"rimraf": "6.0.1",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// export * from './aggregations';
|
|
2
|
-
export * from './app';
|
|
3
|
-
export * from './domain';
|
|
4
|
-
export * from './infra';
|
|
5
|
-
export * from './<%= lowerCase(name) %>.controller';
|
|
6
|
-
export * from './<%= lowerCase(name) %>.module';
|
|
7
|
-
export * from './<%= lowerCase(name) %>.service';
|