ismx-nexo-node-app 0.3.51 → 0.3.52

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.
@@ -1,4 +1,27 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
26
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
27
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -13,18 +36,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
36
  };
14
37
  Object.defineProperty(exports, "__esModule", { value: true });
15
38
  const Service_1 = require("../api/Service");
16
- const express_1 = __importDefault(require("express"));
17
39
  const Business_1 = __importDefault(require("./Business"));
18
- const cors_1 = __importDefault(require("cors"));
19
40
  class BusinessServer extends Business_1.default {
20
41
  constructor() {
21
42
  super();
22
- this.app = (0, express_1.default)();
23
- this.app.use(express_1.default.urlencoded({ extended: false }));
24
- this.app.use(express_1.default.json());
25
- this.app.use((0, cors_1.default)());
26
43
  this.publish = this.publish.bind(this);
27
44
  }
45
+ init() {
46
+ Promise.resolve().then(() => __importStar(require("express"))).then(({ default: express }) => {
47
+ Promise.resolve().then(() => __importStar(require("cors"))).then(({ default: cors }) => {
48
+ this.app = express();
49
+ this.app.use(express.urlencoded({ extended: false }));
50
+ this.app.use(express.json());
51
+ this.app.use(cors());
52
+ });
53
+ });
54
+ }
28
55
  start(port) {
29
56
  this.app.listen(port, this.onStarted);
30
57
  }
package/dist/js/index.js CHANGED
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.RestUtils = exports.QueryUtils = exports.RepositoryRestFormalTemplate = exports.RepositoryRestFormal = exports.RepositoryRest = exports.RepositoryDatabasePostgres = exports.RepositoryDatabase = exports.Repository = exports.StringUtils = exports.NumberUtils = exports.CryptoUtils = exports.BusinessLogger = exports.BusinessErrors = exports.BusinessThread = exports.BusinessServer = exports.BusinessProxy = exports.BusinessState = exports.Business = exports.ColorUtils = exports.ServiceRestFormalTemplate = exports.ServiceRestFormal = exports.ServiceRest = exports.HttpResponse = exports.Service = void 0;
29
+ exports.RestUtils = exports.QueryUtils = exports.RepositoryRestFormalTemplate = exports.RepositoryRestFormal = exports.RepositoryRest = exports.RepositoryDatabasePostgres = exports.RepositoryDatabase = exports.Repository = exports.StringUtils = exports.NumberUtils = exports.CryptoUtils = exports.BusinessLogger = exports.BusinessErrors = exports.BusinessThread = exports.BusinessProxy = exports.BusinessState = exports.Business = exports.ColorUtils = exports.ServiceRestFormalTemplate = exports.ServiceRestFormal = exports.ServiceRest = exports.HttpResponse = exports.Service = void 0;
30
30
  const Service_1 = __importStar(require("./api/Service"));
31
31
  class Service extends Service_1.default {
32
32
  }
@@ -66,7 +66,6 @@ exports.BusinessProxy = BusinessProxy;
66
66
  const BusinessServer_1 = __importDefault(require("./business/BusinessServer"));
67
67
  class BusinessServer extends BusinessServer_1.default {
68
68
  }
69
- exports.BusinessServer = BusinessServer;
70
69
  const BusinessThread_1 = __importDefault(require("./business/BusinessThread"));
71
70
  class BusinessThread extends BusinessThread_1.default {
72
71
  }
@@ -3,6 +3,7 @@ import Business from "./Business";
3
3
  export default class BusinessServer extends Business {
4
4
  private app;
5
5
  constructor();
6
+ init(): void;
6
7
  start(port: number): void;
7
8
  setServices(services: Service<any, any>[]): void;
8
9
  private onStarted?;
@@ -31,9 +31,6 @@ export declare class BusinessProxy extends BaseBusinessProxy {
31
31
  }
32
32
  export interface Module extends BaseModule {
33
33
  }
34
- import BaseBusinessServer from "./business/BusinessServer";
35
- export declare class BusinessServer extends BaseBusinessServer {
36
- }
37
34
  import BaseBusinessThread from "./business/BusinessThread";
38
35
  export declare abstract class BusinessThread extends BaseBusinessThread {
39
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ismx-nexo-node-app",
3
- "version": "0.3.51",
3
+ "version": "0.3.52",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rm -rf ./dist && npx tsc",
@@ -1,23 +1,26 @@
1
1
  import Service, {HttpRequest, HttpResponse} from "../api/Service";
2
- import express from "express";
3
- import core from "express"
4
2
  import Business from "./Business";
5
- import cors from 'cors';
6
3
 
7
4
  export default class BusinessServer extends Business
8
5
  {
9
- private app: core.Express;
6
+ private app: any;
10
7
 
11
8
  constructor() {
12
9
  super()
13
- this.app = express();
14
- this.app.use(express.urlencoded({ extended: false }));
15
- this.app.use(express.json());
16
- this.app.use(cors());
17
-
18
10
  this.publish = this.publish.bind(this);
19
11
  }
20
12
 
13
+ init() {
14
+ import("express").then(({ default: express }) => {
15
+ import("cors").then(({ default: cors }) => {
16
+ this.app = express();
17
+ this.app.use(express.urlencoded({ extended: false }));
18
+ this.app.use(express.json());
19
+ this.app.use(cors());
20
+ })
21
+ });
22
+ }
23
+
21
24
  start(port: number) {
22
25
  this.app.listen(port, this.onStarted)
23
26
  }
@@ -28,8 +28,8 @@ import BaseBusinessProxy, { Module as BaseModule } from "./business/BusinessProx
28
28
  export class BusinessProxy extends BaseBusinessProxy {}
29
29
  export interface Module extends BaseModule {}
30
30
 
31
- import BaseBusinessServer from "./business/BusinessServer";
32
- export class BusinessServer extends BaseBusinessServer {}
31
+ import _BusinessServer from "./business/BusinessServer";
32
+ class BusinessServer extends _BusinessServer {}
33
33
 
34
34
  import BaseBusinessThread from "./business/BusinessThread";
35
35
  export abstract class BusinessThread extends BaseBusinessThread {}