@hotmeshio/hotmesh 0.3.19 → 0.3.20

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.
Files changed (91) hide show
  1. package/README.md +43 -14
  2. package/build/index.d.ts +5 -1
  3. package/build/index.js +9 -1
  4. package/build/modules/key.js +1 -1
  5. package/build/modules/utils.d.ts +0 -1
  6. package/build/modules/utils.js +1 -1
  7. package/build/package.json +5 -4
  8. package/build/services/activities/activity.js +1 -1
  9. package/build/services/activities/await.js +1 -1
  10. package/build/services/activities/cycle.js +1 -1
  11. package/build/services/activities/hook.js +1 -1
  12. package/build/services/activities/index.js +1 -1
  13. package/build/services/activities/interrupt.js +1 -1
  14. package/build/services/activities/signal.js +1 -1
  15. package/build/services/activities/trigger.js +1 -1
  16. package/build/services/activities/worker.js +1 -1
  17. package/build/services/collator/index.js +1 -1
  18. package/build/services/compiler/deployer.js +1 -1
  19. package/build/services/compiler/index.js +1 -1
  20. package/build/services/compiler/validator.js +1 -1
  21. package/build/services/connector/factory.d.ts +1 -0
  22. package/build/services/connector/factory.js +22 -21
  23. package/build/services/connector/index.d.ts +4 -2
  24. package/build/services/connector/index.js +10 -5
  25. package/build/services/connector/providers/postgres.d.ts +13 -2
  26. package/build/services/connector/providers/postgres.js +54 -9
  27. package/build/services/engine/index.js +1 -1
  28. package/build/services/exporter/index.js +1 -1
  29. package/build/services/hotmesh/index.js +1 -6
  30. package/build/services/mapper/index.js +1 -1
  31. package/build/services/meshflow/connection.js +1 -0
  32. package/build/services/meshflow/exporter.js +1 -1
  33. package/build/services/pipe/functions/array.js +1 -1
  34. package/build/services/pipe/functions/bitwise.js +1 -1
  35. package/build/services/pipe/functions/conditional.js +1 -1
  36. package/build/services/pipe/functions/cron.js +1 -1
  37. package/build/services/pipe/functions/date.js +1 -1
  38. package/build/services/pipe/functions/index.js +1 -1
  39. package/build/services/pipe/functions/json.js +1 -1
  40. package/build/services/pipe/functions/logical.js +1 -1
  41. package/build/services/pipe/functions/math.js +1 -1
  42. package/build/services/pipe/functions/number.js +1 -1
  43. package/build/services/pipe/functions/object.js +1 -1
  44. package/build/services/pipe/functions/string.js +1 -1
  45. package/build/services/pipe/functions/symbol.js +1 -1
  46. package/build/services/pipe/functions/unary.js +1 -1
  47. package/build/services/pipe/index.js +1 -1
  48. package/build/services/quorum/index.js +1 -1
  49. package/build/services/reporter/index.js +1 -1
  50. package/build/services/router/index.js +1 -1
  51. package/build/services/search/providers/postgres/postgres.js +1 -1
  52. package/build/services/search/providers/redis/ioredis.js +1 -1
  53. package/build/services/search/providers/redis/redis.js +1 -1
  54. package/build/services/serializer/index.js +1 -1
  55. package/build/services/store/providers/postgres/kvsql.js +1 -1
  56. package/build/services/store/providers/postgres/kvtables.d.ts +2 -2
  57. package/build/services/store/providers/postgres/kvtables.js +1 -1
  58. package/build/services/store/providers/postgres/kvtransaction.js +1 -1
  59. package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
  60. package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
  61. package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
  62. package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
  63. package/build/services/store/providers/postgres/postgres.js +1 -1
  64. package/build/services/store/providers/redis/_base.js +1 -1
  65. package/build/services/store/providers/redis/ioredis.js +1 -1
  66. package/build/services/store/providers/redis/redis.js +1 -1
  67. package/build/services/store/providers/store-initializable.js +1 -1
  68. package/build/services/stream/providers/nats/nats.js +1 -1
  69. package/build/services/stream/providers/postgres/postgres.js +1 -1
  70. package/build/services/stream/providers/redis/ioredis.js +1 -1
  71. package/build/services/stream/providers/redis/redis.js +1 -1
  72. package/build/services/stream/providers/stream-initializable.js +1 -1
  73. package/build/services/sub/factory.d.ts +2 -2
  74. package/build/services/sub/factory.js +13 -8
  75. package/build/services/sub/providers/nats/nats.d.ts +19 -0
  76. package/build/services/sub/providers/nats/nats.js +1 -0
  77. package/build/services/sub/providers/postgres/postgres.d.ts +1 -0
  78. package/build/services/sub/providers/postgres/postgres.js +1 -1
  79. package/build/services/sub/providers/redis/ioredis.js +1 -1
  80. package/build/services/sub/providers/redis/redis.js +1 -1
  81. package/build/services/task/index.js +1 -1
  82. package/build/services/telemetry/index.js +1 -1
  83. package/build/services/worker/index.js +1 -1
  84. package/build/types/nats.d.ts +8 -0
  85. package/build/types/postgres.d.ts +10 -1
  86. package/build/types/provider.d.ts +1 -0
  87. package/index.ts +20 -5
  88. package/package.json +5 -4
  89. package/types/nats.ts +34 -0
  90. package/types/postgres.ts +13 -2
  91. package/types/provider.ts +4 -0
package/README.md CHANGED
@@ -8,10 +8,10 @@
8
8
 
9
9
  ## Features
10
10
 
11
- - **Serverless Orchestration**: Orchestrate your microservices without adding infrastructure.
11
+ - **Serverless Orchestration**: Orchestrate without adding infrastructure
12
12
  - **No Vendor Lock-in**: Use your preferred database: *Postgres*, *Redis*, ...
13
- - **Linear Scalability**: Scale your database to scale your application.
14
- - **Process Analytics**: Gain process insights with optional analytics.
13
+ - **Linear Scalability**: Scale your database to scale your application
14
+ - **Process Analytics**: Gain process insights with optional analytics
15
15
 
16
16
 
17
17
  <br/>
@@ -27,7 +27,7 @@ npm install @hotmeshio/hotmesh
27
27
 
28
28
  <br/>
29
29
 
