badmfck-api-server 1.8.2 → 1.8.4

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.
@@ -51,7 +51,7 @@ async function Initializer(services) {
51
51
  exports.Initializer = Initializer;
52
52
  class APIService extends BaseService_1.BaseService {
53
53
  static nextLogID = 0;
54
- version = "1.8.2";
54
+ version = "1.8.4";
55
55
  options;
56
56
  monitor;
57
57
  monitorIndexFile;
@@ -107,7 +107,8 @@ class APIService extends BaseService_1.BaseService {
107
107
  limits: { fileSize: this.options.fileLimit },
108
108
  useTempFiles: true,
109
109
  uriDecodeFileNames: true,
110
- tempFileDir: this.options.fileTempDir
110
+ tempFileDir: this.options.fileTempDir,
111
+ abortOnLimit: true
111
112
  }));
112
113
  app.use(async (err, req, resp, next) => {
113
114
  if (!err) {
@@ -172,6 +173,7 @@ class APIService extends BaseService_1.BaseService {
172
173
  params: req.params,
173
174
  headers: req.headers,
174
175
  endpoint: ep,
176
+ files: req.files ?? null
175
177
  };
176
178
  let result;
177
179
  try {
@@ -1,3 +1,4 @@
1
+ import { FileArray } from "express-fileupload";
1
2
  export interface TransferPacketVO<T> {
2
3
  data?: T | null;
3
4
  error?: IError | null;
@@ -25,6 +26,7 @@ export interface HTTPRequestVO<T = any> {
25
26
  endpoint: string;
26
27
  interceptorResult?: TransferPacketVO<any>;
27
28
  precheck?: TransferPacketVO<any> | null;
29
+ files: FileArray | null | undefined;
28
30
  }
29
31
  export interface IError {
30
32
  code: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "1.8.2",
3
+ "version": "1.8.4",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",