@intuitionrobotics/ts-common 0.44.16 → 0.45.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/consts/consts.js +17 -0
- package/consts/consts.js.map +1 -1
- package/core/application.js +17 -0
- package/core/application.js.map +1 -1
- package/core/debug-flags.js +17 -0
- package/core/debug-flags.js.map +1 -1
- package/core/dispatcher.js +17 -0
- package/core/dispatcher.js.map +1 -1
- package/core/error-handling.js +17 -0
- package/core/error-handling.js.map +1 -1
- package/core/exceptions.d.ts +3 -0
- package/core/exceptions.js +20 -0
- package/core/exceptions.js.map +1 -1
- package/core/logger/BeLogged.js +17 -0
- package/core/logger/BeLogged.js.map +1 -1
- package/core/logger/LogClient.js +17 -0
- package/core/logger/LogClient.js.map +1 -1
- package/core/logger/LogClient_BaseRotate.js +18 -0
- package/core/logger/LogClient_BaseRotate.js.map +1 -1
- package/core/logger/LogClient_Browser.js +17 -0
- package/core/logger/LogClient_Browser.js.map +1 -1
- package/core/logger/LogClient_Function.js +17 -0
- package/core/logger/LogClient_Function.js.map +1 -1
- package/core/logger/LogClient_MemBuffer.js +18 -0
- package/core/logger/LogClient_MemBuffer.js.map +1 -1
- package/core/logger/LogClient_Terminal.js +17 -0
- package/core/logger/LogClient_Terminal.js.map +1 -1
- package/core/logger/Logger.js +17 -0
- package/core/logger/Logger.js.map +1 -1
- package/core/logger/types.js +17 -0
- package/core/logger/types.js.map +1 -1
- package/core/logger/utils.js +20 -0
- package/core/logger/utils.js.map +1 -1
- package/core/module-manager.d.ts +3 -0
- package/core/module-manager.js +17 -0
- package/core/module-manager.js.map +1 -1
- package/core/module.d.ts +5 -6
- package/core/module.js +24 -17
- package/core/module.js.map +1 -1
- package/index.d.ts +35 -0
- package/index.js +63 -0
- 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 +20 -4
- package/permissions/permission-group.js.map +1 -1
- package/testing/test-model.js +17 -0
- package/testing/test-model.js.map +1 -1
- package/ts-generics/array-params.js +17 -0
- package/ts-generics/array-params.js.map +1 -1
- package/ts-generics/omit-and-join.js +17 -0
- package/ts-generics/omit-and-join.js.map +1 -1
- package/utils/array-tools.js +17 -0
- package/utils/array-tools.js.map +1 -1
- package/utils/crypto-tools.js +17 -0
- package/utils/crypto-tools.js.map +1 -1
- package/utils/date-time-tools.d.ts +4 -1
- package/utils/date-time-tools.js +42 -3
- package/utils/date-time-tools.js.map +1 -1
- package/utils/filter-tools.js +17 -0
- package/utils/filter-tools.js.map +1 -1
- package/utils/hash-tools.js +17 -0
- package/utils/hash-tools.js.map +1 -1
- package/utils/merge-tools.js +22 -6
- package/utils/merge-tools.js.map +1 -1
- package/utils/object-tools.js +20 -3
- package/utils/object-tools.js.map +1 -1
- package/utils/queue.js +20 -3
- package/utils/queue.js.map +1 -1
- package/utils/random-tools.js +17 -0
- package/utils/random-tools.js.map +1 -1
- package/utils/string-tools.js +17 -0
- package/utils/string-tools.js.map +1 -1
- package/utils/tools.js +17 -0
- package/utils/tools.js.map +1 -1
- package/utils/types.js +17 -0
- package/utils/types.js.map +1 -1
- package/utils/version-tools.js +20 -3
- package/utils/version-tools.js.map +1 -1
- package/validator/validator.js +19 -5
- package/validator/validator.js.map +1 -1
- package/utils/date-manipulation-tools.d.ts +0 -4
- package/utils/date-manipulation-tools.js +0 -28
- package/utils/date-manipulation-tools.js.map +0 -1
package/core/module.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
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
|
+
*/
|
|
2
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
20
|
exports.Module = void 0;
|
|
4
21
|
const exceptions_1 = require("./exceptions");
|
|
@@ -8,9 +25,8 @@ const validator_1 = require("../validator/validator");
|
|
|
8
25
|
const date_time_tools_1 = require("../utils/date-time-tools");
|
|
9
26
|
class Module extends Logger_1.Logger {
|
|
10
27
|
// noinspection TypeScriptAbstractClassConstructorCanBeMadeProtected
|
|
11
|
-
constructor(
|
|
12
|
-
|
|
13
|
-
super(p2 ? p2 : typeof p1 === "string" ? p1 : undefined);
|
|
28
|
+
constructor(name) {
|
|
29
|
+
super(name);
|
|
14
30
|
this.initiated = false;
|
|
15
31
|
this.config = {};
|
|
16
32
|
this.timeoutMap = {};
|
|
@@ -24,17 +40,11 @@ class Module extends Logger_1.Logger {
|
|
|
24
40
|
.catch(reason => this.logError(`Async call error: ${label}`, reason));
|
|
25
41
|
}, 0);
|
|
26
42
|
};
|
|
27
|
-
this.name = this.deduceName(
|
|
43
|
+
this.name = this.deduceName(name).replace("_Class", "");
|
|
28
44
|
}
|
|
29
|
-
deduceName(
|
|
30
|
-
if (
|
|
31
|
-
|
|
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;
|
|
45
|
+
deduceName(name) {
|
|
46
|
+
if (name)
|
|
47
|
+
return name;
|
|
38
48
|
const tempName = this.constructor["name"];
|
|
39
49
|
if (!tempName.endsWith("_Class"))
|
|
40
50
|
throw new exceptions_1.BadImplementationException(`Module class MUST end with '_Class' e.g. MyModule_Class, check class named: ${tempName}`);
|
|
@@ -81,11 +91,8 @@ class Module extends Logger_1.Logger {
|
|
|
81
91
|
setConfigValidator(validator) {
|
|
82
92
|
this.configValidator = validator;
|
|
83
93
|
}
|
|
84
|
-
/**
|
|
85
|
-
* @deprecated The method has been deprecated in favour of {@link setConfig}
|
|
86
|
-
*/
|
|
87
94
|
setDefaultConfig(config) {
|
|
88
|
-
this.
|
|
95
|
+
this.config = config;
|
|
89
96
|
}
|
|
90
97
|
getName() {
|
|
91
98
|
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":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAQH,6CAAwD;AACxD,sDAA2C;AAC3C,4CAAuC;AACvC,sDAAuE;AACvE,8DAAsG;AAEtG,MAAsB,MAClB,SAAQ,eAAM;IAQjB,oEAAoE;IACjE,YAAY,IAAY;QAC1B,KAAK,CAAC,IAAI,CAAC,CAAC;QAPM,cAAS,GAAG,KAAK,CAAC;QACxB,WAAM,GAAW,EAAY,CAAC;QAE9B,eAAU,GAA4B,EAAE,CAAC;QAoFzC,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,OAAO,CAAC,MAAM,CAAC;qBACd,IAAI,CAAC,GAAG,EAAE;oBACP,IAAI,CAAC,QAAQ,CAAC,yBAAyB,KAAK,EAAE,CAAC,CAAC;gBACpD,CAAC,CAAC;qBACD,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CA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QAAQ;QACX,IAAG,IAAI,CAAC,eAAe;YACnB,oBAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,CAAC,CAAA;IACnD,CAAC;CACJ;AA9GD,wBA8GC"}
|
package/index.d.ts
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
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,2 +1,65 @@
|
|
|
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);
|
|
2
65
|
//# 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":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;AAEH,uDAAqC;AAErC,gDAA8B;AAC9B,wDAAsC;AACtC,qDAAmC;AACnC,oDAAkC;AAClC,oDAAkC;AAClC,wDAAsC;AAEtC,qDAAmC;AACnC,sDAAoC;AACpC,qEAAmD;AACnD,mEAAiD;AACjD,oEAAkD;AAClD,kEAAgD;AAChD,mEAAiD;AACjD,yDAAuC;AACvC,uDAAqC;AACrC,sDAAoC;AACpC,0DAAwC;AAExC,iEAA+C;AAE/C,gDAA8B;AAC9B,gDAA8B;AAC9B,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,0DAAwC;AACxC,sDAAoC;AACpC,uDAAqC;AACrC,sDAAmC;AACnC,wDAAqC;AACrC,gDAA8B;AAC9B,qDAAmC;AACnC,uDAAqC;AAErC,wDAAqC;AAErC,kDAAgC;AAEhC,4DAA0C"}
|
|
@@ -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 __1 = require("..");
|
|
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(...__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 __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,0BAGY;AAmBZ,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,CAA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ionCategory = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/*
|
|
5
|
+
* ts-common is the basic building blocks of our typescript projects
|
|
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");
|
|
6
22
|
class PermissionCategory {
|
|
7
23
|
constructor(key, permissionsEnum, defaultValue) {
|
|
8
24
|
this.key = key;
|
|
9
25
|
this.permissionsEnum = permissionsEnum;
|
|
10
26
|
this.defaultValue = defaultValue;
|
|
11
27
|
const _levels = Object.keys(permissionsEnum).filter(value => isNaN(parseInt(value)));
|
|
12
|
-
this.levels =
|
|
28
|
+
this.levels = index_1.sortArray(_levels, (_key) => permissionsEnum[_key]).reverse();
|
|
13
29
|
}
|
|
14
30
|
getClosestMatch(permission) {
|
|
15
|
-
return
|
|
31
|
+
return index_1.deepClone(this.levels).reverse().find(((level) => this.permissionsEnum[level] <= permission));
|
|
16
32
|
}
|
|
17
33
|
}
|
|
18
34
|
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;;;;;;;;;;;;;;;;GAgBG;AACH,oCAGkB;AAElB,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,iBAAS,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,iBAAS,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,4 +1,21 @@
|
|
|
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
|
+
*/
|
|
2
19
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
20
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
21
|
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":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;AAEH,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,C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,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IAEH,IAAI,WAAW,GAAG,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AArBD,gDAqBC"}
|
|
@@ -1,4 +1,21 @@
|
|
|
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
|
+
*/
|
|
2
19
|
class Dispatcher {
|
|
3
20
|
constructor(method) {
|
|
4
21
|
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":";AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,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,4 +1,21 @@
|
|
|
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
|
+
*/
|
|
2
19
|
const valueWithoutId = { one: "value-1", two: "value-2" };
|
|
3
20
|
// This works just fine...
|
|
4
21
|
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":";AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH,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,4 +1,21 @@
|
|
|
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
|
+
*/
|
|
2
19
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
20
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
21
|
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":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;AAEH,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,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K,EAAE,MAAM,CAAC,CAAC;SACzB;aAAM;YACN,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACnB;KACD;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAVD,8BAUC;AAAA,CAAC"}
|
package/utils/crypto-tools.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
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
|
+
*/
|
|
2
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
20
|
exports.hashPasswordWithSalt = exports.randomObject = exports.randomNumber = void 0;
|
|
4
21
|
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":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuditBy } from "./types";
|
|
1
|
+
import { AuditBy, Timestamp } from "./types";
|
|
2
2
|
export declare const Second = 1000;
|
|
3
3
|
export declare const Minute: number;
|
|
4
4
|
export declare const Hour: number;
|
|
@@ -16,3 +16,6 @@ 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,4 +1,21 @@
|
|
|
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
|
+
*/
|
|
2
19
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
20
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
21
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9,8 +26,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
26
|
});
|
|
10
27
|
};
|
|
11
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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
|
|
29
|
+
exports.parseTimeString = exports.formatTimestamp = exports.createReadableTimestampObject = 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;
|
|
30
|
+
const moment = require("moment");
|
|
14
31
|
exports.Second = 1000;
|
|
15
32
|
exports.Minute = exports.Second * 60;
|
|
16
33
|
exports.Hour = exports.Minute * 60;
|
|
@@ -47,7 +64,7 @@ exports._clearInterval = _clearInterval;
|
|
|
47
64
|
function auditBy(user, comment, timestamp = currentTimeMillies()) {
|
|
48
65
|
const _auditBy = {
|
|
49
66
|
auditBy: user,
|
|
50
|
-
auditAt:
|
|
67
|
+
auditAt: createReadableTimestampObject(exports.Format_HHmmss_DDMMYYYY, timestamp)
|
|
51
68
|
};
|
|
52
69
|
if (comment)
|
|
53
70
|
_auditBy.comment = comment;
|
|
@@ -69,4 +86,26 @@ function currentTimeMilliesWithTimeZone() {
|
|
|
69
86
|
return date.getTime() + date.getTimezoneOffset();
|
|
70
87
|
}
|
|
71
88
|
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;
|
|
72
111
|
//# 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":"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AAC,QAAQ,CAAC,CAAC;KACtB;IACD,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC1B,CAAC;AAND,0CAMC;AAED,SAAgB,eAAe,CAAC,SAAiB,EAAE,UAAkB,8BAAsB;IAC1F,OAAO,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;AACjD,CAAC;AAFD,0CAEC"}
|
package/utils/filter-tools.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
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
|
+
*/
|
|
2
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
20
|
exports.Filter = void 0;
|
|
4
21
|
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":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,MAAa,MAAM;IAAnB;QACS,YAAO,GAAG,EAAE,CAAC;IAkCtB,CAAC;IAh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*
|
|
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
|
+
*/
|
|
2
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
20
|
exports.decode = exports.encode = exports.sha512 = exports.sha384 = exports.sha256 = exports.sha1 = exports.md5 = void 0;
|
|
4
21
|
const node_forge_1 = require("node-forge");
|
package/utils/hash-tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash-tools.js","sourceRoot":"","sources":["../../src/main/utils/hash-tools.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"hash-tools.js","sourceRoot":"","sources":["../../src/main/utils/hash-tools.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,2CAA8B;AAE9B,SAAgB,GAAG,CAAC,aAAkB;IACrC,OAAO,eAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC;AAC7E,CAAC;AAFD,kBAEC;AAED,SAAgB,IAAI,CAAC,aAAkB;IACtC,OAAO,eAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC;AAC9E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