@hotmeshio/hotmesh 0.3.6 → 0.3.7
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/build/index.d.ts +2 -1
- package/build/index.js +7 -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/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 +15 -1
- package/package.json +12 -8
- 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(_0x17a384,_0x3b1091){var _0x597734=_0x2b02,_0x5a5191=_0x17a384();while(!![]){try{var _0x451548=-parseInt(_0x597734(0x79))/0x1*(-parseInt(_0x597734(0x70))/0x2)+parseInt(_0x597734(0x74))/0x3+parseInt(_0x597734(0x76))/0x4*(-parseInt(_0x597734(0x73))/0x5)+-parseInt(_0x597734(0x71))/0x6*(-parseInt(_0x597734(0x78))/0x7)+parseInt(_0x597734(0x75))/0x8+-parseInt(_0x597734(0x72))/0x9+-parseInt(_0x597734(0x77))/0xa;if(_0x451548===_0x3b1091)break;else _0x5a5191['push'](_0x5a5191['shift']());}catch(_0x51ad17){_0x5a5191['push'](_0x5a5191['shift']());}}}(_0x540a,0x5a44d));function _0x540a(){var _0x551157=['11523510zkFhxW','3234AvBNao','1SbPzbX','1432022BvlhxG','6372aBwLYZ','2010663swGMln','2657485hyyFkc','1904154VAeEGX','3484984ZdvBIR','4OrXbmI'];_0x540a=function(){return _0x551157;};return _0x540a();}function _0x2b02(_0x801366,_0x4b9932){var _0x540a41=_0x540a();return _0x2b02=function(_0x2b0287,_0xe1990d){_0x2b0287=_0x2b0287-0x70;var _0x20ec0c=_0x540a41[_0x2b0287];return _0x20ec0c;},_0x2b02(_0x801366,_0x4b9932);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ArrayHandler']=void 0x0;class ArrayHandler{['get'](_0x278dcf,_0x42c078){return _0x278dcf?.[_0x42c078||0x0];}['length'](_0x5a9c43){return _0x5a9c43?.['length'];}['concat'](_0x15d350,_0x528f87){return _0x15d350['concat'](_0x528f87);}['indexOf'](_0x225458,_0x356253,_0x8f050c){return _0x225458['indexOf'](_0x356253,_0x8f050c);}['join'](_0x145756,_0x521206){return _0x145756['join'](_0x521206);}['lastIndexOf'](_0x3a6303,_0x152b37,_0x45cb42){return _0x3a6303['lastIndexOf'](_0x152b37,_0x45cb42);}['pop'](_0x358c5e){return _0x358c5e['pop']();}['push'](_0x2554b3,..._0x2461d7){return _0x2554b3['push'](..._0x2461d7),_0x2554b3;}['reverse'](_0x5f2001){return _0x5f2001['reverse']();}['shift'](_0x26555d){return _0x26555d['shift']();}['slice'](_0x574307,_0x1080b4,_0x5a7849){return _0x574307['slice'](_0x1080b4,_0x5a7849);}['sort'](_0x8a69c2,_0x59917c='ASCENDING'){return _0x8a69c2['sort']((_0x2478c0,_0xd3adf)=>{if(_0x59917c==='ASCENDING'){if(_0x2478c0===_0xd3adf)return 0x0;if(_0x2478c0===null||_0x2478c0===undefined)return-0x1;if(_0xd3adf===null||_0xd3adf===undefined)return 0x1;if(typeof _0x2478c0==='string'&&typeof _0xd3adf==='string')return _0x2478c0['localeCompare'](_0xd3adf);return _0x2478c0<_0xd3adf?-0x1:0x1;}else{if(_0x2478c0===_0xd3adf)return 0x0;if(_0x2478c0===null||_0x2478c0===undefined)return 0x1;if(_0xd3adf===null||_0xd3adf===undefined)return-0x1;if(typeof _0x2478c0==='string'&&typeof _0xd3adf==='string')return _0xd3adf['localeCompare'](_0x2478c0);return _0x2478c0>_0xd3adf?-0x1:0x1;}});}['splice'](_0x29ada1,_0x1c903f,_0x2436fa,..._0x35addb){return _0x29ada1['splice'](_0x1c903f,_0x2436fa,..._0x35addb);}['unshift'](_0x46c625,..._0x420f1b){return _0x46c625['unshift'](..._0x420f1b);}}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(_0x5ca6de,_0x17d006){var _0x2eae5c=_0xb48d,_0x480534=_0x5ca6de();while(!![]){try{var _0x24ea60=parseInt(_0x2eae5c(0x1e6))/0x1+parseInt(_0x2eae5c(0x1e8))/0x2+-parseInt(_0x2eae5c(0x1e5))/0x3+parseInt(_0x2eae5c(0x1ec))/0x4*(parseInt(_0x2eae5c(0x1ed))/0x5)+-parseInt(_0x2eae5c(0x1eb))/0x6*(parseInt(_0x2eae5c(0x1e4))/0x7)+parseInt(_0x2eae5c(0x1e7))/0x8*(parseInt(_0x2eae5c(0x1ea))/0x9)+-parseInt(_0x2eae5c(0x1e9))/0xa;if(_0x24ea60===_0x17d006)break;else _0x480534['push'](_0x480534['shift']());}catch(_0x3dc43b){_0x480534['push'](_0x480534['shift']());}}}(_0xfbd1,0xddcfc));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['BitwiseHandler']=void 0x0;class BitwiseHandler{['and'](_0x3ec81f,_0x2a830d){return _0x3ec81f&_0x2a830d;}['or'](_0x4a0d07,_0x3cfd4c){return _0x4a0d07|_0x3cfd4c;}['xor'](_0x5b269a,_0x3c3208){return _0x5b269a^_0x3c3208;}['leftShift'](_0x42e3e8,_0x449570){return _0x42e3e8<<_0x449570;}['rightShift'](_0x5dc7ec,_0x2e051c){return _0x5dc7ec>>_0x2e051c;}['unsignedRightShift'](_0x1354b9,_0x48644d){return _0x1354b9>>>_0x48644d;}}function _0xb48d(_0x33afe6,_0x1205cb){var _0xfbd16d=_0xfbd1();return _0xb48d=function(_0xb48da1,_0x55029a){_0xb48da1=_0xb48da1-0x1e4;var _0x1bac66=_0xfbd16d[_0xb48da1];return _0x1bac66;},_0xb48d(_0x33afe6,_0x1205cb);}function _0xfbd1(){var _0x53d230=['2785596gpachP','397892AwvZjC','844072OmXJfe','2000716LJqyiN','10837130DbYQZc','9Xjuwdi','6SUBhrI','20qbrkAM','1429655CdIVGv','88403aGplTc'];_0xfbd1=function(){return _0x53d230;};return _0xfbd1();}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(_0x53c9a9,_0x4695aa){var _0x7cd8ab=_0x4f30,_0x358f42=_0x53c9a9();while(!![]){try{var _0xcf9d8a=parseInt(_0x7cd8ab(0xe0))/0x1+parseInt(_0x7cd8ab(0xde))/0x2*(parseInt(_0x7cd8ab(0xdd))/0x3)+parseInt(_0x7cd8ab(0xdc))/0x4*(parseInt(_0x7cd8ab(0xe2))/0x5)+-parseInt(_0x7cd8ab(0xda))/0x6+parseInt(_0x7cd8ab(0xdb))/0x7+-parseInt(_0x7cd8ab(0xdf))/0x8*(parseInt(_0x7cd8ab(0xd9))/0x9)+parseInt(_0x7cd8ab(0xe1))/0xa*(parseInt(_0x7cd8ab(0xd8))/0xb);if(_0xcf9d8a===_0x4695aa)break;else _0x358f42['push'](_0x358f42['shift']());}catch(_0x28d6ff){_0x358f42['push'](_0x358f42['shift']());}}}(_0x447d,0xe1f0b));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ConditionalHandler']=void 0x0;function _0x4f30(_0xeb2886,_0x4eb332){var _0x447d13=_0x447d();return _0x4f30=function(_0x4f30e2,_0xc0832d){_0x4f30e2=_0x4f30e2-0xd8;var _0x3ddbdb=_0x447d13[_0x4f30e2];return _0x3ddbdb;},_0x4f30(_0xeb2886,_0x4eb332);}class ConditionalHandler{['ternary'](_0x346c6d,_0x4fa364,_0x507afb){return _0x346c6d?_0x4fa364:_0x507afb;}['equality'](_0x24e0ed,_0x5bd373){return _0x24e0ed==_0x5bd373;}['strict_equality'](_0x383abc,_0x138d92){return _0x383abc===_0x138d92;}['inequality'](_0x138d2a,_0x249438){return _0x138d2a!=_0x249438;}['strict_inequality'](_0x3cff6a,_0x3fdad6){return _0x3cff6a!==_0x3fdad6;}['greater_than'](_0x18ccb4,_0x27fec8){return _0x18ccb4>_0x27fec8;}['less_than'](_0x1a05bd,_0x526e93){return _0x1a05bd<_0x526e93;}['greater_than_or_equal'](_0x1c15b0,_0x361ad8){return _0x1c15b0>=_0x361ad8;}['less_than_or_equal'](_0x506582,_0x25c638){return _0x506582<=_0x25c638;}['nullish'](_0x1a1466,_0x10c685){return _0x1a1466??_0x10c685;}}function _0x447d(){var _0x173d73=['2239538tYKOeW','128396oDCyjt','28317fxIjyV','74pnHQNS','8gHxJxc','304808cZvDYF','4249320wROAVe','70nKuwMU','33WSseCZ','13900959tLuZzm','1368990bwxsxo'];_0x447d=function(){return _0x173d73;};return _0x447d();}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(_0x5292b6,_0x2e3641){const _0x4fbcd0=_0x53f8,_0x343bfe=_0x5292b6();while(!![]){try{const _0x351395=-parseInt(_0x4fbcd0(0x66))/0x1*(parseInt(_0x4fbcd0(0x6c))/0x2)+-parseInt(_0x4fbcd0(0x67))/0x3+parseInt(_0x4fbcd0(0x68))/0x4+-parseInt(_0x4fbcd0(0x69))/0x5+-parseInt(_0x4fbcd0(0x6b))/0x6*(-parseInt(_0x4fbcd0(0x64))/0x7)+-parseInt(_0x4fbcd0(0x6a))/0x8+parseInt(_0x4fbcd0(0x65))/0x9;if(_0x351395===_0x2e3641)break;else _0x343bfe['push'](_0x343bfe['shift']());}catch(_0x1552fd){_0x343bfe['push'](_0x343bfe['shift']());}}}(_0x33e3,0xcafde));function _0x53f8(_0x37629d,_0x918d72){const _0x33e37f=_0x33e3();return _0x53f8=function(_0x53f80f,_0x28ee91){_0x53f80f=_0x53f80f-0x64;let _0x53b259=_0x33e37f[_0x53f80f];return _0x53b259;},_0x53f8(_0x37629d,_0x918d72);}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');function _0x33e3(){const _0x1a5ab3=['6903770MhbINO','1777864ndJplT','12pDkglR','860bYBGSm','931378JTmEqc','23366106tEvaAw','2644Anhlxa','1768953PjgouF','5194680HVfPrn'];_0x33e3=function(){return _0x1a5ab3;};return _0x33e3();}class CronHandler{['nextDelay'](_0x1333fb){try{if(!(0x0,utils_1['isValidCron'])(_0x1333fb))return-0x1;const _0x58f29b=(0x0,cron_parser_1['parseExpression'])(_0x1333fb,{'utc':!![]}),_0x1a9b3d=_0x58f29b['next']()['toDate'](),_0x5823cf=new Date(),_0x215bb6=(_0x1a9b3d['getTime']()-_0x5823cf['getTime']())/0x3e8;if(_0x215bb6<=0x0)return-0x1;if(_0x215bb6<enums_1['HMSH_FIDELITY_SECONDS'])return enums_1['HMSH_FIDELITY_SECONDS'];const _0x1a2b03=Math['round'](_0x215bb6);return _0x1a2b03;}catch(_0x49f214){return console['error']('Error\x20calculating\x20next\x20cron\x20job\x20execution\x20\x20delay:',_0x49f214),-0x1;}}}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(_0x205c2f,_0x22f2fa){const _0x3090a9=_0x4e73,_0x43538c=_0x205c2f();while(!![]){try{const _0x53ac26=-parseInt(_0x3090a9(0xd5))/0x1*(-parseInt(_0x3090a9(0xd9))/0x2)+parseInt(_0x3090a9(0xd6))/0x3+parseInt(_0x3090a9(0xda))/0x4*(-parseInt(_0x3090a9(0xdc))/0x5)+-parseInt(_0x3090a9(0xd3))/0x6*(-parseInt(_0x3090a9(0xd8))/0x7)+parseInt(_0x3090a9(0xd7))/0x8+parseInt(_0x3090a9(0xdb))/0x9+-parseInt(_0x3090a9(0xd4))/0xa;if(_0x53ac26===_0x22f2fa)break;else _0x43538c['push'](_0x43538c['shift']());}catch(_0x34abef){_0x43538c['push'](_0x43538c['shift']());}}}(_0x29c0,0xa72e6));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['DateHandler']=void 0x0;function _0x4e73(_0x4bbbc0,_0x50722a){const _0x29c006=_0x29c0();return _0x4e73=function(_0x4e73ac,_0x2bc240){_0x4e73ac=_0x4e73ac-0xd3;let _0x55e6b3=_0x29c006[_0x4e73ac];return _0x55e6b3;},_0x4e73(_0x4bbbc0,_0x50722a);}const utils_1=require('../../../modules/utils');class DateHandler{static['getDateInstance'](_0x19ca8b){const _0x1d8da9=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z)?$/;if(typeof _0x19ca8b==='string'){if(_0x1d8da9['test'](_0x19ca8b))return new Date(_0x19ca8b);const _0x403e87=parseInt(_0x19ca8b,0xa);if(!isNaN(_0x403e87))return new Date(_0x403e87);}else{if(_0x19ca8b instanceof Date)return _0x19ca8b;else{if(typeof _0x19ca8b==='number')return new Date(_0x19ca8b);}}throw new Error('Invalid\x20date\x20format');}['fromISOString'](_0x5209cb){return new Date(_0x5209cb);}['now'](){return Date['now']();}['parse'](_0x4057a1){return Date['parse'](_0x4057a1);}['getDate'](_0x116ce5){return DateHandler['getDateInstance'](_0x116ce5)['getDate']();}['getDay'](_0x30eef3){return DateHandler['getDateInstance'](_0x30eef3)['getDay']();}['getFullYear'](_0x130d8d){return DateHandler['getDateInstance'](_0x130d8d)['getFullYear']();}['getHours'](_0x4ef0e4){return DateHandler['getDateInstance'](_0x4ef0e4)['getHours']();}['getMilliseconds'](_0x3f835e){return DateHandler['getDateInstance'](_0x3f835e)['getMilliseconds']();}['getMinutes'](_0x38a891){return DateHandler['getDateInstance'](_0x38a891)['getMinutes']();}['getMonth'](_0x5a547b){return DateHandler['getDateInstance'](_0x5a547b)['getMonth']();}['getSeconds'](_0x3a2869){return DateHandler['getDateInstance'](_0x3a2869)['getSeconds']();}['getTime'](_0xcf1138){return DateHandler['getDateInstance'](_0xcf1138)['getTime']();}['getTimezoneOffset'](_0xacb725){return DateHandler['getDateInstance'](_0xacb725)['getTimezoneOffset']();}['getUTCDate'](_0x1f9da8){return DateHandler['getDateInstance'](_0x1f9da8)['getUTCDate']();}['getUTCDay'](_0x2b10d4){return DateHandler['getDateInstance'](_0x2b10d4)['getUTCDay']();}['getUTCFullYear'](_0x4dd704){return DateHandler['getDateInstance'](_0x4dd704)['getUTCFullYear']();}['getUTCHours'](_0x5559f5){return DateHandler['getDateInstance'](_0x5559f5)['getUTCHours']();}['getUTCMilliseconds'](_0x19d0af){return DateHandler['getDateInstance'](_0x19d0af)['getUTCMilliseconds']();}['getUTCMinutes'](_0x513179){return DateHandler['getDateInstance'](_0x513179)['getUTCMinutes']();}['getUTCMonth'](_0x7f6305){return DateHandler['getDateInstance'](_0x7f6305)['getUTCMonth']();}['getUTCSeconds'](_0xe9fe6f){return DateHandler['getDateInstance'](_0xe9fe6f)['getUTCSeconds']();}['setMilliseconds'](_0x322c6b,_0x7f8194){return DateHandler['getDateInstance'](_0x322c6b)['setMilliseconds'](_0x7f8194);}['setMinutes'](_0x2c0b2d,_0x5be892,_0x1cba16,_0x4dfb9b){return DateHandler['getDateInstance'](_0x2c0b2d)['setMinutes'](_0x5be892,_0x1cba16,_0x4dfb9b);}['setMonth'](_0x4ee886,_0x7535e6,_0x424d02){return DateHandler['getDateInstance'](_0x4ee886)['setMonth'](_0x7535e6,_0x424d02);}['setSeconds'](_0x4804be,_0x3e03c3,_0x5447ba){return DateHandler['getDateInstance'](_0x4804be)['setSeconds'](_0x3e03c3,_0x5447ba);}['setTime'](_0x431549,_0x1f28df){return DateHandler['getDateInstance'](_0x431549)['setTime'](_0x1f28df);}['setUTCDate'](_0x2c7f93,_0x19c64b){return DateHandler['getDateInstance'](_0x2c7f93)['setUTCDate'](_0x19c64b);}['setUTCFullYear'](_0x1596d6,_0x36d420,_0x5ccb7f,_0x51225f){return DateHandler['getDateInstance'](_0x1596d6)['setUTCFullYear'](_0x36d420,_0x5ccb7f,_0x51225f);}['setUTCHours'](_0x4d2595,_0x46d43d,_0x50999a,_0x493b7a,_0x487927){return DateHandler['getDateInstance'](_0x4d2595)['setUTCHours'](_0x46d43d,_0x50999a,_0x493b7a,_0x487927);}['setUTCMilliseconds'](_0x37d7fc,_0x55d05a){return DateHandler['getDateInstance'](_0x37d7fc)['setUTCMilliseconds'](_0x55d05a);}['setUTCMinutes'](_0x3f5da0,_0x5e59f3,_0x3f907d,_0x29c37a){return DateHandler['getDateInstance'](_0x3f5da0)['setUTCMinutes'](_0x5e59f3,_0x3f907d,_0x29c37a);}['setUTCMonth'](_0x1ec00a,_0x57940f,_0x567edc){return DateHandler['getDateInstance'](_0x1ec00a)['setUTCMonth'](_0x57940f,_0x567edc);}['setUTCSeconds'](_0x45d039,_0x563b09,_0x5e98ec){return DateHandler['getDateInstance'](_0x45d039)['setUTCSeconds'](_0x563b09,_0x5e98ec);}['setDate'](_0x5e490c,_0x17e0f7){return DateHandler['getDateInstance'](_0x5e490c)['setDate'](_0x17e0f7);}['setFullYear'](_0x4b1933,_0x32c0c2,_0x29bbd4,_0xc3b294){return DateHandler['getDateInstance'](_0x4b1933)['setFullYear'](_0x32c0c2,_0x29bbd4,_0xc3b294);}['setHours'](_0x4717b1,_0xd96fb,_0x40a696,_0x1b8e4d,_0x4de78e){return DateHandler['getDateInstance'](_0x4717b1)['setHours'](_0xd96fb,_0x40a696,_0x1b8e4d,_0x4de78e);}['toDateString'](_0x3f7f81){return DateHandler['getDateInstance'](_0x3f7f81)['toDateString']();}['toISOString'](_0x5eb1ca){return DateHandler['getDateInstance'](_0x5eb1ca)['toISOString']();}['toISOXString'](_0x3e4c80){return(0x0,utils_1['formatISODate'])(_0x3e4c80?DateHandler['getDateInstance'](_0x3e4c80):new Date());}['toJSON'](_0x967954){return DateHandler['getDateInstance'](_0x967954)['toJSON']();}['toLocaleDateString'](_0x110fd7,_0x4bf468,_0x4ab719){return DateHandler['getDateInstance'](_0x110fd7)['toLocaleDateString'](_0x4bf468,_0x4ab719);}['toLocaleString'](_0x47a4df,_0xc903a0,_0x448d14){return DateHandler['getDateInstance'](_0x47a4df)['toLocaleString'](_0xc903a0,_0x448d14);}['toLocaleTimeString'](_0x51728e,_0x5b6779,_0x177336){return DateHandler['getDateInstance'](_0x51728e)['toLocaleTimeString'](_0x5b6779,_0x177336);}['toString'](_0x145708){return DateHandler['getDateInstance'](_0x145708)['toString']();}['UTC'](_0x4cb87c,_0x5d71cd,_0x527476,_0x826488,_0x20d6fc,_0x54bd58,_0x58eb3e){return Date['UTC'](_0x4cb87c,_0x5d71cd,_0x527476,_0x826488,_0x20d6fc,_0x54bd58,_0x58eb3e);}['valueOf'](_0x2579e7){return DateHandler['getDateInstance'](_0x2579e7)['valueOf']();}}exports['DateHandler']=DateHandler;function _0x29c0(){const _0x345545=['12948400wWZNih','1VIOznO','865848BwdHnd','3499448IReXSj','1342859SRUQpS','2140690LuAQyA','840ZcIGLN','6385302VvSsAk','21665TrDrLC','12faEWSz'];_0x29c0=function(){return _0x345545;};return _0x29c0();}
|
|
@@ -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 _0x4d3f(){const _0x50de51=['12bXFWqF','51390eNlMRl','87299UhWyQa','10EEdbUY','898058jokwLV','341637iAWjcl','573177GtUzUK','4975688eFbnzB','196UgHTjZ','348KmVOdz','9cNrzCN','2760190KZlyNm'];_0x4d3f=function(){return _0x50de51;};return _0x4d3f();}(function(_0x3eaf8e,_0x27c737){const _0x104b8e=_0x29ef,_0x5729d0=_0x3eaf8e();while(!![]){try{const _0x349775=-parseInt(_0x104b8e(0x168))/0x1+parseInt(_0x104b8e(0x169))/0x2*(-parseInt(_0x104b8e(0x16b))/0x3)+-parseInt(_0x104b8e(0x162))/0x4*(parseInt(_0x104b8e(0x167))/0x5)+parseInt(_0x104b8e(0x166))/0x6*(-parseInt(_0x104b8e(0x16a))/0x7)+parseInt(_0x104b8e(0x161))/0x8+-parseInt(_0x104b8e(0x164))/0x9*(parseInt(_0x104b8e(0x165))/0xa)+-parseInt(_0x104b8e(0x16c))/0xb*(-parseInt(_0x104b8e(0x163))/0xc);if(_0x349775===_0x27c737)break;else _0x5729d0['push'](_0x5729d0['shift']());}catch(_0x39f057){_0x5729d0['push'](_0x5729d0['shift']());}}}(_0x4d3f,0x6b74d));function _0x29ef(_0xde987,_0x21f799){const _0x4d3f7b=_0x4d3f();return _0x29ef=function(_0x29ef68,_0xb13c23){_0x29ef68=_0x29ef68-0x161;let _0x4dc55b=_0x4d3f7b[_0x29ef68];return _0x4dc55b;},_0x29ef(_0xde987,_0x21f799);}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(_0x505e95,_0x2c961d){var _0x3faf95=_0x49a9,_0x4de243=_0x505e95();while(!![]){try{var _0x265a6=-parseInt(_0x3faf95(0xdf))/0x1*(parseInt(_0x3faf95(0xd6))/0x2)+-parseInt(_0x3faf95(0xd8))/0x3+parseInt(_0x3faf95(0xda))/0x4+parseInt(_0x3faf95(0xdc))/0x5*(parseInt(_0x3faf95(0xde))/0x6)+parseInt(_0x3faf95(0xe0))/0x7*(-parseInt(_0x3faf95(0xd7))/0x8)+parseInt(_0x3faf95(0xdb))/0x9+parseInt(_0x3faf95(0xdd))/0xa*(parseInt(_0x3faf95(0xd9))/0xb);if(_0x265a6===_0x2c961d)break;else _0x4de243['push'](_0x4de243['shift']());}catch(_0xa9be00){_0x4de243['push'](_0x4de243['shift']());}}}(_0x1b22,0x59bea));function _0x49a9(_0x25cf19,_0xfd66b2){var _0x1b220b=_0x1b22();return _0x49a9=function(_0x49a9c0,_0x4fb07a){_0x49a9c0=_0x49a9c0-0xd6;var _0xa9feb4=_0x1b220b[_0x49a9c0];return _0xa9feb4;},_0x49a9(_0x25cf19,_0xfd66b2);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['JsonHandler']=void 0x0;function _0x1b22(){var _0x165b95=['34806eSJCDh','3792607flDvAt','6pjesGl','8FOCGjg','1416156EKynkF','558118AjYQFA','2747740mNwQkz','3707622DUYghw','1681170GSvgdP','10muxtra','6wjCXUv'];_0x1b22=function(){return _0x165b95;};return _0x1b22();}class JsonHandler{['stringify'](_0x32b2ba,_0x41f567,_0x519e3f){return JSON['stringify'](_0x32b2ba,_0x41f567,_0x519e3f);}['parse'](_0x1dd392,_0x113bd5){return JSON['parse'](_0x1dd392,_0x113bd5);}}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(_0x4bd4a0,_0x839d83){var _0x18ad7b=_0x26b9,_0x2ce63d=_0x4bd4a0();while(!![]){try{var _0x2d3e6b=parseInt(_0x18ad7b(0x13d))/0x1*(parseInt(_0x18ad7b(0x144))/0x2)+-parseInt(_0x18ad7b(0x13f))/0x3*(parseInt(_0x18ad7b(0x141))/0x4)+-parseInt(_0x18ad7b(0x13c))/0x5*(-parseInt(_0x18ad7b(0x143))/0x6)+-parseInt(_0x18ad7b(0x13a))/0x7+-parseInt(_0x18ad7b(0x13e))/0x8*(-parseInt(_0x18ad7b(0x13b))/0x9)+-parseInt(_0x18ad7b(0x140))/0xa+parseInt(_0x18ad7b(0x142))/0xb;if(_0x2d3e6b===_0x839d83)break;else _0x2ce63d['push'](_0x2ce63d['shift']());}catch(_0x2b7fda){_0x2ce63d['push'](_0x2ce63d['shift']());}}}(_0x1b67,0x48c2b));function _0x1b67(){var _0x18d69c=['2119636oAgGlS','7935444LYLIws','54JdSvoi','156ZZAyjL','2262659YGgpXb','1638FzEENq','179390HbOxCB','4639JjJgdi','12480AgRSdt','3PgLDBh','5388950FbUsSi'];_0x1b67=function(){return _0x18d69c;};return _0x1b67();}function _0x26b9(_0x2b6584,_0x3ab3c6){var _0x1b6783=_0x1b67();return _0x26b9=function(_0x26b99a,_0x139af9){_0x26b99a=_0x26b99a-0x13a;var _0x2ff1f7=_0x1b6783[_0x26b99a];return _0x2ff1f7;},_0x26b9(_0x2b6584,_0x3ab3c6);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['LogicalHandler']=void 0x0;class LogicalHandler{['and'](_0x24635c,_0x27c292){return _0x24635c&&_0x27c292;}['or'](_0x4358ad,_0x2c674c){return _0x4358ad||_0x2c674c;}}exports['LogicalHandler']=LogicalHandler;
|