exodus-framework 2.0.591 → 2.0.691
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.d.ts +1 -1
- package/lib/app/app.d.ts.map +1 -1
- package/lib/app/app.js +2 -2
- package/lib/contracts/tenant.d.ts +1 -0
- package/lib/contracts/tenant.d.ts.map +1 -0
- package/lib/contracts/tenant.js +1 -0
- package/lib/middlewares/access.d.ts +1 -0
- package/lib/middlewares/access.d.ts.map +1 -1
- package/lib/middlewares/access.js +14 -0
- package/lib/models/Connection.d.ts.map +1 -1
- package/lib/models/Connection.js +1 -1
- package/lib/services/file.d.ts +1 -0
- package/lib/services/file.d.ts.map +1 -1
- package/lib/services/file.js +11 -0
- package/lib/services/sequelize.d.ts +11 -3
- package/lib/services/sequelize.d.ts.map +1 -1
- package/lib/services/sequelize.js +54 -12
- package/lib/utils/session.d.ts +2 -1
- package/lib/utils/session.d.ts.map +1 -1
- package/lib/utils/session.js +3 -1
- package/package.json +1 -1
package/lib/app/app.d.ts
CHANGED
@@ -9,7 +9,7 @@ declare class Exodus extends Core {
|
|
9
9
|
createClusters(): Promise<void>;
|
10
10
|
registerSingletonService(service: IService): void;
|
11
11
|
initServices(): Promise<void>;
|
12
|
-
getVersion(): string | undefined;
|
12
|
+
static getVersion(): string | undefined;
|
13
13
|
}
|
14
14
|
export default Exodus;
|
15
15
|
//# sourceMappingURL=app.d.ts.map
|
package/lib/app/app.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/app/app.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAQ1B,cAAM,MAAO,SAAQ,IAAI;IACvB,OAAO,CAAC,QAAQ,CAAa;;IAOvB,KAAK;IASL,UAAU;IAOV,WAAW;IAIX,cAAc;IAgBpB,wBAAwB,CAAC,OAAO,EAAE,QAAQ;IAGpC,YAAY;IASlB,UAAU,IAAI,MAAM,GAAG,SAAS;
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/app/app.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAQ1B,cAAM,MAAO,SAAQ,IAAI;IACvB,OAAO,CAAC,QAAQ,CAAa;;IAOvB,KAAK;IASL,UAAU;IAOV,WAAW;IAIX,cAAc;IAgBpB,wBAAwB,CAAC,OAAO,EAAE,QAAQ;IAGpC,YAAY;IASlB,MAAM,CAAC,UAAU,IAAI,MAAM,GAAG,SAAS;CAUxC;AACD,eAAe,MAAM,CAAC"}
|
package/lib/app/app.js
CHANGED
@@ -37,7 +37,7 @@ class Exodus extends _core.default {
|
|
37
37
|
//* Cluster Managment
|
38
38
|
async initMaster() {
|
39
39
|
this.log(`✨ Starting ${_core.default.settings.getAppication().description} · Clusters: ${_core.default.settings.getAppication().clusters}`);
|
40
|
-
this.log(`✨ Core version ${
|
40
|
+
this.log(`✨ Core version ${Exodus.getVersion()}`);
|
41
41
|
this.createClusters();
|
42
42
|
}
|
43
43
|
async initCluster() {
|
@@ -70,7 +70,7 @@ class Exodus extends _core.default {
|
|
70
70
|
}
|
71
71
|
|
72
72
|
// *System
|
73
|
-
getVersion() {
|
73
|
+
static getVersion() {
|
74
74
|
try {
|
75
75
|
const packageJson = fs.readFileSync(_path.default.resolve(__dirname, '../../package.json'), 'utf8');
|
76
76
|
const packageData = JSON.parse(packageJson);
|
@@ -0,0 +1 @@
|
|
1
|
+
//# sourceMappingURL=tenant.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tenant.d.ts","sourceRoot":"","sources":["../../src/contracts/tenant.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";
|
@@ -3,6 +3,7 @@ import HttpController from '../app/controller';
|
|
3
3
|
import { TAccountType } from '../contracts';
|
4
4
|
declare class AccessMiddleware extends HttpController {
|
5
5
|
accessLevel: (level: TAccountType[]) => RequestHandler;
|
6
|
+
getTenant: RequestHandler;
|
6
7
|
}
|
7
8
|
export default AccessMiddleware;
|
8
9
|
//# sourceMappingURL=access.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../src/middlewares/access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../src/middlewares/access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAK5C,cAAM,gBAAiB,SAAQ,cAAc;IAC3C,WAAW,UAAW,YAAY,EAAE,KAAG,cAAc,CAWnD;IAEF,SAAS,EAAE,cAAc,CAiBvB;CACH;AAED,eAAe,gBAAgB,CAAC"}
|
@@ -7,6 +7,7 @@ exports.default = void 0;
|
|
7
7
|
var _controller = _interopRequireDefault(require("../app/controller"));
|
8
8
|
var _http = require("../contracts/http");
|
9
9
|
var _error = require("../services/error");
|
10
|
+
var _app = require("../app");
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
11
12
|
class AccessMiddleware extends _controller.default {
|
12
13
|
accessLevel = level => {
|
@@ -17,5 +18,18 @@ class AccessMiddleware extends _controller.default {
|
|
17
18
|
next();
|
18
19
|
};
|
19
20
|
};
|
21
|
+
getTenant = async (req, res, next) => {
|
22
|
+
const account = req.auth?.account;
|
23
|
+
const tenantId = req.header('X-Exodus-Tenant-ID');
|
24
|
+
if (account && account.type != 'ADMINISTRATOR') {
|
25
|
+
if (!tenantId) {
|
26
|
+
throw new _error.ApplicationHttpException('Informações do ambiente incompletas', _http.EHttpResponseCode.incompleteRequest);
|
27
|
+
}
|
28
|
+
}
|
29
|
+
req.tenant = {
|
30
|
+
id: tenantId || `root@${_app.Core.settings.getDatabase().service}`
|
31
|
+
};
|
32
|
+
next();
|
33
|
+
};
|
20
34
|
}
|
21
35
|
var _default = exports.default = AccessMiddleware;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Connection.d.ts","sourceRoot":"","sources":["../../src/models/Connection.ts"],"names":[],"mappings":"
|
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,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;CACvD"}
|
package/lib/models/Connection.js
CHANGED
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.Connection = void 0;
|
7
|
-
var _database = require("../utils/database");
|
8
7
|
var _sequelize = require("sequelize");
|
8
|
+
var _database = require("../utils/database");
|
9
9
|
class Connection extends _sequelize.Model {}
|
10
10
|
exports.Connection = Connection;
|
11
11
|
Connection.init({
|
package/lib/services/file.d.ts
CHANGED
@@ -6,6 +6,7 @@ declare class FileService extends Service implements IService {
|
|
6
6
|
private checkPaths;
|
7
7
|
private cleanTemp;
|
8
8
|
save(filename: string, destiny: keyof TFilePathSettings): Promise<string | boolean>;
|
9
|
+
delete(filename: string, destiny: keyof TFilePathSettings): Promise<boolean>;
|
9
10
|
listFiles(origin: keyof TFilePathSettings, cb: (file: string[]) => void): void;
|
10
11
|
}
|
11
12
|
export default FileService;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/services/file.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAIrC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,cAAM,WAAY,SAAQ,OAAQ,YAAW,QAAQ;IAC7C,IAAI;YAKI,UAAU;YAKV,SAAS;IASjB,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,iBAAiB;
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/services/file.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAIrC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,cAAM,WAAY,SAAQ,OAAQ,YAAW,QAAQ;IAC7C,IAAI;YAKI,UAAU;YAKV,SAAS;IASjB,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,iBAAiB;IAavD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,iBAAiB;IAW/D,SAAS,CAAC,MAAM,EAAE,MAAM,iBAAiB,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI;CAIxE;AACD,eAAe,WAAW,CAAC"}
|
package/lib/services/file.js
CHANGED
@@ -46,6 +46,17 @@ class FileService extends _service.default {
|
|
46
46
|
return false;
|
47
47
|
});
|
48
48
|
}
|
49
|
+
async delete(filename, destiny) {
|
50
|
+
const d = _app.Core.settings.getAppication().filePaths[destiny] + '/' + filename;
|
51
|
+
return await fsPromisses.unlink(d).then(() => true).catch(e => {
|
52
|
+
(0, _logger.default)().error({
|
53
|
+
filename,
|
54
|
+
destiny,
|
55
|
+
erro: e
|
56
|
+
}, 'Não foi possível deletar o arquivo');
|
57
|
+
return false;
|
58
|
+
});
|
59
|
+
}
|
49
60
|
listFiles(origin, cb) {
|
50
61
|
const p = _app.Core.settings.getAppication().filePaths[origin];
|
51
62
|
fs.readdir(p, (_, file) => cb(file));
|
@@ -1,11 +1,12 @@
|
|
1
|
+
import { Model, ModelStatic, Sequelize } from 'sequelize';
|
1
2
|
import Service from '../app/service';
|
2
|
-
import { ModelStatic, Sequelize } from 'sequelize';
|
3
3
|
import { IService } from '../contracts/service';
|
4
4
|
declare class SequelizeService extends Service implements IService {
|
5
5
|
serviceDB: Sequelize;
|
6
6
|
masterDB: Sequelize;
|
7
7
|
models: ModelStatic<any>[];
|
8
8
|
connections: Map<string, Sequelize>;
|
9
|
+
initializedModels: Map<string, typeof Model<any, any>>;
|
9
10
|
constructor();
|
10
11
|
init(): Promise<void>;
|
11
12
|
connectMainDatabase(): Promise<unknown>;
|
@@ -13,9 +14,16 @@ declare class SequelizeService extends Service implements IService {
|
|
13
14
|
getMasterConnection(): Sequelize;
|
14
15
|
createDB(connection_uuid: string, name: string): Promise<boolean>;
|
15
16
|
deleteDB(connection_uuid: string, name: string): Promise<boolean>;
|
16
|
-
getDB(
|
17
|
-
initDB(
|
17
|
+
getDB(tenantId: string): Promise<Sequelize>;
|
18
|
+
initDB(tenantId: string): Promise<unknown>;
|
18
19
|
registerModels(models: ModelStatic<any>[]): void;
|
20
|
+
getModel<M extends typeof Model<any, any>>(model: typeof Model<any, any> & {
|
21
|
+
initialize: (connection: Sequelize) => M;
|
22
|
+
}, tenantId: string): Promise<M>;
|
23
|
+
parseDataInfoByTenantId(tenant: string): {
|
24
|
+
envToken: string;
|
25
|
+
con_uuid: string;
|
26
|
+
};
|
19
27
|
}
|
20
28
|
export default SequelizeService;
|
21
29
|
//# sourceMappingURL=sequelize.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sequelize.d.ts","sourceRoot":"","sources":["../../src/services/sequelize.ts"],"names":[],"mappings":"AAAA,OAAO,
|
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;AAahD,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;;IAMjD,IAAI;IAOJ,mBAAmB;IA4BzB,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,QAAQ,SAAI;IAerC,mBAAmB;IAGb,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IA6C9C,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAwC9C,KAAK,CAAC,QAAQ,EAAE,MAAM;IAYtB,MAAM,CAAC,QAAQ,EAAE,MAAM;IA+C7B,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;IAmBlB,uBAAuB,CAAC,MAAM,EAAE,MAAM;;;;CAMvC;AAED,eAAe,gBAAgB,CAAC"}
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
|
+
var _sequelize = require("sequelize");
|
8
|
+
var _app = require("../app");
|
7
9
|
var _service = _interopRequireDefault(require("../app/service"));
|
8
10
|
var _Connection = require("../models/Connection");
|
9
11
|
var _database = require("../utils/database");
|
10
12
|
var _logger = _interopRequireDefault(require("../utils/logger"));
|
11
|
-
var _sequelize = require("sequelize");
|
12
13
|
var _error = require("./error");
|
13
|
-
var _app = require("../app");
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
15
15
|
/**
|
16
16
|
* Serviço de gerênciamento do banco de dados
|
@@ -24,6 +24,7 @@ class SequelizeService extends _service.default {
|
|
24
24
|
masterDB;
|
25
25
|
models;
|
26
26
|
connections;
|
27
|
+
initializedModels;
|
27
28
|
|
28
29
|
//# Initialization
|
29
30
|
constructor() {
|
@@ -33,6 +34,7 @@ class SequelizeService extends _service.default {
|
|
33
34
|
this.serviceDB = _database.serviceDB;
|
34
35
|
this.masterDB = _database.masterDB;
|
35
36
|
this.connections = new Map();
|
37
|
+
this.initializedModels = new Map();
|
36
38
|
await this.connectMainDatabase();
|
37
39
|
}
|
38
40
|
async connectMainDatabase() {
|
@@ -145,20 +147,33 @@ class SequelizeService extends _service.default {
|
|
145
147
|
});
|
146
148
|
});
|
147
149
|
}
|
148
|
-
async getDB(
|
149
|
-
const
|
150
|
-
|
150
|
+
async getDB(tenantId) {
|
151
|
+
const {
|
152
|
+
con_uuid,
|
153
|
+
envToken
|
154
|
+
} = this.parseDataInfoByTenantId(tenantId);
|
155
|
+
if (con_uuid == _app.Core.settings.getDatabase().service.database) {
|
156
|
+
return _database.serviceDB;
|
157
|
+
} else if (con_uuid == _app.Core.settings.getDatabase().master.database) {
|
158
|
+
return _database.masterDB;
|
159
|
+
}
|
160
|
+
const dbQueryName = `${_app.Core.settings.getDatabase().service.database}_${envToken}`;
|
161
|
+
const queryId = `${con_uuid}@${dbQueryName}`;
|
151
162
|
return this.connections.get(queryId);
|
152
163
|
}
|
153
|
-
async initDB(
|
154
|
-
const
|
155
|
-
|
164
|
+
async initDB(tenantId) {
|
165
|
+
const {
|
166
|
+
con_uuid,
|
167
|
+
envToken
|
168
|
+
} = this.parseDataInfoByTenantId(tenantId);
|
169
|
+
const dbQueryName = `${_app.Core.settings.getDatabase().service.database}_${envToken}`;
|
170
|
+
const queryId = `${con_uuid}@${dbQueryName}`;
|
156
171
|
if (this.connections.get(queryId)) {
|
157
172
|
return false;
|
158
173
|
}
|
159
|
-
const connData = await _Connection.Connection.findByPk(
|
174
|
+
const connData = await _Connection.Connection.findByPk(con_uuid);
|
160
175
|
if (!connData) {
|
161
|
-
this.log('Connection data not found: ' +
|
176
|
+
this.log('Connection data not found: ' + con_uuid);
|
162
177
|
return false;
|
163
178
|
}
|
164
179
|
const conn = new _sequelize.Sequelize({
|
@@ -182,14 +197,41 @@ class SequelizeService extends _service.default {
|
|
182
197
|
this.connections.set(queryId, conn);
|
183
198
|
resolve(true);
|
184
199
|
}).catch(reason => {
|
185
|
-
this.log(`error trying to connect: ${dbQueryName}, UUID: ${
|
200
|
+
this.log(`error trying to connect: ${dbQueryName}, UUID: ${con_uuid}`);
|
186
201
|
reject(reason);
|
187
|
-
new _error.ApplicationException(`error trying to connect: ${dbQueryName}, UUID: ${
|
202
|
+
new _error.ApplicationException(`error trying to connect: ${dbQueryName}, UUID: ${con_uuid}`, reason);
|
188
203
|
});
|
189
204
|
});
|
190
205
|
}
|
191
206
|
registerModels(models) {
|
192
207
|
this.models = models;
|
193
208
|
}
|
209
|
+
async getModel(model, tenantId) {
|
210
|
+
const {
|
211
|
+
con_uuid,
|
212
|
+
envToken
|
213
|
+
} = this.parseDataInfoByTenantId(tenantId);
|
214
|
+
const query = `${envToken}@${con_uuid}`;
|
215
|
+
const cache = this.initializedModels.get(query);
|
216
|
+
if (cache) {
|
217
|
+
return cache;
|
218
|
+
}
|
219
|
+
const connection = await this.getDB(tenantId);
|
220
|
+
if (connection) {
|
221
|
+
const m = model.initialize(connection);
|
222
|
+
this.initializedModels.set(query, m);
|
223
|
+
return m;
|
224
|
+
}
|
225
|
+
return null;
|
226
|
+
}
|
227
|
+
parseDataInfoByTenantId(tenant) {
|
228
|
+
const e = tenant.split('@');
|
229
|
+
const envToken = e[0];
|
230
|
+
const con_uuid = e[1];
|
231
|
+
return {
|
232
|
+
envToken,
|
233
|
+
con_uuid
|
234
|
+
};
|
235
|
+
}
|
194
236
|
}
|
195
237
|
var _default = exports.default = SequelizeService;
|
package/lib/utils/session.d.ts
CHANGED
@@ -2,7 +2,8 @@ import Api from './api';
|
|
2
2
|
export declare class SessionAPI extends Api {
|
3
3
|
host: string;
|
4
4
|
headers: {
|
5
|
-
'
|
5
|
+
'X-Exodus-App-Sec': string;
|
6
|
+
'X-Exodus-Core-Version': string;
|
6
7
|
};
|
7
8
|
validateStatus(status: number): boolean;
|
8
9
|
getCertificate(): Promise<import("..").IApiResponse<string>>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/utils/session.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/utils/session.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,OAAO,CAAC;AAExB,qBAAa,UAAW,SAAQ,GAAG;IACjC,IAAI,SAA+B;IACnC,OAAO;;;MAGL;IAEF,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAIjC,cAAc;CAGrB"}
|
package/lib/utils/session.js
CHANGED
@@ -4,12 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.SessionAPI = void 0;
|
7
|
+
var _app = require("../app");
|
7
8
|
var _api = _interopRequireDefault(require("./api"));
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
10
|
class SessionAPI extends _api.default {
|
10
11
|
host = process.env.APP_SESSION_URL;
|
11
12
|
headers = {
|
12
|
-
'
|
13
|
+
'X-Exodus-App-Sec': this.getLogicalSecurityId(),
|
14
|
+
'X-Exodus-Core-Version': _app.Exodus.getVersion()
|
13
15
|
};
|
14
16
|
validateStatus(status) {
|
15
17
|
return status < 400;
|