🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

athene-api

Package Overview
Dependencies
Maintainers
2
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

athene-api - npm Package Compare versions

Comparing version
2.0.17
to
2.0.18
+1
-0
dist/src/core/setting/SettingManager.d.ts

@@ -17,2 +17,3 @@ export declare const APP_CONFIG: {

GetConfig(key: string): any;
GetSafeConfig(key: string): any;
/**

@@ -19,0 +20,0 @@ * 获取Api地址

@@ -78,2 +78,16 @@ "use strict";

}
GetSafeConfig(key) {
try {
const keyPath = key.split(':');
let cfg = exports.APP_CONFIG[keyPath[0]];
for (let index = 1; index < keyPath.length; index++) {
const element = keyPath[index];
cfg = cfg[element];
}
return cfg;
}
catch (ex) {
return undefined;
}
}
/**

@@ -80,0 +94,0 @@ * 获取Api地址

+4
-1

@@ -54,2 +54,3 @@ "use strict";

InitMiddleware() {
var _a;
this._moduleLoader.LoadProxy(this._controllerPath, this._server);

@@ -86,2 +87,3 @@ // 异常处理中间件

// );
// console.log("this.settingManager.GetSafeConfig('maxFileSize') ", this.settingManager.GetSafeConfig('maxFileSize'));
this._app.use(koaBody({

@@ -92,3 +94,3 @@ // strict: false,

formidable: {
maxFileSize: 200 * 1024 * 1024, // 设置上传文件大小最大限制,默认2M
maxFileSize: (_a = this.settingManager.GetSafeConfig('maxFileSize')) !== null && _a !== void 0 ? _a : 200 * 1024 * 1024, // 设置上传文件大小最大限制,默认2M
},

@@ -110,2 +112,3 @@ }));

this.Init();
// this.InitMiddleware();
if (!port)

@@ -112,0 +115,0 @@ port = this.settingManager.GetConfig('port');

{
"name": "athene-api",
"version": "2.0.17",
"version": "2.0.18",
"description": "athene-api",

@@ -5,0 +5,0 @@ "main": "dist/index.js",