@hotmeshio/hotmesh 0.3.30 → 0.3.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/modules/enums.d.ts +3 -0
- package/build/modules/enums.js +4 -1
- package/build/modules/key.js +1 -1
- package/build/modules/utils.js +1 -1
- package/build/package.json +2 -2
- package/build/services/activities/activity.js +1 -1
- package/build/services/activities/await.js +1 -1
- package/build/services/activities/cycle.js +1 -1
- package/build/services/activities/hook.js +1 -1
- package/build/services/activities/index.js +1 -1
- package/build/services/activities/interrupt.js +1 -1
- package/build/services/activities/signal.js +1 -1
- package/build/services/activities/trigger.js +1 -1
- package/build/services/activities/worker.js +1 -1
- package/build/services/collator/index.js +1 -1
- package/build/services/compiler/deployer.js +1 -1
- package/build/services/compiler/index.js +1 -1
- package/build/services/compiler/validator.js +1 -1
- package/build/services/engine/index.js +1 -1
- package/build/services/exporter/index.js +1 -1
- package/build/services/mapper/index.js +1 -1
- package/build/services/meshcall/schemas/factory.d.ts +0 -1
- package/build/services/meshcall/schemas/factory.js +0 -1
- package/build/services/meshflow/exporter.js +1 -1
- package/build/services/meshflow/schemas/factory.js +1 -1
- package/build/services/pipe/functions/array.js +1 -1
- package/build/services/pipe/functions/bitwise.js +1 -1
- package/build/services/pipe/functions/conditional.js +1 -1
- package/build/services/pipe/functions/cron.js +1 -1
- package/build/services/pipe/functions/date.js +1 -1
- package/build/services/pipe/functions/index.js +1 -1
- package/build/services/pipe/functions/json.js +1 -1
- package/build/services/pipe/functions/logical.js +1 -1
- package/build/services/pipe/functions/math.js +1 -1
- package/build/services/pipe/functions/number.js +1 -1
- package/build/services/pipe/functions/object.js +1 -1
- package/build/services/pipe/functions/string.js +1 -1
- package/build/services/pipe/functions/symbol.js +1 -1
- package/build/services/pipe/functions/unary.js +1 -1
- package/build/services/pipe/index.js +1 -1
- package/build/services/quorum/index.js +1 -1
- package/build/services/reporter/index.js +1 -1
- package/build/services/router/index.d.ts +1 -0
- package/build/services/router/index.js +1 -1
- package/build/services/search/providers/postgres/postgres.js +1 -1
- package/build/services/search/providers/redis/ioredis.js +1 -1
- package/build/services/search/providers/redis/redis.js +1 -1
- package/build/services/serializer/index.js +1 -1
- package/build/services/store/providers/postgres/kvsql.js +1 -1
- package/build/services/store/providers/postgres/kvtables.js +1 -1
- package/build/services/store/providers/postgres/kvtransaction.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
- package/build/services/store/providers/postgres/postgres.js +1 -1
- package/build/services/store/providers/redis/_base.js +1 -1
- package/build/services/store/providers/redis/ioredis.js +1 -1
- package/build/services/store/providers/redis/redis.js +1 -1
- package/build/services/store/providers/store-initializable.js +1 -1
- package/build/services/stream/index.d.ts +4 -0
- package/build/services/stream/providers/nats/nats.js +1 -1
- package/build/services/stream/providers/postgres/kvtables.js +1 -1
- package/build/services/stream/providers/postgres/postgres.d.ts +4 -0
- package/build/services/stream/providers/postgres/postgres.js +1 -1
- package/build/services/stream/providers/redis/ioredis.js +1 -1
- package/build/services/stream/providers/redis/redis.js +1 -1
- package/build/services/stream/providers/stream-initializable.js +1 -1
- package/build/services/sub/providers/nats/nats.js +1 -1
- package/build/services/sub/providers/postgres/postgres.js +1 -1
- package/build/services/sub/providers/redis/ioredis.js +1 -1
- package/build/services/sub/providers/redis/redis.js +1 -1
- package/build/services/task/index.js +1 -1
- package/build/services/telemetry/index.js +1 -1
- package/build/services/worker/index.js +1 -1
- package/build/types/meshcall.d.ts +1 -2
- package/build/types/meshdata.d.ts +1 -1
- package/package.json +2 -2
- package/types/meshcall.ts +1 -2
- package/types/meshdata.ts +1 -1
package/build/modules/enums.d.ts
CHANGED
|
@@ -78,6 +78,9 @@ export declare const HMSH_DEPLOYMENT_DELAY: number;
|
|
|
78
78
|
export declare const HMSH_DEPLOYMENT_PAUSE: number;
|
|
79
79
|
export declare const HMSH_OTT_WAIT_TIME: number;
|
|
80
80
|
export declare const HMSH_EXPIRE_JOB_SECONDS: number;
|
|
81
|
+
export declare const MAX_STREAM_BACKOFF: number;
|
|
82
|
+
export declare const INITIAL_STREAM_BACKOFF: number;
|
|
83
|
+
export declare const MAX_STREAM_RETRIES: number;
|
|
81
84
|
export declare const MAX_DELAY = 2147483647;
|
|
82
85
|
export declare const HMSH_MAX_RETRIES: number;
|
|
83
86
|
export declare const HMSH_MAX_TIMEOUT_MS: number;
|
package/build/modules/enums.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HMSH_GUID_SIZE = exports.HMSH_SCOUT_INTERVAL_SECONDS = exports.HMSH_FIDELITY_SECONDS = exports.HMSH_EXPIRE_DURATION = exports.HMSH_XPENDING_COUNT = exports.HMSH_XCLAIM_COUNT = exports.HMSH_XCLAIM_DELAY_MS = exports.HMSH_BLOCK_TIME_MS = exports.HMSH_MESHFLOW_EXP_BACKOFF = exports.HMSH_MESHFLOW_MAX_INTERVAL = exports.HMSH_MESHFLOW_MAX_ATTEMPTS = exports.HMSH_GRADUATED_INTERVAL_MS = exports.HMSH_MAX_TIMEOUT_MS = exports.HMSH_MAX_RETRIES = exports.MAX_DELAY = exports.HMSH_EXPIRE_JOB_SECONDS = exports.HMSH_OTT_WAIT_TIME = exports.HMSH_DEPLOYMENT_PAUSE = exports.HMSH_DEPLOYMENT_DELAY = exports.HMSH_ACTIVATION_MAX_RETRY = exports.HMSH_QUORUM_DELAY_MS = exports.HMSH_QUORUM_ROLLCALL_CYCLES = exports.HMSH_STATUS_UNKNOWN = exports.HMSH_CODE_MESHFLOW_RETRYABLE = exports.HMSH_CODE_MESHFLOW_FATAL = exports.HMSH_CODE_MESHFLOW_MAXED = exports.HMSH_CODE_MESHFLOW_TIMEOUT = exports.HMSH_CODE_MESHFLOW_WAIT = exports.HMSH_CODE_MESHFLOW_PROXY = exports.HMSH_CODE_MESHFLOW_CHILD = exports.HMSH_CODE_MESHFLOW_ALL = exports.HMSH_CODE_MESHFLOW_SLEEP = exports.HMSH_CODE_UNACKED = exports.HMSH_CODE_TIMEOUT = exports.HMSH_CODE_UNKNOWN = exports.HMSH_CODE_INTERRUPT = exports.HMSH_CODE_NOTFOUND = exports.HMSH_CODE_PENDING = exports.HMSH_CODE_SUCCESS = exports.HMSH_SIGNAL_EXPIRE = exports.HMSH_IS_CLUSTER = exports.HMSH_TELEMETRY = exports.HMSH_LOGLEVEL = void 0;
|
|
3
|
+
exports.HMSH_GUID_SIZE = exports.HMSH_SCOUT_INTERVAL_SECONDS = exports.HMSH_FIDELITY_SECONDS = exports.HMSH_EXPIRE_DURATION = exports.HMSH_XPENDING_COUNT = exports.HMSH_XCLAIM_COUNT = exports.HMSH_XCLAIM_DELAY_MS = exports.HMSH_BLOCK_TIME_MS = exports.HMSH_MESHFLOW_EXP_BACKOFF = exports.HMSH_MESHFLOW_MAX_INTERVAL = exports.HMSH_MESHFLOW_MAX_ATTEMPTS = exports.HMSH_GRADUATED_INTERVAL_MS = exports.HMSH_MAX_TIMEOUT_MS = exports.HMSH_MAX_RETRIES = exports.MAX_DELAY = exports.MAX_STREAM_RETRIES = exports.INITIAL_STREAM_BACKOFF = exports.MAX_STREAM_BACKOFF = exports.HMSH_EXPIRE_JOB_SECONDS = exports.HMSH_OTT_WAIT_TIME = exports.HMSH_DEPLOYMENT_PAUSE = exports.HMSH_DEPLOYMENT_DELAY = exports.HMSH_ACTIVATION_MAX_RETRY = exports.HMSH_QUORUM_DELAY_MS = exports.HMSH_QUORUM_ROLLCALL_CYCLES = exports.HMSH_STATUS_UNKNOWN = exports.HMSH_CODE_MESHFLOW_RETRYABLE = exports.HMSH_CODE_MESHFLOW_FATAL = exports.HMSH_CODE_MESHFLOW_MAXED = exports.HMSH_CODE_MESHFLOW_TIMEOUT = exports.HMSH_CODE_MESHFLOW_WAIT = exports.HMSH_CODE_MESHFLOW_PROXY = exports.HMSH_CODE_MESHFLOW_CHILD = exports.HMSH_CODE_MESHFLOW_ALL = exports.HMSH_CODE_MESHFLOW_SLEEP = exports.HMSH_CODE_UNACKED = exports.HMSH_CODE_TIMEOUT = exports.HMSH_CODE_UNKNOWN = exports.HMSH_CODE_INTERRUPT = exports.HMSH_CODE_NOTFOUND = exports.HMSH_CODE_PENDING = exports.HMSH_CODE_SUCCESS = exports.HMSH_SIGNAL_EXPIRE = exports.HMSH_IS_CLUSTER = exports.HMSH_TELEMETRY = exports.HMSH_LOGLEVEL = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Determines the log level for the application. The default is 'info'.
|
|
6
6
|
*/
|
|
@@ -87,6 +87,9 @@ exports.HMSH_DEPLOYMENT_PAUSE = parseInt(process.env.HMSH_DEPLOYMENT_PAUSE, 10)
|
|
|
87
87
|
exports.HMSH_OTT_WAIT_TIME = parseInt(process.env.HMSH_OTT_WAIT_TIME, 10) || 1000;
|
|
88
88
|
exports.HMSH_EXPIRE_JOB_SECONDS = parseInt(process.env.HMSH_EXPIRE_JOB_SECONDS, 10) || 1;
|
|
89
89
|
// STREAM ROUTER
|
|
90
|
+
exports.MAX_STREAM_BACKOFF = parseInt(process.env.MAX_STREAM_BACKOFF, 10) || 500;
|
|
91
|
+
exports.INITIAL_STREAM_BACKOFF = parseInt(process.env.INITIAL_STREAM_BACKOFF, 10) || 250;
|
|
92
|
+
exports.MAX_STREAM_RETRIES = parseInt(process.env.MAX_STREAM_RETRIES, 10) || 2;
|
|
90
93
|
exports.MAX_DELAY = 2147483647; // Maximum allowed delay in milliseconds for setTimeout
|
|
91
94
|
exports.HMSH_MAX_RETRIES = parseInt(process.env.HMSH_MAX_RETRIES, 10) || 3;
|
|
92
95
|
exports.HMSH_MAX_TIMEOUT_MS = parseInt(process.env.HMSH_MAX_TIMEOUT_MS, 10) || 60000;
|
package/build/modules/key.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const j=b;
|
|
1
|
+
'use strict';const j=b;function a(){const o=['reconstituteKey','activityId',':transitions','SUBSCRIPTIONS','../types/hotmesh','QUORUM','KeyService','KEYSEP','JOB_STATS_GENERAL','task_schedules','applications','SCHEMAS','JOB_STATE','THROTTLE_RATE','join','jobId','streams','versions','JOB_STATS_MEDIAN',':d:',':signals',':schemas','HOOKS','hmsh','329006gbtvsL','VALSEP','events','stream_topics','KeyType','signal_registry','WEBSEP','JOB_STATS_INDEX','2rDzEvW','unknown_entity','appVersion','sym','TIME_RANGE','resolveEntityType','1323008gyOmcr','jobs','HMNS','throttles','roles','1856430PqADpN','16FiaMig','topic',':sym:vals:','6804686oztzkx','hooks','APP','signal_patterns','resolveAbbreviation','mintKey','SUBSCRIPTION_PATTERNS','task_lists','symbols','SIGNALS',':w:','defineProperty','8466AGVTUS','jobKey','engineId','379341Ggmkby','parseKey',':x:','SYMVALS',':subscriptions',':s:','200829hURCzW',':j:',':v:','dateTime','stats',':sym:keys:','appId'];a=function(){return o;};return a();}(function(c,d){const i=b,e=c();while(!![]){try{const f=-parseInt(i(0x91))/0x1+-parseInt(i(0x99))/0x2*(-parseInt(i(0xbd))/0x3)+parseInt(i(0x9f))/0x4+-parseInt(i(0xa4))/0x5+parseInt(i(0xb4))/0x6+parseInt(i(0xa8))/0x7+parseInt(i(0xa5))/0x8*(-parseInt(i(0xb7))/0x9);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x8f376));function b(c,d){const e=a();return b=function(f,g){f=f-0x8d;let h=e[f];return h;},b(c,d);}Object[j(0xb3)](exports,'__esModule',{'value':!0x0}),exports[j(0x92)]=exports['WEBSEP']=exports['TYPSEP']=exports[j(0xcb)]=exports[j(0xa1)]=exports[j(0x95)]=exports[j(0xca)]=void 0x0;const hotmesh_1=require(j(0xc8));Object[j(0xb3)](exports,'KeyType',{'enumerable':!0x0,'get':function(){return hotmesh_1['KeyType'];}});const HMNS=j(0x90);exports['HMNS']=HMNS;const KEYSEP=':';exports['KEYSEP']=':';const VALSEP='::';exports[j(0x92)]='::';const WEBSEP='::';exports[j(0x97)]='::';const TYPSEP='::';exports['TYPSEP']='::';class KeyService{static[j(0xad)](c,d,f){const k=j;switch(d){case hotmesh_1[k(0x95)]['HOTMESH']:return c;case hotmesh_1[k(0x95)][k(0xd1)]:return c+':'+f[k(0xc3)]+':r:';case hotmesh_1[k(0x95)]['WORK_ITEMS']:return c+':'+f[k(0xc3)]+k(0xb2)+(f['scoutType']||'');case hotmesh_1[k(0x95)][k(0x9d)]:return c+':'+f[k(0xc3)]+':t:'+(f['timeValue']||'');case hotmesh_1[k(0x95)][k(0xaa)]:return c+':a:'+(f[k(0xc3)]||'');case hotmesh_1[k(0x95)][k(0xc9)]:return c+':'+f[k(0xc3)]+':q:'+(f[k(0xb6)]||'');case hotmesh_1[k(0x95)][k(0xd0)]:return c+':'+f[k(0xc3)]+k(0xbe)+f['jobId'];case hotmesh_1[k(0x95)]['JOB_DEPENDENTS']:return c+':'+f[k(0xc3)]+k(0xd7)+f[k(0xd3)];case hotmesh_1[k(0x95)][k(0xcc)]:return c+':'+f['appId']+k(0xbc)+f[k(0xb5)]+':'+f[k(0xc0)];case hotmesh_1['KeyType'][k(0xd6)]:case hotmesh_1['KeyType'][k(0x98)]:return c+':'+f[k(0xc3)]+':s:'+f['jobKey']+':'+f[k(0xc0)]+':'+f['facet'];case hotmesh_1[k(0x95)][k(0xcf)]:return c+':'+f[k(0xc3)]+k(0xbf)+f[k(0x9b)]+k(0x8e);case hotmesh_1[k(0x95)][k(0xc7)]:return c+':'+f[k(0xc3)]+k(0xbf)+f['appVersion']+k(0xbb);case hotmesh_1['KeyType'][k(0xae)]:return c+':'+f[k(0xc3)]+k(0xbf)+f[k(0x9b)]+k(0xc6);case hotmesh_1['KeyType'][k(0x8f)]:return c+':'+f[k(0xc3)]+':hooks';case hotmesh_1[k(0x95)][k(0xb1)]:return c+':'+f[k(0xc3)]+k(0x8d);case hotmesh_1[k(0x95)]['SYMKEYS']:return c+':'+f[k(0xc3)]+k(0xc2)+(f[k(0xc5)]||'');case hotmesh_1[k(0x95)][k(0xba)]:return c+':'+f[k(0xc3)]+k(0xa7);case hotmesh_1[k(0x95)]['STREAMS']:return c+':'+(f[k(0xc3)]||'')+k(0xb9)+(f[k(0xa6)]||'');default:throw new Error('Invalid\x20key\x20type.');}}static[j(0xb8)](c){const l=j,[d,f,g,...h]=c['split'](':');return{'namespace':d,'app':'a'===g?f:void 0x0,'entity':g,'id':h[l(0xd2)](':')||''};}static[j(0xc4)](c){const {namespace:d,app:f,entity:g,id:h}=c;return d+':'+f+':'+g+':'+(h||'');}static[j(0x9e)](c,d=''){const m=j;switch(c){case'a':return m(0xce);case'r':return m(0xa2);case'w':return''===d?'task_priorities':m(0xa3);case't':return''===d?m(0xcd):m(0xaf);case'q':return m(0x93);case'j':return m(0xa0);case's':return m(0xc1);case'v':return'versions';case'x':return''===d?m(0xd4):m(0x94);case m(0xa9):return m(0xab);case'signals':return'signal_registry';case m(0x9c):return m(0xb0);default:return'unknown_entity';}}static[j(0xac)](c){const n=j;switch(c){case n(0xce):return'a';case n(0xa2):return'r';case n(0xa3):return'w';case n(0xcd):case n(0xaf):return't';case'events':return'q';case'jobs':return'j';case n(0xc1):return's';case n(0xd5):return'v';case n(0xd4):return'x';case n(0xab):return n(0xa9);case n(0x96):return'signals';case'symbols':return n(0x9c);default:return n(0x9a);}}}exports[j(0xca)]=KeyService;
|
package/build/modules/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f
|
|
1
|
+
'use strict';const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f=parseInt(m(0x11b))/0x1*(-parseInt(m(0xc2))/0x2)+parseInt(m(0x10f))/0x3+parseInt(m(0xf9))/0x4+-parseInt(m(0xf8))/0x5+parseInt(m(0xef))/0x6*(parseInt(m(0xfe))/0x7)+-parseInt(m(0xe7))/0x8*(parseInt(m(0x119))/0x9)+-parseInt(m(0x104))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x5e07e));var __importDefault=this&&this[n(0xc8)]||function(c){return c&&c['__esModule']?c:{'default':c};};Object['defineProperty'](exports,n(0xfc),{'value':!0x0}),exports[n(0xbb)]=exports[n(0xdc)]=exports[n(0x107)]=exports['s']=exports[n(0xc4)]=exports[n(0x10c)]=exports[n(0xfa)]=exports[n(0xcd)]=exports[n(0x100)]=exports[n(0xd6)]=exports['formatISODate']=exports[n(0x111)]=exports[n(0xc9)]=exports['findSubscriptionForTrigger']=exports[n(0xe5)]=exports['matchesStatus']=exports[n(0x105)]=exports[n(0x11d)]=exports['identifyProvider']=exports[n(0x106)]=exports['sleepImmediate']=exports[n(0xd8)]=exports[n(0xd0)]=exports[n(0xee)]=exports[n(0xf2)]=exports[n(0xbd)]=exports[n(0xd9)]=void 0x0;const os_1=__importDefault(require('os')),crypto_1=require(n(0xdd)),nanoid_1=require(n(0xff)),ms_1=__importDefault(require('ms')),logger_1=require(n(0xc6)),enums_1=require(n(0x115)),logger=new logger_1[(n(0xe0))](n(0x118),n(0xf6)),hashOptions=c=>{const o=n,d=JSON[o(0xed)](c);return(0x0,crypto_1['createHash'])(o(0xba))[o(0xec)](d)[o(0xf1)](o(0xe3));};async function getSystemHealth(){const p=n,c=os_1['default'][p(0xf7)](),d=os_1[p(0x114)][p(0xc0)](),f=c-d;return{'TotalMemoryGB':(c/0x400/0x400/0x400)[p(0x108)](0x2)+p(0x101),'FreeMemoryGB':(d/0x400/0x400/0x400)[p(0x108)](0x2)+p(0x101),'UsedMemoryGB':(f/0x400/0x400/0x400)[p(0x108)](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};}function b(c,d){const e=a();return b=function(f,g){f=f-0xb9;let h=e[f];return h;},b(c,d);}function deepCopy(c){const q=n;return JSON['parse'](JSON[q(0xed)](c));}function deterministicRandom(c){const r=n,d=0x2710*Math[r(0xc7)](c);return d-Math[r(0xd7)](d);}function guid(c=enums_1[n(0xe9)]){const t=n;return'H'+(0x0,nanoid_1[t(0xff)])(c);}async function sleepFor(c){return new Promise(d=>setTimeout(d,c));}function sleepImmediate(){return new Promise(c=>setImmediate(c));}function XSleepFor(c){let d;return{'promise':new Promise(f=>{d=setTimeout(f,c);}),'timerId':d};}function identifyProvider(c){const u=n,d=Object[u(0xd3)](c);if(c[u(0x109)]?.['prototype']||Object[u(0xf4)](c)[u(0xc5)](u(0xfd))||'Pool'===d[u(0xc3)])return u(0xd1);if(c[u(0x10a)]()[u(0x11c)]()[u(0xc5)](u(0x116)))return u(0x116);if(u(0xda)in d||Object['keys'](d)[u(0xc5)](u(0xdb)))return u(0xf5);if(Object[u(0xf4)](d)[u(0xc5)]('Multi'))return u(0xe8);if(c[u(0xc1)]){if('Redis'===c[u(0xc1)][u(0xc3)]||'EventEmitter'===c['constructor']['name']){if(u(0x103)in c)return u(0xf5);}else{if((u(0x11e)===c[u(0xc1)][u(0xc3)]||u(0xf0)===c[u(0xc1)][u(0xc3)])&&u(0x117)in c)return u(0xe8);}}let f=null;return Object['keys'](c)['includes'](u(0xb9))||!isNaN(c[u(0x10d)])&&!isNaN(c[u(0x10e)])?f=u(0xd1):Object['keys'](c)[u(0xc5)](u(0xe1))?f=u(0xf5):Object[u(0xf4)](c)[u(0xc5)](u(0xbe))?f=u(0xe8):d[u(0xc1)][u(0x10a)]()[u(0xc5)](u(0x10b))&&(f=u(0x116)),f;}function matchesStatusCode(c,d){const v=n;if(v(0xd4)==typeof d){const f='^'+d['replace'](/\*/g,'\x5cd')+'$';return new RegExp(f)[v(0x110)](c['toString']());}return d[v(0x110)](c[v(0x10a)]());}function matchesStatus(c,d){return c===d;}function findTopKey(c,d){const w=n;for(const [f,g]of Object['entries'](c))if(g[w(0xea)](d))return(findTopKey(c,f[w(0xd2)](/^\./,''))||f)['replace'](/^\./,'');return null;}function findSubscriptionForTrigger(c,d){const x=n;for(const [f,g]of Object[x(0xde)](c))if(g===d)return f;return null;}async function getSubscriptionTopic(c,d,f){const y=n,g=await d['getTransitions'](f);return findSubscriptionForTrigger(await d[y(0xca)](f),findTopKey(g,c));}function getTimeSeries(c){const z=n;if(z(0xcc)===c['toString']())return'0';const d=new Date(),f=c[z(0xe4)](-0x1),g=parseInt(c['slice'](0x0,-0x1),0xa);if('m'===f){const h=Math[z(0xd7)](d['getMinutes']()/g)*g;d[z(0xe6)](h,0x0,0x0);}else'h'===f&&d[z(0xe6)](0x0,0x0,0x0);return d[z(0xbc)]()[z(0xd2)](/:\d\d\..+|-|T/g,'')['replace'](':','');}function formatISODate(c){const A=n;return(c instanceof Date?c:new Date(c))[A(0xbc)]()[A(0xd2)](/[:TZ-]/g,'');}function getSymKey(c){const B=n,d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';if(c<0x0||c>=Math[B(0xdf)](0x34,0x3))throw new Error(B(0xf3));const [f,g]=divmod(c,0x34),[h,i]=divmod(f,0x34);return d[h]+d[g]+d[i];}function getSymVal(c){const C=n,d=C(0xbf);if(c<0x0||c>=Math['pow'](0x34,0x2))throw new Error(C(0xf3));const [f,g]=divmod(c,0x34);return d[f]+d[g];}function divmod(c,d){const D=n;return[Math[D(0xd7)](c/d),c%d];}function getIndexedHash(c,d){const f=c[d]||0x0,g={...c};return delete g[d],[f,g];}function getValueByPath(c,d){const E=n,f=d[E(0x113)]('/');let g=c;for(const h of f){if(void 0x0===g[h])return;g=g[h];}return g;}function restoreHierarchy(c){const F=n,d={};for(const f in c){if(void 0x0===c[f])continue;const g=f[F(0x113)]('/');let h=d;for(let i=0x0;i<g[F(0xcb)];i++)i===g[F(0xcb)]-0x1?h[g[i]]=c[f]:(h[g[i]]=h[g[i]]||{},h=h[g[i]]);}return d;}function isValidCron(c){return/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/['test'](c);}exports[n(0xd9)]=hashOptions,exports[n(0xbd)]=getSystemHealth,exports['deepCopy']=deepCopy,exports['deterministicRandom']=deterministicRandom,exports[n(0xd0)]=guid,exports[n(0xd8)]=sleepFor,exports[n(0xcf)]=sleepImmediate,exports[n(0x106)]=XSleepFor,exports[n(0xce)]=identifyProvider,exports['polyfill']={'providerConfig':c=>c?.[n(0xb9)]??c?.['redis']??c?.[n(0x102)],'meshDataConfig':c=>({...c['connection']})},exports[n(0x105)]=matchesStatusCode,exports[n(0xfb)]=matchesStatus,exports[n(0xe5)]=findTopKey,exports[n(0x11a)]=findSubscriptionForTrigger,exports['getSubscriptionTopic']=getSubscriptionTopic,exports['getTimeSeries']=getTimeSeries,exports[n(0xe2)]=formatISODate,exports['getSymKey']=getSymKey,exports['getSymVal']=getSymVal,exports[n(0xcd)]=getIndexedHash,exports['getValueByPath']=getValueByPath,exports[n(0x10c)]=restoreHierarchy,exports[n(0xc4)]=isValidCron;const s=c=>(0x0,ms_1['default'])(c)/0x3e8;exports['s']=s;const parseStreamMessage=c=>{const G=n;try{return JSON[G(0x112)](c);}catch(d){throw logger['error']('Error\x20parsing\x20Stream\x20message',{'error':d}),d;}};exports[n(0x107)]=parseStreamMessage;const isStreamMessage=c=>Array['isArray'](c)&&Array[n(0xd5)](c[0x0]);exports['isStreamMessage']=isStreamMessage;const arrayToHash=c=>{const H=n,d=[];let f;for(let g=0x1;g<c[H(0xcb)];g++){const h=c[g],i={};if(Array[H(0xd5)](h)){for(let j=0x0;j<h[H(0xcb)];j+=0x2){const k=h[j],l=h[j+0x1];i[k]=l;}f&&(i['$']=f),d[H(0xeb)](i),f=void 0x0;}else f=h;}return d;};function a(){const I=['createClient','abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ','freemem','constructor','341882QnCryu','name','isValidCron','includes','../services/logger','sin','__importDefault','getSubscriptionTopic','getSubscriptions','length','infinity','getIndexedHash','identifyProvider','sleepImmediate','guid','postgres','replace','getPrototypeOf','string','isArray','getSymKey','floor','sleepFor','hashOptions','defineCommand','multi','isStreamMessage','crypto','entries','pow','LoggerService','Pipeline','formatISODate','hex','slice','findTopKey','setUTCMinutes','344aJRgII','redis','HMSH_GUID_SIZE','hasOwnProperty','push','update','stringify','deterministicRandom','6rUyZnP','Commander','digest','deepCopy','Number\x20out\x20of\x20range','keys','ioredis','utils','totalmem','1300550ZGpcMf','107772YYxIRA','getValueByPath','matchesStatus','__esModule','database','4811618MoNCnS','nanoid','getSymVal','\x20GB','connections','hset','1514640NNbQEl','matchesStatusCode','XSleepFor','parseStreamMessage','toFixed','Query','toString','NatsConnectionImpl','restoreHierarchy','totalCount','idleCount','938580nSzHIX','test','getTimeSeries','parse','split','default','./enums','nats','HSET','hotmesh','12456FvklCb','findSubscriptionForTrigger','1CPRObM','toLowerCase','polyfill','ProviderClient','connection','sha256','arrayToHash','toISOString','getSystemHealth'];a=function(){return I;};return a();}exports[n(0xbb)]=arrayToHash;
|
package/build/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotmeshio/hotmesh",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.32",
|
|
4
4
|
"description": "Serverless Workflow",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"test:parallel": "NODE_ENV=test jest ./tests/functional/parallel/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
50
50
|
"test:pipe": "NODE_ENV=test jest ./tests/unit/services/pipe/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
51
51
|
"test:quorum": "HMSH_IS_CLUSTER=true NODE_ENV=test jest ./tests/functional/quorum/*.test.ts --detectOpenHandles --forceExit --verbose",
|
|
52
|
-
"test:reclaim": "NODE_ENV=test jest ./tests/functional/reclaim
|
|
52
|
+
"test:reclaim": "NODE_ENV=test jest ./tests/functional/reclaim/*.test.ts --detectOpenHandles --forceExit --verbose",
|
|
53
53
|
"test:redeploy": "NODE_ENV=test jest ./tests/functional/redeploy/*.test.ts --detectOpenHandles --forceExit --verbose",
|
|
54
54
|
"test:reporter": "NODE_ENV=test jest ./tests/unit/services/reporter/index.test.ts --detectOpenHandles --forceExit --verbose",
|
|
55
55
|
"test:reentrant": "NODE_ENV=test jest ./tests/functional/reentrant/*.test.ts --detectOpenHandles --forceExit --verbose",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const w=b;(function(c,d){const v=b,e=c();while(!![]){try{const f=parseInt(v(0x19c))/0x1+parseInt(v(0x155))/0x2+parseInt(v(0x1da))/0x3*(parseInt(v(0x1c4))/0x4)+-parseInt(v(0x1ad))/0x5+parseInt(v(0x142))/0x6+-parseInt(v(0x1bb))/0x7+parseInt(v(0x1c7))/0x8*(-parseInt(v(0x180))/0x9);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x19bd9));function b(c,d){const e=a();return b=function(f,g){f=f-0x13d;let h=e[f];return h;},b(c,d);}Object[w(0x190)](exports,w(0x16f),{'value':!0x0}),exports[w(0x172)]=void 0x0;function a(){const ab=['bindJobError','__esModule','initDimensionalAddress','activity-process-event-error','Activity','JOB','notarizeCompletion','subscribes','bindActivityMetadata','bindJobMetadata','PENDING','join','runJobCompletionTasks','restoreHierarchy','config','job','subtype','input','672579TpetWB','TRANSITION','getSeed','processPending','info','notarizeContinuation','getState','dad','job\x20id\x20is\x20undefined','getTransitions','bindJobMetadataPaths','message','code','getVID','adjacentIndex','stringify','defineProperty','lastIndexOf','maps','verifyEntry','map','initPolicies','metadata/','processEvent','getDimensionsById','jobWasInterrupted','bindDimensionalAddress','getJobStatus','74515wNzQEf','ERROR','notarizeEntry','engine','resolveStatus','JOB_UPDATE','InactiveJobError','verifyReentry','notarizeReentry','../serializer','stack','bindActivityError','process-event-generational-job-error','SUCCESS','mapRules','fault','shouldPersistJob','845575HvbtWD','transitionAdjacent','resolve','output','TelemetryService','process-event-','formatISODate','startActivitySpan','KEYS','err','trigger','bindActivityData','mapStatusThreshold','status','79716HosreJ','appId','getSchema','startsWith','bindJobTelemetryToState','bindJobState','setStatus','transact','deepCopy','99964RRpUxm','jid','stp','8ssAVla','leg','resolveDad','error','adjacencyList','ancestors','-error','../../modules/enums','forEach','getTriggerConfig','assertGenerationalId','Pipe','length','setActivityAttributes','mapJobData','activity-process-event','shouldEmit','../../modules/utils','hook','24VkbIag','ACTIVITY','$self','CollationError','bindActivityState','persistent','gid','indexOf','guid','consumes','transition','GenerationalError','split','expire','getDimensionalSeed','statusThreshold','entries','12912miqDuO','registerTimeout','filterAdjacent','getValueByPath','MDATA_SYMBOLS','addTargetTelemetryPaths','router','metadata','initSelf','bindActivityMetadataPaths','MapperService','publishMessage','name','PRODUCES','exec','substring','authorizeEntry','/output/metadata/as','evaluate','168144tEYJfz','logger','setState','activity-process-event-end','isJobComplete','StreamStatus','HMSH_EXPIRE_DURATION','emit','aid','bindActivityTelemetryToState','$job','../telemetry','keys','setLeg','data','context','push','CollatorService','store','atp','processError','persist','../../types/stream','mapInputData','debug'];a=function(){return ab;};return a();}const enums_1=require(w(0x1ce)),errors_1=require('../../modules/errors'),utils_1=require(w(0x1d8)),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),serializer_1=require(w(0x1a5)),telemetry_1=require(w(0x160)),stream_1=require(w(0x16b));class Activity{constructor(c,d,f,g,h,j){const x=w;this[x(0x1ba)]=stream_1[x(0x15a)][x(0x1a9)],this['code']=0xc8,this[x(0x18e)]=0x0,this[x(0x17c)]=c,this[x(0x163)]=d,this[x(0x149)]=f,this['hook']=g,this[x(0x19f)]=h,this[x(0x164)]=j||{'data':{},'metadata':{}},this['logger']=h[x(0x156)],this['store']=h[x(0x167)];}[w(0x162)](c){const y=w;this[y(0x1c8)]=c;}['mapStatusThreshold'](){const z=w;if(void 0x0!==this[z(0x17c)][z(0x140)]){const c=pipe_1[z(0x1d2)][z(0x1af)](this[z(0x17c)][z(0x140)],this[z(0x164)]);if(void 0x0!==c&&!isNaN(Number(c)))return c;}return 0x0;}async[w(0x193)](){const A=w;this['setLeg'](0x1),await this[A(0x186)]();const c=this[A(0x1b9)]();try{collator_1[A(0x166)]['assertJobActive'](this[A(0x164)][A(0x149)]['js'],this[A(0x164)]['metadata'][A(0x1c5)],this[A(0x149)][A(0x15d)],c);}catch(d){if(await collator_1[A(0x166)][A(0x19e)](this),!(c>0x0))throw d;if(this[A(0x164)]['metadata']['js']===c){const f=await this[A(0x1c1)](-c);0x0===Number(f)&&await this[A(0x19f)][A(0x17a)](this['context']);}return;}await collator_1[A(0x166)][A(0x19e)](this);}async[w(0x1a3)](){const B=w,c=this[B(0x164)][B(0x149)][B(0x1e2)];return this['setLeg'](0x2),await this[B(0x186)](),collator_1[B(0x166)]['assertJobActive'](this[B(0x164)]['metadata']['js'],this[B(0x164)]['metadata'][B(0x1c5)],this[B(0x149)][B(0x15d)]),await collator_1['CollatorService'][B(0x1a4)](this,c);}async[w(0x197)](c=stream_1['StreamStatus']['SUCCESS'],d=0xc8,f=w(0x1b0)){const C=w;this['setLeg'](0x2);const g=this['context'][C(0x149)][C(0x1c5)];if(!g)return void this[C(0x156)][C(0x1ca)](C(0x171),{'message':C(0x188)});const h=this['metadata'][C(0x15d)];let j;this[C(0x1ba)]=c,this['code']=d,this[C(0x156)][C(0x16d)](C(0x1d6),{'topic':this[C(0x17c)][C(0x17e)],'jid':g,'aid':h,'status':c,'code':d});try{const k=await this[C(0x1a3)]();let l;this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](k),j=new telemetry_1[(C(0x1b1))](this[C(0x19f)][C(0x1bc)],this[C(0x17c)],this[C(0x149)],this[C(0x164)]),j[C(0x1b4)](this[C(0x1c8)]),l=c===stream_1['StreamStatus'][C(0x178)]?await this[C(0x183)](f):c===stream_1[C(0x15a)][C(0x1a9)]?await this['processSuccess'](f):await this[C(0x169)](),this['transitionAdjacent'](l,j);}catch(m){if(m instanceof errors_1[C(0x1dd)])return void this[C(0x156)][C(0x184)](C(0x1b2)+m[C(0x1ab)]+C(0x1cd),{'error':m});if(m instanceof errors_1[C(0x1a2)])return void this['logger'][C(0x184)]('process-event-inactive-job-error',{'error':m});if(m instanceof errors_1[C(0x1e5)])return void this[C(0x156)][C(0x184)](C(0x1a8),{'error':m});if(m instanceof errors_1['GetStateError'])return void this[C(0x156)][C(0x184)]('process-event-get-job-error',{'error':m});throw this[C(0x156)]['error']('activity-process-event-error',{'error':m,'message':m[C(0x18b)],'stack':m[C(0x1a6)],'name':m[C(0x14e)]}),j?.['setActivityError'](m[C(0x18b)]),m;}finally{j?.['endActivitySpan'](),this['logger'][C(0x16d)](C(0x158),{'jid':g,'aid':h});}}async['processPending'](c){const D=w;this[D(0x1b8)](c),this[D(0x1cb)]=await this['filterAdjacent'](),this[D(0x1d5)]();const d=this[D(0x167)][D(0x1c2)]();return await this[D(0x157)](d),await collator_1['CollatorService'][D(0x185)](this,d),await this[D(0x1c1)](this['adjacencyList'][D(0x1d3)],d),await d[D(0x150)]();}async['processSuccess'](c){const E=w;this[E(0x1b8)](c),this['adjacencyList']=await this['filterAdjacent'](),this[E(0x1d5)]();const d=this[E(0x167)][E(0x1c2)]();return await this[E(0x157)](d),await collator_1[E(0x166)][E(0x174)](this,d),await this[E(0x1c1)](this['adjacencyList']['length']-0x1,d),await d[E(0x150)]();}async[w(0x169)](){const F=w;this[F(0x1a7)](this[F(0x163)]),this[F(0x1cb)]=await this[F(0x144)](),this[F(0x1cb)][F(0x1d3)]||this[F(0x16e)](this[F(0x163)]),this['mapJobData']();const c=this[F(0x167)][F(0x1c2)]();return await this[F(0x157)](c),await collator_1[F(0x166)][F(0x174)](this,c),await this['setStatus'](this[F(0x1cb)][F(0x1d3)]-0x1,c),await c[F(0x150)]();}async[w(0x1ae)](c,d){const G=w;d['mapActivityAttributes']();const f=this[G(0x1a0)](c),g={'app.job.jss':f},h=await this[G(0x1e4)](this[G(0x1cb)],f);h?.[G(0x1d3)]&&(g['app.activity.mids']=h[G(0x179)](',')),d[G(0x1d4)](g);}[w(0x1a0)](c){const H=w,d=c[c[H(0x1d3)]-0x1];return Array['isArray'](d)?Number(d[0x1]):Number(d);}[w(0x1d5)](){const I=w;if(this[I(0x17c)][I(0x17d)]?.[I(0x192)]){const c=new mapper_1[(I(0x14c))]((0x0,utils_1[I(0x1c3)])(this[I(0x17c)][I(0x17d)][I(0x192)]),this[I(0x164)])[I(0x1aa)]();if(c)for(const d in c){const f=d[I(0x1e1)]('[');if(f>-0x1){const g=d[I(0x151)](f+0x1)[I(0x13d)](']')[0x0];if(isNaN(Number(g))){if('-'===g||'_'===g){const h=c[d];Object[I(0x161)](h)[I(0x1cf)](j=>{c[j]=h[j];});}}else{const j=d[I(0x151)](0x0,f);c[j]=c[d],delete c[d];}}}this[I(0x164)][I(0x163)]=c;}}[w(0x16c)](){const J=w;if(this[J(0x17c)][J(0x17f)]?.[J(0x192)]){const c=new mapper_1[(J(0x14c))]((0x0,utils_1[J(0x1c3)])(this[J(0x17c)][J(0x17f)][J(0x192)]),this[J(0x164)]);this[J(0x164)][J(0x163)]=c[J(0x1aa)]();}}['mapOutputData'](){const K=w;if(this[K(0x17c)][K(0x1b0)]?.[K(0x192)]){const c=new mapper_1[(K(0x14c))]((0x0,utils_1['deepCopy'])(this[K(0x17c)][K(0x1b0)][K(0x192)]),this[K(0x164)])['mapRules'](),d=this[K(0x149)][K(0x15d)],f={...this[K(0x164)][d][K(0x1b0)],...c};this[K(0x164)][d]['output']['data']=f;}}async[w(0x143)](){}[w(0x1a7)](c){const L=w,d=this[L(0x164)][this[L(0x149)]['aid']][L(0x1b0)][L(0x149)];d['err']=JSON[L(0x18f)](this[L(0x163)]),d['$error']={...c,'is_stream_error':!0x0};}['bindJobError'](c){const M=w;this[M(0x164)][M(0x149)][M(0x1b6)]=JSON[M(0x18f)]({...c,'is_stream_error':!0x0});}async[w(0x1d0)](){const N=w;return await this[N(0x167)][N(0x1bd)](this[N(0x17c)][N(0x1b7)],await this['engine'][N(0x18d)]());}['getJobStatus'](){return null;}async[w(0x1c1)](c,d){const O=w,{id:f}=await this[O(0x19f)][O(0x18d)]();return await this['store'][O(0x1c1)](c,this[O(0x164)][O(0x149)][O(0x1c5)],f,d);}['authorizeEntry'](c){const P=w;return this[P(0x1cb)]?.[P(0x194)](d=>{const Q=P,{metadata:{aid:f}}=d;return c[f+Q(0x153)]=collator_1[Q(0x166)][Q(0x182)](),f;})??[];}[w(0x19a)](c){const R=w,d=this[R(0x1c9)]();c[this[R(0x149)][R(0x15d)]+'/output/metadata/dad']=d;}async[w(0x157)](c){const S=w,d=this[S(0x164)][S(0x149)][S(0x1c5)];this[S(0x177)](),this[S(0x176)]();const f={};await this[S(0x1c0)](f);const g=this[S(0x152)](f);this['bindDimensionalAddress'](f),this['bindActivityState'](f);const h=['$'+this[S(0x17c)][S(0x175)],this[S(0x149)]['aid'],...g],j=collator_1[S(0x166)][S(0x198)]([...this[S(0x17c)][S(0x1cc)],this['metadata'][S(0x15d)]],this['resolveDad']());return await this[S(0x167)][S(0x157)](f,this[S(0x19b)](),d,h,j,c);}['bindJobMetadata'](){const T=w;this['context']['metadata']['ju']=(0x0,utils_1[T(0x1b3)])(new Date());}[w(0x176)](){const U=w,c=this[U(0x164)]['$self'];c[U(0x1b0)][U(0x149)]||(c[U(0x1b0)][U(0x149)]={}),this[U(0x1ba)]===stream_1[U(0x15a)][U(0x19d)]&&(c[U(0x1b0)][U(0x149)][U(0x1b6)]=JSON[U(0x18f)](this[U(0x163)]));const d=(0x0,utils_1[U(0x1b3)])(new Date());c[U(0x1b0)]['metadata']['ac']=d,c[U(0x1b0)][U(0x149)]['au']=d,c[U(0x1b0)][U(0x149)][U(0x168)]=this['config']['type'],this['config'][U(0x17e)]&&(c['output'][U(0x149)][U(0x1c6)]=this[U(0x17c)][U(0x17e)]),c['output'][U(0x149)][U(0x15d)]=this[U(0x149)][U(0x15d)];}async[w(0x1c0)](c){const V=w,d=[...(await this[V(0x1d0)]())[V(0x14f)]||[],...this[V(0x18a)]()];for(const f of d){const g=(0x0,utils_1['getValueByPath'])(this[V(0x164)],f);void 0x0!==g&&(c[f]=g);}for(const h in this[V(0x164)]?.[V(0x163)]??{})(h[V(0x1be)]('-')||h['startsWith']('_'))&&(c[h]=this[V(0x164)][V(0x163)][h]);telemetry_1[V(0x1b1)][V(0x1bf)](c,this[V(0x17c)],this[V(0x164)]);}[w(0x1de)](c){const W=w,d=[...this[W(0x17c)]['produces'],...this[W(0x14b)]()];for(const f of d){const g=this[W(0x149)][W(0x15d)]+'/'+f,h=(0x0,utils_1[W(0x145)])(this[W(0x164)],g);void 0x0!==h&&(c[g]=h);}telemetry_1[W(0x1b1)][W(0x15e)](c,this['config'],this[W(0x149)],this[W(0x164)],this[W(0x1c8)]);}[w(0x18a)](){const X=w;return serializer_1[X(0x146)][X(0x1a1)][X(0x1b5)]['map'](c=>'metadata/'+c);}[w(0x14b)](){const Y=w,c=0x1===this[Y(0x1c8)]?Y(0x1db):'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][c]['KEYS'][Y(0x194)](d=>'output/metadata/'+d);}async[w(0x186)](){const Z=w,c=this[Z(0x164)][Z(0x149)][Z(0x1e0)],d='$'+this['config'][Z(0x175)],f={[d]:serializer_1[Z(0x146)][Z(0x173)][Z(0x1b5)]['map'](m=>Z(0x196)+m)};for(let [m,p]of Object[Z(0x141)](this[Z(0x17c)][Z(0x1e3)]))if('$job'===m){for(const q of p)f[d][Z(0x165)](q);}else{'$self'===m&&(m=this['metadata']['aid']),f[m]||(f[m]=[]);for(const u of p)f[m][Z(0x165)](m+'/'+u);}telemetry_1[Z(0x1b1)][Z(0x147)](f,this[Z(0x17c)],this[Z(0x149)],this[Z(0x1c8)]);const {dad:g,jid:h}=this['context'][Z(0x149)],j=collator_1[Z(0x166)]['getDimensionsById']([...this[Z(0x17c)]['ancestors'],this[Z(0x149)][Z(0x15d)]],g||''),[k,l]=await this[Z(0x167)][Z(0x186)](h,f,j);this[Z(0x164)]=(0x0,utils_1[Z(0x17b)])(k),this[Z(0x1d1)](this[Z(0x164)]?.[Z(0x149)]?.[Z(0x1e0)],c),this[Z(0x170)](g),this[Z(0x14a)](this[Z(0x164)]),this[Z(0x195)](this[Z(0x164)]);}[w(0x1d1)](c,d){const a0=w;if(d!==c)throw new errors_1[(a0(0x1e5))](c,d,this[a0(0x164)]?.['metadata']?.[a0(0x1c5)]??'',this[a0(0x164)]?.[a0(0x149)]?.[a0(0x15d)]??'',this['context']?.[a0(0x149)]?.[a0(0x187)]??'');}[w(0x170)](c){const a1=w;this['metadata'][a1(0x187)]=c;}[w(0x14a)](c){const a2=w,d=this[a2(0x149)][a2(0x15d)];c[d]||(c[d]={});const f=c[d];return f[a2(0x1b0)]||(f['output']={}),f[a2(0x17f)]||(f[a2(0x17f)]={}),f[a2(0x1d9)]||(f[a2(0x1d9)]={}),f[a2(0x1b0)][a2(0x149)]||(f['output']['metadata']={}),f[a2(0x1b0)]['metadata']['au']=(0x0,utils_1[a2(0x1b3)])(new Date()),c[a2(0x1dc)]=f,c[a2(0x15f)]=c,c;}[w(0x195)](c){const a3=w,d=pipe_1['Pipe'][a3(0x1af)](this[a3(0x17c)][a3(0x13e)]??enums_1[a3(0x15b)],c);if(c[a3(0x149)]['expire']=d,null!=this[a3(0x17c)][a3(0x1df)]){const f=pipe_1['Pipe'][a3(0x1af)](this[a3(0x17c)][a3(0x1df)]??!0x1,c);c[a3(0x149)][a3(0x1df)]=f;}}['bindActivityData'](c){const a4=w;this[a4(0x164)][this['metadata']['aid']][c][a4(0x163)]=this['data'];}[w(0x1c9)](){const a5=w;let c=this[a5(0x149)][a5(0x187)];return this[a5(0x18e)]>0x0&&(c=c[a5(0x151)](0x0,c[a5(0x191)](','))+','+this[a5(0x18e)]),c;}['resolveAdjacentDad'](){const a6=w;return''+this['resolveDad']()+collator_1['CollatorService'][a6(0x13f)](0x0);}async['filterAdjacent'](){const a7=w,c=[],d=(await this[a7(0x167)][a7(0x189)](await this[a7(0x19f)][a7(0x18d)]()))['.'+this[a7(0x149)][a7(0x15d)]],f=this['resolveAdjacentDad']();if(d)for(const g in d){const h=d[g];mapper_1[a7(0x14c)][a7(0x154)](h,this[a7(0x164)],this[a7(0x18c)])&&c[a7(0x165)]({'metadata':{'guid':(0x0,utils_1[a7(0x1e2)])(),'jid':this[a7(0x164)][a7(0x149)][a7(0x1c5)],'gid':this['context'][a7(0x149)][a7(0x1e0)],'dad':f,'aid':g,'spn':this[a7(0x164)][a7(0x1dc)]['output'][a7(0x149)]?.['l2s'],'trc':this['context'][a7(0x149)]['trc']},'type':stream_1['StreamDataType'][a7(0x181)],'data':{}});}return c;}[w(0x159)](c){return c<=0x0;}['shouldEmit'](){const a8=w;return!!this[a8(0x17c)]['emit']&&!0x0===pipe_1[a8(0x1d2)][a8(0x1af)](this['config'][a8(0x15c)],this['context']);}['shouldPersistJob'](){const a9=w;return void 0x0!==this[a9(0x17c)][a9(0x16a)]&&!0x0===pipe_1['Pipe'][a9(0x1af)](this[a9(0x17c)][a9(0x16a)],this['context']);}async[w(0x1e4)](c,d){const aa=w;if(this[aa(0x199)](d))return;let f=[];if((this[aa(0x1d7)]()||this[aa(0x159)](d)||this[aa(0x1ac)]())&&await this[aa(0x19f)][aa(0x17a)](this['context'],{'emit':!this[aa(0x159)](d)&&!this[aa(0x1ac)]()}),c[aa(0x1d3)]&&!this['isJobComplete'](d)){const g=this[aa(0x167)]['transact']();for(const h of c)await this[aa(0x19f)][aa(0x148)]?.[aa(0x14d)](null,h,g);f=await g[aa(0x150)]();}return f;}[w(0x199)](c){return c<-0x5f5e100;}}exports[w(0x172)]=Activity;
|
|
1
|
+
'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-0x16b;let h=e[f];return h;},b(c,d);}const w=b;(function(c,d){const v=b,e=c();while(!![]){try{const f=parseInt(v(0x1ce))/0x1+parseInt(v(0x1ca))/0x2*(-parseInt(v(0x1ba))/0x3)+-parseInt(v(0x205))/0x4+parseInt(v(0x1b4))/0x5*(parseInt(v(0x1f3))/0x6)+parseInt(v(0x1fc))/0x7*(parseInt(v(0x204))/0x8)+parseInt(v(0x179))/0x9*(parseInt(v(0x207))/0xa)+parseInt(v(0x190))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xeb188));Object[w(0x210)](exports,w(0x1f0),{'value':!0x0}),exports['Activity']=void 0x0;function a(){const ab=['deepCopy','../../modules/utils','processEvent','ACTIVITY','Pipe','code','4252YnuOYV','router','JOB_UPDATE','bindJobMetadataPaths','498952ZIDtkK','SUCCESS','mapRules','transact','KEYS','bindActivityState','map','hook','setActivityAttributes','leg','length','restoreHierarchy','evaluate','startActivitySpan','CollationError','getJobStatus','PRODUCES','bindDimensionalAddress','keys','gid','split','StreamDataType','name','err','getState','StreamStatus','getDimensionalSeed','job','CollatorService','adjacencyList','guid','status','Activity','trigger','__esModule','process-event-generational-job-error','publishMessage','3310578vhKseZ','adjacentIndex','getSeed','dad','emit','startsWith','subtype','setLeg','mapStatusThreshold','91jgMJKp','../telemetry','bindJobState','notarizeReentry','initSelf','initDimensionalAddress','formatISODate','bindActivityData','314752cvZxaY','3948900ENHCUg','push','30TGlPQj','store','resolveDad','getSchema','notarizeCompletion','MapperService','stringify','metadata','shouldEmit','defineProperty','verifyReentry','../pipe','exec','resolveStatus','bindJobMetadata','JOB','../serializer','shouldPersistJob','bindJobError','bindJobTelemetryToState','processPending','getTriggerConfig','GetStateError','transition','forEach','725211eSEJuW','processError','expire','config','$job','context','jobWasInterrupted','runJobCompletionTasks','$self','filterAdjacent','stp','TelemetryService','input','debug','bindActivityMetadataPaths','logger','authorizeEntry','isJobComplete','process-event-inactive-job-error','output/metadata/','isArray','data','ancestors','1725713vCtkkF','getTransitions','process-event-','assertGenerationalId','aid','atp','maps','resolve','endActivitySpan','subscribes','jid','../../types/stream','error','trc','HMSH_EXPIRE_DURATION','stack','statusThreshold','output','../../modules/errors','processSuccess','type','resolveAdjacentDad','GenerationalError','appId','PENDING','entries','bindActivityMetadata','mapJobData','produces','activity-process-event-error','ACTIVITY_UPDATE','MDATA_SYMBOLS','engine','persistent','indexOf','addTargetTelemetryPaths','5ugKrHU','getValueByPath','consumes','substring','assertJobActive','mapOutputData','15OlMwkC','persist','InactiveJobError','setState','notarizeEntry','getVID','transitionAdjacent','info','setStatus','fault'];a=function(){return ab;};return a();}const enums_1=require('../../modules/enums'),errors_1=require(w(0x1a2)),utils_1=require(w(0x1c5)),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require(w(0x16b)),serializer_1=require(w(0x170)),telemetry_1=require(w(0x1fd)),stream_1=require(w(0x19b));class Activity{constructor(c,d,f,g,h,j){const x=w;this[x(0x1ed)]=stream_1[x(0x1e7)][x(0x1cf)],this[x(0x1c9)]=0xc8,this['adjacentIndex']=0x0,this['config']=c,this['data']=d,this['metadata']=f,this[x(0x1d5)]=g,this[x(0x1b0)]=h,this['context']=j||{'data':{},'metadata':{}},this[x(0x188)]=h[x(0x188)],this['store']=h['store'];}['setLeg'](c){const y=w;this[y(0x1d7)]=c;}[w(0x1fb)](){const z=w;if(void 0x0!==this[z(0x17c)][z(0x1a0)]){const c=pipe_1[z(0x1c8)][z(0x197)](this[z(0x17c)][z(0x1a0)],this[z(0x17e)]);if(void 0x0!==c&&!isNaN(Number(c)))return c;}return 0x0;}async['verifyEntry'](){const A=w;this[A(0x1fa)](0x1),await this['getState']();const c=this[A(0x1fb)]();try{collator_1[A(0x1ea)]['assertJobActive'](this['context'][A(0x20e)]['js'],this['context'][A(0x20e)][A(0x19a)],this['metadata'][A(0x194)],c);}catch(d){if(await collator_1[A(0x1ea)][A(0x1be)](this),!(c>0x0))throw d;if(this[A(0x17e)]['metadata']['js']===c){const f=await this[A(0x1c2)](-c);0x0===Number(f)&&await this[A(0x1b0)][A(0x180)](this[A(0x17e)]);}return;}await collator_1[A(0x1ea)][A(0x1be)](this);}async['verifyReentry'](){const B=w,c=this[B(0x17e)][B(0x20e)]['guid'];return this['setLeg'](0x2),await this[B(0x1e6)](),collator_1['CollatorService'][B(0x1b8)](this[B(0x17e)]['metadata']['js'],this[B(0x17e)][B(0x20e)][B(0x19a)],this[B(0x20e)]['aid']),await collator_1[B(0x1ea)][B(0x1ff)](this,c);}async[w(0x1c6)](c=stream_1[w(0x1e7)]['SUCCESS'],d=0xc8,f=w(0x1a1)){const C=w;this[C(0x1fa)](0x2);const g=this[C(0x17e)][C(0x20e)][C(0x19a)];if(!g)return void this[C(0x188)][C(0x19c)]('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});const h=this[C(0x20e)][C(0x194)];let j;this['status']=c,this[C(0x1c9)]=d,this['logger'][C(0x186)]('activity-process-event',{'topic':this[C(0x17c)][C(0x1f9)],'jid':g,'aid':h,'status':c,'code':d});try{const k=await this[C(0x211)]();let l;this[C(0x1f4)]=collator_1[C(0x1ea)]['getDimensionalIndex'](k),j=new telemetry_1[(C(0x184))](this[C(0x1b0)][C(0x1a7)],this[C(0x17c)],this[C(0x20e)],this[C(0x17e)]),j[C(0x1db)](this['leg']),l=c===stream_1[C(0x1e7)][C(0x1a8)]?await this[C(0x174)](f):c===stream_1[C(0x1e7)]['SUCCESS']?await this[C(0x1a3)](f):await this[C(0x17a)](),this['transitionAdjacent'](l,j);}catch(m){if(m instanceof errors_1[C(0x1dc)])return void this[C(0x188)]['info'](C(0x192)+m[C(0x1c3)]+'-error',{'error':m});if(m instanceof errors_1[C(0x1bc)])return void this[C(0x188)][C(0x1c1)](C(0x18b),{'error':m});if(m instanceof errors_1['GenerationalError'])return void this[C(0x188)][C(0x1c1)](C(0x1f1),{'error':m});if(m instanceof errors_1[C(0x176)])return void this['logger'][C(0x1c1)]('process-event-get-job-error',{'error':m});throw this[C(0x188)]['error'](C(0x1ad),{'error':m,'message':m['message'],'stack':m[C(0x19f)],'name':m[C(0x1e4)]}),j?.['setActivityError'](m['message']),m;}finally{j?.[C(0x198)](),this[C(0x188)][C(0x186)]('activity-process-event-end',{'jid':g,'aid':h});}}async['processPending'](c){const D=w;this[D(0x203)](c),this[D(0x1eb)]=await this[D(0x182)](),this[D(0x1ab)]();const d=this[D(0x208)][D(0x1d1)]();return await this[D(0x1bd)](d),await collator_1[D(0x1ea)]['notarizeContinuation'](this,d),await this['setStatus'](this['adjacencyList'][D(0x1d8)],d),await d[D(0x16c)]();}async['processSuccess'](c){const E=w;this['bindActivityData'](c),this[E(0x1eb)]=await this[E(0x182)](),this[E(0x1ab)]();const d=this['store']['transact']();return await this[E(0x1bd)](d),await collator_1[E(0x1ea)][E(0x20b)](this,d),await this[E(0x1c2)](this['adjacencyList'][E(0x1d8)]-0x1,d),await d[E(0x16c)]();}async['processError'](){const F=w;this['bindActivityError'](this[F(0x18e)]),this[F(0x1eb)]=await this[F(0x182)](),this['adjacencyList'][F(0x1d8)]||this[F(0x172)](this[F(0x18e)]),this[F(0x1ab)]();const c=this[F(0x208)][F(0x1d1)]();return await this['setState'](c),await collator_1[F(0x1ea)][F(0x20b)](this,c),await this[F(0x1c2)](this['adjacencyList'][F(0x1d8)]-0x1,c),await c[F(0x16c)]();}async[w(0x1c0)](c,d){const G=w;d['mapActivityAttributes']();const f=this[G(0x16d)](c),g={'app.job.jss':f},h=await this[G(0x177)](this[G(0x1eb)],f);h?.[G(0x1d8)]&&(g['app.activity.mids']=h['join'](',')),d[G(0x1d6)](g);}[w(0x16d)](c){const H=w,d=c[c[H(0x1d8)]-0x1];return Array[H(0x18d)](d)?Number(d[0x1]):Number(d);}[w(0x1ab)](){const I=w;if(this[I(0x17c)]['job']?.[I(0x196)]){const c=new mapper_1[(I(0x20c))]((0x0,utils_1[I(0x1c4)])(this[I(0x17c)][I(0x1e9)]['maps']),this[I(0x17e)])[I(0x1d0)]();if(c)for(const d in c){const f=d[I(0x1b2)]('[');if(f>-0x1){const g=d['substring'](f+0x1)[I(0x1e2)](']')[0x0];if(isNaN(Number(g))){if('-'===g||'_'===g){const h=c[d];Object[I(0x1e0)](h)[I(0x178)](j=>{c[j]=h[j];});}}else{const j=d[I(0x1b7)](0x0,f);c[j]=c[d],delete c[d];}}}this[I(0x17e)][I(0x18e)]=c;}}['mapInputData'](){const J=w;if(this[J(0x17c)]['input']?.['maps']){const c=new mapper_1[(J(0x20c))]((0x0,utils_1[J(0x1c4)])(this[J(0x17c)][J(0x185)][J(0x196)]),this[J(0x17e)]);this['context']['data']=c[J(0x1d0)]();}}[w(0x1b9)](){const K=w;if(this[K(0x17c)][K(0x1a1)]?.['maps']){const c=new mapper_1['MapperService']((0x0,utils_1[K(0x1c4)])(this[K(0x17c)]['output'][K(0x196)]),this[K(0x17e)])['mapRules'](),d=this[K(0x20e)][K(0x194)],f={...this[K(0x17e)][d][K(0x1a1)],...c};this[K(0x17e)][d][K(0x1a1)]['data']=f;}}async['registerTimeout'](){}['bindActivityError'](c){const L=w,d=this[L(0x17e)][this[L(0x20e)][L(0x194)]][L(0x1a1)][L(0x20e)];d['err']=JSON[L(0x20d)](this[L(0x18e)]),d['$error']={...c,'is_stream_error':!0x0};}[w(0x172)](c){const M=w;this['context']['metadata'][M(0x1e5)]=JSON['stringify']({...c,'is_stream_error':!0x0});}async[w(0x175)](){const N=w;return await this['store'][N(0x20a)](this['config'][N(0x1ef)],await this[N(0x1b0)][N(0x1bf)]());}[w(0x1dd)](){return null;}async[w(0x1c2)](c,d){const O=w,{id:f}=await this[O(0x1b0)][O(0x1bf)]();return await this[O(0x208)][O(0x1c2)](c,this[O(0x17e)]['metadata'][O(0x19a)],f,d);}[w(0x189)](c){const P=w;return this['adjacencyList']?.[P(0x1d4)](d=>{const Q=P,{metadata:{aid:f}}=d;return c[f+'/output/metadata/as']=collator_1['CollatorService'][Q(0x1f5)](),f;})??[];}['bindDimensionalAddress'](c){const R=w,d=this[R(0x209)]();c[this[R(0x20e)][R(0x194)]+'/output/metadata/dad']=d;}async[w(0x1bd)](c){const S=w,d=this[S(0x17e)][S(0x20e)][S(0x19a)];this[S(0x16e)](),this[S(0x1aa)]();const f={};await this['bindJobState'](f);const g=this[S(0x189)](f);this[S(0x1df)](f),this[S(0x1d3)](f);const h=['$'+this[S(0x17c)][S(0x199)],this[S(0x20e)][S(0x194)],...g],j=collator_1[S(0x1ea)]['getDimensionsById']([...this['config'][S(0x18f)],this[S(0x20e)]['aid']],this[S(0x209)]());return await this['store']['setState'](f,this[S(0x1dd)](),d,h,j,c);}['bindJobMetadata'](){const T=w;this[T(0x17e)]['metadata']['ju']=(0x0,utils_1[T(0x202)])(new Date());}[w(0x1aa)](){const U=w,c=this[U(0x17e)][U(0x181)];c['output']['metadata']||(c[U(0x1a1)][U(0x20e)]={}),this[U(0x1ed)]===stream_1[U(0x1e7)]['ERROR']&&(c[U(0x1a1)]['metadata'][U(0x1e5)]=JSON[U(0x20d)](this[U(0x18e)]));const d=(0x0,utils_1[U(0x202)])(new Date());c[U(0x1a1)][U(0x20e)]['ac']=d,c['output'][U(0x20e)]['au']=d,c[U(0x1a1)][U(0x20e)][U(0x195)]=this[U(0x17c)][U(0x1a4)],this[U(0x17c)][U(0x1f9)]&&(c[U(0x1a1)]['metadata'][U(0x183)]=this[U(0x17c)]['subtype']),c[U(0x1a1)]['metadata'][U(0x194)]=this[U(0x20e)][U(0x194)];}async[w(0x1fe)](c){const V=w,d=[...(await this[V(0x175)]())[V(0x1de)]||[],...this[V(0x1cd)]()];for(const f of d){const g=(0x0,utils_1[V(0x1b5)])(this[V(0x17e)],f);void 0x0!==g&&(c[f]=g);}for(const h in this[V(0x17e)]?.[V(0x18e)]??{})(h['startsWith']('-')||h[V(0x1f8)]('_'))&&(c[h]=this['context'][V(0x18e)][h]);telemetry_1[V(0x184)][V(0x173)](c,this[V(0x17c)],this[V(0x17e)]);}[w(0x1d3)](c){const W=w,d=[...this['config'][W(0x1ac)],...this[W(0x187)]()];for(const f of d){const g=this['metadata'][W(0x194)]+'/'+f,h=(0x0,utils_1[W(0x1b5)])(this['context'],g);void 0x0!==h&&(c[g]=h);}telemetry_1[W(0x184)]['bindActivityTelemetryToState'](c,this[W(0x17c)],this[W(0x20e)],this['context'],this[W(0x1d7)]);}['bindJobMetadataPaths'](){const X=w;return serializer_1[X(0x1af)][X(0x1cc)]['KEYS'][X(0x1d4)](c=>'metadata/'+c);}['bindActivityMetadataPaths'](){const Y=w,c=0x1===this[Y(0x1d7)]?Y(0x1c7):Y(0x1ae);return serializer_1[Y(0x1af)][c][Y(0x1d2)][Y(0x1d4)](d=>Y(0x18c)+d);}async[w(0x1e6)](){const Z=w,c=this[Z(0x17e)][Z(0x20e)][Z(0x1e1)],d='$'+this[Z(0x17c)][Z(0x199)],f={[d]:serializer_1['MDATA_SYMBOLS'][Z(0x16f)][Z(0x1d2)]['map'](m=>'metadata/'+m)};for(let [m,p]of Object[Z(0x1a9)](this[Z(0x17c)][Z(0x1b6)]))if(Z(0x17d)===m){for(const q of p)f[d][Z(0x206)](q);}else{'$self'===m&&(m=this['metadata'][Z(0x194)]),f[m]||(f[m]=[]);for(const u of p)f[m][Z(0x206)](m+'/'+u);}telemetry_1['TelemetryService'][Z(0x1b3)](f,this[Z(0x17c)],this[Z(0x20e)],this['leg']);const {dad:g,jid:h}=this[Z(0x17e)][Z(0x20e)],j=collator_1[Z(0x1ea)]['getDimensionsById']([...this['config'][Z(0x18f)],this[Z(0x20e)][Z(0x194)]],g||''),[k,l]=await this['store'][Z(0x1e6)](h,f,j);this[Z(0x17e)]=(0x0,utils_1[Z(0x1d9)])(k),this[Z(0x193)](this['context']?.[Z(0x20e)]?.[Z(0x1e1)],c),this[Z(0x201)](g),this[Z(0x200)](this[Z(0x17e)]),this['initPolicies'](this[Z(0x17e)]);}['assertGenerationalId'](c,d){const a0=w;if(d!==c)throw new errors_1[(a0(0x1a6))](c,d,this[a0(0x17e)]?.[a0(0x20e)]?.[a0(0x19a)]??'',this[a0(0x17e)]?.[a0(0x20e)]?.[a0(0x194)]??'',this[a0(0x17e)]?.[a0(0x20e)]?.[a0(0x1f6)]??'');}['initDimensionalAddress'](c){const a1=w;this[a1(0x20e)]['dad']=c;}[w(0x200)](c){const a2=w,d=this['metadata']['aid'];c[d]||(c[d]={});const f=c[d];return f[a2(0x1a1)]||(f[a2(0x1a1)]={}),f[a2(0x185)]||(f[a2(0x185)]={}),f[a2(0x1d5)]||(f[a2(0x1d5)]={}),f[a2(0x1a1)][a2(0x20e)]||(f[a2(0x1a1)][a2(0x20e)]={}),f[a2(0x1a1)][a2(0x20e)]['au']=(0x0,utils_1[a2(0x202)])(new Date()),c[a2(0x181)]=f,c[a2(0x17d)]=c,c;}['initPolicies'](c){const a3=w,d=pipe_1[a3(0x1c8)]['resolve'](this[a3(0x17c)][a3(0x17b)]??enums_1[a3(0x19e)],c);if(c[a3(0x20e)][a3(0x17b)]=d,null!=this[a3(0x17c)]['persistent']){const f=pipe_1[a3(0x1c8)]['resolve'](this[a3(0x17c)][a3(0x1b1)]??!0x1,c);c[a3(0x20e)][a3(0x1b1)]=f;}}['bindActivityData'](c){const a4=w;this[a4(0x17e)][this[a4(0x20e)][a4(0x194)]][c][a4(0x18e)]=this[a4(0x18e)];}[w(0x209)](){const a5=w;let c=this[a5(0x20e)][a5(0x1f6)];return this['adjacentIndex']>0x0&&(c=c[a5(0x1b7)](0x0,c['lastIndexOf'](','))+','+this[a5(0x1f4)]),c;}['resolveAdjacentDad'](){const a6=w;return''+this[a6(0x209)]()+collator_1[a6(0x1ea)][a6(0x1e8)](0x0);}async[w(0x182)](){const a7=w,c=[],d=(await this['store'][a7(0x191)](await this[a7(0x1b0)][a7(0x1bf)]()))['.'+this['metadata'][a7(0x194)]],f=this[a7(0x1a5)]();if(d)for(const g in d){const h=d[g];mapper_1[a7(0x20c)][a7(0x1da)](h,this['context'],this[a7(0x1c9)])&&c[a7(0x206)]({'metadata':{'guid':(0x0,utils_1[a7(0x1ec)])(),'jid':this[a7(0x17e)]['metadata'][a7(0x19a)],'gid':this[a7(0x17e)][a7(0x20e)][a7(0x1e1)],'dad':f,'aid':g,'spn':this[a7(0x17e)][a7(0x181)][a7(0x1a1)][a7(0x20e)]?.['l2s'],'trc':this[a7(0x17e)]['metadata'][a7(0x19d)]},'type':stream_1[a7(0x1e3)]['TRANSITION'],'data':{}});}return c;}['isJobComplete'](c){return c<=0x0;}[w(0x20f)](){const a8=w;return!!this[a8(0x17c)]['emit']&&!0x0===pipe_1['Pipe'][a8(0x197)](this[a8(0x17c)][a8(0x1f7)],this[a8(0x17e)]);}[w(0x171)](){const a9=w;return void 0x0!==this[a9(0x17c)][a9(0x1bb)]&&!0x0===pipe_1[a9(0x1c8)]['resolve'](this[a9(0x17c)][a9(0x1bb)],this[a9(0x17e)]);}async[w(0x177)](c,d){const aa=w;if(this[aa(0x17f)](d))return;let f=[];if((this[aa(0x20f)]()||this['isJobComplete'](d)||this[aa(0x171)]())&&await this[aa(0x1b0)][aa(0x180)](this[aa(0x17e)],{'emit':!this[aa(0x18a)](d)&&!this[aa(0x171)]()}),c['length']&&!this['isJobComplete'](d)){const g=this['store'][aa(0x1d1)]();for(const h of c)await this[aa(0x1b0)][aa(0x1cb)]?.[aa(0x1f2)](null,h,g);f=await g['exec']();}return f;}['jobWasInterrupted'](c){return c<-0x5f5e100;}}exports[w(0x1ee)]=Activity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-
|
|
1
|
+
'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-0x102;let h=e[f];return h;},b(c,d);}const l=b;(function(c,d){const k=b,e=c();while(!![]){try{const f=-parseInt(k(0x132))/0x1*(-parseInt(k(0x11a))/0x2)+parseInt(k(0x12e))/0x3+-parseInt(k(0x11e))/0x4*(-parseInt(k(0x127))/0x5)+parseInt(k(0x131))/0x6+parseInt(k(0x113))/0x7*(-parseInt(k(0x12f))/0x8)+parseInt(k(0x117))/0x9+-parseInt(k(0x119))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xd190d));Object[l(0x145)](exports,l(0x122),{'value':!0x0}),exports[l(0x144)]=void 0x0;const errors_1=require(l(0x135)),utils_1=require(l(0x130)),collator_1=require(l(0x139)),pipe_1=require(l(0x141)),telemetry_1=require(l(0x137)),stream_1=require(l(0x10b)),activity_1=require('./activity');class Await extends activity_1[l(0x110)]{constructor(c,d,f,g,h,j){super(c,d,f,g,h,j);}async[l(0x10a)](){const m=l;let c;this['logger'][m(0x10d)](m(0x128),{'jid':this[m(0x13f)][m(0x11f)]['jid'],'gid':this[m(0x13f)][m(0x11f)][m(0x13c)],'aid':this['metadata']['aid']});try{await this[m(0x142)](),c=new telemetry_1['TelemetryService'](this[m(0x106)]['appId'],this[m(0x11d)],this[m(0x11f)],this[m(0x13f)]),c[m(0x136)](this[m(0x138)]),this[m(0x129)]();const d=this['store'][m(0x13d)](),f=await this[m(0x12a)](d);await collator_1[m(0x133)][m(0x12b)](this,d),await this[m(0x108)](d),await this[m(0x124)](0x0,d);const g=await d['exec']();c[m(0x102)]();const h=this[m(0x123)](g);return c[m(0x13e)]({'app.activity.mid':f,'app.job.jss':h}),this['context']['metadata'][m(0x10f)];}catch(j){if(j instanceof errors_1['InactiveJobError'])return void this['logger'][m(0x120)](m(0x13a),{'error':j});if(j instanceof errors_1['GenerationalError'])return void this['logger'][m(0x11c)](m(0x114),{'error':j});if(j instanceof errors_1[m(0x13b)])return void this[m(0x11b)]['error'](m(0x12d),{'error':j});if(j instanceof errors_1['CollationError']){if(m(0x134)===j['fault'])return void this[m(0x11b)][m(0x11c)]('await-collation-overage',{'job_id':this['context'][m(0x11f)][m(0x10e)],'guid':this[m(0x13f)][m(0x11f)]['guid']});this[m(0x11b)][m(0x120)]('await-collation-error',{'error':j});}else this[m(0x11b)][m(0x120)](m(0x10c),{'error':j});throw c?.['setActivityError'](j[m(0x118)]),j;}finally{c?.[m(0x116)](),this[m(0x11b)][m(0x10d)](m(0x115),{'jid':this[m(0x13f)][m(0x11f)][m(0x10e)],'gid':this[m(0x13f)]['metadata']['gid'],'aid':this[m(0x11f)][m(0x10f)]});}}async[l(0x12a)](c){const n=l,d=pipe_1[n(0x105)][n(0x125)](this['config'][n(0x12c)],this[n(0x13f)]),f={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this[n(0x13f)][n(0x11f)][n(0x10e)],'gid':this['context'][n(0x11f)]['gid'],'dad':this[n(0x11f)]['dad'],'aid':this[n(0x11f)][n(0x10f)],'topic':d,'spn':this[n(0x13f)]['$self'][n(0x111)][n(0x11f)]?.[n(0x103)],'trc':this[n(0x13f)][n(0x11f)][n(0x143)]},'type':stream_1[n(0x104)][n(0x121)],'data':this[n(0x13f)][n(0x112)]};return!0x0!==this['config'][n(0x107)]&&(!0x1===pipe_1[n(0x105)]['resolve'](this[n(0x11d)][n(0x107)],this['context'])&&(f['metadata'][n(0x107)]=!0x1)),(this['config'][n(0x126)]&&(f[n(0x109)]={'retry':this['config'][n(0x126)]}),await this['engine']['router']?.[n(0x140)](null,f,c));}}exports[l(0x144)]=Await;function a(){const o=['transact','setActivityAttributes','context','publishMessage','../pipe','verifyEntry','trc','Await','defineProperty','mapActivityAttributes','l1s','StreamDataType','Pipe','engine','await','setState','policies','process','../../types/stream','await-process-error','debug','jid','aid','Activity','output','data','763RqIekz','process-event-generational-job-error','await-process-end','endActivitySpan','10099503wbhIEn','message','53694140mijAKx','3389872ccbPIo','logger','info','config','4CveqDH','metadata','error','AWAIT','__esModule','resolveStatus','setStatus','resolve','retry','8202740gMgwUG','await-process','mapInputData','execActivity','authorizeReentry','subtype','await-get-state-error','4627164NdKche','81280isDtAQ','../../modules/utils','8011176mxvVHX','1SblRHy','CollatorService','duplicate','../../modules/errors','startActivitySpan','../telemetry','leg','../collator','await-inactive-job-error','GetStateError','gid'];a=function(){return o;};return a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const l=b;(function(c,d){const k=b,e=c();while(!![]){try{const f=-parseInt(k(
|
|
1
|
+
'use strict';const l=b;(function(c,d){const k=b,e=c();while(!![]){try{const f=-parseInt(k(0x1ad))/0x1*(-parseInt(k(0x1d6))/0x2)+-parseInt(k(0x1c5))/0x3+-parseInt(k(0x1b9))/0x4+-parseInt(k(0x1c6))/0x5*(parseInt(k(0x1b4))/0x6)+parseInt(k(0x1a9))/0x7+parseInt(k(0x1c4))/0x8+parseInt(k(0x1ba))/0x9*(parseInt(k(0x1be))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xd288d));function b(c,d){const e=a();return b=function(f,g){f=f-0x1a2;let h=e[f];return h;},b(c,d);}Object['defineProperty'](exports,l(0x1a5),{'value':!0x0}),exports[l(0x1c3)]=void 0x0;const errors_1=require(l(0x1b8)),utils_1=require(l(0x1bd)),collator_1=require('../collator'),telemetry_1=require(l(0x1af)),activity_1=require('./activity');function a(){const o=['6681400fjKnBk','5410989EaPmkp','data','fault','../../modules/utils','30emtJsR','setStatus','logger','jid','setActivityError','Cycle','4507664gnTfPN','3893430maVHkb','3024465NxmPaM','store','GetStateError','process-event-generational-job-error','error','debug','cycle-process-error','transact','mapActivityAttributes','message','$self','l1s','mapInputData','process','cycle-get-state-error','engine','2435178MaAkcN','gid','trc','setActivityAttributes','output','cycle-inactive-job-error','config','__esModule','cycle-collation-error','publishMessage','ancestor','10189095GAQmLv','cycle-process','metadata','aid','1gJvhcC','duplicate','../telemetry','guid','exec','context','info','12PslmMy','resolveStatus','cycleAncestorActivity','Activity','../../modules/errors'];a=function(){return o;};return a();}class Cycle extends activity_1[l(0x1b7)]{constructor(c,d,f,g,h,j){super(c,d,f,g,h,j);}async[l(0x1d3)](){const m=l;let c;this['logger'][m(0x1cb)](m(0x1aa),{'jid':this['context'][m(0x1ab)]['jid'],'gid':this['context'][m(0x1ab)][m(0x1d7)],'aid':this[m(0x1ab)]['aid']});try{await this['verifyEntry'](),c=new telemetry_1['TelemetryService'](this[m(0x1d5)]['appId'],this[m(0x1a4)],this[m(0x1ab)],this['context']),c['startActivitySpan'](this['leg']),this[m(0x1d2)]();let d=this[m(0x1c7)][m(0x1cd)]();await this['setState'](d),await this[m(0x1bf)](0x0,d);const f=await d[m(0x1b1)]();c[m(0x1ce)]();const g=this[m(0x1b5)](f);d=this['store'][m(0x1cd)]();const h=await this['cycleAncestorActivity'](d);return c[m(0x1d9)]({'app.activity.mid':h,'app.job.jss':g}),await collator_1['CollatorService']['notarizeEarlyExit'](this,d),await d[m(0x1b1)](),this[m(0x1b2)]['metadata'][m(0x1ac)];}catch(j){if(j instanceof errors_1['InactiveJobError'])return void this[m(0x1c0)][m(0x1ca)](m(0x1a3),{'error':j});if(j instanceof errors_1['GenerationalError'])return void this[m(0x1c0)][m(0x1b3)](m(0x1c9),{'error':j});if(j instanceof errors_1[m(0x1c8)])return void this[m(0x1c0)]['error'](m(0x1d4),{'error':j});if(j instanceof errors_1['CollationError']){if(m(0x1ae)===j[m(0x1bc)])return void this['logger']['info']('cycle-collation-overage',{'job_id':this[m(0x1b2)][m(0x1ab)][m(0x1c1)],'guid':this['context'][m(0x1ab)][m(0x1b0)]});this[m(0x1c0)]['error'](m(0x1a6),{'error':j});}else this['logger'][m(0x1ca)](m(0x1cc),{'error':j});throw c?.[m(0x1c2)](j[m(0x1cf)]),j;}finally{c?.['endActivitySpan'](),this[m(0x1c0)][m(0x1cb)]('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this[m(0x1b2)][m(0x1ab)]['gid'],'aid':this['metadata'][m(0x1ac)]});}}async[l(0x1b6)](c){const n=l;this[n(0x1d2)]();const d={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this[n(0x1b2)]['metadata']['jid'],'gid':this['context'][n(0x1ab)][n(0x1d7)],'dad':collator_1['CollatorService']['resolveReentryDimension'](this),'aid':this[n(0x1a4)][n(0x1a8)],'spn':this[n(0x1b2)][n(0x1d0)][n(0x1a2)][n(0x1ab)]?.[n(0x1d1)],'trc':this['context']['metadata'][n(0x1d8)]},'data':this[n(0x1b2)][n(0x1bb)]};return await this[n(0x1d5)]['router']?.[n(0x1a7)](null,d,c);}}exports['Cycle']=Cycle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a(){const A=['
|
|
1
|
+
'use strict';const r=b;function a(){const A=['setActivityError','topic','doesHook','appId','store','9064FRjNSL','process-event-generational-job-error','36439bGAAYI','../../modules/errors','Hook','config','aid','processWebHookEvent','../telemetry','defineProperty','taskService','mapActivityAttributes','process','doPassThrough','hook-get-state-error','getHookRule','207663dQrEwu','11225247eDEmDU','transact','TelemetryService','processEvent','endActivitySpan','GenerationalError','duplicate','1066475IIlEwW','36PfXEor','hook-collation-error','InactiveJobError','SUCCESS','../../types/stream','./activity','getHookRules','setState','34ZXTHCq','doHook','error','metadata','expire','resolve','app.activity.mids','sleep','length','hook-inactive-job-error','adjacencyList','mapJobData','hook-process-error','setStatus','10112720SbpUAx','CollatorService','data','hook-process-end','verifyEntry','mapOutputData','info','processTimeHookEvent','CollationError','../collator','exec','gid','registerHook','StreamStatus','hook-collation-overage','hook-process-web-hook-event','engine','debug','setActivityAttributes','hook','registerTimeHook','jid','dad','transition','Pipe','deleteWebHookSignal','registerWebHook','Activity','GetStateError','processWebHookSignal','HMSH_IS_CLUSTER','5382LHjACY','context','resolveDad','logger','7OErved','1160970VvLFyy'];a=function(){return A;};return a();}(function(c,d){const q=b,e=c();while(!![]){try{const f=-parseInt(q(0x103))/0x1*(parseInt(q(0xc9))/0x2)+parseInt(q(0xb8))/0x3*(-parseInt(q(0xc1))/0x4)+parseInt(q(0xc0))/0x5+-parseInt(q(0xfb))/0x6*(-parseInt(q(0xfa))/0x7)+-parseInt(q(0x101))/0x8*(parseInt(q(0xf6))/0x9)+parseInt(q(0xd7))/0xa+parseInt(q(0xb9))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x7e999));Object[r(0xb1)](exports,'__esModule',{'value':!0x0}),exports[r(0x105)]=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require(r(0x104)),collator_1=require(r(0xe0)),pipe_1=require('../pipe'),task_1=require('../task'),telemetry_1=require(r(0xb0)),stream_1=require(r(0xc5)),activity_1=require(r(0xc6));function b(c,d){const e=a();return b=function(f,g){f=f-0xaf;let h=e[f];return h;},b(c,d);}class Hook extends activity_1[r(0xf2)]{constructor(c,d,f,g,h,j){super(c,d,f,g,h,j);}async[r(0xb4)](){const s=r;let c;this[s(0xf9)][s(0xe8)]('hook-process',{'jid':this[s(0xf7)][s(0xcc)][s(0xec)],'gid':this[s(0xf7)]['metadata'][s(0xe2)],'aid':this[s(0xcc)][s(0x107)]});try{return await this[s(0xdb)](),c=new telemetry_1[(s(0xbb))](this[s(0xe7)][s(0xff)],this['config'],this['metadata'],this[s(0xf7)]),c['startActivitySpan'](this['leg']),this['doesHook']()?await this[s(0xca)](c):await this[s(0xb5)](c),this[s(0xf7)][s(0xcc)]['aid'];}catch(d){if(d instanceof errors_1[s(0xc3)])return void this[s(0xf9)][s(0xcb)](s(0xd2),{'error':d});if(d instanceof errors_1[s(0xbe)])return void this[s(0xf9)][s(0xdd)](s(0x102),{'error':d});if(d instanceof errors_1[s(0xf3)])return void this[s(0xf9)][s(0xcb)](s(0xb6),{'error':d});if(d instanceof errors_1[s(0xdf)]){if(s(0xbf)===d['fault'])return void this[s(0xf9)][s(0xdd)](s(0xe5),{'job_id':this[s(0xf7)]['metadata'][s(0xec)],'guid':this[s(0xf7)][s(0xcc)]['guid']});this[s(0xf9)][s(0xcb)](s(0xc2),{'error':d});}else this[s(0xf9)][s(0xcb)](s(0xd5),{'error':d});throw c?.[s(0xfc)](d['message']),d;}finally{c?.[s(0xbd)](),this['logger']['debug'](s(0xda),{'jid':this[s(0xf7)][s(0xcc)][s(0xec)],'gid':this['context'][s(0xcc)][s(0xe2)],'aid':this['metadata']['aid']});}}[r(0xfe)](){const t=r;if(this[t(0x106)]['sleep']){const c=pipe_1[t(0xef)][t(0xce)](this[t(0x106)]['sleep'],this[t(0xf7)]);return!isNaN(c)&&Number(c)>0x0;}return!!this['config'][t(0xea)]?.[t(0xfd)];}async[r(0xca)](c){const u=r,d=this['store'][u(0xba)]();await this['registerHook'](enums_1[u(0xf5)]?void 0x0:d),this[u(0xdc)](),this[u(0xd4)](),await this[u(0xc8)](d),await collator_1[u(0xd8)]['authorizeReentry'](this,d),await this[u(0xd6)](0x0,d),await d[u(0xe1)](),c['mapActivityAttributes']();}async[r(0xb5)](c){const v=r,d=this[v(0x100)][v(0xba)]();let f;this['adjacencyList']=await this['filterAdjacent'](),this[v(0xdc)](),this[v(0xd4)](),await this[v(0xc8)](d),await collator_1[v(0xd8)]['notarizeEarlyCompletion'](this,d),await this[v(0xd6)](this[v(0xd3)][v(0xd1)]-0x1,d),f=await d[v(0xe1)](),c[v(0xb3)]();const g=this['resolveStatus'](f),h={'app.job.jss':g},j=await this[v(0xee)](this[v(0xd3)],g);j['length']&&(h[v(0xcf)]=j['join'](',')),c[v(0xe9)](h);}async[r(0xb7)](c){const w=r,d=await this['store'][w(0xc7)]();return d?.[c]?.[0x0];}async[r(0xe3)](c){const x=r;if(this['config'][x(0xea)]?.[x(0xfd)])return await this['engine'][x(0xb2)][x(0xf1)](this[x(0x106)]['hook']['topic'],this['context'],this[x(0xf8)](),this[x(0xf7)][x(0xcc)][x(0xcd)],c);if(this[x(0x106)][x(0xd0)]){const d=pipe_1['Pipe'][x(0xce)](this['config'][x(0xd0)],this[x(0xf7)]);return await this[x(0xe7)][x(0xb2)][x(0xeb)](this[x(0xf7)]['metadata']['jid'],this['context'][x(0xcc)][x(0xe2)],''+this[x(0xcc)]['aid']+(this[x(0xcc)][x(0xed)]||''),x(0xd0),d,this[x(0xcc)][x(0xed)]||''),this[x(0xf7)]['metadata'][x(0xec)];}}async[r(0xaf)](d=stream_1[r(0xe4)][r(0xc4)],f=0xc8){const y=r;this['logger'][y(0xe8)](y(0xe6),{'topic':this['config'][y(0xea)]['topic'],'aid':this[y(0xcc)][y(0x107)],'status':d,'code':f});const g=new task_1['TaskService'](this[y(0x100)],this[y(0xf9)]),h={...this[y(0xd9)]},j=await g[y(0xf4)](this[y(0x106)][y(0xea)][y(0xfd)],h);if(j){const [k,l,m,p]=j;this[y(0xf7)][y(0xcc)]['jid']=k,this[y(0xf7)][y(0xcc)]['gid']=p,this[y(0xf7)]['metadata']['dad']=m,await this['processEvent'](d,f,y(0xea)),0xc8===f&&await g[y(0xf0)](this[y(0x106)][y(0xea)][y(0xfd)],h);}}async[r(0xde)](c){const z=r;this['logger'][z(0xe8)]('hook-process-time-hook-event',{'jid':c,'gid':this[z(0xf7)]['metadata']['gid'],'aid':this[z(0xcc)][z(0x107)]}),await this[z(0xbc)](stream_1[z(0xe4)][z(0xc4)],0xc8,z(0xea));}}exports[r(0x105)]=Hook;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const i=b;
|
|
1
|
+
'use strict';const i=b;(function(c,d){const h=b,e=c();while(!![]){try{const f=-parseInt(h(0x1a3))/0x1*(-parseInt(h(0x19b))/0x2)+-parseInt(h(0x198))/0x3*(-parseInt(h(0x197))/0x4)+-parseInt(h(0x19c))/0x5*(-parseInt(h(0x1ab))/0x6)+-parseInt(h(0x1a0))/0x7+-parseInt(h(0x193))/0x8*(parseInt(h(0x19a))/0x9)+parseInt(h(0x1a9))/0xa+parseInt(h(0x19e))/0xb*(-parseInt(h(0x196))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x9a800));function b(c,d){const e=a();return b=function(f,g){f=f-0x191;let h=e[f];return h;},b(c,d);}Object[i(0x1a5)](exports,'__esModule',{'value':!0x0});const activity_1=require('./activity'),await_1=require(i(0x1a6)),cycle_1=require(i(0x195)),hook_1=require(i(0x191)),interrupt_1=require(i(0x1a2)),signal_1=require(i(0x1a4)),trigger_1=require(i(0x192)),worker_1=require('./worker');function a(){const j=['defineProperty','./await','Cycle','Trigger','1299420ClZlKH','Signal','6rDIRwf','./hook','./trigger','1425144lOSSLs','Interrupt','./cycle','84aUesUH','105244TupStL','87GYDveN','Activity','36CxgbVG','1510108YoUgih','3234295aMEkSx','Await','545963poorpW','Hook','4214273aVXYqD','default','./interrupt','1HJROYL','./signal'];a=function(){return j;};return a();}exports[i(0x1a1)]={'activity':activity_1[i(0x199)],'await':await_1[i(0x19d)],'cycle':cycle_1[i(0x1a7)],'hook':hook_1[i(0x19f)],'interrupt':interrupt_1[i(0x194)],'signal':signal_1[i(0x1aa)],'trigger':trigger_1[i(0x1a8)],'worker':worker_1['Worker']};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(
|
|
1
|
+
'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x193))/0x1+parseInt(l(0x1e1))/0x2+-parseInt(l(0x1d8))/0x3*(parseInt(l(0x1ab))/0x4)+parseInt(l(0x19a))/0x5*(-parseInt(l(0x1a9))/0x6)+-parseInt(l(0x1e4))/0x7+parseInt(l(0x1a2))/0x8+-parseInt(l(0x1ce))/0x9*(-parseInt(l(0x1b7))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x5b3c5));Object[m(0x1dd)](exports,m(0x1a3),{'value':!0x0}),exports['Interrupt']=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x193;let h=e[f];return h;},b(c,d);}function a(){const t=['adjacencyList','transition','notarizeEarlyCompletion','exec','topic','Pipe','duplicate','159130Pfhqre','setActivityError','throw','startActivitySpan','resolveStatus','endActivitySpan','info','engine','interrupt','context','../../modules/errors','transact','guid','../telemetry','expire','error','mapActivityAttributes','interrupt-inactive-job-error','interrupt-collation-error','gid','code','output','setStatus','567jltUyk','stack','store','logger','jid','reason','appId','isInterruptingSelf','job','target','6uEiNIV','length','Activity','descend','interrupt-process-end','defineProperty','config','interruptAnother','setState','662036aYlMEm','CollationError','../pipe','2739611QVCqjY','722576PzRvbC','TelemetryService','interruptSelf','interrupt-collation-overage','../collator','process','mapOutputData','5VQXccN','setActivityAttributes','aid','resolve','mapJobData','debug','interrupt-process-error','fault','2976608pzliay','__esModule','join','Interrupt','metadata','InactiveJobError','maps','519462JCihfX','./activity','262772TUrwKN','filterAdjacent','interrupt-get-state-error','GetStateError','GenerationalError'];a=function(){return t;};return a();}const errors_1=require(m(0x1c1)),collator_1=require(m(0x197)),pipe_1=require(m(0x1e3)),telemetry_1=require(m(0x1c4)),activity_1=require(m(0x1aa));class Interrupt extends activity_1[m(0x1da)]{constructor(c,d,f,g,h,j){super(c,d,f,g,h,j);}async[m(0x198)](){const n=m;let c;this[n(0x1d1)][n(0x19f)]('interrupt-process',{'jid':this['context'][n(0x1a6)][n(0x1d2)],'gid':this[n(0x1c0)][n(0x1a6)][n(0x1ca)],'aid':this[n(0x1a6)][n(0x19c)]});try{await this['verifyEntry'](),c=new telemetry_1[(n(0x194))](this[n(0x1be)][n(0x1d4)],this[n(0x1de)],this[n(0x1a6)],this[n(0x1c0)]),c[n(0x1ba)](this['leg']),this[n(0x1d5)]()?await this[n(0x195)](c):await this[n(0x1df)](c);}catch(d){if(d instanceof errors_1[n(0x1a7)])return void this[n(0x1d1)]['error'](n(0x1c8),{'error':d});if(d instanceof errors_1[n(0x1af)])return void this['logger'][n(0x1bd)]('process-event-generational-job-error',{'error':d});if(d instanceof errors_1[n(0x1ae)])return void this[n(0x1d1)]['error'](n(0x1ad),{'error':d});if(d instanceof errors_1[n(0x1e2)]){if(n(0x1b6)===d[n(0x1a1)])return void this['logger']['info'](n(0x196),{'job_id':this[n(0x1c0)][n(0x1a6)][n(0x1d2)],'guid':this[n(0x1c0)]['metadata'][n(0x1c3)]});this[n(0x1d1)][n(0x1c6)](n(0x1c9),{'error':d});}else this[n(0x1d1)][n(0x1c6)](n(0x1a0),{'error':d});throw c?.[n(0x1b8)](d['message']),d;}finally{c?.[n(0x1bc)](),this['logger']['debug'](n(0x1dc),{'jid':this[n(0x1c0)][n(0x1a6)]['jid'],'gid':this[n(0x1c0)][n(0x1a6)][n(0x1ca)],'aid':this[n(0x1a6)][n(0x19c)]});}}async[m(0x195)](c){const o=m;this[o(0x1de)][o(0x1d6)]?.[o(0x1a8)]&&(this[o(0x19e)](),await this[o(0x1e0)]());const d=await this[o(0x1bf)]();c[o(0x1c7)]();const f=this['store'][o(0x1c2)]();await collator_1['CollatorService'][o(0x1b2)](this,f),await this[o(0x1cd)](-0x1,f);const g=await f[o(0x1b3)](),h=this[o(0x1bb)](g);return c['setActivityAttributes']({'app.activity.mid':d,'app.job.jss':h}),this['context'][o(0x1a6)]['aid'];}async[m(0x1df)](c){const p=m,d={'app.activity.mid':await this['interrupt']()};if(c[p(0x1c7)](),this[p(0x1b0)]=await this[p(0x1ac)](),this[p(0x1de)]['job']?.['maps']||this['config'][p(0x1cc)]?.[p(0x1a8)]){this[p(0x199)](),this['mapJobData']();const k=this[p(0x1d0)]['transact']();await this['setState'](k);}const f=this['store'][p(0x1c2)]();await collator_1['CollatorService'][p(0x1b2)](this,f),await this[p(0x1cd)](this[p(0x1b0)][p(0x1d9)]-0x1,f);const g=await f['exec'](),h=this[p(0x1bb)](g);d['app.job.jss']=h;const j=await this[p(0x1b1)](this[p(0x1b0)],h);return j[p(0x1d9)]&&(d['app.activity.mids']=j[p(0x1a4)](',')),c[p(0x19b)](d),this[p(0x1c0)][p(0x1a6)]['aid'];}['isInterruptingSelf'](){const q=m;if(!this['config']['target'])return!0x0;return pipe_1[q(0x1b5)][q(0x19d)](this[q(0x1de)][q(0x1d7)],this[q(0x1c0)])==this[q(0x1c0)][q(0x1a6)][q(0x1d2)];}['resolveInterruptOptions'](){const r=m;return{'reason':void 0x0!==this[r(0x1de)][r(0x1d3)]?pipe_1['Pipe'][r(0x19d)](this[r(0x1de)][r(0x1d3)],this[r(0x1c0)]):void 0x0,'throw':void 0x0!==this[r(0x1de)]['throw']?pipe_1[r(0x1b5)][r(0x19d)](this[r(0x1de)][r(0x1b9)],this['context']):void 0x0,'descend':void 0x0!==this[r(0x1de)][r(0x1db)]?pipe_1[r(0x1b5)][r(0x19d)](this[r(0x1de)]['descend'],this[r(0x1c0)]):void 0x0,'code':void 0x0!==this[r(0x1de)][r(0x1cb)]?pipe_1[r(0x1b5)][r(0x19d)](this[r(0x1de)]['code'],this[r(0x1c0)]):void 0x0,'expire':void 0x0!==this[r(0x1de)][r(0x1c5)]?pipe_1[r(0x1b5)][r(0x19d)](this[r(0x1de)]['expire'],this[r(0x1c0)]):void 0x0,'stack':void 0x0!==this[r(0x1de)][r(0x1cf)]?pipe_1['Pipe'][r(0x19d)](this['config'][r(0x1cf)],this[r(0x1c0)]):void 0x0};}async[m(0x1bf)](){const s=m,c=this['resolveInterruptOptions']();return await this[s(0x1be)][s(0x1bf)](void 0x0!==this[s(0x1de)][s(0x1b4)]?pipe_1['Pipe'][s(0x19d)](this[s(0x1de)][s(0x1b4)],this[s(0x1c0)]):this['context'][s(0x1a6)]['tpc'],void 0x0!==this[s(0x1de)][s(0x1d7)]?pipe_1[s(0x1b5)][s(0x19d)](this[s(0x1de)][s(0x1d7)],this['context']):this[s(0x1c0)][s(0x1a6)][s(0x1d2)],c);}}exports[m(0x1a5)]=Interrupt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x10e))/0x1+-parseInt(l(0x12c))/0x2*(-parseInt(l(0x137))/0x3)+parseInt(l(0x10c))/0x4+-parseInt(l(0xf6))/0x5+-parseInt(l(0x133))/0x6*(-parseInt(l(0x120))/0x7)+parseInt(l(0xfb))/0x8+-parseInt(l(0x12d))/0x9*(-parseInt(l(0x142))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x54901));Object[m(0x102)](exports,m(0xf8),{'value':!0x0}),exports[m(0x13c)]=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0xf4;let h=e[f];return h;},b(c,d);}const errors_1=require(m(0x110)),collator_1=require('../collator'),mapper_1=require(m(0xf9)),pipe_1=require(m(0x136)),telemetry_1=require(m(0x104)),activity_1=require('./activity');class Signal extends activity_1[m(0x11c)]{constructor(c,d,f,g,h,j){super(c,d,f,g,h,j);}async[m(0x131)](){const n=m;let c;this[n(0x134)]['debug'](n(0x118),{'jid':this[n(0x111)][n(0x139)][n(0x11b)],'gid':this['context'][n(0x139)][n(0x11e)],'aid':this[n(0x139)]['aid']});try{await this[n(0x114)](),c=new telemetry_1[(n(0x10d))](this[n(0x100)][n(0x13b)],this[n(0x107)],this['metadata'],this[n(0x111)]),c[n(0xfa)](this[n(0x13a)]);const d=this[n(0x109)]['transact']();this['adjacencyList']=await this[n(0x138)](),this[n(0x140)](),this[n(0x128)](),await this[n(0xfe)](d),await collator_1[n(0x11f)]['notarizeEarlyCompletion'](this,d),await this[n(0x122)](this[n(0x103)][n(0x10b)]-0x1,d);const f=await d['exec']();n(0x12e)===this['config']['subtype']?await this[n(0x124)]():await this[n(0x108)]();const g=this['resolveStatus'](f),h={'app.job.jss':g},j=await this[n(0xfc)](this[n(0x103)],g);return j['length']&&(h[n(0x123)]=j[n(0x127)](',')),c[n(0x126)](),c['setActivityAttributes'](h),this['context'][n(0x139)][n(0x13d)];}catch(k){if(k instanceof errors_1[n(0xf5)])return void this[n(0x134)][n(0x129)](n(0x10a),{'error':k});if(k instanceof errors_1[n(0xf7)])return void this['logger'][n(0x11d)](n(0x132),{'error':k});if(k instanceof errors_1[n(0x125)])return void this[n(0x134)]['error']('signal-get-state-error',{'error':k});if(k instanceof errors_1['CollationError']){if(n(0x13e)===k[n(0x13f)])return void this['logger'][n(0x11d)](n(0x135),{'job_id':this[n(0x111)]['metadata'][n(0x11b)],'guid':this['context']['metadata'][n(0x10f)]});this[n(0x134)][n(0x129)](n(0x12a),{'error':k});}else this['logger'][n(0x129)](n(0x112),{'error':k});throw c?.['setActivityError'](k[n(0x113)]),k;}finally{c?.[n(0xff)](),this[n(0x134)][n(0x12f)](n(0x101),{'jid':this[n(0x111)]['metadata'][n(0x11b)],'gid':this[n(0x111)][n(0x139)][n(0x11e)],'aid':this['metadata']['aid']});}}[m(0xfd)](){const o=m;if(this[o(0x107)][o(0x106)]?.[o(0x117)])return new mapper_1[(o(0x105))](this[o(0x107)][o(0x106)][o(0x117)],this[o(0x111)])['mapRules']();}['mapResolverData'](){const p=m;if(this[p(0x107)][p(0xf4)]?.[p(0x117)])return new mapper_1[(p(0x105))](this[p(0x107)][p(0xf4)][p(0x117)],this[p(0x111)])['mapRules']();}async[m(0x108)](){const q=m,c=pipe_1['Pipe']['resolve'](this['config'][q(0x11a)],this[q(0x111)]),d=this[q(0xfd)](),f=pipe_1[q(0x130)][q(0x12b)](this[q(0x107)][q(0x119)],this[q(0x111)]),g=pipe_1[q(0x130)][q(0x12b)](this[q(0x107)]['code'],this[q(0x111)]);return await this[q(0x100)][q(0x121)](c,d,f,g);}async['hookAll'](){const r=m,c=this[r(0xfd)](),d=this['mapResolverData']();this['config'][r(0x115)]&&(d['scrub']=!0x0);const f=[pipe_1['Pipe']['resolve'](this[r(0x107)][r(0x116)],this['context'])+':'+pipe_1['Pipe'][r(0x12b)](this[r(0x107)][r(0x141)],this[r(0x111)])];return await this[r(0x100)][r(0x124)](this[r(0x107)]['topic'],c,d,f);}}function a(){const s=['aid','duplicate','fault','mapOutputData','key_value','3060fYIVKp','resolver','InactiveJobError','2799095fKXFuG','GenerationalError','__esModule','../mapper','startActivitySpan','2624960kJCvfO','transition','mapSignalData','setState','endActivitySpan','engine','signal-process-end','defineProperty','adjacencyList','../telemetry','MapperService','signal','config','hookOne','store','signal-inactive-job-error','length','678796JVRMEA','TelemetryService','512622obshLL','guid','../../modules/errors','context','signal-process-error','message','verifyEntry','scrub','key_name','maps','signal-process','status','topic','jid','Activity','info','gid','CollatorService','2243437HwPpnD','hook','setStatus','app.activity.mids','hookAll','GetStateError','mapActivityAttributes','join','mapJobData','error','signal-collation-error','resolve','4076EyjUJT','99iiInlK','all','debug','Pipe','process','process-event-generational-job-error','6Wiqjjm','logger','signal-collation-overage','../pipe','879aiCdmd','filterAdjacent','metadata','leg','appId','Signal'];a=function(){return s;};return a();}exports[m(0x13c)]=Signal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=parseInt(l(0xd4))/0x1*(parseInt(l(0x77))/0x2)+parseInt(l(0xd9))/0x3*(-parseInt(l(0xd0))/0x4)+-parseInt(l(0xac))/0x5*(parseInt(l(0x88))/0x6)+-parseInt(l(0xa2))/0x7*(-parseInt(l(0x74))/0x8)+parseInt(l(0x94))/0x9*(-parseInt(l(0xa8))/0xa)+-parseInt(l(0x95))/0xb*(-parseInt(l(0xb0))/0xc)+parseInt(l(0x9a))/0xd;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x9d868));Object[m(0x8a)](exports,m(0xd1),{'value':!0x0}),exports['Trigger']=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x6b;let h=e[f];return h;},b(c,d);}const errors_1=require(m(0x93)),utils_1=require(m(0xb2)),collator_1=require(m(0x78)),pipe_1=require(m(0x72)),reporter_1=require(m(0xa1)),serializer_1=require(m(0x6f)),telemetry_1=require(m(0x75)),activity_1=require(m(0x90));class Trigger extends activity_1[m(0xcf)]{constructor(c,d,f,g,h,j){super(c,d,f,g,h,j);}async[m(0x80)](c){const n=m;let d;this['logger'][n(0xb7)](n(0x9c),{'subscribes':this['config']['subscribes']});try{this[n(0x6b)](0x2),await this[n(0x84)](),d=new telemetry_1[(n(0x7e))](this[n(0xd6)]['appId'],this[n(0xb9)],this[n(0x76)],this[n(0xc2)]),d[n(0xae)](),d[n(0x73)](this['leg']),this[n(0xca)](),this['adjacencyList']=await this[n(0x96)]();const f=this[n(0xd3)](c,this[n(0x8f)]['length']);await this['setStateNX'](f),await this[n(0xb6)](f),this[n(0xbf)](c),this[n(0x83)](c);const g=this[n(0x92)][n(0x79)]();await this[n(0xaa)](g),await this[n(0x89)](g),c?.[n(0x97)]&&await this[n(0xa3)](c?.[n(0x97)],g),await collator_1[n(0x7a)][n(0xc6)](this,this[n(0xc2)]['metadata'][n(0x8c)],g),await g[n(0xc0)](),this[n(0x9f)](),d[n(0xc3)]();const h=Number(this[n(0xc2)][n(0x76)]['js']);d[n(0xc1)]({'app.job.jss':h});const j={'app.job.jss':h};return await this['transitionAndLogAdjacent'](c,h,j),d[n(0x8e)](j),this[n(0xc2)][n(0x76)]['jid'];}catch(k){if(d?.[n(0xda)](k[n(0x81)]),k instanceof errors_1['DuplicateJobError']){await(0x0,utils_1[n(0x9d)])(0x3e8);if(await collator_1[n(0x7a)][n(0xcc)](this,this[n(0xc2)]['metadata']['guid']))return void this[n(0xd8)][n(0xba)](n(0x6c),{'job_id':k['jobId'],'guid':this[n(0xc2)]['metadata']['guid']});this[n(0xd8)][n(0xc5)](n(0xa5),{'job_id':k['jobId'],'guid':this[n(0xc2)]['metadata'][n(0x8c)]});}else this[n(0xd8)][n(0xc5)](n(0xcb),{'error':k});throw k;}finally{d?.[n(0x82)](),d?.[n(0xd7)](),this[n(0xd8)][n(0xb7)]('trigger-process-end',{'subscribes':this[n(0xb9)][n(0x86)],'jid':this[n(0xc2)][n(0x76)][n(0xb4)],'gid':this['context'][n(0x76)][n(0xb5)]});}}async['transitionAndLogAdjacent'](c={},d,f){const o=m;if(isNaN(c['pending'])){const g=await this[o(0x87)](this[o(0x8f)],d);g['length']&&(f['app.activity.mids']=g[o(0xb8)](','));}}[m(0xd3)](c={},d){const p=m;return c[p(0x97)]?-0x1:d;}async[m(0xa3)](c,d){const q=m;await this['store'][q(0xbc)](this[q(0xc2)][q(0x76)][q(0xb4)],c,d);}['safeKey'](c){return'_'+c;}[m(0xbf)](c){const r=m;c?.[r(0x6d)]&&Object[r(0xab)](c['search'])[r(0xbe)](d=>{const s=r;this[s(0xc2)][s(0xbb)][this[s(0xc4)](d)]=c[s(0x6d)][d][s(0x7d)]();});}[m(0x83)](c){const t=m;c?.[t(0xa0)]&&Object[t(0xab)](c[t(0xa0)])[t(0xbe)](d=>{const u=t;d['startsWith']('-')&&(this[u(0xc2)][u(0xbb)][d]=c[u(0xa0)][d][u(0x7d)]());});}async['setStatus'](c){const v=m;this[v(0xc2)][v(0x76)]['js']=c;}async[m(0x9f)](){const w=m;if(this[w(0xc2)][w(0x76)]['px']){const c=(0x0,utils_1[w(0x6e)])(new Date()),d={'metadata':this['context'][w(0x76)],'data':{'job_id':this['context'][w(0x76)][w(0xb4)],'jc':c,'ju':c}};await this[w(0xd6)][w(0x9f)](this['context'],d);}}[m(0xdb)](){const x=m;return{[this[x(0x76)][x(0xaf)]]:{'input':{'data':this['data']}},'$self':{'input':{'data':this[x(0xbb)]},'output':{'data':this['data']}}};}async['getState'](){const y=m,c=this[y(0xdb)](),d=this[y(0x9e)](c),f=this[y(0xb1)](c),g=(0x0,utils_1[y(0x6e)])(new Date()),{id:h,version:j}=await this['engine'][y(0xa7)]();this[y(0xa6)](collator_1['CollatorService'][y(0xbd)]());const k={...this[y(0x76)],'jid':d,'key':f,'as':collator_1[y(0x7a)][y(0xa9)]()};this['context']={'metadata':{...this[y(0x76)],'gid':(0x0,utils_1[y(0x8c)])(),'ngn':this[y(0xc2)][y(0x76)][y(0x7c)],'pj':this[y(0xc2)][y(0x76)]['pj'],'pg':this[y(0xc2)]['metadata']['pg'],'pd':this[y(0xc2)]['metadata']['pd'],'pa':this['context'][y(0x76)]['pa'],'px':this[y(0xc2)][y(0x76)]['px'],'app':h,'vrs':j,'tpc':this[y(0xb9)][y(0x86)],'trc':this['context'][y(0x76)][y(0xc8)],'spn':this[y(0xc2)][y(0x76)][y(0x99)],'guid':this[y(0xc2)][y(0x76)][y(0x8c)],'jid':d,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':f,'jc':g,'ju':g,'ts':(0x0,utils_1[y(0x9b)])(this[y(0x85)]()),'js':0x0},'data':{},[this[y(0x76)][y(0xaf)]]:{'input':{'data':this['data'],'metadata':k},'output':{'data':this[y(0xbb)],'metadata':k},'settings':{'data':{}},'errors':{'data':{}}}},this[y(0xc2)][y(0xc7)]=this[y(0xc2)][this[y(0x76)][y(0xaf)]],this[y(0xc2)]['$job']=this[y(0xc2)];}['bindJobMetadataPaths'](){const z=m;return serializer_1['MDATA_SYMBOLS'][z(0x91)]['KEYS'][z(0x7f)](c=>'metadata/'+c);}['bindActivityMetadataPaths'](){const A=m;return serializer_1[A(0xd2)]['ACTIVITY']['KEYS'][A(0x7f)](c=>A(0x98)+c);}[m(0x85)](){const B=m;return this['config'][B(0xb3)]?.[B(0xce)]||reporter_1[B(0x8b)][B(0x70)];}[m(0x71)](){const C=m;return this['context'][C(0x76)]['js'];}['resolveJobId'](c){const D=m,d=this['config'][D(0xb3)]?.['id'];return d?pipe_1[D(0xd5)][D(0xcd)](d,c):(0x0,utils_1['guid'])();}[m(0xb1)](c){const E=m,d=this['config']['stats']?.[E(0xad)];return d?pipe_1[E(0xd5)]['resolve'](d,c):'';}async['setStateNX'](c){const F=m,d=this[F(0xc2)]['metadata'][F(0xb4)];if(!await this['store'][F(0xa4)](d,this['engine'][F(0xc9)],c))throw new errors_1[(F(0x8d))](d);}async['setStats'](c){const G=m,d=this[G(0xc2)]['metadata'];if(d[G(0xad)]&&this[G(0xb9)][G(0xb3)]?.[G(0x7b)]){const f=await this[G(0xd6)]['getVID'](),g=new reporter_1[(G(0x8b))](f,this[G(0x92)],this[G(0xd8)]);await this['store'][G(0x89)](d[G(0xad)],d[G(0xb4)],d['ts'],g['resolveTriggerStatistics'](this['config'],this['context']),f,c);}}}function a(){const H=['setState','keys','64810XNSlgW','key','startJobSpan','aid','1855752DuwOrm','resolveJobKey','../../modules/utils','stats','jid','gid','setStatus','debug','join','config','info','data','expireJob','getDimensionalSeed','forEach','bindSearchData','exec','setJobAttributes','context','mapActivityAttributes','safeKey','error','notarizeInception','$self','trc','appId','mapJobData','trigger-process-error','isInceptionOverage','resolve','granularity','Activity','14172SdGMIc','__esModule','MDATA_SYMBOLS','initStatus','269POoqvK','Pipe','engine','endActivitySpan','logger','906DMKFAt','setActivityError','createInputContext','setLeg','trigger-collation-overage','search','formatISODate','../serializer','DEFAULT_GRANULARITY','getJobStatus','../pipe','startActivitySpan','8bdEjke','../telemetry','metadata','4586WGWaVF','../collator','transact','CollatorService','measures','ngn','toString','TelemetryService','map','process','message','endJobSpan','bindMarkerData','getState','resolveGranularity','subscribes','transition','510cQaYPZ','setStats','defineProperty','ReporterService','guid','DuplicateJobError','setActivityAttributes','adjacencyList','./activity','JOB','store','../../modules/errors','9sHaNYq','33pYdCQz','filterAdjacent','pending','output/metadata/','spn','19860828RCSsAu','getTimeSeries','trigger-process','sleepFor','resolveJobId','execAdjacentParent','marker','../reporter','5526570nPSHee','setExpired','setStateNX','duplicate-job-error','initDimensionalAddress','getVID','5810410NUgkVA','getTriggerSeed'];a=function(){return H;};return a();}exports['Trigger']=Trigger;
|