@flusys/nestjs-email 9.3.0 → 9.4.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 (2) hide show
  1. package/fesm/184.js +9 -5
  2. package/package.json +3 -3
package/fesm/184.js CHANGED
@@ -963,8 +963,9 @@ class MailgunProvider {
963
963
 
964
964
  },
965
965
  843(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
966
- /* import */ var _nestjs_common__rspack_import_0 = __webpack_require__(157);
967
- /* import */ var _config_email_constants_js__rspack_import_1 = __webpack_require__(966);
966
+ /* import */ var _flusys_nestjs_shared_modules__rspack_import_0 = __webpack_require__(236);
967
+ /* import */ var _nestjs_common__rspack_import_1 = __webpack_require__(157);
968
+ /* import */ var _config_email_constants_js__rspack_import_2 = __webpack_require__(966);
968
969
  function _ts_decorate(decorators, target, key, desc) {
969
970
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
970
971
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
@@ -990,14 +991,17 @@ function _ts_param(paramIndex, decorator) {
990
991
  }
991
992
 
992
993
 
994
+
993
995
  class EmailConfigService {
994
996
  options;
995
997
  constructor(options){
996
998
  this.options = options;
999
+ // Static tenants are known from boot, before any request builds a datasource provider
1000
+ _flusys_nestjs_shared_modules__rspack_import_0.TenantRegistry.register(options?.config?.tenants);
997
1001
  }
998
1002
  // ─── IModuleConfigService Implementation ────────────────────────────────────
999
1003
  isCompanyFeatureEnabled() {
1000
- return this.options.bootstrapAppConfig?.enableCompanyFeature ?? false;
1004
+ return (0,_flusys_nestjs_shared_modules__rspack_import_0.currentTenantConfig)(this.isMultiTenant())?.enableCompanyFeature ?? this.options.bootstrapAppConfig?.enableCompanyFeature ?? false;
1001
1005
  }
1002
1006
  getDatabaseMode() {
1003
1007
  return this.options.bootstrapAppConfig?.databaseMode ?? 'single';
@@ -1014,8 +1018,8 @@ class EmailConfigService {
1014
1018
  }
1015
1019
  }
1016
1020
  EmailConfigService = _ts_decorate([
1017
- (0,_nestjs_common__rspack_import_0.Injectable)(),
1018
- _ts_param(0, (0,_nestjs_common__rspack_import_0.Inject)(_config_email_constants_js__rspack_import_1/* .EMAIL_MODULE_OPTIONS */.F)),
1021
+ (0,_nestjs_common__rspack_import_1.Injectable)(),
1022
+ _ts_param(0, (0,_nestjs_common__rspack_import_1.Inject)(_config_email_constants_js__rspack_import_2/* .EMAIL_MODULE_OPTIONS */.F)),
1019
1023
  _ts_metadata("design:type", Function),
1020
1024
  _ts_metadata("design:paramtypes", [
1021
1025
  typeof EmailModuleOptions === "undefined" ? Object : EmailModuleOptions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flusys/nestjs-email",
3
- "version": "9.3.0",
3
+ "version": "9.4.0",
4
4
  "description": "Modular email package with SMTP, SendGrid, and Mailgun providers",
5
5
  "type": "module",
6
6
  "main": "./fesm/index.js",
@@ -98,7 +98,7 @@
98
98
  }
99
99
  },
100
100
  "dependencies": {
101
- "@flusys/nestjs-core": "9.3.0",
102
- "@flusys/nestjs-shared": "9.3.0"
101
+ "@flusys/nestjs-core": "9.4.0",
102
+ "@flusys/nestjs-shared": "9.4.0"
103
103
  }
104
104
  }