vasuzex 2.1.28 → 2.1.30

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.
@@ -31,11 +31,11 @@ export class MailManager {
31
31
  /**
32
32
  * Get mailer instance
33
33
  */
34
- mailer(name = null) {
34
+ async mailer(name = null) {
35
35
  name = name || this.getDefaultDriver();
36
36
 
37
37
  if (!this.mailers[name]) {
38
- this.mailers[name] = this.resolve(name);
38
+ this.mailers[name] = await this.resolve(name);
39
39
  }
40
40
 
41
41
  return this.mailers[name];
@@ -45,7 +45,7 @@ export class MailManager {
45
45
  * Resolve mailer
46
46
  * @private
47
47
  */
48
- resolve(name) {
48
+ async resolve(name) {
49
49
  const config = this.getConfig(name);
50
50
 
51
51
  if (!config || !config.transport) {
@@ -55,13 +55,13 @@ export class MailManager {
55
55
  const transport = config.transport;
56
56
 
57
57
  if (this.customCreators[transport]) {
58
- return this.customCreators[transport](this.app, config);
58
+ return await this.customCreators[transport](this.app, config);
59
59
  }
60
60
 
61
61
  const method = `create${this.capitalize(transport)}Transport`;
62
62
 
63
63
  if (typeof this[method] === 'function') {
64
- return this[method](config);
64
+ return await this[method](config);
65
65
  }
66
66
 
67
67
  throw new Error(`Mail transport [${transport}] is not supported.`);
@@ -135,7 +135,7 @@ export class MailManager {
135
135
  * Send mail (proxy to default mailer)
136
136
  */
137
137
  async send(options) {
138
- const mailer = this.mailer();
138
+ const mailer = await this.mailer();
139
139
  return await mailer.sendMail(options);
140
140
  }
141
141
  }
@@ -62,7 +62,9 @@ export function AppConfigProvider({
62
62
  errorComponent,
63
63
  showLoadingScreen = true,
64
64
  showErrorScreen = true,
65
- cacheDuration
65
+ cacheDuration,
66
+ versionCheck = false,
67
+ versionUrl
66
68
  }) {
67
69
  const [config, setConfig] = useState(defaultConfig);
68
70
  const [loading, setLoading] = useState(true);
@@ -108,6 +110,8 @@ export function AppConfigProvider({
108
110
  forceRefresh,
109
111
  cacheDuration,
110
112
  configUrl,
113
+ versionCheck,
114
+ versionUrl,
111
115
  });
112
116
 
113
117
  setConfig(fetchedConfig);
@@ -119,7 +123,7 @@ export function AppConfigProvider({
119
123
  } finally {
120
124
  setLoading(false);
121
125
  }
122
- }, [getApiBaseUrl, cacheDuration, configUrl]); // Removed defaultConfig from deps
126
+ }, [getApiBaseUrl, cacheDuration, configUrl, versionCheck, versionUrl]); // Removed defaultConfig from deps
123
127
 
124
128
  // Load config only once on mount
125
129
  useEffect(() => {
@@ -255,6 +259,8 @@ AppConfigProvider.propTypes = {
255
259
  showLoadingScreen: PropTypes.bool,
256
260
  showErrorScreen: PropTypes.bool,
257
261
  cacheDuration: PropTypes.number,
262
+ versionCheck: PropTypes.bool,
263
+ versionUrl: PropTypes.string,
258
264
  };
259
265
 
260
266
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vasuzex",
3
- "version": "2.1.28",
3
+ "version": "2.1.30",
4
4
  "description": "Laravel-inspired framework for Node.js monorepos - V2 with optimized dependencies",
5
5
  "type": "module",
6
6
  "main": "./framework/index.js",