cloud-ide-lms-model 1.0.0 → 1.0.1
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/common-types/common.js +6 -7
- package/lib/model/auth/forgot-password.js +6 -7
- package/lib/model/auth/login.js +12 -14
- package/lib/model/auth/register.js +6 -7
- package/lib/model/auth/reset-password.js +6 -7
- package/lib/model/core/design-config.js +6 -7
- package/lib/model/core/entity.js +9 -27
- package/lib/model/core/general-master.js +6 -7
- package/lib/model/core/menu.js +6 -7
- package/lib/model/core/pin-code.js +6 -7
- package/lib/model/core/user.js +6 -7
- package/lib/schema/auth/mpin.js +2 -5
- package/lib/schema/core/core_system_config.js +2 -5
- package/lib/schema/core/core_system_logs.js +2 -5
- package/lib/schema/core/core_system_menu.js +2 -5
- package/lib/schema/core/core_system_pages.js +2 -5
- package/lib/schema/core/core_system_pages_theme.js +2 -5
- package/lib/schema/email/email_list.js +2 -5
- package/lib/schema/email/email_log.js +2 -5
- package/lib/schema/email/email_reference.js +2 -5
- package/lib/schema/email/email_subscription_vendor.js +2 -5
- package/lib/schema/email/email_templete.js +2 -5
- package/lib/schema/email/email_vendor.js +2 -5
- package/lib/utilities/helpers/encryption.helper.js +3 -3
- package/lib/utilities/helpers/error.helper.js +5 -9
- package/lib/utilities/helpers/response.helper.js +1 -1
- package/lib/utilities/helpers/string.helper.js +147 -199
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initialTableData = exports.MTableQueries = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
class MTableQueries {
|
|
5
|
+
constructor(init) {
|
|
6
6
|
this.total = 1;
|
|
7
7
|
this.pageIndex = 1;
|
|
8
8
|
this.pageSize = 10;
|
|
@@ -13,9 +13,9 @@ var MTableQueries = /** @class */ (function () {
|
|
|
13
13
|
};
|
|
14
14
|
Object.assign(this, init);
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
Validate() {
|
|
17
17
|
var _a, _b, _c, _d, _e;
|
|
18
|
-
|
|
18
|
+
let errorLogger = {};
|
|
19
19
|
if (this.sort) {
|
|
20
20
|
if (((_a = this.sort) === null || _a === void 0 ? void 0 : _a.order) != 'asc' && ((_b = this.sort) === null || _b === void 0 ? void 0 : _b.order) != 'desc' && ((_c = this.sort) === null || _c === void 0 ? void 0 : _c.order) != '') {
|
|
21
21
|
errorLogger.sort = "Incorect Sort order!";
|
|
@@ -44,9 +44,8 @@ var MTableQueries = /** @class */ (function () {
|
|
|
44
44
|
errorLogger.pageSize = "Page Size is required";
|
|
45
45
|
}
|
|
46
46
|
return errorLogger;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
}());
|
|
47
|
+
}
|
|
48
|
+
}
|
|
50
49
|
exports.MTableQueries = MTableQueries;
|
|
51
50
|
exports.initialTableData = {
|
|
52
51
|
total: 0,
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MForgotPassword = void 0;
|
|
4
4
|
/* INTERFACE END */
|
|
5
5
|
/* MODEL START */
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
class MForgotPassword {
|
|
7
|
+
constructor(init) {
|
|
8
8
|
Object.assign(this, init);
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
Validate() {
|
|
11
11
|
var _a, _b, _c;
|
|
12
|
-
|
|
12
|
+
let errorLogger = {};
|
|
13
13
|
/* Check method set or not */
|
|
14
14
|
if (!this.custom_forgot_password_method) {
|
|
15
15
|
errorLogger.custom_forgot_password_method = "Forgot Password Method is Required!";
|
|
@@ -56,7 +56,6 @@ var MForgotPassword = /** @class */ (function () {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
return errorLogger;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
}());
|
|
59
|
+
}
|
|
60
|
+
}
|
|
62
61
|
exports.MForgotPassword = MForgotPassword;
|
package/lib/model/auth/login.js
CHANGED
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MReLogin = exports.MLogin = void 0;
|
|
4
4
|
/* INTERFACE END */
|
|
5
5
|
/* MODEL START */
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
class MLogin {
|
|
7
|
+
constructor(init) {
|
|
8
8
|
Object.assign(this, init);
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
Validate() {
|
|
11
11
|
var _a, _b;
|
|
12
|
-
|
|
12
|
+
let errorLogger = {};
|
|
13
13
|
if (!this.user_username) {
|
|
14
14
|
errorLogger.user_username = "Username is Required";
|
|
15
15
|
}
|
|
@@ -50,19 +50,18 @@ var MLogin = /** @class */ (function () {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
return errorLogger;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
}());
|
|
53
|
+
}
|
|
54
|
+
}
|
|
56
55
|
exports.MLogin = MLogin;
|
|
57
56
|
/* INTERFACE END */
|
|
58
57
|
/* MODEL START */
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
class MReLogin {
|
|
59
|
+
constructor(init) {
|
|
61
60
|
Object.assign(this, init);
|
|
62
61
|
}
|
|
63
|
-
|
|
62
|
+
Validate() {
|
|
64
63
|
var _a, _b;
|
|
65
|
-
|
|
64
|
+
let errorLogger = {};
|
|
66
65
|
if (!this.token) {
|
|
67
66
|
errorLogger.token = "Token is Required";
|
|
68
67
|
}
|
|
@@ -103,7 +102,6 @@ var MReLogin = /** @class */ (function () {
|
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
return errorLogger;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
}());
|
|
105
|
+
}
|
|
106
|
+
}
|
|
109
107
|
exports.MReLogin = MReLogin;
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MRegister = void 0;
|
|
4
4
|
/* INTERFACE END */
|
|
5
5
|
/* MODEL START */
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
class MRegister {
|
|
7
|
+
constructor(init) {
|
|
8
8
|
Object.assign(this, init);
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
Validate() {
|
|
11
11
|
var _a, _b;
|
|
12
|
-
|
|
12
|
+
let errorLogger = [];
|
|
13
13
|
if (!this.user_username) {
|
|
14
14
|
errorLogger.push({
|
|
15
15
|
control: "user_username",
|
|
@@ -27,7 +27,6 @@ var MRegister = /** @class */ (function () {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
return errorLogger;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
}());
|
|
30
|
+
}
|
|
31
|
+
}
|
|
33
32
|
exports.MRegister = MRegister;
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MResetPassword = void 0;
|
|
4
4
|
/* INTERFACE END */
|
|
5
5
|
/* MODEL START */
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
class MResetPassword {
|
|
7
|
+
constructor(init) {
|
|
8
8
|
Object.assign(this, init);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Validate() {
|
|
11
|
+
let errorLogger = {};
|
|
12
12
|
if (!this.sylog_config_data) {
|
|
13
13
|
errorLogger.sylog_config_data = "Configuration Data is Required!";
|
|
14
14
|
}
|
|
@@ -16,7 +16,6 @@ var MResetPassword = /** @class */ (function () {
|
|
|
16
16
|
errorLogger.user_password = "Password is Required!";
|
|
17
17
|
}
|
|
18
18
|
return errorLogger;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
}());
|
|
19
|
+
}
|
|
20
|
+
}
|
|
22
21
|
exports.MResetPassword = MResetPassword;
|
|
@@ -3,17 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MDesignConfig = void 0;
|
|
4
4
|
/* INTERFACE END */
|
|
5
5
|
/* MODEL START */
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
class MDesignConfig {
|
|
7
|
+
constructor(init) {
|
|
8
8
|
Object.assign(this, init);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Validate() {
|
|
11
|
+
let errorLogger = {};
|
|
12
12
|
if (!this.sypg_page_code) {
|
|
13
13
|
errorLogger.sypg_page_code = "Page Code is Required!";
|
|
14
14
|
}
|
|
15
15
|
return errorLogger;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}());
|
|
16
|
+
}
|
|
17
|
+
}
|
|
19
18
|
exports.MDesignConfig = MDesignConfig;
|
package/lib/model/core/entity.js
CHANGED
|
@@ -1,35 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.MEntity = void 0;
|
|
19
|
-
|
|
4
|
+
const common_1 = require("../../common-types/common");
|
|
20
5
|
/* INTERFACE END */
|
|
21
6
|
/* MODEL START */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Object.assign(_this, init);
|
|
27
|
-
return _this;
|
|
7
|
+
class MEntity extends common_1.MTableQueries {
|
|
8
|
+
constructor(init) {
|
|
9
|
+
super(init);
|
|
10
|
+
Object.assign(this, init);
|
|
28
11
|
}
|
|
29
|
-
|
|
30
|
-
|
|
12
|
+
Validate() {
|
|
13
|
+
let errorLogger = {};
|
|
31
14
|
return errorLogger;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
}(common_1.MTableQueries));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
35
17
|
exports.MEntity = MEntity;
|
|
@@ -3,17 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MGeneralMasterSelect = void 0;
|
|
4
4
|
/* INTERFACE END */
|
|
5
5
|
/* MODEL START */
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
class MGeneralMasterSelect {
|
|
7
|
+
constructor(init) {
|
|
8
8
|
Object.assign(this, init);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Validate() {
|
|
11
|
+
let errorLogger = {};
|
|
12
12
|
if (!this.sygmt_code) {
|
|
13
13
|
errorLogger.sygmt_code = "Master Type is required";
|
|
14
14
|
}
|
|
15
15
|
return errorLogger;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}());
|
|
16
|
+
}
|
|
17
|
+
}
|
|
19
18
|
exports.MGeneralMasterSelect = MGeneralMasterSelect;
|
package/lib/model/core/menu.js
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MMenu = void 0;
|
|
4
4
|
/* INTERFACE END */
|
|
5
5
|
/* MODEL START */
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
class MMenu {
|
|
7
|
+
constructor(init) {
|
|
8
8
|
Object.assign(this, init);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Validate() {
|
|
11
|
+
let errorLogger = {};
|
|
12
12
|
if (!this.syme_id) {
|
|
13
13
|
errorLogger.syme_id = "System menu ID is Required!";
|
|
14
14
|
}
|
|
@@ -25,7 +25,6 @@ var MMenu = /** @class */ (function () {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
return errorLogger;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
}());
|
|
28
|
+
}
|
|
29
|
+
}
|
|
31
30
|
exports.MMenu = MMenu;
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MPinCodeSelect = void 0;
|
|
4
4
|
/* INTERFACE END */
|
|
5
5
|
/* MODEL START */
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
class MPinCodeSelect {
|
|
7
|
+
constructor(init) {
|
|
8
8
|
Object.assign(this, init);
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
Validate() {
|
|
11
11
|
var _a;
|
|
12
|
-
|
|
12
|
+
let errorLogger = {};
|
|
13
13
|
if (!this.sypin_pincode) {
|
|
14
14
|
errorLogger.sypin_pincode = "Pin Code is Required!";
|
|
15
15
|
}
|
|
@@ -22,7 +22,6 @@ var MPinCodeSelect = /** @class */ (function () {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
return errorLogger;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}());
|
|
25
|
+
}
|
|
26
|
+
}
|
|
28
27
|
exports.MPinCodeSelect = MPinCodeSelect;
|
package/lib/model/core/user.js
CHANGED
|
@@ -3,17 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MUserSelect = void 0;
|
|
4
4
|
/* INTERFACE END */
|
|
5
5
|
/* MODEL START */
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
class MUserSelect {
|
|
7
|
+
constructor(init) {
|
|
8
8
|
Object.assign(this, init);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Validate() {
|
|
11
|
+
let errorLogger = {};
|
|
12
12
|
if (!this.user_fullname) {
|
|
13
13
|
errorLogger.user_fullname = "Name of user is Required!";
|
|
14
14
|
}
|
|
15
15
|
return errorLogger;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}());
|
|
16
|
+
}
|
|
17
|
+
}
|
|
19
18
|
exports.MUserSelect = MUserSelect;
|
package/lib/schema/auth/mpin.js
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ICoreSyco = void 0;
|
|
4
4
|
/* INTERFASE START */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
return ICoreSyco;
|
|
9
|
-
}());
|
|
5
|
+
class ICoreSyco {
|
|
6
|
+
}
|
|
10
7
|
exports.ICoreSyco = ICoreSyco;
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ICoreSylog = void 0;
|
|
4
4
|
/* INTERFASE START */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
return ICoreSylog;
|
|
9
|
-
}());
|
|
5
|
+
class ICoreSylog {
|
|
6
|
+
}
|
|
10
7
|
exports.ICoreSylog = ICoreSylog;
|
|
11
8
|
/*
|
|
12
9
|
|| EXAMPLE for TRACE log type
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ICoreSyme = void 0;
|
|
4
4
|
/* INTERFASE START */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
return ICoreSyme;
|
|
9
|
-
}());
|
|
5
|
+
class ICoreSyme {
|
|
6
|
+
}
|
|
10
7
|
exports.ICoreSyme = ICoreSyme;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ICoreSypg = void 0;
|
|
4
4
|
/* INTERFASE START */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
return ICoreSypg;
|
|
9
|
-
}());
|
|
5
|
+
class ICoreSypg {
|
|
6
|
+
}
|
|
10
7
|
exports.ICoreSypg = ICoreSypg;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ICoreSytm = void 0;
|
|
4
4
|
/* INTERFASE START */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
return ICoreSytm;
|
|
9
|
-
}());
|
|
5
|
+
class ICoreSytm {
|
|
6
|
+
}
|
|
10
7
|
exports.ICoreSytm = ICoreSytm;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IEmailList = void 0;
|
|
4
4
|
/* INTERFASE START */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
return IEmailList;
|
|
9
|
-
}());
|
|
5
|
+
class IEmailList {
|
|
6
|
+
}
|
|
10
7
|
exports.IEmailList = IEmailList;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IEmailLog = void 0;
|
|
4
4
|
/* INTERFASE START */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
return IEmailLog;
|
|
9
|
-
}());
|
|
5
|
+
class IEmailLog {
|
|
6
|
+
}
|
|
10
7
|
exports.IEmailLog = IEmailLog;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IEmailReference = void 0;
|
|
4
4
|
/* INTERFASE START */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
return IEmailReference;
|
|
9
|
-
}());
|
|
5
|
+
class IEmailReference {
|
|
6
|
+
}
|
|
10
7
|
exports.IEmailReference = IEmailReference;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IEmailVendorSubscription = void 0;
|
|
4
4
|
/* INTERFASE START */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
return IEmailVendorSubscription;
|
|
9
|
-
}());
|
|
5
|
+
class IEmailVendorSubscription {
|
|
6
|
+
}
|
|
10
7
|
exports.IEmailVendorSubscription = IEmailVendorSubscription;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IEmailTemplete = void 0;
|
|
4
4
|
/* INTERFASE START */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
return IEmailTemplete;
|
|
9
|
-
}());
|
|
5
|
+
class IEmailTemplete {
|
|
6
|
+
}
|
|
10
7
|
exports.IEmailTemplete = IEmailTemplete;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IEmailVendor = void 0;
|
|
4
4
|
/* INTERFASE START */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
return IEmailVendor;
|
|
9
|
-
}());
|
|
5
|
+
class IEmailVendor {
|
|
6
|
+
}
|
|
10
7
|
exports.IEmailVendor = IEmailVendor;
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.customDecrypt = void 0;
|
|
4
4
|
// Custom decryption function
|
|
5
5
|
function customDecrypt(encryptedPassword) {
|
|
6
|
-
|
|
7
|
-
for (
|
|
6
|
+
let decryptedPassword = '';
|
|
7
|
+
for (let i = 0; i < encryptedPassword.length; i++) {
|
|
8
8
|
// Shift ASCII value of each character back by the same amount
|
|
9
|
-
|
|
9
|
+
const decryptedCharCode = encryptedPassword.charCodeAt(i) - 1; // Shift back by 1
|
|
10
10
|
decryptedPassword += String.fromCharCode(decryptedCharCode);
|
|
11
11
|
}
|
|
12
12
|
return decryptedPassword;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ErrorLoggerResponseHelper = exports.errorLoggerResponse = exports.MErrorLoggerHelper = exports.errorLoggerRegister = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
return MErrorLoggerHelper;
|
|
8
|
-
}());
|
|
4
|
+
class MErrorLoggerHelper {
|
|
5
|
+
}
|
|
9
6
|
exports.MErrorLoggerHelper = MErrorLoggerHelper;
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
class ErrorLoggerResponseHelper {
|
|
8
|
+
constructor() {
|
|
12
9
|
this.errorLogged = {};
|
|
13
10
|
}
|
|
14
|
-
|
|
15
|
-
}());
|
|
11
|
+
}
|
|
16
12
|
exports.ErrorLoggerResponseHelper = ErrorLoggerResponseHelper;
|
|
17
13
|
function errorLoggerRegister(errorLoggerRegister) {
|
|
18
14
|
}
|
|
@@ -8,33 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
11
|
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
39
12
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
40
13
|
var m = o[Symbol.asyncIterator], i;
|
|
@@ -45,188 +18,163 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
|
45
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
19
|
exports.stringInterpolation = void 0;
|
|
47
20
|
function stringInterpolation(variables, body, data) {
|
|
48
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
/*
|
|
23
|
+
const placeholders = {
|
|
24
|
+
'status': 'user.status',
|
|
25
|
+
'userName': 'user.name',
|
|
26
|
+
'userFullName': 'user.fullName',
|
|
27
|
+
'entityName': 'entity.name',
|
|
28
|
+
'entityLoginTime': 'entity.data~login',
|
|
29
|
+
'entityAddress': 'entity.address.city',
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
const data = {
|
|
34
|
+
user: {
|
|
35
|
+
status: 'active',
|
|
36
|
+
name: 'John Doe',
|
|
37
|
+
fullName: 'John Doe Jr.',
|
|
38
|
+
},
|
|
39
|
+
entity: {
|
|
40
|
+
name: 'Acme Corp',
|
|
41
|
+
data: [
|
|
42
|
+
{ login: '2 days ago' },
|
|
43
|
+
{ login: '3 days ago' },
|
|
44
|
+
],
|
|
45
|
+
address: {
|
|
46
|
+
city: 'Metropolis',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
const template = 'Hello, {userName}! Your status is {status}. Full name is {userFullName}.' +
|
|
53
|
+
'[entity-data] This is the row for login time: {entityLoginTime}. [/entity-data]' +
|
|
54
|
+
'Your entity is {entityName}. The city is {entityAddress}.';
|
|
55
|
+
|
|
56
|
+
*/
|
|
57
|
+
var _a, e_1, _b, _c, _d, e_2, _e, _f, _g, e_3, _h, _j;
|
|
58
|
+
var _k, _l, _m;
|
|
59
|
+
let bodyArray = body.split("//");
|
|
60
|
+
let replacedBody = [];
|
|
61
|
+
try {
|
|
62
|
+
for (var _o = true, bodyArray_1 = __asyncValues(bodyArray), bodyArray_1_1; bodyArray_1_1 = yield bodyArray_1.next(), _a = bodyArray_1_1.done, !_a; _o = true) {
|
|
63
|
+
_c = bodyArray_1_1.value;
|
|
64
|
+
_o = false;
|
|
65
|
+
const body_row = _c;
|
|
66
|
+
let body_row_init = [body_row];
|
|
67
|
+
if (body_row.includes('[')) {
|
|
68
|
+
body_row_init = [];
|
|
69
|
+
let row_count = 0;
|
|
70
|
+
let variable_array = body_row.slice(1, (body_row === null || body_row === void 0 ? void 0 : body_row.indexOf(']')));
|
|
71
|
+
if (variable_array === null || variable_array === void 0 ? void 0 : variable_array.includes("-")) {
|
|
72
|
+
let spilited_variable_array = variable_array === null || variable_array === void 0 ? void 0 : variable_array.split("-");
|
|
73
|
+
if ((spilited_variable_array === null || spilited_variable_array === void 0 ? void 0 : spilited_variable_array.length) == 2) {
|
|
74
|
+
row_count = (_k = data[spilited_variable_array[0]][spilited_variable_array[1]]) === null || _k === void 0 ? void 0 : _k.length;
|
|
84
75
|
}
|
|
85
76
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
_r.trys.push([4, 21, 22, 27]);
|
|
89
|
-
_b = true, body_row_init_1 = (e_2 = void 0, __asyncValues(body_row_init));
|
|
90
|
-
_r.label = 5;
|
|
91
|
-
case 5: return [4 /*yield*/, body_row_init_1.next()];
|
|
92
|
-
case 6:
|
|
93
|
-
if (!(body_row_init_1_1 = _r.sent(), _g = body_row_init_1_1.done, !_g)) return [3 /*break*/, 20];
|
|
94
|
-
_j = body_row_init_1_1.value;
|
|
95
|
-
_b = false;
|
|
96
|
-
body_row_init_row = _j;
|
|
97
|
-
replacedRow = [];
|
|
98
|
-
index = 0;
|
|
99
|
-
if (body_row_init_row === null || body_row_init_row === void 0 ? void 0 : body_row_init_row.includes("[")) {
|
|
100
|
-
index = parseInt(body_row_init_row === null || body_row_init_row === void 0 ? void 0 : body_row_init_row.slice(1, ((body_row_init_row === null || body_row_init_row === void 0 ? void 0 : body_row_init_row.indexOf(']')) + 1)));
|
|
101
|
-
body_row_init_row = body_row_init_row === null || body_row_init_row === void 0 ? void 0 : body_row_init_row.slice((body_row_init_row === null || body_row_init_row === void 0 ? void 0 : body_row_init_row.indexOf(']')) + 1);
|
|
77
|
+
else {
|
|
78
|
+
row_count = (_l = data[variable_array]) === null || _l === void 0 ? void 0 : _l.length;
|
|
102
79
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
if ((
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
80
|
+
for (let i = 0; i < row_count; i++) {
|
|
81
|
+
body_row_init.push("[" + i + "]" + body_row.slice(((body_row === null || body_row === void 0 ? void 0 : body_row.indexOf(']')) + 1)));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
try {
|
|
85
|
+
for (var _p = true, body_row_init_1 = (e_2 = void 0, __asyncValues(body_row_init)), body_row_init_1_1; body_row_init_1_1 = yield body_row_init_1.next(), _d = body_row_init_1_1.done, !_d; _p = true) {
|
|
86
|
+
_f = body_row_init_1_1.value;
|
|
87
|
+
_p = false;
|
|
88
|
+
let body_row_init_row = _f;
|
|
89
|
+
let replacedRow = [];
|
|
90
|
+
let index = 0;
|
|
91
|
+
if (body_row_init_row === null || body_row_init_row === void 0 ? void 0 : body_row_init_row.includes("[")) {
|
|
92
|
+
index = parseInt(body_row_init_row === null || body_row_init_row === void 0 ? void 0 : body_row_init_row.slice(1, ((body_row_init_row === null || body_row_init_row === void 0 ? void 0 : body_row_init_row.indexOf(']')) + 1)));
|
|
93
|
+
body_row_init_row = body_row_init_row === null || body_row_init_row === void 0 ? void 0 : body_row_init_row.slice((body_row_init_row === null || body_row_init_row === void 0 ? void 0 : body_row_init_row.indexOf(']')) + 1);
|
|
94
|
+
}
|
|
95
|
+
let row_array = body_row_init_row.split("\\");
|
|
96
|
+
try {
|
|
97
|
+
for (var _q = true, row_array_1 = (e_3 = void 0, __asyncValues(row_array)), row_array_1_1; row_array_1_1 = yield row_array_1.next(), _g = row_array_1_1.done, !_g; _q = true) {
|
|
98
|
+
_j = row_array_1_1.value;
|
|
99
|
+
_q = false;
|
|
100
|
+
const row_splited = _j;
|
|
101
|
+
let updated_row = row_splited;
|
|
102
|
+
if ((updated_row === null || updated_row === void 0 ? void 0 : updated_row.length) > 2) {
|
|
103
|
+
let row_data = data;
|
|
104
|
+
if (updated_row[0] == "{" && updated_row[(updated_row === null || updated_row === void 0 ? void 0 : updated_row.length) - 1] == "}") {
|
|
105
|
+
let variable = variables[updated_row.slice(1, ((updated_row === null || updated_row === void 0 ? void 0 : updated_row.length) - 1))];
|
|
106
|
+
if (variable === null || variable === void 0 ? void 0 : variable.includes("~")) {
|
|
107
|
+
let variable_array_index = variable === null || variable === void 0 ? void 0 : variable.split("~");
|
|
108
|
+
if ((_m = variable_array_index[0]) === null || _m === void 0 ? void 0 : _m.includes("-")) {
|
|
109
|
+
let array_data_path = variable_array_index[0].split("-");
|
|
110
|
+
if ((array_data_path === null || array_data_path === void 0 ? void 0 : array_data_path.length) == 2) {
|
|
111
|
+
row_data = row_data[array_data_path[0]][array_data_path[1]][index];
|
|
112
|
+
}
|
|
113
|
+
if ((array_data_path === null || array_data_path === void 0 ? void 0 : array_data_path.length) == 3) {
|
|
114
|
+
row_data = row_data[array_data_path[0]][array_data_path[1]][array_data_path[2]][index];
|
|
115
|
+
}
|
|
116
|
+
if ((array_data_path === null || array_data_path === void 0 ? void 0 : array_data_path.length) == 4) {
|
|
117
|
+
row_data = row_data[array_data_path[0]][array_data_path[1]][array_data_path[2]][array_data_path[3]][index];
|
|
118
|
+
}
|
|
119
|
+
if ((array_data_path === null || array_data_path === void 0 ? void 0 : array_data_path.length) == 5) {
|
|
120
|
+
row_data = row_data[array_data_path[0]][array_data_path[1]][array_data_path[2]][array_data_path[3]][array_data_path[4]][index];
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
row_data = row_data[variable];
|
|
125
|
+
}
|
|
126
|
+
variable = variable_array_index[1];
|
|
127
|
+
}
|
|
128
|
+
if (variable === null || variable === void 0 ? void 0 : variable.includes("-")) {
|
|
129
|
+
let array_data_path = variable.split("-");
|
|
130
|
+
if ((array_data_path === null || array_data_path === void 0 ? void 0 : array_data_path.length) == 2) {
|
|
131
|
+
updated_row = row_data[array_data_path[0]][array_data_path[1]];
|
|
132
|
+
}
|
|
133
|
+
if ((array_data_path === null || array_data_path === void 0 ? void 0 : array_data_path.length) == 3) {
|
|
134
|
+
updated_row = row_data[array_data_path[0]][array_data_path[1]][array_data_path[2]];
|
|
135
|
+
}
|
|
136
|
+
if ((array_data_path === null || array_data_path === void 0 ? void 0 : array_data_path.length) == 4) {
|
|
137
|
+
updated_row = row_data[array_data_path[0]][array_data_path[1]][array_data_path[2]][array_data_path[3]];
|
|
138
|
+
}
|
|
139
|
+
if ((array_data_path === null || array_data_path === void 0 ? void 0 : array_data_path.length) == 5) {
|
|
140
|
+
updated_row = row_data[array_data_path[0]][array_data_path[1]][array_data_path[2]][array_data_path[3]][array_data_path[4]];
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
updated_row = row_data[variable];
|
|
145
|
+
}
|
|
135
146
|
}
|
|
136
147
|
}
|
|
137
|
-
|
|
138
|
-
row_data = row_data[variable];
|
|
139
|
-
}
|
|
140
|
-
variable = variable_array_index[1];
|
|
148
|
+
replacedRow.push(updated_row);
|
|
141
149
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
if ((array_data_path === null || array_data_path === void 0 ? void 0 : array_data_path.length) == 3) {
|
|
148
|
-
updated_row = row_data[array_data_path[0]][array_data_path[1]][array_data_path[2]];
|
|
149
|
-
}
|
|
150
|
-
if ((array_data_path === null || array_data_path === void 0 ? void 0 : array_data_path.length) == 4) {
|
|
151
|
-
updated_row = row_data[array_data_path[0]][array_data_path[1]][array_data_path[2]][array_data_path[3]];
|
|
152
|
-
}
|
|
153
|
-
if ((array_data_path === null || array_data_path === void 0 ? void 0 : array_data_path.length) == 5) {
|
|
154
|
-
updated_row = row_data[array_data_path[0]][array_data_path[1]][array_data_path[2]][array_data_path[3]][array_data_path[4]];
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
updated_row = row_data[variable];
|
|
150
|
+
}
|
|
151
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
152
|
+
finally {
|
|
153
|
+
try {
|
|
154
|
+
if (!_q && !_g && (_h = row_array_1.return)) yield _h.call(row_array_1);
|
|
159
155
|
}
|
|
156
|
+
finally { if (e_3) throw e_3.error; }
|
|
160
157
|
}
|
|
158
|
+
replacedBody.push(replacedRow === null || replacedRow === void 0 ? void 0 : replacedRow.join(""));
|
|
161
159
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
case 14:
|
|
177
|
-
_r.sent();
|
|
178
|
-
_r.label = 15;
|
|
179
|
-
case 15: return [3 /*break*/, 17];
|
|
180
|
-
case 16:
|
|
181
|
-
if (e_1) throw e_1.error;
|
|
182
|
-
return [7 /*endfinally*/];
|
|
183
|
-
case 17: return [7 /*endfinally*/];
|
|
184
|
-
case 18:
|
|
185
|
-
replacedBody.push(replacedRow === null || replacedRow === void 0 ? void 0 : replacedRow.join(""));
|
|
186
|
-
_r.label = 19;
|
|
187
|
-
case 19:
|
|
188
|
-
_b = true;
|
|
189
|
-
return [3 /*break*/, 5];
|
|
190
|
-
case 20: return [3 /*break*/, 27];
|
|
191
|
-
case 21:
|
|
192
|
-
e_2_1 = _r.sent();
|
|
193
|
-
e_2 = { error: e_2_1 };
|
|
194
|
-
return [3 /*break*/, 27];
|
|
195
|
-
case 22:
|
|
196
|
-
_r.trys.push([22, , 25, 26]);
|
|
197
|
-
if (!(!_b && !_g && (_h = body_row_init_1.return))) return [3 /*break*/, 24];
|
|
198
|
-
return [4 /*yield*/, _h.call(body_row_init_1)];
|
|
199
|
-
case 23:
|
|
200
|
-
_r.sent();
|
|
201
|
-
_r.label = 24;
|
|
202
|
-
case 24: return [3 /*break*/, 26];
|
|
203
|
-
case 25:
|
|
204
|
-
if (e_2) throw e_2.error;
|
|
205
|
-
return [7 /*endfinally*/];
|
|
206
|
-
case 26: return [7 /*endfinally*/];
|
|
207
|
-
case 27:
|
|
208
|
-
_a = true;
|
|
209
|
-
return [3 /*break*/, 2];
|
|
210
|
-
case 28: return [3 /*break*/, 35];
|
|
211
|
-
case 29:
|
|
212
|
-
e_3_1 = _r.sent();
|
|
213
|
-
e_3 = { error: e_3_1 };
|
|
214
|
-
return [3 /*break*/, 35];
|
|
215
|
-
case 30:
|
|
216
|
-
_r.trys.push([30, , 33, 34]);
|
|
217
|
-
if (!(!_a && !_d && (_e = bodyArray_1.return))) return [3 /*break*/, 32];
|
|
218
|
-
return [4 /*yield*/, _e.call(bodyArray_1)];
|
|
219
|
-
case 31:
|
|
220
|
-
_r.sent();
|
|
221
|
-
_r.label = 32;
|
|
222
|
-
case 32: return [3 /*break*/, 34];
|
|
223
|
-
case 33:
|
|
224
|
-
if (e_3) throw e_3.error;
|
|
225
|
-
return [7 /*endfinally*/];
|
|
226
|
-
case 34: return [7 /*endfinally*/];
|
|
227
|
-
case 35: return [2 /*return*/, replacedBody.join("")];
|
|
160
|
+
}
|
|
161
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
162
|
+
finally {
|
|
163
|
+
try {
|
|
164
|
+
if (!_p && !_d && (_e = body_row_init_1.return)) yield _e.call(body_row_init_1);
|
|
165
|
+
}
|
|
166
|
+
finally { if (e_2) throw e_2.error; }
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
171
|
+
finally {
|
|
172
|
+
try {
|
|
173
|
+
if (!_o && !_a && (_b = bodyArray_1.return)) yield _b.call(bodyArray_1);
|
|
228
174
|
}
|
|
229
|
-
|
|
175
|
+
finally { if (e_1) throw e_1.error; }
|
|
176
|
+
}
|
|
177
|
+
return replacedBody.join("");
|
|
230
178
|
});
|
|
231
179
|
}
|
|
232
180
|
exports.stringInterpolation = stringInterpolation;
|