@hotmeshio/hotmesh 0.3.31 → 0.4.0
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 +128 -823
- package/build/index.d.ts +9 -9
- package/build/index.js +10 -10
- package/build/package.json +22 -21
- package/build/types/error.d.ts +5 -5
- package/build/types/exporter.d.ts +1 -1
- package/build/types/index.d.ts +3 -3
- package/build/types/manifest.d.ts +2 -2
- package/build/types/{meshflow.d.ts → memflow.d.ts} +15 -15
- package/build/types/meshdata.d.ts +3 -3
- package/build/types/postgres.d.ts +7 -0
- package/build/types/stream.d.ts +3 -0
- package/index.ts +11 -11
- package/package.json +22 -21
- package/typedoc.json +8 -7
- package/types/error.ts +5 -5
- package/types/exporter.ts +1 -1
- package/types/index.ts +7 -7
- package/types/manifest.ts +2 -2
- package/types/{meshflow.ts → memflow.ts} +15 -15
- package/types/meshdata.ts +3 -3
- package/types/postgres.ts +9 -0
- package/types/stream.ts +4 -0
- package/build/modules/enums.d.ts +0 -108
- package/build/modules/enums.js +0 -132
- package/build/modules/errors.d.ts +0 -124
- package/build/modules/errors.js +0 -191
- package/build/modules/key.d.ts +0 -66
- package/build/modules/key.js +0 -1
- package/build/modules/storage.d.ts +0 -3
- package/build/modules/storage.js +0 -5
- package/build/modules/utils.d.ts +0 -119
- package/build/modules/utils.js +0 -1
- package/build/services/activities/activity.d.ts +0 -104
- package/build/services/activities/activity.js +0 -1
- package/build/services/activities/await.d.ts +0 -12
- package/build/services/activities/await.js +0 -1
- package/build/services/activities/cycle.d.ts +0 -19
- package/build/services/activities/cycle.js +0 -1
- package/build/services/activities/hook.d.ts +0 -27
- package/build/services/activities/hook.js +0 -1
- package/build/services/activities/index.d.ts +0 -19
- package/build/services/activities/index.js +0 -1
- package/build/services/activities/interrupt.d.ts +0 -16
- package/build/services/activities/interrupt.js +0 -1
- package/build/services/activities/signal.d.ts +0 -20
- package/build/services/activities/signal.js +0 -1
- package/build/services/activities/trigger.d.ts +0 -37
- package/build/services/activities/trigger.js +0 -1
- package/build/services/activities/worker.d.ts +0 -12
- package/build/services/activities/worker.js +0 -1
- package/build/services/collator/index.d.ts +0 -111
- package/build/services/collator/index.js +0 -1
- package/build/services/compiler/deployer.d.ts +0 -40
- package/build/services/compiler/deployer.js +0 -1
- package/build/services/compiler/index.d.ts +0 -32
- package/build/services/compiler/index.js +0 -1
- package/build/services/compiler/validator.d.ts +0 -34
- package/build/services/compiler/validator.js +0 -1
- package/build/services/connector/factory.d.ts +0 -22
- package/build/services/connector/factory.js +0 -99
- package/build/services/connector/index.d.ts +0 -30
- package/build/services/connector/index.js +0 -54
- package/build/services/connector/providers/ioredis.d.ts +0 -9
- package/build/services/connector/providers/ioredis.js +0 -26
- package/build/services/connector/providers/nats.d.ts +0 -9
- package/build/services/connector/providers/nats.js +0 -34
- package/build/services/connector/providers/postgres.d.ts +0 -20
- package/build/services/connector/providers/postgres.js +0 -102
- package/build/services/connector/providers/redis.d.ts +0 -9
- package/build/services/connector/providers/redis.js +0 -38
- package/build/services/engine/index.d.ts +0 -264
- package/build/services/engine/index.js +0 -1
- package/build/services/exporter/index.d.ts +0 -44
- package/build/services/exporter/index.js +0 -1
- package/build/services/hotmesh/index.d.ts +0 -340
- package/build/services/hotmesh/index.js +0 -479
- package/build/services/logger/index.d.ts +0 -16
- package/build/services/logger/index.js +0 -54
- package/build/services/mapper/index.d.ts +0 -28
- package/build/services/mapper/index.js +0 -1
- package/build/services/meshcall/index.d.ts +0 -194
- package/build/services/meshcall/index.js +0 -452
- package/build/services/meshcall/schemas/factory.d.ts +0 -9
- package/build/services/meshcall/schemas/factory.js +0 -189
- package/build/services/meshdata/index.d.ts +0 -795
- package/build/services/meshdata/index.js +0 -1235
- package/build/services/meshflow/client.d.ts +0 -108
- package/build/services/meshflow/client.js +0 -371
- package/build/services/meshflow/connection.d.ts +0 -23
- package/build/services/meshflow/connection.js +0 -33
- package/build/services/meshflow/exporter.d.ts +0 -51
- package/build/services/meshflow/exporter.js +0 -1
- package/build/services/meshflow/handle.d.ts +0 -90
- package/build/services/meshflow/handle.js +0 -176
- package/build/services/meshflow/index.d.ts +0 -111
- package/build/services/meshflow/index.js +0 -117
- package/build/services/meshflow/schemas/factory.d.ts +0 -29
- package/build/services/meshflow/schemas/factory.js +0 -2492
- package/build/services/meshflow/search.d.ts +0 -142
- package/build/services/meshflow/search.js +0 -320
- package/build/services/meshflow/worker.d.ts +0 -124
- package/build/services/meshflow/worker.js +0 -514
- package/build/services/meshflow/workflow/all.d.ts +0 -7
- package/build/services/meshflow/workflow/all.js +0 -15
- package/build/services/meshflow/workflow/common.d.ts +0 -18
- package/build/services/meshflow/workflow/common.js +0 -45
- package/build/services/meshflow/workflow/context.d.ts +0 -6
- package/build/services/meshflow/workflow/context.js +0 -45
- package/build/services/meshflow/workflow/didRun.d.ts +0 -7
- package/build/services/meshflow/workflow/didRun.js +0 -22
- package/build/services/meshflow/workflow/emit.d.ts +0 -11
- package/build/services/meshflow/workflow/emit.js +0 -29
- package/build/services/meshflow/workflow/enrich.d.ts +0 -9
- package/build/services/meshflow/workflow/enrich.js +0 -17
- package/build/services/meshflow/workflow/execChild.d.ts +0 -18
- package/build/services/meshflow/workflow/execChild.js +0 -102
- package/build/services/meshflow/workflow/hook.d.ts +0 -9
- package/build/services/meshflow/workflow/hook.js +0 -40
- package/build/services/meshflow/workflow/index.d.ts +0 -70
- package/build/services/meshflow/workflow/index.js +0 -83
- package/build/services/meshflow/workflow/interrupt.d.ts +0 -9
- package/build/services/meshflow/workflow/interrupt.js +0 -24
- package/build/services/meshflow/workflow/isSideEffectAllowed.d.ts +0 -10
- package/build/services/meshflow/workflow/isSideEffectAllowed.js +0 -33
- package/build/services/meshflow/workflow/proxyActivities.d.ts +0 -20
- package/build/services/meshflow/workflow/proxyActivities.js +0 -97
- package/build/services/meshflow/workflow/random.d.ts +0 -6
- package/build/services/meshflow/workflow/random.js +0 -16
- package/build/services/meshflow/workflow/searchMethods.d.ts +0 -6
- package/build/services/meshflow/workflow/searchMethods.js +0 -25
- package/build/services/meshflow/workflow/signal.d.ts +0 -7
- package/build/services/meshflow/workflow/signal.js +0 -28
- package/build/services/meshflow/workflow/sleepFor.d.ts +0 -8
- package/build/services/meshflow/workflow/sleepFor.js +0 -35
- package/build/services/meshflow/workflow/trace.d.ts +0 -14
- package/build/services/meshflow/workflow/trace.js +0 -33
- package/build/services/meshflow/workflow/waitFor.d.ts +0 -8
- package/build/services/meshflow/workflow/waitFor.js +0 -35
- package/build/services/meshos/index.d.ts +0 -293
- package/build/services/meshos/index.js +0 -547
- package/build/services/pipe/functions/array.d.ts +0 -17
- package/build/services/pipe/functions/array.js +0 -1
- package/build/services/pipe/functions/bitwise.d.ts +0 -9
- package/build/services/pipe/functions/bitwise.js +0 -1
- package/build/services/pipe/functions/conditional.d.ts +0 -13
- package/build/services/pipe/functions/conditional.js +0 -1
- package/build/services/pipe/functions/cron.d.ts +0 -12
- package/build/services/pipe/functions/cron.js +0 -1
- package/build/services/pipe/functions/date.d.ts +0 -58
- package/build/services/pipe/functions/date.js +0 -1
- package/build/services/pipe/functions/index.d.ts +0 -29
- package/build/services/pipe/functions/index.js +0 -1
- package/build/services/pipe/functions/json.d.ts +0 -5
- package/build/services/pipe/functions/json.js +0 -1
- package/build/services/pipe/functions/logical.d.ts +0 -5
- package/build/services/pipe/functions/logical.js +0 -1
- package/build/services/pipe/functions/math.d.ts +0 -42
- package/build/services/pipe/functions/math.js +0 -1
- package/build/services/pipe/functions/number.d.ts +0 -21
- package/build/services/pipe/functions/number.js +0 -1
- package/build/services/pipe/functions/object.d.ts +0 -25
- package/build/services/pipe/functions/object.js +0 -1
- package/build/services/pipe/functions/string.d.ts +0 -23
- package/build/services/pipe/functions/string.js +0 -1
- package/build/services/pipe/functions/symbol.d.ts +0 -12
- package/build/services/pipe/functions/symbol.js +0 -1
- package/build/services/pipe/functions/unary.d.ts +0 -7
- package/build/services/pipe/functions/unary.js +0 -1
- package/build/services/pipe/index.d.ts +0 -48
- package/build/services/pipe/index.js +0 -1
- package/build/services/quorum/index.d.ts +0 -90
- package/build/services/quorum/index.js +0 -1
- package/build/services/reporter/index.d.ts +0 -50
- package/build/services/reporter/index.js +0 -1
- package/build/services/router/index.d.ts +0 -60
- package/build/services/router/index.js +0 -1
- package/build/services/search/factory.d.ts +0 -7
- package/build/services/search/factory.js +0 -24
- package/build/services/search/index.d.ts +0 -22
- package/build/services/search/index.js +0 -10
- package/build/services/search/providers/postgres/postgres.d.ts +0 -24
- package/build/services/search/providers/postgres/postgres.js +0 -1
- package/build/services/search/providers/redis/ioredis.d.ts +0 -18
- package/build/services/search/providers/redis/ioredis.js +0 -1
- package/build/services/search/providers/redis/redis.d.ts +0 -18
- package/build/services/search/providers/redis/redis.js +0 -1
- package/build/services/serializer/index.d.ts +0 -42
- package/build/services/serializer/index.js +0 -1
- package/build/services/store/cache.d.ts +0 -67
- package/build/services/store/cache.js +0 -128
- package/build/services/store/factory.d.ts +0 -8
- package/build/services/store/factory.js +0 -24
- package/build/services/store/index.d.ts +0 -89
- package/build/services/store/index.js +0 -9
- package/build/services/store/providers/postgres/kvsql.d.ts +0 -168
- package/build/services/store/providers/postgres/kvsql.js +0 -1
- package/build/services/store/providers/postgres/kvtables.d.ts +0 -20
- package/build/services/store/providers/postgres/kvtables.js +0 -1
- package/build/services/store/providers/postgres/kvtransaction.d.ts +0 -36
- package/build/services/store/providers/postgres/kvtransaction.js +0 -1
- package/build/services/store/providers/postgres/kvtypes/hash.d.ts +0 -60
- package/build/services/store/providers/postgres/kvtypes/hash.js +0 -1
- package/build/services/store/providers/postgres/kvtypes/list.d.ts +0 -33
- package/build/services/store/providers/postgres/kvtypes/list.js +0 -1
- package/build/services/store/providers/postgres/kvtypes/string.d.ts +0 -20
- package/build/services/store/providers/postgres/kvtypes/string.js +0 -1
- package/build/services/store/providers/postgres/kvtypes/zset.d.ts +0 -41
- package/build/services/store/providers/postgres/kvtypes/zset.js +0 -1
- package/build/services/store/providers/postgres/postgres.d.ts +0 -145
- package/build/services/store/providers/postgres/postgres.js +0 -1
- package/build/services/store/providers/redis/_base.d.ts +0 -137
- package/build/services/store/providers/redis/_base.js +0 -1
- package/build/services/store/providers/redis/ioredis.d.ts +0 -20
- package/build/services/store/providers/redis/ioredis.js +0 -1
- package/build/services/store/providers/redis/redis.d.ts +0 -18
- package/build/services/store/providers/redis/redis.js +0 -1
- package/build/services/store/providers/store-initializable.d.ts +0 -5
- package/build/services/store/providers/store-initializable.js +0 -1
- package/build/services/stream/factory.d.ts +0 -8
- package/build/services/stream/factory.js +0 -37
- package/build/services/stream/index.d.ts +0 -64
- package/build/services/stream/index.js +0 -11
- package/build/services/stream/providers/nats/nats.d.ts +0 -59
- package/build/services/stream/providers/nats/nats.js +0 -1
- package/build/services/stream/providers/postgres/kvtables.d.ts +0 -2
- package/build/services/stream/providers/postgres/kvtables.js +0 -1
- package/build/services/stream/providers/postgres/postgres.d.ts +0 -88
- package/build/services/stream/providers/postgres/postgres.js +0 -1
- package/build/services/stream/providers/redis/ioredis.d.ts +0 -60
- package/build/services/stream/providers/redis/ioredis.js +0 -1
- package/build/services/stream/providers/redis/redis.d.ts +0 -60
- package/build/services/stream/providers/redis/redis.js +0 -1
- package/build/services/stream/providers/stream-initializable.d.ts +0 -4
- package/build/services/stream/providers/stream-initializable.js +0 -1
- package/build/services/sub/factory.d.ts +0 -7
- package/build/services/sub/factory.js +0 -29
- package/build/services/sub/index.d.ts +0 -22
- package/build/services/sub/index.js +0 -10
- package/build/services/sub/providers/nats/nats.d.ts +0 -19
- package/build/services/sub/providers/nats/nats.js +0 -1
- package/build/services/sub/providers/postgres/postgres.d.ts +0 -19
- package/build/services/sub/providers/postgres/postgres.js +0 -1
- package/build/services/sub/providers/redis/ioredis.d.ts +0 -17
- package/build/services/sub/providers/redis/ioredis.js +0 -1
- package/build/services/sub/providers/redis/redis.d.ts +0 -17
- package/build/services/sub/providers/redis/redis.js +0 -1
- package/build/services/task/index.d.ts +0 -36
- package/build/services/task/index.js +0 -1
- package/build/services/telemetry/index.d.ts +0 -52
- package/build/services/telemetry/index.js +0 -1
- package/build/services/worker/index.d.ts +0 -77
- package/build/services/worker/index.js +0 -1
- /package/build/types/{meshflow.js → memflow.js} +0 -0
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { Await } from '../activities/await';
|
|
2
|
-
import { Cycle } from '../activities/cycle';
|
|
3
|
-
import { Hook } from '../activities/hook';
|
|
4
|
-
import { Interrupt } from '../activities/interrupt';
|
|
5
|
-
import { Signal } from '../activities/signal';
|
|
6
|
-
import { Worker } from '../activities/worker';
|
|
7
|
-
import { Trigger } from '../activities/trigger';
|
|
8
|
-
import { ExporterService } from '../exporter';
|
|
9
|
-
import { ILogger } from '../logger';
|
|
10
|
-
import { Router } from '../router';
|
|
11
|
-
import { SearchService } from '../search';
|
|
12
|
-
import { StoreService } from '../store';
|
|
13
|
-
import { StreamService } from '../stream';
|
|
14
|
-
import { SubService } from '../sub';
|
|
15
|
-
import { TaskService } from '../task';
|
|
16
|
-
import { AppVID } from '../../types/app';
|
|
17
|
-
import { ActivityType } from '../../types/activity';
|
|
18
|
-
import { CacheMode } from '../../types/cache';
|
|
19
|
-
import { JobExport } from '../../types/exporter';
|
|
20
|
-
import { JobState, JobData, JobMetadata, JobOutput, JobStatus, JobInterruptOptions, JobCompletionOptions, ExtensionType } from '../../types/job';
|
|
21
|
-
import { HotMeshApps, HotMeshConfig, HotMeshManifest, HotMeshSettings } from '../../types/hotmesh';
|
|
22
|
-
import { ProviderClient, ProviderTransaction } from '../../types/provider';
|
|
23
|
-
import { JobMessageCallback } from '../../types/quorum';
|
|
24
|
-
import { StringAnyType, StringStringType } from '../../types/serializer';
|
|
25
|
-
import { GetStatsOptions, IdsResponse, JobStatsInput, StatsResponse } from '../../types/stats';
|
|
26
|
-
import { StreamCode, StreamData, StreamDataResponse, StreamError, StreamStatus } from '../../types/stream';
|
|
27
|
-
import { WorkListTaskType } from '../../types/task';
|
|
28
|
-
declare class EngineService {
|
|
29
|
-
namespace: string;
|
|
30
|
-
apps: HotMeshApps | null;
|
|
31
|
-
appId: string;
|
|
32
|
-
guid: string;
|
|
33
|
-
exporter: ExporterService | null;
|
|
34
|
-
search: SearchService<ProviderClient> | null;
|
|
35
|
-
store: StoreService<ProviderClient, ProviderTransaction> | null;
|
|
36
|
-
stream: StreamService<ProviderClient, ProviderTransaction> | null;
|
|
37
|
-
subscribe: SubService<ProviderClient> | null;
|
|
38
|
-
router: Router<typeof this.stream> | null;
|
|
39
|
-
taskService: TaskService | null;
|
|
40
|
-
logger: ILogger;
|
|
41
|
-
cacheMode: CacheMode;
|
|
42
|
-
untilVersion: string | null;
|
|
43
|
-
jobCallbacks: Record<string, JobMessageCallback>;
|
|
44
|
-
reporting: boolean;
|
|
45
|
-
jobId: number;
|
|
46
|
-
inited: string;
|
|
47
|
-
/**
|
|
48
|
-
* @private
|
|
49
|
-
*/
|
|
50
|
-
constructor();
|
|
51
|
-
/**
|
|
52
|
-
* @private
|
|
53
|
-
*/
|
|
54
|
-
static init(namespace: string, appId: string, guid: string, config: HotMeshConfig, logger: ILogger): Promise<EngineService>;
|
|
55
|
-
/**
|
|
56
|
-
* @private
|
|
57
|
-
*/
|
|
58
|
-
verifyEngineFields(config: HotMeshConfig): void;
|
|
59
|
-
/**
|
|
60
|
-
* @private
|
|
61
|
-
*/
|
|
62
|
-
initSearchChannel(search: ProviderClient, store?: ProviderClient): Promise<void>;
|
|
63
|
-
/**
|
|
64
|
-
* @private
|
|
65
|
-
*/
|
|
66
|
-
initStoreChannel(store: ProviderClient): Promise<void>;
|
|
67
|
-
/**
|
|
68
|
-
* @private
|
|
69
|
-
*/
|
|
70
|
-
initSubChannel(sub: ProviderClient, store: ProviderClient): Promise<void>;
|
|
71
|
-
/**
|
|
72
|
-
* @private
|
|
73
|
-
*/
|
|
74
|
-
initStreamChannel(stream: ProviderClient, store: ProviderClient): Promise<void>;
|
|
75
|
-
/**
|
|
76
|
-
* @private
|
|
77
|
-
*/
|
|
78
|
-
initRouter(config: HotMeshConfig): Promise<Router<StreamService<ProviderClient, ProviderTransaction>>>;
|
|
79
|
-
/**
|
|
80
|
-
* resolves the distributed executable version using a delay
|
|
81
|
-
* to allow deployment race conditions to resolve
|
|
82
|
-
* @private
|
|
83
|
-
*/
|
|
84
|
-
fetchAndVerifyVID(vid: AppVID, count?: number): Promise<AppVID>;
|
|
85
|
-
getVID(vid?: AppVID): Promise<AppVID>;
|
|
86
|
-
/**
|
|
87
|
-
* @private
|
|
88
|
-
*/
|
|
89
|
-
setCacheMode(cacheMode: CacheMode, untilVersion: string): void;
|
|
90
|
-
/**
|
|
91
|
-
* @private
|
|
92
|
-
*/
|
|
93
|
-
routeToSubscribers(topic: string, message: JobOutput): Promise<void>;
|
|
94
|
-
/**
|
|
95
|
-
* @private
|
|
96
|
-
*/
|
|
97
|
-
processWebHooks(): Promise<void>;
|
|
98
|
-
/**
|
|
99
|
-
* @private
|
|
100
|
-
*/
|
|
101
|
-
processTimeHooks(): Promise<void>;
|
|
102
|
-
/**
|
|
103
|
-
* @private
|
|
104
|
-
*/
|
|
105
|
-
throttle(delayInMillis: number): Promise<void>;
|
|
106
|
-
/**
|
|
107
|
-
* @private
|
|
108
|
-
*/
|
|
109
|
-
initActivity(topic: string, data?: JobData, context?: JobState): Promise<Await | Cycle | Hook | Signal | Trigger | Worker | Interrupt>;
|
|
110
|
-
getSchema(topic: string): Promise<[activityId: string, schema: ActivityType]>;
|
|
111
|
-
/**
|
|
112
|
-
* @private
|
|
113
|
-
*/
|
|
114
|
-
getSettings(): Promise<HotMeshSettings>;
|
|
115
|
-
/**
|
|
116
|
-
* @private
|
|
117
|
-
*/
|
|
118
|
-
isPrivate(topic: string): boolean;
|
|
119
|
-
/**
|
|
120
|
-
* @private
|
|
121
|
-
*/
|
|
122
|
-
plan(pathOrYAML: string): Promise<HotMeshManifest>;
|
|
123
|
-
/**
|
|
124
|
-
* @private
|
|
125
|
-
*/
|
|
126
|
-
deploy(pathOrYAML: string): Promise<HotMeshManifest>;
|
|
127
|
-
/**
|
|
128
|
-
* @private
|
|
129
|
-
*/
|
|
130
|
-
getStats(topic: string, query: JobStatsInput): Promise<StatsResponse>;
|
|
131
|
-
/**
|
|
132
|
-
* @private
|
|
133
|
-
*/
|
|
134
|
-
getIds(topic: string, query: JobStatsInput, queryFacets?: any[]): Promise<IdsResponse>;
|
|
135
|
-
/**
|
|
136
|
-
* @private
|
|
137
|
-
*/
|
|
138
|
-
resolveQuery(topic: string, query: JobStatsInput): Promise<GetStatsOptions>;
|
|
139
|
-
/**
|
|
140
|
-
* @private
|
|
141
|
-
*/
|
|
142
|
-
processStreamMessage(streamData: StreamDataResponse): Promise<void>;
|
|
143
|
-
/**
|
|
144
|
-
* @private
|
|
145
|
-
*/
|
|
146
|
-
execAdjacentParent(context: JobState, jobOutput: JobOutput, emit?: boolean): Promise<string>;
|
|
147
|
-
/**
|
|
148
|
-
* @private
|
|
149
|
-
*/
|
|
150
|
-
hasParentJob(context: JobState, checkSevered?: boolean): boolean;
|
|
151
|
-
/**
|
|
152
|
-
* @private
|
|
153
|
-
*/
|
|
154
|
-
resolveError(metadata: JobMetadata): StreamError | undefined;
|
|
155
|
-
/**
|
|
156
|
-
* @private
|
|
157
|
-
*/
|
|
158
|
-
interrupt(topic: string, jobId: string, options?: JobInterruptOptions): Promise<string>;
|
|
159
|
-
/**
|
|
160
|
-
* @private
|
|
161
|
-
*/
|
|
162
|
-
scrub(jobId: string): Promise<void>;
|
|
163
|
-
/**
|
|
164
|
-
* @private
|
|
165
|
-
*/
|
|
166
|
-
hook(topic: string, data: JobData, status?: StreamStatus, code?: StreamCode): Promise<string>;
|
|
167
|
-
/**
|
|
168
|
-
* @private
|
|
169
|
-
*/
|
|
170
|
-
hookTime(jobId: string, gId: string, topicOrActivity: string, type?: WorkListTaskType): Promise<string | void>;
|
|
171
|
-
/**
|
|
172
|
-
* @private
|
|
173
|
-
*/
|
|
174
|
-
hookAll(hookTopic: string, data: JobData, keyResolver: JobStatsInput, queryFacets?: string[]): Promise<string[]>;
|
|
175
|
-
/**
|
|
176
|
-
* @private
|
|
177
|
-
*/
|
|
178
|
-
pub(topic: string, data: JobData, context?: JobState, extended?: ExtensionType): Promise<string>;
|
|
179
|
-
/**
|
|
180
|
-
* @private
|
|
181
|
-
*/
|
|
182
|
-
sub(topic: string, callback: JobMessageCallback): Promise<void>;
|
|
183
|
-
/**
|
|
184
|
-
* @private
|
|
185
|
-
*/
|
|
186
|
-
unsub(topic: string): Promise<void>;
|
|
187
|
-
/**
|
|
188
|
-
* @private
|
|
189
|
-
*/
|
|
190
|
-
psub(wild: string, callback: JobMessageCallback): Promise<void>;
|
|
191
|
-
/**
|
|
192
|
-
* @private
|
|
193
|
-
*/
|
|
194
|
-
punsub(wild: string): Promise<void>;
|
|
195
|
-
/**
|
|
196
|
-
* @private
|
|
197
|
-
*/
|
|
198
|
-
pubsub(topic: string, data: JobData, context?: JobState | null, timeout?: number): Promise<JobOutput>;
|
|
199
|
-
/**
|
|
200
|
-
* @private
|
|
201
|
-
*/
|
|
202
|
-
pubOneTimeSubs(context: JobState, jobOutput: JobOutput, emit?: boolean): Promise<void>;
|
|
203
|
-
/**
|
|
204
|
-
* @private
|
|
205
|
-
*/
|
|
206
|
-
getPublishesTopic(context: JobState): Promise<string>;
|
|
207
|
-
/**
|
|
208
|
-
* @private
|
|
209
|
-
*/
|
|
210
|
-
pubPermSubs(context: JobState, jobOutput: JobOutput, emit?: boolean): Promise<void>;
|
|
211
|
-
/**
|
|
212
|
-
* @private
|
|
213
|
-
*/
|
|
214
|
-
add(streamData: StreamData | StreamDataResponse): Promise<string>;
|
|
215
|
-
/**
|
|
216
|
-
* @private
|
|
217
|
-
*/
|
|
218
|
-
registerJobCallback(jobId: string, jobCallback: JobMessageCallback): void;
|
|
219
|
-
/**
|
|
220
|
-
* @private
|
|
221
|
-
*/
|
|
222
|
-
delistJobCallback(jobId: string): void;
|
|
223
|
-
/**
|
|
224
|
-
* @private
|
|
225
|
-
*/
|
|
226
|
-
hasOneTimeSubscription(context: JobState): boolean;
|
|
227
|
-
/**
|
|
228
|
-
* @private
|
|
229
|
-
*/
|
|
230
|
-
runJobCompletionTasks(context: JobState, options?: JobCompletionOptions): Promise<string | void>;
|
|
231
|
-
/**
|
|
232
|
-
* Job hash expiration is typically reliant on the metadata field
|
|
233
|
-
* if the activity concludes normally. However, if the job is `interrupted`,
|
|
234
|
-
* it will be expired immediately.
|
|
235
|
-
* @private
|
|
236
|
-
*/
|
|
237
|
-
resolveExpires(context: JobState, options: JobCompletionOptions): number;
|
|
238
|
-
/**
|
|
239
|
-
* @private
|
|
240
|
-
*/
|
|
241
|
-
export(jobId: string): Promise<JobExport>;
|
|
242
|
-
/**
|
|
243
|
-
* @private
|
|
244
|
-
*/
|
|
245
|
-
getRaw(jobId: string): Promise<StringStringType>;
|
|
246
|
-
/**
|
|
247
|
-
* @private
|
|
248
|
-
*/
|
|
249
|
-
getStatus(jobId: string): Promise<JobStatus>;
|
|
250
|
-
/**
|
|
251
|
-
* @private
|
|
252
|
-
*/
|
|
253
|
-
getState(topic: string, jobId: string): Promise<JobOutput>;
|
|
254
|
-
/**
|
|
255
|
-
* @private
|
|
256
|
-
*/
|
|
257
|
-
getQueryState(jobId: string, fields: string[]): Promise<StringAnyType>;
|
|
258
|
-
/**
|
|
259
|
-
* @private
|
|
260
|
-
* @deprecated
|
|
261
|
-
*/
|
|
262
|
-
compress(terms: string[]): Promise<boolean>;
|
|
263
|
-
}
|
|
264
|
-
export { EngineService };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';function a(){const ax=['engine-throttle-error','1907195KehDPM','HMSH_CODE_PENDING','hookAll','../router','getHookRule','plan','routeToSubscribers','977490RFANpG','export','output','SearchServiceFactory','Router','inited','pubOneTimeSubs','descend','topic','hasOneTimeSubscription','engine','parse','jobId','processWebHookEvent','../../modules/utils','reclaimDelay','err','RESULT','ngn','cacheMode','sub','subscribe','registerJobForCleanup','StoreServiceFactory','createInputContext','processWebHooks','StreamRole','getStatus','getSubscriptionTopic','resolveQuery','getRaw','code','getSubscription','initRouter','error','resolveJobKey','execAdjacentParent','engine-process','HMSH_CODE_SUCCESS','unsub','addSymbolValues','process','hookTime','../activities','psubscribe','emit','75Akdkus','KeyType','untilVersion','pubsub','AWAIT','stream','end','verifyEngineFields','3606505wUDmOx','taskService','data','namespace','gid','store','info','../compiler','trc','punsub','init','registerJobCallback','jobCallbacks','WEBHOOK','661293aDljCR','tpc','getWorkItems','getPublishesTopic','resolveError','getStats','runJobCompletionTasks','initActivity','dad','cache','StreamDataType','fetchAndVerifyVID','1494542HOWkEo','HMSH_OTT_WAIT_TIME','await','identifyProvider','initStoreChannel','type','pubPermSubs','not\x20found\x20','../stream/factory','target','consumeMessages','QUORUM','VALSEP','getSymbols','getSettings','CompilerService','sparse','isPrivate','deploy','aid','HMSH_EXPIRE_JOB_SECONDS','HMSH_QUORUM_DELAY_MS','unable\x20to\x20process\x20activity\x20for\x20topic\x20','STREAMS','418908ISGEFL','getQueryState','logger','guid','StreamStatus','bind','readonly','$self','spn','exporter','expire','apps','TIMEHOOK','job','length','processStreamMessage','setCacheMode','16sXjcmR','../serializer','keys','getThrottleRate','interrupt','processTimeHookEvent','__importDefault','ENGINE','range','../task','publishMessage','formatISODate','processEvent','../search/factory','pow','appId','reclaimCount','engine-executable-cache','no\x20app\x20found\x20for\x20id\x20','hook','initSearchChannel','unsubscribe','enqueueWorkItems','__esModule','getSymbolValues','l1s','../store/factory','stack','stringify','split','getIds','initSubChannel','join','\x20in\x20app\x20','status','until','50884RBmPPO','getState','version','publish','engine\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields.','router','jid','publishes','../exporter','sleepFor','metadata','work','SUCCESS','start','activity\x20type\x20','reporting','scrub','delistJobCallback','ExporterService','StreamServiceFactory','TaskService','getVID','unable\x20to\x20find\x20hook\x20rule\x20for\x20topic\x20','resolveGranularity','getSchema','EngineService','now','toString','SubServiceFactory','map','engine-vid-resolution-error','timeout','hasParentJob','startsWith','ReporterService','restoreHierarchy','subtype','../../types/stream','getApp','debug'];a=function(){return ax;};return a();}const y=b;(function(c,d){const x=b,e=c();while(!![]){try{const f=-parseInt(x(0x14e))/0x1+parseInt(x(0x136))/0x2+parseInt(x(0x114))/0x3*(-parseInt(x(0xb6))/0x4)+-parseInt(x(0xdf))/0x5+parseInt(x(0xe6))/0x6+parseInt(x(0x11c))/0x7+parseInt(x(0x15f))/0x8*(parseInt(x(0x12a))/0x9);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x6ed5f));var __importDefault=this&&this[y(0x165)]||function(c){const z=y;return c&&c[z(0x176)]?c:{'default':c};};function b(c,d){const e=a();return b=function(f,g){f=f-0xac;let h=e[f];return h;},b(c,d);}Object['defineProperty'](exports,'__esModule',{'value':!0x0}),exports['EngineService']=void 0x0;const key_1=require('../../modules/key'),enums_1=require('../../modules/enums'),utils_1=require(y(0xf4)),activities_1=__importDefault(require(y(0x111))),compiler_1=require(y(0x123)),exporter_1=require(y(0xbe)),reporter_1=require('../reporter'),router_1=require(y(0xe2)),serializer_1=require(y(0x160)),factory_1=require(y(0x16c)),factory_2=require(y(0xac)),factory_3=require(y(0x13e)),factory_4=require('../sub/factory'),task_1=require(y(0x168)),stream_1=require(y(0xdb));class EngineService{constructor(){const A=y;this['cacheMode']=A(0x133),this[A(0x116)]=null,this['jobCallbacks']={},this[A(0xc5)]=!0x1,this[A(0xf2)]=0x1;}static async[y(0x126)](c,d,f,g,h){const B=y;if(g[B(0xf0)]){const j=new EngineService();j[B(0x11b)](g),j[B(0x11f)]=c,j[B(0x16e)]=d,j[B(0x151)]=f,j[B(0x150)]=h,await j['initSearchChannel'](g['engine']['store']),await j[B(0x13a)](g[B(0xf0)][B(0x121)]),await j[B(0xb1)](g[B(0xf0)][B(0xfa)],g[B(0xf0)]['pub']??g[B(0xf0)][B(0x121)]),await j['initStreamChannel'](g[B(0xf0)]['stream'],g[B(0xf0)][B(0x121)]),j[B(0xbb)]=await j[B(0x107)](g);const k=j[B(0x121)]['mintKey'](key_1[B(0x115)][B(0x14d)],{'appId':j[B(0x16e)]});return j[B(0xbb)][B(0x140)](k,B(0x166),j['guid'],j[B(0x15d)][B(0x153)](j)),j['taskService']=new task_1[(B(0xca))](j[B(0x121)],h),j[B(0x157)]=new exporter_1[(B(0xc8))](j[B(0x16e)],j['store'],h),j[B(0xeb)]=(0x0,utils_1[B(0x16a)])(new Date()),j;}}['verifyEngineFields'](c){const C=y;if(!(0x0,utils_1['identifyProvider'])(c[C(0xf0)][C(0x121)])||!(0x0,utils_1[C(0x139)])(c[C(0xf0)]['stream'])||!(0x0,utils_1[C(0x139)])(c['engine']['sub']))throw new Error(C(0xba));}async[y(0x173)](c,d){const D=y;this['search']=await factory_1[D(0xe9)]['init'](c,d,this[D(0x11f)],this['appId'],this[D(0x150)]);}async['initStoreChannel'](c){const E=y;this[E(0x121)]=await factory_2[E(0xfd)]['init'](c,this[E(0x11f)],this['appId'],this[E(0x150)]);}async[y(0xb1)](c,d){const F=y;this[F(0xfb)]=await factory_4[F(0xd2)]['init'](c,d,this[F(0x11f)],this[F(0x16e)],this['guid'],this[F(0x150)]);}async['initStreamChannel'](c,d){const G=y;this[G(0x119)]=await factory_3[G(0xc9)][G(0x126)](c,d,this[G(0x11f)],this[G(0x16e)],this['logger']);}async['initRouter'](c){const H=y,d=await this[H(0x121)][H(0x162)](':');return new router_1[(H(0xea))]({'namespace':this[H(0x11f)],'appId':this[H(0x16e)],'guid':this['guid'],'role':stream_1[H(0x100)][H(0x166)],'reclaimDelay':c[H(0xf0)][H(0xf5)],'reclaimCount':c[H(0xf0)][H(0x16f)],'throttle':d,'readonly':c[H(0xf0)][H(0x154)]},this['stream'],this[H(0x150)]);}async[y(0x135)](c,d=0x0){const I=y;if(isNaN(Number(c['version']))){const f=await this[I(0x121)][I(0xdc)](c['id'],!0x0);if(!isNaN(Number(f[I(0xb8)])))return this['apps']||(this['apps']={}),this[I(0x159)][c['id']]=f,{'id':c['id'],'version':f[I(0xb8)]};if(d<0xa)return await(0x0,utils_1[I(0xbf)])(0x2*enums_1[I(0x14b)]),await this[I(0x135)](c,d+0x1);this[I(0x150)][I(0x108)](I(0xd4),{'id':c['id'],'guid':this[I(0x151)]});}return c;}async[y(0xcb)](c){const J=y;if('nocache'===this[J(0xf9)]){const d=await this['store'][J(0xdc)](this[J(0x16e)],!0x0);return d[J(0xb8)][J(0xd1)]()===this['untilVersion'][J(0xd1)]()&&(this['apps']||(this[J(0x159)]={}),this['apps'][this[J(0x16e)]]=d,this[J(0x15e)]('cache',d['version'][J(0xd1)]())),{'id':this['appId'],'version':d['version']};}return!this[J(0x159)]&&c?(this[J(0x159)]={},this[J(0x159)][this[J(0x16e)]]=c,c):await this[J(0x135)]({'id':this['appId'],'version':this[J(0x159)]?.[this[J(0x16e)]][J(0xb8)]});}['setCacheMode'](c,d){const K=y;this[K(0x150)][K(0x122)](K(0x170),{'mode':c,[K(0x133)===c?K(0x13f):K(0xb5)]:d}),this['cacheMode']=c,this[K(0x116)]=d;}async[y(0xe5)](c,d){const L=y,f=this['jobCallbacks'][d[L(0xc0)][L(0xbc)]];f&&(this['delistJobCallback'](d[L(0xc0)][L(0xbc)]),f(c,d));}async[y(0xff)](){const M=y;this[M(0x11d)][M(0xff)](this[M(0x172)]['bind'](this));}async['processTimeHooks'](){const N=y;this[N(0x11d)]['processTimeHooks'](this[N(0x110)][N(0x153)](this));}async['throttle'](c){const O=y;try{this[O(0xbb)]?.['setThrottle'](c);}catch(d){this[O(0x150)]['error'](O(0xde),{'error':d});}}async[y(0x131)](c,d={},f){const P=y,[g,h]=await this[P(0xce)](c),j=activities_1['default'][h['type']];if(j){const k=(0x0,utils_1[P(0x16a)])(new Date());return new j(h,d,{'aid':g,'atp':h[P(0x13b)],'stp':h[P(0xda)],'ac':k,'au':k},null,this,f);}throw new Error(P(0xc4)+h[P(0x13b)]+'\x20not\x20found');}async[y(0xce)](c){const Q=y,d=await this[Q(0x121)][Q(0xdc)](this[Q(0x16e)]);if(!d)throw new Error(Q(0x171)+this['appId']);if(this[Q(0x147)](c)){const f=c['substring'](0x1);return[f,await this['store'][Q(0xce)](f,await this['getVID'](d))];}{const g=await this[Q(0x121)][Q(0x106)](c,await this[Q(0xcb)](d));if(g)return[g,await this[Q(0x121)][Q(0xce)](g,await this[Q(0xcb)](d))];}throw new Error('no\x20subscription\x20found\x20for\x20topic\x20'+c+Q(0xb3)+this[Q(0x16e)]+'\x20for\x20app\x20version\x20'+d[Q(0xb8)]);}async['getSettings'](){const R=y;return await this[R(0x121)][R(0x144)]();}[y(0x147)](c){const S=y;return c[S(0xd7)]('.');}async[y(0xe4)](c){const T=y,d=new compiler_1['CompilerService'](this[T(0x121)],this[T(0x119)],this[T(0x150)]);return await d[T(0xe4)](c);}async[y(0x148)](c){const U=y,d=new compiler_1[(U(0x145))](this[U(0x121)],this['stream'],this['logger']);return await d['deploy'](c);}async[y(0x12f)](c,d){const V=y,{id:f,version:g}=await this['getVID'](),h=new reporter_1[(V(0xd8))]({'id':f,'version':g},this['store'],this[V(0x150)]),j=await this[V(0x103)](c,d);return await h[V(0x12f)](j);}async['getIds'](c,d,f=[]){const W=y,{id:g,version:h}=await this[W(0xcb)](),j=new reporter_1[(W(0xd8))]({'id':g,'version':h},this[W(0x121)],this[W(0x150)]),k=await this[W(0x103)](c,d);return await j[W(0xb0)](k,f);}async[y(0x103)](c,d){const X=y,f=await this[X(0x131)](c,d[X(0x11e)]);return await f[X(0xb7)](),{'end':d[X(0x11a)],'start':d[X(0xc3)],'range':d[X(0x167)],'granularity':f[X(0xcd)](),'key':f[X(0x109)](f[X(0xfe)]()),'sparse':d[X(0x146)]};}async[y(0x15d)](c){const Y=y;this[Y(0x150)][Y(0xdd)](Y(0x10b),{'jid':c[Y(0xc0)][Y(0xbc)],'gid':c[Y(0xc0)][Y(0x120)],'dad':c['metadata'][Y(0x132)],'aid':c['metadata'][Y(0x149)],'status':c[Y(0xb4)]||stream_1[Y(0x152)]['SUCCESS'],'code':c[Y(0x105)]||0xc8,'type':c[Y(0x13b)]});const d={'metadata':{'guid':c[Y(0xc0)][Y(0x151)],'jid':c['metadata'][Y(0xbc)],'gid':c[Y(0xc0)][Y(0x120)],'dad':c[Y(0xc0)][Y(0x132)],'aid':c[Y(0xc0)]['aid']},'data':c['data']};if(c[Y(0x13b)]===stream_1[Y(0x134)][Y(0x15a)]){const f=await this[Y(0x131)]('.'+c[Y(0xc0)][Y(0x149)],d[Y(0x11e)],d);await f[Y(0x164)](c[Y(0xc0)][Y(0xbc)]);}else{if(c[Y(0x13b)]===stream_1[Y(0x134)][Y(0x129)]){const g=await this['initActivity']('.'+c[Y(0xc0)][Y(0x149)],d[Y(0x11e)],d);await g[Y(0xf3)](c[Y(0xb4)],c[Y(0x105)]);}else{if(c[Y(0x13b)]===stream_1[Y(0x134)]['TRANSITION']){const h=await this[Y(0x131)]('.'+c['metadata']['aid'],d[Y(0x11e)],d);await h[Y(0x10f)]();}else{if(c['type']===stream_1[Y(0x134)][Y(0x118)]){d[Y(0xc0)]={...d[Y(0xc0)],'pj':c['metadata'][Y(0xbc)],'pg':c[Y(0xc0)]['gid'],'pd':c[Y(0xc0)][Y(0x132)],'pa':c[Y(0xc0)][Y(0x149)],'px':!0x1===c['metadata'][Y(0x138)],'trc':c[Y(0xc0)]['trc'],'spn':c[Y(0xc0)][Y(0x156)]};const i=await this['initActivity'](c[Y(0xc0)][Y(0xee)],c['data'],d);await i[Y(0x10f)]();}else{if(c['type']===stream_1[Y(0x134)][Y(0xf7)]){const j=await this[Y(0x131)]('.'+d['metadata'][Y(0x149)],c['data'],d);await j[Y(0x16b)](c[Y(0xb4)],c['code']);}else{const k=await this['initActivity']('.'+c['metadata'][Y(0x149)],c[Y(0x11e)],d);await k[Y(0x16b)](c[Y(0xb4)],c[Y(0x105)],Y(0xe8));}}}}}this[Y(0x150)]['debug']('engine-process-end',{'jid':c[Y(0xc0)][Y(0xbc)],'gid':c[Y(0xc0)][Y(0x120)],'aid':c[Y(0xc0)][Y(0x149)]});}async[y(0x10a)](c,d,f=!0x1){const Z=y;if(this[Z(0xd6)](c)){const g=this[Z(0x12e)](d[Z(0xc0)]),h=c[Z(0x155)]?.[Z(0xe8)]?.[Z(0xc0)]?.['l2s']||c[Z(0x155)]?.[Z(0xe8)]?.[Z(0xc0)]?.[Z(0x178)],j={'metadata':{'guid':(0x0,utils_1[Z(0x151)])(),'jid':c[Z(0xc0)]['pj'],'gid':c[Z(0xc0)]['pg'],'dad':c['metadata']['pd'],'aid':c[Z(0xc0)]['pa'],'trc':c[Z(0xc0)]['trc'],'spn':h},'type':stream_1['StreamDataType'][Z(0xf7)],'data':d[Z(0x11e)]};return g&&g[Z(0x105)]?(j['status']=stream_1['StreamStatus']['ERROR'],j['data']=g,j['code']=g['code'],j[Z(0xad)]=g['stack']):f?(j[Z(0xb4)]=stream_1[Z(0x152)]['PENDING'],j[Z(0x105)]=enums_1[Z(0xe0)]):(j[Z(0xb4)]=stream_1[Z(0x152)][Z(0xc2)],j[Z(0x105)]=enums_1[Z(0x10c)]),await this[Z(0xbb)]?.[Z(0x169)](null,j);}}[y(0xd6)](c,d=!0x1){const a0=y;return d?Boolean(c['metadata']['pj']&&c[a0(0xc0)]['pa']&&!c[a0(0xc0)]['px']):Boolean(c[a0(0xc0)]['pj']&&c['metadata']['pa']);}[y(0x12e)](c){const a1=y;if(c&&c['err'])return JSON[a1(0xf1)](c[a1(0xf6)]);}async['interrupt'](c,d,f={}){const a2=y;await this[a2(0x121)][a2(0x163)](c,d,f);const g=await this[a2(0xb7)](c,d),h={'interrupt':f[a2(0xed)],'expire':f['expire']};return await this[a2(0x130)](g,h);}async[y(0xc6)](c){const a3=y;await this[a3(0x121)][a3(0xc6)](c);}async[y(0x172)](c,d,f=stream_1[y(0x152)][y(0xc2)],g=0xc8){const a4=y,h=await this['taskService'][a4(0xe3)](c),[j]=await this[a4(0xce)]('.'+h['to']),k={'type':stream_1['StreamDataType'][a4(0x129)],'status':f,'code':g,'metadata':{'guid':(0x0,utils_1[a4(0x151)])(),'aid':j,'topic':c},'data':d};return await this[a4(0xbb)]?.[a4(0x169)](null,k);}async[y(0x110)](c,d,f,g){const a5=y;if(a5(0x163)===g||a5(0x158)===g)return await this['interrupt'](f,c,{'suppress':!0x0,'expire':0x1});const [h,...j]=f[a5(0xaf)](','),k=','+j[a5(0xb2)](','),l={'type':stream_1[a5(0x134)]['TIMEHOOK'],'metadata':{'guid':(0x0,utils_1[a5(0x151)])(),'jid':c,'gid':d,'dad':k,'aid':h},'data':{'timestamp':Date[a5(0xd0)]()}};await this[a5(0xbb)]?.['publishMessage'](null,l);}async[y(0xe1)](f,g,h,j=[]){const a6=y,k=await this[a6(0xcb)](),l=await this['taskService'][a6(0xe3)](f);if(l){const m=await(0x0,utils_1[a6(0x102)])(l['to'],this[a6(0x121)],k),p=await this['resolveQuery'](m,h),q=new reporter_1[(a6(0xd8))](k,this[a6(0x121)],this['logger']),u=await q[a6(0x12c)](p,j);if(u[a6(0x15c)]){const v=new task_1['TaskService'](this['store'],this[a6(0x150)]);await v[a6(0x175)](u[a6(0xd3)](w=>[f,w,h[a6(0xc6)]||!0x1,JSON[a6(0xae)](g)][a6(0xb2)](key_1[a6(0x142)]))),this[a6(0xfb)][a6(0xb9)](key_1[a6(0x115)][a6(0x141)],{'type':a6(0xc1),'originator':this['guid']},this[a6(0x16e)]);}return u;}throw new Error(a6(0xcc)+f);}async['pub'](c,d,f,g){const a7=y,h=await this['initActivity'](c,d,f);if(h)return await h[a7(0x10f)](g);throw new Error(a7(0x14c)+c);}async['sub'](c,d){const a8=y;return await this[a8(0xfb)][a8(0xfb)](key_1[a8(0x115)][a8(0x141)],async(f,g)=>{const a9=a8;d(g[a9(0xee)],g['job']);},this[a8(0x16e)],c);}async[y(0x10d)](c){const aa=y;return await this['subscribe'][aa(0x174)](key_1[aa(0x115)]['QUORUM'],this[aa(0x16e)],c);}async['psub'](c,d){const ab=y;return await this[ab(0xfb)][ab(0x112)](key_1[ab(0x115)][ab(0x141)],async(f,g)=>{const ac=ab;d(g[ac(0xee)],g[ac(0x15b)]);},this[ab(0x16e)],c);}async[y(0x125)](c){const ad=y;return await this['subscribe']['punsubscribe'](key_1[ad(0x115)]['QUORUM'],this[ad(0x16e)],c);}async[y(0x117)](c,d,f,g=enums_1[y(0x137)]){const ae=y;f={'metadata':{'ngn':this[ae(0x151)],'trc':f?.[ae(0xc0)]?.[ae(0x124)],'spn':f?.['metadata']?.[ae(0x156)]}};const h=await this['pub'](c,d,f);return new Promise((j,k)=>{const af=ae;this[af(0x127)](h,(l,m)=>{const ag=af;if(m[ag(0xc0)][ag(0xf6)]){const n=JSON[ag(0xf1)](m[ag(0xc0)][ag(0xf6)]);k({'error':n,'job_id':m[ag(0xc0)][ag(0xbc)]});}else j(m);}),setTimeout(()=>{const ah=af;this['delistJobCallback'](h),k({'code':enums_1['HMSH_CODE_TIMEOUT'],'message':ah(0xd5),'job_id':h});},g);});}async[y(0xec)](c,d,f=!0x1){const ai=y;if(this[ai(0xef)](c)){const g={'type':'job','topic':c[ai(0xc0)][ai(0xbc)],'job':(0x0,utils_1[ai(0xd9)])(d)};this['subscribe'][ai(0xb9)](key_1[ai(0x115)][ai(0x141)],g,this['appId'],c['metadata'][ai(0xf8)]);}}async[y(0x12d)](c){const aj=y,d=await this[aj(0xcb)](),f=c[aj(0xc0)][aj(0x149)]||c[aj(0x155)]?.[aj(0xe8)]?.['metadata']?.[aj(0x149)];return(await this[aj(0x121)]['getSchema'](f,d))[aj(0xbd)];}async[y(0x13c)](c,d,f=!0x1){const ak=y,g=await this['getPublishesTopic'](c);if(g){const h={'type':ak(0x15b),'topic':g,'job':(0x0,utils_1['restoreHierarchy'])(d)};this[ak(0xfb)]['publish'](key_1[ak(0x115)][ak(0x141)],h,this[ak(0x16e)],g+'.'+c['metadata']['jid']);}}async['add'](c){const al=y;return await this[al(0xbb)]?.[al(0x169)](null,c);}['registerJobCallback'](c,d){const am=y;this[am(0x128)][c]=d;}[y(0xc7)](c){const an=y;delete this[an(0x128)][c];}[y(0xef)](c){const ao=y;return Boolean(c[ao(0xc0)][ao(0xf8)]);}async[y(0x130)](c,d={}){const ap=y,f=this[ap(0xd6)](c,!0x0),g=this[ap(0xef)](c),h=await this['getPublishesTopic'](c);let j;if(f||g||h){const k=await this[ap(0xb7)](c[ap(0xc0)][ap(0x12b)],c['metadata'][ap(0xbc)]);j=await this['execAdjacentParent'](c,k,d[ap(0x113)]),this[ap(0xec)](c,k,d['emit']),this[ap(0x13c)](c,k,d['emit']);}return d['emit']||this[ap(0x11d)][ap(0xfc)](c[ap(0xc0)][ap(0xbc)],this['resolveExpires'](c,d),d),j;}['resolveExpires'](c,d){const aq=y;return d[aq(0x158)]??c[aq(0xc0)]['expire']??enums_1[aq(0x14a)];}async[y(0xe7)](c){const ar=y;return await this[ar(0x157)][ar(0xe7)](c);}async[y(0x104)](c){const as=y;return await this[as(0x121)]['getRaw'](c);}async['getStatus'](c){const at=y,{id:d}=await this['getVID']();return await this['store'][at(0x101)](c,d);}async[y(0xb7)](c,d){const au=y,f=await this[au(0x121)][au(0x143)]('$'+c),g={['$'+c]:Object['keys'](f)},h=await this[au(0x121)]['getState'](d,g,{});if(!h)throw new Error(au(0x13d)+d);const [j,k]=h,l=(0x0,utils_1['restoreHierarchy'])(j);return k&&l['metadata']&&(l[au(0xc0)]['js']=k),l;}async[y(0x14f)](c,d){const av=y;return await this['store'][av(0x14f)](c,d);}async['compress'](c){const aw=y,d=await this[aw(0x121)][aw(0x177)](),f=Object[aw(0x161)](d)[aw(0x15c)],g=Math[aw(0x16d)](0x34,0x2)-0x1,h=serializer_1['SerializerService']['filterSymVals'](f,g,d,new Set(c));return await this[aw(0x121)][aw(0x10e)](h);}}exports[y(0xcf)]=EngineService;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { ILogger } from '../logger';
|
|
2
|
-
import { StoreService } from '../store';
|
|
3
|
-
import { DependencyExport, ExportOptions, JobActionExport, JobExport } from '../../types/exporter';
|
|
4
|
-
import { ProviderClient, ProviderTransaction } from '../../types/provider';
|
|
5
|
-
import { StringStringType, Symbols } from '../../types/serializer';
|
|
6
|
-
/**
|
|
7
|
-
* Downloads job data from Redis (hscan, hmget, hgetall)
|
|
8
|
-
* Expands process data and includes dependency list
|
|
9
|
-
*/
|
|
10
|
-
declare class ExporterService {
|
|
11
|
-
appId: string;
|
|
12
|
-
logger: ILogger;
|
|
13
|
-
store: StoreService<ProviderClient, ProviderTransaction>;
|
|
14
|
-
symbols: Promise<Symbols> | Symbols;
|
|
15
|
-
constructor(appId: string, store: StoreService<ProviderClient, ProviderTransaction>, logger: ILogger);
|
|
16
|
-
/**
|
|
17
|
-
* Convert the job hash into a JobExport object.
|
|
18
|
-
* This object contains various facets that describe the interaction
|
|
19
|
-
* in terms relevant to narrative storytelling.
|
|
20
|
-
*/
|
|
21
|
-
export(jobId: string, options?: ExportOptions): Promise<JobExport>;
|
|
22
|
-
/**
|
|
23
|
-
* Inflates the key from Redis, 3-character symbol
|
|
24
|
-
* into a human-readable JSON path, reflecting the
|
|
25
|
-
* tree-like structure of the unidimensional Hash
|
|
26
|
-
*/
|
|
27
|
-
inflateKey(key: string): string;
|
|
28
|
-
/**
|
|
29
|
-
* Inflates the job data from Redis into a JobExport object
|
|
30
|
-
* @param jobHash - the job data from Redis
|
|
31
|
-
* @param dependencyList - the list of dependencies for the job
|
|
32
|
-
* @returns - the inflated job data
|
|
33
|
-
*/
|
|
34
|
-
inflate(jobHash: StringStringType, dependencyList: string[]): JobExport;
|
|
35
|
-
/**
|
|
36
|
-
* Inflates the dependency data from Redis into a JobExport object by
|
|
37
|
-
* organizing the dimensional isolate in sch a way asto interleave
|
|
38
|
-
* into a story
|
|
39
|
-
* @param data - the dependency data from Redis
|
|
40
|
-
* @returns - the organized dependency data
|
|
41
|
-
*/
|
|
42
|
-
inflateDependencyData(data: string[], actions: JobActionExport): DependencyExport[];
|
|
43
|
-
}
|
|
44
|
-
export { ExporterService };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';const L=b;(function(c,d){const K=b,e=c();while(!![]){try{const f=-parseInt(K(0x1db))/0x1*(-parseInt(K(0x1ef))/0x2)+-parseInt(K(0x1fb))/0x3*(-parseInt(K(0x1fa))/0x4)+-parseInt(K(0x1dd))/0x5*(-parseInt(K(0x1e4))/0x6)+-parseInt(K(0x1ff))/0x7*(-parseInt(K(0x1ea))/0x8)+-parseInt(K(0x1f3))/0x9*(-parseInt(K(0x1e9))/0xa)+parseInt(K(0x1e0))/0xb*(parseInt(K(0x1ec))/0xc)+-parseInt(K(0x1ed))/0xd*(parseInt(K(0x1e3))/0xe);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x1c191));function a(){const T=['8pHwQbk','export','length','join','4356kFBSon','inflateDependencyData','../../modules/utils','../../modules/key','inflateKey','replace','SerializerService','88212fstbLL','24jsJWnq','flow','VALSEP','restoreHierarchy','54649ZTthdw','map','getAllSymbols','../serializer','inflate','34302DEHyzJ','getRaw','10jqiukc','store','match','2541pFpief','split','appId','434DFVGfU','233820WAMrql','symbols','__esModule','ExporterService','fromString','1380nBRioV','16yGbQSk','defineProperty','2868qOpyTv','173654mxKKcx','forEach'];a=function(){return T;};return a();}Object[L(0x1eb)](exports,L(0x1e6),{'value':!0x0}),exports[L(0x1e7)]=void 0x0;const key_1=require(L(0x1f6)),utils_1=require(L(0x1f5)),serializer_1=require(L(0x202));class ExporterService{constructor(c,d,f){const M=L;this[M(0x1e2)]=c,this['logger']=f,this['store']=d;}async[L(0x1f0)](c,d={}){const N=L;this[N(0x1e5)]||(this[N(0x1e5)]=this[N(0x1de)][N(0x201)](),this[N(0x1e5)]=await this[N(0x1e5)]);const f=await this[N(0x1de)][N(0x1dc)](c);return this[N(0x1da)](f,[]);}[L(0x1f7)](c){const O=L;return c in this[O(0x1e5)]?this[O(0x1e5)][c]:c;}[L(0x1da)](c,d){const P=L,f={},g=this[P(0x1f4)](d,{'hooks':{},'main':{'cursor':-0x1,'items':[]}}),h=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object['entries'](c)[P(0x1ee)](([j,k])=>{const Q=P,m=j[Q(0x1df)](h);if(m){const [p,q,u]=m,v=this[Q(0x1f7)](q),w=''+u[Q(0x1f8)](/,/g,'/'),x=serializer_1['SerializerService'][Q(0x1e8)](k);f[w+'/'+v]=x;}else 0x3===j[Q(0x1f1)]&&(f[this['inflateKey'](j)]=serializer_1[Q(0x1f9)][Q(0x1e8)](k));}),{'dependencies':g,'process':(0x0,utils_1[P(0x1fe)])(f),'status':c[':']};}[L(0x1f4)](c,d){const R=L,f=/([0-9,]+)-(\d+)$/,g=/-(\d+)$/;return c[R(0x200)]((j,k)=>{const S=R,[m,q,v,w,...x]=j[S(0x1e1)](key_1[S(0x1fd)]),z=x[S(0x1f2)](key_1['VALSEP']),A=z[S(0x1df)](f);let B,C,D='';if(A){const [E,F,G]=A;D=F[S(0x1e1)](',')[S(0x1f2)]('/'),B=D+'['+G+']',C='hook';}else{const H=z[S(0x1df)](g);if(H){const [I,J]=H;B='['+J+']',C=S(0x1fc);}else B='/',C='other';}return{'type':m,'topic':q,'gid':v,'jid':z};});}}function b(c,d){const e=a();return b=function(f,g){f=f-0x1da;let h=e[f];return h;},b(c,d);}exports[L(0x1e7)]=ExporterService;
|