@hotmeshio/hotmesh 0.3.6 → 0.3.8
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/README.md +13 -1
- package/build/index.d.ts +3 -1
- package/build/index.js +10 -1
- package/build/modules/key.js +1 -62
- package/build/modules/utils.js +1 -267
- package/build/package.json +12 -8
- package/build/services/activities/activity.js +1 -495
- package/build/services/activities/await.js +1 -109
- package/build/services/activities/cycle.js +1 -96
- package/build/services/activities/hook.js +1 -154
- package/build/services/activities/index.js +1 -20
- package/build/services/activities/interrupt.js +1 -149
- package/build/services/activities/signal.js +1 -118
- package/build/services/activities/trigger.js +1 -237
- package/build/services/activities/worker.js +1 -101
- package/build/services/collator/index.js +1 -197
- package/build/services/compiler/deployer.d.ts +3 -1
- package/build/services/compiler/deployer.js +1 -455
- package/build/services/compiler/index.d.ts +3 -1
- package/build/services/compiler/index.js +1 -91
- package/build/services/compiler/validator.js +1 -122
- package/build/services/engine/index.d.ts +5 -2
- package/build/services/engine/index.js +1 -562
- package/build/services/exporter/index.js +1 -93
- package/build/services/mapper/index.js +1 -67
- package/build/services/meshdata/index.d.ts +0 -1
- package/build/services/meshdata/index.js +16 -24
- package/build/services/meshflow/client.js +4 -8
- package/build/services/meshflow/exporter.js +1 -186
- package/build/services/meshflow/index.d.ts +2 -0
- package/build/services/meshflow/index.js +2 -0
- package/build/services/meshflow/search.d.ts +4 -5
- package/build/services/meshflow/search.js +45 -35
- package/build/services/meshflow/workflow.d.ts +1 -1
- package/build/services/meshflow/workflow.js +3 -28
- package/build/services/pipe/functions/array.js +1 -74
- package/build/services/pipe/functions/bitwise.js +1 -24
- package/build/services/pipe/functions/conditional.js +1 -36
- package/build/services/pipe/functions/cron.js +1 -32
- package/build/services/pipe/functions/date.js +1 -164
- package/build/services/pipe/functions/index.js +1 -30
- package/build/services/pipe/functions/json.js +1 -12
- package/build/services/pipe/functions/logical.js +1 -12
- package/build/services/pipe/functions/math.js +1 -182
- package/build/services/pipe/functions/number.js +1 -60
- package/build/services/pipe/functions/object.js +1 -81
- package/build/services/pipe/functions/string.js +1 -69
- package/build/services/pipe/functions/symbol.js +1 -33
- package/build/services/pipe/functions/unary.js +1 -18
- package/build/services/pipe/index.js +1 -221
- package/build/services/quorum/index.d.ts +1 -1
- package/build/services/quorum/index.js +1 -219
- package/build/services/reporter/index.js +1 -331
- package/build/services/router/index.js +1 -420
- package/build/services/search/factory.d.ts +7 -0
- package/build/services/search/factory.js +20 -0
- package/build/services/search/index.d.ts +21 -0
- package/build/services/search/index.js +10 -0
- package/build/services/search/providers/redis/ioredis.d.ts +18 -0
- package/build/services/search/providers/redis/ioredis.js +1 -0
- package/build/services/search/providers/redis/redis.d.ts +18 -0
- package/build/services/search/providers/redis/redis.js +1 -0
- package/build/services/serializer/index.js +1 -265
- package/build/services/store/factory.d.ts +2 -1
- package/build/services/store/factory.js +2 -2
- package/build/services/store/index.d.ts +71 -97
- package/build/services/store/index.js +2 -939
- package/build/services/store/providers/postgres/postgres.d.ts +0 -0
- package/build/services/store/providers/postgres/postgres.js +0 -0
- package/build/services/store/providers/postgres/types/hash.d.ts +0 -0
- package/build/services/store/providers/postgres/types/hash.js +0 -0
- package/build/services/store/providers/postgres/types/list.d.ts +0 -0
- package/build/services/store/providers/postgres/types/list.js +0 -0
- package/build/services/store/providers/postgres/types/string.d.ts +0 -0
- package/build/services/store/providers/postgres/types/string.js +0 -0
- package/build/services/store/providers/postgres/types/zset.d.ts +0 -0
- package/build/services/store/providers/postgres/types/zset.js +0 -0
- package/build/services/store/providers/redis/_base.d.ts +98 -0
- package/build/services/store/providers/redis/_base.js +1 -0
- package/build/services/store/providers/redis/ioredis.d.ts +12 -0
- package/build/services/store/providers/redis/ioredis.js +1 -0
- package/build/services/store/providers/redis/redis.d.ts +13 -0
- package/build/services/store/providers/redis/redis.js +1 -0
- package/build/services/store/providers/store-initializable.d.ts +5 -0
- package/build/services/store/providers/store-initializable.js +1 -0
- package/build/services/stream/factory.d.ts +2 -1
- package/build/services/stream/factory.js +5 -5
- package/build/services/stream/index.d.ts +13 -14
- package/build/services/stream/index.js +3 -2
- package/build/services/stream/providers/postgres/_deploy.d.ts +4 -0
- package/build/services/stream/providers/postgres/_deploy.js +1 -0
- package/build/services/stream/providers/redis/ioredis.d.ts +21 -0
- package/build/services/stream/providers/redis/ioredis.js +1 -0
- package/build/services/stream/providers/redis/redis.d.ts +21 -0
- package/build/services/stream/providers/redis/redis.js +1 -0
- package/build/services/stream/providers/stream-initializable.d.ts +5 -0
- package/build/services/stream/providers/stream-initializable.js +1 -0
- package/build/services/sub/factory.d.ts +1 -1
- package/build/services/sub/factory.js +5 -5
- package/build/services/sub/index.d.ts +9 -7
- package/build/services/sub/index.js +3 -2
- package/build/services/sub/{clients → providers/redis}/ioredis.d.ts +7 -10
- package/build/services/sub/providers/redis/ioredis.js +1 -0
- package/build/services/sub/{clients → providers/redis}/redis.d.ts +7 -10
- package/build/services/sub/providers/redis/redis.js +1 -0
- package/build/services/task/index.js +1 -171
- package/build/services/telemetry/index.js +1 -225
- package/build/services/worker/index.d.ts +2 -2
- package/build/services/worker/index.js +1 -158
- package/build/types/redis.d.ts +5 -5
- package/index.ts +18 -1
- package/package.json +12 -8
- package/typedoc.json +2 -1
- package/types/redis.ts +5 -5
- package/build/services/store/clients/ioredis.d.ts +0 -30
- package/build/services/store/clients/ioredis.js +0 -220
- package/build/services/store/clients/redis.d.ts +0 -32
- package/build/services/store/clients/redis.js +0 -319
- package/build/services/stream/clients/ioredis.d.ts +0 -24
- package/build/services/stream/clients/ioredis.js +0 -121
- package/build/services/stream/clients/redis.d.ts +0 -24
- package/build/services/stream/clients/redis.js +0 -161
- package/build/services/sub/clients/ioredis.js +0 -72
- package/build/services/sub/clients/redis.js +0 -63
|
@@ -14,7 +14,7 @@ class Search {
|
|
|
14
14
|
this.jobId = key_1.KeyService.mintKey(hotMeshClient.namespace, key_1.KeyType.JOB_STATE, keyParams);
|
|
15
15
|
this.searchSessionId = searchSessionId;
|
|
16
16
|
this.hotMeshClient = hotMeshClient;
|
|
17
|
-
this.
|
|
17
|
+
this.search = hotMeshClient.engine.search;
|
|
18
18
|
}
|
|
19
19
|
safeKey(key) {
|
|
20
20
|
if (key.startsWith('"')) {
|
|
@@ -24,7 +24,7 @@ class Search {
|
|
|
24
24
|
}
|
|
25
25
|
static async configureSearchIndex(hotMeshClient, search) {
|
|
26
26
|
if (search?.schema) {
|
|
27
|
-
const
|
|
27
|
+
const searchService = hotMeshClient.engine.search;
|
|
28
28
|
const schema = [];
|
|
29
29
|
for (const [key, value] of Object.entries(search.schema)) {
|
|
30
30
|
if (value.indexed !== false) {
|
|
@@ -50,7 +50,7 @@ class Search {
|
|
|
50
50
|
};
|
|
51
51
|
const hotMeshPrefix = key_1.KeyService.mintKey(hotMeshClient.namespace, key_1.KeyType.JOB_STATE, keyParams);
|
|
52
52
|
const prefixes = search.prefix.map((prefix) => `${hotMeshPrefix}${prefix}`);
|
|
53
|
-
await
|
|
53
|
+
await searchService.createSearchIndex(`${search.index}`, prefixes, schema);
|
|
54
54
|
}
|
|
55
55
|
catch (error) {
|
|
56
56
|
hotMeshClient.engine.logger.info('meshflow-client-search-err', {
|
|
@@ -61,9 +61,8 @@ class Search {
|
|
|
61
61
|
}
|
|
62
62
|
static async listSearchIndexes(hotMeshClient) {
|
|
63
63
|
try {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
return searchIndexes;
|
|
64
|
+
const searchService = hotMeshClient.engine.search;
|
|
65
|
+
return await searchService.listSearchIndexes();
|
|
67
66
|
}
|
|
68
67
|
catch (error) {
|
|
69
68
|
hotMeshClient.engine.logger.info('meshflow-client-search-list-err', {
|
|
@@ -79,28 +78,36 @@ class Search {
|
|
|
79
78
|
const ssGuid = this.getSearchSessionGuid();
|
|
80
79
|
const store = storage_1.asyncLocalStorage.getStore();
|
|
81
80
|
const replay = store?.get('replay') ?? {};
|
|
82
|
-
const safeArgs = [];
|
|
83
|
-
for (let i = 0; i < args.length; i += 2) {
|
|
84
|
-
const keyName = args[i];
|
|
85
|
-
delete this.cachedFields[keyName];
|
|
86
|
-
const key = this.safeKey(keyName);
|
|
87
|
-
const value = args[i + 1].toString();
|
|
88
|
-
safeArgs.push(key, value);
|
|
89
|
-
}
|
|
90
81
|
if (ssGuid in replay) {
|
|
91
82
|
return Number(replay[ssGuid]);
|
|
92
83
|
}
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
const fields = {};
|
|
85
|
+
if (typeof args[0] === 'object') {
|
|
86
|
+
for (const [key, value] of Object.entries(args[0])) {
|
|
87
|
+
delete this.cachedFields[key];
|
|
88
|
+
fields[this.safeKey(key)] = value.toString();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
for (let i = 0; i < args.length; i += 2) {
|
|
93
|
+
const keyName = args[i];
|
|
94
|
+
delete this.cachedFields[keyName];
|
|
95
|
+
const key = this.safeKey(keyName);
|
|
96
|
+
const value = args[i + 1].toString();
|
|
97
|
+
fields[key] = value;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const fieldCount = await this.search.setFields(this.jobId, fields);
|
|
101
|
+
await this.search.setFields(this.jobId, { [ssGuid]: fieldCount.toString() });
|
|
102
|
+
return fieldCount;
|
|
96
103
|
}
|
|
97
|
-
async get(
|
|
104
|
+
async get(id) {
|
|
98
105
|
try {
|
|
99
|
-
if (
|
|
100
|
-
return this.cachedFields[
|
|
106
|
+
if (id in this.cachedFields) {
|
|
107
|
+
return this.cachedFields[id];
|
|
101
108
|
}
|
|
102
|
-
const value =
|
|
103
|
-
this.cachedFields[
|
|
109
|
+
const value = await this.search.getField(this.jobId, this.safeKey(id));
|
|
110
|
+
this.cachedFields[id] = value;
|
|
104
111
|
return value;
|
|
105
112
|
}
|
|
106
113
|
catch (error) {
|
|
@@ -127,7 +134,7 @@ class Search {
|
|
|
127
134
|
if (isCached) {
|
|
128
135
|
return values;
|
|
129
136
|
}
|
|
130
|
-
const returnValues =
|
|
137
|
+
const returnValues = await this.search.getFields(this.jobId, safeArgs);
|
|
131
138
|
returnValues.forEach((value, index) => {
|
|
132
139
|
if (value !== null) {
|
|
133
140
|
this.cachedFields[args[index]] = value;
|
|
@@ -155,11 +162,9 @@ class Search {
|
|
|
155
162
|
if (ssGuid in replay) {
|
|
156
163
|
return Number(replay[ssGuid]);
|
|
157
164
|
}
|
|
158
|
-
const response = await this.
|
|
159
|
-
const formattedResponse = isNaN(response)
|
|
160
|
-
|
|
161
|
-
: Number(response);
|
|
162
|
-
this.store.exec('HSET', this.jobId, ssGuid, formattedResponse.toString());
|
|
165
|
+
const response = await this.search.deleteFields(this.jobId, safeArgs);
|
|
166
|
+
const formattedResponse = isNaN(response) ? 0 : Number(response);
|
|
167
|
+
await this.search.setFields(this.jobId, { [ssGuid]: formattedResponse.toString() });
|
|
163
168
|
return formattedResponse;
|
|
164
169
|
}
|
|
165
170
|
async incr(key, val) {
|
|
@@ -170,9 +175,9 @@ class Search {
|
|
|
170
175
|
if (ssGuid in replay) {
|
|
171
176
|
return Number(replay[ssGuid]);
|
|
172
177
|
}
|
|
173
|
-
const num =
|
|
174
|
-
this.
|
|
175
|
-
return
|
|
178
|
+
const num = await this.search.incrementFieldByFloat(this.jobId, this.safeKey(key), val);
|
|
179
|
+
await this.search.setFields(this.jobId, { [ssGuid]: num.toString() });
|
|
180
|
+
return num;
|
|
176
181
|
}
|
|
177
182
|
async mult(key, val) {
|
|
178
183
|
delete this.cachedFields[key];
|
|
@@ -182,12 +187,17 @@ class Search {
|
|
|
182
187
|
if (ssGuid in replay) {
|
|
183
188
|
return Math.exp(Number(replay[ssGuid]));
|
|
184
189
|
}
|
|
185
|
-
const ssGuidValue =
|
|
190
|
+
const ssGuidValue = await this.search.incrementFieldByFloat(this.jobId, ssGuid, 1);
|
|
186
191
|
if (ssGuidValue === 1) {
|
|
187
192
|
const log = Math.log(val);
|
|
188
|
-
const logTotal =
|
|
189
|
-
this.
|
|
190
|
-
return Math.exp(
|
|
193
|
+
const logTotal = await this.search.incrementFieldByFloat(this.jobId, this.safeKey(key), log);
|
|
194
|
+
await this.search.setFields(this.jobId, { [ssGuid]: logTotal.toString() });
|
|
195
|
+
return Math.exp(logTotal);
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
const logTotalStr = await this.search.getField(this.jobId, ssGuid);
|
|
199
|
+
const logTotal = Number(logTotalStr);
|
|
200
|
+
return Math.exp(logTotal);
|
|
191
201
|
}
|
|
192
202
|
}
|
|
193
203
|
}
|
|
@@ -10,6 +10,7 @@ export declare class WorkflowService {
|
|
|
10
10
|
static getContext(): WorkflowContext;
|
|
11
11
|
static getHotMesh(): Promise<HotMesh>;
|
|
12
12
|
static execChild<T>(options: WorkflowOptions): Promise<T>;
|
|
13
|
+
static executeChild: typeof WorkflowService.execChild;
|
|
13
14
|
static getChildInterruptPayload(context: WorkflowContext, options: WorkflowOptions, execIndex: number): MeshFlowChildErrorType;
|
|
14
15
|
static startChild(options: WorkflowOptions): Promise<string>;
|
|
15
16
|
static proxyActivities<ACT>(options?: ActivityConfig): ProxyType<ACT>;
|
|
@@ -19,7 +20,6 @@ export declare class WorkflowService {
|
|
|
19
20
|
static random(): number;
|
|
20
21
|
static signal(signalId: string, data: Record<any, any>): Promise<string>;
|
|
21
22
|
static hook(options: HookOptions): Promise<string>;
|
|
22
|
-
static once<T>(fn: (...args: any[]) => Promise<T>, ...args: any[]): Promise<T>;
|
|
23
23
|
static interrupt(jobId: string, options?: JobInterruptOptions): Promise<string | void>;
|
|
24
24
|
static all<T>(...promises: Promise<T>[]): Promise<T[]>;
|
|
25
25
|
static sleepFor(duration: string): Promise<number>;
|
|
@@ -38,7 +38,8 @@ class WorkflowService {
|
|
|
38
38
|
jobId: workflowId,
|
|
39
39
|
};
|
|
40
40
|
const workflowGuid = key_1.KeyService.mintKey(hotMeshClient.namespace, key_1.KeyType.JOB_STATE, keyParams);
|
|
41
|
-
const
|
|
41
|
+
const searchClient = hotMeshClient.engine.search;
|
|
42
|
+
const guidValue = await searchClient.incrementFieldByFloat(workflowGuid, sessionId, 1);
|
|
42
43
|
return guidValue === 1;
|
|
43
44
|
}
|
|
44
45
|
static getContext() {
|
|
@@ -299,33 +300,6 @@ class WorkflowService {
|
|
|
299
300
|
return await hotMeshClient.hook(`${namespace}.flow.signal`, payload, stream_1.StreamStatus.PENDING, 202);
|
|
300
301
|
}
|
|
301
302
|
}
|
|
302
|
-
static async once(fn, ...args) {
|
|
303
|
-
const { COUNTER, connection, namespace, workflowId, workflowTopic, workflowDimension, replay, } = WorkflowService.getContext();
|
|
304
|
-
const execIndex = COUNTER.counter = COUNTER.counter + 1;
|
|
305
|
-
const sessionId = `-once${workflowDimension}-${execIndex}-`;
|
|
306
|
-
if (sessionId in replay) {
|
|
307
|
-
return serializer_1.SerializerService.fromString(replay[sessionId]).data;
|
|
308
|
-
}
|
|
309
|
-
const hotMeshClient = await worker_1.WorkerService.getHotMesh(workflowTopic, {
|
|
310
|
-
connection,
|
|
311
|
-
namespace,
|
|
312
|
-
});
|
|
313
|
-
const keyParams = {
|
|
314
|
-
appId: hotMeshClient.appId,
|
|
315
|
-
jobId: workflowId,
|
|
316
|
-
};
|
|
317
|
-
const workflowGuid = key_1.KeyService.mintKey(hotMeshClient.namespace, key_1.KeyType.JOB_STATE, keyParams);
|
|
318
|
-
const t1 = new Date();
|
|
319
|
-
const response = await fn(...args);
|
|
320
|
-
const t2 = new Date();
|
|
321
|
-
const payload = {
|
|
322
|
-
data: response,
|
|
323
|
-
ac: (0, utils_1.formatISODate)(t1),
|
|
324
|
-
au: (0, utils_1.formatISODate)(t2),
|
|
325
|
-
};
|
|
326
|
-
await hotMeshClient.engine.store.exec('HSET', workflowGuid, sessionId, serializer_1.SerializerService.toString(payload));
|
|
327
|
-
return response;
|
|
328
|
-
}
|
|
329
303
|
static async interrupt(jobId, options = {}) {
|
|
330
304
|
const { workflowTopic, connection, namespace } = WorkflowService.getContext();
|
|
331
305
|
const hotMeshClient = await worker_1.WorkerService.getHotMesh(workflowTopic, {
|
|
@@ -385,4 +359,5 @@ class WorkflowService {
|
|
|
385
359
|
throw new errors_1.MeshFlowWaitForError(interruptionMessage);
|
|
386
360
|
}
|
|
387
361
|
}
|
|
362
|
+
WorkflowService.executeChild = WorkflowService.execChild;
|
|
388
363
|
exports.WorkflowService = WorkflowService;
|
|
@@ -1,74 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ArrayHandler = void 0;
|
|
4
|
-
class ArrayHandler {
|
|
5
|
-
get(array, index) {
|
|
6
|
-
return array?.[index || 0];
|
|
7
|
-
}
|
|
8
|
-
length(array) {
|
|
9
|
-
return array?.length;
|
|
10
|
-
}
|
|
11
|
-
concat(array1, array2) {
|
|
12
|
-
return array1.concat(array2);
|
|
13
|
-
}
|
|
14
|
-
indexOf(array, searchElement, fromIndex) {
|
|
15
|
-
return array.indexOf(searchElement, fromIndex);
|
|
16
|
-
}
|
|
17
|
-
join(array, separator) {
|
|
18
|
-
return array.join(separator);
|
|
19
|
-
}
|
|
20
|
-
lastIndexOf(array, searchElement, fromIndex) {
|
|
21
|
-
return array.lastIndexOf(searchElement, fromIndex);
|
|
22
|
-
}
|
|
23
|
-
pop(array) {
|
|
24
|
-
return array.pop();
|
|
25
|
-
}
|
|
26
|
-
push(array, ...items) {
|
|
27
|
-
array.push(...items);
|
|
28
|
-
return array;
|
|
29
|
-
}
|
|
30
|
-
reverse(array) {
|
|
31
|
-
return array.reverse();
|
|
32
|
-
}
|
|
33
|
-
shift(array) {
|
|
34
|
-
return array.shift();
|
|
35
|
-
}
|
|
36
|
-
slice(array, start, end) {
|
|
37
|
-
return array.slice(start, end);
|
|
38
|
-
}
|
|
39
|
-
sort(array, order = 'ASCENDING') {
|
|
40
|
-
return array.sort((a, b) => {
|
|
41
|
-
if (order === 'ASCENDING') {
|
|
42
|
-
if (a === b)
|
|
43
|
-
return 0;
|
|
44
|
-
if (a === null || a === undefined)
|
|
45
|
-
return -1;
|
|
46
|
-
if (b === null || b === undefined)
|
|
47
|
-
return 1;
|
|
48
|
-
if (typeof a === 'string' && typeof b === 'string') {
|
|
49
|
-
return a.localeCompare(b);
|
|
50
|
-
}
|
|
51
|
-
return a < b ? -1 : 1;
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
if (a === b)
|
|
55
|
-
return 0;
|
|
56
|
-
if (a === null || a === undefined)
|
|
57
|
-
return 1;
|
|
58
|
-
if (b === null || b === undefined)
|
|
59
|
-
return -1;
|
|
60
|
-
if (typeof a === 'string' && typeof b === 'string') {
|
|
61
|
-
return b.localeCompare(a);
|
|
62
|
-
}
|
|
63
|
-
return a > b ? -1 : 1;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
splice(array, start, deleteCount, ...items) {
|
|
68
|
-
return array.splice(start, deleteCount, ...items);
|
|
69
|
-
}
|
|
70
|
-
unshift(array, ...items) {
|
|
71
|
-
return array.unshift(...items);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
exports.ArrayHandler = ArrayHandler;
|
|
1
|
+
'use strict';function _0x211c(){var _0x487b54=['6483714sBvUoD','3375513gteJlT','4CvnzyM','2996145UPVkqi','8452052EtJdob','15523912sBvpyF','1194786QwamFE','101613RmImPp'];_0x211c=function(){return _0x487b54;};return _0x211c();}(function(_0x2644fd,_0xfafbe5){var _0x4ff631=_0x4e20,_0x23e85b=_0x2644fd();while(!![]){try{var _0x3b36c3=-parseInt(_0x4ff631(0x14d))/0x1+-parseInt(_0x4ff631(0x14c))/0x2+-parseInt(_0x4ff631(0x14f))/0x3*(parseInt(_0x4ff631(0x150))/0x4)+parseInt(_0x4ff631(0x149))/0x5+-parseInt(_0x4ff631(0x14e))/0x6+parseInt(_0x4ff631(0x14a))/0x7+parseInt(_0x4ff631(0x14b))/0x8;if(_0x3b36c3===_0xfafbe5)break;else _0x23e85b['push'](_0x23e85b['shift']());}catch(_0xbb74c0){_0x23e85b['push'](_0x23e85b['shift']());}}}(_0x211c,0xcda76));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ArrayHandler']=void 0x0;function _0x4e20(_0x26e986,_0x2a8f16){var _0x211c33=_0x211c();return _0x4e20=function(_0x4e20de,_0x2a59dc){_0x4e20de=_0x4e20de-0x149;var _0x4dce4a=_0x211c33[_0x4e20de];return _0x4dce4a;},_0x4e20(_0x26e986,_0x2a8f16);}class ArrayHandler{['get'](_0x421ad7,_0x12ffe4){return _0x421ad7?.[_0x12ffe4||0x0];}['length'](_0x505b88){return _0x505b88?.['length'];}['concat'](_0x1b596c,_0x34784b){return _0x1b596c['concat'](_0x34784b);}['indexOf'](_0x5f896e,_0x343942,_0x139ae2){return _0x5f896e['indexOf'](_0x343942,_0x139ae2);}['join'](_0x183b7b,_0x23fe3e){return _0x183b7b['join'](_0x23fe3e);}['lastIndexOf'](_0x10ad53,_0x2d670c,_0x687225){return _0x10ad53['lastIndexOf'](_0x2d670c,_0x687225);}['pop'](_0x41befb){return _0x41befb['pop']();}['push'](_0x2ec7da,..._0x33086a){return _0x2ec7da['push'](..._0x33086a),_0x2ec7da;}['reverse'](_0x23efb2){return _0x23efb2['reverse']();}['shift'](_0x5bc18e){return _0x5bc18e['shift']();}['slice'](_0x1f22df,_0x1f4ccc,_0x2ca398){return _0x1f22df['slice'](_0x1f4ccc,_0x2ca398);}['sort'](_0x574a77,_0x488d1f='ASCENDING'){return _0x574a77['sort']((_0x5709a6,_0x16dfd5)=>{if(_0x488d1f==='ASCENDING'){if(_0x5709a6===_0x16dfd5)return 0x0;if(_0x5709a6===null||_0x5709a6===undefined)return-0x1;if(_0x16dfd5===null||_0x16dfd5===undefined)return 0x1;if(typeof _0x5709a6==='string'&&typeof _0x16dfd5==='string')return _0x5709a6['localeCompare'](_0x16dfd5);return _0x5709a6<_0x16dfd5?-0x1:0x1;}else{if(_0x5709a6===_0x16dfd5)return 0x0;if(_0x5709a6===null||_0x5709a6===undefined)return 0x1;if(_0x16dfd5===null||_0x16dfd5===undefined)return-0x1;if(typeof _0x5709a6==='string'&&typeof _0x16dfd5==='string')return _0x16dfd5['localeCompare'](_0x5709a6);return _0x5709a6>_0x16dfd5?-0x1:0x1;}});}['splice'](_0x3888e9,_0x30143c,_0x58e2c7,..._0x881dd8){return _0x3888e9['splice'](_0x30143c,_0x58e2c7,..._0x881dd8);}['unshift'](_0x4a8217,..._0x3edcc){return _0x4a8217['unshift'](..._0x3edcc);}}exports['ArrayHandler']=ArrayHandler;
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BitwiseHandler = void 0;
|
|
4
|
-
class BitwiseHandler {
|
|
5
|
-
and(a, b) {
|
|
6
|
-
return a & b;
|
|
7
|
-
}
|
|
8
|
-
or(a, b) {
|
|
9
|
-
return a | b;
|
|
10
|
-
}
|
|
11
|
-
xor(a, b) {
|
|
12
|
-
return a ^ b;
|
|
13
|
-
}
|
|
14
|
-
leftShift(a, b) {
|
|
15
|
-
return a << b;
|
|
16
|
-
}
|
|
17
|
-
rightShift(a, b) {
|
|
18
|
-
return a >> b;
|
|
19
|
-
}
|
|
20
|
-
unsignedRightShift(a, b) {
|
|
21
|
-
return a >>> b;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.BitwiseHandler = BitwiseHandler;
|
|
1
|
+
'use strict';(function(_0x4ae324,_0x1130a7){var _0xf51ff1=_0x4d38,_0x4ba7ed=_0x4ae324();while(!![]){try{var _0x2dd3c0=-parseInt(_0xf51ff1(0x18c))/0x1+-parseInt(_0xf51ff1(0x18d))/0x2+-parseInt(_0xf51ff1(0x186))/0x3*(parseInt(_0xf51ff1(0x188))/0x4)+-parseInt(_0xf51ff1(0x187))/0x5+parseInt(_0xf51ff1(0x18b))/0x6+parseInt(_0xf51ff1(0x189))/0x7+parseInt(_0xf51ff1(0x18a))/0x8;if(_0x2dd3c0===_0x1130a7)break;else _0x4ba7ed['push'](_0x4ba7ed['shift']());}catch(_0x10448e){_0x4ba7ed['push'](_0x4ba7ed['shift']());}}}(_0x4921,0x6cd5b));function _0x4921(){var _0x33b629=['2589882eoHZJK','534852TxgmbF','1160742oyAiJI','70377bbOBkh','2184935UJqtQN','12QRJXGW','5683692ezlxGx','6598168xTdnXs'];_0x4921=function(){return _0x33b629;};return _0x4921();}function _0x4d38(_0x4d333b,_0x367ccc){var _0x492106=_0x4921();return _0x4d38=function(_0x4d383e,_0xb52ba8){_0x4d383e=_0x4d383e-0x186;var _0x285cfc=_0x492106[_0x4d383e];return _0x285cfc;},_0x4d38(_0x4d333b,_0x367ccc);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['BitwiseHandler']=void 0x0;class BitwiseHandler{['and'](_0x515343,_0x5e9a80){return _0x515343&_0x5e9a80;}['or'](_0x1383a6,_0x39cbaf){return _0x1383a6|_0x39cbaf;}['xor'](_0x5650f1,_0x5a6cf4){return _0x5650f1^_0x5a6cf4;}['leftShift'](_0x289b25,_0x1746d3){return _0x289b25<<_0x1746d3;}['rightShift'](_0x310487,_0x5ebbd0){return _0x310487>>_0x5ebbd0;}['unsignedRightShift'](_0x207836,_0x54e7b5){return _0x207836>>>_0x54e7b5;}}exports['BitwiseHandler']=BitwiseHandler;
|
|
@@ -1,36 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConditionalHandler = void 0;
|
|
4
|
-
class ConditionalHandler {
|
|
5
|
-
ternary(condition, valueIfTrue, valueIfFalse) {
|
|
6
|
-
return condition ? valueIfTrue : valueIfFalse;
|
|
7
|
-
}
|
|
8
|
-
equality(value1, value2) {
|
|
9
|
-
return value1 == value2;
|
|
10
|
-
}
|
|
11
|
-
strict_equality(value1, value2) {
|
|
12
|
-
return value1 === value2;
|
|
13
|
-
}
|
|
14
|
-
inequality(value1, value2) {
|
|
15
|
-
return value1 != value2;
|
|
16
|
-
}
|
|
17
|
-
strict_inequality(value1, value2) {
|
|
18
|
-
return value1 !== value2;
|
|
19
|
-
}
|
|
20
|
-
greater_than(value1, value2) {
|
|
21
|
-
return value1 > value2;
|
|
22
|
-
}
|
|
23
|
-
less_than(value1, value2) {
|
|
24
|
-
return value1 < value2;
|
|
25
|
-
}
|
|
26
|
-
greater_than_or_equal(value1, value2) {
|
|
27
|
-
return value1 >= value2;
|
|
28
|
-
}
|
|
29
|
-
less_than_or_equal(value1, value2) {
|
|
30
|
-
return value1 <= value2;
|
|
31
|
-
}
|
|
32
|
-
nullish(value1, value2) {
|
|
33
|
-
return value1 ?? value2;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.ConditionalHandler = ConditionalHandler;
|
|
1
|
+
'use strict';(function(_0x5ac2a6,_0x54a9ca){var _0x2cf579=_0x44cc,_0x4910a6=_0x5ac2a6();while(!![]){try{var _0x1ee3c7=-parseInt(_0x2cf579(0x175))/0x1*(parseInt(_0x2cf579(0x179))/0x2)+-parseInt(_0x2cf579(0x17c))/0x3*(-parseInt(_0x2cf579(0x176))/0x4)+-parseInt(_0x2cf579(0x172))/0x5*(-parseInt(_0x2cf579(0x173))/0x6)+parseInt(_0x2cf579(0x177))/0x7+parseInt(_0x2cf579(0x174))/0x8*(parseInt(_0x2cf579(0x171))/0x9)+-parseInt(_0x2cf579(0x17b))/0xa*(-parseInt(_0x2cf579(0x17a))/0xb)+parseInt(_0x2cf579(0x17d))/0xc*(-parseInt(_0x2cf579(0x178))/0xd);if(_0x1ee3c7===_0x54a9ca)break;else _0x4910a6['push'](_0x4910a6['shift']());}catch(_0x27d9ae){_0x4910a6['push'](_0x4910a6['shift']());}}}(_0x1ee9,0x263b5));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ConditionalHandler']=void 0x0;function _0x44cc(_0x568688,_0x6e2e){var _0x1ee9f5=_0x1ee9();return _0x44cc=function(_0x44ccfc,_0xb29e9c){_0x44ccfc=_0x44ccfc-0x171;var _0x1d8ee8=_0x1ee9f5[_0x44ccfc];return _0x1d8ee8;},_0x44cc(_0x568688,_0x6e2e);}class ConditionalHandler{['ternary'](_0x498863,_0x4311d3,_0x3e63ee){return _0x498863?_0x4311d3:_0x3e63ee;}['equality'](_0x1f9db9,_0xaed651){return _0x1f9db9==_0xaed651;}['strict_equality'](_0x4d1930,_0x364cf0){return _0x4d1930===_0x364cf0;}['inequality'](_0x4c1068,_0x29d84c){return _0x4c1068!=_0x29d84c;}['strict_inequality'](_0xbd98c7,_0x181531){return _0xbd98c7!==_0x181531;}['greater_than'](_0x5442d1,_0x172458){return _0x5442d1>_0x172458;}['less_than'](_0xddab22,_0x56cd54){return _0xddab22<_0x56cd54;}['greater_than_or_equal'](_0x1698ae,_0x39478e){return _0x1698ae>=_0x39478e;}['less_than_or_equal'](_0x543859,_0x5cf066){return _0x543859<=_0x5cf066;}['nullish'](_0xe54b42,_0x3f58c7){return _0xe54b42??_0x3f58c7;}}function _0x1ee9(){var _0x472604=['346820ANcLUf','21165VEygbC','4817604QDVIgt','198nQADPz','5ZpfsFa','755790SLUkRz','98720QlfxPk','5FvfNyG','172XeiaCO','1313900PUnSTC','26eBcUnl','82574zZqFIT','88OdWWJd'];_0x1ee9=function(){return _0x472604;};return _0x1ee9();}exports['ConditionalHandler']=ConditionalHandler;
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CronHandler = void 0;
|
|
4
|
-
const cron_parser_1 = require("cron-parser");
|
|
5
|
-
const enums_1 = require("../../../modules/enums");
|
|
6
|
-
const utils_1 = require("../../../modules/utils");
|
|
7
|
-
class CronHandler {
|
|
8
|
-
nextDelay(cronExpression) {
|
|
9
|
-
try {
|
|
10
|
-
if (!(0, utils_1.isValidCron)(cronExpression)) {
|
|
11
|
-
return -1;
|
|
12
|
-
}
|
|
13
|
-
const interval = (0, cron_parser_1.parseExpression)(cronExpression, { utc: true });
|
|
14
|
-
const nextDate = interval.next().toDate();
|
|
15
|
-
const now = new Date();
|
|
16
|
-
const delay = (nextDate.getTime() - now.getTime()) / 1000;
|
|
17
|
-
if (delay <= 0) {
|
|
18
|
-
return -1;
|
|
19
|
-
}
|
|
20
|
-
if (delay < enums_1.HMSH_FIDELITY_SECONDS) {
|
|
21
|
-
return enums_1.HMSH_FIDELITY_SECONDS;
|
|
22
|
-
}
|
|
23
|
-
const iDelay = Math.round(delay);
|
|
24
|
-
return iDelay;
|
|
25
|
-
}
|
|
26
|
-
catch (error) {
|
|
27
|
-
console.error('Error calculating next cron job execution delay:', error);
|
|
28
|
-
return -1;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.CronHandler = CronHandler;
|
|
1
|
+
'use strict';function _0x34f6(){const _0x561a83=['9skPkzP','35LtIYeV','18954dYQxJO','12879IMugek','89545kXMzkB','960670NsXoUw','11NgBRkY','1095672copGDU','46086BpJhDW','299815QAXtjD','1600eQMJlm','36AFLHWu'];_0x34f6=function(){return _0x561a83;};return _0x34f6();}(function(_0x829a1a,_0x153ab6){const _0x370aa9=_0x4536,_0x181a3a=_0x829a1a();while(!![]){try{const _0x367009=parseInt(_0x370aa9(0x191))/0x1+parseInt(_0x370aa9(0x196))/0x2*(parseInt(_0x370aa9(0x194))/0x3)+parseInt(_0x370aa9(0x193))/0x4*(parseInt(_0x370aa9(0x198))/0x5)+-parseInt(_0x370aa9(0x190))/0x6*(parseInt(_0x370aa9(0x195))/0x7)+-parseInt(_0x370aa9(0x192))/0x8*(parseInt(_0x370aa9(0x197))/0x9)+-parseInt(_0x370aa9(0x199))/0xa+parseInt(_0x370aa9(0x19a))/0xb*(parseInt(_0x370aa9(0x19b))/0xc);if(_0x367009===_0x153ab6)break;else _0x181a3a['push'](_0x181a3a['shift']());}catch(_0x3b3c10){_0x181a3a['push'](_0x181a3a['shift']());}}}(_0x34f6,0x2713d));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CronHandler']=void 0x0;const cron_parser_1=require('cron-parser'),enums_1=require('../../../modules/enums'),utils_1=require('../../../modules/utils');class CronHandler{['nextDelay'](_0x5afc5f){try{if(!(0x0,utils_1['isValidCron'])(_0x5afc5f))return-0x1;const _0x5562e4=(0x0,cron_parser_1['parseExpression'])(_0x5afc5f,{'utc':!![]}),_0x4839c8=_0x5562e4['next']()['toDate'](),_0x17d912=new Date(),_0x50058a=(_0x4839c8['getTime']()-_0x17d912['getTime']())/0x3e8;if(_0x50058a<=0x0)return-0x1;if(_0x50058a<enums_1['HMSH_FIDELITY_SECONDS'])return enums_1['HMSH_FIDELITY_SECONDS'];const _0x4f6b62=Math['round'](_0x50058a);return _0x4f6b62;}catch(_0x5cd374){return console['error']('Error\x20calculating\x20next\x20cron\x20job\x20execution\x20\x20delay:',_0x5cd374),-0x1;}}}function _0x4536(_0x34690c,_0x425930){const _0x34f681=_0x34f6();return _0x4536=function(_0x4536df,_0x51b74f){_0x4536df=_0x4536df-0x190;let _0x2495a3=_0x34f681[_0x4536df];return _0x2495a3;},_0x4536(_0x34690c,_0x425930);}exports['CronHandler']=CronHandler;
|
|
@@ -1,164 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DateHandler = void 0;
|
|
4
|
-
const utils_1 = require("../../../modules/utils");
|
|
5
|
-
class DateHandler {
|
|
6
|
-
static getDateInstance(input) {
|
|
7
|
-
const ISO_REGEX = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z)?$/;
|
|
8
|
-
if (typeof input === 'string') {
|
|
9
|
-
if (ISO_REGEX.test(input)) {
|
|
10
|
-
return new Date(input);
|
|
11
|
-
}
|
|
12
|
-
const milliseconds = parseInt(input, 10);
|
|
13
|
-
if (!isNaN(milliseconds)) {
|
|
14
|
-
return new Date(milliseconds);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
else if (input instanceof Date) {
|
|
18
|
-
return input;
|
|
19
|
-
}
|
|
20
|
-
else if (typeof input === 'number') {
|
|
21
|
-
return new Date(input);
|
|
22
|
-
}
|
|
23
|
-
throw new Error('Invalid date format');
|
|
24
|
-
}
|
|
25
|
-
fromISOString(isoString) {
|
|
26
|
-
return new Date(isoString);
|
|
27
|
-
}
|
|
28
|
-
now() {
|
|
29
|
-
return Date.now();
|
|
30
|
-
}
|
|
31
|
-
parse(dateString) {
|
|
32
|
-
return Date.parse(dateString);
|
|
33
|
-
}
|
|
34
|
-
getDate(date) {
|
|
35
|
-
return DateHandler.getDateInstance(date).getDate();
|
|
36
|
-
}
|
|
37
|
-
getDay(date) {
|
|
38
|
-
return DateHandler.getDateInstance(date).getDay();
|
|
39
|
-
}
|
|
40
|
-
getFullYear(date) {
|
|
41
|
-
return DateHandler.getDateInstance(date).getFullYear();
|
|
42
|
-
}
|
|
43
|
-
getHours(date) {
|
|
44
|
-
return DateHandler.getDateInstance(date).getHours();
|
|
45
|
-
}
|
|
46
|
-
getMilliseconds(date) {
|
|
47
|
-
return DateHandler.getDateInstance(date).getMilliseconds();
|
|
48
|
-
}
|
|
49
|
-
getMinutes(date) {
|
|
50
|
-
return DateHandler.getDateInstance(date).getMinutes();
|
|
51
|
-
}
|
|
52
|
-
getMonth(date) {
|
|
53
|
-
return DateHandler.getDateInstance(date).getMonth();
|
|
54
|
-
}
|
|
55
|
-
getSeconds(date) {
|
|
56
|
-
return DateHandler.getDateInstance(date).getSeconds();
|
|
57
|
-
}
|
|
58
|
-
getTime(date) {
|
|
59
|
-
return DateHandler.getDateInstance(date).getTime();
|
|
60
|
-
}
|
|
61
|
-
getTimezoneOffset(date) {
|
|
62
|
-
return DateHandler.getDateInstance(date).getTimezoneOffset();
|
|
63
|
-
}
|
|
64
|
-
getUTCDate(date) {
|
|
65
|
-
return DateHandler.getDateInstance(date).getUTCDate();
|
|
66
|
-
}
|
|
67
|
-
getUTCDay(date) {
|
|
68
|
-
return DateHandler.getDateInstance(date).getUTCDay();
|
|
69
|
-
}
|
|
70
|
-
getUTCFullYear(date) {
|
|
71
|
-
return DateHandler.getDateInstance(date).getUTCFullYear();
|
|
72
|
-
}
|
|
73
|
-
getUTCHours(date) {
|
|
74
|
-
return DateHandler.getDateInstance(date).getUTCHours();
|
|
75
|
-
}
|
|
76
|
-
getUTCMilliseconds(date) {
|
|
77
|
-
return DateHandler.getDateInstance(date).getUTCMilliseconds();
|
|
78
|
-
}
|
|
79
|
-
getUTCMinutes(date) {
|
|
80
|
-
return DateHandler.getDateInstance(date).getUTCMinutes();
|
|
81
|
-
}
|
|
82
|
-
getUTCMonth(date) {
|
|
83
|
-
return DateHandler.getDateInstance(date).getUTCMonth();
|
|
84
|
-
}
|
|
85
|
-
getUTCSeconds(date) {
|
|
86
|
-
return DateHandler.getDateInstance(date).getUTCSeconds();
|
|
87
|
-
}
|
|
88
|
-
setMilliseconds(date, ms) {
|
|
89
|
-
return DateHandler.getDateInstance(date).setMilliseconds(ms);
|
|
90
|
-
}
|
|
91
|
-
setMinutes(date, minutes, seconds, ms) {
|
|
92
|
-
return DateHandler.getDateInstance(date).setMinutes(minutes, seconds, ms);
|
|
93
|
-
}
|
|
94
|
-
setMonth(date, month, day) {
|
|
95
|
-
return DateHandler.getDateInstance(date).setMonth(month, day);
|
|
96
|
-
}
|
|
97
|
-
setSeconds(date, seconds, ms) {
|
|
98
|
-
return DateHandler.getDateInstance(date).setSeconds(seconds, ms);
|
|
99
|
-
}
|
|
100
|
-
setTime(date, time) {
|
|
101
|
-
return DateHandler.getDateInstance(date).setTime(time);
|
|
102
|
-
}
|
|
103
|
-
setUTCDate(date, day) {
|
|
104
|
-
return DateHandler.getDateInstance(date).setUTCDate(day);
|
|
105
|
-
}
|
|
106
|
-
setUTCFullYear(date, year, month, day) {
|
|
107
|
-
return DateHandler.getDateInstance(date).setUTCFullYear(year, month, day);
|
|
108
|
-
}
|
|
109
|
-
setUTCHours(date, hours, minutes, seconds, ms) {
|
|
110
|
-
return DateHandler.getDateInstance(date).setUTCHours(hours, minutes, seconds, ms);
|
|
111
|
-
}
|
|
112
|
-
setUTCMilliseconds(date, ms) {
|
|
113
|
-
return DateHandler.getDateInstance(date).setUTCMilliseconds(ms);
|
|
114
|
-
}
|
|
115
|
-
setUTCMinutes(date, minutes, seconds, ms) {
|
|
116
|
-
return DateHandler.getDateInstance(date).setUTCMinutes(minutes, seconds, ms);
|
|
117
|
-
}
|
|
118
|
-
setUTCMonth(date, month, day) {
|
|
119
|
-
return DateHandler.getDateInstance(date).setUTCMonth(month, day);
|
|
120
|
-
}
|
|
121
|
-
setUTCSeconds(date, seconds, ms) {
|
|
122
|
-
return DateHandler.getDateInstance(date).setUTCSeconds(seconds, ms);
|
|
123
|
-
}
|
|
124
|
-
setDate(date, day) {
|
|
125
|
-
return DateHandler.getDateInstance(date).setDate(day);
|
|
126
|
-
}
|
|
127
|
-
setFullYear(date, year, month, day) {
|
|
128
|
-
return DateHandler.getDateInstance(date).setFullYear(year, month, day);
|
|
129
|
-
}
|
|
130
|
-
setHours(date, hours, minutes, seconds, ms) {
|
|
131
|
-
return DateHandler.getDateInstance(date).setHours(hours, minutes, seconds, ms);
|
|
132
|
-
}
|
|
133
|
-
toDateString(date) {
|
|
134
|
-
return DateHandler.getDateInstance(date).toDateString();
|
|
135
|
-
}
|
|
136
|
-
toISOString(date) {
|
|
137
|
-
return DateHandler.getDateInstance(date).toISOString();
|
|
138
|
-
}
|
|
139
|
-
toISOXString(date) {
|
|
140
|
-
return (0, utils_1.formatISODate)(date ? DateHandler.getDateInstance(date) : new Date());
|
|
141
|
-
}
|
|
142
|
-
toJSON(date) {
|
|
143
|
-
return DateHandler.getDateInstance(date).toJSON();
|
|
144
|
-
}
|
|
145
|
-
toLocaleDateString(date, locales, options) {
|
|
146
|
-
return DateHandler.getDateInstance(date).toLocaleDateString(locales, options);
|
|
147
|
-
}
|
|
148
|
-
toLocaleString(date, locales, options) {
|
|
149
|
-
return DateHandler.getDateInstance(date).toLocaleString(locales, options);
|
|
150
|
-
}
|
|
151
|
-
toLocaleTimeString(date, locales, options) {
|
|
152
|
-
return DateHandler.getDateInstance(date).toLocaleTimeString(locales, options);
|
|
153
|
-
}
|
|
154
|
-
toString(date) {
|
|
155
|
-
return DateHandler.getDateInstance(date).toString();
|
|
156
|
-
}
|
|
157
|
-
UTC(year, month, date, hours, minutes, seconds, ms) {
|
|
158
|
-
return Date.UTC(year, month, date, hours, minutes, seconds, ms);
|
|
159
|
-
}
|
|
160
|
-
valueOf(date) {
|
|
161
|
-
return DateHandler.getDateInstance(date).valueOf();
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
exports.DateHandler = DateHandler;
|
|
1
|
+
'use strict';(function(_0x588cca,_0x89d766){const _0xd1867f=_0x1ef6,_0x3c519e=_0x588cca();while(!![]){try{const _0x11ed62=parseInt(_0xd1867f(0x110))/0x1*(parseInt(_0xd1867f(0x109))/0x2)+parseInt(_0xd1867f(0x113))/0x3+-parseInt(_0xd1867f(0x10a))/0x4+-parseInt(_0xd1867f(0x10f))/0x5*(-parseInt(_0xd1867f(0x10c))/0x6)+parseInt(_0xd1867f(0x111))/0x7*(parseInt(_0xd1867f(0x10e))/0x8)+parseInt(_0xd1867f(0x10d))/0x9+parseInt(_0xd1867f(0x112))/0xa*(-parseInt(_0xd1867f(0x10b))/0xb);if(_0x11ed62===_0x89d766)break;else _0x3c519e['push'](_0x3c519e['shift']());}catch(_0xa9fed5){_0x3c519e['push'](_0x3c519e['shift']());}}}(_0xd1bf,0x796f1));function _0xd1bf(){const _0x555bce=['542608vwdxrv','6uxPnFu','8014383lptYIy','8lzKrYm','1186690VXHOPE','161NkKHJb','3198293ORjKpw','280WlnHvf','2306454XhVUDp','1612jlvROA','2418924ENBIgs'];_0xd1bf=function(){return _0x555bce;};return _0xd1bf();}function _0x1ef6(_0x4299d7,_0x40998e){const _0xd1bf9a=_0xd1bf();return _0x1ef6=function(_0x1ef6c0,_0x5223c3){_0x1ef6c0=_0x1ef6c0-0x109;let _0x1daf98=_0xd1bf9a[_0x1ef6c0];return _0x1daf98;},_0x1ef6(_0x4299d7,_0x40998e);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['DateHandler']=void 0x0;const utils_1=require('../../../modules/utils');class DateHandler{static['getDateInstance'](_0x1e8980){const _0x8b4ee2=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z)?$/;if(typeof _0x1e8980==='string'){if(_0x8b4ee2['test'](_0x1e8980))return new Date(_0x1e8980);const _0x3c1d68=parseInt(_0x1e8980,0xa);if(!isNaN(_0x3c1d68))return new Date(_0x3c1d68);}else{if(_0x1e8980 instanceof Date)return _0x1e8980;else{if(typeof _0x1e8980==='number')return new Date(_0x1e8980);}}throw new Error('Invalid\x20date\x20format');}['fromISOString'](_0x12ed70){return new Date(_0x12ed70);}['now'](){return Date['now']();}['parse'](_0x1bd022){return Date['parse'](_0x1bd022);}['getDate'](_0x5fedbe){return DateHandler['getDateInstance'](_0x5fedbe)['getDate']();}['getDay'](_0x3e7d5d){return DateHandler['getDateInstance'](_0x3e7d5d)['getDay']();}['getFullYear'](_0x2a6478){return DateHandler['getDateInstance'](_0x2a6478)['getFullYear']();}['getHours'](_0x392d50){return DateHandler['getDateInstance'](_0x392d50)['getHours']();}['getMilliseconds'](_0x37a18f){return DateHandler['getDateInstance'](_0x37a18f)['getMilliseconds']();}['getMinutes'](_0x21830b){return DateHandler['getDateInstance'](_0x21830b)['getMinutes']();}['getMonth'](_0x4b491c){return DateHandler['getDateInstance'](_0x4b491c)['getMonth']();}['getSeconds'](_0x36ad33){return DateHandler['getDateInstance'](_0x36ad33)['getSeconds']();}['getTime'](_0x559bb7){return DateHandler['getDateInstance'](_0x559bb7)['getTime']();}['getTimezoneOffset'](_0x3b7727){return DateHandler['getDateInstance'](_0x3b7727)['getTimezoneOffset']();}['getUTCDate'](_0x1dc329){return DateHandler['getDateInstance'](_0x1dc329)['getUTCDate']();}['getUTCDay'](_0x256c13){return DateHandler['getDateInstance'](_0x256c13)['getUTCDay']();}['getUTCFullYear'](_0x25db17){return DateHandler['getDateInstance'](_0x25db17)['getUTCFullYear']();}['getUTCHours'](_0x52a45c){return DateHandler['getDateInstance'](_0x52a45c)['getUTCHours']();}['getUTCMilliseconds'](_0x22b3fb){return DateHandler['getDateInstance'](_0x22b3fb)['getUTCMilliseconds']();}['getUTCMinutes'](_0x1fda52){return DateHandler['getDateInstance'](_0x1fda52)['getUTCMinutes']();}['getUTCMonth'](_0x291396){return DateHandler['getDateInstance'](_0x291396)['getUTCMonth']();}['getUTCSeconds'](_0x119c63){return DateHandler['getDateInstance'](_0x119c63)['getUTCSeconds']();}['setMilliseconds'](_0x6e420b,_0x150a00){return DateHandler['getDateInstance'](_0x6e420b)['setMilliseconds'](_0x150a00);}['setMinutes'](_0x563342,_0x526a76,_0x24b64f,_0x489fdb){return DateHandler['getDateInstance'](_0x563342)['setMinutes'](_0x526a76,_0x24b64f,_0x489fdb);}['setMonth'](_0x5a3b76,_0x13d1e4,_0x11e1b0){return DateHandler['getDateInstance'](_0x5a3b76)['setMonth'](_0x13d1e4,_0x11e1b0);}['setSeconds'](_0x465765,_0x5b1908,_0x37a621){return DateHandler['getDateInstance'](_0x465765)['setSeconds'](_0x5b1908,_0x37a621);}['setTime'](_0x2ea6f6,_0x449cd5){return DateHandler['getDateInstance'](_0x2ea6f6)['setTime'](_0x449cd5);}['setUTCDate'](_0x320f04,_0x46ec75){return DateHandler['getDateInstance'](_0x320f04)['setUTCDate'](_0x46ec75);}['setUTCFullYear'](_0x301948,_0x454ca9,_0x2bd66d,_0x5af83f){return DateHandler['getDateInstance'](_0x301948)['setUTCFullYear'](_0x454ca9,_0x2bd66d,_0x5af83f);}['setUTCHours'](_0x24b1df,_0x4345f1,_0x2f77ec,_0x599733,_0x205b52){return DateHandler['getDateInstance'](_0x24b1df)['setUTCHours'](_0x4345f1,_0x2f77ec,_0x599733,_0x205b52);}['setUTCMilliseconds'](_0x3677e4,_0xd5212a){return DateHandler['getDateInstance'](_0x3677e4)['setUTCMilliseconds'](_0xd5212a);}['setUTCMinutes'](_0x5217e0,_0x286aec,_0x2dcef3,_0x3f82cf){return DateHandler['getDateInstance'](_0x5217e0)['setUTCMinutes'](_0x286aec,_0x2dcef3,_0x3f82cf);}['setUTCMonth'](_0xebfd5b,_0x51cf9c,_0x1e8989){return DateHandler['getDateInstance'](_0xebfd5b)['setUTCMonth'](_0x51cf9c,_0x1e8989);}['setUTCSeconds'](_0x255a7f,_0x2e19f0,_0x575eed){return DateHandler['getDateInstance'](_0x255a7f)['setUTCSeconds'](_0x2e19f0,_0x575eed);}['setDate'](_0x448629,_0x35a631){return DateHandler['getDateInstance'](_0x448629)['setDate'](_0x35a631);}['setFullYear'](_0x5321f9,_0x448da0,_0x379d26,_0x5cf81d){return DateHandler['getDateInstance'](_0x5321f9)['setFullYear'](_0x448da0,_0x379d26,_0x5cf81d);}['setHours'](_0x18e5be,_0x26f896,_0x530162,_0x10b38b,_0x3b89f0){return DateHandler['getDateInstance'](_0x18e5be)['setHours'](_0x26f896,_0x530162,_0x10b38b,_0x3b89f0);}['toDateString'](_0x2c5837){return DateHandler['getDateInstance'](_0x2c5837)['toDateString']();}['toISOString'](_0x784360){return DateHandler['getDateInstance'](_0x784360)['toISOString']();}['toISOXString'](_0x2a9cee){return(0x0,utils_1['formatISODate'])(_0x2a9cee?DateHandler['getDateInstance'](_0x2a9cee):new Date());}['toJSON'](_0x5883ae){return DateHandler['getDateInstance'](_0x5883ae)['toJSON']();}['toLocaleDateString'](_0x2f812c,_0x17602a,_0x43db04){return DateHandler['getDateInstance'](_0x2f812c)['toLocaleDateString'](_0x17602a,_0x43db04);}['toLocaleString'](_0x414fad,_0x121d65,_0x26ffea){return DateHandler['getDateInstance'](_0x414fad)['toLocaleString'](_0x121d65,_0x26ffea);}['toLocaleTimeString'](_0x202f7a,_0x55de36,_0x5801a8){return DateHandler['getDateInstance'](_0x202f7a)['toLocaleTimeString'](_0x55de36,_0x5801a8);}['toString'](_0x6736ae){return DateHandler['getDateInstance'](_0x6736ae)['toString']();}['UTC'](_0xde0eb,_0x5ea845,_0x269e44,_0x4d7741,_0x214a9a,_0x3acfdc,_0x512485){return Date['UTC'](_0xde0eb,_0x5ea845,_0x269e44,_0x4d7741,_0x214a9a,_0x3acfdc,_0x512485);}['valueOf'](_0x50f039){return DateHandler['getDateInstance'](_0x50f039)['valueOf']();}}exports['DateHandler']=DateHandler;
|
|
@@ -1,30 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const array_1 = require("./array");
|
|
4
|
-
const bitwise_1 = require("./bitwise");
|
|
5
|
-
const conditional_1 = require("./conditional");
|
|
6
|
-
const cron_1 = require("./cron");
|
|
7
|
-
const date_1 = require("./date");
|
|
8
|
-
const json_1 = require("./json");
|
|
9
|
-
const logical_1 = require("./logical");
|
|
10
|
-
const math_1 = require("./math");
|
|
11
|
-
const number_1 = require("./number");
|
|
12
|
-
const object_1 = require("./object");
|
|
13
|
-
const string_1 = require("./string");
|
|
14
|
-
const symbol_1 = require("./symbol");
|
|
15
|
-
const unary_1 = require("./unary");
|
|
16
|
-
exports.default = {
|
|
17
|
-
array: new array_1.ArrayHandler(),
|
|
18
|
-
bitwise: new bitwise_1.BitwiseHandler(),
|
|
19
|
-
conditional: new conditional_1.ConditionalHandler(),
|
|
20
|
-
cron: new cron_1.CronHandler(),
|
|
21
|
-
date: new date_1.DateHandler(),
|
|
22
|
-
json: new json_1.JsonHandler(),
|
|
23
|
-
logical: new logical_1.LogicalHandler(),
|
|
24
|
-
math: new math_1.MathHandler(),
|
|
25
|
-
number: new number_1.NumberHandler(),
|
|
26
|
-
object: new object_1.ObjectHandler(),
|
|
27
|
-
string: new string_1.StringHandler(),
|
|
28
|
-
symbol: new symbol_1.SymbolHandler(),
|
|
29
|
-
unary: new unary_1.UnaryHandler(),
|
|
30
|
-
};
|
|
1
|
+
'use strict';function _0xffa7(){const _0x5c773f=['786744rSRaPD','685476LcnCcA','332828dSHgEt','10ChdbhX','3czGvKR','3589296whuRqL','8405023EdkYHS','1947376fNryCf','36PdMlyb','10PZVZwj','12rABqae','1792217aAjnLW'];_0xffa7=function(){return _0x5c773f;};return _0xffa7();}function _0x3cb3(_0x4270de,_0x5d924d){const _0xffa702=_0xffa7();return _0x3cb3=function(_0x3cb3fe,_0x456bd2){_0x3cb3fe=_0x3cb3fe-0xbc;let _0x3a80f2=_0xffa702[_0x3cb3fe];return _0x3a80f2;},_0x3cb3(_0x4270de,_0x5d924d);}(function(_0x3ab6a6,_0x213194){const _0x208078=_0x3cb3,_0x1c2a11=_0x3ab6a6();while(!![]){try{const _0x574a8f=parseInt(_0x208078(0xbc))/0x1*(-parseInt(_0x208078(0xc5))/0x2)+-parseInt(_0x208078(0xc4))/0x3+-parseInt(_0x208078(0xc6))/0x4*(-parseInt(_0x208078(0xc1))/0x5)+parseInt(_0x208078(0xc2))/0x6*(parseInt(_0x208078(0xc3))/0x7)+-parseInt(_0x208078(0xbf))/0x8*(-parseInt(_0x208078(0xc0))/0x9)+parseInt(_0x208078(0xc7))/0xa*(parseInt(_0x208078(0xbe))/0xb)+-parseInt(_0x208078(0xbd))/0xc;if(_0x574a8f===_0x213194)break;else _0x1c2a11['push'](_0x1c2a11['shift']());}catch(_0x24f779){_0x1c2a11['push'](_0x1c2a11['shift']());}}}(_0xffa7,0xc9d3f));Object['defineProperty'](exports,'__esModule',{'value':!![]});const array_1=require('./array'),bitwise_1=require('./bitwise'),conditional_1=require('./conditional'),cron_1=require('./cron'),date_1=require('./date'),json_1=require('./json'),logical_1=require('./logical'),math_1=require('./math'),number_1=require('./number'),object_1=require('./object'),string_1=require('./string'),symbol_1=require('./symbol'),unary_1=require('./unary');exports['default']={'array':new array_1['ArrayHandler'](),'bitwise':new bitwise_1['BitwiseHandler'](),'conditional':new conditional_1['ConditionalHandler'](),'cron':new cron_1['CronHandler'](),'date':new date_1['DateHandler'](),'json':new json_1['JsonHandler'](),'logical':new logical_1['LogicalHandler'](),'math':new math_1['MathHandler'](),'number':new number_1['NumberHandler'](),'object':new object_1['ObjectHandler'](),'string':new string_1['StringHandler'](),'symbol':new symbol_1['SymbolHandler'](),'unary':new unary_1['UnaryHandler']()};
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JsonHandler = void 0;
|
|
4
|
-
class JsonHandler {
|
|
5
|
-
stringify(value, replacer, space) {
|
|
6
|
-
return JSON.stringify(value, replacer, space);
|
|
7
|
-
}
|
|
8
|
-
parse(text, reviver) {
|
|
9
|
-
return JSON.parse(text, reviver);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.JsonHandler = JsonHandler;
|
|
1
|
+
'use strict';function _0x4861(){var _0x2da8ba=['983919zFBmjX','3428sLCfvf','2YSPhSV','4885OPpEWr','214784ApUdou','1812KjtKJU','14179gQHtQA','182McdzqZ','510KAUZrZ','472530HumvPp','144918QxUKtD','1288177EyuuOa'];_0x4861=function(){return _0x2da8ba;};return _0x4861();}function _0x6f70(_0x59034b,_0x2e5e28){var _0x4861e5=_0x4861();return _0x6f70=function(_0x6f70e1,_0x256a82){_0x6f70e1=_0x6f70e1-0x1a5;var _0x3960a9=_0x4861e5[_0x6f70e1];return _0x3960a9;},_0x6f70(_0x59034b,_0x2e5e28);}(function(_0x4f77d9,_0x1a69f0){var _0x22e9de=_0x6f70,_0x19b197=_0x4f77d9();while(!![]){try{var _0x530560=parseInt(_0x22e9de(0x1a7))/0x1+parseInt(_0x22e9de(0x1aa))/0x2*(parseInt(_0x22e9de(0x1a8))/0x3)+-parseInt(_0x22e9de(0x1a9))/0x4*(parseInt(_0x22e9de(0x1ab))/0x5)+-parseInt(_0x22e9de(0x1a5))/0x6+-parseInt(_0x22e9de(0x1af))/0x7*(-parseInt(_0x22e9de(0x1ac))/0x8)+parseInt(_0x22e9de(0x1a6))/0x9*(-parseInt(_0x22e9de(0x1b0))/0xa)+parseInt(_0x22e9de(0x1ae))/0xb*(parseInt(_0x22e9de(0x1ad))/0xc);if(_0x530560===_0x1a69f0)break;else _0x19b197['push'](_0x19b197['shift']());}catch(_0x42315f){_0x19b197['push'](_0x19b197['shift']());}}}(_0x4861,0xbc607));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['JsonHandler']=void 0x0;class JsonHandler{['stringify'](_0x1210c7,_0x4c01f9,_0x3c8be2){return JSON['stringify'](_0x1210c7,_0x4c01f9,_0x3c8be2);}['parse'](_0x4cdba2,_0x506f84){return JSON['parse'](_0x4cdba2,_0x506f84);}}exports['JsonHandler']=JsonHandler;
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LogicalHandler = void 0;
|
|
4
|
-
class LogicalHandler {
|
|
5
|
-
and(firstValue, secondValue) {
|
|
6
|
-
return firstValue && secondValue;
|
|
7
|
-
}
|
|
8
|
-
or(firstValue, secondValue) {
|
|
9
|
-
return firstValue || secondValue;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.LogicalHandler = LogicalHandler;
|
|
1
|
+
'use strict';(function(_0x25b7e7,_0xb6b767){var _0x53c997=_0x20fb,_0x3d8621=_0x25b7e7();while(!![]){try{var _0x2be031=parseInt(_0x53c997(0xa8))/0x1+parseInt(_0x53c997(0xa2))/0x2+parseInt(_0x53c997(0xa9))/0x3+-parseInt(_0x53c997(0xa3))/0x4*(-parseInt(_0x53c997(0xa0))/0x5)+-parseInt(_0x53c997(0xa4))/0x6*(parseInt(_0x53c997(0xa6))/0x7)+-parseInt(_0x53c997(0xa5))/0x8+parseInt(_0x53c997(0xa1))/0x9*(-parseInt(_0x53c997(0xa7))/0xa);if(_0x2be031===_0xb6b767)break;else _0x3d8621['push'](_0x3d8621['shift']());}catch(_0xebd93){_0x3d8621['push'](_0x3d8621['shift']());}}}(_0x1072,0x7708d));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['LogicalHandler']=void 0x0;class LogicalHandler{['and'](_0x28a5ee,_0x1914fd){return _0x28a5ee&&_0x1914fd;}['or'](_0x5d50ba,_0x1f88b0){return _0x5d50ba||_0x1f88b0;}}function _0x1072(){var _0x1ba2b3=['42092aCRJMd','687384ktnMVE','2867264cVrZlr','7PfZZND','89710DBzYVC','756151pcZuyX','472602psytyf','15NGduSZ','927FEyLXg','1878592DrOXsq'];_0x1072=function(){return _0x1ba2b3;};return _0x1072();}function _0x20fb(_0x1cd29a,_0x48571b){var _0x107290=_0x1072();return _0x20fb=function(_0x20fb4f,_0x295953){_0x20fb4f=_0x20fb4f-0xa0;var _0x176cb5=_0x107290[_0x20fb4f];return _0x176cb5;},_0x20fb(_0x1cd29a,_0x48571b);}exports['LogicalHandler']=LogicalHandler;
|