vona-cli-set-api 1.0.368 → 1.0.371
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/package.original.json +1 -1
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.dev.play.ts +8 -4
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.dev.ts +8 -6
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.prod.ts +6 -4
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.test.ts +8 -6
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.ts +11 -3
- package/dist/lib/bean/cli.bin.play.js +2 -2
- package/package.json +2 -2
package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.dev.play.ts
CHANGED
|
@@ -3,10 +3,14 @@ import type { VonaAppInfo, VonaConfigOptional } from 'vona';
|
|
|
3
3
|
export default function (_appInfo: VonaAppInfo) {
|
|
4
4
|
const config = {} as VonaConfigOptional;
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
config.
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
// instance
|
|
7
|
+
config.instance = {
|
|
8
|
+
instances: {
|
|
9
|
+
'': { password: '', title: '' },
|
|
10
|
+
'shareTest': false,
|
|
11
|
+
'isolateTest': false,
|
|
12
|
+
},
|
|
13
|
+
};
|
|
10
14
|
|
|
11
15
|
// redis
|
|
12
16
|
config.redis = {
|
package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.dev.ts
CHANGED
|
@@ -3,12 +3,14 @@ import type { VonaAppInfo, VonaConfigOptional } from 'vona';
|
|
|
3
3
|
export default function (_appInfo: VonaAppInfo) {
|
|
4
4
|
const config = {} as VonaConfigOptional;
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
config.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
// instance
|
|
7
|
+
config.instance = {
|
|
8
|
+
instances: {
|
|
9
|
+
'': { password: '', title: '' },
|
|
10
|
+
'shareTest': { password: '', title: '' },
|
|
11
|
+
'isolateTest': { password: '', title: '', id: 1000, isolate: true, isolateClient: 'isolateTest' },
|
|
12
|
+
},
|
|
13
|
+
};
|
|
12
14
|
|
|
13
15
|
// redis
|
|
14
16
|
config.redis = {
|
package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.prod.ts
CHANGED
|
@@ -3,10 +3,12 @@ import type { VonaAppInfo, VonaConfigOptional } from 'vona';
|
|
|
3
3
|
export default function (_appInfo: VonaAppInfo) {
|
|
4
4
|
const config = {} as VonaConfigOptional;
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
config.
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
// instance
|
|
7
|
+
config.instance = {
|
|
8
|
+
instances: {
|
|
9
|
+
'': { password: '', title: '' },
|
|
10
|
+
},
|
|
11
|
+
};
|
|
10
12
|
|
|
11
13
|
// redis
|
|
12
14
|
config.redis = {
|
package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.test.ts
CHANGED
|
@@ -8,12 +8,14 @@ export default function (_appInfo: VonaAppInfo) {
|
|
|
8
8
|
enable: false,
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
//
|
|
12
|
-
config.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
// instance
|
|
12
|
+
config.instance = {
|
|
13
|
+
instances: {
|
|
14
|
+
'': { password: '', title: '', config: {} },
|
|
15
|
+
'shareTest': { password: '', title: '' },
|
|
16
|
+
'isolateTest': { password: '', title: '', id: 1000, isolate: true, isolateClient: 'isolateTest' },
|
|
17
|
+
},
|
|
18
|
+
};
|
|
17
19
|
|
|
18
20
|
// redis
|
|
19
21
|
config.redis = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ILoggerOptionsClientInfo, VonaAppInfo, VonaApplication, VonaConfigEnv, VonaConfigOptional } from 'vona';
|
|
2
|
-
import type { IMailClientRecord } from 'vona-module-a-mail';
|
|
2
|
+
import type { IMailClientRecord, TypeMailTransportService } from 'vona-module-a-mail';
|
|
3
3
|
import type { IDatabaseClientRecord } from 'vona-module-a-orm';
|
|
4
4
|
import type * as Winston from 'winston';
|
|
5
5
|
import { replaceTemplate } from '@cabloy/utils';
|
|
6
|
-
import { formatLoggerAxiosError, formatLoggerCtx, getLoggerPathPhysicalRoot, getPublicPathPhysicalRoot } from 'vona';
|
|
6
|
+
import { $customKey, formatLoggerAxiosError, formatLoggerCtx, getLoggerPathPhysicalRoot, getPublicPathPhysicalRoot } from 'vona';
|
|
7
7
|
|
|
8
8
|
declare module 'vona' {
|
|
9
9
|
export interface IInstanceRecord {
|
|
@@ -33,6 +33,14 @@ export default function (appInfo: VonaAppInfo, env: VonaConfigEnv) {
|
|
|
33
33
|
mode: appInfo.configMeta.mode,
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
+
// instance
|
|
37
|
+
config.instance = {
|
|
38
|
+
getInstanceName: undefined,
|
|
39
|
+
queryField: $customKey('x-vona-instance-name'),
|
|
40
|
+
headerField: $customKey('x-vona-instance-name'),
|
|
41
|
+
instances: {},
|
|
42
|
+
};
|
|
43
|
+
|
|
36
44
|
// server
|
|
37
45
|
const publicDir = env.SERVER_PUBLICDIR || getPublicPathPhysicalRoot(appInfo);
|
|
38
46
|
const subdomainOffset = Number.parseInt(env.SERVER_SUBDOMAINOFFSET || '1');
|
|
@@ -166,7 +174,7 @@ export default function (appInfo: VonaAppInfo, env: VonaConfigEnv) {
|
|
|
166
174
|
clients: {
|
|
167
175
|
system: {
|
|
168
176
|
transport: {
|
|
169
|
-
service: env.MAIL_SYSTEM_TRANSPORT_SERVICE || undefined,
|
|
177
|
+
service: env.MAIL_SYSTEM_TRANSPORT_SERVICE as TypeMailTransportService || undefined,
|
|
170
178
|
host: env.MAIL_SYSTEM_TRANSPORT_HOST || undefined,
|
|
171
179
|
port: env.MAIL_SYSTEM_TRANSPORT_PORT ? Number.parseInt(env.MAIL_SYSTEM_TRANSPORT_PORT) : undefined,
|
|
172
180
|
secure: env.MAIL_SYSTEM_TRANSPORT_SECURE === 'true',
|
|
@@ -47,11 +47,11 @@ export class CliBinPlay extends BeanCliBase {
|
|
|
47
47
|
const runtime = await loadJSONFile(runtimeFile);
|
|
48
48
|
const runtimeCore = runtime['a-core'];
|
|
49
49
|
const runtimeUser = runtime['a-user'];
|
|
50
|
-
const result = await fetch(`${runtimeCore
|
|
50
|
+
const result = await fetch(`${runtimeCore?.protocol}://${runtimeCore?.host}/api/play`, {
|
|
51
51
|
method: 'post',
|
|
52
52
|
headers: {
|
|
53
53
|
'content-type': 'application/json',
|
|
54
|
-
'authorization': `Bearer ${runtimeUser
|
|
54
|
+
'authorization': `Bearer ${runtimeUser?.accessToken}`,
|
|
55
55
|
},
|
|
56
56
|
body: JSON.stringify(body),
|
|
57
57
|
});
|
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.
|
|
4
|
+
"version": "1.0.371",
|
|
5
5
|
"description": "vona cli-set-api",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"ts-node-maintained": "^10.9.6",
|
|
62
62
|
"urllib": "^4.6.11",
|
|
63
63
|
"uuid": "^11.1.0",
|
|
64
|
-
"vona-core": "^5.0.
|
|
64
|
+
"vona-core": "^5.0.99",
|
|
65
65
|
"why-is-node-running": "^3.2.2",
|
|
66
66
|
"yargs-parser": "^22.0.0"
|
|
67
67
|
},
|