exodus-framework 2.0.703 → 2.0.705
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.
- package/lib/app/app.js +6 -6
- package/lib/app/controller.js +22 -22
- package/lib/app/core.js +8 -8
- package/lib/app/service.js +9 -9
- package/lib/app/settings.js +14 -14
- package/lib/app/singleton.js +8 -8
- package/lib/contracts/entity.d.ts +13 -2
- package/lib/contracts/entity.d.ts.map +1 -1
- package/lib/contracts/http.js +13 -13
- package/lib/controllers/messaging/database.js +8 -8
- package/lib/controllers/messaging/environment.d.ts +0 -1
- package/lib/controllers/messaging/environment.d.ts.map +1 -1
- package/lib/controllers/messaging/environment.js +12 -7
- package/lib/models/{Connection.d.ts → DatabaseHost.d.ts} +3 -2
- package/lib/models/DatabaseHost.d.ts.map +1 -0
- package/lib/models/{Connection.js → DatabaseHost.js} +9 -5
- package/lib/models/EnvConnection.d.ts +2 -2
- package/lib/models/EnvConnection.d.ts.map +1 -1
- package/lib/models/EnvConnection.js +7 -7
- package/lib/models/index.d.ts +1 -1
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/index.js +5 -5
- package/lib/routes/messaging/index.js +1 -1
- package/lib/services/express.d.ts +1 -1
- package/lib/services/express.d.ts.map +1 -1
- package/lib/services/express.js +3 -3
- package/lib/services/rabitmq.js +6 -6
- package/lib/services/redis.js +6 -6
- package/lib/services/security.d.ts.map +1 -1
- package/lib/services/security.js +44 -43
- package/lib/services/sequelize.d.ts +7 -6
- package/lib/services/sequelize.d.ts.map +1 -1
- package/lib/services/sequelize.js +44 -49
- package/lib/services/socket.js +6 -6
- package/package.json +7 -7
- package/lib/models/Connection.d.ts.map +0 -1
package/lib/app/app.js
CHANGED
@@ -11,12 +11,12 @@ var _core = _interopRequireDefault(require("./core"));
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
12
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
14
|
-
/**
|
15
|
-
* Classe da aplicação principal
|
16
|
-
* Responsável por inicializar todos os recursos usados por este micro-serviço
|
17
|
-
*
|
18
|
-
* @class Application
|
19
|
-
* @extends {Core}
|
14
|
+
/**
|
15
|
+
* Classe da aplicação principal
|
16
|
+
* Responsável por inicializar todos os recursos usados por este micro-serviço
|
17
|
+
*
|
18
|
+
* @class Application
|
19
|
+
* @extends {Core}
|
20
20
|
*/
|
21
21
|
class Exodus extends _core.default {
|
22
22
|
services;
|
package/lib/app/controller.js
CHANGED
@@ -7,27 +7,27 @@ exports.default = exports.SocketRequest = exports.SocketController = exports.Mes
|
|
7
7
|
var _express = _interopRequireDefault(require("../services/express"));
|
8
8
|
var _core = _interopRequireDefault(require("./core"));
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
10
|
-
/**
|
11
|
-
* Classe base dos conttrolers http
|
12
|
-
*
|
13
|
-
* @abstract
|
14
|
-
* @class Controller
|
15
|
-
* @extends {Core}
|
10
|
+
/**
|
11
|
+
* Classe base dos conttrolers http
|
12
|
+
*
|
13
|
+
* @abstract
|
14
|
+
* @class Controller
|
15
|
+
* @extends {Core}
|
16
16
|
*/
|
17
17
|
class HttpController extends _core.default {
|
18
18
|
constructor() {
|
19
19
|
super();
|
20
20
|
}
|
21
21
|
|
22
|
-
/**
|
23
|
-
* Metódo de envio de respostar http para o cliente
|
24
|
-
*
|
25
|
-
* @protected
|
26
|
-
* @param {THttpResponse} objResponse
|
27
|
-
* @param {Response} res
|
28
|
-
* @param {NextFunction} [next]
|
29
|
-
* @return {void}
|
30
|
-
* @memberof Controller
|
22
|
+
/**
|
23
|
+
* Metódo de envio de respostar http para o cliente
|
24
|
+
*
|
25
|
+
* @protected
|
26
|
+
* @param {THttpResponse} objResponse
|
27
|
+
* @param {Response} res
|
28
|
+
* @param {NextFunction} [next]
|
29
|
+
* @return {void}
|
30
|
+
* @memberof Controller
|
31
31
|
*/
|
32
32
|
send(objResponse, res, next) {
|
33
33
|
return _express.default.singleton().sendResponse(objResponse, res, next);
|
@@ -37,13 +37,13 @@ class HttpController extends _core.default {
|
|
37
37
|
}
|
38
38
|
}
|
39
39
|
|
40
|
-
/**
|
41
|
-
* Class base dos controllers SocketIO
|
42
|
-
*
|
43
|
-
* @export
|
44
|
-
* @abstract
|
45
|
-
* @class SocketController
|
46
|
-
* @extends {Core}
|
40
|
+
/**
|
41
|
+
* Class base dos controllers SocketIO
|
42
|
+
*
|
43
|
+
* @export
|
44
|
+
* @abstract
|
45
|
+
* @class SocketController
|
46
|
+
* @extends {Core}
|
47
47
|
*/
|
48
48
|
exports.HttpController = HttpController;
|
49
49
|
class SocketController extends _core.default {
|
package/lib/app/core.js
CHANGED
@@ -8,14 +8,14 @@ var _cluster = _interopRequireDefault(require("cluster"));
|
|
8
8
|
var _dateFns = require("date-fns");
|
9
9
|
var _settings = _interopRequireDefault(require("./settings"));
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
11
|
-
/**
|
12
|
-
* Class base responsável pelo gerênciamento RUNTIME da aplicação
|
13
|
-
* controle de cache, uso de memoria e gerênciamento de dados locais
|
14
|
-
*
|
15
|
-
* Todas as classes devem herdar esta classe para um gerênciamento completo
|
16
|
-
*
|
17
|
-
* @abstract
|
18
|
-
* @class Core
|
11
|
+
/**
|
12
|
+
* Class base responsável pelo gerênciamento RUNTIME da aplicação
|
13
|
+
* controle de cache, uso de memoria e gerênciamento de dados locais
|
14
|
+
*
|
15
|
+
* Todas as classes devem herdar esta classe para um gerênciamento completo
|
16
|
+
*
|
17
|
+
* @abstract
|
18
|
+
* @class Core
|
19
19
|
*/
|
20
20
|
class Core {
|
21
21
|
static settings = new _settings.default();
|
package/lib/app/service.js
CHANGED
@@ -6,15 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.default = void 0;
|
7
7
|
var _singleton = _interopRequireDefault(require("./singleton"));
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
|
-
/**
|
10
|
-
* Classe base de Serviços
|
11
|
-
* Responsável por gerênciar métodos e funções utilizadas por todas
|
12
|
-
* as classes de serviço desta aplicação
|
13
|
-
*
|
14
|
-
* @abstract
|
15
|
-
* @class Service
|
16
|
-
* @extends {Singleton}
|
17
|
-
* @template S
|
9
|
+
/**
|
10
|
+
* Classe base de Serviços
|
11
|
+
* Responsável por gerênciar métodos e funções utilizadas por todas
|
12
|
+
* as classes de serviço desta aplicação
|
13
|
+
*
|
14
|
+
* @abstract
|
15
|
+
* @class Service
|
16
|
+
* @extends {Singleton}
|
17
|
+
* @template S
|
18
18
|
*/
|
19
19
|
class Service extends _singleton.default {
|
20
20
|
constructor() {
|
package/lib/app/settings.js
CHANGED
@@ -65,26 +65,26 @@ class CoreSettings {
|
|
65
65
|
formulation: process.env.RESPONSE_FORMULATION_TYPE || 'standart'
|
66
66
|
},
|
67
67
|
logger: {
|
68
|
-
/**
|
69
|
-
* Diretório pardrão de logs
|
70
|
-
* @date 24/03/2023 - 20:19:18
|
71
|
-
*
|
68
|
+
/**
|
69
|
+
* Diretório pardrão de logs
|
70
|
+
* @date 24/03/2023 - 20:19:18
|
71
|
+
*
|
72
72
|
*/
|
73
73
|
path: '../../logs',
|
74
|
-
/**
|
75
|
-
* Formato de saída dos arquivos de logs
|
76
|
-
* @date 24/03/2023 - 20:19:18
|
77
|
-
*
|
74
|
+
/**
|
75
|
+
* Formato de saída dos arquivos de logs
|
76
|
+
* @date 24/03/2023 - 20:19:18
|
77
|
+
*
|
78
78
|
*/
|
79
79
|
fileformat: '.json',
|
80
|
-
/**
|
81
|
-
* Nível do logger
|
80
|
+
/**
|
81
|
+
* Nível do logger
|
82
82
|
*/
|
83
83
|
level: process.env.LOGGER_LEVEL || 'info',
|
84
|
-
/**
|
85
|
-
* Transportar logs para o console do prompt
|
86
|
-
* @date 24/03/2023 - 20:19:18
|
87
|
-
*
|
84
|
+
/**
|
85
|
+
* Transportar logs para o console do prompt
|
86
|
+
* @date 24/03/2023 - 20:19:18
|
87
|
+
*
|
88
88
|
*/
|
89
89
|
console: !!parseInt(process.env.LOGGER_CONSOLE) || false
|
90
90
|
},
|
package/lib/app/singleton.js
CHANGED
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.default = void 0;
|
7
7
|
var _core = _interopRequireDefault(require("./core"));
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
|
-
/**
|
10
|
-
* Classe base para gerênciamento de instancia Singleton
|
11
|
-
* Usada para possibilitar a classe filha de manipular a
|
12
|
-
* instancia de sí mesma
|
13
|
-
*
|
14
|
-
* @abstract
|
15
|
-
* @class Singleton
|
16
|
-
* @extends {Core}
|
9
|
+
/**
|
10
|
+
* Classe base para gerênciamento de instancia Singleton
|
11
|
+
* Usada para possibilitar a classe filha de manipular a
|
12
|
+
* instancia de sí mesma
|
13
|
+
*
|
14
|
+
* @abstract
|
15
|
+
* @class Singleton
|
16
|
+
* @extends {Core}
|
17
17
|
*/
|
18
18
|
class Singleton extends _core.default {
|
19
19
|
// #Singleton
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { FindOptions, InferAttributes, InferCreationAttributes, Model, WhereOptions } from 'sequelize';
|
1
|
+
import { Dialect, FindOptions, InferAttributes, InferCreationAttributes, Model, WhereOptions } from 'sequelize';
|
2
2
|
import { MakeNullishOptional } from 'sequelize/types/utils';
|
3
3
|
export type TPaginationAttributes = {
|
4
4
|
limit: number;
|
@@ -11,6 +11,7 @@ export type TWhereParams<M extends Model> = WhereOptions<InferAttributes<M, {
|
|
11
11
|
omit: never;
|
12
12
|
}>>;
|
13
13
|
export type TCreateParams<M extends Model> = Omit<MakeNullishOptional<InferCreationAttributes<M>>, 'uuid'>;
|
14
|
+
export type TAccountType = 'ADMINISTRATOR' | 'BUSINESS' | 'SUPORT' | 'AGENT' | 'SUPERVISOR';
|
14
15
|
export interface IAccount {
|
15
16
|
blockWithVenc: boolean;
|
16
17
|
blocked: boolean;
|
@@ -26,7 +27,6 @@ export interface IAccount {
|
|
26
27
|
uuid: string;
|
27
28
|
comments: string;
|
28
29
|
}
|
29
|
-
export type TAccountType = 'ADMINISTRATOR' | 'BUSINESS' | 'SUPORT' | 'AGENT' | 'SUPERVISOR';
|
30
30
|
export interface IEnvironment {
|
31
31
|
uuid: string;
|
32
32
|
name: string;
|
@@ -40,4 +40,15 @@ export interface IEnvironment {
|
|
40
40
|
database: string;
|
41
41
|
params: Record<string, any> | null;
|
42
42
|
}
|
43
|
+
export interface IDatabseHost {
|
44
|
+
uuid: string;
|
45
|
+
name: string;
|
46
|
+
dialect: Dialect;
|
47
|
+
host: string;
|
48
|
+
username: string;
|
49
|
+
password: string;
|
50
|
+
credential: Buffer;
|
51
|
+
active: boolean;
|
52
|
+
params: Record<string, any>;
|
53
|
+
}
|
43
54
|
//# sourceMappingURL=entity.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/contracts/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,KAAK,EACL,YAAY,EACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,KAAK,IAAI,WAAW,CAAC,eAAe,CAAC,CAAC,EAAE;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC,CAAC;AAC5F,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,KAAK,IAAI,YAAY,CAAC,eAAe,CAAC,CAAC,EAAE;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC,CAAC;AAC9F,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,KAAK,IAAI,IAAI,CAC/C,mBAAmB,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,EAC/C,MAAM,CACP,CAAC;AAGF,MAAM,WAAW,QAAQ;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACpC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/contracts/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,KAAK,EACL,YAAY,EACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,KAAK,IAAI,WAAW,CAAC,eAAe,CAAC,CAAC,EAAE;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC,CAAC;AAC5F,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,KAAK,IAAI,YAAY,CAAC,eAAe,CAAC,CAAC,EAAE;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC,CAAC;AAC9F,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,KAAK,IAAI,IAAI,CAC/C,mBAAmB,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,EAC/C,MAAM,CACP,CAAC;AAGF,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;AAC5F,MAAM,WAAW,QAAQ;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACpC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,IAAI,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B"}
|
package/lib/contracts/http.js
CHANGED
@@ -4,21 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.EHttpResponseCode = exports.EApiRequestMethod = void 0;
|
7
|
-
/**
|
8
|
-
* Tipo de respostas
|
9
|
-
* @date 26/03/2023 - 21:45:23
|
10
|
-
*
|
7
|
+
/**
|
8
|
+
* Tipo de respostas
|
9
|
+
* @date 26/03/2023 - 21:45:23
|
10
|
+
*
|
11
11
|
*/
|
12
|
-
/**
|
13
|
-
* Objeto de response padronizado
|
14
|
-
* @date 26/03/2023 - 21:45:23
|
15
|
-
*
|
12
|
+
/**
|
13
|
+
* Objeto de response padronizado
|
14
|
+
* @date 26/03/2023 - 21:45:23
|
15
|
+
*
|
16
16
|
*/
|
17
|
-
/**
|
18
|
-
* Tipos de Status-Code para responses do Express
|
19
|
-
*
|
20
|
-
* @export
|
21
|
-
* @enum {number}
|
17
|
+
/**
|
18
|
+
* Tipos de Status-Code para responses do Express
|
19
|
+
*
|
20
|
+
* @export
|
21
|
+
* @enum {number}
|
22
22
|
*/
|
23
23
|
let EHttpResponseCode = exports.EHttpResponseCode = /*#__PURE__*/function (EHttpResponseCode) {
|
24
24
|
EHttpResponseCode[EHttpResponseCode["continue"] = 100] = "continue";
|
@@ -10,8 +10,8 @@ var _utils = require("../../utils");
|
|
10
10
|
class DatabaseController extends _app.MessagingController {
|
11
11
|
created = async (data, ack) => {
|
12
12
|
try {
|
13
|
-
const
|
14
|
-
if (!
|
13
|
+
const host = await _models.DatabaseHost.create(data);
|
14
|
+
if (!host) {
|
15
15
|
(0, _utils.logger)().error(data, 'Não foi possível criar o banco de dados');
|
16
16
|
return this.log('Não foi possível criar um banco de dados', 'danger');
|
17
17
|
}
|
@@ -23,12 +23,12 @@ class DatabaseController extends _app.MessagingController {
|
|
23
23
|
};
|
24
24
|
update = async (data, ack) => {
|
25
25
|
try {
|
26
|
-
const
|
27
|
-
if (!
|
26
|
+
const host = await _models.DatabaseHost.findByPk(data.uuid);
|
27
|
+
if (!host) {
|
28
28
|
(0, _utils.logger)().error(data, 'Não foi possível atualizar um banco de dados. Banco não encontrado');
|
29
29
|
return this.log('Não foi possível atualizar um banco de dados. Banco não encontrado', 'danger');
|
30
30
|
}
|
31
|
-
await
|
31
|
+
await host.update(data.updated);
|
32
32
|
ack();
|
33
33
|
} catch (error) {
|
34
34
|
(0, _utils.logger)().error(error);
|
@@ -37,12 +37,12 @@ class DatabaseController extends _app.MessagingController {
|
|
37
37
|
};
|
38
38
|
delete = async (data, ack) => {
|
39
39
|
try {
|
40
|
-
const
|
41
|
-
if (!
|
40
|
+
const host = await _models.DatabaseHost.findByPk(data.uuid);
|
41
|
+
if (!host) {
|
42
42
|
(0, _utils.logger)().error(data, 'Não foi possível excluír um banco de dados. Banco não encontrado');
|
43
43
|
return this.log('Não foi possível excluír um banco de dados. Banco não encontrado', 'danger');
|
44
44
|
}
|
45
|
-
await
|
45
|
+
await host.destroy();
|
46
46
|
ack();
|
47
47
|
} catch (error) {
|
48
48
|
(0, _utils.logger)().error(error);
|
@@ -3,7 +3,6 @@ import { EMessagingQueue, TMessagingQueueHandler } from '../../contracts';
|
|
3
3
|
declare class EnvironmentController extends MessagingController {
|
4
4
|
created: TMessagingQueueHandler<EMessagingQueue.environmentCreated>;
|
5
5
|
deleted: TMessagingQueueHandler<EMessagingQueue.environmentDeleted>;
|
6
|
-
updatedToken: TMessagingQueueHandler<EMessagingQueue.environmentUpdatedToken>;
|
7
6
|
updatedDatabase: TMessagingQueueHandler<EMessagingQueue.environmentUpdatedDatabase>;
|
8
7
|
}
|
9
8
|
export default EnvironmentController;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/controllers/messaging/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAI1E,cAAM,qBAAsB,SAAQ,mBAAmB;IACrD,OAAO,EAAE,sBAAsB,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAuBjE;IAEF,OAAO,EAAE,sBAAsB,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAmBjE;
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/controllers/messaging/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAI1E,cAAM,qBAAsB,SAAQ,mBAAmB;IACrD,OAAO,EAAE,sBAAsB,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAuBjE;IAEF,OAAO,EAAE,sBAAsB,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAmBjE;IASF,eAAe,EAAE,sBAAsB,CAAC,eAAe,CAAC,0BAA0B,CAAC,CAwBjF;CACH;AAED,eAAe,qBAAqB,CAAC"}
|
@@ -12,9 +12,9 @@ class EnvironmentController extends _app.MessagingController {
|
|
12
12
|
const db = data.database;
|
13
13
|
const token = data.envToken;
|
14
14
|
_services.SequelizeService.singleton().createDB(db, token).then(() => {
|
15
|
-
_models.
|
15
|
+
_models.EnvDBHost.create({
|
16
16
|
envUuid: data.uuid,
|
17
|
-
|
17
|
+
hostUuid: data.database,
|
18
18
|
envToken: data.envToken
|
19
19
|
}).then(() => {
|
20
20
|
this.log(`New database created sucessfuly: ${db}`);
|
@@ -32,7 +32,7 @@ class EnvironmentController extends _app.MessagingController {
|
|
32
32
|
const db = data.database;
|
33
33
|
try {
|
34
34
|
await _services.SequelizeService.singleton().deleteDB(db, token);
|
35
|
-
const relation = await _models.
|
35
|
+
const relation = await _models.EnvDBHost.findOne({
|
36
36
|
where: {
|
37
37
|
envUuid: data.uuid
|
38
38
|
}
|
@@ -44,12 +44,17 @@ class EnvironmentController extends _app.MessagingController {
|
|
44
44
|
throw new _services.ApplicationException('Erro ao deletar a relação env-db ou não foi possível encontrá-la', error);
|
45
45
|
}
|
46
46
|
};
|
47
|
-
|
47
|
+
|
48
|
+
/* updatedToken: TMessagingQueueHandler<EMessagingQueue.environmentUpdatedToken> = async (
|
49
|
+
data,
|
50
|
+
ack
|
51
|
+
) => {
|
48
52
|
//TODO: need implement
|
49
|
-
};
|
53
|
+
}; */
|
54
|
+
|
50
55
|
updatedDatabase = async (data, ack) => {
|
51
56
|
try {
|
52
|
-
const relation = await _models.
|
57
|
+
const relation = await _models.EnvDBHost.findOne({
|
53
58
|
where: {
|
54
59
|
envUuid: data.envUuid
|
55
60
|
}
|
@@ -58,7 +63,7 @@ class EnvironmentController extends _app.MessagingController {
|
|
58
63
|
new _services.ApplicationException('Não foi possível atualizar a relação EDB, a relação não foi encontrada');
|
59
64
|
}
|
60
65
|
await relation.update({
|
61
|
-
|
66
|
+
hostUuid: data.database
|
62
67
|
});
|
63
68
|
this.log(`A relação para o ambiente ${data.envUuid} foi atualizada, a migração deverá ser realizada de forma manual`);
|
64
69
|
ack();
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { CreationOptional, Dialect, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
|
2
|
-
export declare class
|
2
|
+
export declare class DatabaseHost extends Model<InferAttributes<DatabaseHost>, InferCreationAttributes<DatabaseHost>> {
|
3
3
|
uuid: CreationOptional<string>;
|
4
4
|
name: string;
|
5
5
|
dialect: Dialect;
|
6
|
+
host: string;
|
6
7
|
username: string;
|
7
8
|
password: string;
|
8
9
|
credential: Buffer;
|
9
10
|
active: boolean;
|
10
11
|
params: CreationOptional<Record<string, any>>;
|
11
12
|
}
|
12
|
-
//# sourceMappingURL=
|
13
|
+
//# sourceMappingURL=DatabaseHost.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DatabaseHost.d.ts","sourceRoot":"","sources":["../../src/models/DatabaseHost.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAEhB,OAAO,EACP,eAAe,EACf,uBAAuB,EACvB,KAAK,EACN,MAAM,WAAW,CAAC;AAGnB,qBAAa,YAAa,SAAQ,KAAK,CACrC,eAAe,CAAC,YAAY,CAAC,EAC7B,uBAAuB,CAAC,YAAY,CAAC,CACtC;IACS,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;CACvD"}
|
@@ -3,12 +3,12 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.DatabaseHost = void 0;
|
7
7
|
var _sequelize = require("sequelize");
|
8
8
|
var _database = require("../utils/database");
|
9
|
-
class
|
10
|
-
exports.
|
11
|
-
|
9
|
+
class DatabaseHost extends _sequelize.Model {}
|
10
|
+
exports.DatabaseHost = DatabaseHost;
|
11
|
+
DatabaseHost.init({
|
12
12
|
uuid: {
|
13
13
|
type: _sequelize.DataTypes.UUID,
|
14
14
|
defaultValue: _sequelize.DataTypes.UUIDV4,
|
@@ -16,6 +16,10 @@ Connection.init({
|
|
16
16
|
allowNull: false,
|
17
17
|
autoIncrement: false
|
18
18
|
},
|
19
|
+
host: {
|
20
|
+
type: _sequelize.DataTypes.STRING(200),
|
21
|
+
allowNull: false
|
22
|
+
},
|
19
23
|
name: {
|
20
24
|
type: _sequelize.DataTypes.STRING(200),
|
21
25
|
allowNull: false
|
@@ -46,7 +50,7 @@ Connection.init({
|
|
46
50
|
allowNull: true
|
47
51
|
}
|
48
52
|
}, {
|
49
|
-
tableName: '
|
53
|
+
tableName: 'database_hosts',
|
50
54
|
sequelize: _database.serviceDB,
|
51
55
|
indexes: [{
|
52
56
|
fields: ['name']
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { CreationOptional, InferAttributes, InferCreationAttributes } from 'sequelize';
|
2
2
|
import { Model } from 'sequelize';
|
3
|
-
export declare class
|
3
|
+
export declare class EnvDBHost extends Model<InferAttributes<EnvDBHost>, InferCreationAttributes<EnvDBHost>> {
|
4
4
|
uuid: CreationOptional<string>;
|
5
5
|
envUuid: string;
|
6
|
-
connUuid: string;
|
7
6
|
envToken: string;
|
7
|
+
hostUuid: string;
|
8
8
|
}
|
9
9
|
//# sourceMappingURL=EnvConnection.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EnvConnection.d.ts","sourceRoot":"","sources":["../../src/models/EnvConnection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAC5F,OAAO,EAAa,KAAK,EAAE,MAAM,WAAW,CAAC;AAG7C,qBAAa,
|
1
|
+
{"version":3,"file":"EnvConnection.d.ts","sourceRoot":"","sources":["../../src/models/EnvConnection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAC5F,OAAO,EAAa,KAAK,EAAE,MAAM,WAAW,CAAC;AAG7C,qBAAa,SAAU,SAAQ,KAAK,CAClC,eAAe,CAAC,SAAS,CAAC,EAC1B,uBAAuB,CAAC,SAAS,CAAC,CACnC;IACS,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAC1B"}
|
@@ -3,12 +3,12 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.EnvDBHost = void 0;
|
7
7
|
var _sequelize = require("sequelize");
|
8
8
|
var _utils = require("../utils");
|
9
|
-
class
|
10
|
-
exports.
|
11
|
-
|
9
|
+
class EnvDBHost extends _sequelize.Model {}
|
10
|
+
exports.EnvDBHost = EnvDBHost;
|
11
|
+
EnvDBHost.init({
|
12
12
|
uuid: {
|
13
13
|
type: _sequelize.DataTypes.UUID,
|
14
14
|
defaultValue: _sequelize.DataTypes.UUIDV4,
|
@@ -16,7 +16,7 @@ EnvConnection.init({
|
|
16
16
|
allowNull: false,
|
17
17
|
autoIncrement: false
|
18
18
|
},
|
19
|
-
|
19
|
+
hostUuid: {
|
20
20
|
type: _sequelize.DataTypes.UUID,
|
21
21
|
allowNull: false
|
22
22
|
},
|
@@ -29,13 +29,13 @@ EnvConnection.init({
|
|
29
29
|
allowNull: false
|
30
30
|
}
|
31
31
|
}, {
|
32
|
-
tableName: '
|
32
|
+
tableName: 'env_dbhost',
|
33
33
|
sequelize: _utils.serviceDB,
|
34
34
|
indexes: [{
|
35
35
|
fields: ['envUuid'],
|
36
36
|
unique: true
|
37
37
|
}, {
|
38
|
-
fields: ['envToken', '
|
38
|
+
fields: ['envToken', 'hostUuid'],
|
39
39
|
unique: true
|
40
40
|
}]
|
41
41
|
});
|
package/lib/models/index.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAKxC,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAKxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAE9B,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,GAAG,CAAC,EAA2C,CAAC"}
|
package/lib/models/index.js
CHANGED
@@ -7,15 +7,15 @@ var _exportNames = {
|
|
7
7
|
NativeModels: true
|
8
8
|
};
|
9
9
|
exports.NativeModels = void 0;
|
10
|
-
var
|
11
|
-
Object.keys(
|
10
|
+
var _DatabaseHost = require("./DatabaseHost");
|
11
|
+
Object.keys(_DatabaseHost).forEach(function (key) {
|
12
12
|
if (key === "default" || key === "__esModule") return;
|
13
13
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
14
|
-
if (key in exports && exports[key] ===
|
14
|
+
if (key in exports && exports[key] === _DatabaseHost[key]) return;
|
15
15
|
Object.defineProperty(exports, key, {
|
16
16
|
enumerable: true,
|
17
17
|
get: function () {
|
18
|
-
return
|
18
|
+
return _DatabaseHost[key];
|
19
19
|
}
|
20
20
|
});
|
21
21
|
});
|
@@ -43,4 +43,4 @@ Object.keys(_Application).forEach(function (key) {
|
|
43
43
|
}
|
44
44
|
});
|
45
45
|
});
|
46
|
-
const NativeModels = exports.NativeModels = [
|
46
|
+
const NativeModels = exports.NativeModels = [_DatabaseHost.DatabaseHost, _EnvConnection.EnvDBHost, _Application.Application];
|
@@ -20,7 +20,7 @@ const NativeMessagingRoutes = {
|
|
20
20
|
/* Environment Sync Database Relations */
|
21
21
|
'exodus.environment.created': envController.created,
|
22
22
|
'exodus.environment.deleted': envController.deleted,
|
23
|
-
'exodus.environment.updated.token': envController.updatedToken,
|
23
|
+
// 'exodus.environment.updated.token': envController.updatedToken, // #não implementado
|
24
24
|
'exodus.environment.updated.database': envController.updatedDatabase
|
25
25
|
};
|
26
26
|
var _default = exports.default = NativeMessagingRoutes;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import Service from '../app/service';
|
2
1
|
import { NextFunction, Response, Router } from 'express';
|
3
2
|
import 'express-async-errors';
|
4
3
|
import * as http from 'http';
|
4
|
+
import Service from '../app/service';
|
5
5
|
import { THttpResponse } from '../contracts/http';
|
6
6
|
import { IService } from '../contracts/service';
|
7
7
|
declare class ExpressService extends Service implements IService {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../src/services/express.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../src/services/express.ts"],"names":[],"mappings":"AACA,OAAgB,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAqB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD,cAAM,cAAe,SAAQ,OAAQ,YAAW,QAAQ;IACtD,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,UAAU,CAAS;IAErB,IAAI;IAuBV,aAAa;IAIb,YAAY,CAAC,WAAW,EAAE,aAAa,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,YAAY;IAiC3E,sBAAsB,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY;IAMtE,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ;IAWzC,0BAA0B,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY;IAUtF,2BAA2B,QACpB,GAAG,OACH,OAAO,OACP,QAAQ,KAEV,YAAY,mBAoBf;IAEI,YAAY,CAAC,MAAM,EAAE,MAAM;IAyBjC,cAAc,CAAC,MAAM,EAAE,MAAM;CAG9B;AAED,eAAe,cAAc,CAAC"}
|
package/lib/services/express.js
CHANGED
@@ -4,16 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
|
-
var _service = _interopRequireDefault(require("../app/service"));
|
8
|
-
var _logger = _interopRequireDefault(require("../utils/logger"));
|
9
7
|
var _cors = _interopRequireDefault(require("cors"));
|
10
8
|
var _express = _interopRequireDefault(require("express"));
|
11
9
|
require("express-async-errors");
|
12
10
|
var http = _interopRequireWildcard(require("http"));
|
13
11
|
var _pinoHttp = _interopRequireDefault(require("pino-http"));
|
12
|
+
var _app = require("../app");
|
13
|
+
var _service = _interopRequireDefault(require("../app/service"));
|
14
14
|
var _http2 = require("../contracts/http");
|
15
|
+
var _logger = _interopRequireDefault(require("../utils/logger"));
|
15
16
|
var _error = require("./error");
|
16
|
-
var _app = require("../app");
|
17
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
18
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
19
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
package/lib/services/rabitmq.js
CHANGED
@@ -10,12 +10,12 @@ var _error = require("./error");
|
|
10
10
|
var _app = require("../app");
|
11
11
|
var _messaging = _interopRequireDefault(require("../routes/messaging"));
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
13
|
-
/**
|
14
|
-
* Serviço de Mensageria
|
15
|
-
*
|
16
|
-
* @class RabbitMQService
|
17
|
-
* @extends {Service}
|
18
|
-
* @implements {IService}
|
13
|
+
/**
|
14
|
+
* Serviço de Mensageria
|
15
|
+
*
|
16
|
+
* @class RabbitMQService
|
17
|
+
* @extends {Service}
|
18
|
+
* @implements {IService}
|
19
19
|
*/
|
20
20
|
class RabbitMQService extends _service.default {
|
21
21
|
connection;
|
package/lib/services/redis.js
CHANGED
@@ -9,12 +9,12 @@ var _redis = require("redis");
|
|
9
9
|
var _error = require("./error");
|
10
10
|
var _app = require("../app");
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
12
|
-
/**
|
13
|
-
* Serviço de cache
|
14
|
-
*
|
15
|
-
* @class RedisService
|
16
|
-
* @extends {Service}
|
17
|
-
* @implements {IService}
|
12
|
+
/**
|
13
|
+
* Serviço de cache
|
14
|
+
*
|
15
|
+
* @class RedisService
|
16
|
+
* @extends {Service}
|
17
|
+
* @implements {IService}
|
18
18
|
*/
|
19
19
|
class RedisService extends _service.default {
|
20
20
|
client;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/services/security.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,GAAG,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAQ,OAAO,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,cAAM,eAAgB,SAAQ,OAAQ,YAAW,QAAQ;IACvD,OAAO,CAAC,UAAU,CAAU;IAC5B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,gBAAgB,CAAU;IAE5B,IAAI;
|
1
|
+
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/services/security.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,GAAG,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAQ,OAAO,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,cAAM,eAAgB,SAAQ,OAAQ,YAAW,QAAQ;IACvD,OAAO,CAAC,UAAU,CAAU;IAC5B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,gBAAgB,CAAU;IAE5B,IAAI;IAOV,OAAO,CAAC,UAAU;YAMJ,cAAc;YAad,aAAa;IAMd,cAAc;;;;IASd,oBAAoB;IAgB1B,aAAa;IAQb,YAAY;IAQZ,mBAAmB;IASb,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,GAAG;IAyB3C,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC;IAkBhF,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,CAAC,GAAG;IA0BzC,eAAe,CAAC,CAAC,GAAG,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC;IAiBzF,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAoBtD,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK;CAgBhE;AAED,eAAe,eAAe,CAAC"}
|
package/lib/services/security.js
CHANGED
@@ -21,6 +21,7 @@ class SecurityService extends _app.Service {
|
|
21
21
|
this.checkPaths();
|
22
22
|
await this.loadPrivateKey();
|
23
23
|
await this.loadPublicKey();
|
24
|
+
await this.loadServicePublicKey();
|
24
25
|
}
|
25
26
|
checkPaths() {
|
26
27
|
!fs.existsSync(_app.Core.settings.getAuthentication().certPath) && fs.mkdirSync(_app.Core.settings.getAuthentication().certPath, {
|
@@ -69,35 +70,35 @@ class SecurityService extends _app.Service {
|
|
69
70
|
}
|
70
71
|
}
|
71
72
|
|
72
|
-
/**
|
73
|
-
* Chave privada emitida por este serviço
|
74
|
-
*
|
75
|
-
* @memberof SecurityService
|
73
|
+
/**
|
74
|
+
* Chave privada emitida por este serviço
|
75
|
+
*
|
76
|
+
* @memberof SecurityService
|
76
77
|
*/
|
77
78
|
getPrivateKey() {
|
78
79
|
return this.privateKey;
|
79
80
|
}
|
80
|
-
/**
|
81
|
-
* Chave publica emitida por este serviço
|
82
|
-
*
|
83
|
-
* @memberof SecurityService
|
81
|
+
/**
|
82
|
+
* Chave publica emitida por este serviço
|
83
|
+
*
|
84
|
+
* @memberof SecurityService
|
84
85
|
*/
|
85
86
|
getPublicKey() {
|
86
87
|
return this.publicKey;
|
87
88
|
}
|
88
|
-
/**
|
89
|
-
* Chave publica emitida pelo serviço do hub se sessões
|
90
|
-
*
|
91
|
-
* @memberof SecurityService
|
89
|
+
/**
|
90
|
+
* Chave publica emitida pelo serviço do hub se sessões
|
91
|
+
*
|
92
|
+
* @memberof SecurityService
|
92
93
|
*/
|
93
94
|
getServicePublicKey() {
|
94
95
|
return this.servicePublicKey;
|
95
96
|
}
|
96
|
-
/**
|
97
|
-
* Criptografía utilizando chave publica
|
98
|
-
*
|
99
|
-
* @param {TSignData} data
|
100
|
-
* @memberof SecurityService
|
97
|
+
/**
|
98
|
+
* Criptografía utilizando chave publica
|
99
|
+
*
|
100
|
+
* @param {TSignData} data
|
101
|
+
* @memberof SecurityService
|
101
102
|
*/
|
102
103
|
async encrypt(data, publicKey) {
|
103
104
|
const currentTime = Math.floor(Date.now() / 1000);
|
@@ -120,11 +121,11 @@ class SecurityService extends _app.Service {
|
|
120
121
|
return false;
|
121
122
|
}
|
122
123
|
}
|
123
|
-
/**
|
124
|
-
* Descriptografia utilizando chave privada
|
125
|
-
*
|
126
|
-
* @param {string} encryptedData
|
127
|
-
* @memberof SecurityService
|
124
|
+
/**
|
125
|
+
* Descriptografia utilizando chave privada
|
126
|
+
*
|
127
|
+
* @param {string} encryptedData
|
128
|
+
* @memberof SecurityService
|
128
129
|
*/
|
129
130
|
async decrypt(encryptedData, privateKey) {
|
130
131
|
try {
|
@@ -138,11 +139,11 @@ class SecurityService extends _app.Service {
|
|
138
139
|
return false;
|
139
140
|
}
|
140
141
|
}
|
141
|
-
/**
|
142
|
-
* Realiza uma assinatura usando chave privada
|
143
|
-
*
|
144
|
-
* @param {TSignData} data
|
145
|
-
* @memberof SecurityService
|
142
|
+
/**
|
143
|
+
* Realiza uma assinatura usando chave privada
|
144
|
+
*
|
145
|
+
* @param {TSignData} data
|
146
|
+
* @memberof SecurityService
|
146
147
|
*/
|
147
148
|
async sign(data, privateKey) {
|
148
149
|
const currentTime = Math.floor(Date.now() / 1000);
|
@@ -168,11 +169,11 @@ class SecurityService extends _app.Service {
|
|
168
169
|
}
|
169
170
|
}
|
170
171
|
|
171
|
-
/**
|
172
|
-
* Verifica assinatura utilizando chave publica
|
173
|
-
*
|
174
|
-
* @param {string} signature
|
175
|
-
* @memberof SecurityService
|
172
|
+
/**
|
173
|
+
* Verifica assinatura utilizando chave publica
|
174
|
+
*
|
175
|
+
* @param {string} signature
|
176
|
+
* @memberof SecurityService
|
176
177
|
*/
|
177
178
|
async verifySignature(signature, publicKey) {
|
178
179
|
try {
|
@@ -184,11 +185,11 @@ class SecurityService extends _app.Service {
|
|
184
185
|
}
|
185
186
|
}
|
186
187
|
|
187
|
-
/**
|
188
|
-
* Criptografía de dados utilizando um buffer automático ao invés de chaves
|
189
|
-
*
|
190
|
-
* @param {(string | object)} data
|
191
|
-
* @memberof SecurityService
|
188
|
+
/**
|
189
|
+
* Criptografía de dados utilizando um buffer automático ao invés de chaves
|
190
|
+
*
|
191
|
+
* @param {(string | object)} data
|
192
|
+
* @memberof SecurityService
|
192
193
|
*/
|
193
194
|
simpleEncrypt(data) {
|
194
195
|
if (process.versions.openssl <= '1.0.1f') {
|
@@ -201,12 +202,12 @@ class SecurityService extends _app.Service {
|
|
201
202
|
encrypted = Buffer.concat([encrypted, cipher.final()]);
|
202
203
|
return [iv.toString('hex') + ':' + encrypted.toString('hex'), key];
|
203
204
|
}
|
204
|
-
/**
|
205
|
-
* Utiliza um buffer para descriptografar dados criptografados através de simpleEncrypt()
|
206
|
-
*
|
207
|
-
* @param {string} data
|
208
|
-
* @param {Buffer} key
|
209
|
-
* @memberof SecurityService
|
205
|
+
/**
|
206
|
+
* Utiliza um buffer para descriptografar dados criptografados através de simpleEncrypt()
|
207
|
+
*
|
208
|
+
* @param {string} data
|
209
|
+
* @param {Buffer} key
|
210
|
+
* @memberof SecurityService
|
210
211
|
*/
|
211
212
|
simpleDecrypt(data, key) {
|
212
213
|
try {
|
@@ -1,23 +1,23 @@
|
|
1
1
|
import { Model, ModelStatic, Sequelize } from 'sequelize';
|
2
2
|
import Service from '../app/service';
|
3
3
|
import { IService } from '../contracts/service';
|
4
|
-
import {
|
4
|
+
import { EnvDBHost } from '../models';
|
5
5
|
declare class SequelizeService extends Service implements IService {
|
6
6
|
serviceDB: Sequelize;
|
7
7
|
masterDB: Sequelize;
|
8
8
|
models: ModelStatic<any>[];
|
9
9
|
connections: Map<string, Sequelize>;
|
10
10
|
initializedModels: Map<string, typeof Model<any, any>>;
|
11
|
-
relations: Map<string,
|
11
|
+
relations: Map<string, EnvDBHost>;
|
12
12
|
constructor();
|
13
13
|
init(): Promise<void>;
|
14
14
|
connectMainDatabase(): Promise<unknown>;
|
15
15
|
reconnect(db: Sequelize, attempts?: number): void;
|
16
16
|
getMasterConnection(): Sequelize;
|
17
|
-
createDB(
|
18
|
-
deleteDB(
|
19
|
-
|
20
|
-
|
17
|
+
createDB(hostUuid: string, name: string): Promise<boolean>;
|
18
|
+
deleteDB(hostUuid: string, name: string): Promise<boolean>;
|
19
|
+
getDatabaseConnection(tenantId: string): Promise<false | Sequelize>;
|
20
|
+
initDatabase(tenantId: string): Promise<false | Sequelize>;
|
21
21
|
registerModels(models: ModelStatic<any>[]): void;
|
22
22
|
getModel<M extends typeof Model<any, any>>(model: typeof Model<any, any> & {
|
23
23
|
initialize: (connection: Sequelize) => M;
|
@@ -26,6 +26,7 @@ declare class SequelizeService extends Service implements IService {
|
|
26
26
|
envToken: string;
|
27
27
|
con_uuid: string;
|
28
28
|
};
|
29
|
+
getDatabaseNamePattern(envToken: string): string;
|
29
30
|
}
|
30
31
|
export default SequelizeService;
|
31
32
|
//# sourceMappingURL=sequelize.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sequelize.d.ts","sourceRoot":"","sources":["../../src/services/sequelize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE1D,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAKhD,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"sequelize.d.ts","sourceRoot":"","sources":["../../src/services/sequelize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE1D,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAKhD,OAAO,EAAE,SAAS,EAAgB,MAAM,WAAW,CAAC;AASpD,cAAM,gBAAiB,SAAQ,OAAQ,YAAW,QAAQ;IACxD,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;IAC3B,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACpC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IACvD,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;;IAM5B,IAAI;IAOJ,mBAAmB;IAgCzB,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,QAAQ,SAAI;IAerC,mBAAmB;IAGb,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IA6CvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAwCvC,qBAAqB,CAAC,QAAQ,EAAE,MAAM;IA6BtC,YAAY,CAAC,QAAQ,EAAE,MAAM;IA4CnC,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE;IAInC,QAAQ,CAAC,CAAC,SAAS,OAAO,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,EAC7C,KAAK,EAAE,OAAO,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG;QAAE,UAAU,EAAE,CAAC,UAAU,EAAE,SAAS,KAAK,CAAC,CAAA;KAAE,EAC5E,QAAQ,EAAE,MAAM;IAwBlB,uBAAuB,CAAC,MAAM,EAAE,MAAM;;;;IAOtC,sBAAsB,CAAC,QAAQ,EAAE,MAAM;CAGxC;AAED,eAAe,gBAAgB,CAAC"}
|
@@ -7,18 +7,18 @@ exports.default = void 0;
|
|
7
7
|
var _sequelize = require("sequelize");
|
8
8
|
var _app = require("../app");
|
9
9
|
var _service = _interopRequireDefault(require("../app/service"));
|
10
|
-
var
|
10
|
+
var _DatabaseHost = require("../models/DatabaseHost");
|
11
11
|
var _database = require("../utils/database");
|
12
12
|
var _logger = _interopRequireDefault(require("../utils/logger"));
|
13
13
|
var _error = require("./error");
|
14
14
|
var _models = require("../models");
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
16
|
-
/**
|
17
|
-
* Serviço de gerênciamento do banco de dados
|
18
|
-
*
|
19
|
-
* @class SequelizeService
|
20
|
-
* @extends {Service}
|
21
|
-
* @implements {IService}
|
16
|
+
/**
|
17
|
+
* Serviço de gerênciamento do banco de dados
|
18
|
+
*
|
19
|
+
* @class SequelizeService
|
20
|
+
* @extends {Service}
|
21
|
+
* @implements {IService}
|
22
22
|
*/
|
23
23
|
class SequelizeService extends _service.default {
|
24
24
|
serviceDB;
|
@@ -80,17 +80,17 @@ class SequelizeService extends _service.default {
|
|
80
80
|
getMasterConnection() {
|
81
81
|
return this.masterDB;
|
82
82
|
}
|
83
|
-
async createDB(
|
84
|
-
const
|
85
|
-
if (!
|
86
|
-
this.log('
|
83
|
+
async createDB(hostUuid, name) {
|
84
|
+
const host = await _DatabaseHost.DatabaseHost.findByPk(hostUuid);
|
85
|
+
if (!host) {
|
86
|
+
this.log('Database host information not found: ' + hostUuid);
|
87
87
|
return false;
|
88
88
|
}
|
89
89
|
const dbQueryName = `${_app.Core.settings.getDatabase().service.database}_${name}`;
|
90
90
|
const sequelize = new _sequelize.Sequelize({
|
91
|
-
dialect:
|
92
|
-
username:
|
93
|
-
password:
|
91
|
+
dialect: host.dialect,
|
92
|
+
username: host.username,
|
93
|
+
password: host.password,
|
94
94
|
define: {
|
95
95
|
timestamps: true
|
96
96
|
},
|
@@ -119,17 +119,17 @@ class SequelizeService extends _service.default {
|
|
119
119
|
});
|
120
120
|
});
|
121
121
|
}
|
122
|
-
async deleteDB(
|
122
|
+
async deleteDB(hostUuid, name) {
|
123
123
|
const dbQueryName = `${_app.Core.settings.getDatabase().service.database}_${name}`;
|
124
|
-
const
|
125
|
-
if (!
|
126
|
-
this.log('
|
124
|
+
const host = await _DatabaseHost.DatabaseHost.findByPk(hostUuid);
|
125
|
+
if (!host) {
|
126
|
+
this.log('Database host information not found: ' + hostUuid);
|
127
127
|
return false;
|
128
128
|
}
|
129
129
|
const sequelize = new _sequelize.Sequelize({
|
130
|
-
dialect:
|
131
|
-
username:
|
132
|
-
password:
|
130
|
+
dialect: host.dialect,
|
131
|
+
username: host.username,
|
132
|
+
password: host.password,
|
133
133
|
define: {
|
134
134
|
timestamps: true
|
135
135
|
},
|
@@ -152,17 +152,21 @@ class SequelizeService extends _service.default {
|
|
152
152
|
});
|
153
153
|
});
|
154
154
|
}
|
155
|
-
async
|
155
|
+
async getDatabaseConnection(tenantId) {
|
156
156
|
let relation;
|
157
|
+
|
158
|
+
/* master or service */
|
157
159
|
if (tenantId == _app.Core.settings.getDatabase().service.database) {
|
158
160
|
return _database.serviceDB;
|
159
161
|
} else if (tenantId == _app.Core.settings.getDatabase().master.database) {
|
160
162
|
return _database.masterDB;
|
161
163
|
}
|
164
|
+
|
165
|
+
/* fetch relation */
|
162
166
|
if (this.relations.get(tenantId)) {
|
163
167
|
relation = this.relations.get(tenantId);
|
164
168
|
} else {
|
165
|
-
relation = await _models.
|
169
|
+
relation = await _models.EnvDBHost.findOne({
|
166
170
|
where: {
|
167
171
|
envUuid: tenantId
|
168
172
|
}
|
@@ -173,41 +177,29 @@ class SequelizeService extends _service.default {
|
|
173
177
|
}
|
174
178
|
this.relations.set(tenantId, relation);
|
175
179
|
}
|
176
|
-
const
|
177
|
-
|
178
|
-
return this.connections.get(queryId) || (await this.initDB(tenantId));
|
180
|
+
const queryId = `${relation.hostUuid}@${this.getDatabaseNamePattern(relation.envToken)}`;
|
181
|
+
return this.connections.get(queryId) || (await this.initDatabase(tenantId));
|
179
182
|
}
|
180
|
-
|
181
|
-
const { con_uuid, envToken } = this.parseDataInfoByTenantId(tenantId);
|
182
|
-
if (con_uuid == Core.settings.getDatabase().service.database) {
|
183
|
-
return serviceDB;
|
184
|
-
} else if (con_uuid == Core.settings.getDatabase().master.database) {
|
185
|
-
return masterDB;
|
186
|
-
}
|
187
|
-
const dbName = `${Core.settings.getDatabase().service.database}_${envToken}`; //nomeclatura padrão do banco de dados do serviço
|
188
|
-
const queryId = `${con_uuid}@${dbName}`;
|
189
|
-
return this.connections.get(queryId) || (await this.initDB(tenantId));
|
190
|
-
} */
|
191
|
-
async initDB(tenantId) {
|
183
|
+
async initDatabase(tenantId) {
|
192
184
|
const {
|
193
|
-
con_uuid,
|
185
|
+
con_uuid: hostUuid,
|
194
186
|
envToken
|
195
187
|
} = this.parseDataInfoByTenantId(tenantId);
|
196
188
|
const dbName = `${_app.Core.settings.getDatabase().service.database}_${envToken}`; //nomeclatura padrão do banco de dados do serviço
|
197
|
-
const queryId = `${
|
189
|
+
const queryId = `${dbName}@${hostUuid}`;
|
198
190
|
if (this.connections.get(queryId)) {
|
199
191
|
return this.connections.get(queryId);
|
200
192
|
}
|
201
|
-
const
|
202
|
-
if (!
|
203
|
-
this.log('Error on init connection, data not found! uuid: ' +
|
193
|
+
const host = await _DatabaseHost.DatabaseHost.findByPk(hostUuid);
|
194
|
+
if (!host) {
|
195
|
+
this.log('Error on init connection, data not found! uuid: ' + hostUuid, 'danger');
|
204
196
|
return false;
|
205
197
|
}
|
206
198
|
const conn = new _sequelize.Sequelize({
|
207
199
|
database: dbName,
|
208
|
-
dialect:
|
209
|
-
username:
|
210
|
-
password:
|
200
|
+
dialect: host.dialect,
|
201
|
+
username: host.username,
|
202
|
+
password: host.password,
|
211
203
|
define: {
|
212
204
|
timestamps: true
|
213
205
|
},
|
@@ -224,9 +216,9 @@ class SequelizeService extends _service.default {
|
|
224
216
|
this.connections.set(queryId, conn);
|
225
217
|
resolve(conn);
|
226
218
|
}).catch(reason => {
|
227
|
-
this.log(`error trying to connect: ${dbName}, UUID: ${
|
219
|
+
this.log(`error trying to connect: ${dbName}, UUID: ${hostUuid}`);
|
228
220
|
reject(reason);
|
229
|
-
new _error.ApplicationException(`error trying to connect: ${dbName}, UUID: ${
|
221
|
+
new _error.ApplicationException(`error trying to connect: ${dbName}, UUID: ${hostUuid}`, reason);
|
230
222
|
});
|
231
223
|
});
|
232
224
|
}
|
@@ -243,7 +235,7 @@ class SequelizeService extends _service.default {
|
|
243
235
|
if (cache) {
|
244
236
|
return cache;
|
245
237
|
}
|
246
|
-
const connection = await this.
|
238
|
+
const connection = await this.getDatabaseConnection(tenantId);
|
247
239
|
if (!connection) {
|
248
240
|
throw new _error.ApplicationException('Não foi possível obter o model espeficificado: Conexão não encontrada');
|
249
241
|
}
|
@@ -261,5 +253,8 @@ class SequelizeService extends _service.default {
|
|
261
253
|
con_uuid
|
262
254
|
};
|
263
255
|
}
|
256
|
+
getDatabaseNamePattern(envToken) {
|
257
|
+
return `${_app.Core.settings.getDatabase().service.database}_${envToken}`;
|
258
|
+
}
|
264
259
|
}
|
265
260
|
var _default = exports.default = SequelizeService;
|
package/lib/services/socket.js
CHANGED
@@ -10,12 +10,12 @@ var _socket = require("socket.io");
|
|
10
10
|
var _express = _interopRequireDefault(require("./express"));
|
11
11
|
var _error = require("./error");
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
13
|
-
/**
|
14
|
-
* Serviço de gerênciamento de comunicação WS/WSS Socket
|
15
|
-
*
|
16
|
-
* @class SocketIOService
|
17
|
-
* @extends {Service}
|
18
|
-
* @implements {IService}
|
13
|
+
/**
|
14
|
+
* Serviço de gerênciamento de comunicação WS/WSS Socket
|
15
|
+
*
|
16
|
+
* @class SocketIOService
|
17
|
+
* @extends {Service}
|
18
|
+
* @implements {IService}
|
19
19
|
*/
|
20
20
|
class SocketIOService extends _service.default {
|
21
21
|
server;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "exodus-framework",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.705",
|
4
4
|
"description": "Exodus Framework",
|
5
5
|
"author": "jhownpaixao",
|
6
6
|
"license": "ISC",
|
@@ -15,11 +15,11 @@
|
|
15
15
|
"build:types": "tsc --emitDeclarationOnly",
|
16
16
|
"dev": "ts-node-dev -r tsconfig-paths/register --respawn --transpile-only --ignore-watch node_modules src/server.ts",
|
17
17
|
"start": "node build/server.js",
|
18
|
-
"fix": "
|
19
|
-
"fix:eslint": "eslint --fix \"**/*.ts\"",
|
20
|
-
"fix:prettier": "prettier --write \"**/*.ts\"",
|
21
|
-
"lint": "
|
22
|
-
"lint:eslint": "eslint \"**/*.ts\"",
|
18
|
+
"fix": "npm run fix:eslint && npm run fix:prettier",
|
19
|
+
"fix:eslint": "eslint --fix \"**/*.ts\" ",
|
20
|
+
"fix:prettier": "prettier --write \"**/*.ts\" ",
|
21
|
+
"lint": "npm run lint:eslint && npm run lint:prettier",
|
22
|
+
"lint:eslint": "eslint \"**/*.ts\" ",
|
23
23
|
"lint:prettier": "prettier --check \"**/*.ts\""
|
24
24
|
},
|
25
25
|
"dependencies": {
|
@@ -82,4 +82,4 @@
|
|
82
82
|
"typescript": "^5.5.4",
|
83
83
|
"vitest": "^2.0.5"
|
84
84
|
}
|
85
|
-
}
|
85
|
+
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Connection.d.ts","sourceRoot":"","sources":["../../src/models/Connection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAEhB,OAAO,EACP,eAAe,EACf,uBAAuB,EACvB,KAAK,EACN,MAAM,WAAW,CAAC;AAGnB,qBAAa,UAAW,SAAQ,KAAK,CACnC,eAAe,CAAC,UAAU,CAAC,EAC3B,uBAAuB,CAAC,UAAU,CAAC,CACpC;IACS,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;CACvD"}
|