@flusys/nestjs-localization 7.0.0 → 7.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.
@@ -17,6 +17,9 @@ _export(exports, {
17
17
  },
18
18
  get LOCALIZATION_EVENT_ENTITIES () {
19
19
  return LOCALIZATION_EVENT_ENTITIES;
20
+ },
21
+ get LOCALIZATION_EVENT_MODULE () {
22
+ return LOCALIZATION_EVENT_MODULE;
20
23
  }
21
24
  });
22
25
  const LOCALIZATION_EVENT_ACTIONS = {
@@ -27,3 +30,4 @@ const LOCALIZATION_EVENT_ENTITIES = {
27
30
  TRANSLATION_KEY: 'translationKey',
28
31
  TRANSLATION: 'translation'
29
32
  };
33
+ const LOCALIZATION_EVENT_MODULE = 'localization';
@@ -162,7 +162,7 @@ let LanguageService = class LanguageService extends _classes.ApiService {
162
162
  return language;
163
163
  }
164
164
  constructor(cacheManager, utilsService, dataSourceProvider){
165
- super('language', cacheManager, utilsService, LanguageService.name, true, 'localization', _entities.Language, dataSourceProvider), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService;
165
+ super(_config.LOCALIZATION_EVENT_ENTITIES.LANGUAGE, cacheManager, utilsService, LanguageService.name, true, _config.LOCALIZATION_EVENT_MODULE, dataSourceProvider, _entities.Language), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService;
166
166
  }
167
167
  };
168
168
  LanguageService = _ts_decorate([
@@ -160,7 +160,7 @@ let TranslationKeyService = class TranslationKeyService extends _classes.ApiServ
160
160
  }
161
161
  }
162
162
  constructor(cacheManager, utilsService, dataSourceProvider){
163
- super('translationKey', cacheManager, utilsService, TranslationKeyService.name, true, 'localization', _entities.TranslationKey, dataSourceProvider), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService;
163
+ super(_config.LOCALIZATION_EVENT_ENTITIES.TRANSLATION_KEY, cacheManager, utilsService, TranslationKeyService.name, true, _config.LOCALIZATION_EVENT_MODULE, dataSourceProvider, _entities.TranslationKey), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService;
164
164
  }
165
165
  };
