vona-cli-set-api 1.0.360 → 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.
- package/cli/templates/create/project/basic/boilerplate/.vscode/vona.code-snippets +12 -0
- package/cli/templates/create/project/basic/boilerplate/env/.env +13 -1
- package/cli/templates/create/project/basic/boilerplate/env/.env.dev +3 -0
- package/cli/templates/create/project/basic/boilerplate/env/.env.test +3 -0
- package/cli/templates/create/project/basic/boilerplate/package.original.json +1 -1
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.ts +28 -5
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-index/package.json +1 -1
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-index/src/bean/meta.printTip.ts +1 -1
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/package.json +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
@@ -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
|
-
//
|
|
157
|
-
config.modules = {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
}
|