@steroidsjs/nest 3.0.0 → 3.0.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.
Files changed (107) hide show
  1. package/infrastructure/adapters/QueryAdapterTypeORM.js +26 -2
  2. package/infrastructure/adapters/QueryAdapterTypeORM.js.map +1 -1
  3. package/infrastructure/applications/base/config.js +1 -1
  4. package/infrastructure/applications/base/config.js.map +1 -1
  5. package/infrastructure/applications/console/ConsoleApplication.js +2 -2
  6. package/infrastructure/applications/console/ConsoleApplication.js.map +1 -1
  7. package/infrastructure/applications/console/config.js +3 -0
  8. package/infrastructure/applications/console/config.js.map +1 -1
  9. package/infrastructure/applications/rest/RestApplication.js +7 -0
  10. package/infrastructure/applications/rest/RestApplication.js.map +1 -1
  11. package/infrastructure/applications/rest/exceptions/RequestExecutionException.d.ts +6 -0
  12. package/infrastructure/applications/rest/exceptions/RequestExecutionException.js +6 -0
  13. package/infrastructure/applications/rest/exceptions/RequestExecutionException.js.map +1 -1
  14. package/infrastructure/commands/MigrateCommand.js +1 -0
  15. package/infrastructure/commands/MigrateCommand.js.map +1 -1
  16. package/infrastructure/commands/dbml/dbml2code.js +8 -0
  17. package/infrastructure/commands/dbml/dbml2code.js.map +1 -1
  18. package/infrastructure/commands/entity-generator/EntityCodeGenerateCommand.d.ts +4 -0
  19. package/infrastructure/commands/entity-generator/EntityCodeGenerateCommand.js +4 -0
  20. package/infrastructure/commands/entity-generator/EntityCodeGenerateCommand.js.map +1 -1
  21. package/infrastructure/commands/entity-generator/EntityCodeGenerator.js +1 -0
  22. package/infrastructure/commands/entity-generator/EntityCodeGenerator.js.map +1 -1
  23. package/infrastructure/commands/generate/CustomPostgresQueryRunner.d.ts +77 -0
  24. package/infrastructure/commands/generate/CustomPostgresQueryRunner.js +149 -0
  25. package/infrastructure/commands/generate/CustomPostgresQueryRunner.js.map +1 -1
  26. package/infrastructure/commands/generate/CustomRdbmsSchemaBuilder.js +7 -1
  27. package/infrastructure/commands/generate/CustomRdbmsSchemaBuilder.js.map +1 -1
  28. package/infrastructure/commands/generate/index.js +14 -0
  29. package/infrastructure/commands/generate/index.js.map +1 -1
  30. package/infrastructure/commands/importClassesFromDirectories.d.ts +3 -0
  31. package/infrastructure/commands/importClassesFromDirectories.js +3 -0
  32. package/infrastructure/commands/importClassesFromDirectories.js.map +1 -1
  33. package/infrastructure/decorators/Module.js +6 -0
  34. package/infrastructure/decorators/Module.js.map +1 -1
  35. package/infrastructure/decorators/TableFromModel.js +3 -0
  36. package/infrastructure/decorators/TableFromModel.js.map +1 -1
  37. package/infrastructure/decorators/fields/BaseField.js +5 -0
  38. package/infrastructure/decorators/fields/BaseField.js.map +1 -1
  39. package/infrastructure/decorators/fields/CreateTimeField.js +1 -0
  40. package/infrastructure/decorators/fields/CreateTimeField.js.map +1 -1
  41. package/infrastructure/decorators/fields/DateTimeField.js +5 -0
  42. package/infrastructure/decorators/fields/DateTimeField.js.map +1 -1
  43. package/infrastructure/decorators/fields/ExtendField.js +2 -0
  44. package/infrastructure/decorators/fields/ExtendField.js.map +1 -1
  45. package/infrastructure/decorators/fields/RelationField.js +3 -0
  46. package/infrastructure/decorators/fields/RelationField.js.map +1 -1
  47. package/infrastructure/decorators/fields/RelationIdField.js +2 -0
  48. package/infrastructure/decorators/fields/RelationIdField.js.map +1 -1
  49. package/infrastructure/decorators/fields/UidField.js +1 -0
  50. package/infrastructure/decorators/fields/UidField.js.map +1 -1
  51. package/infrastructure/decorators/fields/UpdateTimeField.js +1 -0
  52. package/infrastructure/decorators/fields/UpdateTimeField.js.map +1 -1
  53. package/infrastructure/filters/ValidationExceptionFilter.js +1 -0
  54. package/infrastructure/filters/ValidationExceptionFilter.js.map +1 -1
  55. package/infrastructure/helpers/ModuleHelper.d.ts +1 -0
  56. package/infrastructure/helpers/ModuleHelper.js +1 -0
  57. package/infrastructure/helpers/ModuleHelper.js.map +1 -1
  58. package/infrastructure/helpers/typeORM/ConditionHelperTypeORM.js +21 -18
  59. package/infrastructure/helpers/typeORM/ConditionHelperTypeORM.js.map +1 -1
  60. package/infrastructure/helpers/typeORM/SearchHelperTypeORM.js +6 -0
  61. package/infrastructure/helpers/typeORM/SearchHelperTypeORM.js.map +1 -1
  62. package/infrastructure/pipes/CreateDtoPipe.js +1 -0
  63. package/infrastructure/pipes/CreateDtoPipe.js.map +1 -1
  64. package/infrastructure/repositories/CrudRepository.d.ts +88 -0
  65. package/infrastructure/repositories/CrudRepository.js +85 -0
  66. package/infrastructure/repositories/CrudRepository.js.map +1 -1
  67. package/infrastructure/tests/ModelTest.test.js +23 -0
  68. package/infrastructure/tests/ModelTest.test.js.map +1 -1
  69. package/infrastructure/tests/app/services/ArticleService.d.ts +4 -1
  70. package/infrastructure/tests/app/services/ArticleService.js +3 -1
  71. package/infrastructure/tests/app/services/ArticleService.js.map +1 -1
  72. package/infrastructure/tests/app/services/CommentService.d.ts +4 -1
  73. package/infrastructure/tests/app/services/CommentService.js +3 -1
  74. package/infrastructure/tests/app/services/CommentService.js.map +1 -1
  75. package/infrastructure/tests/app/services/FileService.d.ts +4 -1
  76. package/infrastructure/tests/app/services/FileService.js +3 -1
  77. package/infrastructure/tests/app/services/FileService.js.map +1 -1
  78. package/infrastructure/tests/app/services/ImageService.d.ts +4 -1
  79. package/infrastructure/tests/app/services/ImageService.js +3 -1
  80. package/infrastructure/tests/app/services/ImageService.js.map +1 -1
  81. package/infrastructure/tests/app/services/TagService.d.ts +4 -1
  82. package/infrastructure/tests/app/services/TagService.js +3 -1
  83. package/infrastructure/tests/app/services/TagService.js.map +1 -1
  84. package/infrastructure/tests/app/services/UserService.d.ts +4 -1
  85. package/infrastructure/tests/app/services/UserService.js +3 -1
  86. package/infrastructure/tests/app/services/UserService.js.map +1 -1
  87. package/infrastructure/tests/bootstrap.js +1 -1
  88. package/infrastructure/tests/bootstrap.js.map +1 -1
  89. package/package.json +1 -1
  90. package/tsconfig.tsbuildinfo +1 -1
  91. package/usecases/base/SearchQuery.d.ts +12 -0
  92. package/usecases/base/SearchQuery.js +18 -0
  93. package/usecases/base/SearchQuery.js.map +1 -1
  94. package/usecases/helpers/DataMapper.js +6 -0
  95. package/usecases/helpers/DataMapper.js.map +1 -1
  96. package/usecases/helpers/ValidationHelper.d.ts +27 -0
  97. package/usecases/helpers/ValidationHelper.js +33 -0
  98. package/usecases/helpers/ValidationHelper.js.map +1 -1
  99. package/usecases/interfaces/IManualSchema.d.ts +4 -0
  100. package/usecases/services/CrudService.d.ts +47 -8
  101. package/usecases/services/CrudService.js +88 -0
  102. package/usecases/services/CrudService.js.map +1 -1
  103. package/usecases/services/ReadService.d.ts +31 -0
  104. package/usecases/services/ReadService.js +32 -0
  105. package/usecases/services/ReadService.js.map +1 -1
  106. package/usecases/validators/Validator.js +1 -0
  107. package/usecases/validators/Validator.js.map +1 -1
