vona-cli-set-api 1.0.362 → 1.0.364

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.
@@ -297,6 +297,18 @@
297
297
  ],
298
298
  "description": "record.locale"
299
299
  },
300
+ "record.mailclient": {
301
+ "scope": "typescript,typescriptreact",
302
+ "prefix": "recordmailclient",
303
+ "body": [
304
+ "declare module 'vona-module-a-mail' {",
305
+ " export interface IMailClientRecord {",
306
+ " $0: never;",
307
+ " }",
308
+ "}"
309
+ ],
310
+ "description": "record.mailclient"
311
+ },
300
312
  "findManyQueryTransform": {
301
313
  "scope": "typescript,typescriptreact",
302
314
  "prefix": "findmanyquerytransform",
@@ -70,4 +70,16 @@ DATABASE_CLIENT_MYSQL_DATABASE = mysql
70
70
  REDIS_DEFAULT_HOST = 127.0.0.1
71
71
  REDIS_DEFAULT_PORT = 6379
72
72
  REDIS_DEFAULT_PASSWORD =
73
- REDIS_DEFAULT_DB = 0
73
+ REDIS_DEFAULT_DB = 0
74
+
75
+ # mail
76
+
77
+ MAIL_DEFAULT_CLIENT = 'system'
78
+
79
+ MAIL_SYSTEM_TRANSPORT_SERVICE =
80
+ MAIL_SYSTEM_TRANSPORT_HOST =
81
+ MAIL_SYSTEM_TRANSPORT_PORT =
82
+ MAIL_SYSTEM_TRANSPORT_SECURE = false
83
+ MAIL_SYSTEM_TRANSPORT_AUTH_USER =
84
+ MAIL_SYSTEM_TRANSPORT_AUTH_PASS =
85
+ MAIL_SYSTEM_DEFAULTS_FROM = no.reply@cabloy.com
@@ -0,0 +1,3 @@
1
+ # mail
2
+
3
+ MAIL_SYSTEM_TRANSPORT_SERVICE = test
@@ -0,0 +1,3 @@
1
+ # mail
2
+
3
+ MAIL_SYSTEM_TRANSPORT_SERVICE = test
@@ -46,7 +46,7 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "vona": "^5.0.208"
49
+ "vona": "^5.0.209"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@cabloy/lint": "^5.0.16",
@@ -1,4 +1,5 @@
1
1
  import type { ILoggerOptionsClientInfo, VonaAppInfo, VonaApplication, VonaConfigEnv, VonaConfigOptional } from 'vona';
2
+ import type { IMailClientRecord } from 'vona-module-a-mail';
2
3
  import type { IDatabaseClientRecord } from 'vona-module-a-orm';
3
4
  import type * as Winston from 'winston';
4
5
  import { replaceTemplate } from '@cabloy/utils';
@@ -20,6 +21,12 @@ declare module 'vona-module-a-orm' {
20
21
  export default function (appInfo: VonaAppInfo, env: VonaConfigEnv) {
21
22
  const config = {} as VonaConfigOptional;
22
23
 
24
+ // modules
25
+ config.modules = {};
26
+
27
+ // onions
28
+ config.onions = {};
29
+
23
30
  // meta
24
31
  config.meta = {
25
32
  flavor: appInfo.configMeta.flavor,
@@ -153,11 +160,27 @@ export default function (appInfo: VonaAppInfo, env: VonaConfigEnv) {
153
160
  ...config.database.clients![env.DATABASE_DEFAULT_CLIENT as keyof IDatabaseClientRecord],
154
161
  };
155
162
 
156
- // modules
157
- config.modules = {};
158
-
159
- // onions
160
- config.onions = {};
163
+ // mail
164
+ config.modules['a-mail'] = {
165
+ defaultClient: env.MAIL_DEFAULT_CLIENT as keyof IMailClientRecord,
166
+ clients: {
167
+ system: {
168
+ transport: {
169
+ service: env.MAIL_SYSTEM_TRANSPORT_SERVICE || undefined,
170
+ host: env.MAIL_SYSTEM_TRANSPORT_HOST || undefined,
171
+ port: env.MAIL_SYSTEM_TRANSPORT_PORT ? Number.parseInt(env.MAIL_SYSTEM_TRANSPORT_PORT) : undefined,
172
+ secure: env.MAIL_SYSTEM_TRANSPORT_SECURE === 'true',
173
+ auth: {
174
+ user: env.MAIL_SYSTEM_TRANSPORT_AUTH_USER || undefined,
175
+ pass: env.MAIL_SYSTEM_TRANSPORT_AUTH_PASS || undefined,
176
+ },
177
+ },
178
+ defaults: {
179
+ from: env.MAIL_SYSTEM_DEFAULTS_FROM || undefined,
180
+ },
181
+ },
182
+ },
183
+ };
161
184
 
162
185
  return config;
163
186
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-cli-set-api",
3
3
  "type": "module",
4
- "version": "1.0.362",
4
+ "version": "1.0.364",
5
5
  "description": "vona cli-set-api",
6
6
  "publishConfig": {
7
7
  "access": "public"