@powfix/core-js 0.23.2 → 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.d.ts +1 -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 +5 -4
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
import 'sequelize';
|
|
1
|
+
export * from './SequelizeUtils';
|
|
2
|
+
export * from './types';
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { ModelAttributeColumnOptions } from
|
|
2
|
-
|
|
3
|
-
type
|
|
4
|
-
type ExtractUuidKeys<T extends Model> = {
|
|
1
|
+
import { ModelAttributeColumnOptions } from "sequelize";
|
|
2
|
+
export type Model = Record<string, any> | undefined;
|
|
3
|
+
export type ExtractUuidKeys<T extends Model> = {
|
|
5
4
|
[Property in keyof T]: Property extends `${string}Uuid` | 'uuid' ? Property : never;
|
|
6
5
|
}[keyof T];
|
|
7
|
-
type ExtractStringKeys<T extends Model> = {
|
|
6
|
+
export type ExtractStringKeys<T extends Model> = {
|
|
8
7
|
[Property in keyof T]: string extends T[Property] ? Property : never;
|
|
9
8
|
}[keyof T];
|
|
10
|
-
type ConcreteUuidKeys<T extends Model> = ExtractUuidKeys<T>;
|
|
11
|
-
type NonKnownUuidStringKeys<T extends Model> = Exclude<ExtractStringKeys<T>, ConcreteUuidKeys<T>> & string;
|
|
12
|
-
interface UuidColumnOptionsBase extends Omit<ModelAttributeColumnOptions, 'type'> {
|
|
9
|
+
export type ConcreteUuidKeys<T extends Model> = ExtractUuidKeys<T>;
|
|
10
|
+
export type NonKnownUuidStringKeys<T extends Model> = Exclude<ExtractStringKeys<T>, ConcreteUuidKeys<T>> & string;
|
|
11
|
+
export interface UuidColumnOptionsBase extends Omit<ModelAttributeColumnOptions, 'type'> {
|
|
13
12
|
columnName: string;
|
|
14
13
|
}
|
|
15
|
-
interface UuidColumnOptionsForModel<T extends Model, AdditionalKeys extends string> extends Omit<ModelAttributeColumnOptions, 'type'> {
|
|
14
|
+
export interface UuidColumnOptionsForModel<T extends Model, AdditionalKeys extends string> extends Omit<ModelAttributeColumnOptions, 'type'> {
|
|
16
15
|
columnName: ConcreteUuidKeys<T> | AdditionalKeys;
|
|
17
16
|
}
|
|
18
|
-
|
|
19
|
-
export type { ConcreteUuidKeys, ExtractStringKeys, ExtractUuidKeys, Model, NonKnownUuidStringKeys, UuidColumnOptionsBase, UuidColumnOptionsForModel };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
declare class COORDINATE {
|
|
1
|
+
export declare class COORDINATE {
|
|
2
2
|
static LATITUDE_MIN_LENGTH: number;
|
|
3
3
|
static LATITUDE_MAX_LENGTH: number;
|
|
4
4
|
static LONGITUDE_MIN_LENGTH: number;
|
|
5
5
|
static LONGITUDE_MAX_LENGTH: number;
|
|
6
6
|
}
|
|
7
|
-
declare namespace COORDINATE { }
|
|
8
|
-
|
|
9
|
-
export { COORDINATE };
|
|
7
|
+
export declare namespace COORDINATE { }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare class DATE {
|
|
1
|
+
export declare class DATE {
|
|
2
2
|
}
|
|
3
|
-
declare namespace DATE {
|
|
3
|
+
export declare namespace DATE {
|
|
4
4
|
enum FORMAT {
|
|
5
5
|
UNIX = 1,
|
|
6
6
|
SECONDS = 2,
|
|
@@ -11,5 +11,3 @@ declare namespace DATE {
|
|
|
11
11
|
function toString(format: FORMAT): string;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
export { DATE };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare class DISTANCE {
|
|
1
|
+
export declare class DISTANCE {
|
|
2
2
|
}
|
|
3
|
-
declare namespace DISTANCE {
|
|
3
|
+
export declare namespace DISTANCE {
|
|
4
4
|
enum UNIT {
|
|
5
5
|
FEET = "FEET",
|
|
6
6
|
KILOMETERS = "KILOMETERS",
|
|
@@ -11,5 +11,3 @@ declare namespace DISTANCE {
|
|
|
11
11
|
YARDS = "YARDS"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
export { DISTANCE };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare class DURATION {
|
|
1
|
+
export declare class DURATION {
|
|
2
2
|
}
|
|
3
|
-
declare namespace DURATION {
|
|
3
|
+
export declare namespace DURATION {
|
|
4
4
|
enum UNIT {
|
|
5
5
|
NANOSECONDS = "NANOSECONDS",
|
|
6
6
|
MICROSECONDS = "MICROSECONDS",
|
|
@@ -14,5 +14,3 @@ declare namespace DURATION {
|
|
|
14
14
|
CENTURIES = "CENTURIES"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
export { DURATION };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export * from './COORDINATE';
|
|
2
|
+
export * from './CRUD';
|
|
3
|
+
export * from './DATE';
|
|
4
|
+
export * from './DISTANCE';
|
|
5
|
+
export * from './DURATION';
|
|
6
|
+
export * from './NOT_NULL';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { }
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { }
|
|
1
|
+
export {};
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,57 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export { Point2 } from './interfaces/Point2.js';
|
|
9
|
-
export { Point3 } from './interfaces/Point3.js';
|
|
10
|
-
export { StorageProvider } from './interfaces/StorageProvider.js';
|
|
11
|
-
export { SessionManager } from './managers/SessionManager.js';
|
|
12
|
-
export { SessionManagerEvent, SessionManagerOptions } from './managers/SessionManager.type.js';
|
|
13
|
-
export { base64Polyfill } from './scripts/base64Polyfill.js';
|
|
14
|
-
export { TimeService } from './services/time/TimeService.js';
|
|
15
|
-
export { TimeServiceClientTimeProvider, TimeServiceEvent, TimeServiceNtpResult, TimeServiceOffset, TimeServiceOptions, TimeServiceServerNtpResult, TimeServiceServerTimeProvider, TimeServiceTimeStamp } from './services/time/TimeService.type.js';
|
|
16
|
-
export { IntRange } from './types/IntRage.js';
|
|
17
|
-
export { PartialExcept } from './types/PartialExcept.js';
|
|
18
|
-
export { atob } from './utils/global/atob.js';
|
|
19
|
-
export { decodeBase64, encodeBase64 } from './utils/global/base64.js';
|
|
20
|
-
export { between } from './utils/global/between.js';
|
|
21
|
-
export { btoa } from './utils/global/btoa.js';
|
|
22
|
-
export { castArray } from './utils/global/castArray.js';
|
|
23
|
-
export { circularDistance } from './utils/global/circularDistance.js';
|
|
24
|
-
export { sleep } from './utils/global/sleep.js';
|
|
25
|
-
export { fallbackIfMatch } from './utils/global/fallbackIfMatch.js';
|
|
26
|
-
export { fallbackIfNull } from './utils/global/fallbackIfNull.js';
|
|
27
|
-
export { fallbackIfNullish } from './utils/global/fallbackIfNullish.js';
|
|
28
|
-
export { fallbackIfUndefined } from './utils/global/fallbackIfUndefined.js';
|
|
29
|
-
export { firstNonNullish } from './utils/global/firstNonNullish.js';
|
|
30
|
-
export { FlattenOptions, UnflattenOptions, flatten, unflatten } from './utils/global/flat.js';
|
|
31
|
-
export { processFirstNonNullish } from './utils/global/processFirstNonNullish.js';
|
|
32
|
-
export { pureEnum, pureEnumKeys, pureEnumValues } from './utils/global/pureEnum.js';
|
|
33
|
-
export { ArrayUtils } from './utils/ArrayUtils.js';
|
|
34
|
-
export { AxiosUtils } from './utils/AxiosUtils.js';
|
|
35
|
-
export { StringUtils } from './utils/StringUtils.js';
|
|
36
|
-
export { Uint8ArrayUtils } from './utils/Uint8ArrayUtils.js';
|
|
37
|
-
export { UuidUtils } from './utils/UuidUtils.js';
|
|
38
|
-
export { parseBoolean } from './utils/BooleanUtils.js';
|
|
39
|
-
export { Calc } from './utils/Calc.js';
|
|
40
|
-
export { CoordinateUtils } from './utils/CoordinateUtils.js';
|
|
41
|
-
export { DateUtils } from './utils/DateUtils.js';
|
|
42
|
-
export { Enum } from './utils/Enum.js';
|
|
43
|
-
export { EnumEntries, EnumEntry } from './utils/Enum.types.js';
|
|
44
|
-
export { I18nUtils } from './utils/I18nUtils.js';
|
|
45
|
-
export { NumberUtils } from './utils/NumberUtils.js';
|
|
46
|
-
export { ObjectIdUtils } from './utils/ObjectIdUtils.js';
|
|
47
|
-
export { Point3Utils } from './utils/Point3Utils.js';
|
|
48
|
-
export { RandomUtils } from './utils/RandomUtils.js';
|
|
49
|
-
export { Validator } from './utils/Validator.js';
|
|
50
|
-
export { JuminNumberUtils } from './utils/JuminNumberUtils.js';
|
|
51
|
-
export { Sequence, Sequencer, SequencerEvent, SequencerOption, SequencerStatus } from './utils/Sequencer.js';
|
|
52
|
-
export { TryCatch } from './utils/try-catch/TryCatch.js';
|
|
53
|
-
import 'axios';
|
|
54
|
-
import 'eventemitter3';
|
|
55
|
-
import 'base-64';
|
|
56
|
-
import 'moment';
|
|
57
|
-
import 'i18next';
|
|
1
|
+
export * from './constants';
|
|
2
|
+
export * from './interfaces';
|
|
3
|
+
export * from './managers';
|
|
4
|
+
export * from './scripts';
|
|
5
|
+
export * from './services';
|
|
6
|
+
export * from './types';
|
|
7
|
+
export * from './utils';
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
interface StorageProvider {
|
|
1
|
+
export interface StorageProvider {
|
|
2
2
|
key?: () => string;
|
|
3
3
|
set: (key: string, value: string) => Promise<void> | void;
|
|
4
4
|
get: (key: string) => Promise<string | null> | (string | null);
|
|
5
5
|
remove: (key: string) => Promise<void> | void;
|
|
6
6
|
clear?: () => Promise<void> | void;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
export type { StorageProvider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export * from './Coordinate';
|
|
2
|
+
export * from './Point2';
|
|
3
|
+
export * from './Point3';
|
|
4
|
+
export * from './StorageProvider';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { AxiosInstance } from
|
|
2
|
-
import { StorageProvider } from
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { StorageProvider } from "../interfaces/StorageProvider";
|
|
3
3
|
import EventEmitter from 'eventemitter3';
|
|
4
|
-
import { SessionManagerEvent, SessionManagerOptions } from
|
|
5
|
-
|
|
6
|
-
declare class SessionManager extends EventEmitter<SessionManagerEvent> {
|
|
4
|
+
import { SessionManagerEvent, SessionManagerOptions } from "./SessionManager.type";
|
|
5
|
+
export declare class SessionManager extends EventEmitter<SessionManagerEvent> {
|
|
7
6
|
private static readonly DEFAULT_AUTHORIZATION_STORAGE_KEY;
|
|
8
7
|
protected api: AxiosInstance;
|
|
9
8
|
protected storageProvider: StorageProvider;
|
|
@@ -14,5 +13,3 @@ declare class SessionManager extends EventEmitter<SessionManagerEvent> {
|
|
|
14
13
|
setAuthorization(authorization?: string | null): Promise<string | null>;
|
|
15
14
|
removeAuthorization(): Promise<void>;
|
|
16
15
|
}
|
|
17
|
-
|
|
18
|
-
export { SessionManager };
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { AxiosInstance } from
|
|
2
|
-
import { StorageProvider } from
|
|
3
|
-
|
|
4
|
-
interface SessionManagerOptions {
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { StorageProvider } from "../interfaces/StorageProvider";
|
|
3
|
+
export interface SessionManagerOptions {
|
|
5
4
|
api: AxiosInstance;
|
|
6
5
|
storageProvider: StorageProvider;
|
|
7
6
|
}
|
|
8
|
-
type SessionManagerEvent = {
|
|
7
|
+
export type SessionManagerEvent = {
|
|
9
8
|
AUTHORIZATION_CHANGED: (authorization: string | null) => void;
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
export type { SessionManagerEvent, SessionManagerOptions };
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
import 'axios';
|
|
4
|
-
import '../interfaces/StorageProvider.js';
|
|
5
|
-
import 'eventemitter3';
|
|
1
|
+
export * from './SessionManager';
|
|
2
|
+
export * from './SessionManager.type';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './base64Polyfill';
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { TimeServiceClientTimeProvider, TimeServiceEvent, TimeServiceNtpResult, TimeServiceOffset, TimeServiceOptions, TimeServiceServerNtpResult, TimeServiceServerTimeProvider, TimeServiceTimeStamp } from './time/TimeService.type.js';
|
|
3
|
-
import 'eventemitter3';
|
|
1
|
+
export * from './time';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { TimeServiceEvent, TimeServiceClientTimeProvider, TimeServiceServerTimeProvider, TimeServiceNtpResult, TimeServiceOffset, TimeServiceOptions, TimeServiceTimeStamp } from './TimeService.type.js';
|
|
2
1
|
import EventEmitter from 'eventemitter3';
|
|
3
|
-
|
|
4
|
-
declare class TimeService extends EventEmitter<TimeServiceEvent> {
|
|
2
|
+
import type { TimeServiceClientTimeProvider, TimeServiceEvent, TimeServiceNtpResult, TimeServiceOffset, TimeServiceOptions, TimeServiceServerTimeProvider, TimeServiceTimeStamp } from "./TimeService.type";
|
|
3
|
+
export declare class TimeService extends EventEmitter<TimeServiceEvent> {
|
|
5
4
|
private syncHandler?;
|
|
6
5
|
private offset?;
|
|
7
6
|
private syncedAt?;
|
|
@@ -30,5 +29,3 @@ declare class TimeService extends EventEmitter<TimeServiceEvent> {
|
|
|
30
29
|
startSync(): void;
|
|
31
30
|
stopSync(): void;
|
|
32
31
|
}
|
|
33
|
-
|
|
34
|
-
export { TimeService };
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
type TimeServiceOffset = number;
|
|
2
|
-
type TimeServiceTimeStamp = number;
|
|
3
|
-
interface TimeServiceNtpResult {
|
|
1
|
+
export type TimeServiceOffset = number;
|
|
2
|
+
export type TimeServiceTimeStamp = number;
|
|
3
|
+
export interface TimeServiceNtpResult {
|
|
4
4
|
t1: TimeServiceTimeStamp;
|
|
5
5
|
t2: TimeServiceTimeStamp;
|
|
6
6
|
t3: TimeServiceTimeStamp;
|
|
7
7
|
t4: TimeServiceTimeStamp;
|
|
8
8
|
}
|
|
9
|
-
interface TimeServiceServerNtpResult extends Pick<TimeServiceNtpResult, 't2' | 't3'> {
|
|
9
|
+
export interface TimeServiceServerNtpResult extends Pick<TimeServiceNtpResult, 't2' | 't3'> {
|
|
10
10
|
}
|
|
11
|
-
type TimeServiceClientTimeProvider = () => TimeServiceTimeStamp;
|
|
12
|
-
type TimeServiceServerTimeProvider = (t1: TimeServiceNtpResult['t1']) => (TimeServiceServerNtpResult | null) | (Promise<TimeServiceServerNtpResult | null>);
|
|
13
|
-
type TimeServiceEvent = {
|
|
11
|
+
export type TimeServiceClientTimeProvider = () => TimeServiceTimeStamp;
|
|
12
|
+
export type TimeServiceServerTimeProvider = (t1: TimeServiceNtpResult['t1']) => (TimeServiceServerNtpResult | null) | (Promise<TimeServiceServerNtpResult | null>);
|
|
13
|
+
export type TimeServiceEvent = {
|
|
14
14
|
SYNCED: (offset: TimeServiceOffset, syncedAt: TimeServiceTimeStamp) => void;
|
|
15
15
|
SYNC_INTERVAL_CHANGED: (interval: number | undefined) => void;
|
|
16
16
|
};
|
|
17
|
-
interface TimeServiceOptions {
|
|
17
|
+
export interface TimeServiceOptions {
|
|
18
18
|
syncInterval?: number;
|
|
19
19
|
clientTimeProvider?: TimeServiceClientTimeProvider;
|
|
20
20
|
serverTimeProvider?: TimeServiceServerTimeProvider;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
export type { TimeServiceClientTimeProvider, TimeServiceEvent, TimeServiceNtpResult, TimeServiceOffset, TimeServiceOptions, TimeServiceServerNtpResult, TimeServiceServerTimeProvider, TimeServiceTimeStamp };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
import 'eventemitter3';
|
|
1
|
+
export * from "./TimeService";
|
|
2
|
+
export * from "./TimeService.type";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc['length']]>;
|
|
2
|
-
type IntRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>> | T;
|
|
3
|
-
|
|
4
|
-
export type { IntRange };
|
|
2
|
+
export type IntRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>> | T;
|
|
3
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from './IntRage';
|
|
2
|
+
export * from './PartialExcept';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare class ArrayUtils {
|
|
1
|
+
export declare class ArrayUtils {
|
|
2
2
|
static castArray<T>(value: T | T[]): T[];
|
|
3
3
|
/**
|
|
4
4
|
* 객체를 요소로 가지는 배열에서 가장 큰 값(Property)를 가지는 객체를 반환한다
|
|
@@ -10,5 +10,3 @@ declare class ArrayUtils {
|
|
|
10
10
|
static removeObjectDuplicate(arr: any[], key: string): any[];
|
|
11
11
|
static allValuesEqual<T>(...values: T[]): boolean;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
export { ArrayUtils };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { AxiosHeaderValue } from
|
|
2
|
-
|
|
3
|
-
declare class AxiosUtils {
|
|
1
|
+
import { AxiosHeaderValue } from "axios";
|
|
2
|
+
export declare class AxiosUtils {
|
|
4
3
|
static headerValue2String(value: AxiosHeaderValue | undefined): string | null;
|
|
5
4
|
static headerValue2Number(value: AxiosHeaderValue | undefined): number | null;
|
|
6
5
|
}
|
|
7
|
-
|
|
8
|
-
export { AxiosUtils };
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { Coordinate } from
|
|
2
|
-
|
|
3
|
-
declare class CoordinateUtils {
|
|
1
|
+
import { Coordinate } from "../interfaces/Coordinate";
|
|
2
|
+
export declare class CoordinateUtils {
|
|
4
3
|
static isValidLatitude(latitude: Coordinate['latitude'] | string): boolean;
|
|
5
4
|
static isValidLongitude(longitude: Coordinate['longitude'] | string): boolean;
|
|
6
5
|
static isValidLatitudeLongitude(latitude: Coordinate['latitude'] | string, longitude: Coordinate['longitude'] | string): boolean;
|
|
7
6
|
static isValidCoordinate(coordinate: Coordinate): boolean;
|
|
8
7
|
static crowDistance(...coordinates: Coordinate[]): number;
|
|
9
8
|
}
|
|
10
|
-
|
|
11
|
-
export { CoordinateUtils };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { MomentInput, RelativeTimeSpec } from
|
|
2
|
-
import { DATE } from
|
|
3
|
-
|
|
4
|
-
declare class DateUtils {
|
|
1
|
+
import { MomentInput, RelativeTimeSpec } from "moment";
|
|
2
|
+
import { DATE } from "../constants/DATE";
|
|
3
|
+
export declare class DateUtils {
|
|
5
4
|
static isPositiveInteger(value: unknown, strict?: boolean): boolean;
|
|
6
5
|
static isMilliseconds(value: unknown, strict?: boolean): boolean;
|
|
7
6
|
static isSeconds(value: unknown, strict?: boolean): boolean;
|
|
@@ -17,11 +16,9 @@ declare class DateUtils {
|
|
|
17
16
|
static setLocale: (language: DateUtils.Locale) => void;
|
|
18
17
|
private static getRelativeTimeSpec;
|
|
19
18
|
}
|
|
20
|
-
declare namespace DateUtils {
|
|
19
|
+
export declare namespace DateUtils {
|
|
21
20
|
type Locale = string;
|
|
22
21
|
const relativeTimeSpecs: {
|
|
23
22
|
[key: Locale]: RelativeTimeSpec;
|
|
24
23
|
};
|
|
25
24
|
}
|
|
26
|
-
|
|
27
|
-
export { DateUtils };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EnumEntries } from
|
|
2
|
-
|
|
3
|
-
declare class Enum<E extends object> {
|
|
1
|
+
import type { EnumEntries } from "./Enum.types";
|
|
2
|
+
export declare class Enum<E extends object> {
|
|
4
3
|
static entries<E extends object>(e: E): EnumEntries<E>;
|
|
5
4
|
static keys<E extends object>(e: E): ({ [K in keyof E]: E[K] extends Function ? never : K; }[keyof E] extends infer R ? R extends never ? never : R : never)[];
|
|
6
5
|
static values<E extends object>(e: E): ({ [K in keyof E]: E[K] extends Function ? never : E[K]; }[keyof E] extends infer R ? R extends never ? never : R : never)[];
|
|
@@ -15,5 +14,3 @@ declare class Enum<E extends object> {
|
|
|
15
14
|
keys(): ({ [K in keyof E]: E[K] extends Function ? never : K; }[keyof E] extends infer R ? R extends never ? never : R : never)[];
|
|
16
15
|
values(): ({ [K in keyof E]: E[K] extends Function ? never : E[K]; }[keyof E] extends infer R ? R extends never ? never : R : never)[];
|
|
17
16
|
}
|
|
18
|
-
|
|
19
|
-
export { Enum };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
type NonFunction<T, Type extends "keys" | "values"> = {
|
|
2
2
|
[K in keyof T]: T[K] extends Function ? never : Type extends "keys" ? K : T[K];
|
|
3
3
|
}[keyof T] extends infer R ? (R extends never ? never : R) : never;
|
|
4
|
-
type EnumEntry<E extends object> = [NonFunction<E, "keys">, NonFunction<E, "values">];
|
|
5
|
-
type EnumEntries<E extends object> = EnumEntry<E>[];
|
|
6
|
-
|
|
7
|
-
export type { EnumEntries, EnumEntry };
|
|
4
|
+
export type EnumEntry<E extends object> = [NonFunction<E, "keys">, NonFunction<E, "values">];
|
|
5
|
+
export type EnumEntries<E extends object> = EnumEntry<E>[];
|
|
6
|
+
export {};
|
|
@@ -19,8 +19,8 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
19
19
|
return Constructor;
|
|
20
20
|
}
|
|
21
21
|
require('../../chunk-ETV4XYOV.cjs');
|
|
22
|
-
var UuidUtils = require('./UuidUtils');
|
|
23
22
|
var Uint8ArrayUtils = require('./Uint8ArrayUtils');
|
|
23
|
+
var node = require('@powfix/uuid/node');
|
|
24
24
|
var ObjectIdUtils = /*#__PURE__*/ function() {
|
|
25
25
|
function ObjectIdUtils() {
|
|
26
26
|
_class_call_check(this, ObjectIdUtils);
|
|
@@ -37,13 +37,13 @@ var ObjectIdUtils = /*#__PURE__*/ function() {
|
|
|
37
37
|
var result = new Uint8Array(16);
|
|
38
38
|
var offset = pad === "start" ? 4 : 0;
|
|
39
39
|
result.set(src, offset);
|
|
40
|
-
return
|
|
40
|
+
return node.UUID.from(result).toString();
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
key: "fromUuid",
|
|
45
45
|
value: function fromUuid(uuid, pad) {
|
|
46
|
-
var buffer =
|
|
46
|
+
var buffer = node.UUID.from(uuid).toBuffer();
|
|
47
47
|
var isPadEnd = buffer.subarray(buffer.length - 4).every(function(byte) {
|
|
48
48
|
return byte === 0;
|
|
49
49
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { type UuidInput } from "@powfix/uuid";
|
|
2
|
+
export declare class ObjectIdUtils {
|
|
2
3
|
static toUuid(objectId: string, pad?: 'start' | 'end'): string;
|
|
3
|
-
static fromUuid(uuid:
|
|
4
|
+
static fromUuid(uuid: UuidInput, pad?: 'start' | 'end'): string;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
export { ObjectIdUtils };
|
|
@@ -18,8 +18,8 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
18
18
|
return Constructor;
|
|
19
19
|
}
|
|
20
20
|
import '../../chunk-PKBMQBKP.js';
|
|
21
|
-
import { UuidUtils } from './UuidUtils';
|
|
22
21
|
import { Uint8ArrayUtils } from './Uint8ArrayUtils';
|
|
22
|
+
import { UUID } from '@powfix/uuid/node';
|
|
23
23
|
var ObjectIdUtils = /*#__PURE__*/ function() {
|
|
24
24
|
"use strict";
|
|
25
25
|
function ObjectIdUtils() {
|
|
@@ -37,13 +37,13 @@ var ObjectIdUtils = /*#__PURE__*/ function() {
|
|
|
37
37
|
var result = new Uint8Array(16);
|
|
38
38
|
var offset = pad === "start" ? 4 : 0;
|
|
39
39
|
result.set(src, offset);
|
|
40
|
-
return
|
|
40
|
+
return UUID.from(result).toString();
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
key: "fromUuid",
|
|
45
45
|
value: function fromUuid(uuid, pad) {
|
|
46
|
-
var buffer =
|
|
46
|
+
var buffer = UUID.from(uuid).toBuffer();
|
|
47
47
|
var isPadEnd = buffer.subarray(buffer.length - 4).every(function(byte) {
|
|
48
48
|
return byte === 0;
|
|
49
49
|
});
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { Point3 } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare class Point3Utils {
|
|
1
|
+
import { Point3 } from "../interfaces/Point3";
|
|
2
|
+
export declare class Point3Utils {
|
|
5
3
|
static distance(p1: Point3, p2: Point3): number;
|
|
6
4
|
}
|
|
7
|
-
|
|
8
|
-
export { Point3Utils };
|