@hotmeshio/hotmesh 0.3.9 → 0.3.10

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 (73) hide show
  1. package/README.md +13 -4
  2. package/build/index.d.ts +2 -1
  3. package/build/index.js +3 -1
  4. package/build/modules/key.js +1 -1
  5. package/build/modules/utils.js +1 -1
  6. package/build/package.json +3 -3
  7. package/build/services/activities/activity.js +1 -1
  8. package/build/services/activities/await.js +1 -1
  9. package/build/services/activities/cycle.js +1 -1
  10. package/build/services/activities/hook.js +1 -1
  11. package/build/services/activities/index.js +1 -1
  12. package/build/services/activities/interrupt.js +1 -1
  13. package/build/services/activities/signal.js +1 -1
  14. package/build/services/activities/trigger.js +1 -1
  15. package/build/services/activities/worker.js +1 -1
  16. package/build/services/collator/index.js +1 -1
  17. package/build/services/compiler/deployer.js +1 -1
  18. package/build/services/compiler/index.js +1 -1
  19. package/build/services/compiler/validator.js +1 -1
  20. package/build/services/connector/factory.d.ts +2 -1
  21. package/build/services/connector/factory.js +10 -1
  22. package/build/services/connector/providers/postgres.d.ts +1 -1
  23. package/build/services/connector/providers/postgres.js +12 -7
  24. package/build/services/engine/index.js +1 -1
  25. package/build/services/exporter/index.js +1 -1
  26. package/build/services/mapper/index.js +1 -1
  27. package/build/services/meshflow/exporter.js +1 -1
  28. package/build/services/pipe/functions/array.js +1 -1
  29. package/build/services/pipe/functions/bitwise.js +1 -1
  30. package/build/services/pipe/functions/conditional.js +1 -1
  31. package/build/services/pipe/functions/cron.js +1 -1
  32. package/build/services/pipe/functions/date.js +1 -1
  33. package/build/services/pipe/functions/index.js +1 -1
  34. package/build/services/pipe/functions/json.js +1 -1
  35. package/build/services/pipe/functions/logical.js +1 -1
  36. package/build/services/pipe/functions/math.js +1 -1
  37. package/build/services/pipe/functions/number.js +1 -1
  38. package/build/services/pipe/functions/object.js +1 -1
  39. package/build/services/pipe/functions/string.js +1 -1
  40. package/build/services/pipe/functions/symbol.js +1 -1
  41. package/build/services/pipe/functions/unary.js +1 -1
  42. package/build/services/pipe/index.js +1 -1
  43. package/build/services/quorum/index.js +1 -1
  44. package/build/services/reporter/index.js +1 -1
  45. package/build/services/router/index.js +1 -1
  46. package/build/services/search/providers/redis/ioredis.js +1 -1
  47. package/build/services/search/providers/redis/redis.js +1 -1
  48. package/build/services/serializer/index.js +1 -1
  49. package/build/services/store/providers/redis/_base.js +1 -1
  50. package/build/services/store/providers/redis/ioredis.js +1 -1
  51. package/build/services/store/providers/redis/redis.js +1 -1
  52. package/build/services/store/providers/store-initializable.js +1 -1
  53. package/build/services/stream/providers/nats/nats.js +1 -1
  54. package/build/services/stream/providers/postgres/postgres.d.ts +68 -0
  55. package/build/services/stream/providers/postgres/postgres.js +1 -0
  56. package/build/services/stream/providers/redis/ioredis.js +1 -1
  57. package/build/services/stream/providers/redis/redis.js +1 -1
  58. package/build/services/stream/providers/stream-initializable.js +1 -1
  59. package/build/services/sub/providers/redis/ioredis.js +1 -1
  60. package/build/services/sub/providers/redis/redis.js +1 -1
  61. package/build/services/task/index.js +1 -1
  62. package/build/services/telemetry/index.js +1 -1
  63. package/build/services/worker/index.js +1 -1
  64. package/build/types/index.d.ts +3 -1
  65. package/build/types/postgres.d.ts +31 -9
  66. package/index.ts +2 -0
  67. package/package.json +3 -3
  68. package/typedoc.json +6 -0
  69. package/types/index.ts +54 -0
  70. package/types/nats.ts +12 -7
  71. package/types/postgres.ts +41 -10
  72. package/build/services/stream/providers/postgres/_deploy.d.ts +0 -5
  73. package/build/services/stream/providers/postgres/_deploy.js +0 -1
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # HotMesh
2
2
  ![beta release](https://img.shields.io/badge/release-beta-blue.svg)
3
3
 
4
- **HotMesh** offers "Temporal Your Way"—providing the power of orchestration platforms like Temporal.io in a flexible, decentralized manner. Replace everything with robust **Queues** and **Routers**...even the app server.
4
+ **HotMesh** offers the power of orchestration platforms like Temporal.io in a flexible, decentralized manner. Replace everything with robust **Queues** and **Routers**...even the app server.
5
5
 
6
6
  *Note: This is a beta release and currently focuses on TypeScript/Redis.*
7
7
 
@@ -19,8 +19,6 @@
19
19
  npm install @hotmeshio/hotmesh
20
20
  ```
21
21
 
22
- You have a Redis instance? Good. You're ready to go.
23
-
24
22
  ## Learn
25
23
  [📄 Docs](https://hotmeshio.github.io/sdk-typescript/) | [💼 Sample Projects](https://github.com/hotmeshio/samples-typescript) | [🎥 Intro (3m)](https://www.loom.com/share/211bd4b4038d42f0ba34374ef5b6f961?sid=7b889a56-f60f-4ccc-84e7-8c2697e548a9) | [🎥 Transactional Workflow (9m)](https://www.loom.com/share/54ffd5266baf4ac6b287578abfd1d821?sid=0db2cef8-ef0d-4e02-a0b7-a1ee14f476ce)
26
24
 
@@ -701,8 +699,19 @@ This example demonstrates how to search for those workflows where a given condit
701
699
  ```
702
700
  </details>
703
701
 
702
+ ## Visualize | OpenTelemetry
703
+ HotMesh's telemetry output provides unmatched insight into long-running, x-service transactions. Add your Honeycomb credentials to any project using HotMesh and HotMesh will emit the full *OpenTelemetry* execution tree organized as a DAG.
704
+
705
+ ## Visualize | HotMesh Dashboard
706
+ The HotMesh dashboard provides a detailed overview of all running workflows. An LLM is included to simplify querying and analyzing workflow data for those deployments that include the Redis `FT.SEARCH` module.
707
+
708
+ ## Visualize | RedisInsight
709
+ View commands, streams, data, CPU, load, etc using the RedisInsight data browser.
710
+
704
711
  ## Samples
705
- Refer to the [hotmeshio/samples-typescript](https://github.com/hotmeshio/samples-typescript) Git repo for *tutorials* and instructions on deploying the *HotMesh Dashboard*.
712
+ Refer to the [hotmeshio/samples-typescript](https://github.com/hotmeshio/samples-typescript) Git repo for *tutorials* and instructions on deploying the *HotMesh Dashboard* for visualizing workflows and managing network health.
713
+
714
+ Refer to the [hotmeshio/temporal-patterns-typescript](https://github.com/hotmeshio/temporal-patterns-typescript) Git repo for examples of common Temporal.io patterns implemented using HotMesh.
706
715
 
707
716
  ## Advanced
708
717
  The theory that underlies the architecture is applicable to any number of data storage and streaming backends: [A Message-Oriented Approach to Decentralized Process Orchestration](https://zenodo.org/records/12168558).
package/build/index.d.ts CHANGED
@@ -7,6 +7,7 @@ import { MeshData } from './services/meshdata';
7
7
  import { MeshOS } from './services/meshos';
8
8
  import * as Errors from './modules/errors';
9
9
  import * as Utils from './modules/utils';
10
+ import { ConnectorService as Connector } from './services/connector/factory';
10
11
  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;
11
- export { Client, Connection, Errors, HotMesh, HotMeshConfig, MeshCall, MeshData, MeshFlow, MeshOS, Search, Utils, Worker, workflow, WorkflowHandle, };
12
+ export { Client, Connection, Connector, Errors, HotMesh, HotMeshConfig, MeshCall, MeshData, MeshFlow, MeshOS, Search, Utils, Worker, workflow, WorkflowHandle, };
12
13
  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.Connection = exports.Client = void 0;
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;
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");
@@ -40,6 +40,8 @@ const Errors = __importStar(require("./modules/errors"));
40
40
  exports.Errors = Errors;
41
41
  const Utils = __importStar(require("./modules/utils"));
42
42
  exports.Utils = Utils;
43
+ const factory_1 = require("./services/connector/factory");
44
+ Object.defineProperty(exports, "Connector", { enumerable: true, get: function () { return factory_1.ConnectorService; } });
43
45
  const { Client, Connection, Search, Worker, workflow } = meshflow_1.MeshFlow;
44
46
  exports.Client = Client;
45
47
  exports.Connection = Connection;
@@ -1 +1 @@
1
- 'use strict';(function(_0x7f137f,_0x3fdffe){const _0x4ee397=_0x336c,_0x188044=_0x7f137f();while(!![]){try{const _0x27a260=parseInt(_0x4ee397(0x176))/0x1+-parseInt(_0x4ee397(0x17c))/0x2*(parseInt(_0x4ee397(0x17a))/0x3)+-parseInt(_0x4ee397(0x17b))/0x4*(parseInt(_0x4ee397(0x177))/0x5)+-parseInt(_0x4ee397(0x175))/0x6+-parseInt(_0x4ee397(0x179))/0x7*(parseInt(_0x4ee397(0x178))/0x8)+parseInt(_0x4ee397(0x174))/0x9*(parseInt(_0x4ee397(0x17d))/0xa)+parseInt(_0x4ee397(0x173))/0xb;if(_0x27a260===_0x3fdffe)break;else _0x188044['push'](_0x188044['shift']());}catch(_0x3ff385){_0x188044['push'](_0x188044['shift']());}}}(_0x5ac4,0xeda1d));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'];}});function _0x5ac4(){const _0x4d8cf8=['370153pkbjgz','42261bqTxoq','236vHIDEy','116pWXAnX','70LPMYKq','58969460aWXvCB','382221OVdafm','11468574UMiFNV','66537lyVLLK','86285UUPkWG','152AUUYrN'];_0x5ac4=function(){return _0x4d8cf8;};return _0x5ac4();}function _0x336c(_0x56ff93,_0x24d126){const _0x5ac457=_0x5ac4();return _0x336c=function(_0x336c08,_0x3b64f9){_0x336c08=_0x336c08-0x173;let _0x325a17=_0x5ac457[_0x336c08];return _0x325a17;},_0x336c(_0x56ff93,_0x24d126);}const HMNS='hmsh';exports['HMNS']=HMNS;const KEYSEP=':';exports['KEYSEP']=KEYSEP;const VALSEP='::';exports['VALSEP']=VALSEP;const WEBSEP='::';exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0x302783,_0x5eb2cf,_0x2677f6){switch(_0x5eb2cf){case hotmesh_1['KeyType']['HOTMESH']:return _0x302783;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0x302783+':'+_0x2677f6['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0x302783+':'+_0x2677f6['appId']+':w:'+(_0x2677f6['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0x302783+':'+_0x2677f6['appId']+':t:'+(_0x2677f6['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0x302783+':a:'+(_0x2677f6['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0x302783+':'+_0x2677f6['appId']+':q:'+(_0x2677f6['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0x302783+':'+_0x2677f6['appId']+':j:'+_0x2677f6['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0x302783+':'+_0x2677f6['appId']+':d:'+_0x2677f6['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0x302783+':'+_0x2677f6['appId']+':s:'+_0x2677f6['jobKey']+':'+_0x2677f6['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0x302783+':'+_0x2677f6['appId']+':s:'+_0x2677f6['jobKey']+':'+_0x2677f6['dateTime']+':'+_0x2677f6['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0x302783+':'+_0x2677f6['appId']+':s:'+_0x2677f6['jobKey']+':'+_0x2677f6['dateTime']+':'+_0x2677f6['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0x302783+':'+_0x2677f6['appId']+':v:'+_0x2677f6['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0x302783+':'+_0x2677f6['appId']+':v:'+_0x2677f6['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0x302783+':'+_0x2677f6['appId']+':v:'+_0x2677f6['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0x302783+':'+_0x2677f6['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0x302783+':'+_0x2677f6['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0x302783+':'+_0x2677f6['appId']+':sym:keys:'+(_0x2677f6['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0x302783+':'+_0x2677f6['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0x302783+':'+(_0x2677f6['appId']||'')+':x:'+(_0x2677f6['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}}exports['KeyService']=KeyService;
1
+ 'use strict';(function(_0x4745c0,_0x5bfc07){const _0x5aa90d=_0x2002,_0x5abab7=_0x4745c0();while(!![]){try{const _0x25f6f9=parseInt(_0x5aa90d(0xf5))/0x1+parseInt(_0x5aa90d(0xf8))/0x2*(parseInt(_0x5aa90d(0xef))/0x3)+-parseInt(_0x5aa90d(0xf7))/0x4+-parseInt(_0x5aa90d(0xf6))/0x5*(parseInt(_0x5aa90d(0xf2))/0x6)+parseInt(_0x5aa90d(0xf3))/0x7*(parseInt(_0x5aa90d(0xf0))/0x8)+-parseInt(_0x5aa90d(0xf9))/0x9+parseInt(_0x5aa90d(0xf1))/0xa*(-parseInt(_0x5aa90d(0xf4))/0xb);if(_0x25f6f9===_0x5bfc07)break;else _0x5abab7['push'](_0x5abab7['shift']());}catch(_0x2c8a01){_0x5abab7['push'](_0x5abab7['shift']());}}}(_0xd046,0x3a7b8));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;function _0xd046(){const _0x5ea88c=['201gtOBMJ','1104qgbQYJ','2883810CNoaiZ','3138wiczuy','19047mLooFW','11MDGSVP','413150HsAzAl','3850WFEWwP','344432ZdjRCq','13988jCMvST','2164527RcQUcj'];_0xd046=function(){return _0x5ea88c;};return _0xd046();}const KEYSEP=':';exports['KEYSEP']=KEYSEP;const VALSEP='::';exports['VALSEP']=VALSEP;function _0x2002(_0x4b7068,_0xc9e15c){const _0xd04690=_0xd046();return _0x2002=function(_0x20025f,_0x28bce9){_0x20025f=_0x20025f-0xef;let _0x30dd2b=_0xd04690[_0x20025f];return _0x30dd2b;},_0x2002(_0x4b7068,_0xc9e15c);}const WEBSEP='::';exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0x2dea2,_0x2a61e7,_0x48c619){switch(_0x2a61e7){case hotmesh_1['KeyType']['HOTMESH']:return _0x2dea2;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0x2dea2+':'+_0x48c619['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0x2dea2+':'+_0x48c619['appId']+':w:'+(_0x48c619['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0x2dea2+':'+_0x48c619['appId']+':t:'+(_0x48c619['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0x2dea2+':a:'+(_0x48c619['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0x2dea2+':'+_0x48c619['appId']+':q:'+(_0x48c619['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0x2dea2+':'+_0x48c619['appId']+':j:'+_0x48c619['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0x2dea2+':'+_0x48c619['appId']+':d:'+_0x48c619['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0x2dea2+':'+_0x48c619['appId']+':s:'+_0x48c619['jobKey']+':'+_0x48c619['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0x2dea2+':'+_0x48c619['appId']+':s:'+_0x48c619['jobKey']+':'+_0x48c619['dateTime']+':'+_0x48c619['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0x2dea2+':'+_0x48c619['appId']+':s:'+_0x48c619['jobKey']+':'+_0x48c619['dateTime']+':'+_0x48c619['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0x2dea2+':'+_0x48c619['appId']+':v:'+_0x48c619['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0x2dea2+':'+_0x48c619['appId']+':v:'+_0x48c619['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0x2dea2+':'+_0x48c619['appId']+':v:'+_0x48c619['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0x2dea2+':'+_0x48c619['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0x2dea2+':'+_0x48c619['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0x2dea2+':'+_0x48c619['appId']+':sym:keys:'+(_0x48c619['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0x2dea2+':'+_0x48c619['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0x2dea2+':'+(_0x48c619['appId']||'')+':x:'+(_0x48c619['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}}exports['KeyService']=KeyService;
@@ -1 +1 @@
1
- 'use strict';(function(_0x45bfc0,_0x11e1f3){const _0x2870c8=_0x4a57,_0x23d189=_0x45bfc0();while(!![]){try{const _0x479cab=-parseInt(_0x2870c8(0xce))/0x1+parseInt(_0x2870c8(0xd4))/0x2+-parseInt(_0x2870c8(0xd6))/0x3*(-parseInt(_0x2870c8(0xd8))/0x4)+-parseInt(_0x2870c8(0xd2))/0x5*(parseInt(_0x2870c8(0xcf))/0x6)+-parseInt(_0x2870c8(0xd7))/0x7+parseInt(_0x2870c8(0xd5))/0x8*(-parseInt(_0x2870c8(0xd1))/0x9)+parseInt(_0x2870c8(0xd0))/0xa*(parseInt(_0x2870c8(0xd3))/0xb);if(_0x479cab===_0x11e1f3)break;else _0x23d189['push'](_0x23d189['shift']());}catch(_0x4e2779){_0x23d189['push'](_0x23d189['shift']());}}}(_0x2649,0xc73c8));var __importDefault=this&&this['__importDefault']||function(_0x131a46){return _0x131a46&&_0x131a46['__esModule']?_0x131a46:{'default':_0x131a46};};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=_0x40fe61=>{const _0xfd645d=JSON['stringify'](_0x40fe61);return(0x0,crypto_1['createHash'])('sha256')['update'](_0xfd645d)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0x415d6f=os_1['default']['totalmem'](),_0x38e520=os_1['default']['freemem'](),_0x2b0d32=_0x415d6f-_0x38e520,_0x4f4ebc={'TotalMemoryGB':(_0x415d6f/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x38e520/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x2b0d32/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x4f4ebc;}function _0x2649(){const _0x462fa3=['17248810lXglYF','7083189xsfQrr','9080ZIAUwm','22UxsUPH','3043634ZAKufq','8RuPlfa','444GBjnnF','9286746QDVSOC','2972pMDMbQ','818828JhUWlK','4404BAfZvt'];_0x2649=function(){return _0x462fa3;};return _0x2649();}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x5b4c4a){return JSON['parse'](JSON['stringify'](_0x5b4c4a));}exports['deepCopy']=deepCopy;function deterministicRandom(_0x10323c){const _0x2fc64e=Math['sin'](_0x10323c)*0x2710;return _0x2fc64e-Math['floor'](_0x2fc64e);}exports['deterministicRandom']=deterministicRandom;function guid(_0x4487c0=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x4487c0);}exports['guid']=guid;async function sleepFor(_0x2f7603){return new Promise(_0x36e02a=>setTimeout(_0x36e02a,_0x2f7603));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x5f505c=>setImmediate(_0x5f505c));}exports['sleepImmediate']=sleepImmediate;function XSleepFor(_0x563244){let _0x1ac433;const _0x4024f1=new Promise(_0xd16c23=>{_0x1ac433=setTimeout(_0xd16c23,_0x563244);});return{'promise':_0x4024f1,'timerId':_0x1ac433};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x1f81d5){const _0x48da22=Object['getPrototypeOf'](_0x1f81d5);if(_0x1f81d5['constructor']&&_0x1f81d5['constructor']['name']==='Client')return'nats';else{if(_0x1f81d5['constructor']&&_0x1f81d5['constructor']['name']==='Pool')return'postgres';else{if('defineCommand'in _0x48da22||Object['keys'](_0x48da22)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x48da22)['includes']('Multi'))return'redis';}}}if(_0x1f81d5['constructor']){if(_0x1f81d5['constructor']['name']==='Redis'||_0x1f81d5['constructor']['name']==='EventEmitter'){if('hset'in _0x1f81d5)return'ioredis';}else{if(_0x1f81d5['constructor']['name']==='ProviderClient'||_0x1f81d5['constructor']['name']==='Commander'){if('HSET'in _0x1f81d5)return'redis';}}}if(Object['keys'](_0x1f81d5)['includes']('Pipeline'))return'ioredis';else{if(Object['keys'](_0x1f81d5)['includes']('createClient'))return'redis';}return null;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x1550ad){return _0x1550ad==='activity'?'hook':_0x1550ad;},'providerConfig'(_0x4bd74a){return _0x4bd74a?.['connection']??_0x4bd74a?.['redis'];},'meshDataConfig'(_0x461d38){return _0x461d38?.['connection']??{'class':_0x461d38?.['redisClass'],'options':_0x461d38?.['redisOptions']};}};function identifyRedisTypeFromClass(_0x182b48){if(_0x182b48&&_0x182b48['name']==='Redis'||_0x182b48['name']==='EventEmitter')return'ioredis';else{if(_0x182b48&&'createClient'in _0x182b48)return'redis';}return null;}exports['identifyRedisTypeFromClass']=identifyRedisTypeFromClass;function matchesStatusCode(_0x4c10b3,_0xb0589b){if(typeof _0xb0589b==='string'){const _0x5c633='^'+_0xb0589b['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x5c633)['test'](_0x4c10b3['toString']());}return _0xb0589b['test'](_0x4c10b3['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x27dcad,_0x10bbbf){return _0x27dcad===_0x10bbbf;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x19c656,_0x5691c8){for(const [_0x28983b,_0x1791d7]of Object['entries'](_0x19c656)){if(_0x1791d7['hasOwnProperty'](_0x5691c8)){const _0x49ff8c=findTopKey(_0x19c656,_0x28983b['replace'](/^\./,''));return(_0x49ff8c||_0x28983b)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x56dbeb,_0x168467){for(const [_0x107ba8,_0x2c0e0b]of Object['entries'](_0x56dbeb)){if(_0x2c0e0b===_0x168467)return _0x107ba8;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0x5a3f6e,_0x1bc1d5,_0x187030){const _0x272199=await _0x1bc1d5['getTransitions'](_0x187030),_0x542169=await _0x1bc1d5['getSubscriptions'](_0x187030),_0x1c5376=findTopKey(_0x272199,_0x5a3f6e),_0x274052=findSubscriptionForTrigger(_0x542169,_0x1c5376);return _0x274052;}exports['getSubscriptionTopic']=getSubscriptionTopic;function getTimeSeries(_0x1e7f3f){if(_0x1e7f3f['toString']()==='infinity')return'0';const _0x102844=new Date(),_0x3984f4=_0x1e7f3f['slice'](-0x1),_0x3f85c2=parseInt(_0x1e7f3f['slice'](0x0,-0x1),0xa);if(_0x3984f4==='m'){const _0x169391=Math['floor'](_0x102844['getMinutes']()/_0x3f85c2)*_0x3f85c2;_0x102844['setUTCMinutes'](_0x169391,0x0,0x0);}else _0x3984f4==='h'&&_0x102844['setUTCMinutes'](0x0,0x0,0x0);return _0x102844['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}function _0x4a57(_0x31bce1,_0x156cb0){const _0x264909=_0x2649();return _0x4a57=function(_0x4a577c,_0x23de28){_0x4a577c=_0x4a577c-0xce;let _0x4aa10a=_0x264909[_0x4a577c];return _0x4aa10a;},_0x4a57(_0x31bce1,_0x156cb0);}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x4ff3ae){const _0x3b3278=_0x4ff3ae instanceof Date?_0x4ff3ae:new Date(_0x4ff3ae);return _0x3b3278['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0x407141){const _0x4ea70e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x56afe4=_0x4ea70e['length'];if(_0x407141<0x0||_0x407141>=Math['pow'](_0x56afe4,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x221a2e,_0x329d60]=divmod(_0x407141,_0x56afe4),[_0x551bb7,_0x2d6bb5]=divmod(_0x221a2e,_0x56afe4);return _0x4ea70e[_0x551bb7]+_0x4ea70e[_0x329d60]+_0x4ea70e[_0x2d6bb5];}exports['getSymKey']=getSymKey;function getSymVal(_0xe4fce1){const _0x3d90e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x3d6bf5=_0x3d90e['length'];if(_0xe4fce1<0x0||_0xe4fce1>=Math['pow'](_0x3d6bf5,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x556cd6,_0x59445a]=divmod(_0xe4fce1,_0x3d6bf5);return _0x3d90e[_0x556cd6]+_0x3d90e[_0x59445a];}exports['getSymVal']=getSymVal;function divmod(_0xb8b5a0,_0x5b18be){return[Math['floor'](_0xb8b5a0/_0x5b18be),_0xb8b5a0%_0x5b18be];}function getIndexedHash(_0x2c1ef4,_0x36f45a){const _0x494191=_0x2c1ef4[_0x36f45a]||0x0,_0x35dbb7={..._0x2c1ef4};return delete _0x35dbb7[_0x36f45a],[_0x494191,_0x35dbb7];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0x43ddc0,_0x18cc4e){const _0x3d63a1=_0x18cc4e['split']('/');let _0x2cc982=_0x43ddc0;for(const _0x281b71 of _0x3d63a1){if(_0x2cc982[_0x281b71]!==undefined)_0x2cc982=_0x2cc982[_0x281b71];else return undefined;}return _0x2cc982;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0x2eb9e1){const _0x4381f1={};for(const _0x1e1da0 in _0x2eb9e1){if(_0x2eb9e1[_0x1e1da0]===undefined)continue;const _0x164013=_0x1e1da0['split']('/');let _0x275bb3=_0x4381f1;for(let _0x580344=0x0;_0x580344<_0x164013['length'];_0x580344++){_0x580344===_0x164013['length']-0x1?_0x275bb3[_0x164013[_0x580344]]=_0x2eb9e1[_0x1e1da0]:(_0x275bb3[_0x164013[_0x580344]]=_0x275bb3[_0x164013[_0x580344]]||{},_0x275bb3=_0x275bb3[_0x164013[_0x580344]]);}}return _0x4381f1;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x319f20){const _0x49cb7a=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x49cb7a['test'](_0x319f20);}exports['isValidCron']=isValidCron;const s=_0xa67070=>{return(0x0,ms_1['default'])(_0xa67070)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x4bcb59=>{try{return JSON['parse'](_0x4bcb59);}catch(_0x2a9207){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x2a9207});throw _0x2a9207;}};exports['parseStreamMessage']=parseStreamMessage;const isStreamMessage=_0x5212df=>{return Array['isArray'](_0x5212df)&&Array['isArray'](_0x5212df[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x31e527=>{const _0x3dc165=[];let _0x4c570f;for(let _0x580040=0x1;_0x580040<_0x31e527['length'];_0x580040++){const _0x517883=_0x31e527[_0x580040],_0x26642c={};if(Array['isArray'](_0x517883)){for(let _0x3f89b3=0x0;_0x3f89b3<_0x517883['length'];_0x3f89b3+=0x2){const _0x11e19f=_0x517883[_0x3f89b3],_0x25ae2d=_0x517883[_0x3f89b3+0x1];_0x26642c[_0x11e19f]=_0x25ae2d;}_0x4c570f&&(_0x26642c['$']=_0x4c570f),_0x3dc165['push'](_0x26642c),_0x4c570f=undefined;}else _0x4c570f=_0x517883;}return _0x3dc165;};exports['arrayToHash']=arrayToHash;
1
+ 'use strict';(function(_0x344ade,_0x421dd2){const _0x12cc6f=_0x3a62,_0x5ea438=_0x344ade();while(!![]){try{const _0x5847ae=parseInt(_0x12cc6f(0x11e))/0x1*(parseInt(_0x12cc6f(0x126))/0x2)+-parseInt(_0x12cc6f(0x124))/0x3*(-parseInt(_0x12cc6f(0x129))/0x4)+-parseInt(_0x12cc6f(0x122))/0x5*(parseInt(_0x12cc6f(0x123))/0x6)+-parseInt(_0x12cc6f(0x127))/0x7*(parseInt(_0x12cc6f(0x120))/0x8)+-parseInt(_0x12cc6f(0x121))/0x9+parseInt(_0x12cc6f(0x125))/0xa*(parseInt(_0x12cc6f(0x11f))/0xb)+parseInt(_0x12cc6f(0x128))/0xc;if(_0x5847ae===_0x421dd2)break;else _0x5ea438['push'](_0x5ea438['shift']());}catch(_0x5a4c4a){_0x5ea438['push'](_0x5ea438['shift']());}}}(_0x4d53,0xe364a));var __importDefault=this&&this['__importDefault']||function(_0x5f4560){return _0x5f4560&&_0x5f4560['__esModule']?_0x5f4560:{'default':_0x5f4560};};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=_0xb6fc58=>{const _0x555f89=JSON['stringify'](_0xb6fc58);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x555f89)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0x51e305=os_1['default']['totalmem'](),_0x6971af=os_1['default']['freemem'](),_0x155c0c=_0x51e305-_0x6971af,_0x586bb6={'TotalMemoryGB':(_0x51e305/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x6971af/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x155c0c/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x586bb6;}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x4f9b59){return JSON['parse'](JSON['stringify'](_0x4f9b59));}exports['deepCopy']=deepCopy;function deterministicRandom(_0x30125f){const _0x32dce9=Math['sin'](_0x30125f)*0x2710;return _0x32dce9-Math['floor'](_0x32dce9);}exports['deterministicRandom']=deterministicRandom;function guid(_0x2a5563=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x2a5563);}exports['guid']=guid;async function sleepFor(_0xbcdc48){return new Promise(_0x57d90a=>setTimeout(_0x57d90a,_0xbcdc48));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x4be488=>setImmediate(_0x4be488));}exports['sleepImmediate']=sleepImmediate;function XSleepFor(_0x4a1436){let _0x15e5ab;const _0x1829b4=new Promise(_0x151f92=>{_0x15e5ab=setTimeout(_0x151f92,_0x4a1436);});return{'promise':_0x1829b4,'timerId':_0x15e5ab};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x48df0b){const _0x5e7dbb=Object['getPrototypeOf'](_0x48df0b);if(_0x48df0b['constructor']&&_0x48df0b['constructor']['name']==='Client')return'nats';else{if(_0x48df0b['constructor']&&_0x48df0b['constructor']['name']==='Pool')return'postgres';else{if('defineCommand'in _0x5e7dbb||Object['keys'](_0x5e7dbb)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x5e7dbb)['includes']('Multi'))return'redis';}}}if(_0x48df0b['constructor']){if(_0x48df0b['constructor']['name']==='Redis'||_0x48df0b['constructor']['name']==='EventEmitter'){if('hset'in _0x48df0b)return'ioredis';}else{if(_0x48df0b['constructor']['name']==='ProviderClient'||_0x48df0b['constructor']['name']==='Commander'){if('HSET'in _0x48df0b)return'redis';}}}if(Object['keys'](_0x48df0b)['includes']('Pipeline'))return'ioredis';else{if(Object['keys'](_0x48df0b)['includes']('createClient'))return'redis';}return null;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x47f829){return _0x47f829==='activity'?'hook':_0x47f829;},'providerConfig'(_0x555af5){return _0x555af5?.['connection']??_0x555af5?.['redis'];},'meshDataConfig'(_0x347614){return _0x347614?.['connection']??{'class':_0x347614?.['redisClass'],'options':_0x347614?.['redisOptions']};}};function identifyRedisTypeFromClass(_0x549017){if(_0x549017&&_0x549017['name']==='Redis'||_0x549017['name']==='EventEmitter')return'ioredis';else{if(_0x549017&&'createClient'in _0x549017)return'redis';}return null;}exports['identifyRedisTypeFromClass']=identifyRedisTypeFromClass;function matchesStatusCode(_0x368d73,_0x52ba8f){if(typeof _0x52ba8f==='string'){const _0xcb1b1a='^'+_0x52ba8f['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0xcb1b1a)['test'](_0x368d73['toString']());}return _0x52ba8f['test'](_0x368d73['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x4fbd94,_0x24007f){return _0x4fbd94===_0x24007f;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x3d03d4,_0x163189){for(const [_0x3c2b46,_0xf34fb5]of Object['entries'](_0x3d03d4)){if(_0xf34fb5['hasOwnProperty'](_0x163189)){const _0x49a675=findTopKey(_0x3d03d4,_0x3c2b46['replace'](/^\./,''));return(_0x49a675||_0x3c2b46)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x122245,_0x431f93){for(const [_0x58d462,_0x6eef23]of Object['entries'](_0x122245)){if(_0x6eef23===_0x431f93)return _0x58d462;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0x4e0de2,_0x4ffae2,_0x193d35){const _0x5199d7=await _0x4ffae2['getTransitions'](_0x193d35),_0x3d9a16=await _0x4ffae2['getSubscriptions'](_0x193d35),_0x5ebef1=findTopKey(_0x5199d7,_0x4e0de2),_0x28da80=findSubscriptionForTrigger(_0x3d9a16,_0x5ebef1);return _0x28da80;}exports['getSubscriptionTopic']=getSubscriptionTopic;function getTimeSeries(_0x1b69ce){if(_0x1b69ce['toString']()==='infinity')return'0';const _0x3d9fe6=new Date(),_0x4d10b3=_0x1b69ce['slice'](-0x1),_0x1cedc6=parseInt(_0x1b69ce['slice'](0x0,-0x1),0xa);if(_0x4d10b3==='m'){const _0x2f40cc=Math['floor'](_0x3d9fe6['getMinutes']()/_0x1cedc6)*_0x1cedc6;_0x3d9fe6['setUTCMinutes'](_0x2f40cc,0x0,0x0);}else _0x4d10b3==='h'&&_0x3d9fe6['setUTCMinutes'](0x0,0x0,0x0);return _0x3d9fe6['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x1552ae){const _0x58fa5=_0x1552ae instanceof Date?_0x1552ae:new Date(_0x1552ae);return _0x58fa5['toISOString']()['replace'](/[:TZ-]/g,'');}function _0x4d53(){const _0xa3284d=['2970552cRwhvr','76xbMZMr','1LDXXfu','1574078ePaMPs','7106376xbNAAu','1712664NnuSzr','5019710tbkISj','6KIfthA','15510OBREIw','80CXSsAx','3046754DUbhCH','7SQvxoN'];_0x4d53=function(){return _0xa3284d;};return _0x4d53();}exports['formatISODate']=formatISODate;function getSymKey(_0x30c019){const _0x4277e7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x27bca7=_0x4277e7['length'];if(_0x30c019<0x0||_0x30c019>=Math['pow'](_0x27bca7,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x3772d9,_0x57f474]=divmod(_0x30c019,_0x27bca7),[_0x19ba4c,_0x31eafe]=divmod(_0x3772d9,_0x27bca7);return _0x4277e7[_0x19ba4c]+_0x4277e7[_0x57f474]+_0x4277e7[_0x31eafe];}exports['getSymKey']=getSymKey;function getSymVal(_0x2e3163){const _0x310ec9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x18af95=_0x310ec9['length'];if(_0x2e3163<0x0||_0x2e3163>=Math['pow'](_0x18af95,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x2f8df7,_0xda7eb1]=divmod(_0x2e3163,_0x18af95);return _0x310ec9[_0x2f8df7]+_0x310ec9[_0xda7eb1];}exports['getSymVal']=getSymVal;function divmod(_0x6b9ae3,_0x52dc24){return[Math['floor'](_0x6b9ae3/_0x52dc24),_0x6b9ae3%_0x52dc24];}function getIndexedHash(_0x244474,_0x576863){const _0x197098=_0x244474[_0x576863]||0x0,_0x93228f={..._0x244474};return delete _0x93228f[_0x576863],[_0x197098,_0x93228f];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0x65776,_0x1c74eb){const _0x52ef06=_0x1c74eb['split']('/');let _0x59fc1a=_0x65776;for(const _0x1d1b5a of _0x52ef06){if(_0x59fc1a[_0x1d1b5a]!==undefined)_0x59fc1a=_0x59fc1a[_0x1d1b5a];else return undefined;}return _0x59fc1a;}exports['getValueByPath']=getValueByPath;function _0x3a62(_0x51c0e0,_0x326e1d){const _0x4d5363=_0x4d53();return _0x3a62=function(_0x3a62ad,_0x2c7921){_0x3a62ad=_0x3a62ad-0x11e;let _0x28de07=_0x4d5363[_0x3a62ad];return _0x28de07;},_0x3a62(_0x51c0e0,_0x326e1d);}function restoreHierarchy(_0x4329d0){const _0x4ed8c4={};for(const _0x20f24a in _0x4329d0){if(_0x4329d0[_0x20f24a]===undefined)continue;const _0x27874e=_0x20f24a['split']('/');let _0xff40c0=_0x4ed8c4;for(let _0x395257=0x0;_0x395257<_0x27874e['length'];_0x395257++){_0x395257===_0x27874e['length']-0x1?_0xff40c0[_0x27874e[_0x395257]]=_0x4329d0[_0x20f24a]:(_0xff40c0[_0x27874e[_0x395257]]=_0xff40c0[_0x27874e[_0x395257]]||{},_0xff40c0=_0xff40c0[_0x27874e[_0x395257]]);}}return _0x4ed8c4;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x362358){const _0x219ee5=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x219ee5['test'](_0x362358);}exports['isValidCron']=isValidCron;const s=_0x4e37b8=>{return(0x0,ms_1['default'])(_0x4e37b8)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x5d054b=>{try{return JSON['parse'](_0x5d054b);}catch(_0x3e8514){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x3e8514});throw _0x3e8514;}};exports['parseStreamMessage']=parseStreamMessage;const isStreamMessage=_0x1adfae=>{return Array['isArray'](_0x1adfae)&&Array['isArray'](_0x1adfae[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x240874=>{const _0x1c3911=[];let _0x20b8f4;for(let _0x49c7bf=0x1;_0x49c7bf<_0x240874['length'];_0x49c7bf++){const _0x8a3447=_0x240874[_0x49c7bf],_0x42fa64={};if(Array['isArray'](_0x8a3447)){for(let _0x3873b0=0x0;_0x3873b0<_0x8a3447['length'];_0x3873b0+=0x2){const _0x572f3c=_0x8a3447[_0x3873b0],_0x2ec092=_0x8a3447[_0x3873b0+0x1];_0x42fa64[_0x572f3c]=_0x2ec092;}_0x20b8f4&&(_0x42fa64['$']=_0x20b8f4),_0x1c3911['push'](_0x42fa64),_0x20b8f4=undefined;}else _0x20b8f4=_0x8a3447;}return _0x1c3911;};exports['arrayToHash']=arrayToHash;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "description": "Unbreakable Workflows",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -8,7 +8,7 @@
8
8
  "type": "git",
9
9
  "url": "https://github.com/hotmeshio/sdk-typescript.git"
10
10
  },
11
- "homepage": "https://github.com/hotmeshio/sdk-typescript#readme",
11
+ "homepage": "https://hotmeshio.github.io/sdk-typescript/",
12
12
  "publishConfig": {
13
13
  "access": "public"
14
14
  },
@@ -63,7 +63,7 @@
63
63
  "test:store:redis": "NODE_ENV=test jest ./tests/functional/store/providers/redis/redis.test.ts --detectOpenHandles --forceExit --verbose",
64
64
  "test:stream:ioredis": "NODE_ENV=test jest ./tests/functional/stream/providers/redis/ioredis.test.ts --detectOpenHandles --forceExit --verbose",
65
65
  "test:stream:redis": "NODE_ENV=test jest ./tests/functional/stream/providers/redis/redis.test.ts --detectOpenHandles --forceExit --verbose",
66
- "test:stream:postgres": "NODE_ENV=test jest ./tests/functional/stream/providers/postgres.test.ts --detectOpenHandles --forceExit --verbose",
66
+ "test:stream:postgres": "NODE_ENV=test jest ./tests/functional/stream/providers/postgres/postgres.test.ts --detectOpenHandles --forceExit --verbose",
67
67
  "test:stream:nats": "NODE_ENV=test jest ./tests/functional/stream/providers/nats/nats.test.ts --detectOpenHandles --forceExit --verbose",
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",
@@ -1 +1 @@
1
- 'use strict';(function(_0x133a55,_0x4b432b){const _0x5b97c5=_0x5550,_0x5d8699=_0x133a55();while(!![]){try{const _0x2a028d=-parseInt(_0x5b97c5(0x17d))/0x1*(parseInt(_0x5b97c5(0x17a))/0x2)+-parseInt(_0x5b97c5(0x182))/0x3*(parseInt(_0x5b97c5(0x183))/0x4)+parseInt(_0x5b97c5(0x17e))/0x5*(parseInt(_0x5b97c5(0x184))/0x6)+-parseInt(_0x5b97c5(0x180))/0x7*(-parseInt(_0x5b97c5(0x17b))/0x8)+parseInt(_0x5b97c5(0x17c))/0x9+parseInt(_0x5b97c5(0x17f))/0xa*(-parseInt(_0x5b97c5(0x181))/0xb)+parseInt(_0x5b97c5(0x185))/0xc;if(_0x2a028d===_0x4b432b)break;else _0x5d8699['push'](_0x5d8699['shift']());}catch(_0x528ea8){_0x5d8699['push'](_0x5d8699['shift']());}}}(_0x100a,0x5e3bd));function _0x5550(_0x4ec0c4,_0x213e0b){const _0x100a77=_0x100a();return _0x5550=function(_0x555092,_0x13d9af){_0x555092=_0x555092-0x17a;let _0x1c042f=_0x100a77[_0x555092];return _0x1c042f;},_0x5550(_0x4ec0c4,_0x213e0b);}function _0x100a(){const _0x1de467=['396218kGtdLy','460rPWWaN','230rbNNUh','5663mRxUoN','296747MmszvV','3BczUJg','2210332LdMVxW','21540cAqWXn','8232288hxGItq','2CyhVaC','3496gwjZgh','5268744IXtxjH'];_0x100a=function(){return _0x1de467;};return _0x100a();}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(_0x52f788,_0x5522ed,_0x2ad1a4,_0x396a4e,_0x1f1fc3,_0x34e213){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x52f788,this['data']=_0x5522ed,this['metadata']=_0x2ad1a4,this['hook']=_0x396a4e,this['engine']=_0x1f1fc3,this['context']=_0x34e213||{'data':{},'metadata':{}},this['logger']=_0x1f1fc3['logger'],this['store']=_0x1f1fc3['store'];}['setLeg'](_0x388c60){this['leg']=_0x388c60;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0xcfd367=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0xcfd367!==undefined&&!isNaN(Number(_0xcfd367)))return _0xcfd367;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x16cca9=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x16cca9);}catch(_0x18f526){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x16cca9>0x0){if(this['context']['metadata']['js']===_0x16cca9){const _0x5112e2=await this['setStatus'](-_0x16cca9);Number(_0x5112e2)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x18f526;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x214d1d=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,_0x214d1d);}async['processEvent'](_0x5c667d=stream_1['StreamStatus']['SUCCESS'],_0x2d07c4=0xc8,_0x2789e1='output'){this['setLeg'](0x2);const _0x9a1b4d=this['context']['metadata']['jid'];if(!_0x9a1b4d){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x2d3c36=this['metadata']['aid'];this['status']=_0x5c667d,this['code']=_0x2d07c4,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x9a1b4d,'aid':_0x2d3c36,'status':_0x5c667d,'code':_0x2d07c4});let _0x5ed797;try{const _0x2d4360=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x2d4360),_0x5ed797=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5ed797['startActivitySpan'](this['leg']);let _0x524c24;if(_0x5c667d===stream_1['StreamStatus']['PENDING'])_0x524c24=await this['processPending'](_0x2789e1);else _0x5c667d===stream_1['StreamStatus']['SUCCESS']?_0x524c24=await this['processSuccess'](_0x2789e1):_0x524c24=await this['processError']();this['transitionAdjacent'](_0x524c24,_0x5ed797);}catch(_0x12ddb0){if(_0x12ddb0 instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x12ddb0['fault']+'-error',{..._0x12ddb0});return;}else{if(_0x12ddb0 instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x12ddb0});return;}else{if(_0x12ddb0 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x12ddb0});return;}else{if(_0x12ddb0 instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x12ddb0});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x12ddb0,'message':_0x12ddb0['message'],'stack':_0x12ddb0['stack'],'name':_0x12ddb0['name']}),_0x5ed797?.['setActivityError'](_0x12ddb0['message']);throw _0x12ddb0;}finally{_0x5ed797?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x9a1b4d,'aid':_0x2d3c36});}}async['processPending'](_0x10a633){this['bindActivityData'](_0x10a633),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x4263b2=this['store']['transact']();return await this['setState'](_0x4263b2),await collator_1['CollatorService']['notarizeContinuation'](this,_0x4263b2),await this['setStatus'](this['adjacencyList']['length'],_0x4263b2),await _0x4263b2['exec']();}async['processSuccess'](_0x5c3bd8){this['bindActivityData'](_0x5c3bd8),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0xb4b682=this['store']['transact']();return await this['setState'](_0xb4b682),await collator_1['CollatorService']['notarizeCompletion'](this,_0xb4b682),await this['setStatus'](this['adjacencyList']['length']-0x1,_0xb4b682),await _0xb4b682['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0xcfbde2=this['store']['transact']();return await this['setState'](_0xcfbde2),await collator_1['CollatorService']['notarizeCompletion'](this,_0xcfbde2),await this['setStatus'](this['adjacencyList']['length']-0x1,_0xcfbde2),await _0xcfbde2['exec']();}async['transitionAdjacent'](_0x2fdace,_0x45f415){_0x45f415['mapActivityAttributes']();const _0x52cf0a=this['resolveStatus'](_0x2fdace),_0x23926b={'app.job.jss':_0x52cf0a},_0x33a6f4=await this['transition'](this['adjacencyList'],_0x52cf0a);_0x33a6f4?.['length']&&(_0x23926b['app.activity.mids']=_0x33a6f4['join'](',')),_0x45f415['setActivityAttributes'](_0x23926b);}['resolveStatus'](_0x3b2771){const _0x42826c=_0x3b2771[_0x3b2771['length']-0x1];return Array['isArray'](_0x42826c)?Number(_0x42826c[0x1]):Number(_0x42826c);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x140614=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x406ffc=_0x140614['mapRules']();if(_0x406ffc)for(const _0x42f0d1 in _0x406ffc){const _0x23fa81=_0x42f0d1['indexOf']('[');if(_0x23fa81>-0x1){const _0x394d3a=_0x42f0d1['substring'](_0x23fa81+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x394d3a))){const _0x20aebc=_0x42f0d1['substring'](0x0,_0x23fa81);_0x406ffc[_0x20aebc]=_0x406ffc[_0x42f0d1],delete _0x406ffc[_0x42f0d1];}else{if(_0x394d3a==='-'||_0x394d3a==='_'){const _0x465d47=_0x406ffc[_0x42f0d1];Object['keys'](_0x465d47)['forEach'](_0xf6ade2=>{_0x406ffc[_0xf6ade2]=_0x465d47[_0xf6ade2];});}}}}this['context']['data']=_0x406ffc;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x29d616=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x29d616['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x56bd2c=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x64db49=_0x56bd2c['mapRules'](),_0x2a3676=this['metadata']['aid'],_0x1db18d={...this['context'][_0x2a3676]['output'],..._0x64db49};this['context'][_0x2a3676]['output']['data']=_0x1db18d;}}async['registerTimeout'](){}['bindActivityError'](_0x657673){const _0x22369e=this['context'][this['metadata']['aid']]['output']['metadata'];_0x22369e['err']=JSON['stringify'](this['data']),_0x22369e['$error']={..._0x657673,'is_stream_error':!![]};}['bindJobError'](_0x322842){this['context']['metadata']['err']=JSON['stringify']({..._0x322842,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x5e5955,_0x32689b){const {id:_0x19d059}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x5e5955,this['context']['metadata']['jid'],_0x19d059,_0x32689b);}['authorizeEntry'](_0x3de968){return this['adjacencyList']?.['map'](_0x5b0459=>{const {metadata:{aid:_0x8a9bc}}=_0x5b0459;return _0x3de968[_0x8a9bc+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x8a9bc;})??[];}['bindDimensionalAddress'](_0x5a7429){const _0x127f63=this['resolveDad']();_0x5a7429[this['metadata']['aid']+'/output/metadata/dad']=_0x127f63;}async['setState'](_0x40c919){const _0x5c86c0=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x2daa2f={};await this['bindJobState'](_0x2daa2f);const _0x1d7240=this['authorizeEntry'](_0x2daa2f);this['bindDimensionalAddress'](_0x2daa2f),this['bindActivityState'](_0x2daa2f);const _0x1fa803=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x1d7240],_0x316355=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x2daa2f,this['getJobStatus'](),_0x5c86c0,_0x1fa803,_0x316355,_0x40c919);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x13d810=this['context']['$self'];!_0x13d810['output']['metadata']&&(_0x13d810['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x13d810['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x1f6aa8=(0x0,utils_1['formatISODate'])(new Date());_0x13d810['output']['metadata']['ac']=_0x1f6aa8,_0x13d810['output']['metadata']['au']=_0x1f6aa8,_0x13d810['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x13d810['output']['metadata']['stp']=this['config']['subtype']),_0x13d810['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x3c2d3a){const _0x1e98bd=await this['getTriggerConfig'](),_0x51e0f1=[..._0x1e98bd['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x3497d0 of _0x51e0f1){const _0x26358f=(0x0,utils_1['getValueByPath'])(this['context'],_0x3497d0);_0x26358f!==undefined&&(_0x3c2d3a[_0x3497d0]=_0x26358f);}for(const _0x46d6a6 in this['context']?.['data']??{}){(_0x46d6a6['startsWith']('-')||_0x46d6a6['startsWith']('_'))&&(_0x3c2d3a[_0x46d6a6]=this['context']['data'][_0x46d6a6]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x3c2d3a,this['config'],this['context']);}['bindActivityState'](_0x230378){const _0x47eafc=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x358ade of _0x47eafc){const _0x1c3766=this['metadata']['aid']+'/'+_0x358ade,_0x4952b2=(0x0,utils_1['getValueByPath'])(this['context'],_0x1c3766);_0x4952b2!==undefined&&(_0x230378[_0x1c3766]=_0x4952b2);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x230378,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x49c6fa=>'metadata/'+_0x49c6fa);}['bindActivityMetadataPaths'](){const _0x51f006=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x51f006]['KEYS']['map'](_0x469c0d=>'output/metadata/'+_0x469c0d);}async['getState'](){const _0x534fab=this['context']['metadata']['gid'],_0x3dfff2='$'+this['config']['subscribes'],_0x34c2b5={[_0x3dfff2]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x74f755=>'metadata/'+_0x74f755)};for(let [_0x3d6072,_0x2a7d07]of Object['entries'](this['config']['consumes'])){if(_0x3d6072==='$job')for(const _0x193898 of _0x2a7d07){_0x34c2b5[_0x3dfff2]['push'](_0x193898);}else{_0x3d6072==='$self'&&(_0x3d6072=this['metadata']['aid']);!_0x34c2b5[_0x3d6072]&&(_0x34c2b5[_0x3d6072]=[]);for(const _0x1c17a4 of _0x2a7d07){_0x34c2b5[_0x3d6072]['push'](_0x3d6072+'/'+_0x1c17a4);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x34c2b5,this['config'],this['metadata'],this['leg']);const {dad:_0x382c72,jid:_0x223cf3}=this['context']['metadata'],_0x1ba84a=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x382c72||''),[_0x2cfe88,_0x521d1e]=await this['store']['getState'](_0x223cf3,_0x34c2b5,_0x1ba84a);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x2cfe88),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x534fab),this['initDimensionalAddress'](_0x382c72),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x2419a5,_0x1cfd04){if(_0x1cfd04!==_0x2419a5)throw new errors_1['GenerationalError'](_0x2419a5,_0x1cfd04,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x45459e){this['metadata']['dad']=_0x45459e;}['initSelf'](_0x523186){const _0x24f167=this['metadata']['aid'];!_0x523186[_0x24f167]&&(_0x523186[_0x24f167]={});const _0x45d807=_0x523186[_0x24f167];return!_0x45d807['output']&&(_0x45d807['output']={}),!_0x45d807['input']&&(_0x45d807['input']={}),!_0x45d807['hook']&&(_0x45d807['hook']={}),!_0x45d807['output']['metadata']&&(_0x45d807['output']['metadata']={}),_0x45d807['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x523186['$self']=_0x45d807,_0x523186['$job']=_0x523186,_0x523186;}['initPolicies'](_0x1a66b7){const _0x5447f5=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x1a66b7);_0x1a66b7['metadata']['expire']=_0x5447f5;if(this['config']['persistent']!=undefined){const _0x3aeeb1=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x1a66b7);_0x1a66b7['metadata']['persistent']=_0x3aeeb1;}}['bindActivityData'](_0x5bca53){this['context'][this['metadata']['aid']][_0x5bca53]['data']=this['data'];}['resolveDad'](){let _0x513fc5=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x513fc5=_0x513fc5['substring'](0x0,_0x513fc5['lastIndexOf'](','))+','+this['adjacentIndex']),_0x513fc5;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x333646=[],_0x3708e5=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x1d3efe=_0x3708e5['.'+this['metadata']['aid']],_0x569439=this['resolveAdjacentDad']();if(_0x1d3efe)for(const _0x496e69 in _0x1d3efe){const _0x3bd4b0=_0x1d3efe[_0x496e69];mapper_1['MapperService']['evaluate'](_0x3bd4b0,this['context'],this['code'])&&_0x333646['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x569439,'aid':_0x496e69,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x333646;}['isJobComplete'](_0x8c044d){return _0x8c044d<=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'](_0xfd32b0,_0x1a01ff){if(this['jobWasInterrupted'](_0x1a01ff))return;let _0x5eabcd=[];(this['shouldEmit']()||this['isJobComplete'](_0x1a01ff)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x1a01ff)&&!this['shouldPersistJob']()});if(_0xfd32b0['length']&&!this['isJobComplete'](_0x1a01ff)){const _0x32e0c7=this['store']['transact']();for(const _0x5e4109 of _0xfd32b0){await this['engine']['router']?.['publishMessage'](null,_0x5e4109,_0x32e0c7);}_0x5eabcd=await _0x32e0c7['exec']();}return _0x5eabcd;}['jobWasInterrupted'](_0x241480){return _0x241480<-0x5f5e100;}}exports['Activity']=Activity;
1
+ 'use strict';(function(_0x5415e1,_0x34a6da){const _0x21de69=_0x45d6,_0x46ef7f=_0x5415e1();while(!![]){try{const _0x1e94a3=parseInt(_0x21de69(0x93))/0x1*(-parseInt(_0x21de69(0x8f))/0x2)+parseInt(_0x21de69(0x95))/0x3*(-parseInt(_0x21de69(0x8d))/0x4)+-parseInt(_0x21de69(0x91))/0x5*(-parseInt(_0x21de69(0x96))/0x6)+parseInt(_0x21de69(0x8e))/0x7*(parseInt(_0x21de69(0x97))/0x8)+-parseInt(_0x21de69(0x92))/0x9*(-parseInt(_0x21de69(0x94))/0xa)+-parseInt(_0x21de69(0x90))/0xb+parseInt(_0x21de69(0x8c))/0xc;if(_0x1e94a3===_0x34a6da)break;else _0x46ef7f['push'](_0x46ef7f['shift']());}catch(_0x3d88a2){_0x46ef7f['push'](_0x46ef7f['shift']());}}}(_0x3362,0xb6c83));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 _0x3362(){const _0x574214=['1550517OxhaOu','1038VxzUFB','16rLTNjn','23829612scVjuF','4nKyrpT','4345411LakMSY','23150hcYUjA','9536989KwAvWp','8290onjGmj','9YAJjfQ','125DADddz','652070qSVJhP'];_0x3362=function(){return _0x574214;};return _0x3362();}class Activity{constructor(_0x40b5e6,_0x3ae50f,_0x3771bf,_0x56b4e4,_0x345da5,_0x487186){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x40b5e6,this['data']=_0x3ae50f,this['metadata']=_0x3771bf,this['hook']=_0x56b4e4,this['engine']=_0x345da5,this['context']=_0x487186||{'data':{},'metadata':{}},this['logger']=_0x345da5['logger'],this['store']=_0x345da5['store'];}['setLeg'](_0x13d328){this['leg']=_0x13d328;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x22b613=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x22b613!==undefined&&!isNaN(Number(_0x22b613)))return _0x22b613;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x52c6d7=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x52c6d7);}catch(_0x19b74f){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x52c6d7>0x0){if(this['context']['metadata']['js']===_0x52c6d7){const _0x5a0939=await this['setStatus'](-_0x52c6d7);Number(_0x5a0939)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x19b74f;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x335c5b=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,_0x335c5b);}async['processEvent'](_0x13f540=stream_1['StreamStatus']['SUCCESS'],_0x4114f1=0xc8,_0x5bbbd7='output'){this['setLeg'](0x2);const _0x339ef8=this['context']['metadata']['jid'];if(!_0x339ef8){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x230432=this['metadata']['aid'];this['status']=_0x13f540,this['code']=_0x4114f1,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x339ef8,'aid':_0x230432,'status':_0x13f540,'code':_0x4114f1});let _0x58d62f;try{const _0x14cb0b=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x14cb0b),_0x58d62f=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x58d62f['startActivitySpan'](this['leg']);let _0x356623;if(_0x13f540===stream_1['StreamStatus']['PENDING'])_0x356623=await this['processPending'](_0x5bbbd7);else _0x13f540===stream_1['StreamStatus']['SUCCESS']?_0x356623=await this['processSuccess'](_0x5bbbd7):_0x356623=await this['processError']();this['transitionAdjacent'](_0x356623,_0x58d62f);}catch(_0x46a8c6){if(_0x46a8c6 instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x46a8c6['fault']+'-error',{..._0x46a8c6});return;}else{if(_0x46a8c6 instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x46a8c6});return;}else{if(_0x46a8c6 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x46a8c6});return;}else{if(_0x46a8c6 instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x46a8c6});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x46a8c6,'message':_0x46a8c6['message'],'stack':_0x46a8c6['stack'],'name':_0x46a8c6['name']}),_0x58d62f?.['setActivityError'](_0x46a8c6['message']);throw _0x46a8c6;}finally{_0x58d62f?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x339ef8,'aid':_0x230432});}}async['processPending'](_0xa5ee82){this['bindActivityData'](_0xa5ee82),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x25959e=this['store']['transact']();return await this['setState'](_0x25959e),await collator_1['CollatorService']['notarizeContinuation'](this,_0x25959e),await this['setStatus'](this['adjacencyList']['length'],_0x25959e),await _0x25959e['exec']();}async['processSuccess'](_0xbe3205){this['bindActivityData'](_0xbe3205),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x4c55f4=this['store']['transact']();return await this['setState'](_0x4c55f4),await collator_1['CollatorService']['notarizeCompletion'](this,_0x4c55f4),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x4c55f4),await _0x4c55f4['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x1acfe7=this['store']['transact']();return await this['setState'](_0x1acfe7),await collator_1['CollatorService']['notarizeCompletion'](this,_0x1acfe7),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x1acfe7),await _0x1acfe7['exec']();}async['transitionAdjacent'](_0x4626c4,_0x129142){_0x129142['mapActivityAttributes']();const _0x591579=this['resolveStatus'](_0x4626c4),_0x10732a={'app.job.jss':_0x591579},_0x228af7=await this['transition'](this['adjacencyList'],_0x591579);_0x228af7?.['length']&&(_0x10732a['app.activity.mids']=_0x228af7['join'](',')),_0x129142['setActivityAttributes'](_0x10732a);}['resolveStatus'](_0x3b7a0c){const _0x525cea=_0x3b7a0c[_0x3b7a0c['length']-0x1];return Array['isArray'](_0x525cea)?Number(_0x525cea[0x1]):Number(_0x525cea);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x56de90=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x4a8478=_0x56de90['mapRules']();if(_0x4a8478)for(const _0x1c3e3c in _0x4a8478){const _0x44eaa1=_0x1c3e3c['indexOf']('[');if(_0x44eaa1>-0x1){const _0x13094c=_0x1c3e3c['substring'](_0x44eaa1+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x13094c))){const _0xf6a10a=_0x1c3e3c['substring'](0x0,_0x44eaa1);_0x4a8478[_0xf6a10a]=_0x4a8478[_0x1c3e3c],delete _0x4a8478[_0x1c3e3c];}else{if(_0x13094c==='-'||_0x13094c==='_'){const _0x508a29=_0x4a8478[_0x1c3e3c];Object['keys'](_0x508a29)['forEach'](_0x381ad1=>{_0x4a8478[_0x381ad1]=_0x508a29[_0x381ad1];});}}}}this['context']['data']=_0x4a8478;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x18c9a1=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x18c9a1['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x3baf96=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x331472=_0x3baf96['mapRules'](),_0x38d8df=this['metadata']['aid'],_0x55f00f={...this['context'][_0x38d8df]['output'],..._0x331472};this['context'][_0x38d8df]['output']['data']=_0x55f00f;}}async['registerTimeout'](){}['bindActivityError'](_0x213bfc){const _0x506bad=this['context'][this['metadata']['aid']]['output']['metadata'];_0x506bad['err']=JSON['stringify'](this['data']),_0x506bad['$error']={..._0x213bfc,'is_stream_error':!![]};}['bindJobError'](_0x34650d){this['context']['metadata']['err']=JSON['stringify']({..._0x34650d,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0xe7f167,_0x4dcbd6){const {id:_0x2dfd9c}=await this['engine']['getVID']();return await this['store']['setStatus'](_0xe7f167,this['context']['metadata']['jid'],_0x2dfd9c,_0x4dcbd6);}['authorizeEntry'](_0x3761bb){return this['adjacencyList']?.['map'](_0x57f23f=>{const {metadata:{aid:_0x252ee}}=_0x57f23f;return _0x3761bb[_0x252ee+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x252ee;})??[];}['bindDimensionalAddress'](_0x36c75e){const _0x3e6e59=this['resolveDad']();_0x36c75e[this['metadata']['aid']+'/output/metadata/dad']=_0x3e6e59;}async['setState'](_0xc21dca){const _0x104beb=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x58238d={};await this['bindJobState'](_0x58238d);const _0x4d794e=this['authorizeEntry'](_0x58238d);this['bindDimensionalAddress'](_0x58238d),this['bindActivityState'](_0x58238d);const _0x3c3ebb=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x4d794e],_0x52556c=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x58238d,this['getJobStatus'](),_0x104beb,_0x3c3ebb,_0x52556c,_0xc21dca);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x2f5887=this['context']['$self'];!_0x2f5887['output']['metadata']&&(_0x2f5887['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x2f5887['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x5ed982=(0x0,utils_1['formatISODate'])(new Date());_0x2f5887['output']['metadata']['ac']=_0x5ed982,_0x2f5887['output']['metadata']['au']=_0x5ed982,_0x2f5887['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x2f5887['output']['metadata']['stp']=this['config']['subtype']),_0x2f5887['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x48141e){const _0x5cce6b=await this['getTriggerConfig'](),_0x522396=[..._0x5cce6b['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x8a974c of _0x522396){const _0x5252f6=(0x0,utils_1['getValueByPath'])(this['context'],_0x8a974c);_0x5252f6!==undefined&&(_0x48141e[_0x8a974c]=_0x5252f6);}for(const _0x9b9f1f in this['context']?.['data']??{}){(_0x9b9f1f['startsWith']('-')||_0x9b9f1f['startsWith']('_'))&&(_0x48141e[_0x9b9f1f]=this['context']['data'][_0x9b9f1f]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x48141e,this['config'],this['context']);}['bindActivityState'](_0x4b9ec2){const _0x14525f=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x311c71 of _0x14525f){const _0x21524b=this['metadata']['aid']+'/'+_0x311c71,_0x5410fe=(0x0,utils_1['getValueByPath'])(this['context'],_0x21524b);_0x5410fe!==undefined&&(_0x4b9ec2[_0x21524b]=_0x5410fe);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x4b9ec2,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x9e6216=>'metadata/'+_0x9e6216);}['bindActivityMetadataPaths'](){const _0x255689=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x255689]['KEYS']['map'](_0x52d730=>'output/metadata/'+_0x52d730);}async['getState'](){const _0x31c976=this['context']['metadata']['gid'],_0x2e821b='$'+this['config']['subscribes'],_0xc3f511={[_0x2e821b]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x17d968=>'metadata/'+_0x17d968)};for(let [_0x271c94,_0xd56dc]of Object['entries'](this['config']['consumes'])){if(_0x271c94==='$job')for(const _0x856071 of _0xd56dc){_0xc3f511[_0x2e821b]['push'](_0x856071);}else{_0x271c94==='$self'&&(_0x271c94=this['metadata']['aid']);!_0xc3f511[_0x271c94]&&(_0xc3f511[_0x271c94]=[]);for(const _0x269271 of _0xd56dc){_0xc3f511[_0x271c94]['push'](_0x271c94+'/'+_0x269271);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0xc3f511,this['config'],this['metadata'],this['leg']);const {dad:_0x401c79,jid:_0x5801b2}=this['context']['metadata'],_0x31e6d3=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x401c79||''),[_0xe91adf,_0x153966]=await this['store']['getState'](_0x5801b2,_0xc3f511,_0x31e6d3);this['context']=(0x0,utils_1['restoreHierarchy'])(_0xe91adf),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x31c976),this['initDimensionalAddress'](_0x401c79),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x5be2c5,_0x51cd32){if(_0x51cd32!==_0x5be2c5)throw new errors_1['GenerationalError'](_0x5be2c5,_0x51cd32,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x4afad4){this['metadata']['dad']=_0x4afad4;}['initSelf'](_0x2dae96){const _0x45238f=this['metadata']['aid'];!_0x2dae96[_0x45238f]&&(_0x2dae96[_0x45238f]={});const _0x4f135d=_0x2dae96[_0x45238f];return!_0x4f135d['output']&&(_0x4f135d['output']={}),!_0x4f135d['input']&&(_0x4f135d['input']={}),!_0x4f135d['hook']&&(_0x4f135d['hook']={}),!_0x4f135d['output']['metadata']&&(_0x4f135d['output']['metadata']={}),_0x4f135d['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x2dae96['$self']=_0x4f135d,_0x2dae96['$job']=_0x2dae96,_0x2dae96;}['initPolicies'](_0x367216){const _0x47ef13=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x367216);_0x367216['metadata']['expire']=_0x47ef13;if(this['config']['persistent']!=undefined){const _0xbaf167=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x367216);_0x367216['metadata']['persistent']=_0xbaf167;}}['bindActivityData'](_0x5b26f6){this['context'][this['metadata']['aid']][_0x5b26f6]['data']=this['data'];}['resolveDad'](){let _0x225d85=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x225d85=_0x225d85['substring'](0x0,_0x225d85['lastIndexOf'](','))+','+this['adjacentIndex']),_0x225d85;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x12936f=[],_0x3872ae=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x1c723b=_0x3872ae['.'+this['metadata']['aid']],_0x3d4ff6=this['resolveAdjacentDad']();if(_0x1c723b)for(const _0x538398 in _0x1c723b){const _0x5d764b=_0x1c723b[_0x538398];mapper_1['MapperService']['evaluate'](_0x5d764b,this['context'],this['code'])&&_0x12936f['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x3d4ff6,'aid':_0x538398,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x12936f;}['isJobComplete'](_0x25113d){return _0x25113d<=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'](_0xa926e8,_0x36f354){if(this['jobWasInterrupted'](_0x36f354))return;let _0x2b17ca=[];(this['shouldEmit']()||this['isJobComplete'](_0x36f354)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x36f354)&&!this['shouldPersistJob']()});if(_0xa926e8['length']&&!this['isJobComplete'](_0x36f354)){const _0x364278=this['store']['transact']();for(const _0xbeb5a6 of _0xa926e8){await this['engine']['router']?.['publishMessage'](null,_0xbeb5a6,_0x364278);}_0x2b17ca=await _0x364278['exec']();}return _0x2b17ca;}['jobWasInterrupted'](_0x4937bd){return _0x4937bd<-0x5f5e100;}}function _0x45d6(_0x41e94e,_0x761c91){const _0x3362b4=_0x3362();return _0x45d6=function(_0x45d66e,_0x524d9f){_0x45d66e=_0x45d66e-0x8c;let _0x46dc31=_0x3362b4[_0x45d66e];return _0x46dc31;},_0x45d6(_0x41e94e,_0x761c91);}exports['Activity']=Activity;
@@ -1 +1 @@
1
- 'use strict';(function(_0x621184,_0x534ce7){const _0x54bd54=_0x2d31,_0x328967=_0x621184();while(!![]){try{const _0x3266da=-parseInt(_0x54bd54(0xf4))/0x1*(parseInt(_0x54bd54(0xee))/0x2)+parseInt(_0x54bd54(0xef))/0x3*(parseInt(_0x54bd54(0xf2))/0x4)+-parseInt(_0x54bd54(0xf1))/0x5+parseInt(_0x54bd54(0xf6))/0x6*(parseInt(_0x54bd54(0xf3))/0x7)+-parseInt(_0x54bd54(0xf8))/0x8*(-parseInt(_0x54bd54(0xf9))/0x9)+parseInt(_0x54bd54(0xf0))/0xa+-parseInt(_0x54bd54(0xf5))/0xb*(parseInt(_0x54bd54(0xf7))/0xc);if(_0x3266da===_0x534ce7)break;else _0x328967['push'](_0x328967['shift']());}catch(_0x32c808){_0x328967['push'](_0x328967['shift']());}}}(_0x2031,0xcc448));function _0x2d31(_0x18ec77,_0x51bb26){const _0x20314c=_0x2031();return _0x2d31=function(_0x2d31ed,_0x24c21c){_0x2d31ed=_0x2d31ed-0xee;let _0x2c15c1=_0x20314c[_0x2d31ed];return _0x2c15c1;},_0x2d31(_0x18ec77,_0x51bb26);}function _0x2031(){const _0x4638a8=['61672JNhTXO','18GKLqnw','38UKaMAs','60741MoBOeL','5830200LZoWfv','929835IrWCMt','52QwqrxY','430241GFRRiR','24763TVzWSd','453794OPrXvL','114ybiQjV','156iPeOMc'];_0x2031=function(){return _0x4638a8;};return _0x2031();}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');class Await extends activity_1['Activity']{constructor(_0x23a28e,_0x22cec9,_0x259f16,_0x31e2cd,_0x1398cf,_0x4ad875){super(_0x23a28e,_0x22cec9,_0x259f16,_0x31e2cd,_0x1398cf,_0x4ad875);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0xa70685;try{await this['verifyEntry'](),_0xa70685=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0xa70685['startActivitySpan'](this['leg']),this['mapInputData']();const _0x3c0580=this['store']['transact'](),_0x5b6eb0=await this['execActivity'](_0x3c0580);await collator_1['CollatorService']['authorizeReentry'](this,_0x3c0580),await this['setState'](_0x3c0580),await this['setStatus'](0x0,_0x3c0580);const _0x4dc3dd=await _0x3c0580['exec']();_0xa70685['mapActivityAttributes']();const _0x9e4627=this['resolveStatus'](_0x4dc3dd);return _0xa70685['setActivityAttributes']({'app.activity.mid':_0x5b6eb0,'app.job.jss':_0x9e4627}),this['context']['metadata']['aid'];}catch(_0x26f387){if(_0x26f387 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x26f387});return;}else{if(_0x26f387 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x26f387});return;}else{if(_0x26f387 instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0x26f387});return;}else{if(_0x26f387 instanceof errors_1['CollationError']){if(_0x26f387['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',{..._0x26f387});}else this['logger']['error']('await-process-error',{..._0x26f387});}}}_0xa70685?.['setActivityError'](_0x26f387['message']);throw _0x26f387;}finally{_0xa70685?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x51de94){const _0x551247=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x26d1f9={'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':_0x551247,'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 _0x1a4e55=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x1a4e55===![]&&(_0x26d1f9['metadata']['await']=![]);}return this['config']['retry']&&(_0x26d1f9['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x26d1f9,_0x51de94);}}exports['Await']=Await;
1
+ 'use strict';(function(_0x32ef98,_0x26ddaf){const _0x8ffb5f=_0x3d3d,_0x3c11aa=_0x32ef98();while(!![]){try{const _0xa5f4f1=parseInt(_0x8ffb5f(0x1ae))/0x1*(-parseInt(_0x8ffb5f(0x1b1))/0x2)+parseInt(_0x8ffb5f(0x1b6))/0x3+parseInt(_0x8ffb5f(0x1b3))/0x4+-parseInt(_0x8ffb5f(0x1b0))/0x5*(-parseInt(_0x8ffb5f(0x1b5))/0x6)+parseInt(_0x8ffb5f(0x1b8))/0x7*(parseInt(_0x8ffb5f(0x1b4))/0x8)+parseInt(_0x8ffb5f(0x1b7))/0x9*(parseInt(_0x8ffb5f(0x1b2))/0xa)+-parseInt(_0x8ffb5f(0x1af))/0xb;if(_0xa5f4f1===_0x26ddaf)break;else _0x3c11aa['push'](_0x3c11aa['shift']());}catch(_0x268fb7){_0x3c11aa['push'](_0x3c11aa['shift']());}}}(_0x40e3,0x6118b));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');class Await extends activity_1['Activity']{constructor(_0x30ca8d,_0x53b131,_0x4327e0,_0x3cf304,_0x35aeb3,_0x4fa814){super(_0x30ca8d,_0x53b131,_0x4327e0,_0x3cf304,_0x35aeb3,_0x4fa814);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x21c6ad;try{await this['verifyEntry'](),_0x21c6ad=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x21c6ad['startActivitySpan'](this['leg']),this['mapInputData']();const _0x4c4298=this['store']['transact'](),_0x35cf19=await this['execActivity'](_0x4c4298);await collator_1['CollatorService']['authorizeReentry'](this,_0x4c4298),await this['setState'](_0x4c4298),await this['setStatus'](0x0,_0x4c4298);const _0xce1af1=await _0x4c4298['exec']();_0x21c6ad['mapActivityAttributes']();const _0x5caec3=this['resolveStatus'](_0xce1af1);return _0x21c6ad['setActivityAttributes']({'app.activity.mid':_0x35cf19,'app.job.jss':_0x5caec3}),this['context']['metadata']['aid'];}catch(_0x4828ee){if(_0x4828ee instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x4828ee});return;}else{if(_0x4828ee instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x4828ee});return;}else{if(_0x4828ee instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0x4828ee});return;}else{if(_0x4828ee instanceof errors_1['CollationError']){if(_0x4828ee['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',{..._0x4828ee});}else this['logger']['error']('await-process-error',{..._0x4828ee});}}}_0x21c6ad?.['setActivityError'](_0x4828ee['message']);throw _0x4828ee;}finally{_0x21c6ad?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x28167c){const _0x5cd5c4=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x343e66={'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':_0x5cd5c4,'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 _0x18d0de=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x18d0de===![]&&(_0x343e66['metadata']['await']=![]);}return this['config']['retry']&&(_0x343e66['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x343e66,_0x28167c);}}function _0x40e3(){const _0x1973dc=['313434AddLDu','2060361fwToOJ','35VNrmYW','24641ENHSwP','12651815IkHXyD','15AXhAAh','10NIDfNC','20BeFdkc','282380SiXEUw','1087664akNuTD','716712WeqUhN'];_0x40e3=function(){return _0x1973dc;};return _0x40e3();}function _0x3d3d(_0x7392b1,_0x591ba0){const _0x40e32f=_0x40e3();return _0x3d3d=function(_0x3d3d8d,_0x1133e0){_0x3d3d8d=_0x3d3d8d-0x1ae;let _0x9893c2=_0x40e32f[_0x3d3d8d];return _0x9893c2;},_0x3d3d(_0x7392b1,_0x591ba0);}exports['Await']=Await;
@@ -1 +1 @@
1
- 'use strict';(function(_0xf200bf,_0x57662e){const _0x2424f9=_0x119b,_0x1f015c=_0xf200bf();while(!![]){try{const _0x1e943f=-parseInt(_0x2424f9(0x1f0))/0x1+parseInt(_0x2424f9(0x1ee))/0x2+-parseInt(_0x2424f9(0x1e8))/0x3+-parseInt(_0x2424f9(0x1eb))/0x4*(-parseInt(_0x2424f9(0x1ed))/0x5)+-parseInt(_0x2424f9(0x1ef))/0x6*(-parseInt(_0x2424f9(0x1f1))/0x7)+-parseInt(_0x2424f9(0x1ea))/0x8+-parseInt(_0x2424f9(0x1ec))/0x9*(-parseInt(_0x2424f9(0x1e9))/0xa);if(_0x1e943f===_0x57662e)break;else _0x1f015c['push'](_0x1f015c['shift']());}catch(_0x4818c8){_0x1f015c['push'](_0x1f015c['shift']());}}}(_0xb108,0x5935a));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');function _0x119b(_0x556b1a,_0x4693ed){const _0xb108f8=_0xb108();return _0x119b=function(_0x119bf3,_0x483396){_0x119bf3=_0x119bf3-0x1e8;let _0x2498d8=_0xb108f8[_0x119bf3];return _0x2498d8;},_0x119b(_0x556b1a,_0x4693ed);}class Cycle extends activity_1['Activity']{constructor(_0x58dfb5,_0x347158,_0x191653,_0xa136c,_0x34d369,_0x1366a8){super(_0x58dfb5,_0x347158,_0x191653,_0xa136c,_0x34d369,_0x1366a8);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0xd42183;try{await this['verifyEntry'](),_0xd42183=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0xd42183['startActivitySpan'](this['leg']),this['mapInputData']();let _0x31798c=this['store']['transact']();await this['setState'](_0x31798c),await this['setStatus'](0x0,_0x31798c);const _0xbb2f23=await _0x31798c['exec']();_0xd42183['mapActivityAttributes']();const _0x16c50e=this['resolveStatus'](_0xbb2f23);_0x31798c=this['store']['transact']();const _0x14eb80=await this['cycleAncestorActivity'](_0x31798c);return _0xd42183['setActivityAttributes']({'app.activity.mid':_0x14eb80,'app.job.jss':_0x16c50e}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x31798c),await _0x31798c['exec'](),this['context']['metadata']['aid'];}catch(_0x2021c9){if(_0x2021c9 instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x2021c9});return;}else{if(_0x2021c9 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x2021c9});return;}else{if(_0x2021c9 instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x2021c9});return;}else{if(_0x2021c9 instanceof errors_1['CollationError']){if(_0x2021c9['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',{..._0x2021c9});}else this['logger']['error']('cycle-process-error',{..._0x2021c9});}}}_0xd42183?.['setActivityError'](_0x2021c9['message']);throw _0x2021c9;}finally{_0xd42183?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x16b0c3){this['mapInputData']();const _0x4974ae={'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,_0x4974ae,_0x16b0c3);}}exports['Cycle']=Cycle;function _0xb108(){const _0x3c553b=['1148zSCNFt','54918tFFJGk','865kmZsIf','772920jOkLkj','234ijxINw','445204oXSnNL','61957hpyPqj','366366JeYVmX','1220LsngSf','4744128EMjpEO'];_0xb108=function(){return _0x3c553b;};return _0xb108();}
1
+ 'use strict';(function(_0x31bed4,_0x2790d4){const _0x505ec0=_0x3d06,_0x21d907=_0x31bed4();while(!![]){try{const _0xb13b84=-parseInt(_0x505ec0(0x1f9))/0x1+parseInt(_0x505ec0(0x1f8))/0x2+-parseInt(_0x505ec0(0x1f2))/0x3*(-parseInt(_0x505ec0(0x1f3))/0x4)+-parseInt(_0x505ec0(0x1f7))/0x5+-parseInt(_0x505ec0(0x1f6))/0x6*(parseInt(_0x505ec0(0x1f4))/0x7)+-parseInt(_0x505ec0(0x1f5))/0x8+parseInt(_0x505ec0(0x1f1))/0x9;if(_0xb13b84===_0x2790d4)break;else _0x21d907['push'](_0x21d907['shift']());}catch(_0x207b3c){_0x21d907['push'](_0x21d907['shift']());}}}(_0x498e,0x84f88));function _0x498e(){const _0x93668f=['124SQxqne','28vSyVxE','3273712KDdgWS','460926oqkTBW','4715505DOQDZn','1140596TNRQsG','564824WEGiLN','17791596dBFkYi','21477yefAPt'];_0x498e=function(){return _0x93668f;};return _0x498e();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Cycle']=void 0x0;function _0x3d06(_0x21f29e,_0x2e27d1){const _0x498e76=_0x498e();return _0x3d06=function(_0x3d0641,_0x19975e){_0x3d0641=_0x3d0641-0x1f1;let _0x3ddd9f=_0x498e76[_0x3d0641];return _0x3ddd9f;},_0x3d06(_0x21f29e,_0x2e27d1);}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(_0x29b0a2,_0x4fa4cb,_0x337847,_0x5d356d,_0x19e40a,_0x5bef0c){super(_0x29b0a2,_0x4fa4cb,_0x337847,_0x5d356d,_0x19e40a,_0x5bef0c);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x3ccfcc;try{await this['verifyEntry'](),_0x3ccfcc=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3ccfcc['startActivitySpan'](this['leg']),this['mapInputData']();let _0x5c9162=this['store']['transact']();await this['setState'](_0x5c9162),await this['setStatus'](0x0,_0x5c9162);const _0x347d00=await _0x5c9162['exec']();_0x3ccfcc['mapActivityAttributes']();const _0x48065b=this['resolveStatus'](_0x347d00);_0x5c9162=this['store']['transact']();const _0xbc5c2a=await this['cycleAncestorActivity'](_0x5c9162);return _0x3ccfcc['setActivityAttributes']({'app.activity.mid':_0xbc5c2a,'app.job.jss':_0x48065b}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x5c9162),await _0x5c9162['exec'](),this['context']['metadata']['aid'];}catch(_0x55433f){if(_0x55433f instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x55433f});return;}else{if(_0x55433f instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x55433f});return;}else{if(_0x55433f instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x55433f});return;}else{if(_0x55433f instanceof errors_1['CollationError']){if(_0x55433f['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',{..._0x55433f});}else this['logger']['error']('cycle-process-error',{..._0x55433f});}}}_0x3ccfcc?.['setActivityError'](_0x55433f['message']);throw _0x55433f;}finally{_0x3ccfcc?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x477f52){this['mapInputData']();const _0x5f4e96={'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,_0x5f4e96,_0x477f52);}}exports['Cycle']=Cycle;
@@ -1 +1 @@
1
- 'use strict';(function(_0x590457,_0x5dac72){const _0xabda80=_0x471e,_0x4bc816=_0x590457();while(!![]){try{const _0x17a806=-parseInt(_0xabda80(0x6a))/0x1*(parseInt(_0xabda80(0x6e))/0x2)+parseInt(_0xabda80(0x72))/0x3+parseInt(_0xabda80(0x68))/0x4*(parseInt(_0xabda80(0x69))/0x5)+parseInt(_0xabda80(0x70))/0x6*(parseInt(_0xabda80(0x6b))/0x7)+-parseInt(_0xabda80(0x71))/0x8+parseInt(_0xabda80(0x6c))/0x9+parseInt(_0xabda80(0x6d))/0xa*(-parseInt(_0xabda80(0x6f))/0xb);if(_0x17a806===_0x5dac72)break;else _0x4bc816['push'](_0x4bc816['shift']());}catch(_0x3ef958){_0x4bc816['push'](_0x4bc816['shift']());}}}(_0x5d3b,0xd79bd));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;function _0x5d3b(){const _0x2e9adf=['5280087WDaRVL','2804grokbG','7375BgekjU','463ZUhKLP','131299peAtJO','6939882ZFzinb','20968990mnLqRh','5594kzoSIx','11tmBtrV','342ndnabA','2873664PPlpTl'];_0x5d3b=function(){return _0x2e9adf;};return _0x5d3b();}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');function _0x471e(_0x3fc3a5,_0x495ac9){const _0x5d3b5c=_0x5d3b();return _0x471e=function(_0x471e9c,_0x1ec7b2){_0x471e9c=_0x471e9c-0x68;let _0xa61a73=_0x5d3b5c[_0x471e9c];return _0xa61a73;},_0x471e(_0x3fc3a5,_0x495ac9);}class Hook extends activity_1['Activity']{constructor(_0x38be93,_0x2e6d3,_0x53ae7f,_0x3a0d56,_0x578838,_0x274510){super(_0x38be93,_0x2e6d3,_0x53ae7f,_0x3a0d56,_0x578838,_0x274510);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x7a0d71;try{return await this['verifyEntry'](),_0x7a0d71=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x7a0d71['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x7a0d71):await this['doPassThrough'](_0x7a0d71),this['context']['metadata']['aid'];}catch(_0x535885){if(_0x535885 instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x535885});return;}else{if(_0x535885 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x535885});return;}else{if(_0x535885 instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x535885});return;}else{if(_0x535885 instanceof errors_1['CollationError']){if(_0x535885['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',{..._0x535885});}else this['logger']['error']('hook-process-error',{..._0x535885});}}}_0x7a0d71?.['setActivityError'](_0x535885['message']);throw _0x535885;}finally{_0x7a0d71?.['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 _0x51c63c=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x51c63c)&&Number(_0x51c63c)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x5bb61f){const _0x2065b5=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x2065b5),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x2065b5),await collator_1['CollatorService']['authorizeReentry'](this,_0x2065b5),await this['setStatus'](0x0,_0x2065b5),await _0x2065b5['exec'](),_0x5bb61f['mapActivityAttributes']();}async['doPassThrough'](_0x4472fa){const _0x71e043=this['store']['transact']();let _0x438888;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x71e043),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x71e043),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x71e043),_0x438888=await _0x71e043['exec'](),_0x4472fa['mapActivityAttributes']();const _0xdc16fb=this['resolveStatus'](_0x438888),_0xf052bf={'app.job.jss':_0xdc16fb},_0x465a1e=await this['transition'](this['adjacencyList'],_0xdc16fb);_0x465a1e['length']&&(_0xf052bf['app.activity.mids']=_0x465a1e['join'](',')),_0x4472fa['setActivityAttributes'](_0xf052bf);}async['getHookRule'](_0x462f28){const _0x2d4a1c=await this['store']['getHookRules']();return _0x2d4a1c?.[_0x462f28]?.[0x0];}async['registerHook'](_0x3bd0da){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x3bd0da);else{if(this['config']['sleep']){const _0x34b190=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',_0x34b190,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x538f8e=stream_1['StreamStatus']['SUCCESS'],_0x4c6866=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x538f8e,'code':_0x4c6866});const _0x3c834f=new task_1['TaskService'](this['store'],this['logger']),_0x1ac949={...this['data']},_0x395665=await _0x3c834f['processWebHookSignal'](this['config']['hook']['topic'],_0x1ac949);if(_0x395665){const [_0x96c72f,_0xab57c6,_0x22ded8,_0x292294]=_0x395665;this['context']['metadata']['jid']=_0x96c72f,this['context']['metadata']['gid']=_0x292294,this['context']['metadata']['dad']=_0x22ded8,await this['processEvent'](_0x538f8e,_0x4c6866,'hook'),_0x4c6866===0xc8&&await _0x3c834f['deleteWebHookSignal'](this['config']['hook']['topic'],_0x1ac949);}}async['processTimeHookEvent'](_0x3f656f){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x3f656f,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}exports['Hook']=Hook;
1
+ 'use strict';(function(_0x27b497,_0x99ebd4){const _0x3beb85=_0x1612,_0x4cc7dc=_0x27b497();while(!![]){try{const _0x5c5c6b=parseInt(_0x3beb85(0xe1))/0x1+parseInt(_0x3beb85(0xe2))/0x2*(parseInt(_0x3beb85(0xe8))/0x3)+parseInt(_0x3beb85(0xea))/0x4*(parseInt(_0x3beb85(0xe9))/0x5)+parseInt(_0x3beb85(0xe3))/0x6*(-parseInt(_0x3beb85(0xe7))/0x7)+-parseInt(_0x3beb85(0xe5))/0x8+parseInt(_0x3beb85(0xe6))/0x9+-parseInt(_0x3beb85(0xe4))/0xa;if(_0x5c5c6b===_0x99ebd4)break;else _0x4cc7dc['push'](_0x4cc7dc['shift']());}catch(_0x161e4a){_0x4cc7dc['push'](_0x4cc7dc['shift']());}}}(_0x1ac2,0x84b5c));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(_0x671df5,_0xac8599,_0x3fe6f5,_0x52db75,_0x36207f,_0x3a52be){super(_0x671df5,_0xac8599,_0x3fe6f5,_0x52db75,_0x36207f,_0x3a52be);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x592904;try{return await this['verifyEntry'](),_0x592904=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x592904['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x592904):await this['doPassThrough'](_0x592904),this['context']['metadata']['aid'];}catch(_0xfc9b6c){if(_0xfc9b6c instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0xfc9b6c});return;}else{if(_0xfc9b6c instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0xfc9b6c});return;}else{if(_0xfc9b6c instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0xfc9b6c});return;}else{if(_0xfc9b6c instanceof errors_1['CollationError']){if(_0xfc9b6c['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',{..._0xfc9b6c});}else this['logger']['error']('hook-process-error',{..._0xfc9b6c});}}}_0x592904?.['setActivityError'](_0xfc9b6c['message']);throw _0xfc9b6c;}finally{_0x592904?.['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 _0x3b07f5=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x3b07f5)&&Number(_0x3b07f5)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0xe66b14){const _0x51d6d5=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x51d6d5),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x51d6d5),await collator_1['CollatorService']['authorizeReentry'](this,_0x51d6d5),await this['setStatus'](0x0,_0x51d6d5),await _0x51d6d5['exec'](),_0xe66b14['mapActivityAttributes']();}async['doPassThrough'](_0x375865){const _0x158935=this['store']['transact']();let _0x2006d4;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x158935),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x158935),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x158935),_0x2006d4=await _0x158935['exec'](),_0x375865['mapActivityAttributes']();const _0xf9294c=this['resolveStatus'](_0x2006d4),_0x48595a={'app.job.jss':_0xf9294c},_0x38999e=await this['transition'](this['adjacencyList'],_0xf9294c);_0x38999e['length']&&(_0x48595a['app.activity.mids']=_0x38999e['join'](',')),_0x375865['setActivityAttributes'](_0x48595a);}async['getHookRule'](_0x37921b){const _0x4c04ef=await this['store']['getHookRules']();return _0x4c04ef?.[_0x37921b]?.[0x0];}async['registerHook'](_0x3cb16e){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x3cb16e);else{if(this['config']['sleep']){const _0x4c20b3=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',_0x4c20b3,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x69c60f=stream_1['StreamStatus']['SUCCESS'],_0x22d943=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x69c60f,'code':_0x22d943});const _0x1a214a=new task_1['TaskService'](this['store'],this['logger']),_0x4bf067={...this['data']},_0x5d165f=await _0x1a214a['processWebHookSignal'](this['config']['hook']['topic'],_0x4bf067);if(_0x5d165f){const [_0x5ad1eb,_0x48ffb2,_0x358503,_0x1e9223]=_0x5d165f;this['context']['metadata']['jid']=_0x5ad1eb,this['context']['metadata']['gid']=_0x1e9223,this['context']['metadata']['dad']=_0x358503,await this['processEvent'](_0x69c60f,_0x22d943,'hook'),_0x22d943===0xc8&&await _0x1a214a['deleteWebHookSignal'](this['config']['hook']['topic'],_0x4bf067);}}async['processTimeHookEvent'](_0xf7d220){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0xf7d220,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}function _0x1612(_0x14fdc3,_0x44c566){const _0x1ac24c=_0x1ac2();return _0x1612=function(_0x1612b1,_0x118632){_0x1612b1=_0x1612b1-0xe1;let _0x37a396=_0x1ac24c[_0x1612b1];return _0x37a396;},_0x1612(_0x14fdc3,_0x44c566);}exports['Hook']=Hook;function _0x1ac2(){const _0x49e21a=['14fJfWCQ','84LQKUJE','8861360HMszxM','4456176WWYRlY','4533957bHeHqu','137893BiFGTW','11721txgQQp','155ETAHPp','101468WeqvZU','945025ZzQuER'];_0x1ac2=function(){return _0x49e21a;};return _0x1ac2();}
@@ -1 +1 @@
1
- 'use strict';(function(_0x198a16,_0x3b947b){const _0x5987bc=_0xc5d9,_0x39f513=_0x198a16();while(!![]){try{const _0x3c308c=parseInt(_0x5987bc(0x12b))/0x1+parseInt(_0x5987bc(0x12d))/0x2+-parseInt(_0x5987bc(0x130))/0x3+-parseInt(_0x5987bc(0x129))/0x4+parseInt(_0x5987bc(0x12c))/0x5+parseInt(_0x5987bc(0x12a))/0x6*(parseInt(_0x5987bc(0x12f))/0x7)+parseInt(_0x5987bc(0x12e))/0x8*(parseInt(_0x5987bc(0x131))/0x9);if(_0x3c308c===_0x3b947b)break;else _0x39f513['push'](_0x39f513['shift']());}catch(_0x222698){_0x39f513['push'](_0x39f513['shift']());}}}(_0x4c74,0x21da9));function _0xc5d9(_0x5a844a,_0x179627){const _0x4c74ce=_0x4c74();return _0xc5d9=function(_0xc5d9c9,_0x2665ec){_0xc5d9c9=_0xc5d9c9-0x129;let _0x559daf=_0x4c74ce[_0xc5d9c9];return _0x559daf;},_0xc5d9(_0x5a844a,_0x179627);}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']};function _0x4c74(){const _0x55a611=['45855JkFbFm','237776FWpgcA','32ujqgmF','26726FxFvaB','78009VeXLuf','272160FTHsex','720988dqbYKi','18pUTcPF','84442pQFqYC'];_0x4c74=function(){return _0x55a611;};return _0x4c74();}
1
+ 'use strict';(function(_0xfe6eef,_0xc5729c){const _0x40f861=_0x49a2,_0x735b27=_0xfe6eef();while(!![]){try{const _0x5d0276=-parseInt(_0x40f861(0x104))/0x1+-parseInt(_0x40f861(0x100))/0x2*(parseInt(_0x40f861(0xff))/0x3)+parseInt(_0x40f861(0x107))/0x4*(-parseInt(_0x40f861(0x103))/0x5)+parseInt(_0x40f861(0x106))/0x6*(-parseInt(_0x40f861(0xfe))/0x7)+parseInt(_0x40f861(0x101))/0x8+parseInt(_0x40f861(0x102))/0x9+parseInt(_0x40f861(0x105))/0xa;if(_0x5d0276===_0xc5729c)break;else _0x735b27['push'](_0x735b27['shift']());}catch(_0x243d80){_0x735b27['push'](_0x735b27['shift']());}}}(_0x297e,0x3d1f5));function _0x49a2(_0x3382af,_0x5becd1){const _0x297e85=_0x297e();return _0x49a2=function(_0x49a268,_0x4f6956){_0x49a268=_0x49a268-0xfe;let _0x4b3ab8=_0x297e85[_0x49a268];return _0x4b3ab8;},_0x49a2(_0x3382af,_0x5becd1);}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');function _0x297e(){const _0x2c7368=['4420830RnnuKF','930192GKPSPE','2848UqYldt','21wzomWU','58227mLSoQK','22mITXMz','3991272qNREwq','4439880alYnJK','1175jwmnud','338040KNTnaJ'];_0x297e=function(){return _0x2c7368;};return _0x297e();}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 +1 @@
1
- 'use strict';(function(_0x4cf4d7,_0x5813f5){const _0x2d06c1=_0x39bd,_0x210c96=_0x4cf4d7();while(!![]){try{const _0x25defa=-parseInt(_0x2d06c1(0x1fc))/0x1*(-parseInt(_0x2d06c1(0x1f3))/0x2)+-parseInt(_0x2d06c1(0x1f2))/0x3*(parseInt(_0x2d06c1(0x1f9))/0x4)+-parseInt(_0x2d06c1(0x1f8))/0x5*(-parseInt(_0x2d06c1(0x1f5))/0x6)+-parseInt(_0x2d06c1(0x1f6))/0x7*(-parseInt(_0x2d06c1(0x1fb))/0x8)+-parseInt(_0x2d06c1(0x1f7))/0x9+parseInt(_0x2d06c1(0x1fa))/0xa+-parseInt(_0x2d06c1(0x1f4))/0xb;if(_0x25defa===_0x5813f5)break;else _0x210c96['push'](_0x210c96['shift']());}catch(_0xc8d618){_0x210c96['push'](_0x210c96['shift']());}}}(_0xc780,0xd4a86));function _0x39bd(_0x22cb0a,_0x60bceb){const _0xc78098=_0xc780();return _0x39bd=function(_0x39bdb8,_0x25b361){_0x39bdb8=_0x39bdb8-0x1f2;let _0x3df0cd=_0xc78098[_0x39bdb8];return _0x3df0cd;},_0x39bd(_0x22cb0a,_0x60bceb);}function _0xc780(){const _0x57385b=['3eKWloq','1540gIZmUk','13875323lIlAoD','2507634XKRMuJ','10527755JYvRZS','7883739pygeoa','10WEWEYa','6591668bWubBt','13208740odYPXb','8MbMFEt','1293jscmRc'];_0xc780=function(){return _0x57385b;};return _0xc780();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Interrupt extends activity_1['Activity']{constructor(_0x1444b1,_0x3d663a,_0x1b8bf4,_0x3d1004,_0x4da772,_0x54a214){super(_0x1444b1,_0x3d663a,_0x1b8bf4,_0x3d1004,_0x4da772,_0x54a214);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x2850a4;try{await this['verifyEntry'](),_0x2850a4=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x2850a4['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x2850a4):await this['interruptAnother'](_0x2850a4);}catch(_0x20b8dd){if(_0x20b8dd instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x20b8dd});return;}else{if(_0x20b8dd instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x20b8dd});return;}else{if(_0x20b8dd instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x20b8dd});return;}else{if(_0x20b8dd instanceof errors_1['CollationError']){if(_0x20b8dd['fault']==='duplicate'){this['logger']['info']('interrupt-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('interrupt-collation-error',{..._0x20b8dd});}else this['logger']['error']('interrupt-process-error',{..._0x20b8dd});}}}_0x2850a4?.['setActivityError'](_0x20b8dd['message']);throw _0x20b8dd;}finally{_0x2850a4?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x3be9c8){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0xfbe5d1=await this['interrupt']();_0x3be9c8['mapActivityAttributes']();const _0x1b5671=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x1b5671),await this['setStatus'](-0x1,_0x1b5671);const _0x5c2fae=await _0x1b5671['exec'](),_0x23d518=this['resolveStatus'](_0x5c2fae);return _0x3be9c8['setActivityAttributes']({'app.activity.mid':_0xfbe5d1,'app.job.jss':_0x23d518}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x2b0425){const _0x3eaa21=await this['interrupt'](),_0xcc62b9={'app.activity.mid':_0x3eaa21};_0x2b0425['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x55ec73=this['store']['transact']();await this['setState'](_0x55ec73);}const _0x56c86b=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x56c86b),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x56c86b);const _0xb832e4=await _0x56c86b['exec'](),_0x13c786=this['resolveStatus'](_0xb832e4);_0xcc62b9['app.job.jss']=_0x13c786;const _0x2a4b30=await this['transition'](this['adjacencyList'],_0x13c786);return _0x2a4b30['length']&&(_0xcc62b9['app.activity.mids']=_0x2a4b30['join'](',')),_0x2b0425['setActivityAttributes'](_0xcc62b9),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x2987b4=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x2987b4==this['context']['metadata']['jid'];}['resolveInterruptOptions'](){return{'reason':this['config']['reason']!==undefined?pipe_1['Pipe']['resolve'](this['config']['reason'],this['context']):undefined,'throw':this['config']['throw']!==undefined?pipe_1['Pipe']['resolve'](this['config']['throw'],this['context']):undefined,'descend':this['config']['descend']!==undefined?pipe_1['Pipe']['resolve'](this['config']['descend'],this['context']):undefined,'code':this['config']['code']!==undefined?pipe_1['Pipe']['resolve'](this['config']['code'],this['context']):undefined,'expire':this['config']['expire']!==undefined?pipe_1['Pipe']['resolve'](this['config']['expire'],this['context']):undefined,'stack':this['config']['stack']!==undefined?pipe_1['Pipe']['resolve'](this['config']['stack'],this['context']):undefined};}async['interrupt'](){const _0x25135a=this['resolveInterruptOptions']();return await this['engine']['interrupt'](this['config']['topic']!==undefined?pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']):this['context']['metadata']['tpc'],this['config']['target']!==undefined?pipe_1['Pipe']['resolve'](this['config']['target'],this['context']):this['context']['metadata']['jid'],_0x25135a);}}exports['Interrupt']=Interrupt;
1
+ 'use strict';(function(_0x3be059,_0x2257c5){const _0x215231=_0x4f24,_0x302bce=_0x3be059();while(!![]){try{const _0x2e1c73=parseInt(_0x215231(0x1dd))/0x1*(-parseInt(_0x215231(0x1e6))/0x2)+-parseInt(_0x215231(0x1e3))/0x3+parseInt(_0x215231(0x1e4))/0x4+-parseInt(_0x215231(0x1e0))/0x5*(-parseInt(_0x215231(0x1df))/0x6)+parseInt(_0x215231(0x1de))/0x7*(-parseInt(_0x215231(0x1e1))/0x8)+parseInt(_0x215231(0x1e5))/0x9+parseInt(_0x215231(0x1e2))/0xa;if(_0x2e1c73===_0x2257c5)break;else _0x302bce['push'](_0x302bce['shift']());}catch(_0x5da3ba){_0x302bce['push'](_0x302bce['shift']());}}}(_0x5503,0x27fe1));function _0x4f24(_0x2b81a4,_0x1bc2ea){const _0x5503fa=_0x5503();return _0x4f24=function(_0x4f2406,_0x4f9b40){_0x4f2406=_0x4f2406-0x1dd;let _0x2c9ec6=_0x5503fa[_0x4f2406];return _0x2c9ec6;},_0x4f24(_0x2b81a4,_0x1bc2ea);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Interrupt extends activity_1['Activity']{constructor(_0x38c453,_0x295a5e,_0x5ca630,_0x4b456c,_0xfc63c2,_0x6224e5){super(_0x38c453,_0x295a5e,_0x5ca630,_0x4b456c,_0xfc63c2,_0x6224e5);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0xa45110;try{await this['verifyEntry'](),_0xa45110=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0xa45110['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0xa45110):await this['interruptAnother'](_0xa45110);}catch(_0x3b921d){if(_0x3b921d instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x3b921d});return;}else{if(_0x3b921d instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3b921d});return;}else{if(_0x3b921d instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x3b921d});return;}else{if(_0x3b921d instanceof errors_1['CollationError']){if(_0x3b921d['fault']==='duplicate'){this['logger']['info']('interrupt-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('interrupt-collation-error',{..._0x3b921d});}else this['logger']['error']('interrupt-process-error',{..._0x3b921d});}}}_0xa45110?.['setActivityError'](_0x3b921d['message']);throw _0x3b921d;}finally{_0xa45110?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x4aca55){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x10d0ce=await this['interrupt']();_0x4aca55['mapActivityAttributes']();const _0xfad151=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0xfad151),await this['setStatus'](-0x1,_0xfad151);const _0xfd71d9=await _0xfad151['exec'](),_0x2f281a=this['resolveStatus'](_0xfd71d9);return _0x4aca55['setActivityAttributes']({'app.activity.mid':_0x10d0ce,'app.job.jss':_0x2f281a}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x2e5f40){const _0x219099=await this['interrupt'](),_0x1e79eb={'app.activity.mid':_0x219099};_0x2e5f40['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x4f610d=this['store']['transact']();await this['setState'](_0x4f610d);}const _0xd8f87f=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0xd8f87f),await this['setStatus'](this['adjacencyList']['length']-0x1,_0xd8f87f);const _0x2c9044=await _0xd8f87f['exec'](),_0x18a224=this['resolveStatus'](_0x2c9044);_0x1e79eb['app.job.jss']=_0x18a224;const _0x348da5=await this['transition'](this['adjacencyList'],_0x18a224);return _0x348da5['length']&&(_0x1e79eb['app.activity.mids']=_0x348da5['join'](',')),_0x2e5f40['setActivityAttributes'](_0x1e79eb),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x358f3d=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x358f3d==this['context']['metadata']['jid'];}['resolveInterruptOptions'](){return{'reason':this['config']['reason']!==undefined?pipe_1['Pipe']['resolve'](this['config']['reason'],this['context']):undefined,'throw':this['config']['throw']!==undefined?pipe_1['Pipe']['resolve'](this['config']['throw'],this['context']):undefined,'descend':this['config']['descend']!==undefined?pipe_1['Pipe']['resolve'](this['config']['descend'],this['context']):undefined,'code':this['config']['code']!==undefined?pipe_1['Pipe']['resolve'](this['config']['code'],this['context']):undefined,'expire':this['config']['expire']!==undefined?pipe_1['Pipe']['resolve'](this['config']['expire'],this['context']):undefined,'stack':this['config']['stack']!==undefined?pipe_1['Pipe']['resolve'](this['config']['stack'],this['context']):undefined};}async['interrupt'](){const _0x33e7b0=this['resolveInterruptOptions']();return await this['engine']['interrupt'](this['config']['topic']!==undefined?pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']):this['context']['metadata']['tpc'],this['config']['target']!==undefined?pipe_1['Pipe']['resolve'](this['config']['target'],this['context']):this['context']['metadata']['jid'],_0x33e7b0);}}function _0x5503(){const _0x23e4a3=['738858Uusvaz','47600rnMuFP','97668VtVEjv','594AbbyaY','347qPkgBh','2149LcVYAy','306kFlHsM','16085ZLsJpa','1488sdXrfu','3834370IPBpzn'];_0x5503=function(){return _0x23e4a3;};return _0x5503();}exports['Interrupt']=Interrupt;
@@ -1 +1 @@
1
- 'use strict';function _0x1333(_0x101f65,_0x3c1d8a){const _0x416aec=_0x416a();return _0x1333=function(_0x13337a,_0x20ed6a){_0x13337a=_0x13337a-0x1ac;let _0x2e8d37=_0x416aec[_0x13337a];return _0x2e8d37;},_0x1333(_0x101f65,_0x3c1d8a);}function _0x416a(){const _0x237a95=['38549yxyqlt','6IeDYsT','9189896bpjYdS','6022215fAFaUN','810PPaAma','3167320cFFUzd','1249640qlFClA','589449PBjrGK','452915rTsVwt'];_0x416a=function(){return _0x237a95;};return _0x416a();}(function(_0x534f72,_0x2e91b8){const _0x42f92b=_0x1333,_0x1e95e7=_0x534f72();while(!![]){try{const _0x2ed4f2=parseInt(_0x42f92b(0x1ac))/0x1+-parseInt(_0x42f92b(0x1ae))/0x2*(parseInt(_0x42f92b(0x1b4))/0x3)+parseInt(_0x42f92b(0x1b3))/0x4+-parseInt(_0x42f92b(0x1b2))/0x5+parseInt(_0x42f92b(0x1b1))/0x6*(parseInt(_0x42f92b(0x1ad))/0x7)+parseInt(_0x42f92b(0x1af))/0x8+-parseInt(_0x42f92b(0x1b0))/0x9;if(_0x2ed4f2===_0x2e91b8)break;else _0x1e95e7['push'](_0x1e95e7['shift']());}catch(_0x586de6){_0x1e95e7['push'](_0x1e95e7['shift']());}}}(_0x416a,0xbae13));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Signal']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Signal extends activity_1['Activity']{constructor(_0x243e75,_0x4f6223,_0x27720e,_0x39a631,_0x537e62,_0x495545){super(_0x243e75,_0x4f6223,_0x27720e,_0x39a631,_0x537e62,_0x495545);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0xe007be;try{await this['verifyEntry'](),_0xe007be=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0xe007be['startActivitySpan'](this['leg']);const _0x4ba255=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x4ba255),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x4ba255),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x4ba255);const _0x56caf5=await _0x4ba255['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x233598=this['resolveStatus'](_0x56caf5),_0x4c45ad={'app.job.jss':_0x233598},_0x51123e=await this['transition'](this['adjacencyList'],_0x233598);return _0x51123e['length']&&(_0x4c45ad['app.activity.mids']=_0x51123e['join'](',')),_0xe007be['mapActivityAttributes'](),_0xe007be['setActivityAttributes'](_0x4c45ad),this['context']['metadata']['aid'];}catch(_0x52fdb9){if(_0x52fdb9 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x52fdb9});return;}else{if(_0x52fdb9 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x52fdb9});return;}else{if(_0x52fdb9 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x52fdb9});return;}else{if(_0x52fdb9 instanceof errors_1['CollationError']){if(_0x52fdb9['fault']==='duplicate'){this['logger']['info']('signal-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('signal-collation-error',{..._0x52fdb9});}else this['logger']['error']('signal-process-error',{..._0x52fdb9});}}}_0xe007be?.['setActivityError'](_0x52fdb9['message']);throw _0x52fdb9;}finally{_0xe007be?.['endActivitySpan'](),this['logger']['debug']('signal-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}['mapSignalData'](){if(this['config']['signal']?.['maps']){const _0x3aaa5c=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x3aaa5c['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x2879fe=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x2879fe['mapRules']();}}async['hookOne'](){const _0x59f99d=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x2451ea=this['mapSignalData'](),_0x56cd97=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x31ff13=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x59f99d,_0x2451ea,_0x56cd97,_0x31ff13);}async['hookAll'](){const _0x2f7cdf=this['mapSignalData'](),_0x3c5339=this['mapResolverData']();this['config']['scrub']&&(_0x3c5339['scrub']=!![]);const _0x4361f5=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x466a6d=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x2328c1=[_0x4361f5+':'+_0x466a6d];return await this['engine']['hookAll'](this['config']['topic'],_0x2f7cdf,_0x3c5339,_0x2328c1);}}exports['Signal']=Signal;
1
+ 'use strict';(function(_0x5df3c1,_0x4010ce){const _0x493462=_0x4eba,_0x2d5a78=_0x5df3c1();while(!![]){try{const _0x1d11d9=parseInt(_0x493462(0xd8))/0x1+-parseInt(_0x493462(0xd4))/0x2*(parseInt(_0x493462(0xd3))/0x3)+-parseInt(_0x493462(0xd7))/0x4+parseInt(_0x493462(0xdc))/0x5*(parseInt(_0x493462(0xdd))/0x6)+parseInt(_0x493462(0xd9))/0x7*(parseInt(_0x493462(0xd6))/0x8)+parseInt(_0x493462(0xdb))/0x9+-parseInt(_0x493462(0xda))/0xa*(parseInt(_0x493462(0xd5))/0xb);if(_0x1d11d9===_0x4010ce)break;else _0x2d5a78['push'](_0x2d5a78['shift']());}catch(_0x5ba8cb){_0x2d5a78['push'](_0x2d5a78['shift']());}}}(_0x40d0,0xab992));function _0x4eba(_0x226372,_0x4d5b28){const _0x40d006=_0x40d0();return _0x4eba=function(_0x4eba2d,_0x460505){_0x4eba2d=_0x4eba2d-0xd3;let _0x52b920=_0x40d006[_0x4eba2d];return _0x52b920;},_0x4eba(_0x226372,_0x4d5b28);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Signal']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');function _0x40d0(){const _0x203bcc=['539058nzTUxK','11522GVUaYm','30JzUuBA','701397larQur','85MggTOS','328974wRknsL','1603191yznzlr','2cUFzso','428615UNYLNp','4920hjYlxc','4828864DxGCrL'];_0x40d0=function(){return _0x203bcc;};return _0x40d0();}class Signal extends activity_1['Activity']{constructor(_0x4980b4,_0x4d027a,_0x54fc11,_0x36dca9,_0x3f6fe7,_0x15bae4){super(_0x4980b4,_0x4d027a,_0x54fc11,_0x36dca9,_0x3f6fe7,_0x15bae4);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x20643c;try{await this['verifyEntry'](),_0x20643c=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x20643c['startActivitySpan'](this['leg']);const _0x2032ec=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x2032ec),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x2032ec),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x2032ec);const _0x251289=await _0x2032ec['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x3f20af=this['resolveStatus'](_0x251289),_0x1b63c4={'app.job.jss':_0x3f20af},_0x138664=await this['transition'](this['adjacencyList'],_0x3f20af);return _0x138664['length']&&(_0x1b63c4['app.activity.mids']=_0x138664['join'](',')),_0x20643c['mapActivityAttributes'](),_0x20643c['setActivityAttributes'](_0x1b63c4),this['context']['metadata']['aid'];}catch(_0x34efe9){if(_0x34efe9 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x34efe9});return;}else{if(_0x34efe9 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x34efe9});return;}else{if(_0x34efe9 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x34efe9});return;}else{if(_0x34efe9 instanceof errors_1['CollationError']){if(_0x34efe9['fault']==='duplicate'){this['logger']['info']('signal-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('signal-collation-error',{..._0x34efe9});}else this['logger']['error']('signal-process-error',{..._0x34efe9});}}}_0x20643c?.['setActivityError'](_0x34efe9['message']);throw _0x34efe9;}finally{_0x20643c?.['endActivitySpan'](),this['logger']['debug']('signal-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}['mapSignalData'](){if(this['config']['signal']?.['maps']){const _0x4494f9=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x4494f9['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x8328f=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x8328f['mapRules']();}}async['hookOne'](){const _0x39b0d6=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x3c1e3c=this['mapSignalData'](),_0x4fba78=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x542d8b=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x39b0d6,_0x3c1e3c,_0x4fba78,_0x542d8b);}async['hookAll'](){const _0x403f7d=this['mapSignalData'](),_0x1863ec=this['mapResolverData']();this['config']['scrub']&&(_0x1863ec['scrub']=!![]);const _0x29a0f8=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x412d09=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x206cc9=[_0x29a0f8+':'+_0x412d09];return await this['engine']['hookAll'](this['config']['topic'],_0x403f7d,_0x1863ec,_0x206cc9);}}exports['Signal']=Signal;