@flusys/nestjs-localization 7.1.0 → 8.0.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.
Files changed (117) hide show
  1. package/config/index.d.ts +3 -3
  2. package/controllers/index.d.ts +3 -3
  3. package/controllers/language.controller.d.ts +4 -4
  4. package/controllers/translation-key.controller.d.ts +3 -3
  5. package/controllers/translation.controller.d.ts +4 -4
  6. package/docs/index.d.ts +1 -1
  7. package/docs/localization-swagger.config.d.ts +1 -1
  8. package/dtos/index.d.ts +3 -3
  9. package/dtos/translation.dto.d.ts +2 -2
  10. package/entities/index.d.ts +6 -6
  11. package/entities/language.entity.d.ts +1 -1
  12. package/entities/translation-key.entity.d.ts +1 -1
  13. package/entities/translation.entity.d.ts +2 -2
  14. package/fesm/349.js +1179 -0
  15. package/fesm/692.js +1205 -0
  16. package/fesm/config/index.js +101 -3
  17. package/fesm/controllers/index.js +15 -3
  18. package/fesm/docs/index.js +126 -1
  19. package/fesm/dtos/index.js +680 -3
  20. package/fesm/entities/index.js +405 -8
  21. package/fesm/index.js +257 -7
  22. package/fesm/interfaces/index.js +18 -4
  23. package/fesm/modules/index.js +152 -1
  24. package/fesm/runtime.js +85 -0
  25. package/fesm/services/index.js +15 -5
  26. package/index.d.ts +7 -7
  27. package/interfaces/index.d.ts +4 -4
  28. package/interfaces/language.interface.d.ts +1 -1
  29. package/interfaces/localization-module-options.interface.d.ts +3 -3
  30. package/interfaces/translation-key.interface.d.ts +1 -1
  31. package/interfaces/translation.interface.d.ts +3 -3
  32. package/modules/index.d.ts +1 -1
  33. package/modules/localization.module.d.ts +2 -2
  34. package/package.json +25 -34
  35. package/services/index.d.ts +5 -5
  36. package/services/language.service.d.ts +6 -6
  37. package/services/localization-config.service.d.ts +3 -3
  38. package/services/localization-datasource.provider.d.ts +3 -3
  39. package/services/translation-key.service.d.ts +6 -6
  40. package/services/translation.service.d.ts +5 -5
  41. package/cjs/config/event-actions.js +0 -33
  42. package/cjs/config/index.js +0 -20
  43. package/cjs/config/localization.constants.js +0 -11
  44. package/cjs/config/message-keys.js +0 -41
  45. package/cjs/controllers/index.js +0 -20
  46. package/cjs/controllers/language.controller.js +0 -188
  47. package/cjs/controllers/language.controller.spec.js +0 -154
  48. package/cjs/controllers/translation-key.controller.js +0 -135
  49. package/cjs/controllers/translation-key.controller.spec.js +0 -70
  50. package/cjs/controllers/translation.controller.js +0 -195
  51. package/cjs/controllers/translation.controller.spec.js +0 -169
  52. package/cjs/docs/index.js +0 -11
  53. package/cjs/docs/localization-swagger.config.js +0 -111
  54. package/cjs/docs/localization-swagger.config.spec.js +0 -30
  55. package/cjs/dtos/index.js +0 -20
  56. package/cjs/dtos/language.dto.js +0 -213
  57. package/cjs/dtos/translation-key.dto.js +0 -215
  58. package/cjs/dtos/translation.dto.js +0 -269
  59. package/cjs/entities/index.js +0 -42
  60. package/cjs/entities/index.spec.js +0 -18
  61. package/cjs/entities/language.entity.js +0 -126
  62. package/cjs/entities/translation-key.entity.js +0 -126
  63. package/cjs/entities/translation.entity.js +0 -120
  64. package/cjs/index.js +0 -24
  65. package/cjs/interfaces/index.js +0 -21
  66. package/cjs/interfaces/language.interface.js +0 -4
  67. package/cjs/interfaces/localization-module-options.interface.js +0 -4
  68. package/cjs/interfaces/translation-key.interface.js +0 -4
  69. package/cjs/interfaces/translation.interface.js +0 -4
  70. package/cjs/modules/index.js +0 -18
  71. package/cjs/modules/localization.module.js +0 -116
  72. package/cjs/modules/localization.module.spec.js +0 -132
  73. package/cjs/services/index.js +0 -22
  74. package/cjs/services/language.service.js +0 -181
  75. package/cjs/services/language.service.spec.js +0 -256
  76. package/cjs/services/localization-config.service.js +0 -66
  77. package/cjs/services/localization-config.service.spec.js +0 -80
  78. package/cjs/services/localization-datasource.provider.js +0 -79
  79. package/cjs/services/localization-datasource.provider.spec.js +0 -85
  80. package/cjs/services/translation-key.service.js +0 -179
  81. package/cjs/services/translation-key.service.spec.js +0 -303
  82. package/cjs/services/translation.service.js +0 -228
  83. package/cjs/services/translation.service.spec.js +0 -530
  84. package/fesm/config/event-actions.js +0 -12
  85. package/fesm/config/localization.constants.js +0 -1
  86. package/fesm/config/message-keys.js +0 -20
  87. package/fesm/controllers/language.controller.js +0 -178
  88. package/fesm/controllers/language.controller.spec.js +0 -150
  89. package/fesm/controllers/translation-key.controller.js +0 -125
  90. package/fesm/controllers/translation-key.controller.spec.js +0 -66
  91. package/fesm/controllers/translation.controller.js +0 -185
  92. package/fesm/controllers/translation.controller.spec.js +0 -165
  93. package/fesm/docs/localization-swagger.config.js +0 -101
  94. package/fesm/docs/localization-swagger.config.spec.js +0 -26
  95. package/fesm/dtos/language.dto.js +0 -192
  96. package/fesm/dtos/translation-key.dto.js +0 -194
  97. package/fesm/dtos/translation.dto.js +0 -239
  98. package/fesm/entities/index.spec.js +0 -14
  99. package/fesm/entities/language.entity.js +0 -116
  100. package/fesm/entities/translation-key.entity.js +0 -116
  101. package/fesm/entities/translation.entity.js +0 -110
  102. package/fesm/interfaces/language.interface.js +0 -1
  103. package/fesm/interfaces/localization-module-options.interface.js +0 -1
  104. package/fesm/interfaces/translation-key.interface.js +0 -1
  105. package/fesm/interfaces/translation.interface.js +0 -1
  106. package/fesm/modules/localization.module.js +0 -106
  107. package/fesm/modules/localization.module.spec.js +0 -128
  108. package/fesm/services/language.service.js +0 -171
  109. package/fesm/services/language.service.spec.js +0 -252
  110. package/fesm/services/localization-config.service.js +0 -56
  111. package/fesm/services/localization-config.service.spec.js +0 -76
  112. package/fesm/services/localization-datasource.provider.js +0 -69
  113. package/fesm/services/localization-datasource.provider.spec.js +0 -81
  114. package/fesm/services/translation-key.service.js +0 -169
  115. package/fesm/services/translation-key.service.spec.js +0 -299
  116. package/fesm/services/translation.service.js +0 -218
  117. package/fesm/services/translation.service.spec.js +0 -526
