@intuitionrobotics/ts-common 0.41.69 → 0.41.70
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/core/application.js +12 -28
- package/core/application.js.map +1 -1
- package/core/debug-flags.js +27 -30
- package/core/debug-flags.js.map +1 -1
- package/core/dispatcher.js +17 -54
- package/core/dispatcher.js.map +1 -1
- package/core/error-handling.js +1 -1
- package/core/error-handling.js.map +1 -1
- package/core/exceptions.js +47 -81
- package/core/exceptions.js.map +1 -1
- package/core/logger/BeLogged.js +19 -25
- package/core/logger/BeLogged.js.map +1 -1
- package/core/logger/LogClient.js +14 -15
- package/core/logger/LogClient.js.map +1 -1
- package/core/logger/LogClient_BaseRotate.js +20 -39
- package/core/logger/LogClient_BaseRotate.js.map +1 -1
- package/core/logger/LogClient_Browser.js +12 -31
- package/core/logger/LogClient_Browser.js.map +1 -1
- package/core/logger/LogClient_Function.js +14 -31
- package/core/logger/LogClient_Function.js.map +1 -1
- package/core/logger/LogClient_MemBuffer.js +14 -32
- package/core/logger/LogClient_MemBuffer.js.map +1 -1
- package/core/logger/LogClient_Terminal.js +12 -31
- package/core/logger/LogClient_Terminal.js.map +1 -1
- package/core/logger/Logger.js +36 -77
- package/core/logger/Logger.js.map +1 -1
- package/core/logger/utils.js +16 -17
- package/core/logger/utils.js.map +1 -1
- package/core/module-manager.js +33 -58
- package/core/module-manager.js.map +1 -1
- package/core/module.js +43 -62
- package/core/module.js.map +1 -1
- package/modules/CSVModule.js +37 -87
- package/modules/CSVModule.js.map +1 -1
- package/modules/CliParamsModule.js +32 -51
- package/modules/CliParamsModule.js.map +1 -1
- package/package.json +1 -1
- package/permissions/permission-group.js +9 -11
- package/permissions/permission-group.js.map +1 -1
- package/testing/test-model.js +28 -87
- package/testing/test-model.js.map +1 -1
- package/ts-generics/array-params.js +14 -22
- package/ts-generics/array-params.js.map +1 -1
- package/ts-generics/omit-and-join.js +4 -15
- package/ts-generics/omit-and-join.js.map +1 -1
- package/utils/array-tools.js +40 -99
- package/utils/array-tools.js.map +1 -1
- package/utils/crypto-tools.js +1 -1
- package/utils/crypto-tools.js.map +1 -1
- package/utils/date-time-tools.js +17 -69
- package/utils/date-time-tools.js.map +1 -1
- package/utils/filter-tools.js +16 -18
- package/utils/filter-tools.js.map +1 -1
- package/utils/hash-tools.js +4 -7
- package/utils/hash-tools.js.map +1 -1
- package/utils/merge-tools.js +6 -6
- package/utils/merge-tools.js.map +1 -1
- package/utils/object-tools.js +13 -15
- package/utils/object-tools.js.map +1 -1
- package/utils/queue.js +47 -112
- package/utils/queue.js.map +1 -1
- package/utils/random-tools.js +2 -2
- package/utils/random-tools.js.map +1 -1
- package/utils/string-tools.js +1 -1
- package/utils/string-tools.js.map +1 -1
- package/utils/tools.js +6 -6
- package/utils/tools.js.map +1 -1
- package/utils/types.js +1 -1
- package/utils/types.js.map +1 -1
- package/utils/version-tools.js +6 -6
- package/utils/version-tools.js.map +1 -1
- package/validator/validator.js +64 -97
- package/validator/validator.js.map +1 -1
package/core/module-manager.js
CHANGED
|
@@ -16,95 +16,70 @@
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
var __extends = (this && this.__extends) || (function () {
|
|
20
|
-
var extendStatics = function (d, b) {
|
|
21
|
-
extendStatics = Object.setPrototypeOf ||
|
|
22
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
23
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
24
|
-
return extendStatics(d, b);
|
|
25
|
-
};
|
|
26
|
-
return function (d, b) {
|
|
27
|
-
extendStatics(d, b);
|
|
28
|
-
function __() { this.constructor = d; }
|
|
29
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
30
|
-
};
|
|
31
|
-
})();
|
|
32
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
20
|
exports.ModuleManager = exports.moduleResolver = void 0;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
21
|
+
const dispatcher_1 = require("./dispatcher");
|
|
22
|
+
const exceptions_1 = require("./exceptions");
|
|
23
|
+
const Logger_1 = require("./logger/Logger");
|
|
24
|
+
const array_tools_1 = require("../utils/array-tools");
|
|
25
|
+
const _modules = [];
|
|
39
26
|
function moduleResolver() {
|
|
40
27
|
return _modules;
|
|
41
28
|
}
|
|
42
29
|
exports.moduleResolver = moduleResolver;
|
|
43
|
-
|
|
44
|
-
__extends(ModuleManager, _super);
|
|
30
|
+
class ModuleManager extends Logger_1.Logger {
|
|
45
31
|
// noinspection JSUnusedLocalSymbols
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
constructor() {
|
|
33
|
+
super();
|
|
34
|
+
this.modules = _modules;
|
|
49
35
|
if (ModuleManager.instance)
|
|
50
36
|
throw new exceptions_1.BadImplementationException("Already have one instance of ModuleManager");
|
|
51
|
-
ModuleManager.instance =
|
|
37
|
+
ModuleManager.instance = this;
|
|
52
38
|
dispatcher_1.Dispatcher.modulesResolver = moduleResolver;
|
|
53
|
-
return _this;
|
|
54
39
|
}
|
|
55
|
-
|
|
40
|
+
filterModules(filter) {
|
|
56
41
|
return this.modules.filter(filter);
|
|
57
|
-
}
|
|
58
|
-
|
|
42
|
+
}
|
|
43
|
+
setConfig(config) {
|
|
59
44
|
this.config = config || {};
|
|
60
45
|
return this;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
65
|
-
modules[_i] = arguments[_i];
|
|
66
|
-
}
|
|
67
|
-
modules.reduce(function (carry, module) {
|
|
46
|
+
}
|
|
47
|
+
addModules(...modules) {
|
|
48
|
+
modules.reduce((carry, module) => {
|
|
68
49
|
if (!carry.includes(module))
|
|
69
50
|
array_tools_1.addItemToArray(carry, module);
|
|
70
51
|
return carry;
|
|
71
52
|
}, this.modules);
|
|
72
53
|
return this;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
var modules = [];
|
|
76
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
77
|
-
modules[_i] = arguments[_i];
|
|
78
|
-
}
|
|
54
|
+
}
|
|
55
|
+
setModules(...modules) {
|
|
79
56
|
this.modules = array_tools_1.filterDuplicates(modules);
|
|
80
57
|
return this;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
this.
|
|
85
|
-
this.modules.forEach(function (module) {
|
|
58
|
+
}
|
|
59
|
+
init() {
|
|
60
|
+
this.logInfo(`--------- initializing app ---------`);
|
|
61
|
+
this.modules.forEach((module) => {
|
|
86
62
|
// @ts-ignore
|
|
87
|
-
module.setManager(
|
|
88
|
-
if (
|
|
63
|
+
module.setManager(this);
|
|
64
|
+
if (this.config)
|
|
89
65
|
// @ts-ignore
|
|
90
|
-
module.setConfig(
|
|
66
|
+
module.setConfig(this.config[module.getName()]);
|
|
91
67
|
});
|
|
92
|
-
this.modules.forEach(
|
|
93
|
-
|
|
68
|
+
this.modules.forEach(module => {
|
|
69
|
+
this.logInfo(`--------- ${module.getName()} ---------`);
|
|
94
70
|
// @ts-ignore
|
|
95
71
|
module.init();
|
|
96
72
|
// @ts-ignore
|
|
97
73
|
module.initiated = true;
|
|
98
74
|
});
|
|
99
75
|
// @ts-ignore
|
|
100
|
-
this.modules.forEach(
|
|
101
|
-
this.logInfo(
|
|
76
|
+
this.modules.forEach(module => module.validate());
|
|
77
|
+
this.logInfo(`--------- INITIALIZED ---------`);
|
|
102
78
|
return this;
|
|
103
|
-
}
|
|
104
|
-
|
|
79
|
+
}
|
|
80
|
+
build() {
|
|
105
81
|
this.init();
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
}(Logger_1.Logger));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
109
84
|
exports.ModuleManager = ModuleManager;
|
|
110
85
|
//# sourceMappingURL=module-manager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-manager.js","sourceRoot":"","sources":["../../src/main/core/module-manager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG
|
|
1
|
+
{"version":3,"file":"module-manager.js","sourceRoot":"","sources":["../../src/main/core/module-manager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAMH,6CAAwC;AACxC,6CAAwD;AACxD,4CAAuC;AACvC,sDAG8B;AAE9B,MAAM,QAAQ,GAAa,EAAE,CAAC;AAE9B,SAAgB,cAAc;IAC7B,OAAO,QAAQ,CAAC;AACjB,CAAC;AAFD,wCAEC;AAED,MAAa,aACZ,SAAQ,eAAM;IAMd,oCAAoC;IACpC;QACC,KAAK,EAAE,CAAC;QALC,YAAO,GAAa,QAAQ,CAAC;QAMtC,IAAI,aAAa,CAAC,QAAQ;YACzB,MAAM,IAAI,uCAA0B,CAAC,4CAA4C,CAAC,CAAC;QAEpF,aAAa,CAAC,QAAQ,GAAG,IAAI,CAAC;QAC9B,uBAAU,CAAC,eAAe,GAAG,cAAc,CAAC;IAC7C,CAAC;IAED,aAAa,CAAI,MAAgC;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAmB,CAAC;IACtD,CAAC;IAEM,SAAS,CAAC,MAAc;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,UAAU,CAAC,GAAG,OAAiB;QACrC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAe,EAAE,MAAc,EAAE,EAAE;YAClD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAC1B,4BAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAE/B,OAAO,KAAK,CAAA;QACb,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,UAAU,CAAC,GAAG,OAAiB;QACrC,IAAI,CAAC,OAAO,GAAG,8BAAgB,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,IAAI;QACV,IAAI,CAAC,OAAO,CAAC,wCAAwC,CAAC,CAAC;QACvD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAc,EAAE,EAAE;YACvC,aAAa;YACb,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAExB,IAAI,IAAI,CAAC,MAAM;gBACf,aAAa;gBACZ,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAC7B,IAAI,CAAC,OAAO,CAAC,cAAc,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YAC1D,aAAa;YACb,MAAM,CAAC,IAAI,EAAE,CAAC;YACd,aAAa;YACb,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;QACzB,CAAC,CAAC,CAAC;QAEH,aAAa;QACb,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;QAElD,IAAI,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,KAAK;QACJ,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;CACD;AAtED,sCAsEC"}
|
package/core/module.js
CHANGED
|
@@ -16,54 +16,38 @@
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
var __extends = (this && this.__extends) || (function () {
|
|
20
|
-
var extendStatics = function (d, b) {
|
|
21
|
-
extendStatics = Object.setPrototypeOf ||
|
|
22
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
23
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
24
|
-
return extendStatics(d, b);
|
|
25
|
-
};
|
|
26
|
-
return function (d, b) {
|
|
27
|
-
extendStatics(d, b);
|
|
28
|
-
function __() { this.constructor = d; }
|
|
29
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
30
|
-
};
|
|
31
|
-
})();
|
|
32
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
20
|
exports.Module = void 0;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
__extends(Module, _super);
|
|
21
|
+
const exceptions_1 = require("./exceptions");
|
|
22
|
+
const merge_tools_1 = require("../utils/merge-tools");
|
|
23
|
+
const Logger_1 = require("./logger/Logger");
|
|
24
|
+
const date_time_tools_1 = require("../utils/date-time-tools");
|
|
25
|
+
class Module extends Logger_1.Logger {
|
|
40
26
|
// noinspection TypeScriptAbstractClassConstructorCanBeMadeProtected
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
setTimeout(
|
|
48
|
-
|
|
27
|
+
constructor(tag, name) {
|
|
28
|
+
super(tag);
|
|
29
|
+
this.initiated = false;
|
|
30
|
+
this.config = {};
|
|
31
|
+
this.timeoutMap = {};
|
|
32
|
+
this.runAsync = (label, toCall) => {
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
this.logDebug(`Running async: ${label}`);
|
|
49
35
|
new Promise(toCall)
|
|
50
|
-
.then(
|
|
51
|
-
|
|
36
|
+
.then(() => {
|
|
37
|
+
this.logDebug(`Async call completed: ${label}`);
|
|
52
38
|
})
|
|
53
|
-
.catch(
|
|
39
|
+
.catch(reason => this.logError(`Async call error: ${label}`, reason));
|
|
54
40
|
}, 0);
|
|
55
41
|
};
|
|
56
|
-
|
|
57
|
-
if (!
|
|
58
|
-
throw new exceptions_1.BadImplementationException(
|
|
59
|
-
|
|
60
|
-
return _this;
|
|
42
|
+
this.name = name || this.constructor["name"];
|
|
43
|
+
if (!this.name.endsWith("_Class"))
|
|
44
|
+
throw new exceptions_1.BadImplementationException(`Module class MUST end with '_Class' e.g. MyModule_Class, check class named: ${this.name}`);
|
|
45
|
+
this.name = this.name.replace("_Class", "");
|
|
61
46
|
}
|
|
62
|
-
|
|
63
|
-
if (ms === void 0) { ms = 0; }
|
|
47
|
+
debounce(handler, key, ms = 0) {
|
|
64
48
|
date_time_tools_1._clearTimeout(this.timeoutMap[key]);
|
|
65
49
|
this.timeoutMap[key] = date_time_tools_1._setTimeout(handler, ms);
|
|
66
|
-
}
|
|
50
|
+
}
|
|
67
51
|
// // possibly to add
|
|
68
52
|
// public async debounceSync(handler: TimerHandler, key: string, ms = 0) {
|
|
69
53
|
// _clearTimeout(this.timeoutMap[key]);
|
|
@@ -79,45 +63,42 @@ var Module = /** @class */ (function (_super) {
|
|
|
79
63
|
// }, ms) as unknown as number;
|
|
80
64
|
// });
|
|
81
65
|
// }
|
|
82
|
-
|
|
83
|
-
var _this = this;
|
|
84
|
-
if (ms === void 0) { ms = 0; }
|
|
66
|
+
throttle(handler, key, ms = 0) {
|
|
85
67
|
if (this.timeoutMap[key])
|
|
86
68
|
return;
|
|
87
|
-
this.timeoutMap[key] = date_time_tools_1._setTimeout(
|
|
69
|
+
this.timeoutMap[key] = date_time_tools_1._setTimeout(() => {
|
|
88
70
|
handler();
|
|
89
|
-
delete
|
|
71
|
+
delete this.timeoutMap[key];
|
|
90
72
|
}, ms);
|
|
91
|
-
}
|
|
92
|
-
|
|
73
|
+
}
|
|
74
|
+
setConfigValidator(validator) {
|
|
93
75
|
// @ts-ignore
|
|
94
76
|
this.configValidator = validator;
|
|
95
|
-
}
|
|
96
|
-
|
|
77
|
+
}
|
|
78
|
+
setDefaultConfig(config) {
|
|
97
79
|
// @ts-ignore
|
|
98
80
|
this.config = config;
|
|
99
|
-
}
|
|
100
|
-
|
|
81
|
+
}
|
|
82
|
+
getName() {
|
|
101
83
|
return this.name;
|
|
102
|
-
}
|
|
103
|
-
|
|
84
|
+
}
|
|
85
|
+
setName(name) {
|
|
104
86
|
this.name = name;
|
|
105
|
-
}
|
|
106
|
-
|
|
87
|
+
}
|
|
88
|
+
setConfig(config) {
|
|
107
89
|
// @ts-ignore
|
|
108
90
|
this.config = this.config ? merge_tools_1.merge(this.config, config || {}) : config;
|
|
109
|
-
}
|
|
110
|
-
|
|
91
|
+
}
|
|
92
|
+
setManager(manager) {
|
|
111
93
|
// @ts-ignore
|
|
112
94
|
this.manager = manager;
|
|
113
|
-
}
|
|
114
|
-
|
|
95
|
+
}
|
|
96
|
+
init() {
|
|
115
97
|
// ignorance is bliss
|
|
116
|
-
}
|
|
117
|
-
|
|
98
|
+
}
|
|
99
|
+
validate() {
|
|
118
100
|
// ignorance is bliss
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
}(Logger_1.Logger));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
122
103
|
exports.Module = Module;
|
|
123
104
|
//# sourceMappingURL=module.js.map
|
package/core/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/main/core/module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/main/core/module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAQH,6CAAwD;AACxD,sDAA2C;AAC3C,4CAAuC;AAEvC,8DAIkC;AAElC,MAAsB,MACrB,SAAQ,eAAM;IASd,oEAAoE;IACpE,YAAY,GAAY,EAAE,IAAa;QACtC,KAAK,CAAC,GAAG,CAAC,CAAC;QA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created by tacb0ss on 07/05/2018.
|
|
4
4
|
*/
|
|
5
|
-
var __extends = (this && this.__extends) || (function () {
|
|
6
|
-
var extendStatics = function (d, b) {
|
|
7
|
-
extendStatics = Object.setPrototypeOf ||
|
|
8
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
10
|
-
return extendStatics(d, b);
|
|
11
|
-
};
|
|
12
|
-
return function (d, b) {
|
|
13
|
-
extendStatics(d, b);
|
|
14
|
-
function __() { this.constructor = d; }
|
|
15
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16
|
-
};
|
|
17
|
-
})();
|
|
18
5
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
19
6
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
20
7
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -24,40 +11,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
11
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
25
12
|
});
|
|
26
13
|
};
|
|
27
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
28
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
29
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
30
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
31
|
-
function step(op) {
|
|
32
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
33
|
-
while (_) try {
|
|
34
|
-
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;
|
|
35
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
36
|
-
switch (op[0]) {
|
|
37
|
-
case 0: case 1: t = op; break;
|
|
38
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
39
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
40
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
41
|
-
default:
|
|
42
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
43
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
44
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
45
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
46
|
-
if (t[2]) _.ops.pop();
|
|
47
|
-
_.trys.pop(); continue;
|
|
48
|
-
}
|
|
49
|
-
op = body.call(thisArg, _);
|
|
50
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
51
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
15
|
exports.CSVModule = void 0;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
16
|
+
const export_to_csv_1 = require("export-to-csv");
|
|
17
|
+
const fs_1 = require("fs");
|
|
18
|
+
const csvParser = require("csv-parser/index");
|
|
19
|
+
const module_1 = require("../core/module");
|
|
20
|
+
const DefaultConfig = {
|
|
61
21
|
options: {
|
|
62
22
|
fieldSeparator: ',',
|
|
63
23
|
quoteStrings: '"',
|
|
@@ -70,58 +30,48 @@ var DefaultConfig = {
|
|
|
70
30
|
useKeysAsHeaders: true,
|
|
71
31
|
}
|
|
72
32
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
_this.setDefaultConfig(DefaultConfig);
|
|
78
|
-
return _this;
|
|
33
|
+
class CSVModule_Class extends module_1.Module {
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
this.setDefaultConfig(DefaultConfig);
|
|
79
37
|
}
|
|
80
|
-
|
|
38
|
+
init() {
|
|
81
39
|
this.csvExporter = CSVModule_Class.createExporter(this.config.options);
|
|
82
|
-
}
|
|
83
|
-
|
|
40
|
+
}
|
|
41
|
+
static createExporter(options) {
|
|
84
42
|
return new export_to_csv_1.ExportToCsv(options);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (returnCsv === void 0) { returnCsv = true; }
|
|
43
|
+
}
|
|
44
|
+
export(items, returnCsv = true) {
|
|
88
45
|
return this.csvExporter.generateCsv(items, returnCsv);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
92
|
-
|
|
93
|
-
return
|
|
94
|
-
csv = this.csvExporter.generateCsv(items, true);
|
|
95
|
-
return [2 /*return*/, fs_1.promises.writeFile(outputFile, csv, { encoding: "utf8" })];
|
|
96
|
-
});
|
|
46
|
+
}
|
|
47
|
+
saveToFile(outputFile, items, columnsToProps) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
const csv = this.csvExporter.generateCsv(items, true);
|
|
50
|
+
return fs_1.promises.writeFile(outputFile, csv, { encoding: "utf8" });
|
|
97
51
|
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
.on('error', function (err) { return reject(err); })
|
|
112
|
-
.on('end', function () { return resolve(results); });
|
|
113
|
-
})];
|
|
52
|
+
}
|
|
53
|
+
readCsv(inputFile, columnsToProps) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
return new Promise((resolve, reject) => {
|
|
56
|
+
const results = [];
|
|
57
|
+
fs_1.createReadStream(inputFile, { encoding: "utf8" })
|
|
58
|
+
.pipe(csvParser(this.createReadParserOptions(columnsToProps)))
|
|
59
|
+
.on('data', (instance) => {
|
|
60
|
+
delete instance["undefined"];
|
|
61
|
+
results.push(instance);
|
|
62
|
+
})
|
|
63
|
+
.on('error', (err) => reject(err))
|
|
64
|
+
.on('end', () => resolve(results));
|
|
114
65
|
});
|
|
115
66
|
});
|
|
116
|
-
}
|
|
117
|
-
|
|
67
|
+
}
|
|
68
|
+
createReadParserOptions(columnsToProps) {
|
|
118
69
|
return {
|
|
119
|
-
mapHeaders:
|
|
70
|
+
mapHeaders: (args) => {
|
|
120
71
|
return (columnsToProps === null || columnsToProps === void 0 ? void 0 : columnsToProps[args.header]) || args.header;
|
|
121
72
|
}
|
|
122
73
|
};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
}(module_1.Module));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
126
76
|
exports.CSVModule = new CSVModule_Class();
|
|
127
77
|
//# sourceMappingURL=CSVModule.js.map
|
package/modules/CSVModule.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CSVModule.js","sourceRoot":"","sources":["../../src/main/modules/CSVModule.ts"],"names":[],"mappings":";AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"CSVModule.js","sourceRoot":"","sources":["../../src/main/modules/CSVModule.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;AAEH,iDAGuB;AACvB,2BAGY;AACZ,8CAA+C;AAE/C,2CAAwC;AAOxC,MAAM,aAAa,GAAG;IACrB,OAAO,EAAE;QACR,cAAc,EAAE,GAAG;QACnB,YAAY,EAAE,GAAG;QACjB,gBAAgB,EAAE,GAAG;QACrB,UAAU,EAAE,IAAI;QAChB,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BACxB,OAAO,QAAQ,CAAC,WAAW,CAAC,CAAA;oBAC5B,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACxB,CAAC,CAAC;qBACD,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;qBACjC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;YACrC,CAAC,CAAC,CAAA;QACH,CAAC;KAAA;IAEO,uBAAuB,CAAI,cAAgC;QAClE,OAAO;YACN,UAAU,EAAE,CAAC,IAAwB,EAAE,EAAE;gBACxC,OAAO,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAG,IAAI,CAAC,MAAM,CAAW,KAAI,IAAI,CAAC,MAAM,CAAC;YAC/D,CAAC;SACD,CAAC;IACH,CAAC;CACD;AAGY,QAAA,SAAS,GAAG,IAAI,eAAe,EAAE,CAAC"}
|
|
@@ -1,75 +1,56 @@
|
|
|
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
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.CliParamsModule = void 0;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
_this.printFoundArgs("Found Args", foundParams, _this.paramsValue);
|
|
4
|
+
const module_1 = require("../core/module");
|
|
5
|
+
const exceptions_1 = require("../core/exceptions");
|
|
6
|
+
const __1 = require("..");
|
|
7
|
+
class CliParamsModule_Class extends module_1.Module {
|
|
8
|
+
constructor() {
|
|
9
|
+
super("CliParamsModule", "CliParamsModule_Class");
|
|
10
|
+
this.paramsValue = {};
|
|
11
|
+
this.printHowTo = (params) => {
|
|
12
|
+
const missingParams = params.filter((param) => !this.paramsValue[param.keyName] && !param.optional);
|
|
13
|
+
const foundParams = params.filter((param) => this.paramsValue[param.keyName]);
|
|
14
|
+
this.printFoundArgs("Found Args", foundParams, this.paramsValue);
|
|
29
15
|
if (missingParams.length === 0)
|
|
30
16
|
return;
|
|
31
|
-
|
|
17
|
+
this.printFoundArgs("Missing Args", missingParams, this.paramsValue);
|
|
32
18
|
throw new exceptions_1.ImplementationMissingException("Missing cli params");
|
|
33
19
|
};
|
|
34
|
-
|
|
35
|
-
return
|
|
20
|
+
this.getParams = () => {
|
|
21
|
+
return this.paramsValue;
|
|
36
22
|
};
|
|
37
|
-
return _this;
|
|
38
23
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
this.config.params.forEach(function (param) { return _this.paramsValue[param.keyName] = _this.getParam(param); });
|
|
24
|
+
init() {
|
|
25
|
+
this.config.params.forEach((param) => this.paramsValue[param.keyName] = this.getParam(param));
|
|
42
26
|
this.printHowTo(this.config.params);
|
|
43
27
|
return this.paramsValue;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (
|
|
47
|
-
if (!this.config.params.find(function (_param) { return _param.keyName === param.keyName; }))
|
|
28
|
+
}
|
|
29
|
+
getParam(param, args = process.argv.slice(2, process.argv.length)) {
|
|
30
|
+
if (!this.config.params.find(_param => _param.keyName === param.keyName))
|
|
48
31
|
throw new exceptions_1.BadImplementationException("Requested not existing param");
|
|
49
|
-
|
|
32
|
+
let value = this.extractParam(param, args);
|
|
50
33
|
if (!value)
|
|
51
34
|
value = param.defaultValue;
|
|
52
35
|
if (!value)
|
|
53
36
|
return value;
|
|
54
37
|
return (param.process ? param.process(value) : value);
|
|
55
|
-
}
|
|
56
|
-
|
|
38
|
+
}
|
|
39
|
+
extractParam(param, argv) {
|
|
57
40
|
if (param.isArray)
|
|
58
|
-
return param.keys.reduce(
|
|
59
|
-
values.push
|
|
41
|
+
return param.keys.reduce((values, key) => {
|
|
42
|
+
values.push(...__1.filterInstances(argv.map(arg => { var _a; return (_a = arg.match(new RegExp(`${key}=(.*)`))) === null || _a === void 0 ? void 0 : _a[1]; })));
|
|
60
43
|
return values;
|
|
61
44
|
}, []);
|
|
62
|
-
|
|
63
|
-
return __1.flatArray(find).find(
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
var _this = this;
|
|
45
|
+
const find = param.keys.map(key => argv.map(arg => { var _a; return (_a = arg.match(new RegExp(`${key}=(.*)`))) === null || _a === void 0 ? void 0 : _a[1]; }));
|
|
46
|
+
return __1.flatArray(find).find(k => k);
|
|
47
|
+
}
|
|
48
|
+
printFoundArgs(title, params, foundArgs) {
|
|
67
49
|
if (params.length)
|
|
68
50
|
return;
|
|
69
|
-
this.logInfoBold(
|
|
70
|
-
params.forEach(
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
}(module_1.Module));
|
|
51
|
+
this.logInfoBold(` ${title}:`);
|
|
52
|
+
params.forEach((param) => this.logInfo(` ${param.keys[0]}=${foundArgs[param.keyName] || `<${param.name}>`}`));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
74
55
|
exports.CliParamsModule = new CliParamsModule_Class();
|
|
75
56
|
//# sourceMappingURL=CliParamsModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CliParamsModule.js","sourceRoot":"","sources":["../../src/main/modules/CliParamsModule.ts"],"names":[],"mappings":"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