166
166
  TranslationKeyService = _ts_decorate([
@@ -209,7 +209,7 @@ let TranslationService = class TranslationService extends _classes.ApiService {
209
209
  return result;
210
210
  }
211
211
  constructor(cacheManager, utilsService, dataSourceProvider){
212
- super('translation', cacheManager, utilsService, TranslationService.name, true, 'localization', _entities.Translation, dataSourceProvider), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), _define_property(this, "dataSourceProvider", void 0), _define_property(this, "languageRepo", void 0), _define_property(this, "translationKeyRepo", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService, this.dataSourceProvider = dataSourceProvider, this.languageRepo = null, this.translationKeyRepo = null;
212
+ super(_config.LOCALIZATION_EVENT_ENTITIES.TRANSLATION, cacheManager, utilsService, TranslationService.name, true, _config.LOCALIZATION_EVENT_MODULE, dataSourceProvider, _entities.Translation), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), _define_property(this, "dataSourceProvider", void 0), _define_property(this, "languageRepo", void 0), _define_property(this, "translationKeyRepo", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService, this.dataSourceProvider = dataSourceProvider, this.languageRepo = null, this.translationKeyRepo = null;
213
213
  }
214
214
  };
215
215
  TranslationService = _ts_decorate([
@@ -6,3 +6,4 @@ export declare const LOCALIZATION_EVENT_ENTITIES: {
6
6
  readonly TRANSLATION_KEY: "translationKey";
7
7
  readonly TRANSLATION: "translation";
8
8
  };
9
+ export declare const LOCALIZATION_EVENT_MODULE = "localization";
@@ -9,3 +9,4 @@
9
9
  TRANSLATION_KEY: 'translationKey',
10
10
  TRANSLATION: 'translation'
11
11
  };
12
+ export const LOCALIZATION_EVENT_MODULE = 'localization';
@@ -29,7 +29,7 @@ import { HybridCache, ApiService } from '@flusys/nestjs-shared/classes';
29
29
  import { UtilsService } from '@flusys/nestjs-shared/modules';
30
30
  import { ForbiddenException, Inject, Injectable, Scope } from '@nestjs/common';
31
31
  import { In, IsNull } from 'typeorm';
32
- import { LANGUAGE_MESSAGES } from '../config';
32
+ import { LANGUAGE_MESSAGES, LOCALIZATION_EVENT_ENTITIES, LOCALIZATION_EVENT_MODULE } from '../config';
33
33
  import { Language } from '../entities';
34
34
  import { LocalizationDataSourceProvider } from './localization-datasource.provider';
35
35
  export class LanguageService extends ApiService {
@@ -152,7 +152,7 @@ export class LanguageService extends ApiService {
152
152
  return language;
153
153
  }
154
154
  constructor(cacheManager, utilsService, dataSourceProvider){
155
- super('language', cacheManager, utilsService, LanguageService.name, true, 'localization', Language, dataSourceProvider), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService;
155
+ super(LOCALIZATION_EVENT_ENTITIES.LANGUAGE, cacheManager, utilsService, LanguageService.name, true, LOCALIZATION_EVENT_MODULE, dataSourceProvider, Language), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService;
156
156
  }
157
157
  }
158
158
  LanguageService = _ts_decorate([
@@ -29,7 +29,7 @@ import { HybridCache, ApiService } from '@flusys/nestjs-shared/classes';
29
29
  import { UtilsService } from '@flusys/nestjs-shared/modules';
30
30
  import { BadRequestException, ForbiddenException, Inject, Injectable, Scope } from '@nestjs/common';
31
31
  import { In, IsNull } from 'typeorm';
32
- import { TRANSLATION_KEY_MESSAGES } from '../config';
32
+ import { LOCALIZATION_EVENT_ENTITIES, LOCALIZATION_EVENT_MODULE, TRANSLATION_KEY_MESSAGES } from '../config';
33
33
  import { TranslationKey } from '../entities';
34
34
  import { LocalizationDataSourceProvider } from './localization-datasource.provider';
35
35
  export class TranslationKeyService extends ApiService {
@@ -150,7 +150,7 @@ export class TranslationKeyService extends ApiService {
150
150
  }
151
151
  }
152
152
  constructor(cacheManager, utilsService, dataSourceProvider){
153
- super('translationKey', cacheManager, utilsService, TranslationKeyService.name, true, 'localization', TranslationKey, dataSourceProvider), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService;
153
+ super(LOCALIZATION_EVENT_ENTITIES.TRANSLATION_KEY, cacheManager, utilsService, TranslationKeyService.name, true, LOCALIZATION_EVENT_MODULE, dataSourceProvider, TranslationKey), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService;
154
154
  }
155
155
  }
156
156
  TranslationKeyService = _ts_decorate([
@@ -29,7 +29,7 @@ import { HybridCache, ApiService } from '@flusys/nestjs-shared/classes';
29
29
  import { UtilsService } from '@flusys/nestjs-shared/modules';
30
30
  import { Inject, Injectable, Scope } from '@nestjs/common';
31
31
  import { In, IsNull } from 'typeorm';
32
- import { LOCALIZATION_EVENT_ACTIONS } from '../config';
32
+ import { LOCALIZATION_EVENT_ACTIONS, LOCALIZATION_EVENT_ENTITIES, LOCALIZATION_EVENT_MODULE } from '../config';
33
33
  import { Language, Translation, TranslationKey } from '../entities';
34
34
  import { LocalizationDataSourceProvider } from './localization-datasource.provider';
35
35
  export class TranslationService extends ApiService {
@@ -199,7 +199,7 @@ export class TranslationService extends ApiService {
199
199
  return result;
200
200
  }
201
201
  constructor(cacheManager, utilsService, dataSourceProvider){
202
- super('translation', cacheManager, utilsService, TranslationService.name, true, 'localization', Translation, dataSourceProvider), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), _define_property(this, "dataSourceProvider", void 0), _define_property(this, "languageRepo", void 0), _define_property(this, "translationKeyRepo", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService, this.dataSourceProvider = dataSourceProvider, this.languageRepo = null, this.translationKeyRepo = null;
202
+ super(LOCALIZATION_EVENT_ENTITIES.TRANSLATION, cacheManager, utilsService, TranslationService.name, true, LOCALIZATION_EVENT_MODULE, dataSourceProvider, Translation), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), _define_property(this, "dataSourceProvider", void 0), _define_property(this, "languageRepo", void 0), _define_property(this, "translationKeyRepo", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService, this.dataSourceProvider = dataSourceProvider, this.languageRepo = null, this.translationKeyRepo = null;
203
203
  }
204
204
  }
205
205
  TranslationService = _ts_decorate([
@@ -1,4 +1,4 @@
1
- import { IBootstrapAppConfig, IDataSourceServiceOptions, IDynamicModuleConfig, IModuleOptionsFactory } from '@flusys/nestjs-core';
1
+ import { IBootstrapAppConfig, IDataSourceServiceOptions, IDynamicModuleConfig } from '@flusys/nestjs-core';
2
2
  import { IModuleEventsConfig } from '@flusys/nestjs-shared/interfaces';
3
3
  import { ModuleMetadata, Type } from '@nestjs/common';
4
4
  export interface ILocalizationModuleConfig extends IDataSourceServiceOptions {
@@ -11,7 +11,7 @@ export interface LocalizationModuleOptions extends IDynamicModuleConfig {
11
11
  bootstrapAppConfig?: IBootstrapAppConfig;
12
12
  config?: ILocalizationModuleConfig;
13
13
  }
14
- export interface LocalizationOptionsFactory extends IModuleOptionsFactory<ILocalizationModuleConfig> {
14
+ export interface LocalizationOptionsFactory {
15
15
  createLocalizationOptions(): Promise<ILocalizationModuleConfig> | ILocalizationModuleConfig;
16
16
  }
17
17
  export interface LocalizationModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'>, IDynamicModuleConfig {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flusys/nestjs-localization",
3
- "version": "7.0.0",
3
+ "version": "7.0.2",
4
4
  "description": "Localization module for multi-language support",
5
5
  "main": "cjs/index.js",
6
6
  "module": "fesm/index.js",
@@ -80,7 +80,7 @@
80
80
  "express": "^5.0.0"
81
81
  },
82
82
  "dependencies": {
83
- "@flusys/nestjs-core": "7.0.0",
84
- "@flusys/nestjs-shared": "7.0.0"
83
+ "@flusys/nestjs-core": "7.0.2",
84
+ "@flusys/nestjs-shared": "7.0.2"
85
85
  }
86
86
  }