30
- ## MeshCall | Fast, Simple, Inter-Service Calls
30
+ ## MeshCall | Inter-Service Function Calls
31
31
  [MeshCall](https://hotmeshio.github.io/sdk-typescript/classes/services_meshcall.MeshCall.html) connects any function to the mesh.
32
32
 
33
33
  <details style="padding: .5em">
@@ -554,7 +554,7 @@ This example calls an activity and then sleeps for a week. It runs indefinitely
554
554
  <br/>
555
555
 
556
556
  ## MeshData | Transactional Analytics
557
- [MeshData](https://hotmeshio.github.io/sdk-typescript/classes/services_meshdata.MeshData.html) adds analytics to your workflows.
557
+ [MeshData](https://hotmeshio.github.io/sdk-typescript/classes/services_meshdata.MeshData.html) adds analytics to transactional workflows.
558
558
 
559
559
  <details style="padding: .5em">
560
560
  <summary style="font-size:1.25em;">Create a search index <small>[more]</small></summary>
@@ -748,25 +748,49 @@ This example demonstrates how to search for those workflows where a given condit
748
748
  <br/>
749
749
 
750
750
  ## Connect
751
- HotMesh is pluggable and ships with support for Postgres (pg) and Redis (ioredis/redis) as standalone backends.
751
+ HotMesh is pluggable and ships with support for Postgres (pg) and Redis (ioredis/redis). NATS is also supported for PubSub for extended patterns.
752
752
 
753
- ### Postgres
753
+ <details style="padding: .5em">
754
+ <summary style="font-size:1.25em;">Postgres <small>[more]</small></summary>
755
+
756
+ ### Connect Postgres Client
754
757
  ```typescript
755
- import { Client as Postgres } from 'pg';
756
- //OR `import { Pool as Postgres } from 'pg';`
758
+ import { Client as PostgresClient } from 'pg';
757
759
 
760
+ //provide these credentials to HotMesh
758
761
  const connection = {
759
- class: Postgres,
762
+ class: PostgresClient,
760
763
  options: {
761
764
  connectionString: 'postgresql://usr:pwd@localhost:5432/db'
762
765
  }
763
766
  };
767
+
768
+ ```
769
+ ### Connect Postgres Pool
770
+ Pool connections are recommended for high-throughput applications. The pool will manage connections and automatically handle connection pooling.
771
+ ```typescript
772
+ import { Pool as PostgresPool } from 'pg';
773
+
774
+ const PostgresPoolClient = new PostgresPool({
775
+ connectionString: 'postgresql://usr:pwd@localhost:5432/db'
776
+ });
777
+
778
+ //provide these credentials to HotMesh
779
+ const connection = {
780
+ class: PostgresPoolClient,
781
+ options: {}
782
+ };
764
783
  ```
765
784
 
766
- ### Redis
785
+ </details>
786
+
787
+ <details style="padding: .5em">
788
+ <summary style="font-size:1.25em;">Redis <small>[more]</small></summary>
789
+
790
+ ### Redis/IORedis
767
791
  ```typescript
768
792
  import * as Redis from 'redis';
769
- //OR `import { Client as Postgres } from 'pg';`
793
+ //OR `import Redis from 'ioredis';`
770
794
 
771
795
  const connection = {
772
796
  class: Redis,
@@ -775,9 +799,13 @@ const connection = {
775
799
  }
776
800
  };
777
801
  ```
802
+ </details>
803
+
804
+ <details style="padding: .5em">
805
+ <summary style="font-size:1.25em;">NATS <small>[more]</small></summary>
778
806
 
779
- ### NATS
780
- Add NATS for improved pub/sub support, including patterned subscriptions. Note the explicit channel subscription in the example below.
807
+ ### NATS PubSub
808
+ Add NATS for improved PubSub support, including patterned subscriptions. Note the explicit channel subscription in the example below. *The NATS provider supports version 2.0 of the NATS client (the latest version). See ./package.json for details.*
781
809
 
782
810
  ```typescript
783
811
  import { Client as Postgres } from 'pg';
@@ -802,6 +830,7 @@ const connection = {
802
830
  },
803
831
  };
804
832
  ```
833
+ </details>
805
834
 
806
835
  <br/>
807
836
 
package/build/index.d.ts CHANGED
@@ -8,6 +8,10 @@ import { MeshOS } from './services/meshos';
8
8
  import * as Errors from './modules/errors';
9
9
  import * as Utils from './modules/utils';
10
10
  import { ConnectorService as Connector } from './services/connector/factory';
11
+ import { PostgresConnection as ConnectorPostgres } from './services/connector/providers/postgres';
12
+ import { RedisConnection as ConnectorIORedis } from './services/connector/providers/ioredis';
13
+ import { RedisConnection as ConnectorRedis } from './services/connector/providers/redis';
14
+ import { NatsConnection as ConnectorNATS } from './services/connector/providers/nats';
11
15
  declare const Client: typeof import("./services/meshflow/client").ClientService, Connection: typeof import("./services/meshflow/connection").ConnectionService, Search: typeof import("./services/meshflow/search").Search, Worker: typeof import("./services/meshflow/worker").WorkerService, workflow: typeof import("./services/meshflow/workflow").WorkflowService;
12
- export { Client, Connection, Connector, Errors, HotMesh, HotMeshConfig, MeshCall, MeshData, MeshFlow, MeshOS, Search, Utils, Worker, workflow, WorkflowHandle, };
16
+ export { Connector, ConnectorIORedis, ConnectorNATS, ConnectorPostgres, ConnectorRedis, HotMesh, HotMeshConfig, MeshCall, MeshData, MeshFlow, MeshOS, Client, Connection, Search, Worker, workflow, WorkflowHandle, Errors, Utils, };
13
17
  export * as Types from './types';
package/build/index.js CHANGED
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Types = exports.WorkflowHandle = exports.workflow = exports.Worker = exports.Utils = exports.Search = exports.MeshOS = exports.MeshFlow = exports.MeshData = exports.MeshCall = exports.HotMesh = exports.Errors = exports.Connector = exports.Connection = exports.Client = void 0;
26
+ exports.Types = exports.Utils = exports.Errors = exports.WorkflowHandle = exports.workflow = exports.Worker = exports.Search = exports.Connection = exports.Client = exports.MeshOS = exports.MeshFlow = exports.MeshData = exports.MeshCall = exports.HotMesh = exports.ConnectorRedis = exports.ConnectorPostgres = exports.ConnectorNATS = exports.ConnectorIORedis = exports.Connector = void 0;
27
27
  const hotmesh_1 = require("./services/hotmesh");
28
28
  Object.defineProperty(exports, "HotMesh", { enumerable: true, get: function () { return hotmesh_1.HotMesh; } });
29
29
  const meshcall_1 = require("./services/meshcall");
@@ -42,6 +42,14 @@ const Utils = __importStar(require("./modules/utils"));
42
42
  exports.Utils = Utils;
43
43
  const factory_1 = require("./services/connector/factory");
44
44
  Object.defineProperty(exports, "Connector", { enumerable: true, get: function () { return factory_1.ConnectorService; } });
45
+ const postgres_1 = require("./services/connector/providers/postgres");
46
+ Object.defineProperty(exports, "ConnectorPostgres", { enumerable: true, get: function () { return postgres_1.PostgresConnection; } });
47
+ const ioredis_1 = require("./services/connector/providers/ioredis");
48
+ Object.defineProperty(exports, "ConnectorIORedis", { enumerable: true, get: function () { return ioredis_1.RedisConnection; } });
49
+ const redis_1 = require("./services/connector/providers/redis");
50
+ Object.defineProperty(exports, "ConnectorRedis", { enumerable: true, get: function () { return redis_1.RedisConnection; } });
51
+ const nats_1 = require("./services/connector/providers/nats");
52
+ Object.defineProperty(exports, "ConnectorNATS", { enumerable: true, get: function () { return nats_1.NatsConnection; } });
45
53
  const { Client, Connection, Search, Worker, workflow } = meshflow_1.MeshFlow;
46
54
  exports.Client = Client;
47
55
  exports.Connection = Connection;
@@ -1 +1 @@
1
- 'use strict';(function(_0x29113b,_0xebf334){const _0x32a34e=_0x4511,_0x50f5e1=_0x29113b();while(!![]){try{const _0x436494=-parseInt(_0x32a34e(0x1af))/0x1+parseInt(_0x32a34e(0x1ae))/0x2+parseInt(_0x32a34e(0x1b4))/0x3+parseInt(_0x32a34e(0x1b2))/0x4+parseInt(_0x32a34e(0x1b1))/0x5*(-parseInt(_0x32a34e(0x1b3))/0x6)+-parseInt(_0x32a34e(0x1b5))/0x7*(parseInt(_0x32a34e(0x1b0))/0x8)+parseInt(_0x32a34e(0x1ad))/0x9;if(_0x436494===_0xebf334)break;else _0x50f5e1['push'](_0x50f5e1['shift']());}catch(_0x26cf45){_0x50f5e1['push'](_0x50f5e1['shift']());}}}(_0xf569,0xaf738));function _0xf569(){const _0x227839=['10192raUfBL','3200zpHekm','3427268OudOYe','1518vGKhPo','1902735XQzMmG','6314lTwNTm','1254573AkqFPg','973666GjVpiU','87576xCbqcz'];_0xf569=function(){return _0x227839;};return _0xf569();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['VALSEP']=exports['WEBSEP']=exports['TYPSEP']=exports['KEYSEP']=exports['HMNS']=exports['KeyType']=exports['KeyService']=void 0x0;const hotmesh_1=require('../types/hotmesh');Object['defineProperty'](exports,'KeyType',{'enumerable':!![],'get':function(){return hotmesh_1['KeyType'];}});const HMNS='hmsh';exports['HMNS']=HMNS;const KEYSEP=':';exports['KEYSEP']=KEYSEP;const VALSEP='::';exports['VALSEP']=VALSEP;function _0x4511(_0x35b6d6,_0x55212e){const _0xf5693e=_0xf569();return _0x4511=function(_0x45112e,_0x3b39e1){_0x45112e=_0x45112e-0x1ad;let _0x37f6f4=_0xf5693e[_0x45112e];return _0x37f6f4;},_0x4511(_0x35b6d6,_0x55212e);}const WEBSEP='::';exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0x3d9a70,_0x43c893,_0x346558){switch(_0x43c893){case hotmesh_1['KeyType']['HOTMESH']:return _0x3d9a70;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0x3d9a70+':'+_0x346558['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0x3d9a70+':'+_0x346558['appId']+':w:'+(_0x346558['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0x3d9a70+':'+_0x346558['appId']+':t:'+(_0x346558['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0x3d9a70+':a:'+(_0x346558['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0x3d9a70+':'+_0x346558['appId']+':q:'+(_0x346558['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0x3d9a70+':'+_0x346558['appId']+':j:'+_0x346558['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0x3d9a70+':'+_0x346558['appId']+':d:'+_0x346558['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0x3d9a70+':'+_0x346558['appId']+':s:'+_0x346558['jobKey']+':'+_0x346558['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0x3d9a70+':'+_0x346558['appId']+':s:'+_0x346558['jobKey']+':'+_0x346558['dateTime']+':'+_0x346558['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0x3d9a70+':'+_0x346558['appId']+':s:'+_0x346558['jobKey']+':'+_0x346558['dateTime']+':'+_0x346558['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0x3d9a70+':'+_0x346558['appId']+':v:'+_0x346558['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0x3d9a70+':'+_0x346558['appId']+':v:'+_0x346558['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0x3d9a70+':'+_0x346558['appId']+':v:'+_0x346558['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0x3d9a70+':'+_0x346558['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0x3d9a70+':'+_0x346558['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0x3d9a70+':'+_0x346558['appId']+':sym:keys:'+(_0x346558['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0x3d9a70+':'+_0x346558['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0x3d9a70+':'+(_0x346558['appId']||'')+':x:'+(_0x346558['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}static['parseKey'](_0x3c95a1){const [_0x2f1147,_0x479ecd,_0xf69b98,..._0x3800e4]=_0x3c95a1['split'](KEYSEP),_0x4af977=_0x3800e4['join'](KEYSEP)||'';return{'namespace':_0x2f1147,'app':_0xf69b98==='a'?_0x479ecd:undefined,'entity':_0xf69b98,'id':_0x4af977};}static['reconstituteKey'](_0xc4734b){const {namespace:_0x263b92,app:_0x5ecdce,entity:_0x327955,id:_0x292ed4}=_0xc4734b;return''+_0x263b92+KEYSEP+_0x5ecdce+KEYSEP+_0x327955+KEYSEP+(_0x292ed4||'');}static['resolveEntityType'](_0x4c3524,_0x3c5dc5=''){switch(_0x4c3524){case'a':return'applications';case'r':return'throttles';case'w':return _0x3c5dc5===''?'task_priorities':'roles';case't':return _0x3c5dc5===''?'task_schedules':'task_lists';case'q':return'events';case'j':return'jobs';case's':return'stats';case'v':return'versions';case'x':return _0x3c5dc5===''?'streams':'stream_topics';case'hooks':return'signal_patterns';case'signals':return'signal_registry';case'sym':return'symbols';default:return'unknown_entity';}}static['resolveAbbreviation'](_0x63c888){switch(_0x63c888){case'applications':return'a';case'throttles':return'r';case'roles':return'w';case'task_schedules':return't';case'task_lists':return't';case'events':return'q';case'jobs':return'j';case'stats':return's';case'versions':return'v';case'streams':return'x';case'signal_patterns':return'hooks';case'signal_registry':return'signals';case'symbols':return'sym';default:return'unknown_entity';}}}exports['KeyService']=KeyService;
1
+ 'use strict';(function(_0x4971ea,_0x1d4d46){const _0xd9e3cb=_0x59a9,_0x5d7ec7=_0x4971ea();while(!![]){try{const _0x61199e=parseInt(_0xd9e3cb(0x6b))/0x1+parseInt(_0xd9e3cb(0x66))/0x2*(-parseInt(_0xd9e3cb(0x6a))/0x3)+-parseInt(_0xd9e3cb(0x6c))/0x4+-parseInt(_0xd9e3cb(0x69))/0x5*(parseInt(_0xd9e3cb(0x67))/0x6)+parseInt(_0xd9e3cb(0x6d))/0x7*(-parseInt(_0xd9e3cb(0x65))/0x8)+-parseInt(_0xd9e3cb(0x68))/0x9+parseInt(_0xd9e3cb(0x64))/0xa*(parseInt(_0xd9e3cb(0x6e))/0xb);if(_0x61199e===_0x1d4d46)break;else _0x5d7ec7['push'](_0x5d7ec7['shift']());}catch(_0x238bc1){_0x5d7ec7['push'](_0x5d7ec7['shift']());}}}(_0x5903,0x55dd9));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['VALSEP']=exports['WEBSEP']=exports['TYPSEP']=exports['KEYSEP']=exports['HMNS']=exports['KeyType']=exports['KeyService']=void 0x0;const hotmesh_1=require('../types/hotmesh');Object['defineProperty'](exports,'KeyType',{'enumerable':!![],'get':function(){return hotmesh_1['KeyType'];}});const HMNS='hmsh';exports['HMNS']=HMNS;const KEYSEP=':';exports['KEYSEP']=KEYSEP;const VALSEP='::';exports['VALSEP']=VALSEP;const WEBSEP='::';function _0x59a9(_0x2648a5,_0x1dd24f){const _0x590375=_0x5903();return _0x59a9=function(_0x59a990,_0x47f0ca){_0x59a990=_0x59a990-0x64;let _0x143d2e=_0x590375[_0x59a990];return _0x143d2e;},_0x59a9(_0x2648a5,_0x1dd24f);}exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0xf2202b,_0x1046c4,_0x2322ac){switch(_0x1046c4){case hotmesh_1['KeyType']['HOTMESH']:return _0xf2202b;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0xf2202b+':'+_0x2322ac['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0xf2202b+':'+_0x2322ac['appId']+':w:'+(_0x2322ac['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0xf2202b+':'+_0x2322ac['appId']+':t:'+(_0x2322ac['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0xf2202b+':a:'+(_0x2322ac['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0xf2202b+':'+_0x2322ac['appId']+':q:'+(_0x2322ac['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0xf2202b+':'+_0x2322ac['appId']+':j:'+_0x2322ac['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0xf2202b+':'+_0x2322ac['appId']+':d:'+_0x2322ac['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0xf2202b+':'+_0x2322ac['appId']+':s:'+_0x2322ac['jobKey']+':'+_0x2322ac['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0xf2202b+':'+_0x2322ac['appId']+':s:'+_0x2322ac['jobKey']+':'+_0x2322ac['dateTime']+':'+_0x2322ac['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0xf2202b+':'+_0x2322ac['appId']+':s:'+_0x2322ac['jobKey']+':'+_0x2322ac['dateTime']+':'+_0x2322ac['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0xf2202b+':'+_0x2322ac['appId']+':v:'+_0x2322ac['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0xf2202b+':'+_0x2322ac['appId']+':v:'+_0x2322ac['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0xf2202b+':'+_0x2322ac['appId']+':v:'+_0x2322ac['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0xf2202b+':'+_0x2322ac['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0xf2202b+':'+_0x2322ac['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0xf2202b+':'+_0x2322ac['appId']+':sym:keys:'+(_0x2322ac['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0xf2202b+':'+_0x2322ac['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0xf2202b+':'+(_0x2322ac['appId']||'')+':x:'+(_0x2322ac['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}static['parseKey'](_0x4afb5c){const [_0x5691ba,_0x2cdef1,_0x4924ea,..._0x4c6890]=_0x4afb5c['split'](KEYSEP),_0x54c12f=_0x4c6890['join'](KEYSEP)||'';return{'namespace':_0x5691ba,'app':_0x4924ea==='a'?_0x2cdef1:undefined,'entity':_0x4924ea,'id':_0x54c12f};}static['reconstituteKey'](_0x4f4f36){const {namespace:_0x40cf9e,app:_0x3eb379,entity:_0x92eead,id:_0x43ab3a}=_0x4f4f36;return''+_0x40cf9e+KEYSEP+_0x3eb379+KEYSEP+_0x92eead+KEYSEP+(_0x43ab3a||'');}static['resolveEntityType'](_0x48d108,_0x19dfe5=''){switch(_0x48d108){case'a':return'applications';case'r':return'throttles';case'w':return _0x19dfe5===''?'task_priorities':'roles';case't':return _0x19dfe5===''?'task_schedules':'task_lists';case'q':return'events';case'j':return'jobs';case's':return'stats';case'v':return'versions';case'x':return _0x19dfe5===''?'streams':'stream_topics';case'hooks':return'signal_patterns';case'signals':return'signal_registry';case'sym':return'symbols';default:return'unknown_entity';}}static['resolveAbbreviation'](_0x3b6949){switch(_0x3b6949){case'applications':return'a';case'throttles':return'r';case'roles':return'w';case'task_schedules':return't';case'task_lists':return't';case'events':return'q';case'jobs':return'j';case'stats':return's';case'versions':return'v';case'streams':return'x';case'signal_patterns':return'hooks';case'signal_registry':return'signals';case'symbols':return'sym';default:return'unknown_entity';}}}function _0x5903(){const _0x41d15b=['632973asyGkq','410YnnQtm','5550088VjCAMz','2ilcWCw','6yBAhkm','1081017rqDaBL','3190885mbCrYY','871323TkKZNQ','384802BhpKXT','2599472jVZbrW','7PGgrHg'];_0x5903=function(){return _0x41d15b;};return _0x5903();}exports['KeyService']=KeyService;
@@ -27,7 +27,6 @@ export declare const polyfill: {
27
27
  redisOptions?: StringAnyType;
28
28
  }): Partial<ProviderConfig> | Partial<ProvidersConfig>;
29
29
  };
30
- export declare function identifyRedisTypeFromClass(redisClass: any): 'redis' | 'ioredis' | null;
31
30
  export declare function matchesStatusCode(code: StreamCode, pattern: string | RegExp): boolean;
32
31
  export declare function matchesStatus(status: StreamStatus, targetStatus: StreamStatus): boolean;
33
32
  export declare function findTopKey(obj: AppTransitions, input: string): string | null;
@@ -1 +1 @@
1
- 'use strict';(function(_0x1cbe80,_0x432b2a){const _0x4b8976=_0x3e85,_0x526b32=_0x1cbe80();while(!![]){try{const _0x2231ec=parseInt(_0x4b8976(0xe1))/0x1+-parseInt(_0x4b8976(0xe4))/0x2+parseInt(_0x4b8976(0xe6))/0x3*(parseInt(_0x4b8976(0xe5))/0x4)+parseInt(_0x4b8976(0xe9))/0x5*(parseInt(_0x4b8976(0xe2))/0x6)+parseInt(_0x4b8976(0xe8))/0x7*(parseInt(_0x4b8976(0xe3))/0x8)+parseInt(_0x4b8976(0xe7))/0x9+-parseInt(_0x4b8976(0xe0))/0xa;if(_0x2231ec===_0x432b2a)break;else _0x526b32['push'](_0x526b32['shift']());}catch(_0x180d92){_0x526b32['push'](_0x526b32['shift']());}}}(_0x4c03,0xc06d6));var __importDefault=this&&this['__importDefault']||function(_0x20650b){return _0x20650b&&_0x20650b['__esModule']?_0x20650b:{'default':_0x20650b};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['arrayToHash']=exports['isStreamMessage']=exports['parseStreamMessage']=exports['s']=exports['isValidCron']=exports['restoreHierarchy']=exports['getValueByPath']=exports['getIndexedHash']=exports['getSymVal']=exports['getSymKey']=exports['formatISODate']=exports['getTimeSeries']=exports['getSubscriptionTopic']=exports['findSubscriptionForTrigger']=exports['findTopKey']=exports['matchesStatus']=exports['matchesStatusCode']=exports['identifyRedisTypeFromClass']=exports['polyfill']=exports['identifyProvider']=exports['XSleepFor']=exports['sleepImmediate']=exports['sleepFor']=exports['guid']=exports['deterministicRandom']=exports['deepCopy']=exports['getSystemHealth']=exports['hashOptions']=void 0x0;const os_1=__importDefault(require('os')),crypto_1=require('crypto'),nanoid_1=require('nanoid'),ms_1=__importDefault(require('ms')),logger_1=require('../services/logger'),enums_1=require('./enums'),logger=new logger_1['LoggerService']('hotmesh','utils'),hashOptions=_0x4d509b=>{const _0x9509f7=JSON['stringify'](_0x4d509b);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x9509f7)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0x2aad50=os_1['default']['totalmem'](),_0x3249ba=os_1['default']['freemem'](),_0x49afbd=_0x2aad50-_0x3249ba,_0x461295={'TotalMemoryGB':(_0x2aad50/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x3249ba/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x49afbd/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x461295;}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x383b94){return JSON['parse'](JSON['stringify'](_0x383b94));}exports['deepCopy']=deepCopy;function deterministicRandom(_0x94d0c9){const _0x5bd3d8=Math['sin'](_0x94d0c9)*0x2710;return _0x5bd3d8-Math['floor'](_0x5bd3d8);}exports['deterministicRandom']=deterministicRandom;function guid(_0x1d98a9=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x1d98a9);}exports['guid']=guid;async function sleepFor(_0x523968){return new Promise(_0x5d9613=>setTimeout(_0x5d9613,_0x523968));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x236336=>setImmediate(_0x236336));}exports['sleepImmediate']=sleepImmediate;function XSleepFor(_0x248639){let _0x5a4a1e;const _0x3377c5=new Promise(_0x3a8fdc=>{_0x5a4a1e=setTimeout(_0x3a8fdc,_0x248639);});return{'promise':_0x3377c5,'timerId':_0x5a4a1e};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x486349){const _0x4d7dd3=Object['getPrototypeOf'](_0x486349);if(_0x486349['Query']?.['prototype']||Object['keys'](_0x486349)['includes']('database'))return'postgres';else{if(_0x486349['constructor']&&_0x486349['constructor']['name']==='Client')return'nats';else{if('defineCommand'in _0x4d7dd3||Object['keys'](_0x4d7dd3)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x4d7dd3)['includes']('Multi'))return'redis';}}}if(_0x486349['constructor']){if(_0x486349['constructor']['name']==='Redis'||_0x486349['constructor']['name']==='EventEmitter'){if('hset'in _0x486349)return'ioredis';}else{if(_0x486349['constructor']['name']==='ProviderClient'||_0x486349['constructor']['name']==='Commander'){if('HSET'in _0x486349)return'redis';}}}let _0x5180ff=null;if(Object['keys'](_0x486349)['includes']('connection'))_0x5180ff='postgres';else{if(Object['keys'](_0x486349)['includes']('Pipeline'))_0x5180ff='ioredis';else{if(Object['keys'](_0x486349)['includes']('createClient'))_0x5180ff='redis';else Object['keys'](_0x486349)['includes']('jetstream')&&(_0x5180ff='nats');}}return _0x5180ff;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x4dcb7f){return _0x4dcb7f==='activity'?'hook':_0x4dcb7f;},'providerConfig'(_0x1fa3d0){return _0x1fa3d0?.['connection']??_0x1fa3d0?.['redis']??_0x1fa3d0?.['connections'];},'meshDataConfig'(_0x5c6c4f){if(_0x5c6c4f?.['connections'])return _0x5c6c4f['connections'];return _0x5c6c4f?.['connection']??{'class':_0x5c6c4f?.['redisClass'],'options':_0x5c6c4f?.['redisOptions']};}};function _0x3e85(_0x2c51b2,_0x24c64b){const _0x4c03ea=_0x4c03();return _0x3e85=function(_0x3e852d,_0x9f289){_0x3e852d=_0x3e852d-0xe0;let _0x57bdc0=_0x4c03ea[_0x3e852d];return _0x57bdc0;},_0x3e85(_0x2c51b2,_0x24c64b);}function identifyRedisTypeFromClass(_0x4ae8c4){if(_0x4ae8c4&&_0x4ae8c4['name']==='Redis'||_0x4ae8c4['name']==='EventEmitter')return'ioredis';else{if(_0x4ae8c4&&'createClient'in _0x4ae8c4)return'redis';}return null;}exports['identifyRedisTypeFromClass']=identifyRedisTypeFromClass;function matchesStatusCode(_0x23c3b2,_0x5a8c83){if(typeof _0x5a8c83==='string'){const _0x1cfb7d='^'+_0x5a8c83['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x1cfb7d)['test'](_0x23c3b2['toString']());}return _0x5a8c83['test'](_0x23c3b2['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x1ef0ce,_0x37e552){return _0x1ef0ce===_0x37e552;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x549280,_0x266171){for(const [_0x4b5217,_0x2ba9d3]of Object['entries'](_0x549280)){if(_0x2ba9d3['hasOwnProperty'](_0x266171)){const _0x2576dd=findTopKey(_0x549280,_0x4b5217['replace'](/^\./,''));return(_0x2576dd||_0x4b5217)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x50596a,_0x59117f){for(const [_0x40b03b,_0x1e92ac]of Object['entries'](_0x50596a)){if(_0x1e92ac===_0x59117f)return _0x40b03b;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0x28e87b,_0x6e7b88,_0x43a33a){const _0xe899c7=await _0x6e7b88['getTransitions'](_0x43a33a),_0x4b36a6=await _0x6e7b88['getSubscriptions'](_0x43a33a),_0x39c8d6=findTopKey(_0xe899c7,_0x28e87b),_0x3928ec=findSubscriptionForTrigger(_0x4b36a6,_0x39c8d6);return _0x3928ec;}exports['getSubscriptionTopic']=getSubscriptionTopic;function getTimeSeries(_0xd61acd){if(_0xd61acd['toString']()==='infinity')return'0';const _0x9ac252=new Date(),_0x7cf425=_0xd61acd['slice'](-0x1),_0xf9920a=parseInt(_0xd61acd['slice'](0x0,-0x1),0xa);if(_0x7cf425==='m'){const _0x3cf4cc=Math['floor'](_0x9ac252['getMinutes']()/_0xf9920a)*_0xf9920a;_0x9ac252['setUTCMinutes'](_0x3cf4cc,0x0,0x0);}else _0x7cf425==='h'&&_0x9ac252['setUTCMinutes'](0x0,0x0,0x0);return _0x9ac252['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x31b3b6){const _0x196d63=_0x31b3b6 instanceof Date?_0x31b3b6:new Date(_0x31b3b6);return _0x196d63['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0x5d20cc){const _0x334c0a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x5d5fae=_0x334c0a['length'];if(_0x5d20cc<0x0||_0x5d20cc>=Math['pow'](_0x5d5fae,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x23810d,_0x2e154e]=divmod(_0x5d20cc,_0x5d5fae),[_0x2df5f6,_0x590738]=divmod(_0x23810d,_0x5d5fae);return _0x334c0a[_0x2df5f6]+_0x334c0a[_0x2e154e]+_0x334c0a[_0x590738];}exports['getSymKey']=getSymKey;function getSymVal(_0x55aee6){const _0x18d4ca='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x11b7e3=_0x18d4ca['length'];if(_0x55aee6<0x0||_0x55aee6>=Math['pow'](_0x11b7e3,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x5a2761,_0x1528dc]=divmod(_0x55aee6,_0x11b7e3);return _0x18d4ca[_0x5a2761]+_0x18d4ca[_0x1528dc];}exports['getSymVal']=getSymVal;function divmod(_0x460794,_0x57f007){return[Math['floor'](_0x460794/_0x57f007),_0x460794%_0x57f007];}function getIndexedHash(_0x57b302,_0x3fbb52){const _0x457f56=_0x57b302[_0x3fbb52]||0x0,_0x2f4055={..._0x57b302};return delete _0x2f4055[_0x3fbb52],[_0x457f56,_0x2f4055];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0x42a55c,_0x2d8de3){const _0x1e35f9=_0x2d8de3['split']('/');let _0x357d38=_0x42a55c;for(const _0x1610d5 of _0x1e35f9){if(_0x357d38[_0x1610d5]!==undefined)_0x357d38=_0x357d38[_0x1610d5];else return undefined;}return _0x357d38;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0xa7620b){const _0xb5a501={};for(const _0x44fad7 in _0xa7620b){if(_0xa7620b[_0x44fad7]===undefined)continue;const _0x404c1d=_0x44fad7['split']('/');let _0x4c0f71=_0xb5a501;for(let _0x16743a=0x0;_0x16743a<_0x404c1d['length'];_0x16743a++){_0x16743a===_0x404c1d['length']-0x1?_0x4c0f71[_0x404c1d[_0x16743a]]=_0xa7620b[_0x44fad7]:(_0x4c0f71[_0x404c1d[_0x16743a]]=_0x4c0f71[_0x404c1d[_0x16743a]]||{},_0x4c0f71=_0x4c0f71[_0x404c1d[_0x16743a]]);}}return _0xb5a501;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x4fd136){const _0x3efe28=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x3efe28['test'](_0x4fd136);}exports['isValidCron']=isValidCron;const s=_0x15d3af=>{return(0x0,ms_1['default'])(_0x15d3af)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x3e852b=>{try{return JSON['parse'](_0x3e852b);}catch(_0x1ab64e){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x1ab64e});throw _0x1ab64e;}};exports['parseStreamMessage']=parseStreamMessage;const isStreamMessage=_0x3e3d54=>{return Array['isArray'](_0x3e3d54)&&Array['isArray'](_0x3e3d54[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x246d77=>{const _0x24cecb=[];let _0x37755a;for(let _0x28612f=0x1;_0x28612f<_0x246d77['length'];_0x28612f++){const _0x28f49c=_0x246d77[_0x28612f],_0x507fae={};if(Array['isArray'](_0x28f49c)){for(let _0x3f9fbd=0x0;_0x3f9fbd<_0x28f49c['length'];_0x3f9fbd+=0x2){const _0x564c2b=_0x28f49c[_0x3f9fbd],_0x5b730e=_0x28f49c[_0x3f9fbd+0x1];_0x507fae[_0x564c2b]=_0x5b730e;}_0x37755a&&(_0x507fae['$']=_0x37755a),_0x24cecb['push'](_0x507fae),_0x37755a=undefined;}else _0x37755a=_0x28f49c;}return _0x24cecb;};exports['arrayToHash']=arrayToHash;function _0x4c03(){const _0xf4c19c=['4623669kjIRmn','7BRNYer','125QCFNAV','30236290HLvmAl','589601TorDSR','261102LUEBsK','8656496wZdyGi','344612nMRgSi','710788nSbcQB','12WEzEoJ'];_0x4c03=function(){return _0xf4c19c;};return _0x4c03();}
1
+ 'use strict';(function(_0x140685,_0x10ddda){const _0x59b95=_0x486b,_0x51a428=_0x140685();while(!![]){try{const _0x4201b2=parseInt(_0x59b95(0x92))/0x1+-parseInt(_0x59b95(0x91))/0x2+-parseInt(_0x59b95(0x8d))/0x3*(-parseInt(_0x59b95(0x93))/0x4)+parseInt(_0x59b95(0x8b))/0x5*(parseInt(_0x59b95(0x94))/0x6)+parseInt(_0x59b95(0x8e))/0x7+parseInt(_0x59b95(0x8f))/0x8*(parseInt(_0x59b95(0x90))/0x9)+-parseInt(_0x59b95(0x8c))/0xa;if(_0x4201b2===_0x10ddda)break;else _0x51a428['push'](_0x51a428['shift']());}catch(_0x321da6){_0x51a428['push'](_0x51a428['shift']());}}}(_0x2a84,0x49fa4));var __importDefault=this&&this['__importDefault']||function(_0x8a8b2e){return _0x8a8b2e&&_0x8a8b2e['__esModule']?_0x8a8b2e:{'default':_0x8a8b2e};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['arrayToHash']=exports['isStreamMessage']=exports['parseStreamMessage']=exports['s']=exports['isValidCron']=exports['restoreHierarchy']=exports['getValueByPath']=exports['getIndexedHash']=exports['getSymVal']=exports['getSymKey']=exports['formatISODate']=exports['getTimeSeries']=exports['getSubscriptionTopic']=exports['findSubscriptionForTrigger']=exports['findTopKey']=exports['matchesStatus']=exports['matchesStatusCode']=exports['polyfill']=exports['identifyProvider']=exports['XSleepFor']=exports['sleepImmediate']=exports['sleepFor']=exports['guid']=exports['deterministicRandom']=exports['deepCopy']=exports['getSystemHealth']=exports['hashOptions']=void 0x0;const os_1=__importDefault(require('os')),crypto_1=require('crypto'),nanoid_1=require('nanoid'),ms_1=__importDefault(require('ms')),logger_1=require('../services/logger'),enums_1=require('./enums'),logger=new logger_1['LoggerService']('hotmesh','utils'),hashOptions=_0x4f4961=>{const _0x22773b=JSON['stringify'](_0x4f4961);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x22773b)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0x4b5632=os_1['default']['totalmem'](),_0x12f520=os_1['default']['freemem'](),_0x297612=_0x4b5632-_0x12f520,_0xb7897b={'TotalMemoryGB':(_0x4b5632/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x12f520/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x297612/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0xb7897b;}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x3a6e9a){return JSON['parse'](JSON['stringify'](_0x3a6e9a));}exports['deepCopy']=deepCopy;function deterministicRandom(_0x173bdc){const _0xd7b96b=Math['sin'](_0x173bdc)*0x2710;return _0xd7b96b-Math['floor'](_0xd7b96b);}exports['deterministicRandom']=deterministicRandom;function guid(_0x38e5a2=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x38e5a2);}exports['guid']=guid;async function sleepFor(_0x2c75eb){return new Promise(_0x4e4668=>setTimeout(_0x4e4668,_0x2c75eb));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x9b9f11=>setImmediate(_0x9b9f11));}exports['sleepImmediate']=sleepImmediate;function _0x486b(_0x23a3ec,_0x1dcec0){const _0x2a84f0=_0x2a84();return _0x486b=function(_0x486b25,_0x31abff){_0x486b25=_0x486b25-0x8b;let _0x32b5aa=_0x2a84f0[_0x486b25];return _0x32b5aa;},_0x486b(_0x23a3ec,_0x1dcec0);}function XSleepFor(_0x10aca9){let _0x2e66df;const _0x118d6f=new Promise(_0x21c5ba=>{_0x2e66df=setTimeout(_0x21c5ba,_0x10aca9);});return{'promise':_0x118d6f,'timerId':_0x2e66df};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x4897b8){const _0x46ee32=Object['getPrototypeOf'](_0x4897b8);if(_0x4897b8['Query']?.['prototype']||Object['keys'](_0x4897b8)['includes']('database')||_0x46ee32['name']==='Pool')return'postgres';else{if(_0x4897b8['toString']()['toLowerCase']()['includes']('nats'))return'nats';else{if('defineCommand'in _0x46ee32||Object['keys'](_0x46ee32)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x46ee32)['includes']('Multi'))return'redis';}}}if(_0x4897b8['constructor']){if(_0x4897b8['constructor']['name']==='Redis'||_0x4897b8['constructor']['name']==='EventEmitter'){if('hset'in _0x4897b8)return'ioredis';}else{if(_0x4897b8['constructor']['name']==='ProviderClient'||_0x4897b8['constructor']['name']==='Commander'){if('HSET'in _0x4897b8)return'redis';}}}let _0x1482e3=null;if(Object['keys'](_0x4897b8)['includes']('connection')||!isNaN(_0x4897b8['totalCount'])&&!isNaN(_0x4897b8['idleCount']))_0x1482e3='postgres';else{if(Object['keys'](_0x4897b8)['includes']('Pipeline'))_0x1482e3='ioredis';else{if(Object['keys'](_0x4897b8)['includes']('createClient'))_0x1482e3='redis';else _0x46ee32['constructor']['toString']()['includes']('NatsConnectionImpl')&&(_0x1482e3='nats');}}return _0x1482e3;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x387e1b){return _0x387e1b==='activity'?'hook':_0x387e1b;},'providerConfig'(_0x19f955){return _0x19f955?.['connection']??_0x19f955?.['redis']??_0x19f955?.['connections'];},'meshDataConfig'(_0x444d92){if(_0x444d92?.['connections'])return _0x444d92['connections'];return _0x444d92?.['connection']??{'class':_0x444d92?.['redisClass'],'options':_0x444d92?.['redisOptions']};}};function matchesStatusCode(_0xff4784,_0x479819){if(typeof _0x479819==='string'){const _0x49a7a2='^'+_0x479819['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x49a7a2)['test'](_0xff4784['toString']());}return _0x479819['test'](_0xff4784['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x4717ac,_0x74018a){return _0x4717ac===_0x74018a;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x512301,_0x2a0921){for(const [_0x17fe13,_0x2177ae]of Object['entries'](_0x512301)){if(_0x2177ae['hasOwnProperty'](_0x2a0921)){const _0x2ba351=findTopKey(_0x512301,_0x17fe13['replace'](/^\./,''));return(_0x2ba351||_0x17fe13)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function _0x2a84(){const _0x1ec9dd=['113644lMGzaZ','167256wsYtaz','80jZSFkJ','7102790Vqyrps','21dcfeRn','791259CPFzsK','376bRJgxk','77157fbyKJK','1023290LeozwZ','364075Workjl'];_0x2a84=function(){return _0x1ec9dd;};return _0x2a84();}function findSubscriptionForTrigger(_0x58652b,_0xa0c512){for(const [_0x56c7b1,_0x965c6]of Object['entries'](_0x58652b)){if(_0x965c6===_0xa0c512)return _0x56c7b1;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0x29846f,_0x279dfb,_0x4b6a21){const _0x2754bf=await _0x279dfb['getTransitions'](_0x4b6a21),_0x372467=await _0x279dfb['getSubscriptions'](_0x4b6a21),_0x38dea4=findTopKey(_0x2754bf,_0x29846f),_0x12cab3=findSubscriptionForTrigger(_0x372467,_0x38dea4);return _0x12cab3;}exports['getSubscriptionTopic']=getSubscriptionTopic;function getTimeSeries(_0x4a41d8){if(_0x4a41d8['toString']()==='infinity')return'0';const _0x134ef1=new Date(),_0x380670=_0x4a41d8['slice'](-0x1),_0x354556=parseInt(_0x4a41d8['slice'](0x0,-0x1),0xa);if(_0x380670==='m'){const _0x72d8=Math['floor'](_0x134ef1['getMinutes']()/_0x354556)*_0x354556;_0x134ef1['setUTCMinutes'](_0x72d8,0x0,0x0);}else _0x380670==='h'&&_0x134ef1['setUTCMinutes'](0x0,0x0,0x0);return _0x134ef1['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x4531ee){const _0x33d7ae=_0x4531ee instanceof Date?_0x4531ee:new Date(_0x4531ee);return _0x33d7ae['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0x31f7c8){const _0x55aaab='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x33127b=_0x55aaab['length'];if(_0x31f7c8<0x0||_0x31f7c8>=Math['pow'](_0x33127b,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x435e31,_0xdbc3bc]=divmod(_0x31f7c8,_0x33127b),[_0x4a9ff8,_0x73bd47]=divmod(_0x435e31,_0x33127b);return _0x55aaab[_0x4a9ff8]+_0x55aaab[_0xdbc3bc]+_0x55aaab[_0x73bd47];}exports['getSymKey']=getSymKey;function getSymVal(_0x4d632c){const _0x38dec4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x57737e=_0x38dec4['length'];if(_0x4d632c<0x0||_0x4d632c>=Math['pow'](_0x57737e,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x5c14c6,_0x27defb]=divmod(_0x4d632c,_0x57737e);return _0x38dec4[_0x5c14c6]+_0x38dec4[_0x27defb];}exports['getSymVal']=getSymVal;function divmod(_0x21df2b,_0x5896ba){return[Math['floor'](_0x21df2b/_0x5896ba),_0x21df2b%_0x5896ba];}function getIndexedHash(_0x1fbbe6,_0x345056){const _0xca8217=_0x1fbbe6[_0x345056]||0x0,_0x446fd1={..._0x1fbbe6};return delete _0x446fd1[_0x345056],[_0xca8217,_0x446fd1];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0x1aadec,_0x1e40a1){const _0x5c4a63=_0x1e40a1['split']('/');let _0x5a403f=_0x1aadec;for(const _0x4635b0 of _0x5c4a63){if(_0x5a403f[_0x4635b0]!==undefined)_0x5a403f=_0x5a403f[_0x4635b0];else return undefined;}return _0x5a403f;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0x16ca76){const _0x403a61={};for(const _0x4518b7 in _0x16ca76){if(_0x16ca76[_0x4518b7]===undefined)continue;const _0x2f995a=_0x4518b7['split']('/');let _0x5e6648=_0x403a61;for(let _0x14b969=0x0;_0x14b969<_0x2f995a['length'];_0x14b969++){_0x14b969===_0x2f995a['length']-0x1?_0x5e6648[_0x2f995a[_0x14b969]]=_0x16ca76[_0x4518b7]:(_0x5e6648[_0x2f995a[_0x14b969]]=_0x5e6648[_0x2f995a[_0x14b969]]||{},_0x5e6648=_0x5e6648[_0x2f995a[_0x14b969]]);}}return _0x403a61;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x37b98b){const _0x1974f9=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x1974f9['test'](_0x37b98b);}exports['isValidCron']=isValidCron;const s=_0x36c6e3=>{return(0x0,ms_1['default'])(_0x36c6e3)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x32238e=>{try{return JSON['parse'](_0x32238e);}catch(_0x388223){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x388223});throw _0x388223;}};exports['parseStreamMessage']=parseStreamMessage;const isStreamMessage=_0xa6d8a7=>{return Array['isArray'](_0xa6d8a7)&&Array['isArray'](_0xa6d8a7[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x3cd3c6=>{const _0x242d59=[];let _0x4af877;for(let _0xdcfec4=0x1;_0xdcfec4<_0x3cd3c6['length'];_0xdcfec4++){const _0x4e4c44=_0x3cd3c6[_0xdcfec4],_0x54865f={};if(Array['isArray'](_0x4e4c44)){for(let _0x59dca0=0x0;_0x59dca0<_0x4e4c44['length'];_0x59dca0+=0x2){const _0x313aed=_0x4e4c44[_0x59dca0],_0x2d1e2c=_0x4e4c44[_0x59dca0+0x1];_0x54865f[_0x313aed]=_0x2d1e2c;}_0x4af877&&(_0x54865f['$']=_0x4af877),_0x242d59['push'](_0x54865f),_0x4af877=undefined;}else _0x4af877=_0x4e4c44;}return _0x242d59;};exports['arrayToHash']=arrayToHash;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.3.19",
3
+ "version": "0.3.20",
4
4
  "description": "Serverless Workflow",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -27,14 +27,14 @@
27
27
  "test:connect:nats": "NODE_ENV=test jest ./tests/unit/services/connector/providers/nats.test.ts --detectOpenHandles --forceExit --verbose",
28
28
  "test:cycle": "NODE_ENV=test jest ./tests/functional/cycle/*.test.ts --detectOpenHandles --forceExit --verbose",
29
29
  "test:meshflow": "NODE_ENV=test jest ./tests/meshflow/*/*.test.ts --detectOpenHandles --forceExit --verbose",
30
- "test:meshflow:basic": "NODE_ENV=test jest ./tests/meshflow/basic/*.test.ts --detectOpenHandles --forceExit --verbose",
30
+ "test:meshflow:basic": "HMSH_LOGLEVEL=info NODE_ENV=test jest ./tests/meshflow/basic/*.test.ts --detectOpenHandles --forceExit --verbose",
31
31
  "test:meshflow:collision": "NODE_ENV=test jest ./tests/meshflow/collision/*.test.ts --detectOpenHandles --forceExit --verbose",
32
32
  "test:meshflow:fatal": "NODE_ENV=test jest ./tests/meshflow/fatal/*.test.ts --detectOpenHandles --forceExit --verbose",
33
33
  "test:meshflow:goodbye": "NODE_ENV=test jest ./tests/meshflow/goodbye/*.test.ts --detectOpenHandles --forceExit --verbose",
34
34
  "test:meshflow:hello": "HMSH_LOGLEVEL=debug HMSH_IS_CLUSTER=true NODE_ENV=test jest ./tests/meshflow/helloworld/*.test.ts --detectOpenHandles --forceExit --verbose",
35
35
  "test:meshflow:hook": "NODE_ENV=test jest ./tests/meshflow/hook/*.test.ts --detectOpenHandles --forceExit --verbose",
36
36
  "test:meshflow:interrupt": "NODE_ENV=test jest ./tests/meshflow/interrupt/*.test.ts --detectOpenHandles --forceExit --verbose",
37
- "test:meshflow:loopactivity": "NODE_ENV=test jest ./tests/meshflow/loopactivity/*.test.ts --detectOpenHandles --forceExit --verbose",
37
+ "test:meshflow:loopactivity": "NODE_ENV=test jest ./tests/meshflow/loopactivity/I.test.ts --detectOpenHandles --forceExit --verbose",
38
38
  "test:meshflow:nested": "NODE_ENV=test jest ./tests/meshflow/nested/*.test.ts --detectOpenHandles --forceExit --verbose",
39
39
  "test:meshflow:retry": "NODE_ENV=test jest ./tests/meshflow/retry/*.test.ts --detectOpenHandles --forceExit --verbose",
40
40
  "test:meshflow:sleep": "NODE_ENV=test jest ./tests/meshflow/sleep/*.test.ts --detectOpenHandles --forceExit --verbose",
@@ -68,8 +68,9 @@
68
68
  "test:sub:ioredis": "NODE_ENV=test jest ./tests/functional/sub/providers/redis/ioredis.test.ts --detectOpenHandles --forceExit --verbose",
69
69
  "test:sub:redis": "NODE_ENV=test jest ./tests/functional/sub/providers/redis/redis.test.ts --detectOpenHandles --forceExit --verbose",
70
70
  "test:sub:postgres": "NODE_ENV=test jest ./tests/functional/sub/providers/postgres/postgres.test.ts --detectOpenHandles --forceExit --verbose",
71
+ "test:sub:nats": "NODE_ENV=test jest ./tests/functional/sub/providers/nats/nats.test.ts --detectOpenHandles --forceExit --verbose",
71
72
  "test:trigger": "NODE_ENV=test jest ./tests/unit/services/activities/trigger.test.ts --detectOpenHandles --forceExit --verbose",
72
- "test:meshdata": "NODE_ENV=test jest ./tests/meshdata/postgres.test.ts --forceExit --verbose --detectOpenHandles",
73
+ "test:meshdata": "NODE_ENV=test jest ./tests/meshdata/*.test.ts --forceExit --verbose --detectOpenHandles",
73
74
  "test:meshos": "NODE_ENV=test HMSH_IS_CLUSTER=true jest ./tests/meshos/*.test.ts --forceExit --verbose --detectOpenHandles",
74
75
  "test:meshcall": "NODE_ENV=test jest ./tests/meshcall/*.test.ts --forceExit --verbose --detectOpenHandles",
75
76
  "test:unit": "NODE_ENV=test jest ./tests/unit/*/*/index.test.ts --detectOpenHandles --forceExit --verbose"
@@ -1 +1 @@
1
- 'use strict';(function(_0x4ab29a,_0x3efde0){const _0x48711b=_0xa152,_0xcaefb7=_0x4ab29a();while(!![]){try{const _0x48bb84=parseInt(_0x48711b(0x189))/0x1*(-parseInt(_0x48711b(0x187))/0x2)+parseInt(_0x48711b(0x18a))/0x3+parseInt(_0x48711b(0x18b))/0x4*(-parseInt(_0x48711b(0x18d))/0x5)+parseInt(_0x48711b(0x188))/0x6*(-parseInt(_0x48711b(0x18f))/0x7)+-parseInt(_0x48711b(0x18e))/0x8*(parseInt(_0x48711b(0x185))/0x9)+parseInt(_0x48711b(0x18c))/0xa+parseInt(_0x48711b(0x186))/0xb;if(_0x48bb84===_0x3efde0)break;else _0xcaefb7['push'](_0xcaefb7['shift']());}catch(_0x27c6da){_0xcaefb7['push'](_0xcaefb7['shift']());}}}(_0x3f59,0x50922));function _0x3f59(){const _0x90ad2c=['232RBlSjV','204iZllts','1459OhTZYl','659250WJpCFr','4ryGbDc','1034100DLyzmc','1285945wUfujt','14688MeRizQ','123277JcVRuW','2961iylkMP','17997199gqXbyO'];_0x3f59=function(){return _0x90ad2c;};return _0x3f59();}function _0xa152(_0x29e366,_0x50a888){const _0x3f593b=_0x3f59();return _0xa152=function(_0xa1527a,_0x2d0611){_0xa1527a=_0xa1527a-0x185;let _0x4257ae=_0x3f593b[_0xa1527a];return _0x4257ae;},_0xa152(_0x29e366,_0x50a888);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Activity']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),serializer_1=require('../serializer'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');class Activity{constructor(_0x72cdd9,_0xf75cb,_0x30015b,_0x140327,_0x25be58,_0xd953fc){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x72cdd9,this['data']=_0xf75cb,this['metadata']=_0x30015b,this['hook']=_0x140327,this['engine']=_0x25be58,this['context']=_0xd953fc||{'data':{},'metadata':{}},this['logger']=_0x25be58['logger'],this['store']=_0x25be58['store'];}['setLeg'](_0x234623){this['leg']=_0x234623;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x14ac3e=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x14ac3e!==undefined&&!isNaN(Number(_0x14ac3e)))return _0x14ac3e;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x1936a4=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x1936a4);}catch(_0x3017b6){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x1936a4>0x0){if(this['context']['metadata']['js']===_0x1936a4){const _0x5a5301=await this['setStatus'](-_0x1936a4);Number(_0x5a5301)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x3017b6;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x3ebca5=this['context']['metadata']['guid'];return this['setLeg'](0x2),await this['getState'](),collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid']),await collator_1['CollatorService']['notarizeReentry'](this,_0x3ebca5);}async['processEvent'](_0x1c4043=stream_1['StreamStatus']['SUCCESS'],_0x177106=0xc8,_0x58c75f='output'){this['setLeg'](0x2);const _0x163724=this['context']['metadata']['jid'];if(!_0x163724){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x3bfd1a=this['metadata']['aid'];this['status']=_0x1c4043,this['code']=_0x177106,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x163724,'aid':_0x3bfd1a,'status':_0x1c4043,'code':_0x177106});let _0x53c987;try{const _0x1136dc=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x1136dc),_0x53c987=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x53c987['startActivitySpan'](this['leg']);let _0x37b5ba;if(_0x1c4043===stream_1['StreamStatus']['PENDING'])_0x37b5ba=await this['processPending'](_0x58c75f);else _0x1c4043===stream_1['StreamStatus']['SUCCESS']?_0x37b5ba=await this['processSuccess'](_0x58c75f):_0x37b5ba=await this['processError']();this['transitionAdjacent'](_0x37b5ba,_0x53c987);}catch(_0x199e89){if(_0x199e89 instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x199e89['fault']+'-error',{..._0x199e89});return;}else{if(_0x199e89 instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x199e89});return;}else{if(_0x199e89 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x199e89});return;}else{if(_0x199e89 instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x199e89});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x199e89,'message':_0x199e89['message'],'stack':_0x199e89['stack'],'name':_0x199e89['name']}),_0x53c987?.['setActivityError'](_0x199e89['message']);throw _0x199e89;}finally{_0x53c987?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x163724,'aid':_0x3bfd1a});}}async['processPending'](_0x40eee8){this['bindActivityData'](_0x40eee8),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x385ba2=this['store']['transact']();return await this['setState'](_0x385ba2),await collator_1['CollatorService']['notarizeContinuation'](this,_0x385ba2),await this['setStatus'](this['adjacencyList']['length'],_0x385ba2),await _0x385ba2['exec']();}async['processSuccess'](_0x1618cf){this['bindActivityData'](_0x1618cf),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x77765a=this['store']['transact']();return await this['setState'](_0x77765a),await collator_1['CollatorService']['notarizeCompletion'](this,_0x77765a),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x77765a),await _0x77765a['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x5afb91=this['store']['transact']();return await this['setState'](_0x5afb91),await collator_1['CollatorService']['notarizeCompletion'](this,_0x5afb91),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x5afb91),await _0x5afb91['exec']();}async['transitionAdjacent'](_0x431f70,_0x664f0){_0x664f0['mapActivityAttributes']();const _0x4707dd=this['resolveStatus'](_0x431f70),_0x2cc242={'app.job.jss':_0x4707dd},_0x35bd95=await this['transition'](this['adjacencyList'],_0x4707dd);_0x35bd95?.['length']&&(_0x2cc242['app.activity.mids']=_0x35bd95['join'](',')),_0x664f0['setActivityAttributes'](_0x2cc242);}['resolveStatus'](_0x4a4795){const _0x4ce38b=_0x4a4795[_0x4a4795['length']-0x1];return Array['isArray'](_0x4ce38b)?Number(_0x4ce38b[0x1]):Number(_0x4ce38b);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x465d2c=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x384cee=_0x465d2c['mapRules']();if(_0x384cee)for(const _0x3d97ad in _0x384cee){const _0x1aebd0=_0x3d97ad['indexOf']('[');if(_0x1aebd0>-0x1){const _0x46c7f3=_0x3d97ad['substring'](_0x1aebd0+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x46c7f3))){const _0x177e96=_0x3d97ad['substring'](0x0,_0x1aebd0);_0x384cee[_0x177e96]=_0x384cee[_0x3d97ad],delete _0x384cee[_0x3d97ad];}else{if(_0x46c7f3==='-'||_0x46c7f3==='_'){const _0x3c9f11=_0x384cee[_0x3d97ad];Object['keys'](_0x3c9f11)['forEach'](_0x53e4f9=>{_0x384cee[_0x53e4f9]=_0x3c9f11[_0x53e4f9];});}}}}this['context']['data']=_0x384cee;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x17aaf5=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x17aaf5['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x1d0e30=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x85bb6b=_0x1d0e30['mapRules'](),_0x2aa761=this['metadata']['aid'],_0x26d243={...this['context'][_0x2aa761]['output'],..._0x85bb6b};this['context'][_0x2aa761]['output']['data']=_0x26d243;}}async['registerTimeout'](){}['bindActivityError'](_0x3c4b3f){const _0x1c8abe=this['context'][this['metadata']['aid']]['output']['metadata'];_0x1c8abe['err']=JSON['stringify'](this['data']),_0x1c8abe['$error']={..._0x3c4b3f,'is_stream_error':!![]};}['bindJobError'](_0x243af5){this['context']['metadata']['err']=JSON['stringify']({..._0x243af5,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x4a52d3,_0x1be6f4){const {id:_0x422e13}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x4a52d3,this['context']['metadata']['jid'],_0x422e13,_0x1be6f4);}['authorizeEntry'](_0x5a294d){return this['adjacencyList']?.['map'](_0x2cfbb9=>{const {metadata:{aid:_0x4443bf}}=_0x2cfbb9;return _0x5a294d[_0x4443bf+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x4443bf;})??[];}['bindDimensionalAddress'](_0x4595c1){const _0x363b43=this['resolveDad']();_0x4595c1[this['metadata']['aid']+'/output/metadata/dad']=_0x363b43;}async['setState'](_0x199dd2){const _0x10bc52=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x1d155a={};await this['bindJobState'](_0x1d155a);const _0x2170f5=this['authorizeEntry'](_0x1d155a);this['bindDimensionalAddress'](_0x1d155a),this['bindActivityState'](_0x1d155a);const _0x3add3c=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x2170f5],_0x286f1d=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x1d155a,this['getJobStatus'](),_0x10bc52,_0x3add3c,_0x286f1d,_0x199dd2);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x56785e=this['context']['$self'];!_0x56785e['output']['metadata']&&(_0x56785e['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x56785e['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x423cfe=(0x0,utils_1['formatISODate'])(new Date());_0x56785e['output']['metadata']['ac']=_0x423cfe,_0x56785e['output']['metadata']['au']=_0x423cfe,_0x56785e['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x56785e['output']['metadata']['stp']=this['config']['subtype']),_0x56785e['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x597ad0){const _0x1e6516=await this['getTriggerConfig'](),_0x4b9df0=[..._0x1e6516['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x43baa1 of _0x4b9df0){const _0x390b53=(0x0,utils_1['getValueByPath'])(this['context'],_0x43baa1);_0x390b53!==undefined&&(_0x597ad0[_0x43baa1]=_0x390b53);}for(const _0x241c8a in this['context']?.['data']??{}){(_0x241c8a['startsWith']('-')||_0x241c8a['startsWith']('_'))&&(_0x597ad0[_0x241c8a]=this['context']['data'][_0x241c8a]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x597ad0,this['config'],this['context']);}['bindActivityState'](_0xfa3084){const _0x2f0873=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x1cdd0e of _0x2f0873){const _0x2d1928=this['metadata']['aid']+'/'+_0x1cdd0e,_0x3d7622=(0x0,utils_1['getValueByPath'])(this['context'],_0x2d1928);_0x3d7622!==undefined&&(_0xfa3084[_0x2d1928]=_0x3d7622);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0xfa3084,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x35a5d0=>'metadata/'+_0x35a5d0);}['bindActivityMetadataPaths'](){const _0x5a1dbc=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x5a1dbc]['KEYS']['map'](_0x2f2d73=>'output/metadata/'+_0x2f2d73);}async['getState'](){const _0x35848c=this['context']['metadata']['gid'],_0x448fbe='$'+this['config']['subscribes'],_0x576eac={[_0x448fbe]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x6c8306=>'metadata/'+_0x6c8306)};for(let [_0xb9f04,_0x3ac0c2]of Object['entries'](this['config']['consumes'])){if(_0xb9f04==='$job')for(const _0x4179ed of _0x3ac0c2){_0x576eac[_0x448fbe]['push'](_0x4179ed);}else{_0xb9f04==='$self'&&(_0xb9f04=this['metadata']['aid']);!_0x576eac[_0xb9f04]&&(_0x576eac[_0xb9f04]=[]);for(const _0x2599e3 of _0x3ac0c2){_0x576eac[_0xb9f04]['push'](_0xb9f04+'/'+_0x2599e3);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x576eac,this['config'],this['metadata'],this['leg']);const {dad:_0x2c5104,jid:_0x12421a}=this['context']['metadata'],_0x59dd07=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x2c5104||''),[_0x4bb766,_0x52a4e3]=await this['store']['getState'](_0x12421a,_0x576eac,_0x59dd07);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x4bb766),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x35848c),this['initDimensionalAddress'](_0x2c5104),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x504d07,_0x1aa77e){if(_0x1aa77e!==_0x504d07)throw new errors_1['GenerationalError'](_0x504d07,_0x1aa77e,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0xdf30ee){this['metadata']['dad']=_0xdf30ee;}['initSelf'](_0x16bb85){const _0x5d6bbc=this['metadata']['aid'];!_0x16bb85[_0x5d6bbc]&&(_0x16bb85[_0x5d6bbc]={});const _0x61e5b3=_0x16bb85[_0x5d6bbc];return!_0x61e5b3['output']&&(_0x61e5b3['output']={}),!_0x61e5b3['input']&&(_0x61e5b3['input']={}),!_0x61e5b3['hook']&&(_0x61e5b3['hook']={}),!_0x61e5b3['output']['metadata']&&(_0x61e5b3['output']['metadata']={}),_0x61e5b3['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x16bb85['$self']=_0x61e5b3,_0x16bb85['$job']=_0x16bb85,_0x16bb85;}['initPolicies'](_0x57a3e0){const _0x151aa2=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x57a3e0);_0x57a3e0['metadata']['expire']=_0x151aa2;if(this['config']['persistent']!=undefined){const _0xdafcea=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x57a3e0);_0x57a3e0['metadata']['persistent']=_0xdafcea;}}['bindActivityData'](_0x569893){this['context'][this['metadata']['aid']][_0x569893]['data']=this['data'];}['resolveDad'](){let _0x41875a=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x41875a=_0x41875a['substring'](0x0,_0x41875a['lastIndexOf'](','))+','+this['adjacentIndex']),_0x41875a;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x58863e=[],_0x2d8502=await this['store']['getTransitions'](await this['engine']['getVID']()),_0xd0a561=_0x2d8502['.'+this['metadata']['aid']],_0x42c0e2=this['resolveAdjacentDad']();if(_0xd0a561)for(const _0x3ebb81 in _0xd0a561){const _0x46b275=_0xd0a561[_0x3ebb81];mapper_1['MapperService']['evaluate'](_0x46b275,this['context'],this['code'])&&_0x58863e['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x42c0e2,'aid':_0x3ebb81,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x58863e;}['isJobComplete'](_0x532f32){return _0x532f32<=0x0;}['shouldEmit'](){if(this['config']['emit'])return pipe_1['Pipe']['resolve'](this['config']['emit'],this['context'])===!![];return![];}['shouldPersistJob'](){if(this['config']['persist']!==undefined)return pipe_1['Pipe']['resolve'](this['config']['persist'],this['context'])===!![];return![];}async['transition'](_0x2e0f9f,_0x1039de){if(this['jobWasInterrupted'](_0x1039de))return;let _0x115f37=[];(this['shouldEmit']()||this['isJobComplete'](_0x1039de)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x1039de)&&!this['shouldPersistJob']()});if(_0x2e0f9f['length']&&!this['isJobComplete'](_0x1039de)){const _0x5a5a58=this['store']['transact']();for(const _0x173119 of _0x2e0f9f){await this['engine']['router']?.['publishMessage'](null,_0x173119,_0x5a5a58);}_0x115f37=await _0x5a5a58['exec']();}return _0x115f37;}['jobWasInterrupted'](_0x568989){return _0x568989<-0x5f5e100;}}exports['Activity']=Activity;
1
+ 'use strict';(function(_0x26369d,_0x4e7c0c){const _0xfbd5c6=_0x5491,_0x4e50d1=_0x26369d();while(!![]){try{const _0x3203eb=-parseInt(_0xfbd5c6(0x9d))/0x1*(-parseInt(_0xfbd5c6(0x94))/0x2)+-parseInt(_0xfbd5c6(0x99))/0x3*(parseInt(_0xfbd5c6(0x95))/0x4)+-parseInt(_0xfbd5c6(0x93))/0x5*(parseInt(_0xfbd5c6(0x9c))/0x6)+parseInt(_0xfbd5c6(0x98))/0x7+-parseInt(_0xfbd5c6(0x9a))/0x8*(-parseInt(_0xfbd5c6(0x9b))/0x9)+parseInt(_0xfbd5c6(0x96))/0xa*(parseInt(_0xfbd5c6(0x9e))/0xb)+-parseInt(_0xfbd5c6(0x97))/0xc;if(_0x3203eb===_0x4e7c0c)break;else _0x4e50d1['push'](_0x4e50d1['shift']());}catch(_0xde85d0){_0x4e50d1['push'](_0x4e50d1['shift']());}}}(_0x234f,0x1c286));function _0x5491(_0x29fe15,_0x2e90dc){const _0x234f3b=_0x234f();return _0x5491=function(_0x5491be,_0x55978f){_0x5491be=_0x5491be-0x93;let _0x27bbf4=_0x234f3b[_0x5491be];return _0x27bbf4;},_0x5491(_0x29fe15,_0x2e90dc);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Activity']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),serializer_1=require('../serializer'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');function _0x234f(){const _0x25324b=['554148dmDopD','48JTVeeV','442568CrBNij','36ZYtKUz','27474jJpyaf','2pWnxXW','22RsjAee','60mhrOwQ','167374LgivAn','15472lKRdvm','1046620EoBpEv','5339712XOqSGk'];_0x234f=function(){return _0x25324b;};return _0x234f();}class Activity{constructor(_0x20d81f,_0x3fd45b,_0x2953af,_0x4430a6,_0x32d468,_0x2be8bf){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x20d81f,this['data']=_0x3fd45b,this['metadata']=_0x2953af,this['hook']=_0x4430a6,this['engine']=_0x32d468,this['context']=_0x2be8bf||{'data':{},'metadata':{}},this['logger']=_0x32d468['logger'],this['store']=_0x32d468['store'];}['setLeg'](_0x4f0e5c){this['leg']=_0x4f0e5c;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x2d17b5=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x2d17b5!==undefined&&!isNaN(Number(_0x2d17b5)))return _0x2d17b5;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x17c1f7=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x17c1f7);}catch(_0x2113ec){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x17c1f7>0x0){if(this['context']['metadata']['js']===_0x17c1f7){const _0x5235fa=await this['setStatus'](-_0x17c1f7);Number(_0x5235fa)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x2113ec;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x1aa905=this['context']['metadata']['guid'];return this['setLeg'](0x2),await this['getState'](),collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid']),await collator_1['CollatorService']['notarizeReentry'](this,_0x1aa905);}async['processEvent'](_0x1bc726=stream_1['StreamStatus']['SUCCESS'],_0x344d66=0xc8,_0x429936='output'){this['setLeg'](0x2);const _0x850d22=this['context']['metadata']['jid'];if(!_0x850d22){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x5ac4fc=this['metadata']['aid'];this['status']=_0x1bc726,this['code']=_0x344d66,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x850d22,'aid':_0x5ac4fc,'status':_0x1bc726,'code':_0x344d66});let _0x5782db;try{const _0x4dc09c=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x4dc09c),_0x5782db=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5782db['startActivitySpan'](this['leg']);let _0xa2c867;if(_0x1bc726===stream_1['StreamStatus']['PENDING'])_0xa2c867=await this['processPending'](_0x429936);else _0x1bc726===stream_1['StreamStatus']['SUCCESS']?_0xa2c867=await this['processSuccess'](_0x429936):_0xa2c867=await this['processError']();this['transitionAdjacent'](_0xa2c867,_0x5782db);}catch(_0x4fcc1e){if(_0x4fcc1e instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x4fcc1e['fault']+'-error',{..._0x4fcc1e});return;}else{if(_0x4fcc1e instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x4fcc1e});return;}else{if(_0x4fcc1e instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x4fcc1e});return;}else{if(_0x4fcc1e instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x4fcc1e});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x4fcc1e,'message':_0x4fcc1e['message'],'stack':_0x4fcc1e['stack'],'name':_0x4fcc1e['name']}),_0x5782db?.['setActivityError'](_0x4fcc1e['message']);throw _0x4fcc1e;}finally{_0x5782db?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x850d22,'aid':_0x5ac4fc});}}async['processPending'](_0xdf5d78){this['bindActivityData'](_0xdf5d78),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x240639=this['store']['transact']();return await this['setState'](_0x240639),await collator_1['CollatorService']['notarizeContinuation'](this,_0x240639),await this['setStatus'](this['adjacencyList']['length'],_0x240639),await _0x240639['exec']();}async['processSuccess'](_0x4577fa){this['bindActivityData'](_0x4577fa),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x1314b6=this['store']['transact']();return await this['setState'](_0x1314b6),await collator_1['CollatorService']['notarizeCompletion'](this,_0x1314b6),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x1314b6),await _0x1314b6['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x34561b=this['store']['transact']();return await this['setState'](_0x34561b),await collator_1['CollatorService']['notarizeCompletion'](this,_0x34561b),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x34561b),await _0x34561b['exec']();}async['transitionAdjacent'](_0x343e56,_0x5793b9){_0x5793b9['mapActivityAttributes']();const _0xc642fb=this['resolveStatus'](_0x343e56),_0x47ef49={'app.job.jss':_0xc642fb},_0xbbbd94=await this['transition'](this['adjacencyList'],_0xc642fb);_0xbbbd94?.['length']&&(_0x47ef49['app.activity.mids']=_0xbbbd94['join'](',')),_0x5793b9['setActivityAttributes'](_0x47ef49);}['resolveStatus'](_0x59d7c0){const _0x36e449=_0x59d7c0[_0x59d7c0['length']-0x1];return Array['isArray'](_0x36e449)?Number(_0x36e449[0x1]):Number(_0x36e449);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x1b4732=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x59996e=_0x1b4732['mapRules']();if(_0x59996e)for(const _0x48f314 in _0x59996e){const _0x1a966c=_0x48f314['indexOf']('[');if(_0x1a966c>-0x1){const _0x727533=_0x48f314['substring'](_0x1a966c+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x727533))){const _0x3e46bc=_0x48f314['substring'](0x0,_0x1a966c);_0x59996e[_0x3e46bc]=_0x59996e[_0x48f314],delete _0x59996e[_0x48f314];}else{if(_0x727533==='-'||_0x727533==='_'){const _0x4a4a66=_0x59996e[_0x48f314];Object['keys'](_0x4a4a66)['forEach'](_0x317fb3=>{_0x59996e[_0x317fb3]=_0x4a4a66[_0x317fb3];});}}}}this['context']['data']=_0x59996e;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x505636=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x505636['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0xb2cd6b=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x1b4330=_0xb2cd6b['mapRules'](),_0x362c4a=this['metadata']['aid'],_0x1664c7={...this['context'][_0x362c4a]['output'],..._0x1b4330};this['context'][_0x362c4a]['output']['data']=_0x1664c7;}}async['registerTimeout'](){}['bindActivityError'](_0x4049ce){const _0x5b3469=this['context'][this['metadata']['aid']]['output']['metadata'];_0x5b3469['err']=JSON['stringify'](this['data']),_0x5b3469['$error']={..._0x4049ce,'is_stream_error':!![]};}['bindJobError'](_0x262191){this['context']['metadata']['err']=JSON['stringify']({..._0x262191,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x241119,_0x445a78){const {id:_0x14866c}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x241119,this['context']['metadata']['jid'],_0x14866c,_0x445a78);}['authorizeEntry'](_0x1ff7b6){return this['adjacencyList']?.['map'](_0x3ce33c=>{const {metadata:{aid:_0x1b7b94}}=_0x3ce33c;return _0x1ff7b6[_0x1b7b94+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x1b7b94;})??[];}['bindDimensionalAddress'](_0x4aac43){const _0x24ed62=this['resolveDad']();_0x4aac43[this['metadata']['aid']+'/output/metadata/dad']=_0x24ed62;}async['setState'](_0x561702){const _0x2df7f8=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0xc80f76={};await this['bindJobState'](_0xc80f76);const _0x3af0dd=this['authorizeEntry'](_0xc80f76);this['bindDimensionalAddress'](_0xc80f76),this['bindActivityState'](_0xc80f76);const _0x376719=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x3af0dd],_0x478f5a=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0xc80f76,this['getJobStatus'](),_0x2df7f8,_0x376719,_0x478f5a,_0x561702);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x369c85=this['context']['$self'];!_0x369c85['output']['metadata']&&(_0x369c85['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x369c85['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x1ffcf3=(0x0,utils_1['formatISODate'])(new Date());_0x369c85['output']['metadata']['ac']=_0x1ffcf3,_0x369c85['output']['metadata']['au']=_0x1ffcf3,_0x369c85['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x369c85['output']['metadata']['stp']=this['config']['subtype']),_0x369c85['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x1695e4){const _0x2e04ef=await this['getTriggerConfig'](),_0x15eed6=[..._0x2e04ef['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x5d003c of _0x15eed6){const _0x3d8f68=(0x0,utils_1['getValueByPath'])(this['context'],_0x5d003c);_0x3d8f68!==undefined&&(_0x1695e4[_0x5d003c]=_0x3d8f68);}for(const _0x4f3e96 in this['context']?.['data']??{}){(_0x4f3e96['startsWith']('-')||_0x4f3e96['startsWith']('_'))&&(_0x1695e4[_0x4f3e96]=this['context']['data'][_0x4f3e96]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x1695e4,this['config'],this['context']);}['bindActivityState'](_0x12dfc7){const _0x358e3c=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x471b0f of _0x358e3c){const _0x18c139=this['metadata']['aid']+'/'+_0x471b0f,_0xed47e=(0x0,utils_1['getValueByPath'])(this['context'],_0x18c139);_0xed47e!==undefined&&(_0x12dfc7[_0x18c139]=_0xed47e);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x12dfc7,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x4f18fd=>'metadata/'+_0x4f18fd);}['bindActivityMetadataPaths'](){const _0x340d2a=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x340d2a]['KEYS']['map'](_0x2aa617=>'output/metadata/'+_0x2aa617);}async['getState'](){const _0x49838c=this['context']['metadata']['gid'],_0x322358='$'+this['config']['subscribes'],_0x2ef493={[_0x322358]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0xc54638=>'metadata/'+_0xc54638)};for(let [_0x4f1633,_0x3c9492]of Object['entries'](this['config']['consumes'])){if(_0x4f1633==='$job')for(const _0x4e3465 of _0x3c9492){_0x2ef493[_0x322358]['push'](_0x4e3465);}else{_0x4f1633==='$self'&&(_0x4f1633=this['metadata']['aid']);!_0x2ef493[_0x4f1633]&&(_0x2ef493[_0x4f1633]=[]);for(const _0x3c6eaf of _0x3c9492){_0x2ef493[_0x4f1633]['push'](_0x4f1633+'/'+_0x3c6eaf);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x2ef493,this['config'],this['metadata'],this['leg']);const {dad:_0x1245a7,jid:_0x4eef66}=this['context']['metadata'],_0x5561d0=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x1245a7||''),[_0x41944d,_0x445023]=await this['store']['getState'](_0x4eef66,_0x2ef493,_0x5561d0);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x41944d),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x49838c),this['initDimensionalAddress'](_0x1245a7),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x23ac9c,_0x2fefbf){if(_0x2fefbf!==_0x23ac9c)throw new errors_1['GenerationalError'](_0x23ac9c,_0x2fefbf,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x4a7835){this['metadata']['dad']=_0x4a7835;}['initSelf'](_0x37a5c8){const _0x10b0c2=this['metadata']['aid'];!_0x37a5c8[_0x10b0c2]&&(_0x37a5c8[_0x10b0c2]={});const _0x20c2fc=_0x37a5c8[_0x10b0c2];return!_0x20c2fc['output']&&(_0x20c2fc['output']={}),!_0x20c2fc['input']&&(_0x20c2fc['input']={}),!_0x20c2fc['hook']&&(_0x20c2fc['hook']={}),!_0x20c2fc['output']['metadata']&&(_0x20c2fc['output']['metadata']={}),_0x20c2fc['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x37a5c8['$self']=_0x20c2fc,_0x37a5c8['$job']=_0x37a5c8,_0x37a5c8;}['initPolicies'](_0x8e7332){const _0x5798b8=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x8e7332);_0x8e7332['metadata']['expire']=_0x5798b8;if(this['config']['persistent']!=undefined){const _0x3793af=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x8e7332);_0x8e7332['metadata']['persistent']=_0x3793af;}}['bindActivityData'](_0x278c64){this['context'][this['metadata']['aid']][_0x278c64]['data']=this['data'];}['resolveDad'](){let _0x599cf6=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x599cf6=_0x599cf6['substring'](0x0,_0x599cf6['lastIndexOf'](','))+','+this['adjacentIndex']),_0x599cf6;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x587dd7=[],_0x5ea651=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x4c0ddf=_0x5ea651['.'+this['metadata']['aid']],_0x1ebf08=this['resolveAdjacentDad']();if(_0x4c0ddf)for(const _0x2ba2c7 in _0x4c0ddf){const _0xdc21e0=_0x4c0ddf[_0x2ba2c7];mapper_1['MapperService']['evaluate'](_0xdc21e0,this['context'],this['code'])&&_0x587dd7['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x1ebf08,'aid':_0x2ba2c7,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x587dd7;}['isJobComplete'](_0x586ad8){return _0x586ad8<=0x0;}['shouldEmit'](){if(this['config']['emit'])return pipe_1['Pipe']['resolve'](this['config']['emit'],this['context'])===!![];return![];}['shouldPersistJob'](){if(this['config']['persist']!==undefined)return pipe_1['Pipe']['resolve'](this['config']['persist'],this['context'])===!![];return![];}async['transition'](_0x17af04,_0x45ce87){if(this['jobWasInterrupted'](_0x45ce87))return;let _0x4646bd=[];(this['shouldEmit']()||this['isJobComplete'](_0x45ce87)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x45ce87)&&!this['shouldPersistJob']()});if(_0x17af04['length']&&!this['isJobComplete'](_0x45ce87)){const _0x4cf750=this['store']['transact']();for(const _0x4eac14 of _0x17af04){await this['engine']['router']?.['publishMessage'](null,_0x4eac14,_0x4cf750);}_0x4646bd=await _0x4cf750['exec']();}return _0x4646bd;}['jobWasInterrupted'](_0x1e43ec){return _0x1e43ec<-0x5f5e100;}}exports['Activity']=Activity;
@@ -1 +1 @@
1
- 'use strict';(function(_0x3ec2c2,_0x45a67a){const _0x4fa6b0=_0x5193,_0x1db18e=_0x3ec2c2();while(!![]){try{const _0x13cee6=parseInt(_0x4fa6b0(0x185))/0x1+parseInt(_0x4fa6b0(0x180))/0x2*(parseInt(_0x4fa6b0(0x17e))/0x3)+parseInt(_0x4fa6b0(0x183))/0x4*(-parseInt(_0x4fa6b0(0x186))/0x5)+-parseInt(_0x4fa6b0(0x182))/0x6+-parseInt(_0x4fa6b0(0x181))/0x7+-parseInt(_0x4fa6b0(0x17f))/0x8*(parseInt(_0x4fa6b0(0x17d))/0x9)+parseInt(_0x4fa6b0(0x184))/0xa;if(_0x13cee6===_0x45a67a)break;else _0x1db18e['push'](_0x1db18e['shift']());}catch(_0x390f53){_0x1db18e['push'](_0x1db18e['shift']());}}}(_0x2a89,0xa289b));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Await']=void 0x0;function _0x5193(_0x100efb,_0x3b5805){const _0x2a892d=_0x2a89();return _0x5193=function(_0x519395,_0x539fd8){_0x519395=_0x519395-0x17d;let _0x30b1f6=_0x2a892d[_0x519395];return _0x30b1f6;},_0x5193(_0x100efb,_0x3b5805);}const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');class Await extends activity_1['Activity']{constructor(_0x1a5dbb,_0x3891c1,_0x2e0f7d,_0x65502d,_0x154551,_0x376846){super(_0x1a5dbb,_0x3891c1,_0x2e0f7d,_0x65502d,_0x154551,_0x376846);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x483515;try{await this['verifyEntry'](),_0x483515=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x483515['startActivitySpan'](this['leg']),this['mapInputData']();const _0x4263a4=this['store']['transact'](),_0x4cb28f=await this['execActivity'](_0x4263a4);await collator_1['CollatorService']['authorizeReentry'](this,_0x4263a4),await this['setState'](_0x4263a4),await this['setStatus'](0x0,_0x4263a4);const _0x48828b=await _0x4263a4['exec']();_0x483515['mapActivityAttributes']();const _0x2940dd=this['resolveStatus'](_0x48828b);return _0x483515['setActivityAttributes']({'app.activity.mid':_0x4cb28f,'app.job.jss':_0x2940dd}),this['context']['metadata']['aid'];}catch(_0x3a94fd){if(_0x3a94fd instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x3a94fd});return;}else{if(_0x3a94fd instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3a94fd});return;}else{if(_0x3a94fd instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0x3a94fd});return;}else{if(_0x3a94fd instanceof errors_1['CollationError']){if(_0x3a94fd['fault']==='duplicate'){this['logger']['info']('await-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('await-collation-error',{..._0x3a94fd});}else this['logger']['error']('await-process-error',{..._0x3a94fd});}}}_0x483515?.['setActivityError'](_0x3a94fd['message']);throw _0x3a94fd;}finally{_0x483515?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x79c350){const _0x229223=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x220638={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':this['metadata']['dad'],'aid':this['metadata']['aid'],'topic':_0x229223,'spn':this['context']['$self']['output']['metadata']?.['l1s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['AWAIT'],'data':this['context']['data']};if(this['config']['await']!==!![]){const _0x503dd2=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x503dd2===![]&&(_0x220638['metadata']['await']=![]);}return this['config']['retry']&&(_0x220638['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x220638,_0x79c350);}}exports['Await']=Await;function _0x2a89(){const _0x1f1144=['28353660OHWCYB','32058JIFeYe','438935GkFvbY','2187lJgpaB','3cIKlJn','9232aHpPEo','1322632aCimQo','7940240yWdsyj','4475682EZiXzE','32EvtYdN'];_0x2a89=function(){return _0x1f1144;};return _0x2a89();}
1
+ 'use strict';function _0x2ab3(_0x59bde6,_0x181f22){const _0x411f57=_0x411f();return _0x2ab3=function(_0x2ab3c9,_0x70865){_0x2ab3c9=_0x2ab3c9-0xe6;let _0x26759b=_0x411f57[_0x2ab3c9];return _0x26759b;},_0x2ab3(_0x59bde6,_0x181f22);}(function(_0x2d9d56,_0x4fe0a7){const _0x536bde=_0x2ab3,_0xde6135=_0x2d9d56();while(!![]){try{const _0x1f2c63=parseInt(_0x536bde(0xef))/0x1*(-parseInt(_0x536bde(0xe6))/0x2)+-parseInt(_0x536bde(0xe7))/0x3*(parseInt(_0x536bde(0xf1))/0x4)+parseInt(_0x536bde(0xed))/0x5+-parseInt(_0x536bde(0xeb))/0x6*(parseInt(_0x536bde(0xe9))/0x7)+-parseInt(_0x536bde(0xe8))/0x8*(parseInt(_0x536bde(0xf0))/0x9)+parseInt(_0x536bde(0xea))/0xa*(-parseInt(_0x536bde(0xee))/0xb)+parseInt(_0x536bde(0xec))/0xc;if(_0x1f2c63===_0x4fe0a7)break;else _0xde6135['push'](_0xde6135['shift']());}catch(_0x596917){_0xde6135['push'](_0xde6135['shift']());}}}(_0x411f,0xcd551));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Await']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');function _0x411f(){const _0x2d75a4=['552HldLao','60134652CBTXWp','1145570aTBcBh','3509517uVxSJi','33OrVMQu','59868KmwYge','272txHTAL','53758wwlrax','33621ouHFMS','1648vLGlqJ','80717lnEGlo','10KUECtX'];_0x411f=function(){return _0x2d75a4;};return _0x411f();}class Await extends activity_1['Activity']{constructor(_0x4bbfbe,_0x30472b,_0x4d61aa,_0x2178ac,_0x1cbbdf,_0x5b6e24){super(_0x4bbfbe,_0x30472b,_0x4d61aa,_0x2178ac,_0x1cbbdf,_0x5b6e24);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x481a65;try{await this['verifyEntry'](),_0x481a65=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x481a65['startActivitySpan'](this['leg']),this['mapInputData']();const _0x1e3533=this['store']['transact'](),_0x3884d9=await this['execActivity'](_0x1e3533);await collator_1['CollatorService']['authorizeReentry'](this,_0x1e3533),await this['setState'](_0x1e3533),await this['setStatus'](0x0,_0x1e3533);const _0x637d52=await _0x1e3533['exec']();_0x481a65['mapActivityAttributes']();const _0x45430d=this['resolveStatus'](_0x637d52);return _0x481a65['setActivityAttributes']({'app.activity.mid':_0x3884d9,'app.job.jss':_0x45430d}),this['context']['metadata']['aid'];}catch(_0x41ecfb){if(_0x41ecfb instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x41ecfb});return;}else{if(_0x41ecfb instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x41ecfb});return;}else{if(_0x41ecfb instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0x41ecfb});return;}else{if(_0x41ecfb instanceof errors_1['CollationError']){if(_0x41ecfb['fault']==='duplicate'){this['logger']['info']('await-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('await-collation-error',{..._0x41ecfb});}else this['logger']['error']('await-process-error',{..._0x41ecfb});}}}_0x481a65?.['setActivityError'](_0x41ecfb['message']);throw _0x41ecfb;}finally{_0x481a65?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x19fff6){const _0x1de0e0=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x176cec={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':this['metadata']['dad'],'aid':this['metadata']['aid'],'topic':_0x1de0e0,'spn':this['context']['$self']['output']['metadata']?.['l1s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['AWAIT'],'data':this['context']['data']};if(this['config']['await']!==!![]){const _0x138661=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x138661===![]&&(_0x176cec['metadata']['await']=![]);}return this['config']['retry']&&(_0x176cec['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x176cec,_0x19fff6);}}exports['Await']=Await;
@@ -1 +1 @@
1
- 'use strict';(function(_0x521b4d,_0x4513f4){const _0x4f195d=_0x2036,_0x8f2923=_0x521b4d();while(!![]){try{const _0x5310c2=parseInt(_0x4f195d(0x128))/0x1*(parseInt(_0x4f195d(0x125))/0x2)+-parseInt(_0x4f195d(0x12a))/0x3*(-parseInt(_0x4f195d(0x126))/0x4)+parseInt(_0x4f195d(0x127))/0x5+parseInt(_0x4f195d(0x12d))/0x6+-parseInt(_0x4f195d(0x129))/0x7*(parseInt(_0x4f195d(0x124))/0x8)+parseInt(_0x4f195d(0x12b))/0x9*(-parseInt(_0x4f195d(0x12c))/0xa)+-parseInt(_0x4f195d(0x12e))/0xb;if(_0x5310c2===_0x4513f4)break;else _0x8f2923['push'](_0x8f2923['shift']());}catch(_0xc10258){_0x8f2923['push'](_0x8f2923['shift']());}}}(_0x586f,0x37753));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Cycle']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Cycle extends activity_1['Activity']{constructor(_0xb56fa8,_0xe7fcaf,_0x3f9d64,_0x24f7b9,_0x2be15f,_0xc95f4b){super(_0xb56fa8,_0xe7fcaf,_0x3f9d64,_0x24f7b9,_0x2be15f,_0xc95f4b);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x3b2676;try{await this['verifyEntry'](),_0x3b2676=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3b2676['startActivitySpan'](this['leg']),this['mapInputData']();let _0x306abd=this['store']['transact']();await this['setState'](_0x306abd),await this['setStatus'](0x0,_0x306abd);const _0x15853a=await _0x306abd['exec']();_0x3b2676['mapActivityAttributes']();const _0x2b63c0=this['resolveStatus'](_0x15853a);_0x306abd=this['store']['transact']();const _0x2f0a79=await this['cycleAncestorActivity'](_0x306abd);return _0x3b2676['setActivityAttributes']({'app.activity.mid':_0x2f0a79,'app.job.jss':_0x2b63c0}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x306abd),await _0x306abd['exec'](),this['context']['metadata']['aid'];}catch(_0x37a445){if(_0x37a445 instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x37a445});return;}else{if(_0x37a445 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x37a445});return;}else{if(_0x37a445 instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x37a445});return;}else{if(_0x37a445 instanceof errors_1['CollationError']){if(_0x37a445['fault']==='duplicate'){this['logger']['info']('cycle-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('cycle-collation-error',{..._0x37a445});}else this['logger']['error']('cycle-process-error',{..._0x37a445});}}}_0x3b2676?.['setActivityError'](_0x37a445['message']);throw _0x37a445;}finally{_0x3b2676?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x5b5cac){this['mapInputData']();const _0x23c4a6={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':collator_1['CollatorService']['resolveReentryDimension'](this),'aid':this['config']['ancestor'],'spn':this['context']['$self']['output']['metadata']?.['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return await this['engine']['router']?.['publishMessage'](null,_0x23c4a6,_0x5b5cac);}}function _0x2036(_0x4b596b,_0x5993ed){const _0x586fa1=_0x586f();return _0x2036=function(_0x20368d,_0x3412e5){_0x20368d=_0x20368d-0x124;let _0x1aff42=_0x586fa1[_0x20368d];return _0x1aff42;},_0x2036(_0x4b596b,_0x5993ed);}exports['Cycle']=Cycle;function _0x586f(){const _0xe655ae=['1228449OLyAFM','57717fWtxQo','60CpUNGX','2608092svyDix','6859644pxVwOd','16iEAqeh','2zxgHYv','4rnhNEp','947305XDNyEq','78013gODQQM','778407qjJGxM'];_0x586f=function(){return _0xe655ae;};return _0x586f();}
1
+ 'use strict';function _0x4a54(_0x4f0337,_0x520963){const _0x45495f=_0x4549();return _0x4a54=function(_0x4a5496,_0x1a8678){_0x4a5496=_0x4a5496-0x125;let _0x1365a3=_0x45495f[_0x4a5496];return _0x1365a3;},_0x4a54(_0x4f0337,_0x520963);}(function(_0x53c7a4,_0x5a9ed3){const _0x5433dc=_0x4a54,_0x368d13=_0x53c7a4();while(!![]){try{const _0x5062e3=parseInt(_0x5433dc(0x128))/0x1+-parseInt(_0x5433dc(0x12d))/0x2+-parseInt(_0x5433dc(0x12c))/0x3*(-parseInt(_0x5433dc(0x125))/0x4)+-parseInt(_0x5433dc(0x127))/0x5+parseInt(_0x5433dc(0x12b))/0x6+-parseInt(_0x5433dc(0x129))/0x7+-parseInt(_0x5433dc(0x126))/0x8*(parseInt(_0x5433dc(0x12a))/0x9);if(_0x5062e3===_0x5a9ed3)break;else _0x368d13['push'](_0x368d13['shift']());}catch(_0x30ebdc){_0x368d13['push'](_0x368d13['shift']());}}}(_0x4549,0x33bce));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Cycle']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Cycle extends activity_1['Activity']{constructor(_0x28d9f8,_0x59b8f3,_0x141d80,_0x3c8101,_0x11aebb,_0x4c00f9){super(_0x28d9f8,_0x59b8f3,_0x141d80,_0x3c8101,_0x11aebb,_0x4c00f9);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x2a7e2b;try{await this['verifyEntry'](),_0x2a7e2b=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x2a7e2b['startActivitySpan'](this['leg']),this['mapInputData']();let _0x24ad9d=this['store']['transact']();await this['setState'](_0x24ad9d),await this['setStatus'](0x0,_0x24ad9d);const _0x375ce1=await _0x24ad9d['exec']();_0x2a7e2b['mapActivityAttributes']();const _0x1d0170=this['resolveStatus'](_0x375ce1);_0x24ad9d=this['store']['transact']();const _0x2eedef=await this['cycleAncestorActivity'](_0x24ad9d);return _0x2a7e2b['setActivityAttributes']({'app.activity.mid':_0x2eedef,'app.job.jss':_0x1d0170}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x24ad9d),await _0x24ad9d['exec'](),this['context']['metadata']['aid'];}catch(_0x29c155){if(_0x29c155 instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x29c155});return;}else{if(_0x29c155 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x29c155});return;}else{if(_0x29c155 instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x29c155});return;}else{if(_0x29c155 instanceof errors_1['CollationError']){if(_0x29c155['fault']==='duplicate'){this['logger']['info']('cycle-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('cycle-collation-error',{..._0x29c155});}else this['logger']['error']('cycle-process-error',{..._0x29c155});}}}_0x2a7e2b?.['setActivityError'](_0x29c155['message']);throw _0x29c155;}finally{_0x2a7e2b?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x21ed6f){this['mapInputData']();const _0x3bda9a={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':collator_1['CollatorService']['resolveReentryDimension'](this),'aid':this['config']['ancestor'],'spn':this['context']['$self']['output']['metadata']?.['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return await this['engine']['router']?.['publishMessage'](null,_0x3bda9a,_0x21ed6f);}}exports['Cycle']=Cycle;function _0x4549(){const _0x23064e=['24NeXaSk','776895EwLeKB','156136FWCRPp','2768318EnBJnm','326691byijNI','1916166JaDXsT','30fJvoSi','13378weOvyw','161144MjdcmZ'];_0x4549=function(){return _0x23064e;};return _0x4549();}
@@ -1 +1 @@
1
- 'use strict';(function(_0x83f999,_0x462620){const _0x415737=_0x1d22,_0x4dad87=_0x83f999();while(!![]){try{const _0x3d0a36=-parseInt(_0x415737(0x1ba))/0x1+-parseInt(_0x415737(0x1c0))/0x2*(-parseInt(_0x415737(0x1b9))/0x3)+parseInt(_0x415737(0x1be))/0x4+-parseInt(_0x415737(0x1c1))/0x5+-parseInt(_0x415737(0x1bc))/0x6*(parseInt(_0x415737(0x1c2))/0x7)+-parseInt(_0x415737(0x1bd))/0x8*(-parseInt(_0x415737(0x1bb))/0x9)+parseInt(_0x415737(0x1c3))/0xa*(-parseInt(_0x415737(0x1bf))/0xb);if(_0x3d0a36===_0x462620)break;else _0x4dad87['push'](_0x4dad87['shift']());}catch(_0x286296){_0x4dad87['push'](_0x4dad87['shift']());}}}(_0xdd51,0x89679));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),task_1=require('../task'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');class Hook extends activity_1['Activity']{constructor(_0x487c15,_0x8822ca,_0x51687f,_0x442276,_0x1ba5cc,_0x540f32){super(_0x487c15,_0x8822ca,_0x51687f,_0x442276,_0x1ba5cc,_0x540f32);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x32aa59;try{return await this['verifyEntry'](),_0x32aa59=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x32aa59['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x32aa59):await this['doPassThrough'](_0x32aa59),this['context']['metadata']['aid'];}catch(_0x2ef7a7){if(_0x2ef7a7 instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x2ef7a7});return;}else{if(_0x2ef7a7 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x2ef7a7});return;}else{if(_0x2ef7a7 instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x2ef7a7});return;}else{if(_0x2ef7a7 instanceof errors_1['CollationError']){if(_0x2ef7a7['fault']==='duplicate'){this['logger']['info']('hook-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('hook-collation-error',{..._0x2ef7a7});}else this['logger']['error']('hook-process-error',{..._0x2ef7a7});}}}_0x32aa59?.['setActivityError'](_0x2ef7a7['message']);throw _0x2ef7a7;}finally{_0x32aa59?.['endActivitySpan'](),this['logger']['debug']('hook-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}['doesHook'](){if(this['config']['sleep']){const _0x29de5a=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x29de5a)&&Number(_0x29de5a)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x23acb6){const _0x4c446f=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x4c446f),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x4c446f),await collator_1['CollatorService']['authorizeReentry'](this,_0x4c446f),await this['setStatus'](0x0,_0x4c446f),await _0x4c446f['exec'](),_0x23acb6['mapActivityAttributes']();}async['doPassThrough'](_0x1563b0){const _0x445844=this['store']['transact']();let _0x245078;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x445844),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x445844),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x445844),_0x245078=await _0x445844['exec'](),_0x1563b0['mapActivityAttributes']();const _0x4bc50f=this['resolveStatus'](_0x245078),_0x30b2ae={'app.job.jss':_0x4bc50f},_0x5df644=await this['transition'](this['adjacencyList'],_0x4bc50f);_0x5df644['length']&&(_0x30b2ae['app.activity.mids']=_0x5df644['join'](',')),_0x1563b0['setActivityAttributes'](_0x30b2ae);}async['getHookRule'](_0x4e11d5){const _0x3ec500=await this['store']['getHookRules']();return _0x3ec500?.[_0x4e11d5]?.[0x0];}async['registerHook'](_0x2798d8){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x2798d8);else{if(this['config']['sleep']){const _0x336d14=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return await this['engine']['taskService']['registerTimeHook'](this['context']['metadata']['jid'],this['context']['metadata']['gid'],''+this['metadata']['aid']+(this['metadata']['dad']||''),'sleep',_0x336d14,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x77fe6a=stream_1['StreamStatus']['SUCCESS'],_0x53fa19=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x77fe6a,'code':_0x53fa19});const _0x580cb2=new task_1['TaskService'](this['store'],this['logger']),_0x45a866={...this['data']},_0x40014a=await _0x580cb2['processWebHookSignal'](this['config']['hook']['topic'],_0x45a866);if(_0x40014a){const [_0xc41dc2,_0xf19b42,_0x4303d0,_0x32e12b]=_0x40014a;this['context']['metadata']['jid']=_0xc41dc2,this['context']['metadata']['gid']=_0x32e12b,this['context']['metadata']['dad']=_0x4303d0,await this['processEvent'](_0x77fe6a,_0x53fa19,'hook'),_0x53fa19===0xc8&&await _0x580cb2['deleteWebHookSignal'](this['config']['hook']['topic'],_0x45a866);}}async['processTimeHookEvent'](_0x2d1f75){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x2d1f75,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}function _0xdd51(){const _0x6222ca=['1202862nmTADS','900590ofodwU','7OblhjJ','923690VLlcyg','3eLwVJx','1082230paAzbB','70641YUYzHv','1295274vcFrTg','472KLsNqS','4275532mNkEBi','11RUJvjz'];_0xdd51=function(){return _0x6222ca;};return _0xdd51();}function _0x1d22(_0x445990,_0x5ea212){const _0xdd5189=_0xdd51();return _0x1d22=function(_0x1d228b,_0x104aa3){_0x1d228b=_0x1d228b-0x1b9;let _0xbe5cd=_0xdd5189[_0x1d228b];return _0xbe5cd;},_0x1d22(_0x445990,_0x5ea212);}exports['Hook']=Hook;
1
+ 'use strict';(function(_0x3c66ea,_0x143de2){const _0x4c3816=_0x2efe,_0x125e95=_0x3c66ea();while(!![]){try{const _0x381a16=parseInt(_0x4c3816(0xce))/0x1*(parseInt(_0x4c3816(0xd0))/0x2)+-parseInt(_0x4c3816(0xd6))/0x3*(parseInt(_0x4c3816(0xd2))/0x4)+parseInt(_0x4c3816(0xd8))/0x5*(-parseInt(_0x4c3816(0xd4))/0x6)+parseInt(_0x4c3816(0xd7))/0x7*(parseInt(_0x4c3816(0xd3))/0x8)+-parseInt(_0x4c3816(0xd9))/0x9*(parseInt(_0x4c3816(0xd5))/0xa)+parseInt(_0x4c3816(0xcf))/0xb+parseInt(_0x4c3816(0xd1))/0xc;if(_0x381a16===_0x143de2)break;else _0x125e95['push'](_0x125e95['shift']());}catch(_0x44548b){_0x125e95['push'](_0x125e95['shift']());}}}(_0x4beb,0x96f40));function _0x4beb(){const _0x5c882f=['5726979SKdXLO','801CaQPwZ','3222285Iubdji','614wCUxQt','23579220Dgfyyw','220AzlPWy','125280XcBPZS','27228RMIPMI','10tYWcUv','61446IqDKhC','217jSfVQY','670WEzPdl'];_0x4beb=function(){return _0x5c882f;};return _0x4beb();}function _0x2efe(_0x308deb,_0x17d2f6){const _0x4beb7c=_0x4beb();return _0x2efe=function(_0x2efea2,_0x21d4b2){_0x2efea2=_0x2efea2-0xce;let _0x361cbd=_0x4beb7c[_0x2efea2];return _0x361cbd;},_0x2efe(_0x308deb,_0x17d2f6);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),task_1=require('../task'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');class Hook extends activity_1['Activity']{constructor(_0x45e312,_0x3140a4,_0x17714e,_0x472930,_0x292cf5,_0x2f13f7){super(_0x45e312,_0x3140a4,_0x17714e,_0x472930,_0x292cf5,_0x2f13f7);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x4e10c5;try{return await this['verifyEntry'](),_0x4e10c5=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x4e10c5['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x4e10c5):await this['doPassThrough'](_0x4e10c5),this['context']['metadata']['aid'];}catch(_0x1cc155){if(_0x1cc155 instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x1cc155});return;}else{if(_0x1cc155 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x1cc155});return;}else{if(_0x1cc155 instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x1cc155});return;}else{if(_0x1cc155 instanceof errors_1['CollationError']){if(_0x1cc155['fault']==='duplicate'){this['logger']['info']('hook-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('hook-collation-error',{..._0x1cc155});}else this['logger']['error']('hook-process-error',{..._0x1cc155});}}}_0x4e10c5?.['setActivityError'](_0x1cc155['message']);throw _0x1cc155;}finally{_0x4e10c5?.['endActivitySpan'](),this['logger']['debug']('hook-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}['doesHook'](){if(this['config']['sleep']){const _0x59ffbe=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x59ffbe)&&Number(_0x59ffbe)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x1769cb){const _0x122a0f=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x122a0f),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x122a0f),await collator_1['CollatorService']['authorizeReentry'](this,_0x122a0f),await this['setStatus'](0x0,_0x122a0f),await _0x122a0f['exec'](),_0x1769cb['mapActivityAttributes']();}async['doPassThrough'](_0x172014){const _0x1fbbd5=this['store']['transact']();let _0x55925e;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x1fbbd5),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x1fbbd5),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x1fbbd5),_0x55925e=await _0x1fbbd5['exec'](),_0x172014['mapActivityAttributes']();const _0x3b7c68=this['resolveStatus'](_0x55925e),_0x2ed1b9={'app.job.jss':_0x3b7c68},_0x53b7e1=await this['transition'](this['adjacencyList'],_0x3b7c68);_0x53b7e1['length']&&(_0x2ed1b9['app.activity.mids']=_0x53b7e1['join'](',')),_0x172014['setActivityAttributes'](_0x2ed1b9);}async['getHookRule'](_0x80c3e){const _0x36a77a=await this['store']['getHookRules']();return _0x36a77a?.[_0x80c3e]?.[0x0];}async['registerHook'](_0x5b1827){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x5b1827);else{if(this['config']['sleep']){const _0x5aeed4=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return await this['engine']['taskService']['registerTimeHook'](this['context']['metadata']['jid'],this['context']['metadata']['gid'],''+this['metadata']['aid']+(this['metadata']['dad']||''),'sleep',_0x5aeed4,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0xda90e1=stream_1['StreamStatus']['SUCCESS'],_0x45e8ab=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0xda90e1,'code':_0x45e8ab});const _0x5c7b55=new task_1['TaskService'](this['store'],this['logger']),_0x56c31={...this['data']},_0x1cde7e=await _0x5c7b55['processWebHookSignal'](this['config']['hook']['topic'],_0x56c31);if(_0x1cde7e){const [_0x19e6aa,_0x252960,_0x149d37,_0x1cb98b]=_0x1cde7e;this['context']['metadata']['jid']=_0x19e6aa,this['context']['metadata']['gid']=_0x1cb98b,this['context']['metadata']['dad']=_0x149d37,await this['processEvent'](_0xda90e1,_0x45e8ab,'hook'),_0x45e8ab===0xc8&&await _0x5c7b55['deleteWebHookSignal'](this['config']['hook']['topic'],_0x56c31);}}async['processTimeHookEvent'](_0x34ba3c){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x34ba3c,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}exports['Hook']=Hook;
@@ -1 +1 @@
1
- 'use strict';(function(_0x16b4f6,_0x2a95f6){const _0x4d7e72=_0xb4c3,_0x443f08=_0x16b4f6();while(!![]){try{const _0x88cdb4=-parseInt(_0x4d7e72(0x92))/0x1*(parseInt(_0x4d7e72(0x93))/0x2)+-parseInt(_0x4d7e72(0x95))/0x3+-parseInt(_0x4d7e72(0x90))/0x4*(parseInt(_0x4d7e72(0x8f))/0x5)+-parseInt(_0x4d7e72(0x96))/0x6+-parseInt(_0x4d7e72(0x94))/0x7*(-parseInt(_0x4d7e72(0x91))/0x8)+-parseInt(_0x4d7e72(0x98))/0x9+-parseInt(_0x4d7e72(0x8e))/0xa*(-parseInt(_0x4d7e72(0x97))/0xb);if(_0x88cdb4===_0x2a95f6)break;else _0x443f08['push'](_0x443f08['shift']());}catch(_0x3a7014){_0x443f08['push'](_0x443f08['shift']());}}}(_0x5c2d,0x1b1fb));function _0x5c2d(){const _0x233c5e=['4ScTYdu','8mWsrFu','68lAcqPS','3718IyGnEQ','1266083YCSlXq','291867esdHEF','473082hFVdVS','5554461OjVPEc','1082700evklns','10wykVKs','759365rvccTV'];_0x5c2d=function(){return _0x233c5e;};return _0x5c2d();}Object['defineProperty'](exports,'__esModule',{'value':!![]});function _0xb4c3(_0xd92c27,_0x48f444){const _0x5c2d6c=_0x5c2d();return _0xb4c3=function(_0xb4c371,_0x387e4f){_0xb4c371=_0xb4c371-0x8e;let _0x4d4a47=_0x5c2d6c[_0xb4c371];return _0x4d4a47;},_0xb4c3(_0xd92c27,_0x48f444);}const activity_1=require('./activity'),await_1=require('./await'),cycle_1=require('./cycle'),hook_1=require('./hook'),interrupt_1=require('./interrupt'),signal_1=require('./signal'),trigger_1=require('./trigger'),worker_1=require('./worker');exports['default']={'activity':activity_1['Activity'],'await':await_1['Await'],'cycle':cycle_1['Cycle'],'hook':hook_1['Hook'],'interrupt':interrupt_1['Interrupt'],'signal':signal_1['Signal'],'trigger':trigger_1['Trigger'],'worker':worker_1['Worker']};
1
+ 'use strict';function _0x29f3(_0x53268d,_0x137fb6){const _0x4c76ca=_0x4c76();return _0x29f3=function(_0x29f3f1,_0x3538d9){_0x29f3f1=_0x29f3f1-0x166;let _0x4ffde5=_0x4c76ca[_0x29f3f1];return _0x4ffde5;},_0x29f3(_0x53268d,_0x137fb6);}(function(_0x9dce46,_0x3ef7ee){const _0x15077c=_0x29f3,_0x269de1=_0x9dce46();while(!![]){try{const _0x43593a=parseInt(_0x15077c(0x16a))/0x1+-parseInt(_0x15077c(0x16c))/0x2+parseInt(_0x15077c(0x16b))/0x3*(-parseInt(_0x15077c(0x16d))/0x4)+-parseInt(_0x15077c(0x168))/0x5*(-parseInt(_0x15077c(0x166))/0x6)+-parseInt(_0x15077c(0x167))/0x7+parseInt(_0x15077c(0x16e))/0x8+parseInt(_0x15077c(0x169))/0x9;if(_0x43593a===_0x3ef7ee)break;else _0x269de1['push'](_0x269de1['shift']());}catch(_0x3897e6){_0x269de1['push'](_0x269de1['shift']());}}}(_0x4c76,0x7c8f7));function _0x4c76(){const _0x12f8a3=['6dFuyhw','1360710BEyNWD','839244ZJJeOr','6466048pnIxog','54ivCDuR','1288063DWUtQT','133685bpIrgU','2707812hHtcXM','444428cvihbR'];_0x4c76=function(){return _0x12f8a3;};return _0x4c76();}Object['defineProperty'](exports,'__esModule',{'value':!![]});const activity_1=require('./activity'),await_1=require('./await'),cycle_1=require('./cycle'),hook_1=require('./hook'),interrupt_1=require('./interrupt'),signal_1=require('./signal'),trigger_1=require('./trigger'),worker_1=require('./worker');exports['default']={'activity':activity_1['Activity'],'await':await_1['Await'],'cycle':cycle_1['Cycle'],'hook':hook_1['Hook'],'interrupt':interrupt_1['Interrupt'],'signal':signal_1['Signal'],'trigger':trigger_1['Trigger'],'worker':worker_1['Worker']};