@@ -1,4 +1,18 @@
1
- export * from './language.interface';
2
- export * from './translation-key.interface';
3
- export * from './translation.interface';
4
- export * from './localization-module-options.interface';
1
+ export const __rspack_esm_id = 471;
2
+ export const __rspack_esm_ids = [471];
3
+ export const __webpack_modules__ = {
4
+ 722() {
5
+
6
+
7
+
8
+
9
+
10
+
11
+ },
12
+
13
+ };
14
+ import { __webpack_require__ } from '../runtime.js';
15
+ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
16
+ import * as __rspack_chunk_1 from './index.js';
17
+ __webpack_require__.C(__rspack_chunk_1);
18
+ var __webpack_exports__ = __webpack_exec__(722);
@@ -1 +1,152 @@
1
- export * from './localization.module';
1
+ export const __rspack_esm_id = 900;
2
+ export const __rspack_esm_ids = [900];
3
+ export const __webpack_modules__ = {
4
+ 818(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
5
+
6
+ // EXPORTS
7
+ __webpack_require__.d(__webpack_exports__, {
8
+ e: () => (/* reexport */ LocalizationModule)
9
+ });
10
+
11
+ // EXTERNAL MODULE: external "@flusys/nestjs-shared/modules"
12
+ var modules_ = __webpack_require__(236);
13
+ // EXTERNAL MODULE: external "@nestjs/common"
14
+ var common_ = __webpack_require__(157);
15
+ // EXTERNAL MODULE: ./projects/nestjs-localization/src/config/localization.constants.ts
16
+ var localization_constants = __webpack_require__(88);
17
+ // EXTERNAL MODULE: ./projects/nestjs-localization/src/controllers/index.ts + 5 modules
18
+ var controllers = __webpack_require__(212);
19
+ // EXTERNAL MODULE: ./projects/nestjs-localization/src/services/index.ts + 6 modules
20
+ var services = __webpack_require__(367);
21
+ ;// CONCATENATED MODULE: ./projects/nestjs-localization/src/modules/localization.module.ts
22
+ function _ts_decorate(decorators, target, key, desc) {
23
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
24
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
25
+ r = Reflect.decorate(decorators, target, key, desc);
26
+ } else {
27
+ for(var i = decorators.length - 1; i >= 0; i--){
28
+ if (d = decorators[i]) {
29
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
+ }
31
+ }
32
+ }
33
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
34
+ }
35
+
36
+
37
+
38
+
39
+
40
+ const CONTROLLERS = [
41
+ controllers/* .LanguageController */.t7,
42
+ controllers/* .TranslationKeyController */.$4,
43
+ controllers/* .TranslationController */.Ap
44
+ ];
45
+ const EXPORTED_SERVICES = [
46
+ services/* .LocalizationConfigService */.lg,
47
+ services/* .LocalizationDataSourceProvider */.ue,
48
+ services/* .LanguageService */.gw,
49
+ services/* .TranslationKeyService */.q3,
50
+ services/* .TranslationService */.L0
51
+ ];
52
+ class LocalizationModule {
53
+ static forRoot(options) {
54
+ return {
55
+ module: LocalizationModule,
56
+ global: options.global ?? false,
57
+ imports: [
58
+ modules_.CacheModule,
59
+ modules_.UtilsModule
60
+ ],
61
+ controllers: options.includeController !== false ? CONTROLLERS : [],
62
+ providers: this.buildProviders(options),
63
+ exports: EXPORTED_SERVICES
64
+ };
65
+ }
66
+ static forRootAsync(options) {
67
+ return {
68
+ module: LocalizationModule,
69
+ global: options.global ?? false,
70
+ imports: [
71
+ ...options.imports || [],
72
+ modules_.CacheModule,
73
+ modules_.UtilsModule
74
+ ],
75
+ controllers: options.includeController !== false ? CONTROLLERS : [],
76
+ providers: [
77
+ ...this.createAsyncProviders(options),
78
+ ...this.buildProviders()
79
+ ],
80
+ exports: EXPORTED_SERVICES
81
+ };
82
+ }
83
+ static buildProviders(options) {
84
+ const providers = [
85
+ ...EXPORTED_SERVICES
86
+ ];
87
+ if (options) {
88
+ providers.unshift({
89
+ provide: localization_constants/* .LOCALIZATION_MODULE_OPTIONS */.A,
90
+ useValue: options
91
+ });
92
+ }
93
+ providers.push((0,modules_.createModuleEventsProvider)('localization', localization_constants/* .LOCALIZATION_MODULE_OPTIONS */.A));
94
+ return providers;
95
+ }
96
+ static createAsyncProviders(options) {
97
+ if (options.useFactory) {
98
+ return [
99
+ {
100
+ provide: localization_constants/* .LOCALIZATION_MODULE_OPTIONS */.A,
101
+ useFactory: async (...args)=>({
102
+ ...options,
103
+ config: await options.useFactory(...args)
104
+ }),
105
+ inject: options.inject || []
106
+ }
107
+ ];
108
+ }
109
+ const factoryClass = options.useClass || options.useExisting;
110
+ if (!factoryClass) return [];
111
+ const providers = [
112
+ {
113
+ provide: localization_constants/* .LOCALIZATION_MODULE_OPTIONS */.A,
114
+ useFactory: async (factory)=>({
115
+ ...options,
116
+ config: await factory.createLocalizationOptions()
117
+ }),
118
+ inject: [
119
+ factoryClass
120
+ ]
121
+ }
122
+ ];
123
+ if (options.useClass) {
124
+ providers.push({
125
+ provide: options.useClass,
126
+ useClass: options.useClass
127
+ });
128
+ }
129
+ return providers;
130
+ }
131
+ }
132
+ LocalizationModule = _ts_decorate([
133
+ (0,common_.Module)({})
134
+ ], LocalizationModule);
135
+
136
+ ;// CONCATENATED MODULE: ./projects/nestjs-localization/src/modules/index.ts
137
+
138
+
139
+
140
+ },
141
+
142
+ };
143
+ import { __webpack_require__ } from '../runtime.js';
144
+ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
145
+ import * as __rspack_chunk_1 from '../692.js';
146
+ __webpack_require__.C(__rspack_chunk_1);
147
+ import * as __rspack_chunk_2 from '../349.js';
148
+ __webpack_require__.C(__rspack_chunk_2);
149
+ import * as __rspack_chunk_3 from './index.js';
150
+ __webpack_require__.C(__rspack_chunk_3);
151
+ var __webpack_exports__ = __webpack_exec__(818);var __webpack_exports__LocalizationModule = __webpack_exports__.e;
152
+ export { __webpack_exports__LocalizationModule as LocalizationModule };
@@ -0,0 +1,85 @@
1
+ var __webpack_modules__ = ({});
2
+ // The module cache
3
+ var __webpack_module_cache__ = {};
4
+
5
+ // The require function
6
+ function __webpack_require__(moduleId) {
7
+
8
+ // Check if module is in cache
9
+ var cachedModule = __webpack_module_cache__[moduleId];
10
+ if (cachedModule !== undefined) {
11
+ return cachedModule.exports;
12
+ }
13
+ // Create a new module (and put it into the cache)
14
+ var module = (__webpack_module_cache__[moduleId] = {
15
+ exports: {}
16
+ });
17
+ // Execute the module function
18
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
19
+
20
+ // Return the exports of the module
21
+ return module.exports;
22
+
23
+ }
24
+
25
+ // expose the modules object (__webpack_modules__)
26
+ __webpack_require__.m = __webpack_modules__;
27
+
28
+ // webpack/runtime/define_property_getters
29
+ (() => {
30
+ __webpack_require__.d = (exports, getters, values) => {
31
+ var define = (defs, kind) => {
32
+ for(var key in defs) {
33
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
34
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
35
+ }
36
+ }
37
+ };
38
+ define(getters, "get");
39
+ define(values, "value");
40
+ };
41
+ })();
42
+ // webpack/runtime/export_webpack_require
43
+ var __webpack_require__temp = __webpack_require__;
44
+ export { __webpack_require__temp as __webpack_require__ };
45
+ // webpack/runtime/has_own_property
46
+ (() => {
47
+ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
48
+ })();
49
+ // webpack/runtime/module_chunk_loading
50
+ (() => {
51
+ // no BaseURI
52
+ // object to store loaded and loading chunks
53
+ // undefined = chunk not loaded, null = chunk preloaded/prefetched
54
+ // [resolve, Promise] = chunk loading, 0 = chunk loaded
55
+ var moduleInstalledChunks = {146: 0,};
56
+ var moduleInstallChunk = (data) => {
57
+ var __rspack_esm_ids = data.__rspack_esm_ids;
58
+ var moreModules = data.__webpack_modules__;
59
+ var __rspack_esm_runtime = data.__rspack_esm_runtime;
60
+ // add "modules" to the modules object,
61
+ // then flag all "ids" as loaded and fire callback
62
+ var moduleId, chunkId, i = 0;
63
+ for (moduleId in moreModules) {
64
+ if (__webpack_require__.o(moreModules, moduleId)) {
65
+ __webpack_require__.m[moduleId] = moreModules[moduleId];
66
+ }
67
+ }
68
+ if (__rspack_esm_runtime) __rspack_esm_runtime(__webpack_require__);
69
+ for (; i < __rspack_esm_ids.length; i++) {
70
+ chunkId = __rspack_esm_ids[i];
71
+ if (__webpack_require__.o(moduleInstalledChunks, chunkId) && moduleInstalledChunks[chunkId]) {
72
+ moduleInstalledChunks[chunkId][0]();
73
+ }
74
+ moduleInstalledChunks[__rspack_esm_ids[i]] = 0;
75
+ }
76
+
77
+ };
78
+ // no chunk on demand loading
79
+
80
+ __webpack_require__.C = moduleInstallChunk;
81
+ // no on chunks loaded
82
+ // no HMR
83
+ // no HMR manifest
84
+
85
+ })();
@@ -1,5 +1,15 @@
1
- export * from './localization-config.service';
2
- export * from './localization-datasource.provider';
3
- export * from './language.service';
4
- export * from './translation-key.service';
5
- export * from './translation.service';
1
+ export const __rspack_esm_id = 995;
2
+ export const __rspack_esm_ids = [995];
3
+ export const __webpack_modules__ = {};
4
+ import { __webpack_require__ } from '../runtime.js';
5
+ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
6
+ import * as __rspack_chunk_1 from '../692.js';
7
+ __webpack_require__.C(__rspack_chunk_1);
8
+ import * as __rspack_chunk_2 from './index.js';
9
+ __webpack_require__.C(__rspack_chunk_2);
10
+ var __webpack_exports__ = __webpack_exec__(367);var __webpack_exports__LanguageService = __webpack_exports__.gw;
11
+ var __webpack_exports__LocalizationConfigService = __webpack_exports__.lg;
12
+ var __webpack_exports__LocalizationDataSourceProvider = __webpack_exports__.ue;
13
+ var __webpack_exports__TranslationKeyService = __webpack_exports__.q3;
14
+ var __webpack_exports__TranslationService = __webpack_exports__.L0;
15
+ export { __webpack_exports__LanguageService as LanguageService, __webpack_exports__LocalizationConfigService as LocalizationConfigService, __webpack_exports__LocalizationDataSourceProvider as LocalizationDataSourceProvider, __webpack_exports__TranslationKeyService as TranslationKeyService, __webpack_exports__TranslationService as TranslationService };
package/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export * from './config';
2
- export * from './controllers';
3
- export * from './dtos';
4
- export * from './entities';
5
- export * from './interfaces';
6
- export * from './modules';
7
- export * from './services';
1
+ export * from './config/index.js';
2
+ export * from './controllers/index.js';
3
+ export * from './dtos/index.js';
4
+ export * from './entities/index.js';
5
+ export * from './interfaces/index.js';
6
+ export * from './modules/index.js';
7
+ export * from './services/index.js';
@@ -1,4 +1,4 @@
1
- export * from './language.interface';
2
- export * from './translation-key.interface';
3
- export * from './translation.interface';
4
- export * from './localization-module-options.interface';
1
+ export * from './language.interface.js';
2
+ export * from './translation-key.interface.js';
3
+ export * from './translation.interface.js';
4
+ export * from './localization-module-options.interface.js';
@@ -1,4 +1,4 @@
1
- import { IIdentity } from '@flusys/nestjs-shared/interfaces';
1
+ import { type IIdentity } from '@flusys/nestjs-shared/interfaces';
2
2
  export interface ILanguage extends IIdentity {
3
3
  code: string;
4
4
  name: string;
@@ -1,6 +1,6 @@
1
- import { IBootstrapAppConfig, IDataSourceServiceOptions, IDynamicModuleConfig } from '@flusys/nestjs-core';
2
- import { IModuleEventsConfig } from '@flusys/nestjs-shared/interfaces';
3
- import { ModuleMetadata, Type } from '@nestjs/common';
1
+ import { type IBootstrapAppConfig, type IDataSourceServiceOptions, type IDynamicModuleConfig } from '@flusys/nestjs-core';
2
+ import { type IModuleEventsConfig } from '@flusys/nestjs-shared/interfaces';
3
+ import { type ModuleMetadata, type Type } from '@nestjs/common';
4
4
  export interface ILocalizationModuleConfig extends IDataSourceServiceOptions {
5
5
  defaultLanguageCode?: string;
6
6
  enableCaching?: boolean;
@@ -1,4 +1,4 @@
1
- import { IIdentity } from '@flusys/nestjs-shared/interfaces';
1
+ import { type IIdentity } from '@flusys/nestjs-shared/interfaces';
2
2
  export interface ITranslationKey extends IIdentity {
3
3
  module: string;
4
4
  key: string;
@@ -1,6 +1,6 @@
1
- import { IIdentity } from '@flusys/nestjs-shared/interfaces';
2
- import { ILanguage } from './language.interface';
3
- import { ITranslationKey } from './translation-key.interface';
1
+ import { type IIdentity } from '@flusys/nestjs-shared/interfaces';
2
+ import { type ILanguage } from './language.interface.js';
3
+ import { type ITranslationKey } from './translation-key.interface.js';
4
4
  export interface ITranslation extends IIdentity {
5
5
  languageId: string;
6
6
  translationKeyId: string;
@@ -1 +1 @@
1
- export * from './localization.module';
1
+ export * from './localization.module.js';
@@ -1,5 +1,5 @@
1
- import { DynamicModule } from '@nestjs/common';
2
- import { LocalizationModuleAsyncOptions, LocalizationModuleOptions } from '../interfaces';
1
+ import { type DynamicModule } from '@nestjs/common';
2
+ import { type LocalizationModuleAsyncOptions, type LocalizationModuleOptions } from '../interfaces/index.js';
3
3
  export declare class LocalizationModule {
4
4
  static forRoot(options: LocalizationModuleOptions): DynamicModule;
5
5
  static forRootAsync(options: LocalizationModuleAsyncOptions): DynamicModule;
package/package.json CHANGED
@@ -1,86 +1,77 @@
1
1
  {
2
2
  "name": "@flusys/nestjs-localization",
3
- "version": "7.1.0",
3
+ "version": "8.0.0",
4
4
  "description": "Localization module for multi-language support",
5
- "main": "cjs/index.js",
6
- "module": "fesm/index.js",
7
- "types": "index.d.ts",
5
+ "type": "module",
6
+ "main": "./fesm/index.js",
7
+ "module": "./fesm/index.js",
8
+ "types": "./index.d.ts",
8
9
  "sideEffects": false,
9
10
  "keywords": [
10
11
  "nestjs",
12
+ "@flusys",
11
13
  "localization",
12
14
  "i18n",
13
15
  "translation",
14
- "multi-language",
15
- "@flusys"
16
+ "multi-language"
16
17
  ],
17
18
  "license": "UNLICENSED",
18
19
  "exports": {
19
20
  ".": {
20
21
  "types": "./index.d.ts",
21
- "import": "./fesm/index.js",
22
- "require": "./cjs/index.js"
22
+ "import": "./fesm/index.js"
23
23
  },
24
24
  "./config": {
25
25
  "types": "./config/index.d.ts",
26
- "import": "./fesm/config/index.js",
27
- "require": "./cjs/config/index.js"
26
+ "import": "./fesm/config/index.js"
28
27
  },
29
28
  "./controllers": {
30
29
  "types": "./controllers/index.d.ts",
31
- "import": "./fesm/controllers/index.js",
32
- "require": "./cjs/controllers/index.js"
30
+ "import": "./fesm/controllers/index.js"
33
31
  },
34
32
  "./docs": {
35
33
  "types": "./docs/index.d.ts",
36
- "import": "./fesm/docs/index.js",
37
- "require": "./cjs/docs/index.js"
34
+ "import": "./fesm/docs/index.js"
38
35
  },
39
36
  "./dtos": {
40
37
  "types": "./dtos/index.d.ts",
41
- "import": "./fesm/dtos/index.js",
42
- "require": "./cjs/dtos/index.js"
38
+ "import": "./fesm/dtos/index.js"
43
39
  },
44
40
  "./entities": {
45
41
  "types": "./entities/index.d.ts",
46
- "import": "./fesm/entities/index.js",
47
- "require": "./cjs/entities/index.js"
42
+ "import": "./fesm/entities/index.js"
48
43
  },
49
44
  "./interfaces": {
50
45
  "types": "./interfaces/index.d.ts",
51
- "import": "./fesm/interfaces/index.js",
52
- "require": "./cjs/interfaces/index.js"
46
+ "import": "./fesm/interfaces/index.js"
53
47
  },
54
48
  "./modules": {
55
49
  "types": "./modules/index.d.ts",
56
- "import": "./fesm/modules/index.js",
57
- "require": "./cjs/modules/index.js"
50
+ "import": "./fesm/modules/index.js"
58
51
  },
59
52
  "./services": {
60
53
  "types": "./services/index.d.ts",
61
- "import": "./fesm/services/index.js",
62
- "require": "./cjs/services/index.js"
54
+ "import": "./fesm/services/index.js"
63
55
  },
64
56
  "./*": {
65
57
  "types": "./*.d.ts",
66
- "import": "./*.js",
67
- "require": "./*.js"
58
+ "import": "./fesm/*.js"
68
59
  }
69
60
  },
70
61
  "peerDependencies": {
71
- "@nestjs/common": "^11.0.0",
72
- "@nestjs/config": "^4.0.0",
73
- "@nestjs/core": "^11.0.0",
74
- "@nestjs/platform-express": "^11.0.0",
75
- "@nestjs/swagger": "^11.0.0",
76
- "@nestjs/typeorm": "^11.0.0",
62
+ "@nestjs/common": "^12.0.0",
63
+ "@nestjs/config": "^12.0.0",
64
+ "@nestjs/core": "^12.0.0",
65
+ "@nestjs/platform-express": "^12.0.0",
66
+ "@nestjs/swagger": "^12.0.0",
67
+ "@nestjs/typeorm": "^12.0.0",
77
68
  "class-transformer": "^0.5.1",
78
69
  "class-validator": "^0.15.0",
79
70
  "typeorm": "^0.3.0",
80
71
  "express": "^5.0.0"
81
72
  },
82
73
  "dependencies": {
83
- "@flusys/nestjs-core": "7.1.0",
84
- "@flusys/nestjs-shared": "7.1.0"
74
+ "@flusys/nestjs-core": "8.0.0",
75
+ "@flusys/nestjs-shared": "8.0.0"
85
76
  }
86
77
  }
@@ -1,5 +1,5 @@
1
- export * from './localization-config.service';
2
- export * from './localization-datasource.provider';
3
- export * from './language.service';
4
- export * from './translation-key.service';
5
- export * from './translation.service';
1
+ export * from './localization-config.service.js';
2
+ export * from './localization-datasource.provider.js';
3
+ export * from './language.service.js';
4
+ export * from './translation-key.service.js';
5
+ export * from './translation.service.js';
@@ -1,12 +1,12 @@
1
1
  import { HybridCache, ApiService } from '@flusys/nestjs-shared/classes';
2
2
  import { DeleteDto } from '@flusys/nestjs-shared/dtos';
3
- import { ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
3
+ import { type ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
4
4
  import { UtilsService } from '@flusys/nestjs-shared/modules';
5
- import { QueryRunner } from 'typeorm';
6
- import { CreateLanguageDto, UpdateLanguageDto } from '../dtos';
7
- import { Language } from '../entities';
8
- import { ILanguage } from '../interfaces';
9
- import { LocalizationDataSourceProvider } from './localization-datasource.provider';
5
+ import { type QueryRunner } from 'typeorm';
6
+ import { CreateLanguageDto, UpdateLanguageDto } from '../dtos/index.js';
7
+ import { Language } from '../entities/index.js';
8
+ import { type ILanguage } from '../interfaces/index.js';
9
+ import { LocalizationDataSourceProvider } from './localization-datasource.provider.js';
10
10
  export declare class LanguageService extends ApiService<CreateLanguageDto, UpdateLanguageDto, ILanguage, Language> {
11
11
  protected cacheManager: HybridCache;
12
12
  protected utilsService: UtilsService;
@@ -1,6 +1,6 @@
1
- import { DatabaseMode } from '@flusys/nestjs-core';
2
- import { IModuleConfigService } from '@flusys/nestjs-shared/interfaces';
3
- import { LocalizationModuleOptions } from '../interfaces';
1
+ import { type DatabaseMode } from '@flusys/nestjs-core';
2
+ import { type IModuleConfigService } from '@flusys/nestjs-shared/interfaces';
3
+ import { type LocalizationModuleOptions } from '../interfaces/index.js';
4
4
  export declare class LocalizationConfigService implements IModuleConfigService {
5
5
  private readonly options;
6
6
  constructor(options: LocalizationModuleOptions);
@@ -1,8 +1,8 @@
1
1
  import { MultiTenantDataSourceService } from '@flusys/nestjs-shared/modules';
2
- import { IDatabaseConfig, ITenantDatabaseConfig } from '@flusys/nestjs-core';
3
- import { Request } from 'express';
2
+ import { type IDatabaseConfig, type ITenantDatabaseConfig } from '@flusys/nestjs-core';
3
+ import { type Request } from 'express';
4
4
  import { DataSource } from 'typeorm';
5
- import { LocalizationConfigService } from './localization-config.service';
5
+ import { LocalizationConfigService } from './localization-config.service.js';
6
6
  export declare class LocalizationDataSourceProvider extends MultiTenantDataSourceService {
7
7
  protected static readonly tenantConnections: Map<string, DataSource>;
8
8
  protected static singleDataSource: DataSource | null;
@@ -1,12 +1,12 @@
1
1
  import { HybridCache, ApiService } from '@flusys/nestjs-shared/classes';
2
2
  import { DeleteDto } from '@flusys/nestjs-shared/dtos';
3
- import { ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
3
+ import { type ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
4
4
  import { UtilsService } from '@flusys/nestjs-shared/modules';
5
- import { QueryRunner } from 'typeorm';
6
- import { CreateTranslationKeyDto, UpdateTranslationKeyDto } from '../dtos';
7
- import { TranslationKey } from '../entities';
8
- import { ITranslationKey } from '../interfaces';
9
- import { LocalizationDataSourceProvider } from './localization-datasource.provider';
5
+ import { type QueryRunner } from 'typeorm';
6
+ import { CreateTranslationKeyDto, UpdateTranslationKeyDto } from '../dtos/index.js';
7
+ import { TranslationKey } from '../entities/index.js';
8
+ import { type ITranslationKey } from '../interfaces/index.js';
9
+ import { LocalizationDataSourceProvider } from './localization-datasource.provider.js';
10
10
  export declare class TranslationKeyService extends ApiService<CreateTranslationKeyDto, UpdateTranslationKeyDto, ITranslationKey, TranslationKey> {
11
11
  protected cacheManager: HybridCache;
12
12
  protected utilsService: UtilsService;
@@ -1,11 +1,11 @@
1
1
  import { HybridCache, ApiService } from '@flusys/nestjs-shared/classes';
2
- import { ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
2
+ import { type ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
3
3
  import { UtilsService } from '@flusys/nestjs-shared/modules';
4
4
  import { SelectQueryBuilder } from 'typeorm';
5
- import { BulkUpdateTranslationDto, CreateTranslationDto, UpdateTranslationDto } from '../dtos';
6
- import { Translation, TranslationKey } from '../entities';
7
- import { ITranslation, ITranslationsMap } from '../interfaces';
8
- import { LocalizationDataSourceProvider } from './localization-datasource.provider';
5
+ import { BulkUpdateTranslationDto, CreateTranslationDto, UpdateTranslationDto } from '../dtos/index.js';
6
+ import { Translation, TranslationKey } from '../entities/index.js';
7
+ import { type ITranslation, type ITranslationsMap } from '../interfaces/index.js';
8
+ import { LocalizationDataSourceProvider } from './localization-datasource.provider.js';
9
9
  export declare class TranslationService extends ApiService<CreateTranslationDto, UpdateTranslationDto, ITranslation, Translation> {
10
10
  protected cacheManager: HybridCache;
11
11
  protected utilsService: UtilsService;
@@ -1,33 +0,0 @@
1
- /**
2
- * Domain event actions published by the localization module, alongside the CRUD
3
- * lifecycle actions every ApiService emits.
4
- */ "use strict";
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- function _export(target, all) {
9
- for(var name in all)Object.defineProperty(target, name, {
10
- enumerable: true,
11
- get: Object.getOwnPropertyDescriptor(all, name).get
12
- });
13
- }
14
- _export(exports, {
15
- get LOCALIZATION_EVENT_ACTIONS () {
16
- return LOCALIZATION_EVENT_ACTIONS;
17
- },
18
- get LOCALIZATION_EVENT_ENTITIES () {
19
- return LOCALIZATION_EVENT_ENTITIES;
20
- },
21
- get LOCALIZATION_EVENT_MODULE () {
22
- return LOCALIZATION_EVENT_MODULE;
23
- }
24
- });
25
- const LOCALIZATION_EVENT_ACTIONS = {
26
- BULK_UPDATED: 'bulk-updated'
27
- };
28
- const LOCALIZATION_EVENT_ENTITIES = {
29
- LANGUAGE: 'language',
30
- TRANSLATION_KEY: 'translationKey',
31
- TRANSLATION: 'translation'
32
- };
33
- const LOCALIZATION_EVENT_MODULE = 'localization';
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- _export_star(require("./event-actions"), exports);
6
- _export_star(require("./localization.constants"), exports);
7
- _export_star(require("./message-keys"), exports);
8
- function _export_star(from, to) {
9
- Object.keys(from).forEach(function(k) {
10
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
11
- Object.defineProperty(to, k, {
12
- enumerable: true,
13
- get: function() {
14
- return from[k];
15
- }
16
- });
17
- }
18
- });
19
- return from;
20
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "LOCALIZATION_MODULE_OPTIONS", {
6
- enumerable: true,
7
- get: function() {
8
- return LOCALIZATION_MODULE_OPTIONS;
9
- }
10
- });
11
- const LOCALIZATION_MODULE_OPTIONS = 'LOCALIZATION_MODULE_OPTIONS';