@rafikidota/iroh 0.42.0 → 0.44.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.
@@ -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, TestingModule } from '@nestjs/testing';
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: [<%= classify(name) %>Service],
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, TestingModule } from '@nestjs/testing';
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
- providers: [<%= classify(name) %>Service],
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.42.0",
3
+ "version": "0.44.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,45 +34,42 @@
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.32.0",
37
+ "@eslint/js": "9.35.0",
38
38
  "@nestjs/common": "11.1.6",
39
39
  "@nestjs/config": "4.0.2",
40
40
  "@nestjs/core": "11.1.6",
41
41
  "@nestjs/swagger": "11.2.0",
42
42
  "@nestjs/typeorm": "11.0.0",
43
- "@rafikidota/serpens": "1.11.0",
43
+ "@rafikidota/serpens": "1.12.0",
44
44
  "@swc/cli": "0.7.8",
45
- "@swc/core": "1.13.3",
45
+ "@swc/core": "1.13.5",
46
46
  "@swc/helpers": "0.5.17",
47
47
  "@types/express": "5.0.3",
48
- "@types/node": "24.2.0",
48
+ "@types/node": "24.3.1",
49
49
  "@types/uuid": "10.0.0",
50
- "@typescript-eslint/eslint-plugin": "8.39.0",
51
- "@typescript-eslint/parser": "8.39.0",
50
+ "@typescript-eslint/eslint-plugin": "8.43.0",
51
+ "@typescript-eslint/parser": "8.43.0",
52
52
  "class-transformer": "0.5.1",
53
53
  "class-validator": "0.14.2",
54
- "eslint": "9.32.0",
54
+ "eslint": "9.35.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",
58
58
  "express": "5.1.0",
59
59
  "globals": "16.3.0",
60
60
  "husky": "9.1.7",
61
- "joi": "18.0.0",
62
- "lint-staged": "16.1.4",
61
+ "joi": "18.0.1",
62
+ "lint-staged": "16.1.6",
63
63
  "prettier": "3.6.2",
64
64
  "reflect-metadata": "0.2.2",
65
65
  "rimraf": "6.0.1",
66
66
  "rxjs": "7.8.2",
67
- "typeorm": "0.3.25",
67
+ "typeorm": "0.3.26",
68
68
  "typescript": "5.9.2",
69
- "typescript-eslint": "8.39.0",
70
- "uuid": "11.1.0"
69
+ "typescript-eslint": "8.43.0",
70
+ "uuid": "13.0.0"
71
71
  },
72
72
  "peerDependencies": {
73
- "@angular-devkit/core": "^19.2.0",
74
- "@angular-devkit/schematics": "^19.2.0",
75
- "@angular-devkit/schematics-cli": "^19.2.0",
76
73
  "@nestjs/common": "^11.0.0",
77
74
  "@nestjs/config": "^4.0.0",
78
75
  "@nestjs/core": "^11.0.0",
@@ -91,9 +88,16 @@
91
88
  "reflect-metadata": "^0.2.0",
92
89
  "rxjs": "^7.8.0",
93
90
  "typeorm": "^0.3.0",
94
- "uuid": "^11.0.0"
91
+ "uuid": "^11.0.0 || ^13.0.0"
92
+ },
93
+ "peerDependenciesMeta": {
94
+ "@nestjs/microservices": {
95
+ "optional": true
96
+ },
97
+ "@swc/helpers": {
98
+ "optional": true
99
+ }
95
100
  },
96
- "peerDependenciesMeta": {},
97
101
  "lint-staged": {
98
102
  "**/*.{ts,json}": [
99
103
  "prettier --write",
@@ -1,3 +0,0 @@
1
- export * from './<%= lowerCase(name) %>.create.dto';
2
- export * from './<%= lowerCase(name) %>.update.dto';
3
- export * from './<%= lowerCase(name) %>.view';
@@ -1,2 +0,0 @@
1
- export * from './dto';
2
- // export * from './use-cases';
@@ -1,2 +0,0 @@
1
- export * from './<%= lowerCase(name) %>.domain';
2
- export * from './<%= lowerCase(name) %>.interface';
@@ -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';
@@ -1,3 +0,0 @@
1
- export * from './<%= lowerCase(name) %>.mapper';
2
- export * from './<%= lowerCase(name) %>.persistence';
3
- export * from './<%= lowerCase(name) %>.repository';