ismx-nexo-node-app 0.4.170 → 0.4.171

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.
@@ -46,8 +46,10 @@ class BusinessServer extends Business_1.default {
46
46
  }
47
47
  init() {
48
48
  return __awaiter(this, void 0, void 0, function* () {
49
- const { default: express } = yield Promise.resolve().then(() => __importStar(require("express")));
50
- const { default: cors } = yield Promise.resolve().then(() => __importStar(require("cors")));
49
+ const express = yield Promise.resolve().then(() => __importStar(require("express"))).then((e) => e.default).catch(() => null);
50
+ const cors = yield Promise.resolve().then(() => __importStar(require("cors"))).then((e) => e.default).catch(() => null);
51
+ if (!express || !cors)
52
+ return;
51
53
  this.express = express;
52
54
  this.app = express();
53
55
  this.app.use(express.urlencoded({ extended: false }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ismx-nexo-node-app",
3
- "version": "0.4.170",
3
+ "version": "0.4.171",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rm -rf ./dist && npx tsc",
@@ -17,8 +17,9 @@ export default class BusinessServer extends Business
17
17
 
18
18
  async init()
19
19
  {
20
- const { default: express } = await import("express");
21
- const { default: cors } = await import("cors");
20
+ const express = await import("express").then((e) => e.default).catch(() => null);
21
+ const cors = await import("cors").then((e) => e.default).catch(() => null);
22
+ if (!express || !cors) return;
22
23
 
23
24
  this.express = express;
24
25
  this.app = express();