@powfix/core-js 0.23.1 → 0.23.3
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/dist/browser/index.d.ts +1 -2
- package/dist/index.browser.d.ts +2 -57
- package/dist/index.d.ts +1 -57
- package/dist/index.node.d.ts +2 -81
- package/dist/node/constants/TransactionManagerLogLevel.d.ts +1 -3
- package/dist/node/constants/TransactionManagerTimeoutAction.d.ts +1 -3
- package/dist/node/constants/index.d.ts +2 -2
- package/dist/node/index.d.ts +6 -25
- package/dist/node/interfaces/db/index.d.ts +1 -10
- package/dist/node/interfaces/db/sequelize/Hook.d.ts +4 -9
- package/dist/node/interfaces/db/sequelize/HookFn.d.ts +4 -7
- package/dist/node/interfaces/db/sequelize/HookType.d.ts +3 -6
- package/dist/node/interfaces/db/sequelize/ReloadOption.d.ts +1 -3
- package/dist/node/interfaces/db/sequelize/TransactionOption.d.ts +2 -5
- package/dist/node/interfaces/db/sequelize/UpsertOptions.d.ts +3 -7
- package/dist/node/interfaces/db/sequelize/index.d.ts +6 -10
- package/dist/node/interfaces/index.d.ts +1 -10
- package/dist/node/managers/TransactionManager.d.ts +4 -8
- package/dist/node/managers/TransactionManager.types.d.ts +4 -7
- package/dist/node/managers/index.d.ts +2 -6
- package/dist/node/services/index.d.ts +1 -5
- package/dist/node/services/redis/RedisClient.d.ts +2 -5
- package/dist/node/services/redis/RedisPublisher.d.ts +3 -7
- package/dist/node/services/redis/RedisSubscriber.d.ts +3 -7
- package/dist/node/services/redis/index.d.ts +3 -5
- package/dist/node/types/UpsertResult.d.ts +2 -5
- package/dist/node/types/index.d.ts +2 -9
- package/dist/node/types/mariaDb.d.ts +4 -11
- package/dist/node/utils/HookUtils.d.ts +3 -10
- package/dist/node/utils/index.d.ts +2 -10
- package/dist/node/utils/sequelize-utils/SequelizeUtils.d.ts +3 -6
- package/dist/node/utils/sequelize-utils/index.d.ts +2 -3
- package/dist/node/utils/sequelize-utils/types.d.ts +8 -11
- package/dist/shared/constants/COORDINATE.d.ts +2 -4
- package/dist/shared/constants/CRUD.d.ts +2 -4
- package/dist/shared/constants/DATE.d.ts +2 -4
- package/dist/shared/constants/DISTANCE.d.ts +2 -4
- package/dist/shared/constants/DURATION.d.ts +2 -4
- package/dist/shared/constants/NOT_NULL.d.ts +1 -3
- package/dist/shared/constants/index.d.ts +6 -6
- package/dist/shared/exports/Uint8Array.d.ts +1 -0
- package/dist/shared/exports/atob.d.ts +1 -2
- package/dist/shared/exports/btoa.d.ts +1 -2
- package/dist/shared/index.d.ts +7 -57
- package/dist/shared/interfaces/Coordinate.d.ts +2 -4
- package/dist/shared/interfaces/Point2.d.ts +1 -3
- package/dist/shared/interfaces/Point3.d.ts +2 -5
- package/dist/shared/interfaces/StorageProvider.d.ts +1 -3
- package/dist/shared/interfaces/index.d.ts +4 -4
- package/dist/shared/managers/SessionManager.d.ts +4 -7
- package/dist/shared/managers/SessionManager.type.d.ts +4 -7
- package/dist/shared/managers/index.d.ts +2 -5
- package/dist/shared/scripts/base64Polyfill.d.ts +1 -3
- package/dist/shared/scripts/index.d.ts +1 -1
- package/dist/shared/services/index.d.ts +1 -3
- package/dist/shared/services/time/TimeService.d.ts +2 -5
- package/dist/shared/services/time/TimeService.type.d.ts +8 -10
- package/dist/shared/services/time/index.d.ts +2 -3
- package/dist/shared/types/IntRage.d.ts +2 -3
- package/dist/shared/types/PartialExcept.d.ts +1 -3
- package/dist/shared/types/index.d.ts +2 -2
- package/dist/shared/utils/ArrayUtils.d.ts +1 -3
- package/dist/shared/utils/AxiosUtils.d.ts +2 -5
- package/dist/shared/utils/BooleanUtils.d.ts +1 -3
- package/dist/shared/utils/Calc.d.ts +1 -3
- package/dist/shared/utils/CoordinateUtils.d.ts +2 -5
- package/dist/shared/utils/DateUtils.d.ts +4 -7
- package/dist/shared/utils/Enum.d.ts +2 -5
- package/dist/shared/utils/Enum.types.d.ts +3 -4
- package/dist/shared/utils/I18nUtils.d.ts +2 -5
- package/dist/shared/utils/JuminNumberUtils.d.ts +1 -3
- package/dist/shared/utils/NumberUtils.d.ts +1 -3
- package/dist/shared/utils/ObjectIdUtils.cjs +3 -3
- package/dist/shared/utils/ObjectIdUtils.d.ts +3 -4
- package/dist/shared/utils/ObjectIdUtils.js +3 -3
- package/dist/shared/utils/Point3Utils.d.ts +2 -6
- package/dist/shared/utils/RandomUtils.d.ts +1 -3
- package/dist/shared/utils/Sequencer.d.ts +7 -10
- package/dist/shared/utils/StringUtils.d.ts +1 -3
- package/dist/shared/utils/Uint8ArrayUtils.d.ts +1 -3
- package/dist/shared/utils/UuidUtils.cjs +39 -3
- package/dist/shared/utils/UuidUtils.d.ts +63 -7
- package/dist/shared/utils/UuidUtils.js +39 -3
- package/dist/shared/utils/Validator.d.ts +2 -4
- package/dist/shared/utils/global/atob.d.ts +2 -5
- package/dist/shared/utils/global/base64.d.ts +2 -4
- package/dist/shared/utils/global/between.d.ts +1 -3
- package/dist/shared/utils/global/btoa.d.ts +2 -5
- package/dist/shared/utils/global/castArray.d.ts +1 -3
- package/dist/shared/utils/global/circularDistance.d.ts +1 -3
- package/dist/shared/utils/global/fallbackIfMatch.d.ts +1 -3
- package/dist/shared/utils/global/fallbackIfNull.d.ts +1 -3
- package/dist/shared/utils/global/fallbackIfNullish.d.ts +1 -3
- package/dist/shared/utils/global/fallbackIfUndefined.d.ts +1 -3
- package/dist/shared/utils/global/firstNonNullish.d.ts +1 -3
- package/dist/shared/utils/global/flat.d.ts +4 -6
- package/dist/shared/utils/global/index.d.ts +15 -16
- package/dist/shared/utils/global/processFirstNonNullish.d.ts +1 -3
- package/dist/shared/utils/global/pureEnum.d.ts +4 -5
- package/dist/shared/utils/global/sleep.d.ts +1 -3
- package/dist/shared/utils/index.d.ts +21 -44
- package/dist/shared/utils/try-catch/TryCatch.d.ts +1 -3
- package/dist/shared/utils/try-catch/index.d.ts +1 -1
- package/package.json +18 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare class RandomUtils {
|
|
1
|
+
export declare class RandomUtils {
|
|
2
2
|
static randomNumber(min: number, max: number): number;
|
|
3
3
|
static randomLatinStrings(length: number): string;
|
|
4
4
|
static randomLatinLowercaseStrings(length: number): string;
|
|
@@ -6,5 +6,3 @@ declare class RandomUtils {
|
|
|
6
6
|
static randomNumberStrings(length: number): string;
|
|
7
7
|
static randomStrings(length: number): string;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
export { RandomUtils };
|
|
@@ -1,41 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
interface Sequence {
|
|
1
|
+
import EventEmitter3 from 'eventemitter3';
|
|
2
|
+
export interface Sequence {
|
|
4
3
|
key: string;
|
|
5
4
|
required?: boolean;
|
|
6
5
|
minimumExecutionTime?: number;
|
|
7
6
|
task: Function;
|
|
8
7
|
description?: string;
|
|
9
8
|
}
|
|
10
|
-
declare enum SequencerStatus {
|
|
9
|
+
export declare enum SequencerStatus {
|
|
11
10
|
IDLE = 0,
|
|
12
11
|
RUNNING = 1,
|
|
13
12
|
ERROR = 2,
|
|
14
13
|
DONE = 3
|
|
15
14
|
}
|
|
16
|
-
interface SequencerOption {
|
|
15
|
+
export interface SequencerOption {
|
|
17
16
|
sequences?: Sequence[];
|
|
18
17
|
minimumExecutionTime?: number;
|
|
19
18
|
}
|
|
20
|
-
declare enum SequencerEvent {
|
|
19
|
+
export declare enum SequencerEvent {
|
|
21
20
|
START = "START",
|
|
22
21
|
END = "END",
|
|
23
22
|
SEQUENCE_START = "SEQUENCE_START",
|
|
24
23
|
SEQUENCE_END = "SEQUENCE_END"
|
|
25
24
|
}
|
|
26
|
-
declare class Sequencer {
|
|
25
|
+
export declare class Sequencer {
|
|
27
26
|
protected readonly sequences: Sequence[];
|
|
28
27
|
protected status: SequencerStatus;
|
|
29
28
|
protected minimumExecutionTime: number;
|
|
30
29
|
currentSequence: Sequence | null;
|
|
31
30
|
startTimestamp: number | null;
|
|
32
31
|
endTimestamp: number | null;
|
|
33
|
-
eventEmitter:
|
|
32
|
+
eventEmitter: EventEmitter3<string | symbol, any>;
|
|
34
33
|
constructor(option?: SequencerOption);
|
|
35
34
|
get getCurrentTimeStamp(): number;
|
|
36
35
|
get executionTime(): number | null;
|
|
37
36
|
pushSequence: (sequence: Sequence) => void;
|
|
38
37
|
start: () => Promise<undefined>;
|
|
39
38
|
}
|
|
40
|
-
|
|
41
|
-
export { type Sequence, Sequencer, SequencerEvent, type SequencerOption, SequencerStatus };
|
|
@@ -48,13 +48,39 @@ var UuidUtils = /*#__PURE__*/ function() {
|
|
|
48
48
|
_create_class(UuidUtils, null, [
|
|
49
49
|
{
|
|
50
50
|
key: "v4",
|
|
51
|
-
value:
|
|
51
|
+
value: /**
|
|
52
|
+
* Generate a random UUID v4 string.
|
|
53
|
+
*
|
|
54
|
+
* @deprecated This method is deprecated and will be removed in future versions.
|
|
55
|
+
* Please use the `UUID` class from the `@powfix/uuid` package instead:
|
|
56
|
+
*
|
|
57
|
+
* ```ts
|
|
58
|
+
* import { UUID } from "@powfix/uuid";
|
|
59
|
+
* UUID.v4().toString();
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @returns {string} A randomly generated UUID v4 string.
|
|
63
|
+
*/ function v4() {
|
|
52
64
|
return uuid__namespace.v4();
|
|
53
65
|
}
|
|
54
66
|
},
|
|
55
67
|
{
|
|
56
68
|
key: "format",
|
|
57
|
-
value:
|
|
69
|
+
value: /**
|
|
70
|
+
* Format a UUID string with or without dashes into the canonical
|
|
71
|
+
* lowercase dashed UUID string representation.
|
|
72
|
+
*
|
|
73
|
+
* @deprecated This method is deprecated and will be removed in future versions.
|
|
74
|
+
* Please use the `UUID` class from the `@powfix/uuid` package instead:
|
|
75
|
+
*
|
|
76
|
+
* ```ts
|
|
77
|
+
* import { UUID } from "@powfix/uuid";
|
|
78
|
+
* UUID.fromString(str).toString();
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @param uuid A UUID string (32 characters without dashes, or 36 characters with dashes).
|
|
82
|
+
* @returns {string} Canonical UUID string in lowercase with dashes.
|
|
83
|
+
*/ function format(uuid2) {
|
|
58
84
|
if (uuid2.length === 32) {
|
|
59
85
|
return "".concat(uuid2.substring(0, 8), "-").concat(uuid2.substring(8, 12), "-").concat(uuid2.substring(12, 16), "-").concat(uuid2.substring(16, 20), "-").concat(uuid2.substring(20, 32)).toLowerCase();
|
|
60
86
|
} else if (uuid2.length === 36) {
|
|
@@ -83,7 +109,17 @@ var UuidUtils = /*#__PURE__*/ function() {
|
|
|
83
109
|
},
|
|
84
110
|
{
|
|
85
111
|
key: "isValidUUID",
|
|
86
|
-
value:
|
|
112
|
+
value: /**
|
|
113
|
+
* Check is provided uuid string is valid UUID
|
|
114
|
+
*
|
|
115
|
+
* @deprecated This method is deprecated and will be removed in future versions.
|
|
116
|
+
* Please use the `UUID` class from the `@powfix/uuid` package instead:
|
|
117
|
+
*
|
|
118
|
+
* ```ts
|
|
119
|
+
* import { UUID } from "@powfix/uuid";
|
|
120
|
+
* UUID.isValidString(uuid);
|
|
121
|
+
* ```
|
|
122
|
+
*/ function isValidUUID(uuid2) {
|
|
87
123
|
if (!uuid2) return false;
|
|
88
124
|
if (typeof uuid2 !== "string") return false;
|
|
89
125
|
return RegExp(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/i).test(uuid2);
|
|
@@ -1,16 +1,72 @@
|
|
|
1
|
-
declare class UuidUtils {
|
|
1
|
+
export declare class UuidUtils {
|
|
2
|
+
/**
|
|
3
|
+
* Generate a random UUID v4 string.
|
|
4
|
+
*
|
|
5
|
+
* @deprecated This method is deprecated and will be removed in future versions.
|
|
6
|
+
* Please use the `UUID` class from the `@powfix/uuid` package instead:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { UUID } from "@powfix/uuid";
|
|
10
|
+
* UUID.v4().toString();
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @returns {string} A randomly generated UUID v4 string.
|
|
14
|
+
*/
|
|
2
15
|
static v4(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Format a UUID string with or without dashes into the canonical
|
|
18
|
+
* lowercase dashed UUID string representation.
|
|
19
|
+
*
|
|
20
|
+
* @deprecated This method is deprecated and will be removed in future versions.
|
|
21
|
+
* Please use the `UUID` class from the `@powfix/uuid` package instead:
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* import { UUID } from "@powfix/uuid";
|
|
25
|
+
* UUID.fromString(str).toString();
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param uuid A UUID string (32 characters without dashes, or 36 characters with dashes).
|
|
29
|
+
* @returns {string} Canonical UUID string in lowercase with dashes.
|
|
30
|
+
*/
|
|
3
31
|
static format(uuid: string): string;
|
|
4
32
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @
|
|
33
|
+
* Convert a UUID Buffer/Uint8Array into a string representation.
|
|
34
|
+
*
|
|
35
|
+
* @deprecated This method is deprecated and will be removed in future versions.
|
|
36
|
+
* Please use the `UUID` class from the `@powfix/uuid` package instead:
|
|
37
|
+
*
|
|
38
|
+
* ```ts
|
|
39
|
+
* import { UUID } from "@powfix/uuid";
|
|
40
|
+
* UUID.fromBuffer(binary).toString();
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @param binary A UUID in Buffer or Uint8Array form.
|
|
44
|
+
* @returns {string|null} The UUID string, or null if the input is not provided.
|
|
8
45
|
*/
|
|
9
46
|
static toString(binary: Uint8Array): string;
|
|
10
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Convert a UUID string to a Buffer.
|
|
49
|
+
*
|
|
50
|
+
* @deprecated This method is deprecated and will be removed in future versions.
|
|
51
|
+
* Please use the `UUID` class from the `@powfix/uuid` package instead:
|
|
52
|
+
*
|
|
53
|
+
* ```ts
|
|
54
|
+
* import { UUID } from "@powfix/uuid";
|
|
55
|
+
* UUID.fromString(uuid).toBuffer();
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
11
58
|
static toBuffer(uuid: string): Buffer;
|
|
12
59
|
static toBuffer(uuid: string | null | undefined): Buffer | null;
|
|
60
|
+
/**
|
|
61
|
+
* Check is provided uuid string is valid UUID
|
|
62
|
+
*
|
|
63
|
+
* @deprecated This method is deprecated and will be removed in future versions.
|
|
64
|
+
* Please use the `UUID` class from the `@powfix/uuid` package instead:
|
|
65
|
+
*
|
|
66
|
+
* ```ts
|
|
67
|
+
* import { UUID } from "@powfix/uuid";
|
|
68
|
+
* UUID.isValidString(uuid);
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
13
71
|
static isValidUUID(uuid: string): boolean;
|
|
14
72
|
}
|
|
15
|
-
|
|
16
|
-
export { UuidUtils };
|
|
@@ -28,13 +28,39 @@ var UuidUtils = /*#__PURE__*/ function() {
|
|
|
28
28
|
_create_class(UuidUtils, null, [
|
|
29
29
|
{
|
|
30
30
|
key: "v4",
|
|
31
|
-
value:
|
|
31
|
+
value: /**
|
|
32
|
+
* Generate a random UUID v4 string.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated This method is deprecated and will be removed in future versions.
|
|
35
|
+
* Please use the `UUID` class from the `@powfix/uuid` package instead:
|
|
36
|
+
*
|
|
37
|
+
* ```ts
|
|
38
|
+
* import { UUID } from "@powfix/uuid";
|
|
39
|
+
* UUID.v4().toString();
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @returns {string} A randomly generated UUID v4 string.
|
|
43
|
+
*/ function v4() {
|
|
32
44
|
return uuid.v4();
|
|
33
45
|
}
|
|
34
46
|
},
|
|
35
47
|
{
|
|
36
48
|
key: "format",
|
|
37
|
-
value:
|
|
49
|
+
value: /**
|
|
50
|
+
* Format a UUID string with or without dashes into the canonical
|
|
51
|
+
* lowercase dashed UUID string representation.
|
|
52
|
+
*
|
|
53
|
+
* @deprecated This method is deprecated and will be removed in future versions.
|
|
54
|
+
* Please use the `UUID` class from the `@powfix/uuid` package instead:
|
|
55
|
+
*
|
|
56
|
+
* ```ts
|
|
57
|
+
* import { UUID } from "@powfix/uuid";
|
|
58
|
+
* UUID.fromString(str).toString();
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @param uuid A UUID string (32 characters without dashes, or 36 characters with dashes).
|
|
62
|
+
* @returns {string} Canonical UUID string in lowercase with dashes.
|
|
63
|
+
*/ function format(uuid2) {
|
|
38
64
|
if (uuid2.length === 32) {
|
|
39
65
|
return "".concat(uuid2.substring(0, 8), "-").concat(uuid2.substring(8, 12), "-").concat(uuid2.substring(12, 16), "-").concat(uuid2.substring(16, 20), "-").concat(uuid2.substring(20, 32)).toLowerCase();
|
|
40
66
|
} else if (uuid2.length === 36) {
|
|
@@ -63,7 +89,17 @@ var UuidUtils = /*#__PURE__*/ function() {
|
|
|
63
89
|
},
|
|
64
90
|
{
|
|
65
91
|
key: "isValidUUID",
|
|
66
|
-
value:
|
|
92
|
+
value: /**
|
|
93
|
+
* Check is provided uuid string is valid UUID
|
|
94
|
+
*
|
|
95
|
+
* @deprecated This method is deprecated and will be removed in future versions.
|
|
96
|
+
* Please use the `UUID` class from the `@powfix/uuid` package instead:
|
|
97
|
+
*
|
|
98
|
+
* ```ts
|
|
99
|
+
* import { UUID } from "@powfix/uuid";
|
|
100
|
+
* UUID.isValidString(uuid);
|
|
101
|
+
* ```
|
|
102
|
+
*/ function isValidUUID(uuid2) {
|
|
67
103
|
if (!uuid2) return false;
|
|
68
104
|
if (typeof uuid2 !== "string") return false;
|
|
69
105
|
return RegExp(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/i).test(uuid2);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare class Validator {
|
|
1
|
+
export declare class Validator {
|
|
2
2
|
static validate(value: string | null | undefined, options: Validator.Options): {
|
|
3
3
|
result: boolean;
|
|
4
4
|
validations: Validator.VALIDATION[];
|
|
@@ -6,7 +6,7 @@ declare class Validator {
|
|
|
6
6
|
errors: Validator.VALIDATION[];
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
declare namespace Validator {
|
|
9
|
+
export declare namespace Validator {
|
|
10
10
|
enum VALIDATION {
|
|
11
11
|
MIN_LENGTH = "MIN_LENGTH",
|
|
12
12
|
MAX_LENGTH = "MAX_LENGTH",
|
|
@@ -46,5 +46,3 @@ declare namespace Validator {
|
|
|
46
46
|
startsWithSpecialCharacter?: boolean;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
export { Validator };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare function encodeBase64(str: string): string;
|
|
2
|
-
declare function decodeBase64(base64: string): string;
|
|
3
|
-
|
|
4
|
-
export { decodeBase64, encodeBase64 };
|
|
1
|
+
export declare function encodeBase64(str: string): string;
|
|
2
|
+
export declare function decodeBase64(base64: string): string;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
interface FlattenOptions {
|
|
1
|
+
export interface FlattenOptions {
|
|
2
2
|
delimiter?: string;
|
|
3
3
|
maxDepth?: number;
|
|
4
4
|
safe?: boolean;
|
|
5
5
|
transformKey?: (key: string) => string;
|
|
6
6
|
}
|
|
7
|
-
interface UnflattenOptions {
|
|
7
|
+
export interface UnflattenOptions {
|
|
8
8
|
delimiter?: string;
|
|
9
9
|
object?: boolean;
|
|
10
10
|
overwrite?: boolean;
|
|
11
11
|
transformKey?: (key: string) => string;
|
|
12
12
|
}
|
|
13
|
-
declare function flatten<T extends object>(target: T, opts?: FlattenOptions): Record<string, any>;
|
|
14
|
-
declare function unflatten<T extends object>(target: T, opts?: UnflattenOptions): any;
|
|
15
|
-
|
|
16
|
-
export { type FlattenOptions, type UnflattenOptions, flatten, unflatten };
|
|
13
|
+
export declare function flatten<T extends object>(target: T, opts?: FlattenOptions): Record<string, any>;
|
|
14
|
+
export declare function unflatten<T extends object>(target: T, opts?: UnflattenOptions): any;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
import 'base-64';
|
|
1
|
+
export * from './atob';
|
|
2
|
+
export * from './base64';
|
|
3
|
+
export * from './between';
|
|
4
|
+
export * from './btoa';
|
|
5
|
+
export * from './castArray';
|
|
6
|
+
export * from './circularDistance';
|
|
7
|
+
export * from './sleep';
|
|
8
|
+
export * from './fallbackIfMatch';
|
|
9
|
+
export * from './fallbackIfNull';
|
|
10
|
+
export * from './fallbackIfNullish';
|
|
11
|
+
export * from './fallbackIfUndefined';
|
|
12
|
+
export * from './firstNonNullish';
|
|
13
|
+
export * from './flat';
|
|
14
|
+
export * from './processFirstNonNullish';
|
|
15
|
+
export * from './pureEnum';
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
declare function processFirstNonNullish<T, R>(processor: (nonNullish: NonNullable<T>) => R, ...args: T[]): R | undefined;
|
|
2
|
-
|
|
3
|
-
export { processFirstNonNullish };
|
|
1
|
+
export declare function processFirstNonNullish<T, R>(processor: (nonNullish: NonNullable<T>) => R, ...args: T[]): R | undefined;
|
|
@@ -5,14 +5,13 @@ type PureEnumReturnType<E extends object> = [NonFunction<E, "keys">, NonFunction
|
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated Use Enum instead.
|
|
7
7
|
*/
|
|
8
|
-
declare function pureEnum<E extends object>(e: E): PureEnumReturnType<E>;
|
|
8
|
+
export declare function pureEnum<E extends object>(e: E): PureEnumReturnType<E>;
|
|
9
9
|
/**
|
|
10
10
|
* @deprecated Use Enum instead.
|
|
11
11
|
*/
|
|
12
|
-
declare function pureEnumKeys<E extends object>(e: E): NonFunction<E, "keys">[];
|
|
12
|
+
export declare function pureEnumKeys<E extends object>(e: E): NonFunction<E, "keys">[];
|
|
13
13
|
/**
|
|
14
14
|
* @deprecated Use Enum instead.
|
|
15
15
|
*/
|
|
16
|
-
declare function pureEnumValues<E extends object>(e: E): NonFunction<E, "values">[];
|
|
17
|
-
|
|
18
|
-
export { pureEnum, pureEnumKeys, pureEnumValues };
|
|
16
|
+
export declare function pureEnumValues<E extends object>(e: E): NonFunction<E, "values">[];
|
|
17
|
+
export {};
|
|
@@ -1,44 +1,21 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export { Calc } from './Calc.js';
|
|
23
|
-
export { CoordinateUtils } from './CoordinateUtils.js';
|
|
24
|
-
export { DateUtils } from './DateUtils.js';
|
|
25
|
-
export { Enum } from './Enum.js';
|
|
26
|
-
export { EnumEntries, EnumEntry } from './Enum.types.js';
|
|
27
|
-
export { I18nUtils } from './I18nUtils.js';
|
|
28
|
-
export { NumberUtils } from './NumberUtils.js';
|
|
29
|
-
export { ObjectIdUtils } from './ObjectIdUtils.js';
|
|
30
|
-
export { Point3Utils } from './Point3Utils.js';
|
|
31
|
-
export { RandomUtils } from './RandomUtils.js';
|
|
32
|
-
export { Validator } from './Validator.js';
|
|
33
|
-
export { JuminNumberUtils } from './JuminNumberUtils.js';
|
|
34
|
-
export { Sequence, Sequencer, SequencerEvent, SequencerOption, SequencerStatus } from './Sequencer.js';
|
|
35
|
-
export { TryCatch } from './try-catch/TryCatch.js';
|
|
36
|
-
import 'base-64';
|
|
37
|
-
import 'axios';
|
|
38
|
-
import '../interfaces/Coordinate.js';
|
|
39
|
-
import 'moment';
|
|
40
|
-
import '../constants/DATE.js';
|
|
41
|
-
import 'i18next';
|
|
42
|
-
import '../interfaces/Point3.js';
|
|
43
|
-
import '../interfaces/Point2.js';
|
|
44
|
-
import 'eventemitter3';
|
|
1
|
+
export * from './global';
|
|
2
|
+
export * from './ArrayUtils';
|
|
3
|
+
export * from './AxiosUtils';
|
|
4
|
+
export * from './StringUtils';
|
|
5
|
+
export * from './Uint8ArrayUtils';
|
|
6
|
+
export * from './UuidUtils';
|
|
7
|
+
export * from './BooleanUtils';
|
|
8
|
+
export * from './Calc';
|
|
9
|
+
export * from './CoordinateUtils';
|
|
10
|
+
export * from './DateUtils';
|
|
11
|
+
export * from './Enum';
|
|
12
|
+
export * from './Enum.types';
|
|
13
|
+
export * from './I18nUtils';
|
|
14
|
+
export * from './NumberUtils';
|
|
15
|
+
export * from './ObjectIdUtils';
|
|
16
|
+
export * from './Point3Utils';
|
|
17
|
+
export * from './RandomUtils';
|
|
18
|
+
export * from './Validator';
|
|
19
|
+
export * from './JuminNumberUtils';
|
|
20
|
+
export * from './Sequencer';
|
|
21
|
+
export * from './try-catch';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Provides a utility class for handling synchronous and asynchronous operations with a consistent try-catch pattern.
|
|
3
3
|
* It returns a tuple where the first element is the error (or null on success) and the second element is the result (or undefined on error).
|
|
4
4
|
*/
|
|
5
|
-
declare class TryCatch {
|
|
5
|
+
export declare class TryCatch {
|
|
6
6
|
/**
|
|
7
7
|
* Executes a synchronous function within a try-catch block.
|
|
8
8
|
* @template T The return type of the function.
|
|
@@ -22,5 +22,3 @@ declare class TryCatch {
|
|
|
22
22
|
*/
|
|
23
23
|
static asyncFunction<T, E = Error>(fn: Promise<T>, disableLogging?: boolean): Promise<readonly [null, Awaited<T>] | readonly [E, undefined]>;
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
export { TryCatch };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./TryCatch";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powfix/core-js",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.3",
|
|
4
4
|
"description": "core package",
|
|
5
5
|
"author": "Kwon Kyung-Min <powfix@gmail.com>",
|
|
6
6
|
"private": false,
|
|
@@ -19,6 +19,22 @@
|
|
|
19
19
|
"main": "./dist/index.cjs",
|
|
20
20
|
"module": "./dist/index.js",
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
|
+
"scripts": {
|
|
23
|
+
"clean": "rm -rf dist | wc -l",
|
|
24
|
+
"esmfix": "tsc-esm-fix --ext='.mjs'",
|
|
25
|
+
"compile": "tsc",
|
|
26
|
+
"prebuild": "yarn clean",
|
|
27
|
+
"build": "yarn run build:cjs && yarn run build:esm && yarn run build:dts",
|
|
28
|
+
"build:dts": "tsc -p tsconfig.declaration.json",
|
|
29
|
+
"build:cjs": "tsup --config tsup.cjs.config.ts",
|
|
30
|
+
"build:esm": "tsup --config tsup.esm.config.ts"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
22
38
|
"exports": {
|
|
23
39
|
".": {
|
|
24
40
|
"types": "./dist/index.d.ts",
|
|
@@ -36,17 +52,6 @@
|
|
|
36
52
|
"require": "./dist/index.node.cjs"
|
|
37
53
|
}
|
|
38
54
|
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"clean": "rm -rf dist | wc -l",
|
|
41
|
-
"esmfix": "tsc-esm-fix --ext='.mjs'",
|
|
42
|
-
"prebuild": "yarn clean",
|
|
43
|
-
"build": "yarn run build:cjs && yarn run build:esm",
|
|
44
|
-
"build:cjs": "tsup --config tsup.cjs.config.ts",
|
|
45
|
-
"build:esm": "tsup --config tsup.esm.config.ts"
|
|
46
|
-
},
|
|
47
|
-
"files": [
|
|
48
|
-
"dist"
|
|
49
|
-
],
|
|
50
55
|
"dependencies": {
|
|
51
56
|
"base-64": "^1.0.0",
|
|
52
57
|
"eventemitter3": "^5.0.1",
|
|
@@ -54,7 +59,7 @@
|
|
|
54
59
|
"uuid": "9.0.1"
|
|
55
60
|
},
|
|
56
61
|
"devDependencies": {
|
|
57
|
-
"@powfix/uuid": "^0.2.
|
|
62
|
+
"@powfix/uuid": "^0.2.4",
|
|
58
63
|
"@swc/core": "^1.13.5",
|
|
59
64
|
"@types/base-64": "1.0.2",
|
|
60
65
|
"@types/node": "^24.5.1",
|