@intuitionrobotics/ts-common 0.45.3 → 0.46.0
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/consts/consts.js +0 -17
- package/consts/consts.js.map +1 -1
- package/core/application.js +0 -17
- package/core/application.js.map +1 -1
- package/core/debug-flags.js +0 -17
- package/core/debug-flags.js.map +1 -1
- package/core/dispatcher.js +0 -17
- package/core/dispatcher.js.map +1 -1
- package/core/error-handling.js +0 -17
- package/core/error-handling.js.map +1 -1
- package/core/exceptions.d.ts +0 -3
- package/core/exceptions.js +0 -20
- package/core/exceptions.js.map +1 -1
- package/core/logger/BeLogged.js +0 -17
- package/core/logger/BeLogged.js.map +1 -1
- package/core/logger/LogClient.js +0 -17
- package/core/logger/LogClient.js.map +1 -1
- package/core/logger/LogClient_BaseRotate.js +0 -18
- package/core/logger/LogClient_BaseRotate.js.map +1 -1
- package/core/logger/LogClient_Browser.js +0 -17
- package/core/logger/LogClient_Browser.js.map +1 -1
- package/core/logger/LogClient_Function.js +0 -17
- package/core/logger/LogClient_Function.js.map +1 -1
- package/core/logger/LogClient_MemBuffer.js +0 -18
- package/core/logger/LogClient_MemBuffer.js.map +1 -1
- package/core/logger/LogClient_Terminal.js +0 -17
- package/core/logger/LogClient_Terminal.js.map +1 -1
- package/core/logger/Logger.js +0 -17
- package/core/logger/Logger.js.map +1 -1
- package/core/logger/types.js +0 -17
- package/core/logger/types.js.map +1 -1
- package/core/logger/utils.js +0 -20
- package/core/logger/utils.js.map +1 -1
- package/core/module-manager.d.ts +0 -3
- package/core/module-manager.js +0 -17
- package/core/module-manager.js.map +1 -1
- package/core/module.d.ts +6 -5
- package/core/module.js +17 -24
- package/core/module.js.map +1 -1
- package/index.d.ts +0 -35
- package/index.js +0 -63
- package/index.js.map +1 -1
- package/modules/CliParamsModule.js +3 -3
- package/modules/CliParamsModule.js.map +1 -1
- package/package.json +1 -1
- package/permissions/permission-group.js +4 -20
- package/permissions/permission-group.js.map +1 -1
- package/testing/test-model.js +0 -17
- package/testing/test-model.js.map +1 -1
- package/ts-generics/array-params.js +0 -17
- package/ts-generics/array-params.js.map +1 -1
- package/ts-generics/omit-and-join.js +0 -17
- package/ts-generics/omit-and-join.js.map +1 -1
- package/utils/array-tools.js +0 -17
- package/utils/array-tools.js.map +1 -1
- package/utils/crypto-tools.js +0 -17
- package/utils/crypto-tools.js.map +1 -1
- package/utils/date-manipulation-tools.d.ts +4 -0
- package/utils/date-manipulation-tools.js +28 -0
- package/utils/date-manipulation-tools.js.map +1 -0
- package/utils/date-time-tools.d.ts +1 -4
- package/utils/date-time-tools.js +3 -42
- package/utils/date-time-tools.js.map +1 -1
- package/utils/filter-tools.js +0 -17
- package/utils/filter-tools.js.map +1 -1
- package/utils/hash-tools.js +0 -17
- package/utils/hash-tools.js.map +1 -1
- package/utils/merge-tools.js +6 -22
- package/utils/merge-tools.js.map +1 -1
- package/utils/object-tools.js +3 -20
- package/utils/object-tools.js.map +1 -1
- package/utils/queue.js +3 -20
- package/utils/queue.js.map +1 -1
- package/utils/random-tools.js +0 -17
- package/utils/random-tools.js.map +1 -1
- package/utils/string-tools.js +0 -17
- package/utils/string-tools.js.map +1 -1
- package/utils/tools.js +0 -17
- package/utils/tools.js.map +1 -1
- package/utils/types.js +0 -17
- package/utils/types.js.map +1 -1
- package/utils/version-tools.js +3 -20
- package/utils/version-tools.js.map +1 -1
- package/validator/validator.js +5 -19
- package/validator/validator.js.map +1 -1
package/core/module.js
CHANGED
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* ts-common is the basic building blocks of our typescript projects
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
3
|
exports.Module = void 0;
|
|
21
4
|
const exceptions_1 = require("./exceptions");
|
|
@@ -25,8 +8,9 @@ const validator_1 = require("../validator/validator");
|
|
|
25
8
|
const date_time_tools_1 = require("../utils/date-time-tools");
|
|
26
9
|
class Module extends Logger_1.Logger {
|
|
27
10
|
// noinspection TypeScriptAbstractClassConstructorCanBeMadeProtected
|
|
28
|
-
constructor(
|
|
29
|
-
|
|
11
|
+
constructor(p1, p2) {
|
|
12
|
+
// If we have a tag we use it, if not we try to use the name of the class or else we use the name of the class (bad)
|
|
13
|
+
super(p2 ? p2 : typeof p1 === "string" ? p1 : undefined);
|
|
30
14
|
this.initiated = false;
|
|
31
15
|
this.config = {};
|
|
32
16
|
this.timeoutMap = {};
|
|
@@ -40,11 +24,17 @@ class Module extends Logger_1.Logger {
|
|
|
40
24
|
.catch(reason => this.logError(`Async call error: ${label}`, reason));
|
|
41
25
|
}, 0);
|
|
42
26
|
};
|
|
43
|
-
this.name = this.deduceName(
|
|
27
|
+
this.name = this.deduceName(p1, p2).replace("_Class", "");
|
|
44
28
|
}
|
|
45
|
-
deduceName(
|
|
46
|
-
if (
|
|
47
|
-
|
|
29
|
+
deduceName(p1, p2) {
|
|
30
|
+
if (typeof p1 === "object") {
|
|
31
|
+
if (p2 === undefined)
|
|
32
|
+
throw new exceptions_1.BadImplementationException(`Modules initialized with a config object must have a tag`);
|
|
33
|
+
this.config = p1;
|
|
34
|
+
return p2;
|
|
35
|
+
}
|
|
36
|
+
if (p1)
|
|
37
|
+
return p1;
|
|
48
38
|
const tempName = this.constructor["name"];
|
|
49
39
|
if (!tempName.endsWith("_Class"))
|
|
50
40
|
throw new exceptions_1.BadImplementationException(`Module class MUST end with '_Class' e.g. MyModule_Class, check class named: ${tempName}`);
|
|
@@ -91,8 +81,11 @@ class Module extends Logger_1.Logger {
|
|
|
91
81
|
setConfigValidator(validator) {
|
|
92
82
|
this.configValidator = validator;
|
|
93
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* @deprecated The method has been deprecated in favour of {@link setConfig}
|
|
86
|
+
*/
|
|
94
87
|
setDefaultConfig(config) {
|
|
95
|
-
this.config
|
|
88
|
+
this.setConfig(config);
|
|
96
89
|
}
|
|
97
90
|
getName() {
|
|
98
91
|
return this.name;
|
package/core/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/main/core/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/main/core/module.ts"],"names":[],"mappings":";;;AACA,6CAAwD;AACxD,sDAA2C;AAC3C,4CAAuC;AACvC,sDAAuE;AACvE,8DAAsG;AAEtG,MAAsB,MAClB,SAAQ,eAAM;IAYd,oEAAoE;IACpE,YAAY,EAAO,EAAE,EAAW;QAC5B,oHAAoH;QACpH,KAAK,CAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAZ9C,cAAS,GAAG,KAAK,CAAC;QACxB,WAAM,GAAW,EAAY,CAAC;QAE9B,eAAU,GAA4B,EAAE,CAAC;QAoGzC,aAAQ,GAAG,CAAC,KAAa,EAAE,MAA0B,EAAE,EAAE;YAC/D,UAAU,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,QAAQ,CAAC,kBAAkB,KAAK,EAAE,CAAC,CAAC;gBACzC,IAAI,OAA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,CAAC;IACrB,CAAC;IAEM,OAAO,CAAC,IAAY;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAEM,SAAS,CAAC,MAAuB;QACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,mBAAK,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1E,CAAC;IAEM,UAAU,CAAC,OAAsB;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAaS,IAAI;QACV,qBAAqB;IACzB,CAAC;IAEM,QAAQ;QACX,IAAI,IAAI,CAAC,eAAe;YACpB,oBAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,CAAC,CAAA;IACnD,CAAC;CACJ;AA9HD,wBA8HC"}
|
package/index.d.ts
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export * from './testing/test-model';
|
|
2
|
-
export * from './core/module';
|
|
3
|
-
export * from './core/module-manager';
|
|
4
|
-
export * from './core/application';
|
|
5
|
-
export * from './core/exceptions';
|
|
6
|
-
export * from './core/dispatcher';
|
|
7
|
-
export * from './core/error-handling';
|
|
8
|
-
export * from './core/debug-flags';
|
|
9
|
-
export * from './core/logger/utils';
|
|
10
|
-
export * from './core/logger/LogClient_BaseRotate';
|
|
11
|
-
export * from './core/logger/LogClient_Terminal';
|
|
12
|
-
export * from './core/logger/LogClient_MemBuffer';
|
|
13
|
-
export * from './core/logger/LogClient_Browser';
|
|
14
|
-
export * from './core/logger/LogClient_Function';
|
|
15
|
-
export * from './core/logger/BeLogged';
|
|
16
|
-
export * from './core/logger/Logger';
|
|
17
|
-
export * from './core/logger/types';
|
|
18
|
-
export * from './core/logger/LogClient';
|
|
19
|
-
export * from "./permissions/permission-group";
|
|
20
|
-
export * from './utils/queue';
|
|
21
|
-
export * from './utils/types';
|
|
22
|
-
export * from './utils/crypto-tools';
|
|
23
|
-
export * from './utils/random-tools';
|
|
24
|
-
export * from './utils/string-tools';
|
|
25
|
-
export * from './utils/date-time-tools';
|
|
26
|
-
export * from './utils/array-tools';
|
|
27
|
-
export * from './utils/object-tools';
|
|
28
|
-
export * from "./utils/merge-tools";
|
|
29
|
-
export * from "./utils/version-tools";
|
|
30
|
-
export * from './utils/tools';
|
|
31
|
-
export * from './utils/hash-tools';
|
|
32
|
-
export * from './utils/filter-tools';
|
|
33
|
-
export * from "./validator/validator";
|
|
34
|
-
export * from './consts/consts';
|
|
35
|
-
export * from './modules/CliParamsModule';
|
package/index.js
CHANGED
|
@@ -1,65 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* ts-common is the basic building blocks of our typescript projects
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
20
|
-
if (k2 === undefined) k2 = k;
|
|
21
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
22
|
-
}) : (function(o, m, k, k2) {
|
|
23
|
-
if (k2 === undefined) k2 = k;
|
|
24
|
-
o[k2] = m[k];
|
|
25
|
-
}));
|
|
26
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
27
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
__exportStar(require("./testing/test-model"), exports);
|
|
31
|
-
__exportStar(require("./core/module"), exports);
|
|
32
|
-
__exportStar(require("./core/module-manager"), exports);
|
|
33
|
-
__exportStar(require("./core/application"), exports);
|
|
34
|
-
__exportStar(require("./core/exceptions"), exports);
|
|
35
|
-
__exportStar(require("./core/dispatcher"), exports);
|
|
36
|
-
__exportStar(require("./core/error-handling"), exports);
|
|
37
|
-
__exportStar(require("./core/debug-flags"), exports);
|
|
38
|
-
__exportStar(require("./core/logger/utils"), exports);
|
|
39
|
-
__exportStar(require("./core/logger/LogClient_BaseRotate"), exports);
|
|
40
|
-
__exportStar(require("./core/logger/LogClient_Terminal"), exports);
|
|
41
|
-
__exportStar(require("./core/logger/LogClient_MemBuffer"), exports);
|
|
42
|
-
__exportStar(require("./core/logger/LogClient_Browser"), exports);
|
|
43
|
-
__exportStar(require("./core/logger/LogClient_Function"), exports);
|
|
44
|
-
__exportStar(require("./core/logger/BeLogged"), exports);
|
|
45
|
-
__exportStar(require("./core/logger/Logger"), exports);
|
|
46
|
-
__exportStar(require("./core/logger/types"), exports);
|
|
47
|
-
__exportStar(require("./core/logger/LogClient"), exports);
|
|
48
|
-
__exportStar(require("./permissions/permission-group"), exports);
|
|
49
|
-
__exportStar(require("./utils/queue"), exports);
|
|
50
|
-
__exportStar(require("./utils/types"), exports);
|
|
51
|
-
__exportStar(require("./utils/crypto-tools"), exports);
|
|
52
|
-
__exportStar(require("./utils/random-tools"), exports);
|
|
53
|
-
__exportStar(require("./utils/string-tools"), exports);
|
|
54
|
-
__exportStar(require("./utils/date-time-tools"), exports);
|
|
55
|
-
__exportStar(require("./utils/array-tools"), exports);
|
|
56
|
-
__exportStar(require("./utils/object-tools"), exports);
|
|
57
|
-
__exportStar(require("./utils/merge-tools"), exports);
|
|
58
|
-
__exportStar(require("./utils/version-tools"), exports);
|
|
59
|
-
__exportStar(require("./utils/tools"), exports);
|
|
60
|
-
__exportStar(require("./utils/hash-tools"), exports);
|
|
61
|
-
__exportStar(require("./utils/filter-tools"), exports);
|
|
62
|
-
__exportStar(require("./validator/validator"), exports);
|
|
63
|
-
__exportStar(require("./consts/consts"), exports);
|
|
64
|
-
__exportStar(require("./modules/CliParamsModule"), exports);
|
|
65
2
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/main/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/main/index.ts"],"names":[],"mappings":""}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CliParamsModule = void 0;
|
|
4
4
|
const module_1 = require("../core/module");
|
|
5
5
|
const exceptions_1 = require("../core/exceptions");
|
|
6
|
-
const
|
|
6
|
+
const array_tools_1 = require("../utils/array-tools");
|
|
7
7
|
class CliParamsModule_Class extends module_1.Module {
|
|
8
8
|
constructor() {
|
|
9
9
|
super("CliParamsModule");
|
|
@@ -39,11 +39,11 @@ class CliParamsModule_Class extends module_1.Module {
|
|
|
39
39
|
extractParam(param, argv) {
|
|
40
40
|
if (param.isArray)
|
|
41
41
|
return param.keys.reduce((values, key) => {
|
|
42
|
-
values.push(...
|
|
42
|
+
values.push(...array_tools_1.filterInstances(argv.map(arg => { var _a; return (_a = arg.match(new RegExp(`${key}=(.*)`))) === null || _a === void 0 ? void 0 : _a[1]; })));
|
|
43
43
|
return values;
|
|
44
44
|
}, []);
|
|
45
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
|
|
46
|
+
return array_tools_1.flatArray(find).find(k => k);
|
|
47
47
|
}
|
|
48
48
|
printFoundArgs(title, params, foundArgs) {
|
|
49
49
|
if (params.length)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CliParamsModule.js","sourceRoot":"","sources":["../../src/main/modules/CliParamsModule.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAKtC,mDAG4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"CliParamsModule.js","sourceRoot":"","sources":["../../src/main/modules/CliParamsModule.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAKtC,mDAG4B;AAC5B,sDAAgE;AAmBhE,MAAM,qBACL,SAAQ,eAAc;IAItB;QACC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAHlB,gBAAW,GAA4C,EAAE,CAAC;QAqClE,eAAU,GAAG,CAAC,MAAe,EAAE,EAAE;YAChC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACpG,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YAE9E,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YACjE,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;gBAC7B,OAAO;YAER,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YACrE,MAAM,IAAI,2CAA8B,CAAC,oBAAoB,CAAC,CAAA;QAC/D,CAAC,CAAA;QAUD,cAAS,GAAG,GAAG,EAAE;YAChB,OAAO,IAAI,CAAC,WAAW,CAAC;QACzB,CAA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EAAE,wBAAC,GAAG,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,0CAAG,CAAC,IAAC,CAAC,CAAC,CAAC,CAAA;gBAC3F,OAAO,MAAM,CAAC;YACf,CAAC,EAAE,EAAE,CAAC,CAAA;QAEP,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,wBAAC,GAAG,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,0CAAG,CAAC,IAAC,CAAC,CAAC,CAAC;QAC/F,OAAO,uBAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;IAcO,cAAc,CAAC,KAAa,EAAE,MAAe,EAAE,SAAmB;QACzE,IAAI,MAAM,CAAC,MAAM;YAChB,OAAM;QAEP,IAAI,CAAC,WAAW,CAAC,KAAK,KAAK,GAAG,CAAC,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;IAClH,CAAC;CAKD;AAEY,QAAA,eAAe,GAAG,IAAI,qBAAqB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,34 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PermissionCategory = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
8
|
-
*
|
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
-
* you may not use this file except in compliance with the License.
|
|
11
|
-
* You may obtain a copy of the License at
|
|
12
|
-
*
|
|
13
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
-
*
|
|
15
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
-
* See the License for the specific language governing permissions and
|
|
19
|
-
* limitations under the License.
|
|
20
|
-
*/
|
|
21
|
-
const index_1 = require("../index");
|
|
4
|
+
const array_tools_1 = require("../utils/array-tools");
|
|
5
|
+
const object_tools_1 = require("../utils/object-tools");
|
|
22
6
|
class PermissionCategory {
|
|
23
7
|
constructor(key, permissionsEnum, defaultValue) {
|
|
24
8
|
this.key = key;
|
|
25
9
|
this.permissionsEnum = permissionsEnum;
|
|
26
10
|
this.defaultValue = defaultValue;
|
|
27
11
|
const _levels = Object.keys(permissionsEnum).filter(value => isNaN(parseInt(value)));
|
|
28
|
-
this.levels =
|
|
12
|
+
this.levels = array_tools_1.sortArray(_levels, (_key) => permissionsEnum[_key]).reverse();
|
|
29
13
|
}
|
|
30
14
|
getClosestMatch(permission) {
|
|
31
|
-
return
|
|
15
|
+
return object_tools_1.deepClone(this.levels).reverse().find(((level) => this.permissionsEnum[level] <= permission));
|
|
32
16
|
}
|
|
33
17
|
}
|
|
34
18
|
exports.PermissionCategory = PermissionCategory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission-group.js","sourceRoot":"","sources":["../../src/main/permissions/permission-group.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"permission-group.js","sourceRoot":"","sources":["../../src/main/permissions/permission-group.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AACjD,wDAAgD;AAEhD,MAAa,kBAAkB;IAM9B,YAAY,GAAW,EAAE,eAAoB,EAAE,YAAe;QAC7D,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QAEjC,MAAM,OAAO,GAAa,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/F,IAAI,CAAC,MAAM,GAAG,uBAAS,CAAC,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACrF,CAAC;IAED,eAAe,CAAC,UAAkB;QACjC,OAAO,wBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC,CAAA;IAC7G,CAAC;CACD;AAlBD,gDAkBC"}
|
package/testing/test-model.js
CHANGED
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* ts-common is the basic building blocks of our typescript projects
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-model.js","sourceRoot":"","sources":["../../src/main/testing/test-model.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-model.js","sourceRoot":"","sources":["../../src/main/testing/test-model.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mDAA6C;AAuB7C,MAAM,WAAW,GAAoC,EAAE,CAAC;AAExD,SAAsB,YAAY,CAAC,SAAoC;;QACtE,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;YACjC,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAC;SAC5B;IACF,CAAC;CAAA;AAJD,oCAIC;AAED,SAAsB,WAAW,CAAiG,QAAwC;;QACzK,MAAM,MAAM,GAAmB;YAC9B,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,EAAE;SACV,CAAC;QAEF,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;QACnC,OAAO,CAAC,GAAG,CAAC,aAAa,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;QAE3C,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,MAAM,EAAE;YACpC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrD,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,EAAE;gBAC9D,MAAM,CAAC,OAAO,EAAE,CAAC;gBACjB,SAAS;aACT;YAED,MAAM,CAAC,MAAM,CAAC,IAAI,CACjB,IAAI,sBAAS,CAAC,k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AC,CAAC;AAClB,CAAC;AArBD,gDAqBC"}
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* ts-common is the basic building blocks of our typescript projects
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
class Dispatcher {
|
|
20
3
|
constructor(method) {
|
|
21
4
|
this.method = method;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-params.js","sourceRoot":"","sources":["../../src/main/ts-generics/array-params.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"array-params.js","sourceRoot":"","sources":["../../src/main/ts-generics/array-params.ts"],"names":[],"mappings":";AAGA,MAAM,UAAU;IAIf,YAAY,MAAS;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;IAEM,KAAK,CAAC,GAAM,EAAE,GAAG,CAAM;QAC7B,4EAA4E;QAC5E,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;IAEM,KAAK,CAAC,GAAM,EAAE,CAAI;QACxB,oDAAoD;QACpD,4CAA4C;QAC5C,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;CACD;AAOD,MAAM,SAAS;IAGd,YAAY,CAAC,GAAW,EAAE,GAAW;QACpC,OAAO,CAAC,GAAG,CAAC,EAAC,GAAG,EAAE,GAAG,EAAC,CAAC,CAAC;IACzB,CAAC;IAAA,CAAC;CACF;AAGD,MAAM,QAAQ,GAAG,IAAI,SAAS,EAAE,CAAC;AAEjC,MAAM,UAAU,GAAG,IAAI,UAAU,CAAgC,cAAc,CAAC,CAAC;AAEjF,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3C,4CAA4C;AAC5C,4CAA4C"}
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* ts-common is the basic building blocks of our typescript projects
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
const valueWithoutId = { one: "value-1", two: "value-2" };
|
|
20
3
|
// This works just fine...
|
|
21
4
|
const valueWithId = Object.assign(Object.assign({}, valueWithoutId), { _id: "new-id" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"omit-and-join.js","sourceRoot":"","sources":["../../src/main/ts-generics/omit-and-join.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"omit-and-join.js","sourceRoot":"","sources":["../../src/main/ts-generics/omit-and-join.ts"],"names":[],"mappings":";AAOA,MAAM,cAAc,GAAM,EAAC,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAC,CAAC;AAE3D,0BAA0B;AAC1B,MAAM,WAAW,mCAAU,cAAc,KAAE,GAAG,EAAE,QAAQ,GAAC,CAAC;AAE1D,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAGzB,SAAS,iBAAiB,CAAkC,eAAkB;IAE7E,oCAAoC;IACpC,aAAa;IACb,MAAM,YAAY,mCAAU,eAAe,KAAE,GAAG,EAAE,QAAQ,GAAC,CAAC;AAC7D,CAAC;AAED,SAAS,oBAAoB,CAAc,eAA+B;IAEzE,oCAAoC;IACpC,aAAa;IACb,MAAM,YAAY,mCAAU,eAAe,KAAE,GAAG,EAAE,QAAQ,GAAC,CAAC;AAC7D,CAAC;AAED,aAAa;AACb,iBAAiB,CAAI,EAAC,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAC,CAAC,CAAA"}
|
package/utils/array-tools.js
CHANGED
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* ts-common is the basic building blocks of our typescript projects
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
package/utils/array-tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-tools.js","sourceRoot":"","sources":["../../src/main/utils/array-tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"array-tools.js","sourceRoot":"","sources":["../../src/main/utils/array-tools.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,SAAgB,mBAAmB,CAAI,KAAU,EAAE,IAAO;IACzD,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC7C,CAAC;AAHD,kDAGC;AAED,SAAgB,eAAe,CAAI,KAAU,EAAE,IAA2B;IACzE,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACpC,OAAO,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC7C,CAAC;AAHD,0CAGC;AAED,SAAgB,sBAAsB,CAAI,KAAU,EAAE,KAAa;IAClE,IAAI,KAAK,GAAG,CAAC,CAAC;QACb,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAExB,OAAO,KAAK,CAAC;AACd,CAAC;AALD,wDAKC;AAED,SAAgB,iBAAiB,CAAI,KAAU,EAAE,KAAU;IAC1D,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IACrB,OAAO,KAAK,CAAC;AACd,CAAC;AAHD,8CAGC;AAED,SAAgB,cAAc,CAAI,KAAU,EAAE,IAAO;IACpD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAChB,OAAO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ts-common is the basic building blocks of our typescript projects
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
3
|
exports.hashPasswordWithSalt = exports.randomObject = exports.randomNumber = void 0;
|
|
21
4
|
const crypto_1 = require("crypto");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crypto-tools.js","sourceRoot":"","sources":["../../src/main/utils/crypto-tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"crypto-tools.js","sourceRoot":"","sources":["../../src/main/utils/crypto-tools.ts"],"names":[],"mappings":";;;AACA,mCAAkC;AAElC,SAAgB,YAAY,CAAC,KAAa;IACzC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;AAC3C,CAAC;AAFD,oCAEC;AAED,SAAgB,YAAY,CAAI,KAAU;IACzC,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1C,CAAC;AAFD,oCAEC;AAED,SAAgB,oBAAoB,CAAC,IAAqB,EAAE,QAAyB;IACpF,OAAO,mBAAU,CAAC,QAAQ,EAAE,IAAI,CAAC;SAC/B,MAAM,CAAC,QAAQ,CAAC;SAChB,MAAM,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC;AAJD,oDAIC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Timestamp } from "./types";
|
|
2
|
+
export declare function createReadableTimestampObject(pattern?: string, timestamp?: number, timezone?: string): Timestamp;
|
|
3
|
+
export declare function formatTimestamp(pattern?: string, timestamp?: number, timezone?: string): string;
|
|
4
|
+
export declare function parseTimeString(timestamp: string, pattern?: string): number;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseTimeString = exports.formatTimestamp = exports.createReadableTimestampObject = void 0;
|
|
4
|
+
const moment_1 = require("moment/moment");
|
|
5
|
+
const date_time_tools_1 = require("./date-time-tools");
|
|
6
|
+
function createReadableTimestampObject(pattern = date_time_tools_1.Format_HHmmss_DDMMYYYY, timestamp = date_time_tools_1.currentTimeMillies(), timezone) {
|
|
7
|
+
const timeObj = {
|
|
8
|
+
timestamp: timestamp,
|
|
9
|
+
pretty: formatTimestamp(pattern, timestamp)
|
|
10
|
+
};
|
|
11
|
+
if (timezone)
|
|
12
|
+
timeObj.timezone = timezone;
|
|
13
|
+
return timeObj;
|
|
14
|
+
}
|
|
15
|
+
exports.createReadableTimestampObject = createReadableTimestampObject;
|
|
16
|
+
function formatTimestamp(pattern = date_time_tools_1.Format_HHmmss_DDMMYYYY, timestamp = date_time_tools_1.currentTimeMillies(), timezone) {
|
|
17
|
+
const m = moment_1.utc(timestamp);
|
|
18
|
+
if (timezone) {
|
|
19
|
+
m.utcOffset(timezone);
|
|
20
|
+
}
|
|
21
|
+
return m.format(pattern);
|
|
22
|
+
}
|
|
23
|
+
exports.formatTimestamp = formatTimestamp;
|
|
24
|
+
function parseTimeString(timestamp, pattern = date_time_tools_1.Format_HHmmss_DDMMYYYY) {
|
|
25
|
+
return moment_1.utc(timestamp, pattern).valueOf();
|
|
26
|
+
}
|
|
27
|
+
exports.parseTimeString = parseTimeString;
|
|
28
|
+
//# sourceMappingURL=date-manipulation-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-manipulation-tools.js","sourceRoot":"","sources":["../../src/main/utils/date-manipulation-tools.ts"],"names":[],"mappings":";;;AACA,0CAAkC;AAClC,uDAA6E;AAE7E,SAAgB,6BAA6B,CAAC,UAAkB,wCAAsB,EAAE,YAAoB,oCAAkB,EAAE,EAAE,QAAiB;IAE/I,MAAM,OAAO,GAAc;QACvB,SAAS,EAAE,SAAS;QACpB,MAAM,EAAE,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC;KAC9C,CAAC;IAEF,IAAI,QAAQ;QACR,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAEhC,OAAO,OAAO,CAAC;AACnB,CAAC;AAXD,sEAWC;AAED,SAAgB,eAAe,CAAC,UAAkB,wCAAsB,EAAE,YAAoB,oCAAkB,EAAE,EAAE,QAAiB;IACjI,MAAM,CAAC,GAAG,YAAG,CAAC,SAAS,CAAC,CAAC;IACzB,IAAI,QAAQ,EAAE;QACV,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;KACzB;IACD,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC;AAND,0CAMC;AAED,SAAgB,eAAe,CAAC,SAAiB,EAAE,UAAkB,wCAAsB;IACvF,OAAO,YAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;AAC7C,CAAC;AAFD,0CAEC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuditBy
|
|
1
|
+
import { AuditBy } from "./types";
|
|
2
2
|
export declare const Second = 1000;
|
|
3
3
|
export declare const Minute: number;
|
|
4
4
|
export declare const Hour: number;
|
|
@@ -16,6 +16,3 @@ export declare function auditBy(user: string, comment?: string, timestamp?: numb
|
|
|
16
16
|
export declare function currentTimeMillies(): number;
|
|
17
17
|
export declare function currentLocalTimeMillies(): number;
|
|
18
18
|
export declare function currentTimeMilliesWithTimeZone(): number;
|
|
19
|
-
export declare function createReadableTimestampObject(pattern?: string, timestamp?: number, timezone?: string): Timestamp;
|
|
20
|
-
export declare function formatTimestamp(pattern?: string, timestamp?: number, timezone?: string): string;
|
|
21
|
-
export declare function parseTimeString(timestamp: string, pattern?: string): number;
|
package/utils/date-time-tools.js
CHANGED
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* ts-common is the basic building blocks of our typescript projects
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -26,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
26
9
|
});
|
|
27
10
|
};
|
|
28
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
30
|
-
const
|
|
12
|
+
exports.currentTimeMilliesWithTimeZone = exports.currentLocalTimeMillies = exports.currentTimeMillies = exports.auditBy = exports._clearInterval = exports._setInterval = exports._clearTimeout = exports._setTimeout = exports.timeout = exports.Format_YYYYMMDD_HHmmss = exports.Format_HHmmss_DDMMYYYY = exports.Week = exports.Day = exports.Hour = exports.Minute = exports.Second = void 0;
|
|
13
|
+
const date_manipulation_tools_1 = require("./date-manipulation-tools");
|
|
31
14
|
exports.Second = 1000;
|
|
32
15
|
exports.Minute = exports.Second * 60;
|
|
33
16
|
exports.Hour = exports.Minute * 60;
|
|
@@ -64,7 +47,7 @@ exports._clearInterval = _clearInterval;
|
|
|
64
47
|
function auditBy(user, comment, timestamp = currentTimeMillies()) {
|
|
65
48
|
const _auditBy = {
|
|
66
49
|
auditBy: user,
|
|
67
|
-
auditAt: createReadableTimestampObject(exports.Format_HHmmss_DDMMYYYY, timestamp)
|
|
50
|
+
auditAt: date_manipulation_tools_1.createReadableTimestampObject(exports.Format_HHmmss_DDMMYYYY, timestamp)
|
|
68
51
|
};
|
|
69
52
|
if (comment)
|
|
70
53
|
_auditBy.comment = comment;
|
|
@@ -86,26 +69,4 @@ function currentTimeMilliesWithTimeZone() {
|
|
|
86
69
|
return date.getTime() + date.getTimezoneOffset();
|
|
87
70
|
}
|
|
88
71
|
exports.currentTimeMilliesWithTimeZone = currentTimeMilliesWithTimeZone;
|
|
89
|
-
function createReadableTimestampObject(pattern = exports.Format_HHmmss_DDMMYYYY, timestamp = currentTimeMillies(), timezone) {
|
|
90
|
-
const timeObj = {
|
|
91
|
-
timestamp: timestamp,
|
|
92
|
-
pretty: formatTimestamp(pattern, timestamp)
|
|
93
|
-
};
|
|
94
|
-
if (timezone)
|
|
95
|
-
timeObj.timezone = timezone;
|
|
96
|
-
return timeObj;
|
|
97
|
-
}
|
|
98
|
-
exports.createReadableTimestampObject = createReadableTimestampObject;
|
|
99
|
-
function formatTimestamp(pattern = exports.Format_HHmmss_DDMMYYYY, timestamp = currentTimeMillies(), timezone) {
|
|
100
|
-
const m = moment.utc(timestamp);
|
|
101
|
-
if (timezone) {
|
|
102
|
-
m.utcOffset(timezone);
|
|
103
|
-
}
|
|
104
|
-
return m.format(pattern);
|
|
105
|
-
}
|
|
106
|
-
exports.formatTimestamp = formatTimestamp;
|
|
107
|
-
function parseTimeString(timestamp, pattern = exports.Format_HHmmss_DDMMYYYY) {
|
|
108
|
-
return moment.utc(timestamp, pattern).valueOf();
|
|
109
|
-
}
|
|
110
|
-
exports.parseTimeString = parseTimeString;
|
|
111
72
|
//# sourceMappingURL=date-time-tools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-time-tools.js","sourceRoot":"","sources":["../../src/main/utils/date-time-tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date-time-tools.js","sourceRoot":"","sources":["../../src/main/utils/date-time-tools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAwE;AAG3D,QAAA,MAAM,GAAG,IAAI,CAAC;AACd,QAAA,MAAM,GAAG,cAAM,GAAG,EAAE,CAAC;AACrB,QAAA,IAAI,GAAG,cAAM,GAAG,EAAE,CAAC;AACnB,QAAA,GAAG,GAAG,YAAI,GAAG,EAAE,CAAC;AAChB,QAAA,IAAI,GAAG,WAAG,GAAG,CAAC,CAAC;AAEf,QAAA,sBAAsB,GAAG,qBAAqB,CAAC;AAC/C,QAAA,sBAAsB,GAAG,qBAAqB,CAAC;AAI5D,SAAsB,OAAO,CAAC,OAAe;;QACzC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;IAC3E,CAAC;CAAA;AAFD,0BAEC;AAED,SAAgB,WAAW,CAAC,OAAqB,EAAE,OAAO,GAAG,CAAC,EAAE,GAAG,IAAW;IAC1E,OAAO,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAsB,CAAC;AACtE,CAAC;AAFD,kCAEC;AAED,SAAgB,aAAa,CAAC,SAAkB;IAC5C,IAAI,CAAC,SAAS;QACV,OAAO;IACX,O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of our typescript projects
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
3
|
exports.Filter = void 0;
|
|
21
4
|
class Filter {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-tools.js","sourceRoot":"","sources":["../../src/main/utils/filter-tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"filter-tools.js","sourceRoot":"","sources":["../../src/main/utils/filter-tools.ts"],"names":[],"mappings":";;;AACA,MAAa,MAAM;IAAnB;QACS,YAAO,GAAG,EAAE,CAAC;IAkCtB,CAAC;IAhCA,SAAS,CAAC,MAAc;QACvB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,SAAS,CAAC,MAAc;QACvB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,MAAM,CAAI,KAAU,EAAE,MAA6B;QAClD,MAAM,cAAc,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAE5C,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5B,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;YAClC,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE;gBAC/B,IAAI,GAAG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