@intuitionrobotics/ts-common 0.46.0 → 0.47.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 +19 -2
- package/core/debug-flags.js.map +1 -1
- package/core/dispatcher.d.ts +4 -4
- package/core/dispatcher.js +7 -9
- package/core/dispatcher.js.map +1 -1
- package/core/error-handling.d.ts +1 -1
- package/core/error-handling.js +18 -1
- package/core/error-handling.js.map +1 -1
- package/core/exceptions.d.ts +5 -2
- package/core/exceptions.js +23 -1
- package/core/exceptions.js.map +1 -1
- package/core/logger/BeLogged.js +18 -1
- package/core/logger/BeLogged.js.map +1 -1
- package/core/logger/LogClient.d.ts +1 -1
- package/core/logger/LogClient.js +17 -0
- package/core/logger/LogClient.js.map +1 -1
- package/core/logger/LogClient_BaseRotate.d.ts +1 -1
- package/core/logger/LogClient_BaseRotate.js +19 -1
- 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 +18 -1
- 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 +19 -2
- 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.d.ts +2 -2
- package/core/logger/types.js +18 -1
- package/core/logger/types.js.map +1 -1
- package/core/logger/utils.js +23 -3
- package/core/logger/utils.js.map +1 -1
- package/core/module-manager.js +2 -2
- package/core/module-manager.js.map +1 -1
- package/core/module.d.ts +2 -6
- package/core/module.js +14 -24
- package/core/module.js.map +1 -1
- package/index.d.ts +35 -0
- package/index.js +67 -0
- package/index.js.map +1 -1
- package/modules/CliParamsModule.d.ts +3 -3
- package/modules/CliParamsModule.js +3 -3
- package/modules/CliParamsModule.js.map +1 -1
- package/package.json +4 -4
- package/permissions/permission-group.js +20 -4
- package/permissions/permission-group.js.map +1 -1
- package/testing/test-model.d.ts +4 -4
- package/testing/test-model.js +17 -0
- package/testing/test-model.js.map +1 -1
- package/utils/array-tools.d.ts +2 -2
- package/utils/array-tools.js +17 -0
- package/utils/array-tools.js.map +1 -1
- package/utils/crypto-tools.js +18 -1
- package/utils/crypto-tools.js.map +1 -1
- package/utils/date-time-tools.d.ts +5 -2
- 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.d.ts +1 -1
- package/utils/object-tools.js +20 -3
- package/utils/object-tools.js.map +1 -1
- package/utils/queue.d.ts +2 -2
- package/utils/queue.js +3 -3
- package/utils/queue.js.map +1 -1
- package/utils/random-tools.js +18 -1
- 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 +5 -3
- package/utils/tools.js.map +1 -1
- package/utils/types.d.ts +25 -23
- package/utils/types.js +17 -0
- package/utils/types.js.map +1 -1
- package/utils/version-tools.d.ts +1 -1
- package/utils/version-tools.js +20 -3
- package/utils/version-tools.js.map +1 -1
- package/validator/validator.d.ts +9 -7
- package/validator/validator.js +35 -21
- package/validator/validator.js.map +1 -1
- package/ts-generics/array-params.d.ts +0 -17
- package/ts-generics/array-params.js +0 -27
- package/ts-generics/array-params.js.map +0 -1
- package/ts-generics/omit-and-join.d.ts +0 -12
- package/ts-generics/omit-and-join.js +0 -18
- package/ts-generics/omit-and-join.js.map +0 -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/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");
|
|
@@ -11,7 +28,7 @@ function randomObject(items) {
|
|
|
11
28
|
}
|
|
12
29
|
exports.randomObject = randomObject;
|
|
13
30
|
function hashPasswordWithSalt(salt, password) {
|
|
14
|
-
return crypto_1.createHmac('sha512', salt)
|
|
31
|
+
return (0, crypto_1.createHmac)('sha512', salt)
|
|
15
32
|
.update(password)
|
|
16
33
|
.digest('hex');
|
|
17
34
|
}
|
|
@@ -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,IAAA,mBAAU,EAAC,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;
|
|
@@ -6,7 +6,7 @@ export declare const Day: number;
|
|
|
6
6
|
export declare const Week: number;
|
|
7
7
|
export declare const Format_HHmmss_DDMMYYYY = "HH:mm:ss_DD-MM-YYYY";
|
|
8
8
|
export declare const Format_YYYYMMDD_HHmmss = "YYYY-MM-DD_HH:mm:ss";
|
|
9
|
-
export
|
|
9
|
+
export type TimerHandler = (...args: any[]) => void;
|
|
10
10
|
export declare function timeout(sleepMs: number): Promise<unknown>;
|
|
11
11
|
export declare function _setTimeout(handler: TimerHandler, sleepMs?: number, ...args: any[]): number;
|
|
12
12
|
export declare function _clearTimeout(handlerId?: number): void;
|
|
@@ -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":"","sources":["../../src/main/utils/date-time-tools.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;AAEH,iCAAiC;AAMpB,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;;QAC5C,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;IACxE,CAAC;CAAA;AAFD,0BAEC;AAED,SAAgB,WAAW,CAAC,OAAqB,EAAE,OAAO,GAAG,CAAC,EAAE,GAAG,IAAW;IAC7E,OAAO,UAAU,CAAC,OAAO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AClD,CAAC;AAHD,wEAGC;AAED,SAAgB,6BAA6B,CAAC,UAAkB,8BAAsB,EAAE,YAAoB,kBAAkB,EAAE,EAAE,QAAiB;IAElJ,MAAM,OAAO,GAAc;QAC1B,SAAS,EAAE,SAAS;QACpB,MAAM,EAAE,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC;KAC3C,CAAC;IAEF,IAAI,QAAQ;QACX,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAE7B,OAAO,OAAO,CAAC;AAChB,CAAC;AAXD,sEAWC;AAED,SAAgB,eAAe,CAAC,UAAkB,8BAAsB,EAAE,YAAoB,kBAAkB,EAAE,EAAE,QAAiB;IACpI,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAChC,IAAI,QAAQ,EAAE,CAAC;QACd,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC;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;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,CAAC;gBAChC,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC;oBAC1C,OAAO,IAAI,CAAC;YACd,CAAC;YAED,OAAO,KAAK,CAAC;QACd,CAAC,CAAC,CAAC;IACJ,CAAC;IAEO,aAAa;QACpB,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC1B,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QACvB,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QAC9B,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACpC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;QACzD,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC;QAEtD,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;CACD;AAnCD,wBAmCC"}
|
package/utils/hash-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.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,CAAC;AAFD,oBAEC;AAED,SAAgB,MAAM,CAAC,aAAkB;IACxC,OAAO,eAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC;AAChF,CAAC;AAFD,wBAEC;AAED,SAAgB,MAAM,CAAC,aAAkB;IACxC,OAAO,eAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC;AAChF,CAAC;AAFD,wBAEC;AAED,SAAgB,MAAM,CAAC,aAAkB;IACxC,OAAO,eAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC;AAChF,CAAC;AAFD,wBAEC;AAED,SAAgB,MAAM,CAAC,IAA8B,EAAE,WAA2B,QAAQ;IACzF,IAAI,MAAc,CAAC;IACnB,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QACxB,MAAM,GAAG,IAAI,CAAC;SACV,IAAI,OAAO,IAAI,KAAK,QAAQ;QAChC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;;QAEnC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;IAE/C,OAAO,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAClC,CAAC;AAVD,wBAUC;AAED,SAAgB,MAAM,CAAC,OAAe,EAAE,OAAuB,QAAQ,EAAE,KAAqB,MAAM;IACnG,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAChD,CAAC;AAFD,wBAEC"}
|
package/utils/merge-tools.js
CHANGED
|
@@ -1,15 +1,31 @@
|
|
|
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.merge = exports.mergeArray = exports.mergeObject = void 0;
|
|
4
|
-
const
|
|
5
|
-
const object_tools_1 = require("./object-tools");
|
|
21
|
+
const index_1 = require("../index");
|
|
6
22
|
function mergeObject(original, override) {
|
|
7
23
|
if (original === override) {
|
|
8
24
|
console.log("Original: " + JSON.stringify(original));
|
|
9
25
|
console.log("Override: " + JSON.stringify(override));
|
|
10
|
-
throw new
|
|
26
|
+
throw new index_1.BadImplementationException(`trying to merge same Object instance\n Original: ${typeof original}\n Override: ${typeof override}`);
|
|
11
27
|
}
|
|
12
|
-
const returnValue =
|
|
28
|
+
const returnValue = (0, index_1.deepClone)(original);
|
|
13
29
|
return Object.keys(override).reduce((obj, key) => {
|
|
14
30
|
obj[key] = merge(original[key], override[key]);
|
|
15
31
|
if (obj[key] === undefined)
|
|
@@ -22,7 +38,7 @@ function mergeArray(original, override) {
|
|
|
22
38
|
if (original === override) {
|
|
23
39
|
console.log("Original: " + JSON.stringify(original));
|
|
24
40
|
console.log("Override: " + JSON.stringify(override));
|
|
25
|
-
throw new
|
|
41
|
+
throw new index_1.BadImplementationException(`trying to merge same Array instance\n Original: ${typeof original}\n Override: ${typeof override}`);
|
|
26
42
|
}
|
|
27
43
|
// const returnValue = deepClone(original);
|
|
28
44
|
// returnValue.reduce((array, value) => {
|
|
@@ -46,7 +62,7 @@ function merge(original, override) {
|
|
|
46
62
|
if (override === undefined || override === null)
|
|
47
63
|
return undefined;
|
|
48
64
|
if (override && original && typeof original !== typeof override || (typeof original === "object" && typeof override === 'object' && Array.isArray(original) !== Array.isArray(override)))
|
|
49
|
-
throw new
|
|
65
|
+
throw new index_1.BadImplementationException(`trying to merge object of different types!! \n Original: ${typeof original}\n Override: ${typeof override}`);
|
|
50
66
|
if (Array.isArray(original) && Array.isArray(override))
|
|
51
67
|
return mergeArray(original, override);
|
|
52
68
|
if (typeof original === "object" && typeof override === 'object' && !Array.isArray(original) && !Array.isArray(override))
|
package/utils/merge-tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-tools.js","sourceRoot":"","sources":["../../src/main/utils/merge-tools.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"merge-tools.js","sourceRoot":"","sources":["../../src/main/utils/merge-tools.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,oCAGkB;AAElB,SAAgB,WAAW,CAAC,QAAa,EAAE,QAAa;IACvD,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;QACrD,MAAM,IAAI,kCAA0B,CAAC,oDAAoD,OAAO,QAAQ,gBAAgB,OAAO,QAAQ,EAAE,CAAC,CAAC;IAC5I,CAAC;IAED,MAAM,WAAW,GAAG,IAAA,iBAAS,EAAC,QAAQ,CAAC,CAAC;IACxC,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAChD,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAE/C,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS;YACzB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;QAEjB,OAAO,GAAG,CAAC;IACZ,CAAC,EAAE,WAAW,CAAC,CAAC;AACjB,CAAC;AAhBD,kCAgBC;AAED,SAAgB,UAAU,CAAC,QAAe,EAAE,QAAe;IAC1D,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,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IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;IAE9C,OAAO,QAAQ,CAAA;AAChB,CAAC;AAdD,sBAcC"}
|
package/utils/object-tools.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export declare function _values<T extends object = object>(object: T): (T[keyof
|
|
|
6
6
|
export declare function _setTypedProp<T extends object>(instance: T, key: keyof T, value: T[keyof T]): void;
|
|
7
7
|
export declare function cloneArr<T>(value: T[]): T[];
|
|
8
8
|
export declare function cloneObj<T extends object>(obj: T): T;
|
|
9
|
-
export declare function compare<T
|
|
9
|
+
export declare function compare<T>(one?: T, two?: T, keys?: (keyof T)[]): boolean;
|
|
10
10
|
export declare function assert<T>(message: string, expected: T, actual: T): void;
|
package/utils/object-tools.js
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
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.assert = exports.compare = exports.cloneObj = exports.cloneArr = exports._setTypedProp = exports._values = exports._keys = exports.deepClone = void 0;
|
|
4
|
-
const
|
|
21
|
+
const index_1 = require("../index");
|
|
5
22
|
function deepClone(obj) {
|
|
6
23
|
if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || typeof obj === 'undefined' || obj === null)
|
|
7
24
|
return obj;
|
|
@@ -47,7 +64,7 @@ function compare(one, two, keys) {
|
|
|
47
64
|
if (one === null || two === null)
|
|
48
65
|
return false;
|
|
49
66
|
if (typeofOne === "function")
|
|
50
|
-
throw new
|
|
67
|
+
throw new index_1.BadImplementationException("This compare meant to compare two POJOs.. nothing more");
|
|
51
68
|
if (typeofOne !== "object")
|
|
52
69
|
return one === two;
|
|
53
70
|
if (Array.isArray(one) && Array.isArray(two)) {
|
|
@@ -80,7 +97,7 @@ function compare(one, two, keys) {
|
|
|
80
97
|
exports.compare = compare;
|
|
81
98
|
function assert(message, expected, actual) {
|
|
82
99
|
if (!compare(expected, actual))
|
|
83
|
-
throw new
|
|
100
|
+
throw new index_1.AssertionException(`Assertion Failed:\n -- ${message}\n -- Expected: ${JSON.stringify(expected)}\n -- Actual: ${JSON.stringify(actual)}\n\n`);
|
|
84
101
|
}
|
|
85
102
|
exports.assert = assert;
|
|
86
103
|
//# sourceMappingURL=object-tools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-tools.js","sourceRoot":"","sources":["../../src/main/utils/object-tools.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"object-tools.js","sourceRoot":"","sources":["../../src/main/utils/object-tools.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,oCAGkB;AAGlB,SAAgB,SAAS,CAAI,GAAM;IAClC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,SAAS,IAAI,OAAO,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,IAAI;QAC/H,OAAO,GAAG,CAAC;IAEZ,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QACrB,OAAO,QAAQ,CAAC,GAAuB,CAAiB,CAAC;IAE1D,OAAO,QAAQ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EAAE,CAAC;QAC9B,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YACtC,SAAS;QAEV,OAAO,KAAK,CAAC;IACd,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AA1DD,0BA0DC;AAED,SAAgB,MAAM,CAAI,OAAe,EAAE,QAAW,EAAE,MAAS;IAChE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC7B,MAAM,IAAI,0BAAkB,CAC3B,2BAA2B,OAAO,oBAAoB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,oBAAoB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACnI,CAAC;AAJD,wBAIC"}
|
package/utils/queue.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export declare class Queue extends Logger {
|
|
|
8
8
|
constructor(name: string);
|
|
9
9
|
setParallelCount(parallelCount: number): this;
|
|
10
10
|
setOnQueueEmpty(onQueueEmpty: () => void): this;
|
|
11
|
-
addItem<T>(toExecute: () => Promise<T>, onCompleted?: (output: T) => void, onError?: (error:
|
|
12
|
-
addItemImpl<T>(toExecute: () => Promise<T>, onCompleted?: (output: T) => void, onError?: (error:
|
|
11
|
+
addItem<T>(toExecute: () => Promise<T>, onCompleted?: (output: T) => void, onError?: (error: any) => void): void;
|
|
12
|
+
addItemImpl<T>(toExecute: () => Promise<T>, onCompleted?: (output: T) => void, onError?: (error: any) => void): void;
|
|
13
13
|
ignore: () => void;
|
|
14
14
|
execute(): void;
|
|
15
15
|
executeSync(): Promise<void>;
|
package/utils/queue.js
CHANGED
|
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Queue = void 0;
|
|
13
|
+
const index_1 = require("../index");
|
|
13
14
|
const Logger_1 = require("../core/logger/Logger");
|
|
14
|
-
const array_tools_1 = require("./array-tools");
|
|
15
15
|
class Queue extends Logger_1.Logger {
|
|
16
16
|
constructor(name) {
|
|
17
17
|
super(name);
|
|
@@ -34,7 +34,7 @@ class Queue extends Logger_1.Logger {
|
|
|
34
34
|
this.execute();
|
|
35
35
|
}
|
|
36
36
|
addItemImpl(toExecute, onCompleted, onError) {
|
|
37
|
-
|
|
37
|
+
(0, index_1.addItemToArray)(this.queue, (resolve) => __awaiter(this, void 0, void 0, function* () {
|
|
38
38
|
this.running++;
|
|
39
39
|
try {
|
|
40
40
|
const output = yield toExecute();
|
|
@@ -63,7 +63,7 @@ class Queue extends Logger_1.Logger {
|
|
|
63
63
|
}
|
|
64
64
|
for (let i = 0; this.running < this.parallelCount && i < this.queue.length; i++) {
|
|
65
65
|
const toExecute = this.queue[0];
|
|
66
|
-
|
|
66
|
+
(0, index_1.removeItemFromArray)(this.queue, toExecute);
|
|
67
67
|
new Promise(toExecute.bind(this))
|
|
68
68
|
.then(this.ignore)
|
|
69
69
|
.catch(this.ignore);
|
package/utils/queue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../src/main/utils/queue.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../src/main/utils/queue.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAGkB;AAClB,kDAA6C;AAE7C,MAAa,KACZ,SAAQ,eAAM;IAQd,YAAY,IAAY;QACvB,KAAK,CAAC,IAAI,CAAC,CAAC;QAPL,kBAAa,GAAG,CAAC,CAAC;QAClB,YAAO,GAAG,CAAC,CAAC;QACZ,UAAK,GAA4B,EAAE,CAAC;QA6C5C,WAAM,GAAG,GAAG,EAAE;QACd,CAAC,CAAC;IAxCF,CAAC;IAED,gBAAgB,CAAC,aAAqB;QACrC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QAC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O;;QACN,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,KAAK,CAAC,EAAE,CAAC;YACnD,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACzC,OAAO,MAAA,IAAI,CAAC,YAAY,oDAAI,CAAC;QAC9B,CAAC;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,aAAa,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACjF,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAChC,IAAA,2BAAmB,EAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;YAC3C,IAAI,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBAC/B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;iBACjB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC;IACF,CAAC;IAEK,WAAW;;YAChB,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;gBAC3B,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;gBAC5B,IAAI,CAAC,OAAO,EAAE,CAAC;YAChB,CAAC,CAAC,CAAC;QACJ,CAAC;KAAA;CACD;AA1ED,sBA0EC"}
|
package/utils/random-tools.js
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
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.generateUUID = exports.generateHex = void 0;
|
|
4
21
|
const crypto_1 = require("crypto");
|
|
5
22
|
function generateHex(length) {
|
|
6
|
-
return crypto_1.randomBytes(Math.ceil(length / 2))
|
|
23
|
+
return (0, crypto_1.randomBytes)(Math.ceil(length / 2))
|
|
7
24
|
.toString('hex')
|
|
8
25
|
.slice(0, length).toLowerCase();
|
|
9
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"random-tools.js","sourceRoot":"","sources":["../../src/main/utils/random-tools.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"random-tools.js","sourceRoot":"","sources":["../../src/main/utils/random-tools.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,mCAAmC;AAEnC,SAAgB,WAAW,CAAC,MAAc;IACzC,OAAO,IAAA,oBAAW,EAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;SACvC,QAAQ,CAAC,KAAK,CAAC;SACf,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;AAJD,kCAIC;AAED,SAAgB,YAAY;IAC3B,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC;QACzE,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;QACtE,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACJ,CAAC;AALD,oCAKC"}
|
package/utils/string-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.padNumber = void 0;
|
|
4
21
|
function padNumber(num, length) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-tools.js","sourceRoot":"","sources":["../../src/main/utils/string-tools.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"string-tools.js","sourceRoot":"","sources":["../../src/main/utils/string-tools.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,SAAgB,SAAS,CAAC,GAAoB,EAAE,MAAc;IAC7D,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;IAC5B,OAAO,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpE,CAAC;AAHD,8BAGC"}
|
package/utils/tools.js
CHANGED
|
@@ -21,10 +21,12 @@ function calculateJsonSizeMb(data) {
|
|
|
21
21
|
}
|
|
22
22
|
exports.calculateJsonSizeMb = calculateJsonSizeMb;
|
|
23
23
|
function __stringify(obj, pretty) {
|
|
24
|
-
if (Array.isArray(pretty))
|
|
25
|
-
return `${object_tools_1._keys(obj).reduce((carry, key, idx) => {
|
|
26
|
-
|
|
24
|
+
if (Array.isArray(pretty) && typeof obj === "object") {
|
|
25
|
+
return `${(0, object_tools_1._keys)(obj).reduce((carry, key, idx) => {
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
return carry + ` ${String(key)}: ${__stringify(obj[key], pretty.includes(key))}${idx !== (0, object_tools_1._keys)(obj).length - 1 && ',\n'}`;
|
|
27
28
|
}, `{\n`)}\n}`;
|
|
29
|
+
}
|
|
28
30
|
if (pretty)
|
|
29
31
|
return JSON.stringify(obj, null, 2);
|
|
30
32
|
return JSON.stringify(obj);
|
package/utils/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/main/utils/tools.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/main/utils/tools.ts"],"names":[],"mappings":";;;AAAA,iDAAqC;AAGrC,SAAgB,UAAU,CAAC,KAAa,EAAE,GAAW;IACpD,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAC,KAAK,EAAE,SAAS,EAAC,CAAC;AAC3D,CAAC;AAFD,gCAEC;AAED,SAAgB,mBAAmB,CAAC,SAAkB;IACrD,IAAI,MAAM,GAAG,SAAS,IAAI,EAAE,CAAC;IAC7B,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;I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AC;IAErC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAZD,kCAYC"}
|
package/utils/types.d.ts
CHANGED
|
@@ -1,63 +1,65 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type CustomOptional<T, K> = {
|
|
2
2
|
[P in keyof T]?: K;
|
|
3
3
|
};
|
|
4
|
-
export
|
|
4
|
+
export type Subset<T> = {
|
|
5
5
|
[P in keyof T]: T[P];
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type OptionalKeys<T extends object> = Exclude<{
|
|
8
8
|
[K in keyof T]: T extends Record<K, T[K]> ? never : K;
|
|
9
9
|
}[keyof T], undefined>;
|
|
10
|
-
export
|
|
10
|
+
export type MandatoryKeys<T extends object, V = any> = Exclude<{
|
|
11
11
|
[K in keyof T]: T extends Record<K, T[K]> ? (T[K] extends V ? K : never) : never;
|
|
12
12
|
}[keyof T], undefined>;
|
|
13
|
-
export
|
|
13
|
+
export type RequireOptionals<T extends object, Keys extends OptionalKeys<T> = OptionalKeys<T>> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
14
14
|
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
|
15
15
|
}[Keys];
|
|
16
|
-
export
|
|
16
|
+
export type RequireOneOptional<T extends object, Keys extends OptionalKeys<T> = OptionalKeys<T>> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
17
17
|
[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
|
|
18
18
|
}[Keys];
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
19
|
+
export type Constructor<T> = new (...args: any) => T;
|
|
20
|
+
export type ArrayType<T extends any[]> = T extends (infer I)[] ? I : never;
|
|
21
|
+
export type PartialProperties<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
22
|
+
export type Identity = {
|
|
23
23
|
id: string;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type StringMap = {
|
|
26
26
|
[s: string]: string;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type ObjectTS = {
|
|
29
29
|
[s: string]: any;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type TypedMap<ValueType> = {
|
|
32
32
|
[s: string]: ValueType;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type DB_Object = {
|
|
35
35
|
_id: string;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type Auditable = {
|
|
38
38
|
_audit?: AuditBy;
|
|
39
39
|
};
|
|
40
|
-
export
|
|
40
|
+
export type AuditBy = {
|
|
41
41
|
comment?: string;
|
|
42
42
|
auditBy: string;
|
|
43
43
|
auditAt: Timestamp;
|
|
44
44
|
};
|
|
45
|
-
export
|
|
45
|
+
export type Timestamp = {
|
|
46
46
|
timestamp: number;
|
|
47
47
|
pretty: string;
|
|
48
48
|
timezone?: string;
|
|
49
49
|
};
|
|
50
|
-
export
|
|
51
|
-
[K in keyof T]: T[K] extends
|
|
50
|
+
export type FunctionKeys<T> = {
|
|
51
|
+
[K in keyof T]: T[K] extends (...args: any) => any ? K : never;
|
|
52
52
|
}[keyof T];
|
|
53
|
+
export type ParamResolver<T, K extends keyof T> = T[K] extends (...args: any) => any ? Parameters<T[K]> : never;
|
|
54
|
+
export type ReturnTypeResolver<T, K extends keyof T> = T[K] extends (...args: any) => any ? ReturnPromiseType<T[K]> : never;
|
|
53
55
|
export declare const Void: void;
|
|
54
|
-
export
|
|
56
|
+
export type PackageJson = {
|
|
55
57
|
version: string;
|
|
56
58
|
name: string;
|
|
57
59
|
};
|
|
58
|
-
export
|
|
59
|
-
export
|
|
60
|
-
export
|
|
60
|
+
export type DeflatePromise<T> = T extends Promise<infer A> ? A : T;
|
|
61
|
+
export type ReturnPromiseType<T extends (...args: any) => any> = T extends (...args: any) => infer R ? DeflatePromise<R> : never;
|
|
62
|
+
export type RangeTimestamp = {
|
|
61
63
|
min: number;
|
|
62
64
|
max: number;
|
|
63
65
|
};
|
package/utils/types.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.Void = void 0;
|
|
4
21
|
exports.Void = (() => {
|
package/utils/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/main/utils/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/main/utils/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAsDU,QAAA,IAAI,GAAG,CAAC,GAAG,EAAE;AAC1B,CAAC,CAAC,EAAE,CAAC"}
|
package/utils/version-tools.d.ts
CHANGED