@@ -7,8 +7,14 @@ const DataMapper_1 = require("../../usecases/helpers/DataMapper");
7
7
  const TableFromModel_1 = require("../decorators/TableFromModel");
8
8
  const Transform_1 = require("../decorators/Transform");
9
9
  const QueryAdapterTypeORM_1 = require("../adapters/QueryAdapterTypeORM");
10
+ /**
11
+ * Generic CRUD repository
12
+ */
10
13
  class CrudRepository {
11
14
  constructor() {
15
+ /**
16
+ * Table primary key
17
+ */
12
18
  this.primaryKey = 'id';
13
19
  }
14
20
  onModuleInit() {
@@ -21,15 +27,30 @@ class CrudRepository {
21
27
  (0, TableFromModel_1.setModelBuilder)(this.modelClass, null);
22
28
  }
23
29
  }
30
+ /**
31
+ * Manually initialize database repository (without extend class CrudRepository)
32
+ * @param dbRepository
33
+ * @param modelClass
34
+ */
24
35
  init(dbRepository, modelClass) {
25
36
  this.dbRepository = dbRepository;
26
37
  this.modelClass = modelClass;
27
38
  }
39
+ /**
40
+ * Search items with pagination, filters and sorting
41
+ * @param dto
42
+ * @param searchQuery
43
+ */
28
44
  async search(dto, searchQuery) {
29
45
  const result = await SearchHelperTypeORM_1.SearchHelperTypeORM.search(this.dbRepository, dto, searchQuery, null);
30
46
  result.items = result.items.map(item => this.entityToModel(item));
31
47
  return result;
32
48
  }
49
+ /**
50
+ * Find item by condition
51
+ * @param conditionOrQuery
52
+ * @param eagerLoading
53
+ */
33
54
  async findOne(conditionOrQuery, eagerLoading = true) {
34
55
  const [dbQuery, searchQuery] = this.createQueryBuilder(conditionOrQuery, eagerLoading);
35
56
  let row = await dbQuery.getOne();
@@ -39,6 +60,11 @@ class CrudRepository {
39
60
  row = (await QueryAdapterTypeORM_1.QueryAdapterTypeORM.loadRelationsWithoutJoin(this.modelClass, this.dbRepository, [row], searchQuery.getWithNoJoin()))[0];
40
61
  return this.entityToModel(row);
41
62
  }
63
+ /**
64
+ * Find item by condition
65
+ * @param conditionOrQuery
66
+ * @param eagerLoading
67
+ */
42
68
  async findMany(conditionOrQuery, eagerLoading = true) {
43
69
  const [dbQuery, searchQuery] = this.createQueryBuilder(conditionOrQuery, eagerLoading);
44
70
  let rows = await dbQuery.getMany();
@@ -48,6 +74,12 @@ class CrudRepository {
48
74
  createQuery(config) {
49
75
  return new SearchQuery_1.default(Object.assign({ onGetMany: this.findMany.bind(this), onGetOne: this.findOne.bind(this) }, (config || {})));
50
76
  }
77
+ /**
78
+ * Create db query builder for findOne() and findMany() methods
79
+ * @param conditionOrQuery
80
+ * @param eagerLoading
81
+ * @protected
82
+ */
51
83
  createQueryBuilder(conditionOrQuery, eagerLoading = true) {
52
84
  let searchQuery = conditionOrQuery;
53
85
  if (!(conditionOrQuery instanceof SearchQuery_1.default)) {
@@ -58,14 +90,32 @@ class CrudRepository {
58
90
  QueryAdapterTypeORM_1.QueryAdapterTypeORM.prepare(this.dbRepository, dbQuery, searchQuery, eagerLoading);
59
91
  return [dbQuery, searchQuery];
60
92
  }
93
+ /**
94
+ * Create item
95
+ * @param model
96
+ * @param transactionHandler
97
+ * @deprecated Use save() method
98
+ */
61
99
  async create(model, transactionHandler) {
62
100
  model[this.primaryKey] = undefined;
63
101
  return this.save(model, transactionHandler);
64
102
  }
103
+ /**
104
+ * Update item
105
+ * @param id
106
+ * @param model
107
+ * @param transactionHandler
108
+ * @deprecated Use save() method
109
+ */
65
110
  async update(id, model, transactionHandler) {
66
111
  model[this.primaryKey] = id;
67
112
  return this.save(model, transactionHandler);
68
113
  }
114
+ /**
115
+ * Create or update item
116
+ * @param model
117
+ * @param transactionHandler
118
+ */
69
119
  async save(model, transactionHandler) {
70
120
  const saver = async (manager, nextModel) => {
71
121
  const entity = this.modelToEntity(nextModel);
@@ -84,9 +134,19 @@ class CrudRepository {
84
134
  }
85
135
  return model;
86
136
  }
137
+ /**
138
+ * Internal save method for overwrite in project
139
+ * @param manager
140
+ * @param nextModel
141
+ */
87
142
  async saveInternal(manager, nextModel) {
88
143
  await manager.save(nextModel);
89
144
  }
145
+ /**
146
+ * Remove item
147
+ * @param id
148
+ * @param transactionHandler
149
+ */
90
150
  async remove(id, transactionHandler) {
91
151
  if (transactionHandler) {
92
152
  await this.dbRepository.manager.transaction(async (manager) => {
@@ -99,18 +159,38 @@ class CrudRepository {
99
159
  await this.removeInternal(this.dbRepository.manager, id);
100
160
  }
101
161
  }
162
+ /**
163
+ * Internal remove method for overwrite in project
164
+ * @param manager
165
+ * @param id
166
+ */
102
167
  async removeInternal(manager, id) {
103
168
  await manager.remove(this.dbRepository.create({ id }));
104
169
  }
170
+ /**
171
+ * Mapping model to entity object
172
+ * @param model
173
+ * @protected
174
+ */
105
175
  modelToEntity(model) {
106
176
  return DataMapper_1.DataMapper.create((0, TableFromModel_1.getTableFromModel)(this.modelClass), model, Transform_1.TRANSFORM_TYPE_TO_DB);
107
177
  }
178
+ /**
179
+ * Mapping entity object to model
180
+ * @param obj
181
+ * @protected
182
+ */
108
183
  entityToModel(obj) {
109
184
  if (!this.modelClass) {
110
185
  throw new Error('Property modelClass is not set in repository: ' + this.constructor.name);
111
186
  }
112
187
  return DataMapper_1.DataMapper.create(this.modelClass, obj, Transform_1.TRANSFORM_TYPE_FROM_DB, true);
113
188
  }
189
+ /**
190
+ * Soft remove item
191
+ * @param id
192
+ * @param transactionHandler
193
+ */
114
194
  async softRemove(id, transactionHandler) {
115
195
  if (transactionHandler) {
116
196
  await this.dbRepository.manager.transaction(async (manager) => {
@@ -123,6 +203,11 @@ class CrudRepository {
123
203
  await this.softRemoveInternal(this.dbRepository.manager, id);
124
204
  }
125
205
  }
206
+ /**
207
+ * Internal soft remove method for overwrite in project
208
+ * @param manager
209
+ * @param id
210
+ */
126
211
  async softRemoveInternal(manager, id) {
127
212
  await manager.softRemove(this.dbRepository.create({ id }));
128
213
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CrudRepository.js","sourceRoot":"","sources":["../../../src/infrastructure/repositories/CrudRepository.ts"],"names":[],"mappings":";;;AACA,gFAA2E;AAI3E,iEAAgF;AAChF,kEAA6D;AAI7D,iEAAgF;AAChF,uDAAqF;AAErF,yEAAoE;AAKpE,MAAa,cAAc;IAA3B;QAIW,eAAU,GAAW,IAAI,CAAC;IAuPrC,CAAC;IA9OG,YAAY;QACR,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,IAAA,gCAAe,EAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SACnE;IACL,CAAC;IAED,eAAe;QACX,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,IAAA,gCAAe,EAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;SAC1C;IACL,CAAC;IAOM,IAAI,CAAC,YAA6B,EAAE,UAAe;QACtD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAOD,KAAK,CAAC,MAAM,CAAC,GAAmB,EAAE,WAAgC;QAC9D,MAAM,MAAM,GAAG,MAAM,yCAAmB,CAAC,MAAM,CAC3C,IAAI,CAAC,YAAmB,EACxB,GAAG,EACH,WAAW,EACX,IAAI,CACP,CAAC;QACF,MAAM,CAAC,KAAK,G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C,kBAAkB,CAAC,OAAsB,EAAE,EAAU;QACvD,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAC,EAAE,EAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;CACJ;AA3PD,wCA2PC"}
1
+ {"version":3,"file":"CrudRepository.js","sourceRoot":"","sources":["../../../src/infrastructure/repositories/CrudRepository.ts"],"names":[],"mappings":";;;AACA,gFAA2E;AAI3E,iEAAgF;AAChF,kEAA6D;AAI7D,iEAAgF;AAChF,uDAAqF;AAErF,yEAAoE;AAEpE;;GAEG;AACH,MAAa,cAAc;IAA3B;QACI;;WAEG;QACI,eAAU,GAAW,IAAI,CAAC;IAuPrC,CAAC;IA9OG,YAAY;QACR,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,IAAA,gCAAe,EAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SACnE;IACL,CAAC;IAED,eAAe;QACX,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,IAAA,gCAAe,EAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;SAC1C;IACL,CAAC;IAED;;;;OAIG;IACI,IAAI,CAAC,YAA6B,EAAE,UAAe;QACtD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,GAAmB,EAAE,WAAgC;QAC9D,MAAM,MAAM,GAAG,MAAM,yCAAmB,CAAC,MAAM,CAC3C,IAAI,CAAC,YAAmB,EACxB,GAAG,EACH,WAAW,EACX,IAAI,CACP,CAAC;QACF,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;QA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AAE,CAAC,CAAC;SAChE;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,kBAAkB,CAAC,OAAsB,EAAE,EAAU;QACvD,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAC,EAAE,EAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;CACJ;AA3PD,wCA2PC"}
@@ -35,8 +35,13 @@ const createPhoto = (app) => {
35
35
  (0, globals_1.beforeAll)(async () => {
36
36
  app = await (0, bootstrap_1.bootstrap)();
37
37
  });
38
+ /**
39
+ * Want test relations saves:
40
+ * - OneToMany::ids v
41
+ */
38
42
  (0, globals_1.it)('OneToMany ids', async () => {
39
43
  var _a, _b;
44
+ // Create file and image models with OneToMany::ids relations
40
45
  const additionalImage1 = await app.get(ImageService_1.ImageService).create(DataMapper_1.DataMapper.create(ImageModel_1.ImageModel, {
41
46
  size: 'thumbnail',
42
47
  url: 'https://test.com/image-thumbnail.png',
@@ -56,6 +61,10 @@ const createPhoto = (app) => {
56
61
  expect(additionalPhoto === null || additionalPhoto === void 0 ? void 0 : additionalPhoto.id).toBeGreaterThan(0);
57
62
  expect((_b = additionalPhoto === null || additionalPhoto === void 0 ? void 0 : additionalPhoto.imagesIds) === null || _b === void 0 ? void 0 : _b.length).toEqual(1);
58
63
  });
64
+ /**
65
+ * Want test relations saves:
66
+ * - ManyToMany::data v
67
+ */
59
68
  (0, globals_1.it)('ManyToMany data', async () => {
60
69
  var _a, _b;
61
70
  const passportScan = await createPhoto(app);
@@ -66,6 +75,7 @@ const createPhoto = (app) => {
66
75
  passportScanId: passportScan.id,
67
76
  }),
68
77
  }));
78
+ // Create file and image models with OneToMany::ids relations
69
79
  let article = await app.get(ArticleService_1.ArticleService).create(DataMapper_1.DataMapper.create(ArticleModel_1.ArticleModel, {
70
80
  title: 'How to load relations in entities',
71
81
  creatorUserId: user.id,
@@ -79,11 +89,20 @@ const createPhoto = (app) => {
79
89
  article = await app.get(ArticleService_1.ArticleService).findById(article.id, null, ArticleSchema_1.ArticleSchema);
80
90
  expect(article === null || article === void 0 ? void 0 : article.id).toBeGreaterThan(0);
81
91
  expect((_b = article === null || article === void 0 ? void 0 : article.tags) === null || _b === void 0 ? void 0 : _b.length).toEqual(2);
92
+ // Check transform and computable decorators
82
93
  expect(article === null || article === void 0 ? void 0 : article.title).toEqual('HOW TO LOAD RELATIONS IN ENTITIES');
83
94
  expect(article === null || article === void 0 ? void 0 : article.shortTitle).toEqual('How t');
84
95
  });
96
+ /**
97
+ * Want test relations saves:
98
+ * - ManyToOne::ids v
99
+ * - ManyToMany::ids v
100
+ * - OneToOne::data v
101
+ * - OneToMany::data v
102
+ */
85
103
  (0, globals_1.it)('Complex test', async () => {
86
104
  var _a, _b;
105
+ // Create main photo: test OneToMany::data
87
106
  const mainPhoto = await createPhoto(app);
88
107
  expect(mainPhoto === null || mainPhoto === void 0 ? void 0 : mainPhoto.id).toBeGreaterThan(0);
89
108
  expect(mainPhoto === null || mainPhoto === void 0 ? void 0 : mainPhoto.images.length).toEqual(2);
@@ -91,10 +110,12 @@ const createPhoto = (app) => {
91
110
  expect(mainPhoto === null || mainPhoto === void 0 ? void 0 : mainPhoto.images[0].size).toEqual('thumbnail');
92
111
  expect(mainPhoto === null || mainPhoto === void 0 ? void 0 : mainPhoto.images[1].id).toBeGreaterThan(0);
93
112
  expect(mainPhoto === null || mainPhoto === void 0 ? void 0 : mainPhoto.images[1].size).toEqual('full');
113
+ // Create photos for gallery
94
114
  const photos = [];
95
115
  for (let i = 0; i < 3; i++) {
96
116
  photos.push(await createPhoto(app));
97
117
  }
118
+ // Create user: test ManyToOne::ids, ManyToMany::ids, OneToOne::data
98
119
  let user = await app.get(UserService_1.UserService).create(DataMapper_1.DataMapper.create(UserModel_1.UserModel, {
99
120
  name: 'Test user ' + Date.now(),
100
121
  info: DataMapper_1.DataMapper.create(UserInfoModel_1.UserInfoModel, {
@@ -106,6 +127,7 @@ const createPhoto = (app) => {
106
127
  expect(user === null || user === void 0 ? void 0 : user.id).toBeGreaterThan(0);
107
128
  expect(user === null || user === void 0 ? void 0 : user.mainPhotoId).toEqual(mainPhoto.id);
108
129
  expect(user === null || user === void 0 ? void 0 : user.galleryPhotosIds.length).toEqual(photos.length);
130
+ // Get user from database with relations
109
131
  user = await app
110
132
  .get(UserService_1.UserService)
111
133
  .findOne(new SearchQuery_1.default()
@@ -115,6 +137,7 @@ const createPhoto = (app) => {
115
137
  expect(user === null || user === void 0 ? void 0 : user.mainPhotoId).toEqual(mainPhoto.id);
116
138
  expect((_a = user === null || user === void 0 ? void 0 : user.info) === null || _a === void 0 ? void 0 : _a.passport).toEqual('0409 123456');
117
139
  expect((_b = user === null || user === void 0 ? void 0 : user.galleryPhotosIds) === null || _b === void 0 ? void 0 : _b.length).toEqual(photos.length);
140
+ // console.log('TEST RESULT', user);
118
141
  });
119
142
  (0, globals_1.afterAll)(async () => {
120
143
  await app.close();
@@ -1 +1 @@
1
- {"version":3,"file":"ModelTest.test.js","sourceRoot":"","sources":["../../../src/infrastructure/tests/ModelTest.test.ts"],"names":[],"mappings":";;AAAA,2CAAgE;AAChE,2CAAsC;AACtC,4DAAuD;AACvD,kEAA6D;AAC7D,sDAAiD;AACjD,4DAAuD;AACvD,sDAAiD;AACjD,iEAA0D;AAC1D,8DAAyD;AACzD,8DAAyD;AACzD,wDAAmD;AACnD,kEAA6D;AAC7D,4DAAuD;AACvD,oDAA+C;AAC/C,+DAA0D;AAE1D,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,EAAE;IACxB,OAAO,GAAG,CAAC,GAAG,CAAC,yBAAW,CAAC,CAAC,MAAM,CAAC,uBAAU,CAAC,MAAM,CAAY,qBAAS,EAAE;QACvE,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE;QAC1B,MAAM,EAAE;YACJ;gBACI,IAAI,EAAE,WAAW;gBACjB,GAAG,EAAE,sCAAsC;aAC9C;YACD;gBACI,IAAI,EAAE,MAAM;gB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AAW,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAChD,MAAM,CAAC,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACpD,MAAM,CAAC,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE9D,oCAAoC;IACxC,CAAC,CAAC,CAAC;IAEH,IAAA,kBAAQ,EAAC,KAAK,IAAI,EAAE;QAChB,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -3,7 +3,10 @@ import { SearchInputDto } from '../../../../usecases/dtos/SearchInputDto';
3
3
  import { ArticleModel } from '../models/ArticleModel';
4
4
  import { ArticleRepository } from '../repositories/ArticleRepository';
5
5
  export declare class ArticleService extends CrudService<ArticleModel, SearchInputDto, ArticleModel> {
6
+ /** @see ArticleRepository */
6
7
  repository: ArticleRepository;
7
8
  protected modelClass: typeof ArticleModel;
8
- constructor(repository: ArticleRepository);
9
+ constructor(
10
+ /** @see ArticleRepository */
11
+ repository: ArticleRepository);
9
12
  }
@@ -15,7 +15,9 @@ const ArticleModel_1 = require("../models/ArticleModel");
15
15
  const ArticleRepository_1 = require("../repositories/ArticleRepository");
16
16
  const common_1 = require("@nestjs/common");
17
17
  let ArticleService = class ArticleService extends CrudService_1.CrudService {
18
- constructor(repository) {
18
+ constructor(
19
+ /** @see ArticleRepository */
20
+ repository) {
19
21
  super();
20
22
  this.repository = repository;
21
23
  this.modelClass = ArticleModel_1.ArticleModel;
@@ -1 +1 @@
1
- {"version":3,"file":"ArticleService.js","sourceRoot":"","sources":["../../../../../src/infrastructure/tests/app/services/ArticleService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAsE;AAEtE,yDAAoD;AACpD,yEAAoE;AACpE,2CAA0C;AAGnC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,yBAAuD;IAGvF,YAEW,UAA6B;QAEpC,KAAK,EAAE,CAAC;QAFD,eAAU,GAAV,UAAU,CAAmB;QAJ9B,eAAU,GAAG,2BAAY,CAAC;IAOpC,CAAC;CAEJ,CAAA;AAVY,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAMc,qCAAiB;GAL/B,cAAc,CAU1B;AAVY,wCAAc"}
1
+ {"version":3,"file":"ArticleService.js","sourceRoot":"","sources":["../../../../../src/infrastructure/tests/app/services/ArticleService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAsE;AAEtE,yDAAoD;AACpD,yEAAoE;AACpE,2CAA0C;AAGnC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,yBAAuD;IAGvF;IACI,8BAA8B;IACvB,UAA6B;QAEpC,KAAK,EAAE,CAAC;QAFD,eAAU,GAAV,UAAU,CAAmB;QAJ9B,eAAU,GAAG,2BAAY,CAAC;IAOpC,CAAC;CAEJ,CAAA;AAVY,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAMc,qCAAiB;GAL/B,cAAc,CAU1B;AAVY,wCAAc"}
@@ -3,7 +3,10 @@ import { SearchInputDto } from '../../../../usecases/dtos/SearchInputDto';
3
3
  import { CommentModel } from '../models/CommentModel';
4
4
  import { CommentRepository } from '../repositories/CommentRepository';
5
5
  export declare class CommentService extends CrudService<CommentModel, SearchInputDto, CommentModel> {
6
+ /** @see CommentRepository */
6
7
  repository: CommentRepository;
7
8
  protected modelClass: typeof CommentModel;
8
- constructor(repository: CommentRepository);
9
+ constructor(
10
+ /** @see CommentRepository */
11
+ repository: CommentRepository);
9
12
  }
@@ -15,7 +15,9 @@ const CommentModel_1 = require("../models/CommentModel");
15
15
  const CommentRepository_1 = require("../repositories/CommentRepository");
16
16
  const common_1 = require("@nestjs/common");
17
17
  let CommentService = class CommentService extends CrudService_1.CrudService {
18
- constructor(repository) {
18
+ constructor(
19
+ /** @see CommentRepository */
20
+ repository) {
19
21
  super();
20
22
  this.repository = repository;
21
23
  this.modelClass = CommentModel_1.CommentModel;
@@ -1 +1 @@
1
- {"version":3,"file":"CommentService.js","sourceRoot":"","sources":["../../../../../src/infrastructure/tests/app/services/CommentService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAsE;AAEtE,yDAAoD;AACpD,yEAAoE;AACpE,2CAA0C;AAGnC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,yBAAuD;IAGvF,YAEW,UAA6B;QAEpC,KAAK,EAAE,CAAC;QAFD,eAAU,GAAV,UAAU,CAAmB;QAJ9B,eAAU,GAAG,2BAAY,CAAC;IAOpC,CAAC;CAEJ,CAAA;AAVY,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAMc,qCAAiB;GAL/B,cAAc,CAU1B;AAVY,wCAAc"}
1
+ {"version":3,"file":"CommentService.js","sourceRoot":"","sources":["../../../../../src/infrastructure/tests/app/services/CommentService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAsE;AAEtE,yDAAoD;AACpD,yEAAoE;AACpE,2CAA0C;AAGnC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,yBAAuD;IAGvF;IACI,8BAA8B;IACvB,UAA6B;QAEpC,KAAK,EAAE,CAAC;QAFD,eAAU,GAAV,UAAU,CAAmB;QAJ9B,eAAU,GAAG,2BAAY,CAAC;IAOpC,CAAC;CAEJ,CAAA;AAVY,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAMc,qCAAiB;GAL/B,cAAc,CAU1B;AAVY,wCAAc"}
@@ -3,7 +3,10 @@ import { SearchInputDto } from '../../../../usecases/dtos/SearchInputDto';
3
3
  import { FileModel } from '../models/FileModel';
4
4
  import { FileRepository } from '../repositories/FileRepository';
5
5
  export declare class FileService extends CrudService<FileModel, SearchInputDto, FileModel> {
6
+ /** @see FileRepository */
6
7
  repository: FileRepository;
7
8
  protected modelClass: typeof FileModel;
8
- constructor(repository: FileRepository);
9
+ constructor(
10
+ /** @see FileRepository */
11
+ repository: FileRepository);
9
12
  }
@@ -15,7 +15,9 @@ const FileModel_1 = require("../models/FileModel");
15
15
  const FileRepository_1 = require("../repositories/FileRepository");
16
16
  const common_1 = require("@nestjs/common");
17
17
  let FileService = class FileService extends CrudService_1.CrudService {
18
- constructor(repository) {
18
+ constructor(
19
+ /** @see FileRepository */
20
+ repository) {
19
21
  super();
20
22
  this.repository = repository;
21
23
  this.modelClass = FileModel_1.FileModel;
@@ -1 +1 @@
1
- {"version":3,"file":"FileService.js","sourceRoot":"","sources":["../../../../../src/infrastructure/tests/app/services/FileService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAsE;AAEtE,mDAA8C;AAC9C,mEAA8D;AAC9D,2CAA0C;AAGnC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,yBAAiD;IAG9E,YAEW,UAA0B;QAEjC,KAAK,EAAE,CAAC;QAFD,eAAU,GAAV,UAAU,CAAgB;QAJ3B,eAAU,GAAG,qBAAS,CAAC;IAOjC,CAAC;CAEJ,CAAA;AAVY,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAMc,+BAAc;GAL5B,WAAW,CAUvB;AAVY,kCAAW"}
1
+ {"version":3,"file":"FileService.js","sourceRoot":"","sources":["../../../../../src/infrastructure/tests/app/services/FileService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAsE;AAEtE,mDAA8C;AAC9C,mEAA8D;AAC9D,2CAA0C;AAGnC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,yBAAiD;IAG9E;IACI,2BAA2B;IACpB,UAA0B;QAEjC,KAAK,EAAE,CAAC;QAFD,eAAU,GAAV,UAAU,CAAgB;QAJ3B,eAAU,GAAG,qBAAS,CAAC;IAOjC,CAAC;CAEJ,CAAA;AAVY,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAMc,+BAAc;GAL5B,WAAW,CAUvB;AAVY,kCAAW"}
@@ -3,7 +3,10 @@ import { SearchInputDto } from '../../../../usecases/dtos/SearchInputDto';
3
3
  import { ImageModel } from '../models/ImageModel';
4
4
  import { ImageRepository } from '../repositories/ImageRepository';
5
5
  export declare class ImageService extends CrudService<ImageModel, SearchInputDto, ImageModel> {
6
+ /** @see ImageRepository */
6
7
  repository: ImageRepository;
7
8
  protected modelClass: typeof ImageModel;
8
- constructor(repository: ImageRepository);
9
+ constructor(
10
+ /** @see ImageRepository */
11
+ repository: ImageRepository);
9
12
  }
@@ -15,7 +15,9 @@ const ImageModel_1 = require("../models/ImageModel");
15
15
  const ImageRepository_1 = require("../repositories/ImageRepository");
16
16
  const common_1 = require("@nestjs/common");
17
17
  let ImageService = class ImageService extends CrudService_1.CrudService {
18
- constructor(repository) {
18
+ constructor(
19
+ /** @see ImageRepository */
20
+ repository) {
19
21
  super();
20
22
  this.repository = repository;
21
23
  this.modelClass = ImageModel_1.ImageModel;
@@ -1 +1 @@
1
- {"version":3,"file":"ImageService.js","sourceRoot":"","sources":["../../../../../src/infrastructure/tests/app/services/ImageService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAsE;AAEtE,qDAAgD;AAChD,qEAAgE;AAChE,2CAA0C;AAGnC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,yBAAmD;IAGjF,YAEW,UAA2B;QAElC,KAAK,EAAE,CAAC;QAFD,eAAU,GAAV,UAAU,CAAiB;QAJ5B,eAAU,GAAG,uBAAU,CAAC;IAOlC,CAAC;CAEJ,CAAA;AAVY,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAMc,iCAAe;GAL7B,YAAY,CAUxB;AAVY,oCAAY"}
1
+ {"version":3,"file":"ImageService.js","sourceRoot":"","sources":["../../../../../src/infrastructure/tests/app/services/ImageService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAsE;AAEtE,qDAAgD;AAChD,qEAAgE;AAChE,2CAA0C;AAGnC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,yBAAmD;IAGjF;IACI,4BAA4B;IACrB,UAA2B;QAElC,KAAK,EAAE,CAAC;QAFD,eAAU,GAAV,UAAU,CAAiB;QAJ5B,eAAU,GAAG,uBAAU,CAAC;IAOlC,CAAC;CAEJ,CAAA;AAVY,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAMc,iCAAe;GAL7B,YAAY,CAUxB;AAVY,oCAAY"}
@@ -3,7 +3,10 @@ import { SearchInputDto } from '../../../../usecases/dtos/SearchInputDto';
3
3
  import { TagModel } from '../models/TagModel';
4
4
  import { TagRepository } from '../repositories/TagRepository';
5
5
  export declare class TagService extends CrudService<TagModel, SearchInputDto, TagModel> {
6
+ /** @see TagRepository */
6
7
  repository: TagRepository;
7
8
  protected modelClass: typeof TagModel;
8
- constructor(repository: TagRepository);
9
+ constructor(
10
+ /** @see TagRepository */
11
+ repository: TagRepository);
9
12
  }
@@ -15,7 +15,9 @@ const TagModel_1 = require("../models/TagModel");
15
15
  const TagRepository_1 = require("../repositories/TagRepository");
16
16
  const common_1 = require("@nestjs/common");
17
17
  let TagService = class TagService extends CrudService_1.CrudService {
18
- constructor(repository) {
18
+ constructor(
19
+ /** @see TagRepository */
20
+ repository) {
19
21
  super();
20
22
  this.repository = repository;
21
23
  this.modelClass = TagModel_1.TagModel;
@@ -1 +1 @@
1
- {"version":3,"file":"TagService.js","sourceRoot":"","sources":["../../../../../src/infrastructure/tests/app/services/TagService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAsE;AAEtE,iDAA4C;AAC5C,iEAA4D;AAC5D,2CAA0C;AAGnC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,yBAA+C;IAG3E,YAEW,UAAyB;QAEhC,KAAK,EAAE,CAAC;QAFD,eAAU,GAAV,UAAU,CAAe;QAJ1B,eAAU,GAAG,mBAAQ,CAAC;IAOhC,CAAC;CAEJ,CAAA;AAVY,UAAU;IADtB,IAAA,mBAAU,GAAE;qCAMc,6BAAa;GAL3B,UAAU,CAUtB;AAVY,gCAAU"}
1
+ {"version":3,"file":"TagService.js","sourceRoot":"","sources":["../../../../../src/infrastructure/tests/app/services/TagService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAsE;AAEtE,iDAA4C;AAC5C,iEAA4D;AAC5D,2CAA0C;AAGnC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,yBAA+C;IAG3E;IACI,0BAA0B;IACnB,UAAyB;QAEhC,KAAK,EAAE,CAAC;QAFD,eAAU,GAAV,UAAU,CAAe;QAJ1B,eAAU,GAAG,mBAAQ,CAAC;IAOhC,CAAC;CAEJ,CAAA;AAVY,UAAU;IADtB,IAAA,mBAAU,GAAE;qCAMc,6BAAa;GAL3B,UAAU,CAUtB;AAVY,gCAAU"}
@@ -3,7 +3,10 @@ import { SearchInputDto } from '../../../../usecases/dtos/SearchInputDto';
3
3
  import { UserModel } from '../models/UserModel';
4
4
  import { UserRepository } from '../repositories/UserRepository';
5
5
  export declare class UserService extends CrudService<UserModel, SearchInputDto, UserModel> {
6
+ /** @see UserRepository */
6
7
  repository: UserRepository;
7
8
  protected modelClass: typeof UserModel;
8
- constructor(repository: UserRepository);
9
+ constructor(
10
+ /** @see UserRepository */
11
+ repository: UserRepository);
9
12
  }
@@ -15,7 +15,9 @@ const UserModel_1 = require("../models/UserModel");
15
15
  const UserRepository_1 = require("../repositories/UserRepository");
16
16
  const common_1 = require("@nestjs/common");
17
17
  let UserService = class UserService extends CrudService_1.CrudService {
18
- constructor(repository) {
18
+ constructor(
19
+ /** @see UserRepository */
20
+ repository) {
19
21
  super();
20
22
  this.repository = repository;
21
23
  this.modelClass = UserModel_1.UserModel;
@@ -1 +1 @@
1
- {"version":3,"file":"UserService.js","sourceRoot":"","sources":["../../../../../src/infrastructure/tests/app/services/UserService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAsE;AAEtE,mDAA8C;AAC9C,mEAA8D;AAC9D,2CAA0C;AAGnC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,yBAAiD;IAG9E,YAEW,UAA0B;QAEjC,KAAK,EAAE,CAAC;QAFD,eAAU,GAAV,UAAU,CAAgB;QAJ3B,eAAU,GAAG,qBAAS,CAAC;IAOjC,CAAC;CAEJ,CAAA;AAVY,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAMc,+BAAc;GAL5B,WAAW,CAUvB;AAVY,kCAAW"}
1
+ {"version":3,"file":"UserService.js","sourceRoot":"","sources":["../../../../../src/infrastructure/tests/app/services/UserService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAsE;AAEtE,mDAA8C;AAC9C,mEAA8D;AAC9D,2CAA0C;AAGnC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,yBAAiD;IAG9E;IACI,2BAA2B;IACpB,UAA0B;QAEjC,KAAK,EAAE,CAAC;QAFD,eAAU,GAAV,UAAU,CAAgB;QAJ3B,eAAU,GAAG,qBAAS,CAAC;IAOjC,CAAC;CAEJ,CAAA;AAVY,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAMc,+BAAc;GAL5B,WAAW,CAUvB;AAVY,kCAAW"}
@@ -32,7 +32,7 @@ AppModule = __decorate([
32
32
  entities: [(0, path_1.join)(__dirname, 'app/tables/*Table.ts')],
33
33
  migrationsTableName: 'test_migration',
34
34
  synchronize: true,
35
- logging: ['schema', 'warn', 'error', 'migration'],
35
+ logging: ['schema', 'warn', 'error', 'migration' /*, 'query'/**/],
36
36
  namingStrategy: new DatabaseNamingStrategy_1.DatabaseNamingStrategy(),
37
37
  }),
38
38
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../../src/infrastructure/tests/bootstrap.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAsC;AACtC,uCAAyC;AACzC,2DAAuD;AAEvD,oFAA+E;AAC/E,0DAAqD;AACrD,0DAAqD;AACrD,+BAA0B;AAC1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