vona-core 5.0.87 → 5.0.89
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/dist/lib/core/config.js
CHANGED
|
@@ -3,7 +3,6 @@ import path from 'node:path';
|
|
|
3
3
|
import fse from 'fs-extra';
|
|
4
4
|
import { cast } from "../../types/utils/cast.js";
|
|
5
5
|
import { deepExtend } from "../utils/util.js";
|
|
6
|
-
import { combineLoggerDefault } from "./logger/loggerDefault.js";
|
|
7
6
|
export function combineAppConfigDefault(appInfo, env) {
|
|
8
7
|
let config = configDefault(appInfo, env);
|
|
9
8
|
const mode = appInfo.configMeta.mode;
|
|
@@ -24,8 +23,6 @@ export function configDefault(appInfo, env) {
|
|
|
24
23
|
const loggerDir = env.SERVER_LOGGERDIR || getLoggerPathPhysicalRoot(appInfo);
|
|
25
24
|
const subdomainOffset = Number.parseInt(env.SERVER_SUBDOMAINOFFSET || '1');
|
|
26
25
|
const workers = Number.parseInt(env.SERVER_WORKERS);
|
|
27
|
-
// logger
|
|
28
|
-
const logger = combineLoggerDefault(appInfo, env);
|
|
29
26
|
return {
|
|
30
27
|
meta: {
|
|
31
28
|
flavor: cast(env).META_FLAVOR,
|
|
@@ -53,9 +50,6 @@ export function configDefault(appInfo, env) {
|
|
|
53
50
|
maxProxyCount: 1,
|
|
54
51
|
maxIpsCount: 15,
|
|
55
52
|
},
|
|
56
|
-
logger,
|
|
57
|
-
//
|
|
58
|
-
modules: {},
|
|
59
53
|
};
|
|
60
54
|
}
|
|
61
55
|
export function configDev(_env) {
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { VonaAppInfo } from '../../../types/application/app.ts';
|
|
2
|
-
import type { ConfigLogger } from '../../../types/interface/logger.ts';
|
|
3
|
-
import type { VonaConfigEnv } from '../../../types/utils/env.ts';
|
|
4
|
-
import type { PowerPartial } from '../../../types/utils/powerPartial.ts';
|
|
5
|
-
export declare function combineLoggerDefault(_appInfo: VonaAppInfo, env: VonaConfigEnv): PowerPartial<ConfigLogger>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { replaceTemplate } from '@cabloy/utils';
|
|
2
|
-
import { formatLoggerAxiosError, formatLoggerCtx } from "./utils.js";
|
|
3
|
-
export function combineLoggerDefault(_appInfo, env) {
|
|
4
|
-
const configDefault = {
|
|
5
|
-
rotate: {
|
|
6
|
-
enable: env.LOGGER_ROTATE_ENABLE === 'true',
|
|
7
|
-
options(filename) {
|
|
8
|
-
return {
|
|
9
|
-
filename: replaceTemplate(env.LOGGER_ROTATE_FILENAME, { filename }),
|
|
10
|
-
datePattern: env.LOGGER_ROTATE_DATEPATTERN,
|
|
11
|
-
maxSize: env.LOGGER_ROTATE_MAXSIZE,
|
|
12
|
-
maxFiles: env.LOGGER_ROTATE_MAXFILES,
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
base(_clientInfo, { format }) {
|
|
17
|
-
return {
|
|
18
|
-
format: format.combine(formatLoggerAxiosError({ stack: true }), formatLoggerCtx(), format.errors({ stack: true }), format.splat(), format.timestamp()),
|
|
19
|
-
transports: undefined,
|
|
20
|
-
};
|
|
21
|
-
},
|
|
22
|
-
clients: {},
|
|
23
|
-
};
|
|
24
|
-
return configDefault;
|
|
25
|
-
}
|