badmfck-api-server 3.8.4 → 3.8.5

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.
@@ -40,7 +40,6 @@ export interface APIServiceOptions<TInterceptor = unknown> {
40
40
  monitor?: IMonitorUser[];
41
41
  documentation?: IMonitorUser[];
42
42
  };
43
- monitor?: IMonitorUser[];
44
43
  appVersion?: string;
45
44
  fileTempDir: string;
46
45
  fileLimit: number;
@@ -61,7 +60,6 @@ export declare const REQ_MONITOR_USERS: Req<void, IMonitorUser[]>;
61
60
  export declare const REQ_DOC_USERS: Req<void, IMonitorUser[]>;
62
61
  export declare function Initializer(services: IBaseService[]): Promise<void>;
63
62
  export declare class APIService extends BaseService {
64
- private static nextLogID;
65
63
  private version;
66
64
  private options;
67
65
  private monitor;
@@ -53,16 +53,18 @@ function defaultOptions() {
53
53
  return {
54
54
  port: 8080,
55
55
  baseEndPoint: "/api/",
56
- corsHostWhiteList: [],
57
- projectName: "App",
56
+ corsHostWhiteList: ["localhost:3000"],
58
57
  endpoints: [],
59
58
  jsonLimit: "10mb",
59
+ projectName: "Application project",
60
60
  isProductionEnvironment: false,
61
61
  interceptor: undefined,
62
62
  postproducer: undefined,
63
63
  preproducer: undefined,
64
- access: {},
65
- monitor: undefined,
64
+ access: {
65
+ monitor: [],
66
+ documentation: []
67
+ },
66
68
  appVersion: undefined,
67
69
  fileTempDir: "/tmp",
68
70
  fileLimit: 10_000_000,
@@ -94,8 +96,7 @@ async function Initializer(services) {
94
96
  }
95
97
  exports.Initializer = Initializer;
96
98
  class APIService extends BaseService_1.BaseService {
97
- static nextLogID = 0;
98
- version = "3.8.4";
99
+ version = "3.8.5";
99
100
  options;
100
101
  monitor = null;
101
102
  started = new Date();
@@ -109,7 +110,7 @@ class APIService extends BaseService_1.BaseService {
109
110
  const self = "http://localhost:" + this.options.port;
110
111
  if (!this.options.corsHostWhiteList.find(val => val === self))
111
112
  this.options.corsHostWhiteList.push();
112
- exports.REQ_MONITOR_USERS.listener = async () => this.options.access.monitor ?? this.options.monitor ?? [];
113
+ exports.REQ_MONITOR_USERS.listener = async () => this.options.access.monitor ?? [];
113
114
  exports.REQ_DOC_USERS.listener = async () => this.options.access.documentation ?? [];
114
115
  this.options.endpoints.push(new Monitor_1.Monitor(this.options));
115
116
  this.options.endpoints.push(new Documentation_1.Documentation(this.options));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "3.8.4",
3
+ "version": "3.8.5",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",