@solidstarters/solid-core 1.2.99 → 1.2.101

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidstarters/solid-core",
3
- "version": "1.2.99",
3
+ "version": "1.2.101",
4
4
  "description": "This module is a NestJS module containing all the required core providers required by a Solid application",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -149,7 +149,8 @@ export class SolidRegistry {
149
149
  }
150
150
 
151
151
  getCommonEntityKeys(): (keyof CommonEntity) [] {
152
- return Reflect.getMetadataKeys(CommonEntity.prototype) as (keyof CommonEntity)[];
152
+ return [ 'id', 'createdAt', 'updatedAt', 'deletedAt', 'createdBy', 'updatedBy', 'deletedTracker', 'localeName', 'defaultEntityLocaleId', 'publishedAt'];
153
+ // return Reflect.getMetadataKeys(CommonEntity.prototype) as (keyof CommonEntity)[];
153
154
  }
154
155
 
155
156
  }
@@ -36,6 +36,7 @@ import { CreateSecurityRuleDto } from 'src/dtos/create-security-rule.dto';
36
36
  import { SecurityRuleRepository } from 'src/repository/security-rule.repository';
37
37
  import { ListOfValuesService } from 'src/services/list-of-values.service';
38
38
  import { CreateListOfValuesDto } from 'src/dtos/create-list-of-values.dto';
39
+ import { SystemFieldsSeederService } from './system-fields-seeder.service';
39
40
 
40
41
  @Injectable()
41
42
  export class ModuleMetadataSeederService {
@@ -68,6 +69,7 @@ export class ModuleMetadataSeederService {
68
69
  @InjectRepository(Setting, 'default')
69
70
  readonly settingsRepo: Repository<Setting>,
70
71
  readonly securityRuleRepo: SecurityRuleRepository,
72
+ readonly systemFieldsSeederService: SystemFieldsSeederService
71
73
  ) { }
72
74
 
73
75
  async seed() {
@@ -83,6 +85,10 @@ export class ModuleMetadataSeederService {
83
85
  this.logger.log(`Seeding media storage providers`);
84
86
  await this.mediaStorageProviderSeederService.seed();
85
87
 
88
+ // Seed any missing system fields metadata for all models.
89
+ this.logger.log(`Seeding system fields metadata`);
90
+ await this.systemFieldsSeederService.seed();
91
+
86
92
  // Read the module metadata from a file specified in the .env
87
93
  // Add the core json file as the first entry in the above array.
88
94
  // Please note the sequence of core files is important below...
@@ -29,7 +29,7 @@ export class CreatedByUpdatedBySubscriber implements EntitySubscriberInterface {
29
29
  return;
30
30
  }
31
31
  // Get the current active user details from the request context
32
- const activeUserOrUndefined = this.requestContextService.getActiveUser;
32
+ const activeUserOrUndefined = this.requestContextService.getActiveUser();
33
33
  if (!activeUserOrUndefined) {
34
34
  return;
35
35
  }