@hotmeshio/hotmesh 0.3.28 → 0.3.29

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 (115) hide show
  1. package/build/modules/key.js +1 -1
  2. package/build/modules/utils.js +1 -1
  3. package/build/package.json +1 -1
  4. package/build/services/activities/activity.js +1 -1
  5. package/build/services/activities/await.js +1 -1
  6. package/build/services/activities/cycle.js +1 -1
  7. package/build/services/activities/hook.js +1 -1
  8. package/build/services/activities/index.js +1 -1
  9. package/build/services/activities/interrupt.js +1 -1
  10. package/build/services/activities/signal.js +1 -1
  11. package/build/services/activities/trigger.js +1 -1
  12. package/build/services/activities/worker.js +1 -1
  13. package/build/services/collator/index.js +1 -1
  14. package/build/services/compiler/deployer.js +1 -1
  15. package/build/services/compiler/index.js +1 -1
  16. package/build/services/compiler/validator.js +1 -1
  17. package/build/services/engine/index.js +1 -1
  18. package/build/services/exporter/index.js +1 -1
  19. package/build/services/hotmesh/index.js +3 -0
  20. package/build/services/mapper/index.js +1 -1
  21. package/build/services/meshdata/index.d.ts +10 -10
  22. package/build/services/meshflow/client.js +1 -0
  23. package/build/services/meshflow/exporter.js +1 -1
  24. package/build/services/meshflow/workflow/all.d.ts +1 -0
  25. package/build/services/meshflow/workflow/all.js +8 -0
  26. package/build/services/meshflow/workflow/common.d.ts +18 -0
  27. package/build/services/meshflow/workflow/common.js +45 -0
  28. package/build/services/meshflow/workflow/context.d.ts +2 -0
  29. package/build/services/meshflow/workflow/context.js +41 -0
  30. package/build/services/meshflow/workflow/didRun.d.ts +1 -0
  31. package/build/services/meshflow/workflow/didRun.js +16 -0
  32. package/build/services/meshflow/workflow/emit.d.ts +4 -0
  33. package/build/services/meshflow/workflow/emit.js +22 -0
  34. package/build/services/meshflow/workflow/enrich.d.ts +2 -0
  35. package/build/services/meshflow/workflow/enrich.js +10 -0
  36. package/build/services/meshflow/workflow/execChild.d.ts +4 -0
  37. package/build/services/meshflow/workflow/execChild.js +84 -0
  38. package/build/services/meshflow/workflow/hook.d.ts +2 -0
  39. package/build/services/meshflow/workflow/hook.js +33 -0
  40. package/build/services/meshflow/workflow/index.d.ts +39 -0
  41. package/build/services/meshflow/workflow/index.js +52 -0
  42. package/build/services/meshflow/workflow/interrupt.d.ts +2 -0
  43. package/build/services/meshflow/workflow/interrupt.js +17 -0
  44. package/build/services/meshflow/workflow/isSideEffectAllowed.d.ts +2 -0
  45. package/build/services/meshflow/workflow/isSideEffectAllowed.js +25 -0
  46. package/build/services/meshflow/workflow/proxyActivities.d.ts +6 -0
  47. package/build/services/meshflow/workflow/proxyActivities.js +82 -0
  48. package/build/services/meshflow/workflow/random.d.ts +1 -0
  49. package/build/services/meshflow/workflow/random.js +11 -0
  50. package/build/services/meshflow/workflow/searchMethods.d.ts +2 -0
  51. package/build/services/meshflow/workflow/searchMethods.js +21 -0
  52. package/build/services/meshflow/workflow/signal.d.ts +1 -0
  53. package/build/services/meshflow/workflow/signal.js +22 -0
  54. package/build/services/meshflow/workflow/sleepFor.d.ts +1 -0
  55. package/build/services/meshflow/workflow/sleepFor.js +28 -0
  56. package/build/services/meshflow/workflow/trace.d.ts +4 -0
  57. package/build/services/meshflow/workflow/trace.js +23 -0
  58. package/build/services/meshflow/workflow/waitFor.d.ts +1 -0
  59. package/build/services/meshflow/workflow/waitFor.js +28 -0
  60. package/build/services/meshos/index.d.ts +8 -5
  61. package/build/services/meshos/index.js +31 -10
  62. package/build/services/pipe/functions/array.js +1 -1
  63. package/build/services/pipe/functions/bitwise.js +1 -1
  64. package/build/services/pipe/functions/conditional.js +1 -1
  65. package/build/services/pipe/functions/cron.js +1 -1
  66. package/build/services/pipe/functions/date.js +1 -1
  67. package/build/services/pipe/functions/index.js +1 -1
  68. package/build/services/pipe/functions/json.js +1 -1
  69. package/build/services/pipe/functions/logical.js +1 -1
  70. package/build/services/pipe/functions/math.js +1 -1
  71. package/build/services/pipe/functions/number.js +1 -1
  72. package/build/services/pipe/functions/object.js +1 -1
  73. package/build/services/pipe/functions/string.js +1 -1
  74. package/build/services/pipe/functions/symbol.js +1 -1
  75. package/build/services/pipe/functions/unary.js +1 -1
  76. package/build/services/pipe/index.js +1 -1
  77. package/build/services/quorum/index.js +1 -1
  78. package/build/services/reporter/index.js +1 -1
  79. package/build/services/router/index.js +1 -1
  80. package/build/services/search/providers/postgres/postgres.js +1 -1
  81. package/build/services/search/providers/redis/ioredis.js +1 -1
  82. package/build/services/search/providers/redis/redis.js +1 -1
  83. package/build/services/serializer/index.js +1 -1
  84. package/build/services/store/providers/postgres/kvsql.js +1 -1
  85. package/build/services/store/providers/postgres/kvtables.js +1 -1
  86. package/build/services/store/providers/postgres/kvtransaction.js +1 -1
  87. package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
  88. package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
  89. package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
  90. package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
  91. package/build/services/store/providers/postgres/postgres.js +1 -1
  92. package/build/services/store/providers/redis/_base.js +1 -1
  93. package/build/services/store/providers/redis/ioredis.js +1 -1
  94. package/build/services/store/providers/redis/redis.js +1 -1
  95. package/build/services/store/providers/store-initializable.js +1 -1
  96. package/build/services/stream/providers/nats/nats.js +1 -1
  97. package/build/services/stream/providers/postgres/kvtables.js +1 -1
  98. package/build/services/stream/providers/postgres/postgres.js +1 -1
  99. package/build/services/stream/providers/redis/ioredis.js +1 -1
  100. package/build/services/stream/providers/redis/redis.js +1 -1
  101. package/build/services/stream/providers/stream-initializable.js +1 -1
  102. package/build/services/sub/providers/nats/nats.js +1 -1
  103. package/build/services/sub/providers/postgres/postgres.js +1 -1
  104. package/build/services/sub/providers/redis/ioredis.js +1 -1
  105. package/build/services/sub/providers/redis/redis.js +1 -1
  106. package/build/services/task/index.js +1 -1
  107. package/build/services/telemetry/index.js +1 -1
  108. package/build/services/worker/index.js +1 -1
  109. package/build/types/manifest.d.ts +2 -0
  110. package/build/types/provider.d.ts +2 -0
  111. package/package.json +1 -1
  112. package/types/manifest.ts +12 -2
  113. package/types/provider.ts +14 -0
  114. package/build/services/meshflow/workflow.d.ts +0 -35
  115. package/build/services/meshflow/workflow.js +0 -403
@@ -1 +1 @@
1
- 'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x210))/0x1+-parseInt(l(0x20c))/0x2*(-parseInt(l(0x21a))/0x3)+-parseInt(l(0x1f8))/0x4+parseInt(l(0x214))/0x5*(-parseInt(l(0x213))/0x6)+-parseInt(l(0x215))/0x7+-parseInt(l(0x216))/0x8+parseInt(l(0x21c))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xe2ceb));function b(c,d){const e=a();return b=function(f,g){f=f-0x1f0;let h=e[f];return h;},b(c,d);}Object['defineProperty'](exports,m(0x1f5),{'value':!![]}),exports[m(0x21f)]=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require(m(0x207));function a(){const N=['__esModule','aid','collate','5167636ZTWgvt','push','notarizeContinuation','store','DUPLICATE','cycle','collator-trigger-activity-not-found','exec','888000001000001','INACTIVE','lastIndexOf','authorizeReentry','notarizeReentry','enter','verifyInteger','../../types/collator','getSeed','indexOf','ancestors','substring','1198HrXCJN','getDimensionalSeed','getTriggerSeed','isDuplicate','1099902nTOxmN','metadata','type','5788326acDdPU','5AHSqYp','9448705gUZFem','6198632kCCgLV','notarizeInception','isPrimed','context','4167eEdrNC','INVALID','50203512xLouUs','config','MISSING','CollatorService','isArray','toString','compile','FORBIDDEN','find','CollationError','targetLength','jid','isInactive','notarizeEarlyExit','length','ancestor','getDimensionsById','999000000000000','forEach','trigger','assertJobActive','keys','InactiveJobError','CollationFaultType','verifySyntheticInteger','dad','isInceptionOverage','bindAncestorArray','collateSynthetic','activities','transitions','getDimensionalAddress','exit','getDigitAtIndex','notarizeCompletion','reverse'];a=function(){return N;};return a();}class CollatorService{static[m(0x230)](c,d,e,f=0x0){const n=m;if(c<=f)throw new errors_1[(n(0x232))](d,c,e);}static['getDimensionalAddress'](c,d=![]){const o=m;let e=c[o(0x219)][o(0x211)][o(0x235)]||c[o(0x211)]['dad'];return d&&e&&c['leg']===0x2&&(e=e[o(0x20b)](0x0,e['lastIndexOf'](','))+',0'),CollatorService[o(0x22c)]([...c[o(0x21d)]['ancestors'],c[o(0x211)][o(0x1f6)]],e);}static['resolveReentryDimension'](c){const p=m,d=c[p(0x21d)][p(0x22b)],e=c['config'][p(0x20a)],f=e[p(0x209)](d),g=c[p(0x211)]['dad']['split'](',');return g['length']=f+0x1,g[p(0x1f9)]('0'),g['join'](',');}static async['notarizeEntry'](c,d){const q=m,e=await c['store'][q(0x1f7)](c['context'][q(0x211)][q(0x227)],c['metadata'][q(0x1f6)],-0x5af3107a4000,this['getDimensionalAddress'](c),d);return this[q(0x206)](e,0x1,'enter'),e;}static async[m(0x203)](c,d){const r=m,e=await c[r(0x1fb)][r(0x1f7)](c['context'][r(0x211)][r(0x227)],c['metadata'][r(0x1f6)],-0x9184e72a000,this[r(0x1f0)](c),d);return e;}static async[m(0x229)](c,d){const s=m;return await c[s(0x1fb)][s(0x1f7)](c[s(0x219)][s(0x211)][s(0x227)],c[s(0x211)][s(0x1f6)],-0xa012317b000,this['getDimensionalAddress'](c),d);}static async['notarizeEarlyCompletion'](c,d){const t=m,e=c[t(0x21d)][t(0x1fd)]?0x9184e72a000:0xa012317b000;return await c[t(0x1fb)][t(0x1f7)](c[t(0x219)][t(0x211)][t(0x227)],c['metadata'][t(0x1f6)],0xf4241-e,this[t(0x1f0)](c),d);}static async[m(0x217)](c,d,e){const u=m;d&&await c[u(0x1fb)][u(0x238)](c[u(0x219)][u(0x211)][u(0x227)],d,0xf4240,e);}static async[m(0x236)](c,d){const v=m;if(d){const e=await c[v(0x1fb)][v(0x238)](c['context'][v(0x211)][v(0x227)],d,0xf4240);return e>0xf4240;}return![];}static async[m(0x204)](c,d,e){const w=m,f=c[w(0x219)][w(0x211)][w(0x227)],g=e||c[w(0x1fb)]['transact']();await c['store'][w(0x1f7)](f,c[w(0x211)][w(0x1f6)],0xf4240,this[w(0x1f0)](c,!![]),g),await c[w(0x1fb)]['collateSynthetic'](f,d,0xf4240,g);const [h,i]=await g[w(0x1ff)](),j=Array[w(0x220)](h)?h[0x1]:h,k=Array[w(0x220)](i)?i[0x1]:i;return this[w(0x206)](j,0x2,w(0x205)),this['verifySyntheticInteger'](k),j;}static async[m(0x1fa)](c,d){const x=m;return await c['store'][x(0x1f7)](c['context'][x(0x211)]['jid'],c[x(0x211)][x(0x1f6)],0x1,this[x(0x1f0)](c),d);}static async[m(0x1f3)](c,d){const y=m,e=c[y(0x21d)][y(0x1fd)]?0x0:0xe8d4a51000;return await c[y(0x1fb)][y(0x1f7)](c[y(0x219)]['metadata'][y(0x227)],c[y(0x211)]['aid'],0x1-e,this['getDimensionalAddress'](c),d);}static[m(0x1f2)](c,d){const z=m,e=c[z(0x221)]();if(d<0x0||d>=e['length'])return null;const f=parseInt(e[d],0xa);return f;}static['getDimensionalIndex'](c){const A=m,d=c['toString']();if(d[A(0x22a)]<0x9)return null;const e=d[A(0x20b)](0x3,0x9),f=parseInt(e,0xa);return f-0x1;}static[m(0x20f)](c,d){const B=m;return this[B(0x1f2)](c,d)<0x8;}static[m(0x228)](c){const C=m;return this[C(0x1f2)](c,0x2)<0x9;}static[m(0x218)](c,d){const D=m;return d==0x1?c!=-0x5af3107a4000:this[D(0x1f2)](c,0x0)<0x9&&this[D(0x1f2)](c,0x1)<0x9;}static[m(0x234)](c){const E=m,d=c[E(0x221)](),e=parseInt(d[d[E(0x22a)]-0x1],0xa);if(e>0x0)throw new errors_1['CollationError'](c,0x2,E(0x205),collator_1[E(0x233)][E(0x201)]);else{if(c>=0x1e8480)throw new errors_1[(E(0x225))](c,0x2,E(0x205),collator_1[E(0x233)][E(0x1fc)]);}}static[m(0x206)](c,d,e){const F=m;let f;if(d===0x1&&e==='enter'){if(!this['isPrimed'](c,0x1))f=collator_1[F(0x233)][F(0x21e)];else{if(this[F(0x20f)](c,0x0))f=collator_1[F(0x233)][F(0x1fc)];else c!=0x331a2bfa73000&&(f=collator_1[F(0x233)][F(0x21b)]);}}else{if(d===0x1&&e===F(0x1f1)){if(c===-0x9184e72a000)f=collator_1['CollationFaultType']['MISSING'];else this['isDuplicate'](c,0x1)&&(f=collator_1[F(0x233)][F(0x1fc)]);}else{if(d===0x2&&e===F(0x205)){if(!this[F(0x218)](c,0x2))f=collator_1[F(0x233)][F(0x223)];else this['isInactive'](c)&&(f=collator_1['CollationFaultType'][F(0x201)]);}}}if(f)throw new errors_1[(F(0x225))](c,d,e,f);}static[m(0x22c)](c,d){const G=m,e={'$ADJACENT':d+',0'};let f=d;return c[G(0x1f4)]()['forEach'](g=>{const H=G;e[g]=f,f=f[H(0x20b)](0x0,f[H(0x202)](','));}),e;}static[m(0x208)](){const I=m;return I(0x22d);}static[m(0x20e)](){const J=m;return J(0x200);}static[m(0x222)](c){CollatorService['bindAncestorArray'](c);}static[m(0x237)](c){const K=m;c[K(0x22e)](d=>{const L=K,e={},f=Object[L(0x231)](d[L(0x239)])[L(0x224)](h=>d[L(0x239)][h][L(0x212)]===L(0x22f));if(!f)throw new Error(L(0x1fe));const g=(h,i)=>{const M=L;e[h]=i,d['activities'][h][M(0x20a)]=i;const j=d[M(0x23a)]?.[h]||[];j[M(0x22e)](k=>{g(k['to'],[...i,h]);});};g(f,[]);});}static[m(0x20d)](c=0x0){return','+c;}}exports['CollatorService']=CollatorService,CollatorService[m(0x226)]=0xf;
1
+ 'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x1de))/0x1*(parseInt(l(0x1c8))/0x2)+-parseInt(l(0x1b7))/0x3+-parseInt(l(0x1b5))/0x4*(-parseInt(l(0x1bd))/0x5)+parseInt(l(0x1bb))/0x6*(parseInt(l(0x1cd))/0x7)+parseInt(l(0x1c6))/0x8+-parseInt(l(0x1ab))/0x9*(-parseInt(l(0x1e1))/0xa)+-parseInt(l(0x1d3))/0xb*(parseInt(l(0x1df))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xedad1));Object[m(0x19e)](exports,'__esModule',{'value':!![]}),exports['CollatorService']=void 0x0;const errors_1=require(m(0x1aa)),collator_1=require(m(0x1b0));class CollatorService{static[m(0x1d5)](c,d,e,f=0x0){const n=m;if(c<=f)throw new errors_1[(n(0x1cb))](d,c,e);}static[m(0x1c3)](c,d=![]){const o=m;let e=c[o(0x1b3)][o(0x1a1)][o(0x1a7)]||c[o(0x1a1)][o(0x1a7)];return d&&e&&c[o(0x19f)]===0x2&&(e=e['substring'](0x0,e['lastIndexOf'](','))+',0'),CollatorService['getDimensionsById']([...c[o(0x199)][o(0x1dd)],c[o(0x1a1)]['aid']],e);}static[m(0x1b2)](c){const p=m,d=c['config']['ancestor'],e=c[p(0x199)][p(0x1dd)],f=e[p(0x1c7)](d),g=c[p(0x1a1)][p(0x1a7)][p(0x1a5)](',');return g[p(0x1cc)]=f+0x1,g[p(0x1db)]('0'),g[p(0x1af)](',');}static async[m(0x1c2)](c,d){const q=m,e=await c['store']['collate'](c[q(0x1b3)][q(0x1a1)]['jid'],c[q(0x1a1)]['aid'],-0x5af3107a4000,this[q(0x1c3)](c),d);return this['verifyInteger'](e,0x1,q(0x19d)),e;}static async[m(0x1d8)](c,d){const r=m,e=await c[r(0x1a4)]['collate'](c[r(0x1b3)][r(0x1a1)]['jid'],c[r(0x1a1)][r(0x1da)],-0x9184e72a000,this['getDimensionalAddress'](c),d);return e;}static async[m(0x1d1)](c,d){const s=m;return await c[s(0x1a4)][s(0x1a2)](c['context']['metadata'][s(0x1a9)],c[s(0x1a1)][s(0x1da)],-0xa012317b000,this['getDimensionalAddress'](c),d);}static async[m(0x1a0)](c,d){const t=m,e=c[t(0x199)][t(0x1c0)]?0x9184e72a000:0xa012317b000;return await c[t(0x1a4)][t(0x1a2)](c[t(0x1b3)][t(0x1a1)][t(0x1a9)],c['metadata'][t(0x1da)],0xf4241-e,this[t(0x1c3)](c),d);}static async[m(0x1c5)](c,d,e){const u=m;d&&await c['store']['collateSynthetic'](c[u(0x1b3)][u(0x1a1)]['jid'],d,0xf4240,e);}static async[m(0x19a)](c,d){const v=m;if(d){const e=await c['store'][v(0x1bc)](c[v(0x1b3)][v(0x1a1)]['jid'],d,0xf4240);return e>0xf4240;}return![];}static async['notarizeReentry'](c,d,e){const w=m,f=c[w(0x1b3)]['metadata'][w(0x1a9)],g=e||c[w(0x1a4)][w(0x19c)]();await c['store'][w(0x1a2)](f,c[w(0x1a1)][w(0x1da)],0xf4240,this['getDimensionalAddress'](c,!![]),g),await c[w(0x1a4)][w(0x1bc)](f,d,0xf4240,g);const [h,i]=await g['exec'](),j=Array['isArray'](h)?h[0x1]:h,k=Array[w(0x1ce)](i)?i[0x1]:i;return this[w(0x19b)](j,0x2,'enter'),this[w(0x1ac)](k),j;}static async['notarizeContinuation'](c,d){const x=m;return await c[x(0x1a4)]['collate'](c[x(0x1b3)]['metadata'][x(0x1a9)],c[x(0x1a1)][x(0x1da)],0x1,this[x(0x1c3)](c),d);}static async[m(0x1d7)](c,d){const y=m,e=c[y(0x199)][y(0x1c0)]?0x0:0xe8d4a51000;return await c[y(0x1a4)]['collate'](c[y(0x1b3)]['metadata']['jid'],c['metadata'][y(0x1da)],0x1-e,this[y(0x1c3)](c),d);}static[m(0x1a3)](c,d){const z=m,e=c[z(0x1cf)]();if(d<0x0||d>=e[z(0x1cc)])return null;const f=parseInt(e[d],0xa);return f;}static[m(0x1ba)](c){const A=m,d=c[A(0x1cf)]();if(d[A(0x1cc)]<0x9)return null;const e=d['substring'](0x3,0x9),f=parseInt(e,0xa);return f-0x1;}static[m(0x1d9)](c,d){const B=m;return this[B(0x1a3)](c,d)<0x8;}static[m(0x1ca)](c){const C=m;return this[C(0x1a3)](c,0x2)<0x9;}static[m(0x1bf)](c,d){return d==0x1?c!=-0x5af3107a4000:this['getDigitAtIndex'](c,0x0)<0x9&&this['getDigitAtIndex'](c,0x1)<0x9;}static[m(0x1ac)](c){const D=m,d=c['toString'](),e=parseInt(d[d[D(0x1cc)]-0x1],0xa);if(e>0x0)throw new errors_1['CollationError'](c,0x2,D(0x19d),collator_1['CollationFaultType'][D(0x1e0)]);else{if(c>=0x1e8480)throw new errors_1[(D(0x1e4))](c,0x2,D(0x19d),collator_1[D(0x1b6)][D(0x1b4)]);}}static[m(0x19b)](c,d,e){const E=m;let f;if(d===0x1&&e==='enter'){if(!this[E(0x1bf)](c,0x1))f=collator_1[E(0x1b6)][E(0x1a8)];else{if(this[E(0x1d9)](c,0x0))f=collator_1[E(0x1b6)]['DUPLICATE'];else c!=0x331a2bfa73000&&(f=collator_1['CollationFaultType'][E(0x1d0)]);}}else{if(d===0x1&&e===E(0x1ad)){if(c===-0x9184e72a000)f=collator_1['CollationFaultType'][E(0x1a8)];else this[E(0x1d9)](c,0x1)&&(f=collator_1['CollationFaultType'][E(0x1b4)]);}else{if(d===0x2&&e===E(0x19d)){if(!this[E(0x1bf)](c,0x2))f=collator_1['CollationFaultType'][E(0x1b8)];else this['isInactive'](c)&&(f=collator_1[E(0x1b6)][E(0x1e0)]);}}}if(f)throw new errors_1[(E(0x1e4))](c,d,e,f);}static['getDimensionsById'](c,d){const e={'$ADJACENT':d+',0'};let f=d;return c['reverse']()['forEach'](g=>{const F=b;e[g]=f,f=f[F(0x1d4)](0x0,f['lastIndexOf'](','));}),e;}static[m(0x1b9)](){const G=m;return G(0x1d2);}static[m(0x1c4)](){const H=m;return H(0x1c1);}static['compile'](c){CollatorService['bindAncestorArray'](c);}static[m(0x1dc)](c){const I=m;c[I(0x1be)](d=>{const J=I,e={},f=Object['keys'](d['activities'])[J(0x1e3)](h=>d[J(0x1c9)][h][J(0x1e2)]==='trigger');if(!f)throw new Error(J(0x1a6));const g=(h,i)=>{const K=J;e[h]=i,d[K(0x1c9)][h]['ancestors']=i;const j=d[K(0x1ae)]?.[h]||[];j[K(0x1be)](k=>{g(k['to'],[...i,h]);});};g(f,[]);});}static[m(0x1e5)](c=0x0){return','+c;}}exports[m(0x1d6)]=CollatorService,CollatorService[m(0x1b1)]=0xf;function b(c,d){const e=a();return b=function(f,g){f=f-0x199;let h=e[f];return h;},b(c,d);}function a(){const L=['bindAncestorArray','ancestors','94053gFYlHB','36PxKXSl','INACTIVE','40wJmyxL','type','find','CollationError','getDimensionalSeed','config','isInceptionOverage','verifyInteger','transact','enter','defineProperty','leg','notarizeEarlyCompletion','metadata','collate','getDigitAtIndex','store','split','collator-trigger-activity-not-found','dad','MISSING','jid','../../modules/errors','2155536lqmtXL','verifySyntheticInteger','exit','transitions','join','../../types/collator','targetLength','resolveReentryDimension','context','DUPLICATE','1056ssuGib','CollationFaultType','2144334hYdsLE','FORBIDDEN','getSeed','getDimensionalIndex','2630910kUiAyz','collateSynthetic','135RsQkSS','forEach','isPrimed','cycle','888000001000001','notarizeEntry','getDimensionalAddress','getTriggerSeed','notarizeInception','9649032gytpNQ','indexOf','12zyWHmz','activities','isInactive','InactiveJobError','length','7sOisAM','isArray','toString','INVALID','notarizeEarlyExit','999000000000000','1309517JknuTJ','substring','assertJobActive','CollatorService','notarizeCompletion','authorizeReentry','isDuplicate','aid','push'];a=function(){return L;};return a();}
@@ -1 +1 @@
1
- 'use strict';const u=b;(function(c,d){const t=b,e=c();while(!![]){try{const f=-parseInt(t(0x1f8))/0x1+-parseInt(t(0x1ed))/0x2*(-parseInt(t(0x206))/0x3)+parseInt(t(0x1ef))/0x4+-parseInt(t(0x21b))/0x5+-parseInt(t(0x207))/0x6+-parseInt(t(0x20d))/0x7+parseInt(t(0x1e7))/0x8;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xd476b));function b(c,d){const e=a();return b=function(f,g){f=f-0x1c7;let h=e[f];return h;},b(c,d);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[u(0x1e2)]=void 0x0;function a(){const X=['WORKER','SerializerService','hook/data','transitions','addSymbols','graphs','includes','from','parent','data','subtype','deployTransitions','deployHookPatterns','output','worker','isArray','object','setHookRules','deployActivitySchemas','ACTIVITY','Deployer','expire','join','setTransitions','store','15677840Bvdnjt','../../modules/key','push','keys','values','concat','1002kTGGeX','job','645032VFoBTK','string','activity','bindSelf','resolve','setSchemas','trigger','type','data/','367576ZMrSrx','convertActivitiesToHooks','traverse','CollatorService','reserveSymbolRange','bindParents','$self','activities','Symbol\x20index\x20out\x20of\x20bounds','entries','split','add','generateSymVals','setSubscriptions','7026ZKCikE','4638948GqYySm','info','resolveMappableValue','resolveJobMapsPaths','input','hooks','1086281rIGSar','groupMappingRules','copyJobSchemas','KeyType','consumes','bindCycleTarget','publishes','$job','generateSymKeys','topic','subscribes','./validator','findTrigger','default','5640810QxphUM','deploy','hook','CONTEXT_VARS','bindSymbols','Validator','deploySubscriptions','ENGINE','pow','length','schema','examples','../serializer','convertTopicsToTypes','enum','startsWith','app','bindBackRefs','../../modules/utils','input/data','manifest','resolveMappingDependencies','mintKey','produces','cycle','await','PRODUCES','match','getVID','output/data','stream','JOB','createConsumerGroup','conditions','collectValues','getSymbolValues','logger','deployConsumerGroups','deployConsumerGroup','output/metadata'];a=function(){return X;};return a();}const key_1=require(u(0x1e8)),utils_1=require(u(0x22d)),collator_1=require('../collator'),serializer_1=require(u(0x227)),pipe_1=require('../pipe'),validator_1=require(u(0x218)),DEFAULT_METADATA_RANGE_SIZE=0x1a,DEFAULT_DATA_RANGE_SIZE=0x104,DEFAULT_RANGE_SIZE=DEFAULT_METADATA_RANGE_SIZE+DEFAULT_DATA_RANGE_SIZE;class Deployer{constructor(c){const v=u;this['manifest']=null,this[v(0x22f)]=c;}async[u(0x21c)](c,d){const w=u;this[w(0x1e6)]=c,this[w(0x239)]=d,collator_1[w(0x1fb)]['compile'](this[w(0x22f)][w(0x22b)][w(0x1d3)]),this[w(0x1f9)](),this[w(0x228)](),this[w(0x20f)](),this[w(0x22c)](),this['bindParents'](),this['bindCycleTarget'](),this[w(0x230)](),this['resolveJobMapsPaths'](),await this[w(0x215)](),await this['generateSymVals'](),await this[w(0x1da)](),await this[w(0x1e0)](),await this[w(0x221)](),await this[w(0x1d9)](),await this[w(0x1cb)]();}[u(0x237)](){const x=u;return{'id':this['manifest'][x(0x22b)]['id'],'version':this[x(0x22f)][x(0x22b)]['version']};}async[u(0x215)](){const y=u;for(const c of this[y(0x22f)]['app'][y(0x1d3)]){const [,d]=this['findTrigger'](c),e=d['subscribes'],[f,g,h]=await this[y(0x1e6)][y(0x1fc)]('$'+e,DEFAULT_RANGE_SIZE,y(0x23a)),i='',j=this[y(0x21f)](f,g,h,i,d['PRODUCES']);Object['keys'](j)[y(0x224)]&&await this[y(0x1e6)][y(0x1d2)]('$'+e,j);for(const [k,l]of Object[y(0x201)](c[y(0x1ff)])){const [m,n,o]=await this[y(0x1e6)][y(0x1fc)](k,DEFAULT_RANGE_SIZE,y(0x1e1)),p=k+'/';this[y(0x1f2)](l[y(0x211)],l[y(0x232)],k);const q=this[y(0x21f)](m,n,o,p,l[y(0x232)]);Object[y(0x1ea)](q)['length']&&await this[y(0x1e6)]['addSymbols'](k,q);}}}[u(0x1f2)](c,d,e){const z=u;for(const f of[e,z(0x1fe)]){const g=c[f];if(g)for(const h of g){!d[z(0x1d4)](h)&&d['push'](h);}}}[u(0x21f)](c,d,e,f,g){const A=u,h={},i={...e};for(const j of g){const k=''+f+j;if(!i[k]){if(c>d)throw new Error(A(0x200));const l=(0x0,utils_1['getSymKey'])(c);c++,h[k]=l,i[k]=l;}}return h;}[u(0x20f)](){const B=u,c=this['manifest'][B(0x22b)][B(0x1d3)];for(const d of c){const e=d[B(0x1db)]?.[B(0x225)],f=d['input']?.[B(0x225)];if(!e&&!f)continue;const g=d[B(0x1ff)];for(const h in g){if(g[h][B(0x1f6)]===B(0x1f5)){const i=g[h];e&&(!i[B(0x1ee)]&&(i[B(0x1ee)]={}),i['job'][B(0x225)]=e),f&&(i[B(0x1db)]={'schema':f});}}}}[u(0x22c)](){const C=u;for(const c of this[C(0x22f)][C(0x22b)][C(0x1d3)]){const d=c[C(0x1ff)],e=this[C(0x219)](c)[0x0];for(const f in d){d[f]['trigger']=e,d[f][C(0x217)]=c[C(0x217)],c['publishes']&&(d[f][C(0x213)]=c[C(0x213)]),d[f][C(0x1e3)]=c[C(0x1e3)]??undefined,d[f]['persistent']=c['persistent']??undefined;}}}[u(0x212)](){const D=u;for(const c of this[D(0x22f)]['app'][D(0x1d3)]){const d=c[D(0x1ff)];for(const e in d){const f=d[e];f[D(0x1f6)]===D(0x233)&&(d[f['ancestor']]['cycle']=!![]);}}}[u(0x228)](){const E=u;for(const c of this[E(0x22f)][E(0x22b)][E(0x1d3)]){const d=c[E(0x1ff)];for(const e in d){const f=d[e];[E(0x1dc),E(0x234)][E(0x1d4)](f[E(0x1f6)])&&f[E(0x216)]&&!f[E(0x1d8)]&&(f[E(0x1d8)]=f[E(0x216)]);}}}['convertActivitiesToHooks'](){const F=u;for(const c of this[F(0x22f)][F(0x22b)][F(0x1d3)]){const d=c[F(0x1ff)];for(const e in d){const f=d[e];[F(0x1f1)][F(0x1d4)](f[F(0x1f6)])&&(f['type']=F(0x21d));}}}async[u(0x1fd)](){const G=u,c=this['manifest'][G(0x22b)][G(0x1d3)];for(const d of c){if(d[G(0x1d1)])for(const e in d[G(0x1d1)]){const f=d['transitions'][e];for(const g of f){const h=g['to'];d[G(0x1ff)][h][G(0x1d6)]=e;}d['activities'][e][G(0x1d1)]=f;}}}[u(0x1c8)](c,d){const H=u;for(const [e,f]of Object[H(0x201)](c)){if(e===H(0x229)||e===H(0x226)||e===H(0x21a)){if(Array[H(0x1dd)](f))for(const g of f){typeof g==='string'&&g[H(0x224)]>0x5&&d['add'](g);}else typeof f===H(0x1f0)&&f[H(0x224)]>0x5&&d[H(0x203)](f);}else typeof f===H(0x1de)&&this[H(0x1c8)](f,d);}}[u(0x1fa)](c,d){const I=u;for(const e of Object[I(0x1eb)](c)){typeof e===I(0x1de)&&(I(0x225)in e?this[I(0x1c8)](e[I(0x225)],d):this['traverse'](e,d));}}async[u(0x204)](){const J=u,c=new Set();for(const h of this[J(0x22f)]['app'][J(0x1d3)]){this['traverse'](h,c);}const d=await this[J(0x1e6)][J(0x1c9)](),e=Object[J(0x1ea)](d)['length'],f=Math[J(0x223)](0x34,0x2)-0x1,g=serializer_1[J(0x1cf)]['filterSymVals'](e,f,d,c);await this[J(0x1e6)]['addSymbolValues'](g);}[u(0x20a)](){const L=u;function c(d){const e=[];function f(g,h=[]){const K=b;for(const j in g){if(typeof g[j]===K(0x1de)&&g[j]!==null&&!('@pipe'in g[j])){const k=[...h,j];f(g[j],k);}else{const l=[...h,j][K(0x1e4)]('/');if(!l['includes']('[')){const m=K(0x1f7)+l;!e[K(0x1d4)](m)&&e['push'](m);}else{const [n,o]=l[K(0x202)]('['),[p,q]=o[K(0x202)](']');if(!isNaN(parseInt(p)))for(let r=0x0;r<parseInt(p);r++){const s=K(0x1f7)+n+'/'+r;!e[K(0x1d4)](s)&&e[K(0x1e9)](s);}}}}}return d&&f(d),e;}for(const d of this['manifest'][L(0x22b)][L(0x1d3)]){let e=[];const [,f]=this['findTrigger'](d);for(const g in d[L(0x1ff)]){const h=d[L(0x1ff)][g];e=e[L(0x1ec)](c(h[L(0x1ee)]?.['maps']));}f[L(0x235)]=e;}}[u(0x230)](){const N=u,c=[];function d(g,h){const M=b;for(const i in g){if(typeof g[i]==='string'){const j=g[i],k=j[M(0x236)](/^\{[^@].*}$/);k&&!validator_1[M(0x220)][M(0x21e)][M(0x1d4)](j)&&(j['split']('.')[0x1]!==M(0x20b)&&(c[M(0x1e9)](j),h[M(0x1e9)](j)));}else typeof g[i]==='object'&&g[i]!==null&&d(g[i],h);}}const e=this[N(0x22f)][N(0x22b)][N(0x1d3)];for(const g of e){const h=g[N(0x1ff)];for(const i in h){const j=h[i];j[N(0x211)]=[],d(j,j[N(0x211)]),j[N(0x211)]=this[N(0x20e)](j[N(0x211)]);}}const f=this[N(0x20e)](c);for(const k of e){const l=k['activities'];for(const m in l){const n=l[m];n[N(0x232)]=f[''+m]||[];}}}['groupMappingRules'](c){const O=u;c=Array[O(0x1d5)](new Set(c))['sort']();const d={};for(const e of c){const [f,g]=this[O(0x209)](e);!d[f]&&(d[f]=[]),d[f][O(0x1e9)](g);}return d;}[u(0x209)](c){const P=u;c=c['substring'](0x1,c['length']-0x1);const d=c[P(0x202)]('.');if(d[0x0]===P(0x214)){const [e,...f]=d;return[e,f['join']('/')];}else{const [g,h,i,...j]=d,k={'hook':P(0x1d0),'input':P(0x22e),'output':i===P(0x1d7)?P(0x238):P(0x1cd)}[h];return[g,k+'/'+j['join']('/')];}}async[u(0x1e0)](){const Q=u,c=this[Q(0x22f)][Q(0x22b)][Q(0x1d3)],d={};for(const e of c){const f=e[Q(0x1ff)];for(const g in f){const h=f[g];delete h[Q(0x1d1)],d[g]=h;}}await this[Q(0x1e6)][Q(0x1f4)](d,this[Q(0x237)]());}async[u(0x221)](){const R=u,c=this[R(0x22f)]['app'][R(0x1d3)],d={};for(const e of c){const f=e[R(0x1ff)],g=e['subscribes'];for(const h in f){if(f[h]['type']===R(0x1f5)){d[g]=h;break;}}}await this[R(0x1e6)][R(0x205)](d,this[R(0x237)]());}['findTrigger'](c){const S=u;for(const d in c[S(0x1ff)]){const e=c[S(0x1ff)][d];if(e[S(0x1f6)]==='trigger')return[d,e];}return null;}async[u(0x1d9)](){const T=u,c=this['manifest'][T(0x22b)][T(0x1d3)],d={};for(const e of c){if(e['subscribes']&&e['subscribes'][T(0x22a)]('.')){const [f]=this['findTrigger'](e);f&&(d[e[T(0x217)]]={[f]:!![]});}if(e[T(0x1d1)])for(const g in e[T(0x1d1)]){const h=e['transitions'][g],i={};for(const j of h){const k=j['to'];j[T(0x1c7)]?i[k]=j['conditions']:i[k]=!![];}Object[T(0x1ea)](i)[T(0x224)]>0x0&&(d['.'+g]=i);}}await this[T(0x1e6)][T(0x1e5)](d,this[T(0x237)]());}async[u(0x1da)](){const U=u,c=this[U(0x22f)][U(0x22b)][U(0x1d3)],d={};for(const e of c){if(e[U(0x20c)])for(const f in e[U(0x20c)]){d[f]=e[U(0x20c)][f];const g=e[U(0x20c)][f][0x0]['to'],h=e[U(0x1ff)][g];h&&(!h[U(0x21d)]&&(h[U(0x21d)]={}),h['hook'][U(0x216)]=f);}}await this[U(0x1e6)][U(0x1df)](d);}async[u(0x1cb)](){const V=u,c={'appId':this[V(0x22f)][V(0x22b)]['id']},d=this[V(0x1e6)][V(0x231)](key_1[V(0x210)]['STREAMS'],c);await this[V(0x1cc)](d,V(0x222));for(const e of this[V(0x22f)]['app']['graphs']){const f=e[V(0x1ff)];for(const g in f){const h=f[g];if(h[V(0x1f6)]===V(0x1dc)&&pipe_1['Pipe'][V(0x1f3)](h['subtype'],{})===h['subtype']){c[V(0x216)]=h[V(0x1d8)];const i=this[V(0x1e6)][V(0x231)](key_1[V(0x210)]['STREAMS'],c);await this[V(0x1cc)](i,V(0x1ce));}}}}async[u(0x1cc)](c,d){const W=u;try{await this['stream'][W(0x23b)](c,d);}catch(e){this['store'][W(0x1ca)][W(0x208)]('router-stream-group-exists',{'stream':c,'group':d});}}}exports[u(0x1e2)]=Deployer;
1
+ 'use strict';function a(){const X=['11489544wYYQrk','findTrigger','bindCycleTarget','resolveMappableValue','sort','output/data','getVID','setSubscriptions','370juMudL','deployTransitions','object','Symbol\x20index\x20out\x20of\x20bounds','convertActivitiesToHooks','14074590DdehHx','mintKey','app','worker','hooks','getSymKey','getSymbolValues','pow','topic','addSymbolValues','hook','includes','trigger','deployHookPatterns','Validator','ENGINE','generateSymVals','activities','setHookRules','subscribes','data/','2698451ohtQjf','router-stream-group-exists','WORKER','job','Deployer','setSchemas','../../modules/key','deployConsumerGroup','graphs','expire','split','startsWith','keys','examples','KeyType','groupMappingRules','publishes','deployConsumerGroups','entries','collectValues','__esModule','./validator','transitions','generateSymKeys','output','181914NWyYlO','join','hook/data','traverse','../../modules/utils','data','conditions','isArray','length','add','24724wYhjxj','bindSymbols','2kbvElw','string','activity','compile','cycle','schema','convertTopicsToTypes','store','deploySubscriptions','reserveSymbolRange','createConsumerGroup','STREAMS','$job','8rtRMXT','subtype','resolveJobMapsPaths','input','Pipe','persistent','concat','enum','output/metadata','addSymbols','substring','setTransitions','CollatorService','bindParents','bindBackRefs','bindSelf','resolveMappingDependencies','../collator','filterSymVals','../serializer','logger','1396980zdhCXy','consumes','copyJobSchemas','PRODUCES','maps','@pipe','produces','version','type','22KApndG','push','resolve','deployActivitySchemas','../pipe','match','manifest','11332536IpvzUA'];a=function(){return X;};return a();}const u=b;(function(c,d){const t=b,e=c();while(!![]){try{const f=parseInt(t(0x132))/0x1*(parseInt(t(0x18a))/0x2)+parseInt(t(0x17e))/0x3+-parseInt(t(0x188))/0x4*(parseInt(t(0x14b))/0x5)+parseInt(t(0x142))/0x6+parseInt(t(0x165))/0x7*(-parseInt(t(0x197))/0x8)+parseInt(t(0x143))/0x9+parseInt(t(0x150))/0xa*(-parseInt(t(0x13b))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xeba41));Object['defineProperty'](exports,u(0x179),{'value':!![]}),exports['Deployer']=void 0x0;const key_1=require(u(0x16b)),utils_1=require(u(0x182)),collator_1=require(u(0x1a8)),serializer_1=require(u(0x130)),pipe_1=require(u(0x13f)),validator_1=require(u(0x17a)),DEFAULT_METADATA_RANGE_SIZE=0x1a,DEFAULT_DATA_RANGE_SIZE=0x104,DEFAULT_RANGE_SIZE=DEFAULT_METADATA_RANGE_SIZE+DEFAULT_DATA_RANGE_SIZE;function b(c,d){const e=a();return b=function(f,g){f=f-0x12f;let h=e[f];return h;},b(c,d);}class Deployer{constructor(c){const v=u;this[v(0x141)]=null,this[v(0x141)]=c;}async['deploy'](c,d){const w=u;this[w(0x191)]=c,this['stream']=d,collator_1[w(0x1a3)][w(0x18d)](this[w(0x141)][w(0x152)][w(0x16d)]),this[w(0x14f)](),this[w(0x190)](),this[w(0x134)](),this[w(0x1a5)](),this[w(0x1a4)](),this[w(0x145)](),this[w(0x1a7)](),this['resolveJobMapsPaths'](),await this[w(0x17c)](),await this[w(0x160)](),await this['deployHookPatterns'](),await this['deployActivitySchemas'](),await this[w(0x192)](),await this[w(0x14c)](),await this['deployConsumerGroups']();}['getVID'](){const x=u;return{'id':this['manifest'][x(0x152)]['id'],'version':this['manifest']['app'][x(0x139)]};}async[u(0x17c)](){const y=u;for(const c of this[y(0x141)][y(0x152)][y(0x16d)]){const [,d]=this[y(0x144)](c),e=d[y(0x163)],[f,g,h]=await this[y(0x191)][y(0x193)]('$'+e,DEFAULT_RANGE_SIZE,'JOB'),i='',j=this[y(0x189)](f,g,h,i,d[y(0x135)]);Object[y(0x171)](j)['length']&&await this[y(0x191)][y(0x1a0)]('$'+e,j);for(const [k,l]of Object[y(0x177)](c[y(0x161)])){const [m,n,o]=await this['store'][y(0x193)](k,DEFAULT_RANGE_SIZE,'ACTIVITY'),p=k+'/';this[y(0x1a6)](l[y(0x133)],l[y(0x138)],k);const q=this[y(0x189)](m,n,o,p,l[y(0x138)]);Object[y(0x171)](q)[y(0x186)]&&await this[y(0x191)]['addSymbols'](k,q);}}}[u(0x1a6)](c,d,e){const z=u;for(const f of[e,'$self']){const g=c[f];if(g)for(const h of g){!d[z(0x15b)](h)&&d['push'](h);}}}['bindSymbols'](c,d,e,f,g){const A=u,h={},i={...e};for(const j of g){const k=''+f+j;if(!i[k]){if(c>d)throw new Error(A(0x14e));const l=(0x0,utils_1[A(0x155)])(c);c++,h[k]=l,i[k]=l;}}return h;}[u(0x134)](){const B=u,c=this[B(0x141)][B(0x152)]['graphs'];for(const d of c){const e=d[B(0x17d)]?.[B(0x18f)],f=d['input']?.['schema'];if(!e&&!f)continue;const g=d[B(0x161)];for(const h in g){if(g[h][B(0x13a)]===B(0x15c)){const i=g[h];e&&(!i[B(0x168)]&&(i[B(0x168)]={}),i[B(0x168)]['schema']=e),f&&(i['output']={'schema':f});}}}}['bindBackRefs'](){const C=u;for(const c of this[C(0x141)][C(0x152)][C(0x16d)]){const d=c[C(0x161)],e=this[C(0x144)](c)[0x0];for(const f in d){d[f]['trigger']=e,d[f][C(0x163)]=c[C(0x163)],c['publishes']&&(d[f][C(0x175)]=c[C(0x175)]),d[f][C(0x16e)]=c['expire']??undefined,d[f]['persistent']=c[C(0x19c)]??undefined;}}}['bindCycleTarget'](){const D=u;for(const c of this[D(0x141)][D(0x152)][D(0x16d)]){const d=c['activities'];for(const e in d){const f=d[e];f[D(0x13a)]===D(0x18e)&&(d[f['ancestor']][D(0x18e)]=!![]);}}}[u(0x190)](){const E=u;for(const c of this[E(0x141)][E(0x152)][E(0x16d)]){const d=c['activities'];for(const e in d){const f=d[e];[E(0x153),'await']['includes'](f[E(0x13a)])&&f[E(0x158)]&&!f[E(0x198)]&&(f['subtype']=f[E(0x158)]);}}}[u(0x14f)](){const F=u;for(const c of this[F(0x141)][F(0x152)][F(0x16d)]){const d=c[F(0x161)];for(const e in d){const f=d[e];[F(0x18c)]['includes'](f['type'])&&(f[F(0x13a)]=F(0x15a));}}}async[u(0x1a4)](){const G=u,c=this['manifest'][G(0x152)][G(0x16d)];for(const d of c){if(d['transitions'])for(const e in d['transitions']){const f=d[G(0x17b)][e];for(const g of f){const h=g['to'];d['activities'][h]['parent']=e;}d[G(0x161)][e][G(0x17b)]=f;}}}[u(0x178)](c,d){const H=u;for(const [e,f]of Object[H(0x177)](c)){if(e===H(0x19e)||e===H(0x172)||e==='default'){if(Array[H(0x185)](f))for(const g of f){typeof g===H(0x18b)&&g[H(0x186)]>0x5&&d['add'](g);}else typeof f==='string'&&f[H(0x186)]>0x5&&d[H(0x187)](f);}else typeof f===H(0x14d)&&this[H(0x178)](f,d);}}[u(0x181)](c,d){const I=u;for(const e of Object['values'](c)){typeof e===I(0x14d)&&(I(0x18f)in e?this[I(0x178)](e[I(0x18f)],d):this[I(0x181)](e,d));}}async[u(0x160)](){const J=u,c=new Set();for(const h of this[J(0x141)][J(0x152)][J(0x16d)]){this[J(0x181)](h,c);}const d=await this[J(0x191)][J(0x156)](),e=Object[J(0x171)](d)['length'],f=Math[J(0x157)](0x34,0x2)-0x1,g=serializer_1['SerializerService'][J(0x12f)](e,f,d,c);await this[J(0x191)][J(0x159)](g);}[u(0x199)](){const L=u;function c(d){const e=[];function f(g,h=[]){const K=b;for(const j in g){if(typeof g[j]==='object'&&g[j]!==null&&!(K(0x137)in g[j])){const k=[...h,j];f(g[j],k);}else{const l=[...h,j][K(0x17f)]('/');if(!l[K(0x15b)]('[')){const m=K(0x164)+l;!e[K(0x15b)](m)&&e['push'](m);}else{const [n,o]=l[K(0x16f)]('['),[p,q]=o[K(0x16f)](']');if(!isNaN(parseInt(p)))for(let r=0x0;r<parseInt(p);r++){const s='data/'+n+'/'+r;!e[K(0x15b)](s)&&e['push'](s);}}}}}return d&&f(d),e;}for(const d of this[L(0x141)]['app'][L(0x16d)]){let e=[];const [,f]=this[L(0x144)](d);for(const g in d[L(0x161)]){const h=d[L(0x161)][g];e=e[L(0x19d)](c(h[L(0x168)]?.[L(0x136)]));}f['PRODUCES']=e;}}[u(0x1a7)](){const N=u,c=[];function d(g,h){const M=b;for(const i in g){if(typeof g[i]===M(0x18b)){const j=g[i],k=j[M(0x140)](/^\{[^@].*}$/);k&&!validator_1[M(0x15e)]['CONTEXT_VARS'][M(0x15b)](j)&&(j[M(0x16f)]('.')[0x1]!==M(0x19a)&&(c['push'](j),h['push'](j)));}else typeof g[i]==='object'&&g[i]!==null&&d(g[i],h);}}const e=this[N(0x141)]['app'][N(0x16d)];for(const g of e){const h=g[N(0x161)];for(const i in h){const j=h[i];j[N(0x133)]=[],d(j,j[N(0x133)]),j[N(0x133)]=this[N(0x174)](j[N(0x133)]);}}const f=this[N(0x174)](c);for(const k of e){const l=k[N(0x161)];for(const m in l){const n=l[m];n[N(0x138)]=f[''+m]||[];}}}[u(0x174)](c){const O=u;c=Array['from'](new Set(c))[O(0x147)]();const d={};for(const e of c){const [f,g]=this[O(0x146)](e);!d[f]&&(d[f]=[]),d[f][O(0x13c)](g);}return d;}['resolveMappableValue'](c){const P=u;c=c[P(0x1a1)](0x1,c['length']-0x1);const d=c['split']('.');if(d[0x0]===P(0x196)){const [e,...f]=d;return[e,f['join']('/')];}else{const [g,h,i,...j]=d,k={'hook':P(0x180),'input':'input/data','output':i===P(0x183)?P(0x148):P(0x19f)}[h];return[g,k+'/'+j[P(0x17f)]('/')];}}async[u(0x13e)](){const Q=u,c=this['manifest'][Q(0x152)][Q(0x16d)],d={};for(const e of c){const f=e[Q(0x161)];for(const g in f){const h=f[g];delete h['transitions'],d[g]=h;}}await this[Q(0x191)][Q(0x16a)](d,this[Q(0x149)]());}async['deploySubscriptions'](){const R=u,c=this['manifest'][R(0x152)][R(0x16d)],d={};for(const e of c){const f=e[R(0x161)],g=e[R(0x163)];for(const h in f){if(f[h][R(0x13a)]===R(0x15c)){d[g]=h;break;}}}await this[R(0x191)][R(0x14a)](d,this[R(0x149)]());}[u(0x144)](c){const S=u;for(const d in c[S(0x161)]){const e=c[S(0x161)][d];if(e['type']===S(0x15c))return[d,e];}return null;}async[u(0x14c)](){const T=u,c=this[T(0x141)][T(0x152)][T(0x16d)],d={};for(const e of c){if(e[T(0x163)]&&e[T(0x163)][T(0x170)]('.')){const [f]=this[T(0x144)](e);f&&(d[e['subscribes']]={[f]:!![]});}if(e[T(0x17b)])for(const g in e[T(0x17b)]){const h=e[T(0x17b)][g],i={};for(const j of h){const k=j['to'];j[T(0x184)]?i[k]=j[T(0x184)]:i[k]=!![];}Object[T(0x171)](i)['length']>0x0&&(d['.'+g]=i);}}await this[T(0x191)][T(0x1a2)](d,this[T(0x149)]());}async[u(0x15d)](){const U=u,c=this['manifest']['app'][U(0x16d)],d={};for(const e of c){if(e[U(0x154)])for(const f in e['hooks']){d[f]=e[U(0x154)][f];const g=e[U(0x154)][f][0x0]['to'],h=e[U(0x161)][g];h&&(!h['hook']&&(h[U(0x15a)]={}),h['hook'][U(0x158)]=f);}}await this['store'][U(0x162)](d);}async[u(0x176)](){const V=u,c={'appId':this[V(0x141)][V(0x152)]['id']},d=this[V(0x191)][V(0x151)](key_1[V(0x173)][V(0x195)],c);await this['deployConsumerGroup'](d,V(0x15f));for(const e of this[V(0x141)][V(0x152)][V(0x16d)]){const f=e[V(0x161)];for(const g in f){const h=f[g];if(h[V(0x13a)]==='worker'&&pipe_1[V(0x19b)][V(0x13d)](h[V(0x198)],{})===h[V(0x198)]){c[V(0x158)]=h[V(0x198)];const i=this[V(0x191)][V(0x151)](key_1['KeyType']['STREAMS'],c);await this[V(0x16c)](i,V(0x167));}}}}async[u(0x16c)](c,d){const W=u;try{await this['stream'][W(0x194)](c,d);}catch(e){this[W(0x191)][W(0x131)]['info'](W(0x166),{'stream':c,'group':d});}}}exports[u(0x169)]=Deployer;
@@ -1 +1 @@
1
- 'use strict';const i=b;(function(c,d){const h=b,e=c();while(!![]){try{const f=-parseInt(h(0x10b))/0x1*(parseInt(h(0xe8))/0x2)+parseInt(h(0xe5))/0x3+parseInt(h(0xfc))/0x4+parseInt(h(0xfa))/0x5*(-parseInt(h(0xdd))/0x6)+parseInt(h(0x101))/0x7*(-parseInt(h(0xed))/0x8)+parseInt(h(0xf0))/0x9*(-parseInt(h(0x10a))/0xa)+parseInt(h(0x100))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x9017b));var __createBinding=this&&this[i(0x109)]||(Object[i(0xd8)]?function(c,d,e,f){const j=i;if(f===undefined)f=e;var g=Object[j(0xe3)](d,e);(!g||(j(0xee)in g?!d['__esModule']:g[j(0x106)]||g[j(0xfd)]))&&(g={'enumerable':!![],'get':function(){return d[e];}}),Object[j(0xdb)](c,f,g);}:function(c,d,e,f){if(f===undefined)f=e;c[f]=d[e];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[i(0xd8)]?function(c,d){Object['defineProperty'](c,'default',{'enumerable':!![],'value':d});}:function(c,d){const k=i;c[k(0xe2)]=d;}),__importStar=this&&this['__importStar']||function(c){const l=i;if(c&&c[l(0xe0)])return c;var d={};if(c!=null){for(var e in c)if(e!==l(0xe2)&&Object['prototype'][l(0xe4)][l(0xdc)](c,e))__createBinding(d,c,e);}return __setModuleDefault(d,c),d;},__importDefault=this&&this[i(0xf5)]||function(c){const m=i;return c&&c[m(0xe0)]?c:{'default':c};};function b(c,d){const e=a();return b=function(f,g){f=f-0xd8;let h=e[f];return h;},b(c,d);}Object['defineProperty'](exports,i(0xe0),{'value':!![]}),exports[i(0xe7)]=void 0x0;const fs=__importStar(require(i(0xde))),path=__importStar(require(i(0xf7))),json_schema_ref_parser_1=__importDefault(require(i(0x10c))),js_yaml_1=__importDefault(require(i(0x102))),deployer_1=require(i(0xda)),validator_1=require(i(0xf6));class CompilerService{constructor(c,d,e){const n=i;this[n(0xd9)]=c,this[n(0xe9)]=d,this[n(0xfe)]=e;}async[i(0xf8)](c){const o=i;try{let d;this['isPath'](c)?d=await json_schema_ref_parser_1['default']['dereference'](c):d=js_yaml_1[o(0xe2)][o(0xf1)](c);const e=new validator_1[(o(0xf9))](d);return e[o(0x107)](this[o(0xd9)]),d;}catch(f){this[o(0xfe)][o(0xfb)](o(0xe1),f);}}[i(0x103)](c){const p=i;return!c['trim']()['startsWith'](p(0xec));}async[i(0xeb)](c){const q=i;try{let d;this[q(0x103)](c)?(d=await json_schema_ref_parser_1[q(0xe2)][q(0xea)](c),await this[q(0xff)](c,d)):d=js_yaml_1['default'][q(0xf1)](c);const e=new validator_1[(q(0xf9))](d);e[q(0x107)](this[q(0xd9)]);const f=new deployer_1['Deployer'](d);return await f[q(0xeb)](this['store'],this[q(0xe9)]),await this[q(0xd9)][q(0x105)](d[q(0x104)]['id'],d[q(0x104)]['version']),d;}catch(g){this[q(0xfe)][q(0xfb)](q(0xf3),g);}}async[i(0xdf)](c,d){const r=i;return await this[r(0xd9)]['activateAppVersion'](c,d);}async[i(0xff)](c,d){const s=i,e=JSON[s(0x108)](d,null,0x2),f=path[s(0xf2)](path['dirname'](c),s(0xe6)+d[s(0x104)]['id']+'.'+d[s(0x104)]['version']+'.json');await fs[s(0xef)](f,e,s(0xf4));}}function a(){const t=['__importDefault','./validator','path','plan','Validator','5pGMtzS','error','816288xwthSj','configurable','logger','saveAsJSON','39579430SsScfs','7856254wzcgoa','js-yaml','isPath','app','setApp','writable','validate','stringify','__createBinding','10nFTwly','2vUnOol','@apidevtools/json-schema-ref-parser','create','store','./deployer','defineProperty','call','1520850DfPZUn','fs/promises','activate','__esModule','compiler-plan-error','default','getOwnPropertyDescriptor','hasOwnProperty','204234YMGOXR','.hotmesh.','CompilerService','880414xkvqKX','stream','dereference','deploy','app:','8IuByfA','get','writeFile','9214794JTuyWi','load','join','compiler-deploy-error','utf8'];a=function(){return t;};return a();}exports[i(0xe7)]=CompilerService;
1
+ 'use strict';function a(){const u=['startsWith','join','logger','121RkWvdE','call','js-yaml','fs/promises','writeFile','__setModuleDefault','162RTRLRe','compiler-plan-error','get','prototype','dirname','deploy','trim','app','error','3087117mOADxK','101366hihEOs','__esModule','stream','1013260gDQWVZ','configurable','hasOwnProperty','version','writable','utf8','./deployer','store','7wXCwgG','__importStar','dereference','load','default','__importDefault','isPath','create','5UTsXWi','3TuYxDR','activateAppVersion','75590zQqKgx','stringify','defineProperty','path','app:','2569416odFVxr','getOwnPropertyDescriptor','CompilerService','compiler-deploy-error','7823238aXIOxF','Deployer','./validator','saveAsJSON','5039744okCyBL'];a=function(){return u;};return a();}function b(c,d){const e=a();return b=function(f,g){f=f-0x1e6;let h=e[f];return h;},b(c,d);}const i=b;(function(c,d){const h=b,e=c();while(!![]){try{const f=parseInt(h(0x20b))/0x1*(parseInt(h(0x1f7))/0x2)+-parseInt(h(0x1f6))/0x3+-parseInt(h(0x1fa))/0x4+parseInt(h(0x20a))/0x5*(-parseInt(h(0x216))/0x6)+-parseInt(h(0x202))/0x7*(-parseInt(h(0x21a))/0x8)+-parseInt(h(0x1ed))/0x9*(-parseInt(h(0x20d))/0xa)+parseInt(h(0x1e7))/0xb*(parseInt(h(0x212))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xa7c2e));var __createBinding=this&&this['__createBinding']||(Object[i(0x209)]?function(c,d,e,f){const j=i;if(f===undefined)f=e;var g=Object[j(0x213)](d,e);(!g||(j(0x1ef)in g?!d[j(0x1f8)]:g[j(0x1fe)]||g[j(0x1fb)]))&&(g={'enumerable':!![],'get':function(){return d[e];}}),Object[j(0x20f)](c,f,g);}:function(c,d,e,f){if(f===undefined)f=e;c[f]=d[e];}),__setModuleDefault=this&&this[i(0x1ec)]||(Object['create']?function(c,d){const k=i;Object[k(0x20f)](c,k(0x206),{'enumerable':!![],'value':d});}:function(c,d){const l=i;c[l(0x206)]=d;}),__importStar=this&&this[i(0x203)]||function(c){const m=i;if(c&&c['__esModule'])return c;var d={};if(c!=null){for(var e in c)if(e!==m(0x206)&&Object[m(0x1f0)][m(0x1fc)][m(0x1e8)](c,e))__createBinding(d,c,e);}return __setModuleDefault(d,c),d;},__importDefault=this&&this[i(0x207)]||function(c){const n=i;return c&&c[n(0x1f8)]?c:{'default':c};};Object[i(0x20f)](exports,'__esModule',{'value':!![]}),exports[i(0x214)]=void 0x0;const fs=__importStar(require(i(0x1ea))),path=__importStar(require(i(0x210))),json_schema_ref_parser_1=__importDefault(require('@apidevtools/json-schema-ref-parser')),js_yaml_1=__importDefault(require(i(0x1e9))),deployer_1=require(i(0x200)),validator_1=require(i(0x218));class CompilerService{constructor(c,d,e){const o=i;this[o(0x201)]=c,this[o(0x1f9)]=d,this[o(0x1e6)]=e;}async['plan'](c){const p=i;try{let d;this[p(0x208)](c)?d=await json_schema_ref_parser_1[p(0x206)][p(0x204)](c):d=js_yaml_1[p(0x206)][p(0x205)](c);const e=new validator_1['Validator'](d);return e['validate'](this[p(0x201)]),d;}catch(f){this['logger'][p(0x1f5)](p(0x1ee),f);}}[i(0x208)](c){const q=i;return!c[q(0x1f3)]()[q(0x21b)](q(0x211));}async[i(0x1f2)](c){const r=i;try{let d;this[r(0x208)](c)?(d=await json_schema_ref_parser_1['default'][r(0x204)](c),await this[r(0x219)](c,d)):d=js_yaml_1[r(0x206)][r(0x205)](c);const e=new validator_1['Validator'](d);e['validate'](this[r(0x201)]);const f=new deployer_1[(r(0x217))](d);return await f['deploy'](this[r(0x201)],this['stream']),await this[r(0x201)]['setApp'](d['app']['id'],d[r(0x1f4)][r(0x1fd)]),d;}catch(g){this[r(0x1e6)][r(0x1f5)](r(0x215),g);}}async['activate'](c,d){const s=i;return await this[s(0x201)][s(0x20c)](c,d);}async[i(0x219)](c,d){const t=i,e=JSON[t(0x20e)](d,null,0x2),f=path[t(0x21c)](path[t(0x1f1)](c),'.hotmesh.'+d[t(0x1f4)]['id']+'.'+d['app'][t(0x1fd)]+'.json');await fs[t(0x1eb)](f,e,t(0x1ff));}}exports[i(0x214)]=CompilerService;
@@ -1 +1 @@
1
- 'use strict';const k=b;function a(){const y=['store','isContextVariable','extractMappingStatements','../pipe','isMappingStatement','validateStats','8bEmpFh','Mapping\x20statement\x20references\x20non-existent\x20activity:\x20','validateActivityIds','9QPgbVm','validateSchemas','manifest','app','validateUniqueHandledTopics','SYS_VARS','149936XzgmLy','validateHooks','6qgEhQi','validateMappingStatements','{$input}','validateGraphPublishSubscribe','6474286FkFavK','CONTEXT_VARS','add','5347188BsFiBi','677541cekICy','$self','{$index}','keys','$graph','validateReferencedActivityIds','validate','{$output}','startsWith','defineProperty','{$item}','isFunction','string','validateTransitionConditions','validateConditionalStatements','forEach','{$key}','includes','validateTransitions','split','9030930cJOIQy','getMappingStatements','$job','activityIds','slice','1437560cVERFu','activities','has','mappingStatements','Duplicate\x20activity\x20id\x20found:\x20','$app','endsWith','Validator','7711475szleZZ','graphs'];a=function(){return y;};return a();}(function(c,d){const j=b,e=c();while(!![]){try{const f=parseInt(j(0xab))/0x1+parseInt(j(0xa1))/0x2+-parseInt(j(0x9b))/0x3*(-parseInt(j(0x88))/0x4)+-parseInt(j(0x90))/0x5*(parseInt(j(0xa3))/0x6)+parseInt(j(0xa7))/0x7*(-parseInt(j(0x98))/0x8)+parseInt(j(0xaa))/0x9+parseInt(j(0x83))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xd2227));Object[k(0xb4)](exports,'__esModule',{'value':!![]}),exports[k(0x8f)]=void 0x0;const pipe_1=require(k(0x95));function b(c,d){const e=a();return b=function(f,g){f=f-0x7b;let h=e[f];return h;},b(c,d);}class Validator{constructor(c){const l=k;this[l(0x9d)]=null,this[l(0x86)]=[],this['mappingStatements']={},this[l(0x92)]=null,this[l(0x9d)]=c;}async[k(0xb1)](c){const m=k;this[m(0x92)]=c,this[m(0x84)](),this['validateActivityIds'](),this[m(0xb0)](),this[m(0xa4)](),this[m(0x81)](),this[m(0x7c)](),this['validateStats'](),this[m(0x9c)](),this[m(0x9f)](),this[m(0xa6)](),this[m(0xa2)](),this['validateConditionalStatements']();}[k(0x9a)](){const n=k,c=new Set();this[n(0x9d)][n(0x9e)][n(0x91)]['forEach'](d=>{const o=n,e=Object[o(0xae)](d[o(0x89)]);e['forEach'](f=>{const p=o;if(c[p(0x8a)](f))throw new Error(p(0x8c)+f);else c[p(0xa9)](f);});}),this['activityIds']=Array['from'](c);}[k(0x96)](c){const q=k;return typeof c===q(0x7b)&&c['startsWith']('{')&&c[q(0x8e)]('}');}[k(0x94)](c,d,e){const r=k;for(const f in c){if(typeof c[f]==='object'&&c[f]!==null)this[r(0x94)](c[f],d,e);else this['isMappingStatement'](c[f])&&(!d[e]&&(d[e]=[]),d[e]['push'](c[f]));}}[k(0x84)](){const s=k,c={};this['manifest'][s(0x9e)]['graphs'][s(0x7e)](d=>{const t=s,e=d[t(0x89)];for(const f in e){const g=e[f];this['extractMappingStatements'](g,c,f);}}),this[s(0x8b)]=c;}[k(0xb0)](){const u=k,c=this[u(0x8b)],d=this[u(0x86)];for(const e in c){const f=c[e];f[u(0x7e)](g=>{const v=u;if(g['startsWith']('{')&&g['endsWith']('}')){const h=g[v(0x87)](0x1,-0x1)[v(0x82)]('.'),i=h[0x0];if(!(Validator[v(0xa0)][v(0x80)](i)||d['includes'](i)||this[v(0xb6)](g)||this[v(0x93)](g)))throw new Error(v(0x99)+g);}});}}[k(0xb6)](c){const w=k;return c[w(0xb3)]('{@')&&pipe_1['Pipe']['resolveFunction'](c);}['isContextVariable'](c){const x=k;return[x(0xa5),x(0xb2),x(0xb5),x(0x7f),x(0xad)]['includes'](c);}[k(0xa4)](){}[k(0x81)](){}[k(0x7c)](){}[k(0x97)](){}[k(0x9c)](){}[k(0x9f)](){}[k(0xa6)](){}['validateHooks'](){}[k(0x7d)](){}}exports[k(0x8f)]=Validator,Validator[k(0xa0)]=[k(0x8d),k(0xac),k(0xaf),k(0x85)],Validator[k(0xa8)]=[k(0xa5),k(0xb2),'{$item}','{$key}',k(0xad)];
1
+ 'use strict';function a(){const y=['manifest','includes','activityIds','validateGraphPublishSubscribe','split','{$input}','keys','object','6417887mWyRuy','1kRbrYv','from','push','extractMappingStatements','startsWith','66WyDYBQ','validateMappingStatements','store','127760IpnhTI','4112790nuPgsL','$job','Validator','996318VHhMIQ','CONTEXT_VARS','validateReferencedActivityIds','{$key}','164NUuzdD','isMappingStatement','resolveFunction','validateConditionalStatements','isFunction','Duplicate\x20activity\x20id\x20found:\x20','getMappingStatements','2286906AJwFcx','forEach','{$item}','validateTransitions','validateSchemas','Pipe','201265MKloPo','validate','add','activities','{$output}','SYS_VARS','endsWith','18wKxFqW','4831870jvGiMO','defineProperty','{$index}','$self','$app','app','validateHooks','has','isContextVariable','Mapping\x20statement\x20references\x20non-existent\x20activity:\x20','validateActivityIds','graphs','string','mappingStatements','validateStats'];a=function(){return y;};return a();}const k=b;(function(c,d){const j=b,e=c();while(!![]){try{const f=parseInt(j(0x145))/0x1*(-parseInt(j(0x15c))/0x2)+-parseInt(j(0x14e))/0x3+-parseInt(j(0x155))/0x4*(-parseInt(j(0x162))/0x5)+-parseInt(j(0x151))/0x6+-parseInt(j(0x144))/0x7+-parseInt(j(0x14d))/0x8*(-parseInt(j(0x169))/0x9)+parseInt(j(0x16a))/0xa*(parseInt(j(0x14a))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xf045e));Object[k(0x16b)](exports,'__esModule',{'value':!![]}),exports['Validator']=void 0x0;const pipe_1=require('../pipe');function b(c,d){const e=a();return b=function(f,g){f=f-0x132;let h=e[f];return h;},b(c,d);}class Validator{constructor(c){const l=k;this[l(0x13c)]=null,this['activityIds']=[],this[l(0x13a)]={},this[l(0x14c)]=null,this[l(0x13c)]=c;}async[k(0x163)](c){const m=k;this[m(0x14c)]=c,this[m(0x15b)](),this[m(0x137)](),this[m(0x153)](),this[m(0x14b)](),this[m(0x15f)](),this['validateTransitionConditions'](),this[m(0x13b)](),this[m(0x160)](),this['validateUniqueHandledTopics'](),this[m(0x13f)](),this[m(0x133)](),this[m(0x158)]();}[k(0x137)](){const n=k,c=new Set();this[n(0x13c)]['app']['graphs'][n(0x15d)](d=>{const o=n,e=Object[o(0x142)](d[o(0x165)]);e[o(0x15d)](f=>{const p=o;if(c[p(0x134)](f))throw new Error(p(0x15a)+f);else c[p(0x164)](f);});}),this[n(0x13e)]=Array[n(0x146)](c);}[k(0x156)](c){const q=k;return typeof c===q(0x139)&&c[q(0x149)]('{')&&c[q(0x168)]('}');}['extractMappingStatements'](c,d,e){const r=k;for(const f in c){if(typeof c[f]===r(0x143)&&c[f]!==null)this[r(0x148)](c[f],d,e);else this[r(0x156)](c[f])&&(!d[e]&&(d[e]=[]),d[e][r(0x147)](c[f]));}}['getMappingStatements'](){const s=k,c={};this['manifest'][s(0x132)][s(0x138)]['forEach'](d=>{const t=s,e=d[t(0x165)];for(const f in e){const g=e[f];this[t(0x148)](g,c,f);}}),this[s(0x13a)]=c;}[k(0x153)](){const u=k,c=this[u(0x13a)],d=this['activityIds'];for(const e in c){const f=c[e];f[u(0x15d)](g=>{const v=u;if(g[v(0x149)]('{')&&g[v(0x168)]('}')){const h=g['slice'](0x1,-0x1)[v(0x140)]('.'),i=h[0x0];if(!(Validator[v(0x167)][v(0x13d)](i)||d['includes'](i)||this[v(0x159)](g)||this[v(0x135)](g)))throw new Error(v(0x136)+g);}});}}['isFunction'](c){const w=k;return c[w(0x149)]('{@')&&pipe_1[w(0x161)][w(0x157)](c);}[k(0x135)](c){const x=k;return[x(0x141),x(0x166),x(0x15e),x(0x154),x(0x16c)][x(0x13d)](c);}['validateMappingStatements'](){}['validateTransitions'](){}['validateTransitionConditions'](){}[k(0x13b)](){}[k(0x160)](){}['validateUniqueHandledTopics'](){}[k(0x13f)](){}[k(0x133)](){}['validateConditionalStatements'](){}}exports[k(0x150)]=Validator,Validator[k(0x167)]=[k(0x16e),k(0x16d),'$graph',k(0x14f)],Validator[k(0x152)]=[k(0x141),k(0x166),'{$item}',k(0x154),k(0x16c)];
@@ -1 +1 @@
1
- 'use strict';const p=b;function b(c,d){const e=a();return b=function(f,g){f=f-0xc1;let h=e[f];return h;},b(c,d);}function a(){const ao=['runJobCompletionTasks','punsub','StreamServiceFactory','TaskService','../task','compress','delistJobCallback','not\x20found\x20','identifyProvider','unsubscribe','cache','getWorkItems','cacheMode','pub','execAdjacentParent','getStats','processWebHookEvent','join','data','length','keys','trc','3881890LQBBcF','startsWith','debug','no\x20app\x20found\x20for\x20id\x20','SearchServiceFactory','../../modules/enums','hasParentJob','pubsub','emit','publish','HMSH_QUORUM_DELAY_MS','metadata','defineProperty','stack','subscribe','fetchAndVerifyVID','work','search','../store/factory','mintKey','getPublishesTopic','HMSH_EXPIRE_JOB_SECONDS','logger','unsub','initStoreChannel','../router','getStatus','TIMEHOOK','3171TPtxQA','WEBHOOK','62430AYBNSD','reclaimDelay','processEvent','addSymbolValues','KeyType','setThrottle','tpc','end','export','appId','target','17waEwHC','\x20for\x20app\x20version\x20','getQueryState','taskService','pow','../compiler','readonly','resolveError','initStreamChannel','processWebHooks','hookAll','hook','pubPermSubs','__importDefault','now','\x20in\x20app\x20','initSearchChannel','sub','formatISODate','getSymbols','registerJobForCleanup','filterSymVals','type','err','HMSH_CODE_PENDING','processTimeHooks','getRaw','map','49866FHYLFl','l1s','StreamStatus','untilVersion','deploy','plan','start','../exporter','5288uOEfqR','EngineService','8cqbsqo','engine','SerializerService','../reporter','SubServiceFactory','engine-process-end','spn','apps','resolveQuery','substring','reporting','__esModule','verifyEngineFields','resolveExpires','error','initSubChannel','getHookRule','aid','dad','setCacheMode','jid','ngn','553UirENU','topic','16180443NgcMpD','getSettings','store','getSymbolValues','job','../stream/factory','unable\x20to\x20find\x20hook\x20rule\x20for\x20topic\x20','engine\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields.','HMSH_CODE_TIMEOUT','getApp','subtype','../sub/factory','range','toString','until','Router','code','bind','isPrivate','version','SUCCESS','descend','../activities','getState','scrub','StreamRole','stream','18309808WZAwTW','PENDING','jobId','getVID','createInputContext','restoreHierarchy','ENGINE','expire','throttle','psubscribe','TRANSITION','parse','initRouter','RESULT','no\x20subscription\x20found\x20for\x20topic\x20','routeToSubscribers','process','ReporterService','getSubscription','unable\x20to\x20process\x20activity\x20for\x20topic\x20','jobCallbacks','44122MnMUyA','reclaimCount','exporter','processStreamMessage','status','engine-executable-cache','router','getSchema','guid','enqueueWorkItems','info','init','publishMessage','publishes','../../modules/key','initActivity','\x20not\x20found','interrupt','gid','hasOneTimeSubscription','timeout','getIds','ERROR','registerJobCallback','engine-throttle-error','HMSH_CODE_SUCCESS','CompilerService','../../modules/utils','namespace','output','StreamDataType','QUORUM','$self','../search/factory','default','hookTime','split'];a=function(){return ao;};return a();}(function(c,d){const o=b,e=c();while(!![]){try{const f=parseInt(o(0x13c))/0x1*(-parseInt(o(0xd8))/0x2)+parseInt(o(0x12f))/0x3*(parseInt(o(0x160))/0x4)+parseInt(o(0x131))/0x5+parseInt(o(0x158))/0x6*(-parseInt(o(0x178))/0x7)+-parseInt(o(0x162))/0x8*(-parseInt(o(0x17a))/0x9)+parseInt(o(0x113))/0xa+-parseInt(o(0xc3))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xdba8a));var __importDefault=this&&this[p(0x149)]||function(c){const q=p;return c&&c[q(0x16d)]?c:{'default':c};};Object[p(0x11f)](exports,'__esModule',{'value':!![]}),exports['EngineService']=void 0x0;const key_1=require(p(0xe6)),enums_1=require(p(0x118)),utils_1=require(p(0xf3)),activities_1=__importDefault(require(p(0x190))),compiler_1=require(p(0x141)),exporter_1=require(p(0x15f)),reporter_1=require(p(0x165)),router_1=require(p(0x12c)),serializer_1=require('../serializer'),factory_1=require(p(0xf9)),factory_2=require(p(0x125)),factory_3=require(p(0x17f)),factory_4=require(p(0x185)),task_1=require(p(0x101)),stream_1=require('../../types/stream');class EngineService{constructor(){const r=p;this['cacheMode']=r(0x107),this[r(0x15b)]=null,this[r(0xd7)]={},this[r(0x16c)]=![],this[r(0xc5)]=0x1;}static async['init'](c,d,e,f,g){const s=p;if(f[s(0x163)]){const h=new EngineService();h[s(0x16e)](f),h[s(0xf4)]=c,h[s(0x13a)]=d,h['guid']=e,h[s(0x129)]=g,await h[s(0x14c)](f[s(0x163)][s(0x17c)]),await h['initStoreChannel'](f[s(0x163)][s(0x17c)]),await h[s(0x171)](f[s(0x163)][s(0x14d)],f[s(0x163)][s(0x10a)]??f['engine'][s(0x17c)]),await h[s(0x144)](f[s(0x163)][s(0xc2)],f[s(0x163)][s(0x17c)]),h[s(0xde)]=await h[s(0xcf)](f);const i=h[s(0x17c)][s(0x126)](key_1['KeyType']['STREAMS'],{'appId':h[s(0x13a)]});return h[s(0xde)]['consumeMessages'](i,s(0xc9),h['guid'],h[s(0xdb)]['bind'](h)),h[s(0x13f)]=new task_1[(s(0x100))](h[s(0x17c)],g),h[s(0xda)]=new exporter_1['ExporterService'](h[s(0x13a)],h['store'],g),h['inited']=(0x0,utils_1[s(0x14e)])(new Date()),h;}}[p(0x16e)](c){const t=p;if(!(0x0,utils_1['identifyProvider'])(c[t(0x163)][t(0x17c)])||!(0x0,utils_1[t(0x105)])(c[t(0x163)][t(0xc2)])||!(0x0,utils_1[t(0x105)])(c['engine'][t(0x14d)]))throw new Error(t(0x181));}async[p(0x14c)](c,d){const u=p;this[u(0x124)]=await factory_1[u(0x117)][u(0xe3)](c,d,this[u(0xf4)],this[u(0x13a)],this[u(0x129)]);}async[p(0x12b)](c){const v=p;this[v(0x17c)]=await factory_2['StoreServiceFactory'][v(0xe3)](c,this['namespace'],this[v(0x13a)],this[v(0x129)]);}async[p(0x171)](c,d){const w=p;this['subscribe']=await factory_4[w(0x166)]['init'](c,d,this[w(0xf4)],this[w(0x13a)],this[w(0xe0)],this[w(0x129)]);}async['initStreamChannel'](c,d){const x=p;this[x(0xc2)]=await factory_3[x(0xff)][x(0xe3)](c,d,this[x(0xf4)],this[x(0x13a)],this[x(0x129)]);}async[p(0xcf)](c){const y=p,d=await this[y(0x17c)]['getThrottleRate'](':');return new router_1[(y(0x189))]({'namespace':this['namespace'],'appId':this['appId'],'guid':this['guid'],'role':stream_1[y(0xc1)]['ENGINE'],'reclaimDelay':c[y(0x163)][y(0x132)],'reclaimCount':c[y(0x163)][y(0xd9)],'throttle':d,'readonly':c[y(0x163)][y(0x142)]},this['stream'],this['logger']);}async['fetchAndVerifyVID'](c,d=0x0){const z=p;if(isNaN(Number(c[z(0x18d)]))){const e=await this['store'][z(0x183)](c['id'],!![]);if(!isNaN(Number(e[z(0x18d)]))){if(!this[z(0x169)])this[z(0x169)]={};return this['apps'][c['id']]=e,{'id':c['id'],'version':e[z(0x18d)]};}else{if(d<0xa)return await(0x0,utils_1['sleepFor'])(enums_1[z(0x11d)]*0x2),await this[z(0x122)](c,d+0x1);else this[z(0x129)]['error']('engine-vid-resolution-error',{'id':c['id'],'guid':this[z(0xe0)]});}}return c;}async[p(0xc6)](c){const A=p;if(this[A(0x109)]==='nocache'){const d=await this[A(0x17c)]['getApp'](this[A(0x13a)],!![]);if(d[A(0x18d)][A(0x187)]()===this['untilVersion'][A(0x187)]()){if(!this[A(0x169)])this[A(0x169)]={};this['apps'][this['appId']]=d,this[A(0x175)](A(0x107),d[A(0x18d)][A(0x187)]());}return{'id':this[A(0x13a)],'version':d['version']};}else return!this[A(0x169)]&&c?(this['apps']={},this['apps'][this[A(0x13a)]]=c,c):await this['fetchAndVerifyVID']({'id':this[A(0x13a)],'version':this['apps']?.[this['appId']]['version']});}[p(0x175)](c,d){const B=p;this[B(0x129)][B(0xe2)](B(0xdd),{'mode':c,[c===B(0x107)?B(0x13b):B(0x188)]:d}),this[B(0x109)]=c,this[B(0x15b)]=d;}async[p(0xd2)](c,d){const C=p,e=this[C(0xd7)][d[C(0x11e)][C(0x176)]];e&&(this[C(0x103)](d[C(0x11e)]['jid']),e(c,d));}async['processWebHooks'](){const D=p;this['taskService'][D(0x145)](this['hook'][D(0x18b)](this));}async[p(0x155)](){const E=p;this[E(0x13f)][E(0x155)](this[E(0xfb)][E(0x18b)](this));}async[p(0xcb)](c){const F=p;try{this[F(0xde)]?.[F(0x136)](c);}catch(d){this['logger'][F(0x170)](F(0xf0),{'error':d});}}async[p(0xe7)](c,d={},e){const G=p,[f,g]=await this[G(0xdf)](c),h=activities_1[G(0xfa)][g[G(0x152)]];if(h){const i=(0x0,utils_1[G(0x14e)])(new Date()),j={'aid':f,'atp':g[G(0x152)],'stp':g[G(0x184)],'ac':i,'au':i},k=null;return new h(g,d,j,k,this,e);}else throw new Error('activity\x20type\x20'+g['type']+G(0xe8));}async[p(0xdf)](c){const H=p,d=await this[H(0x17c)][H(0x183)](this[H(0x13a)]);if(!d)throw new Error(H(0x116)+this[H(0x13a)]);if(this[H(0x18c)](c)){const e=c[H(0x16b)](0x1),f=await this[H(0x17c)][H(0xdf)](e,await this['getVID'](d));return[e,f];}else{const g=await this['store'][H(0xd5)](c,await this[H(0xc6)](d));if(g){const h=await this[H(0x17c)][H(0xdf)](g,await this[H(0xc6)](d));return[g,h];}}throw new Error(H(0xd1)+c+H(0x14b)+this[H(0x13a)]+H(0x13d)+d['version']);}async[p(0x17b)](){const I=p;return await this[I(0x17c)]['getSettings']();}[p(0x18c)](c){const J=p;return c[J(0x114)]('.');}async[p(0x15d)](c){const K=p,d=new compiler_1[(K(0xf2))](this[K(0x17c)],this[K(0xc2)],this['logger']);return await d[K(0x15d)](c);}async[p(0x15c)](c){const L=p,d=new compiler_1[(L(0xf2))](this[L(0x17c)],this[L(0xc2)],this[L(0x129)]);return await d[L(0x15c)](c);}async['getStats'](c,d){const M=p,{id:e,version:f}=await this[M(0xc6)](),g=new reporter_1[(M(0xd4))]({'id':e,'version':f},this['store'],this['logger']),h=await this[M(0x16a)](c,d);return await g[M(0x10c)](h);}async[p(0xed)](c,d,e=[]){const N=p,{id:f,version:g}=await this['getVID'](),h=new reporter_1[(N(0xd4))]({'id':f,'version':g},this[N(0x17c)],this[N(0x129)]),i=await this[N(0x16a)](c,d);return await h[N(0xed)](i,e);}async[p(0x16a)](c,d){const O=p,e=await this[O(0xe7)](c,d[O(0x10f)]);return await e[O(0x191)](),{'end':d[O(0x138)],'start':d[O(0x15e)],'range':d[O(0x186)],'granularity':e['resolveGranularity'](),'key':e['resolveJobKey'](e[O(0xc7)]()),'sparse':d['sparse']};}async[p(0xdb)](c){const P=p;this[P(0x129)][P(0x115)]('engine-process',{'jid':c[P(0x11e)]['jid'],'gid':c[P(0x11e)]['gid'],'dad':c[P(0x11e)][P(0x174)],'aid':c[P(0x11e)][P(0x173)],'status':c[P(0xdc)]||stream_1[P(0x15a)]['SUCCESS'],'code':c[P(0x18a)]||0xc8,'type':c[P(0x152)]});const d={'metadata':{'guid':c[P(0x11e)][P(0xe0)],'jid':c[P(0x11e)]['jid'],'gid':c[P(0x11e)][P(0xea)],'dad':c['metadata']['dad'],'aid':c[P(0x11e)][P(0x173)]},'data':c[P(0x10f)]};if(c['type']===stream_1['StreamDataType'][P(0x12e)]){const e=await this[P(0xe7)]('.'+c[P(0x11e)][P(0x173)],d[P(0x10f)],d);await e['processTimeHookEvent'](c['metadata'][P(0x176)]);}else{if(c[P(0x152)]===stream_1[P(0xf6)][P(0x130)]){const f=await this[P(0xe7)]('.'+c[P(0x11e)][P(0x173)],d[P(0x10f)],d);await f[P(0x10d)](c['status'],c[P(0x18a)]);}else{if(c[P(0x152)]===stream_1[P(0xf6)][P(0xcd)]){const g=await this[P(0xe7)]('.'+c['metadata']['aid'],d[P(0x10f)],d);await g[P(0xd3)]();}else{if(c[P(0x152)]===stream_1[P(0xf6)]['AWAIT']){d[P(0x11e)]={...d[P(0x11e)],'pj':c['metadata'][P(0x176)],'pg':c[P(0x11e)][P(0xea)],'pd':c[P(0x11e)][P(0x174)],'pa':c[P(0x11e)][P(0x173)],'px':c[P(0x11e)]['await']===![],'trc':c[P(0x11e)][P(0x112)],'spn':c[P(0x11e)][P(0x168)]};const h=await this[P(0xe7)](c[P(0x11e)][P(0x179)],c[P(0x10f)],d);await h['process']();}else{if(c[P(0x152)]===stream_1[P(0xf6)]['RESULT']){const i=await this['initActivity']('.'+d['metadata'][P(0x173)],c[P(0x10f)],d);await i['processEvent'](c[P(0xdc)],c[P(0x18a)]);}else{const j=await this[P(0xe7)]('.'+c[P(0x11e)][P(0x173)],c[P(0x10f)],d);await j[P(0x133)](c[P(0xdc)],c[P(0x18a)],'output');}}}}}this[P(0x129)]['debug'](P(0x167),{'jid':c[P(0x11e)][P(0x176)],'gid':c['metadata'][P(0xea)],'aid':c[P(0x11e)][P(0x173)]});}async[p(0x10b)](c,d,e=![]){const Q=p;if(this[Q(0x119)](c)){const f=this[Q(0x143)](d[Q(0x11e)]),g=c['$self']?.['output']?.[Q(0x11e)]?.['l2s']||c[Q(0xf8)]?.[Q(0xf5)]?.['metadata']?.[Q(0x159)],h={'metadata':{'guid':(0x0,utils_1[Q(0xe0)])(),'jid':c[Q(0x11e)]['pj'],'gid':c['metadata']['pg'],'dad':c[Q(0x11e)]['pd'],'aid':c[Q(0x11e)]['pa'],'trc':c['metadata'][Q(0x112)],'spn':g},'type':stream_1['StreamDataType'][Q(0xd0)],'data':d[Q(0x10f)]};if(f&&f['code'])h['status']=stream_1[Q(0x15a)][Q(0xee)],h[Q(0x10f)]=f,h[Q(0x18a)]=f[Q(0x18a)],h[Q(0x120)]=f['stack'];else e?(h[Q(0xdc)]=stream_1[Q(0x15a)][Q(0xc4)],h['code']=enums_1[Q(0x154)]):(h[Q(0xdc)]=stream_1[Q(0x15a)][Q(0x18e)],h[Q(0x18a)]=enums_1[Q(0xf1)]);return await this[Q(0xde)]?.[Q(0xe4)](null,h);}}[p(0x119)](c,d=![]){const R=p;if(d)return Boolean(c[R(0x11e)]['pj']&&c[R(0x11e)]['pa']&&!c[R(0x11e)]['px']);return Boolean(c[R(0x11e)]['pj']&&c[R(0x11e)]['pa']);}['resolveError'](c){const S=p;if(c&&c[S(0x153)])return JSON[S(0xce)](c[S(0x153)]);}async[p(0xe9)](c,d,e={}){const T=p;await this[T(0x17c)]['interrupt'](c,d,e);const f=await this['getState'](c,d),g={'interrupt':e[T(0x18f)],'expire':e[T(0xca)]};return await this[T(0xfd)](f,g);}async[p(0x192)](c){const U=p;await this['store'][U(0x192)](c);}async[p(0x147)](c,d,e=stream_1[p(0x15a)][p(0x18e)],f=0xc8){const V=p,g=await this['taskService'][V(0x172)](c),[h]=await this[V(0xdf)]('.'+g['to']),i={'type':stream_1['StreamDataType']['WEBHOOK'],'status':e,'code':f,'metadata':{'guid':(0x0,utils_1[V(0xe0)])(),'aid':h,'topic':c},'data':d};return await this[V(0xde)]?.[V(0xe4)](null,i);}async[p(0xfb)](c,d,e,f){const W=p;if(f==='interrupt'||f==='expire')return await this['interrupt'](e,c,{'suppress':!![],'expire':0x1});const [g,...h]=e[W(0xfc)](','),i=','+h['join'](','),j={'type':stream_1[W(0xf6)][W(0x12e)],'metadata':{'guid':(0x0,utils_1[W(0xe0)])(),'jid':c,'gid':d,'dad':i,'aid':g},'data':{'timestamp':Date[W(0x14a)]()}};await this[W(0xde)]?.[W(0xe4)](null,j);}async[p(0x146)](c,d,e,f=[]){const X=p,g=await this[X(0xc6)](),h=await this[X(0x13f)]['getHookRule'](c);if(h){const i=await(0x0,utils_1['getSubscriptionTopic'])(h['to'],this[X(0x17c)],g),j=await this[X(0x16a)](i,e),k=new reporter_1[(X(0xd4))](g,this[X(0x17c)],this[X(0x129)]),l=await k[X(0x108)](j,f);if(l[X(0x110)]){const m=new task_1[(X(0x100))](this[X(0x17c)],this[X(0x129)]);await m[X(0xe1)](l[X(0x157)](n=>[c,n,e[X(0x192)]||![],JSON['stringify'](d)][X(0x10e)](key_1['VALSEP']))),this[X(0x121)]['publish'](key_1[X(0x135)][X(0xf7)],{'type':X(0x123),'originator':this[X(0xe0)]},this[X(0x13a)]);}return l;}else throw new Error(X(0x180)+c);}async[p(0x10a)](c,d,e,f){const Y=p,g=await this[Y(0xe7)](c,d,e);if(g)return await g[Y(0xd3)](f);else throw new Error(Y(0xd6)+c);}async[p(0x14d)](c,d){const a0=p,e=async(f,g)=>{const Z=b;d(g[Z(0x179)],g[Z(0x17e)]);};return await this[a0(0x121)]['subscribe'](key_1[a0(0x135)][a0(0xf7)],e,this[a0(0x13a)],c);}async[p(0x12a)](c){const a1=p;return await this[a1(0x121)][a1(0x106)](key_1[a1(0x135)][a1(0xf7)],this['appId'],c);}async['psub'](c,d){const a3=p,e=async(f,g)=>{const a2=b;d(g[a2(0x179)],g[a2(0x17e)]);};return await this[a3(0x121)][a3(0xcc)](key_1[a3(0x135)][a3(0xf7)],e,this['appId'],c);}async[p(0xfe)](c){const a4=p;return await this['subscribe']['punsubscribe'](key_1[a4(0x135)]['QUORUM'],this[a4(0x13a)],c);}async[p(0x11a)](c,d,e,f=enums_1['HMSH_OTT_WAIT_TIME']){const a5=p;e={'metadata':{'ngn':this[a5(0xe0)],'trc':e?.[a5(0x11e)]?.[a5(0x112)],'spn':e?.[a5(0x11e)]?.['spn']}};const g=await this[a5(0x10a)](c,d,e);return new Promise((h,i)=>{const a6=a5;this[a6(0xef)](g,(j,k)=>{const a7=a6;if(k[a7(0x11e)]['err']){const l=JSON['parse'](k[a7(0x11e)][a7(0x153)]);i({'error':l,'job_id':k[a7(0x11e)][a7(0x176)]});}else h(k);}),setTimeout(()=>{const a8=a6;this['delistJobCallback'](g),i({'code':enums_1[a8(0x182)],'message':a8(0xec),'job_id':g});},f);});}async['pubOneTimeSubs'](c,d,e=![]){const a9=p;if(this[a9(0xeb)](c)){const f={'type':a9(0x17e),'topic':c[a9(0x11e)][a9(0x176)],'job':(0x0,utils_1[a9(0xc8)])(d)};this[a9(0x121)][a9(0x11c)](key_1[a9(0x135)][a9(0xf7)],f,this[a9(0x13a)],c[a9(0x11e)][a9(0x177)]);}}async[p(0x127)](c){const aa=p,d=await this['getVID'](),e=c[aa(0x11e)][aa(0x173)]||c[aa(0xf8)]?.['output']?.['metadata']?.['aid'],f=await this[aa(0x17c)][aa(0xdf)](e,d);return f[aa(0xe5)];}async[p(0x148)](c,d,e=![]){const ab=p,f=await this['getPublishesTopic'](c);if(f){const g={'type':ab(0x17e),'topic':f,'job':(0x0,utils_1['restoreHierarchy'])(d)};this[ab(0x121)][ab(0x11c)](key_1[ab(0x135)][ab(0xf7)],g,this[ab(0x13a)],f+'.'+c[ab(0x11e)][ab(0x176)]);}}async['add'](c){const ac=p;return await this[ac(0xde)]?.[ac(0xe4)](null,c);}[p(0xef)](c,d){const ad=p;this[ad(0xd7)][c]=d;}[p(0x103)](c){const ae=p;delete this[ae(0xd7)][c];}[p(0xeb)](c){const af=p;return Boolean(c['metadata'][af(0x177)]);}async[p(0xfd)](c,d={}){const ag=p,e=this[ag(0x119)](c,!![]),f=this[ag(0xeb)](c),g=await this[ag(0x127)](c);let h;if(e||f||g){const i=await this[ag(0x191)](c[ag(0x11e)][ag(0x137)],c[ag(0x11e)][ag(0x176)]);h=await this[ag(0x10b)](c,i,d['emit']),this['pubOneTimeSubs'](c,i,d[ag(0x11b)]),this[ag(0x148)](c,i,d['emit']);}return!d['emit']&&this[ag(0x13f)][ag(0x150)](c[ag(0x11e)][ag(0x176)],this[ag(0x16f)](c,d),d),h;}[p(0x16f)](c,d){const ah=p;return d[ah(0xca)]??c[ah(0x11e)][ah(0xca)]??enums_1[ah(0x128)];}async['export'](c){const ai=p;return await this[ai(0xda)][ai(0x139)](c);}async['getRaw'](c){const aj=p;return await this['store'][aj(0x156)](c);}async[p(0x12d)](c){const ak=p,{id:d}=await this['getVID']();return await this[ak(0x17c)][ak(0x12d)](c,d);}async[p(0x191)](c,d){const al=p,e=await this[al(0x17c)][al(0x14f)]('$'+c),f={['$'+c]:Object[al(0x111)](e)},g={},h=await this[al(0x17c)][al(0x191)](d,f,g);if(!h)throw new Error(al(0x104)+d);const [i,j]=h,k=(0x0,utils_1[al(0xc8)])(i);return j&&k[al(0x11e)]&&(k['metadata']['js']=j),k;}async[p(0x13e)](c,d){const am=p;return await this[am(0x17c)]['getQueryState'](c,d);}async[p(0x102)](c){const an=p,d=await this['store'][an(0x17d)](),e=Object['keys'](d)['length'],f=Math[an(0x140)](0x34,0x2)-0x1,g=serializer_1[an(0x164)][an(0x151)](e,f,d,new Set(c));return await this[an(0x17c)][an(0x134)](g);}}exports[p(0x161)]=EngineService;
1
+ 'use strict';const q=b;(function(c,d){const o=b,e=c();while(!![]){try{const f=parseInt(o(0x1e5))/0x1*(parseInt(o(0x155))/0x2)+-parseInt(o(0x1f5))/0x3+-parseInt(o(0x1ef))/0x4+parseInt(o(0x18b))/0x5*(-parseInt(o(0x17c))/0x6)+-parseInt(o(0x1a3))/0x7+-parseInt(o(0x1fa))/0x8+parseInt(o(0x1cf))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xad42b));var __importDefault=this&&this['__importDefault']||function(c){const p=b;return c&&c[p(0x17e)]?c:{'default':c};};Object[q(0x1dd)](exports,q(0x17e),{'value':!![]}),exports[q(0x15a)]=void 0x0;const key_1=require(q(0x1fb)),enums_1=require(q(0x170)),utils_1=require(q(0x1c4)),activities_1=__importDefault(require('../activities')),compiler_1=require(q(0x153)),exporter_1=require(q(0x146)),reporter_1=require(q(0x158)),router_1=require('../router'),serializer_1=require(q(0x1b7)),factory_1=require(q(0x1a7)),factory_2=require(q(0x1c1)),factory_3=require(q(0x156)),factory_4=require('../sub/factory'),task_1=require('../task'),stream_1=require(q(0x15b));class EngineService{constructor(){const r=q;this['cacheMode']='cache',this[r(0x13b)]=null,this[r(0x172)]={},this[r(0x1cb)]=![],this[r(0x150)]=0x1;}static async['init'](c,d,e,f,g){const s=q;if(f['engine']){const h=new EngineService();h[s(0x183)](f),h[s(0x1d9)]=c,h['appId']=d,h[s(0x16a)]=e,h['logger']=g,await h[s(0x16c)](f[s(0x1de)]['store']),await h['initStoreChannel'](f[s(0x1de)][s(0x1a2)]),await h[s(0x142)](f['engine'][s(0x1b8)],f[s(0x1de)][s(0x1d0)]??f[s(0x1de)][s(0x1a2)]),await h[s(0x1dc)](f[s(0x1de)][s(0x1a8)],f[s(0x1de)][s(0x1a2)]),h[s(0x1e8)]=await h['initRouter'](f);const i=h[s(0x1a2)][s(0x19b)](key_1[s(0x191)][s(0x1c0)],{'appId':h[s(0x13a)]});return h[s(0x1e8)][s(0x147)](i,s(0x1b5),h['guid'],h['processStreamMessage'][s(0x141)](h)),h['taskService']=new task_1['TaskService'](h[s(0x1a2)],g),h[s(0x1fc)]=new exporter_1[(s(0x1e6))](h[s(0x13a)],h[s(0x1a2)],g),h[s(0x1ee)]=(0x0,utils_1['formatISODate'])(new Date()),h;}}[q(0x183)](c){const t=q;if(!(0x0,utils_1[t(0x1d5)])(c[t(0x1de)][t(0x1a2)])||!(0x0,utils_1[t(0x1d5)])(c['engine']['stream'])||!(0x0,utils_1[t(0x1d5)])(c['engine'][t(0x1b8)]))throw new Error('engine\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields.');}async[q(0x16c)](c,d){const u=q;this[u(0x143)]=await factory_1[u(0x18e)][u(0x1e4)](c,d,this[u(0x1d9)],this[u(0x13a)],this[u(0x1f9)]);}async[q(0x14e)](c){const v=q;this[v(0x1a2)]=await factory_2[v(0x1c8)][v(0x1e4)](c,this[v(0x1d9)],this['appId'],this[v(0x1f9)]);}async[q(0x142)](c,d){const w=q;this[w(0x1f1)]=await factory_4['SubServiceFactory']['init'](c,d,this[w(0x1d9)],this[w(0x13a)],this[w(0x16a)],this[w(0x1f9)]);}async[q(0x1dc)](c,d){const x=q;this[x(0x1a8)]=await factory_3[x(0x178)][x(0x1e4)](c,d,this[x(0x1d9)],this[x(0x13a)],this[x(0x1f9)]);}async[q(0x185)](c){const y=q,d=await this['store']['getThrottleRate'](':');return new router_1[(y(0x14f))]({'namespace':this[y(0x1d9)],'appId':this[y(0x13a)],'guid':this['guid'],'role':stream_1['StreamRole']['ENGINE'],'reclaimDelay':c['engine'][y(0x16e)],'reclaimCount':c[y(0x1de)][y(0x177)],'throttle':d,'readonly':c['engine'][y(0x1b4)]},this[y(0x1a8)],this[y(0x1f9)]);}async[q(0x18a)](c,d=0x0){const z=q;if(isNaN(Number(c[z(0x15e)]))){const e=await this['store'][z(0x1e9)](c['id'],!![]);if(!isNaN(Number(e[z(0x15e)]))){if(!this[z(0x136)])this[z(0x136)]={};return this['apps'][c['id']]=e,{'id':c['id'],'version':e[z(0x15e)]};}else{if(d<0xa)return await(0x0,utils_1['sleepFor'])(enums_1['HMSH_QUORUM_DELAY_MS']*0x2),await this[z(0x18a)](c,d+0x1);else this['logger'][z(0x1a0)](z(0x1a1),{'id':c['id'],'guid':this[z(0x16a)]});}}return c;}async['getVID'](c){const A=q;if(this[A(0x1ab)]===A(0x13d)){const d=await this[A(0x1a2)]['getApp'](this['appId'],!![]);if(d['version'][A(0x151)]()===this[A(0x13b)][A(0x151)]()){if(!this[A(0x136)])this['apps']={};this[A(0x136)][this['appId']]=d,this[A(0x14d)]('cache',d[A(0x15e)][A(0x151)]());}return{'id':this[A(0x13a)],'version':d[A(0x15e)]};}else return!this[A(0x136)]&&c?(this['apps']={},this[A(0x136)][this[A(0x13a)]]=c,c):await this[A(0x18a)]({'id':this['appId'],'version':this['apps']?.[this[A(0x13a)]][A(0x15e)]});}[q(0x14d)](c,d){const B=q;this[B(0x1f9)][B(0x16d)](B(0x164),{'mode':c,[c===B(0x195)?B(0x1b0):B(0x1f2)]:d}),this[B(0x1ab)]=c,this[B(0x13b)]=d;}async[q(0x1e1)](c,d){const C=q,e=this[C(0x172)][d[C(0x19e)]['jid']];e&&(this[C(0x1f6)](d[C(0x19e)][C(0x199)]),e(c,d));}async[q(0x171)](){const D=q;this[D(0x145)][D(0x171)](this[D(0x184)][D(0x141)](this));}async['processTimeHooks'](){const E=q;this['taskService']['processTimeHooks'](this['hookTime'][E(0x141)](this));}async['throttle'](c){const F=q;try{this[F(0x1e8)]?.[F(0x197)](c);}catch(d){this[F(0x1f9)]['error'](F(0x194),{'error':d});}}async['initActivity'](c,d={},e){const G=q,[f,g]=await this[G(0x135)](c),h=activities_1['default'][g[G(0x1fd)]];if(h){const i=(0x0,utils_1[G(0x1ca)])(new Date()),j={'aid':f,'atp':g[G(0x1fd)],'stp':g['subtype'],'ac':i,'au':i},k=null;return new h(g,d,j,k,this,e);}else throw new Error(G(0x167)+g['type']+G(0x1c3));}async[q(0x135)](c){const H=q,d=await this[H(0x1a2)][H(0x1e9)](this[H(0x13a)]);if(!d)throw new Error(H(0x1df)+this[H(0x13a)]);if(this['isPrivate'](c)){const e=c[H(0x13c)](0x1),f=await this[H(0x1a2)][H(0x135)](e,await this[H(0x166)](d));return[e,f];}else{const g=await this['store']['getSubscription'](c,await this[H(0x166)](d));if(g){const h=await this[H(0x1a2)][H(0x135)](g,await this[H(0x166)](d));return[g,h];}}throw new Error('no\x20subscription\x20found\x20for\x20topic\x20'+c+'\x20in\x20app\x20'+this[H(0x13a)]+H(0x17b)+d[H(0x15e)]);}async[q(0x140)](){const I=q;return await this[I(0x1a2)]['getSettings']();}[q(0x1b9)](c){const J=q;return c[J(0x1ec)]('.');}async[q(0x1d1)](c){const K=q,d=new compiler_1[(K(0x17d))](this[K(0x1a2)],this[K(0x1a8)],this[K(0x1f9)]);return await d[K(0x1d1)](c);}async['deploy'](c){const L=q,d=new compiler_1[(L(0x17d))](this[L(0x1a2)],this[L(0x1a8)],this[L(0x1f9)]);return await d[L(0x1a6)](c);}async[q(0x180)](c,d){const M=q,{id:e,version:f}=await this[M(0x166)](),g=new reporter_1[(M(0x189))]({'id':e,'version':f},this[M(0x1a2)],this[M(0x1f9)]),h=await this[M(0x162)](c,d);return await g[M(0x180)](h);}async[q(0x1d3)](c,d,e=[]){const N=q,{id:f,version:g}=await this[N(0x166)](),h=new reporter_1[(N(0x189))]({'id':f,'version':g},this[N(0x1a2)],this[N(0x1f9)]),i=await this[N(0x162)](c,d);return await h[N(0x1d3)](i,e);}async['resolveQuery'](c,d){const O=q,e=await this[O(0x19d)](c,d[O(0x1f7)]);return await e[O(0x1aa)](),{'end':d[O(0x181)],'start':d['start'],'range':d['range'],'granularity':e[O(0x1c5)](),'key':e['resolveJobKey'](e[O(0x1d7)]()),'sparse':d[O(0x160)]};}async['processStreamMessage'](c){const P=q;this[P(0x1f9)][P(0x14c)](P(0x168),{'jid':c[P(0x19e)][P(0x199)],'gid':c['metadata'][P(0x15f)],'dad':c[P(0x19e)][P(0x1cd)],'aid':c[P(0x19e)][P(0x1e7)],'status':c['status']||stream_1[P(0x187)]['SUCCESS'],'code':c[P(0x179)]||0xc8,'type':c['type']});const d={'metadata':{'guid':c[P(0x19e)][P(0x16a)],'jid':c[P(0x19e)][P(0x199)],'gid':c[P(0x19e)][P(0x15f)],'dad':c[P(0x19e)][P(0x1cd)],'aid':c['metadata'][P(0x1e7)]},'data':c[P(0x1f7)]};if(c[P(0x1fd)]===stream_1[P(0x137)][P(0x14a)]){const e=await this[P(0x19d)]('.'+c[P(0x19e)][P(0x1e7)],d[P(0x1f7)],d);await e[P(0x14b)](c[P(0x19e)][P(0x199)]);}else{if(c['type']===stream_1['StreamDataType'][P(0x16b)]){const f=await this[P(0x19d)]('.'+c[P(0x19e)][P(0x1e7)],d[P(0x1f7)],d);await f[P(0x1ae)](c['status'],c['code']);}else{if(c[P(0x1fd)]===stream_1[P(0x137)][P(0x188)]){const g=await this[P(0x19d)]('.'+c[P(0x19e)]['aid'],d[P(0x1f7)],d);await g[P(0x1d2)]();}else{if(c[P(0x1fd)]===stream_1['StreamDataType'][P(0x1f0)]){d[P(0x19e)]={...d[P(0x19e)],'pj':c['metadata'][P(0x199)],'pg':c[P(0x19e)][P(0x15f)],'pd':c['metadata'][P(0x1cd)],'pa':c[P(0x19e)][P(0x1e7)],'px':c['metadata'][P(0x1e3)]===![],'trc':c[P(0x19e)][P(0x157)],'spn':c[P(0x19e)][P(0x1b3)]};const h=await this['initActivity'](c[P(0x19e)][P(0x1ed)],c[P(0x1f7)],d);await h[P(0x1d2)]();}else{if(c[P(0x1fd)]===stream_1[P(0x137)]['RESULT']){const i=await this[P(0x19d)]('.'+d[P(0x19e)][P(0x1e7)],c[P(0x1f7)],d);await i[P(0x1ba)](c[P(0x1b2)],c['code']);}else{const j=await this['initActivity']('.'+c[P(0x19e)][P(0x1e7)],c['data'],d);await j['processEvent'](c[P(0x1b2)],c[P(0x179)],P(0x152));}}}}}this[P(0x1f9)][P(0x14c)](P(0x18d),{'jid':c[P(0x19e)][P(0x199)],'gid':c[P(0x19e)][P(0x15f)],'aid':c[P(0x19e)][P(0x1e7)]});}async['execAdjacentParent'](c,d,e=![]){const Q=q;if(this['hasParentJob'](c)){const f=this[Q(0x1c2)](d[Q(0x19e)]),g=c[Q(0x192)]?.['output']?.[Q(0x19e)]?.[Q(0x15d)]||c[Q(0x192)]?.[Q(0x152)]?.[Q(0x19e)]?.[Q(0x193)],h={'metadata':{'guid':(0x0,utils_1[Q(0x16a)])(),'jid':c['metadata']['pj'],'gid':c[Q(0x19e)]['pg'],'dad':c[Q(0x19e)]['pd'],'aid':c['metadata']['pa'],'trc':c[Q(0x19e)][Q(0x157)],'spn':g},'type':stream_1['StreamDataType'][Q(0x174)],'data':d[Q(0x1f7)]};if(f&&f[Q(0x179)])h[Q(0x1b2)]=stream_1[Q(0x187)]['ERROR'],h[Q(0x1f7)]=f,h['code']=f[Q(0x179)],h['stack']=f[Q(0x19c)];else e?(h[Q(0x1b2)]=stream_1['StreamStatus'][Q(0x1f8)],h[Q(0x179)]=enums_1[Q(0x1c9)]):(h[Q(0x1b2)]=stream_1[Q(0x187)]['SUCCESS'],h[Q(0x179)]=enums_1[Q(0x1a5)]);return await this[Q(0x1e8)]?.[Q(0x1d6)](null,h);}}[q(0x144)](c,d=![]){const R=q;if(d)return Boolean(c[R(0x19e)]['pj']&&c[R(0x19e)]['pa']&&!c[R(0x19e)]['px']);return Boolean(c[R(0x19e)]['pj']&&c['metadata']['pa']);}[q(0x1c2)](c){const S=q;if(c&&c[S(0x1af)])return JSON[S(0x139)](c['err']);}async[q(0x1eb)](c,d,e={}){const T=q;await this[T(0x1a2)][T(0x1eb)](c,d,e);const f=await this['getState'](c,d),g={'interrupt':e['descend'],'expire':e[T(0x1c7)]};return await this['runJobCompletionTasks'](f,g);}async[q(0x13f)](c){const U=q;await this[U(0x1a2)][U(0x13f)](c);}async[q(0x184)](c,d,e=stream_1['StreamStatus'][q(0x1bf)],f=0xc8){const V=q,g=await this[V(0x145)]['getHookRule'](c),[h]=await this[V(0x135)]('.'+g['to']),i={'type':stream_1['StreamDataType'][V(0x16b)],'status':e,'code':f,'metadata':{'guid':(0x0,utils_1[V(0x16a)])(),'aid':h,'topic':c},'data':d};return await this[V(0x1e8)]?.[V(0x1d6)](null,i);}async[q(0x1b6)](c,d,e,f){const W=q;if(f===W(0x1eb)||f==='expire')return await this[W(0x1eb)](e,c,{'suppress':!![],'expire':0x1});const [g,...h]=e[W(0x1d8)](','),i=','+h[W(0x17a)](','),j={'type':stream_1[W(0x137)][W(0x14a)],'metadata':{'guid':(0x0,utils_1[W(0x16a)])(),'jid':c,'gid':d,'dad':i,'aid':g},'data':{'timestamp':Date[W(0x175)]()}};await this[W(0x1e8)]?.[W(0x1d6)](null,j);}async[q(0x1da)](c,d,e,f=[]){const X=q,g=await this['getVID'](),h=await this[X(0x145)][X(0x1e2)](c);if(h){const i=await(0x0,utils_1[X(0x1c6)])(h['to'],this[X(0x1a2)],g),j=await this[X(0x162)](i,e),k=new reporter_1['ReporterService'](g,this[X(0x1a2)],this['logger']),l=await k[X(0x1be)](j,f);if(l[X(0x198)]){const m=new task_1['TaskService'](this[X(0x1a2)],this['logger']);await m['enqueueWorkItems'](l[X(0x18f)](n=>[c,n,e[X(0x13f)]||![],JSON[X(0x1ea)](d)]['join'](key_1[X(0x1d4)]))),this[X(0x1f1)][X(0x1bb)](key_1[X(0x191)][X(0x173)],{'type':'work','originator':this[X(0x16a)]},this[X(0x13a)]);}return l;}else throw new Error(X(0x163)+c);}async[q(0x1d0)](c,d,e,f){const Y=q,g=await this[Y(0x19d)](c,d,e);if(g)return await g['process'](f);else throw new Error(Y(0x154)+c);}async[q(0x1b8)](c,d){const Z=q,e=async(f,g)=>{d(g['topic'],g['job']);};return await this['subscribe'][Z(0x1f1)](key_1['KeyType'][Z(0x173)],e,this[Z(0x13a)],c);}async[q(0x1a9)](c){const a0=q;return await this[a0(0x1f1)][a0(0x13e)](key_1[a0(0x191)][a0(0x173)],this[a0(0x13a)],c);}async[q(0x1bc)](c,d){const a2=q,e=async(f,g)=>{const a1=b;d(g[a1(0x1ed)],g['job']);};return await this[a2(0x1f1)]['psubscribe'](key_1['KeyType'][a2(0x173)],e,this[a2(0x13a)],c);}async[q(0x134)](c){const a3=q;return await this[a3(0x1f1)]['punsubscribe'](key_1[a3(0x191)][a3(0x173)],this[a3(0x13a)],c);}async[q(0x19a)](c,d,e,f=enums_1['HMSH_OTT_WAIT_TIME']){const a4=q;e={'metadata':{'ngn':this[a4(0x16a)],'trc':e?.[a4(0x19e)]?.[a4(0x157)],'spn':e?.['metadata']?.[a4(0x1b3)]}};const g=await this[a4(0x1d0)](c,d,e);return new Promise((h,i)=>{const a5=a4;this[a5(0x1b1)](g,(j,k)=>{const a6=a5;if(k['metadata'][a6(0x1af)]){const l=JSON[a6(0x139)](k[a6(0x19e)][a6(0x1af)]);i({'error':l,'job_id':k[a6(0x19e)][a6(0x199)]});}else h(k);}),setTimeout(()=>{const a7=a5;this[a7(0x1f6)](g),i({'code':enums_1[a7(0x1ad)],'message':'timeout','job_id':g});},f);});}async[q(0x169)](c,d,e=![]){const a8=q;if(this[a8(0x186)](c)){const f={'type':a8(0x161),'topic':c['metadata'][a8(0x199)],'job':(0x0,utils_1[a8(0x1f4)])(d)};this['subscribe'][a8(0x1bb)](key_1['KeyType'][a8(0x173)],f,this[a8(0x13a)],c[a8(0x19e)]['ngn']);}}async[q(0x149)](c){const a9=q,d=await this[a9(0x166)](),e=c[a9(0x19e)][a9(0x1e7)]||c['$self']?.[a9(0x152)]?.[a9(0x19e)]?.[a9(0x1e7)],f=await this[a9(0x1a2)]['getSchema'](e,d);return f[a9(0x17f)];}async[q(0x159)](c,d,e=![]){const aa=q,f=await this[aa(0x149)](c);if(f){const g={'type':'job','topic':f,'job':(0x0,utils_1[aa(0x1f4)])(d)};this[aa(0x1f1)][aa(0x1bb)](key_1['KeyType'][aa(0x173)],g,this['appId'],f+'.'+c[aa(0x19e)][aa(0x199)]);}}async[q(0x1a4)](c){const ab=q;return await this[ab(0x1e8)]?.[ab(0x1d6)](null,c);}[q(0x1b1)](c,d){const ac=q;this[ac(0x172)][c]=d;}['delistJobCallback'](c){const ad=q;delete this[ad(0x172)][c];}['hasOneTimeSubscription'](c){const ae=q;return Boolean(c['metadata'][ae(0x1ce)]);}async[q(0x1ac)](c,d={}){const af=q,e=this['hasParentJob'](c,!![]),f=this[af(0x186)](c),g=await this[af(0x149)](c);let h;if(e||f||g){const i=await this[af(0x1aa)](c[af(0x19e)][af(0x138)],c['metadata']['jid']);h=await this[af(0x190)](c,i,d[af(0x15c)]),this[af(0x169)](c,i,d[af(0x15c)]),this[af(0x159)](c,i,d['emit']);}return!d[af(0x15c)]&&this[af(0x145)][af(0x16f)](c['metadata'][af(0x199)],this[af(0x1e0)](c,d),d),h;}[q(0x1e0)](c,d){const ag=q;return d[ag(0x1c7)]??c[ag(0x19e)][ag(0x1c7)]??enums_1[ag(0x19f)];}async[q(0x1cc)](c){const ah=q;return await this[ah(0x1fc)][ah(0x1cc)](c);}async[q(0x196)](c){const ai=q;return await this[ai(0x1a2)][ai(0x196)](c);}async[q(0x1f3)](c){const aj=q,{id:d}=await this[aj(0x166)]();return await this[aj(0x1a2)]['getStatus'](c,d);}async[q(0x1aa)](c,d){const ak=q,e=await this[ak(0x1a2)][ak(0x18c)]('$'+c),f={['$'+c]:Object[ak(0x1db)](e)},g={},h=await this['store']['getState'](d,f,g);if(!h)throw new Error(ak(0x1bd)+d);const [i,j]=h,k=(0x0,utils_1[ak(0x1f4)])(i);return j&&k[ak(0x19e)]&&(k['metadata']['js']=j),k;}async[q(0x182)](c,d){const al=q;return await this['store'][al(0x182)](c,d);}async['compress'](c){const am=q,d=await this[am(0x1a2)]['getSymbolValues'](),e=Object[am(0x1db)](d)['length'],f=Math[am(0x165)](0x34,0x2)-0x1,g=serializer_1['SerializerService'][am(0x176)](e,f,d,new Set(c));return await this[am(0x1a2)][am(0x148)](g);}}function b(c,d){const e=a();return b=function(f,g){f=f-0x134;let h=e[f];return h;},b(c,d);}exports[q(0x15a)]=EngineService;function a(){const an=['publishMessage','createInputContext','split','namespace','hookAll','keys','initStreamChannel','defineProperty','engine','no\x20app\x20found\x20for\x20id\x20','resolveExpires','routeToSubscribers','getHookRule','await','init','1vcqPDC','ExporterService','aid','router','getApp','stringify','interrupt','startsWith','topic','inited','2413056BOTcRM','AWAIT','subscribe','until','getStatus','restoreHierarchy','582492hAiVxX','delistJobCallback','data','PENDING','logger','8252968EnMZvX','../../modules/key','exporter','type','punsub','getSchema','apps','StreamDataType','tpc','parse','appId','untilVersion','substring','nocache','unsubscribe','scrub','getSettings','bind','initSubChannel','search','hasParentJob','taskService','../exporter','consumeMessages','addSymbolValues','getPublishesTopic','TIMEHOOK','processTimeHookEvent','debug','setCacheMode','initStoreChannel','Router','jobId','toString','output','../compiler','unable\x20to\x20process\x20activity\x20for\x20topic\x20','1501008ZHURkF','../stream/factory','trc','../reporter','pubPermSubs','EngineService','../../types/stream','emit','l2s','version','gid','sparse','job','resolveQuery','unable\x20to\x20find\x20hook\x20rule\x20for\x20topic\x20','engine-executable-cache','pow','getVID','activity\x20type\x20','engine-process','pubOneTimeSubs','guid','WEBHOOK','initSearchChannel','info','reclaimDelay','registerJobForCleanup','../../modules/enums','processWebHooks','jobCallbacks','QUORUM','RESULT','now','filterSymVals','reclaimCount','StreamServiceFactory','code','join','\x20for\x20app\x20version\x20','582054BKxHDL','CompilerService','__esModule','publishes','getStats','end','getQueryState','verifyEngineFields','hook','initRouter','hasOneTimeSubscription','StreamStatus','TRANSITION','ReporterService','fetchAndVerifyVID','55SzZaWn','getSymbols','engine-process-end','SearchServiceFactory','map','execAdjacentParent','KeyType','$self','l1s','engine-throttle-error','cache','getRaw','setThrottle','length','jid','pubsub','mintKey','stack','initActivity','metadata','HMSH_EXPIRE_JOB_SECONDS','error','engine-vid-resolution-error','store','9496746YrBHfv','add','HMSH_CODE_SUCCESS','deploy','../search/factory','stream','unsub','getState','cacheMode','runJobCompletionTasks','HMSH_CODE_TIMEOUT','processWebHookEvent','err','target','registerJobCallback','status','spn','readonly','ENGINE','hookTime','../serializer','sub','isPrivate','processEvent','publish','psub','not\x20found\x20','getWorkItems','SUCCESS','STREAMS','../store/factory','resolveError','\x20not\x20found','../../modules/utils','resolveGranularity','getSubscriptionTopic','expire','StoreServiceFactory','HMSH_CODE_PENDING','formatISODate','reporting','export','dad','ngn','37907973gYXbeT','pub','plan','process','getIds','VALSEP','identifyProvider'];a=function(){return an;};return a();}
@@ -1 +1 @@
1
- 'use strict';function a(){const H=['flow','../serializer','6336tCAlvv','logger','267yFLYQO','getRaw','../../modules/utils','SerializerService','split','fromString','__esModule','inflateKey','appId','inflateDependencyData','forEach','ExporterService','VALSEP','match','576149RvASzY','132803fMDTOn','symbols','store','entries','3584708QkYGeL','replace','65fTMUAJ','490422kOMKNB','restoreHierarchy','inflate','14868kSeaAZ','join','length','hook','other','17212030ECjvRE','9432dOAQVV','map'];a=function(){return H;};return a();}function b(c,d){const e=a();return b=function(f,g){f=f-0xde;let h=e[f];return h;},b(c,d);}const z=b;(function(c,d){const y=b,e=c();while(!![]){try{const f=parseInt(y(0xfe))/0x1+-parseInt(y(0xe3))/0x2*(parseInt(y(0xef))/0x3)+parseInt(y(0x102))/0x4+parseInt(y(0xdf))/0x5*(parseInt(y(0xe0))/0x6)+parseInt(y(0xfd))/0x7+parseInt(y(0xe9))/0x8*(parseInt(y(0xed))/0x9)+-parseInt(y(0xe8))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x979ff));Object['defineProperty'](exports,z(0xf5),{'value':!![]}),exports['ExporterService']=void 0x0;const key_1=require('../../modules/key'),utils_1=require(z(0xf1)),serializer_1=require(z(0xec));class ExporterService{constructor(c,d,e){const A=z;this[A(0xf7)]=c,this[A(0xee)]=e,this[A(0x100)]=d;}async['export'](c,d={}){const B=z;!this[B(0xff)]&&(this[B(0xff)]=this[B(0x100)]['getAllSymbols'](),this[B(0xff)]=await this[B(0xff)]);const e=[],f=await this[B(0x100)][B(0xf0)](c),g=this[B(0xe2)](f,e);return g;}[z(0xf6)](c){const C=z;return c in this[C(0xff)]?this['symbols'][c]:c;}[z(0xe2)](c,d){const D=z,e={'hooks':{},'main':{'cursor':-0x1,'items':[]}},f={},g=this[D(0xf8)](d,e),h=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object[D(0x101)](c)[D(0xf9)](([i,j])=>{const E=D,k=i[E(0xfc)](h);if(k){const [l,m,n]=k,o=this['inflateKey'](m),p=''+n[E(0xde)](/,/g,'/'),q=serializer_1[E(0xf2)]['fromString'](j);f[p+'/'+o]=q;}else i[E(0xe5)]===0x3&&(f[this['inflateKey'](i)]=serializer_1['SerializerService'][E(0xf4)](j));}),{'dependencies':g,'process':(0x0,utils_1[D(0xe1)])(f),'status':c[':']};}[z(0xf8)](c,d){const F=z,e=/([0-9,]+)-(\d+)$/,f=/-(\d+)$/;return c[F(0xea)]((g,h)=>{const G=F,[i,j,k,l,...m]=g['split'](key_1[G(0xfb)]),n=m[G(0xe4)](key_1['VALSEP']),o=n['match'](e);let p,q,r='';if(o){const [s,t,u]=o;r=t[G(0xf3)](',')['join']('/'),p=r+'['+u+']',q=G(0xe6);}else{const v=n[G(0xfc)](f);if(v){const [w,x]=v;p='['+x+']',q=G(0xeb);}else p='/',q=G(0xe7);}return{'type':i,'topic':j,'gid':k,'jid':n};});}}exports[z(0xfa)]=ExporterService;
1
+ 'use strict';const z=b;function b(c,d){const e=a();return b=function(f,g){f=f-0xc5;let h=e[f];return h;},b(c,d);}(function(c,d){const y=b,e=c();while(!![]){try{const f=-parseInt(y(0xcb))/0x1+-parseInt(y(0xe3))/0x2+-parseInt(y(0xdf))/0x3+parseInt(y(0xd4))/0x4+parseInt(y(0xd1))/0x5*(parseInt(y(0xdb))/0x6)+-parseInt(y(0xe4))/0x7*(parseInt(y(0xe5))/0x8)+-parseInt(y(0xcd))/0x9*(-parseInt(y(0xda))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xaca5d));function a(){const G=['inflateDependencyData','replace','logger','12891290GDhOtU','42fSPYuE','entries','forEach','VALSEP','388809EUdslq','inflateKey','../../modules/utils','split','499000quTpuq','14PreMSr','3374776Jhnkzx','length','../../modules/key','ExporterService','fromString','SerializerService','export','appId','1056256gFkUxv','defineProperty','9dKzChj','match','restoreHierarchy','store','828705MlWsJL','inflate','join','2147608vatnah','hook','symbols'];a=function(){return G;};return a();}Object[z(0xcc)](exports,'__esModule',{'value':!![]}),exports[z(0xc6)]=void 0x0;const key_1=require(z(0xc5)),utils_1=require(z(0xe1)),serializer_1=require('../serializer');class ExporterService{constructor(c,d,e){const A=z;this[A(0xca)]=c,this[A(0xd9)]=e,this[A(0xd0)]=d;}async[z(0xc9)](c,d={}){const B=z;!this['symbols']&&(this['symbols']=this['store']['getAllSymbols'](),this[B(0xd6)]=await this[B(0xd6)]);const e=[],f=await this[B(0xd0)]['getRaw'](c),g=this['inflate'](f,e);return g;}['inflateKey'](c){const C=z;return c in this['symbols']?this[C(0xd6)][c]:c;}[z(0xd2)](c,d){const D=z,e={'hooks':{},'main':{'cursor':-0x1,'items':[]}},f={},g=this[D(0xd7)](d,e),h=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object[D(0xdc)](c)[D(0xdd)](([i,j])=>{const E=D,k=i[E(0xce)](h);if(k){const [l,m,n]=k,o=this[E(0xe0)](m),p=''+n[E(0xd8)](/,/g,'/'),q=serializer_1[E(0xc8)][E(0xc7)](j);f[p+'/'+o]=q;}else i[E(0xe6)]===0x3&&(f[this[E(0xe0)](i)]=serializer_1[E(0xc8)][E(0xc7)](j));}),{'dependencies':g,'process':(0x0,utils_1[D(0xcf)])(f),'status':c[':']};}[z(0xd7)](c,d){const e=/([0-9,]+)-(\d+)$/,f=/-(\d+)$/;return c['map']((g,h)=>{const F=b,[i,j,k,l,...m]=g['split'](key_1[F(0xde)]),n=m[F(0xd3)](key_1[F(0xde)]),o=n['match'](e);let p,q,r='';if(o){const [s,t,u]=o;r=t[F(0xe2)](',')[F(0xd3)]('/'),p=r+'['+u+']',q=F(0xd5);}else{const v=n[F(0xce)](f);if(v){const [w,x]=v;p='['+x+']',q='flow';}else p='/',q='other';}return{'type':i,'topic':j,'gid':k,'jid':n};});}}exports[z(0xc6)]=ExporterService;
@@ -49,6 +49,9 @@ class HotMesh {
49
49
  }
50
50
  async initEngine(config, logger) {
51
51
  if (config.engine) {
52
+ if (config.engine.connection.readonly) {
53
+ config.engine.readonly = true;
54
+ }
52
55
  await factory_1.ConnectorService.initClients(config.engine);
53
56
  this.engine = await engine_1.EngineService.init(this.namespace, this.appId, this.guid, config, logger);
54
57
  }
@@ -1 +1 @@
1
- 'use strict';const m=b;function b(c,d){const e=a();return b=function(f,g){f=f-0xfb;let h=e[f];return h;},b(c,d);}(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x103))/0x1+parseInt(l(0xfe))/0x2*(parseInt(l(0x104))/0x3)+parseInt(l(0x119))/0x4*(parseInt(l(0x107))/0x5)+-parseInt(l(0x10d))/0x6*(parseInt(l(0x10a))/0x7)+-parseInt(l(0xfb))/0x8+parseInt(l(0x114))/0x9*(-parseInt(l(0xfd))/0xa)+parseInt(l(0x10f))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x1e1e6));Object['defineProperty'](exports,m(0xfc),{'value':!![]}),exports['MapperService']=void 0x0;const pipe_1=require('../pipe');function a(){const u=['MapperService','traverseRules','1146744RGEYZz','rules','evaluate','isArray','resolve','416YnseiR','896424oBdKzH','__esModule','10iJBfGV','1434loZBJW','object','gate','mapRules','toString','8707UxwCjg','966LRspsF','hasOwnProperty','data','10585qGBapI','code','Pipe','7jUhLgG','call','process','613506owraLB','boolean','250261szRoKW','forEach','@pipe'];a=function(){return u;};return a();}class MapperService{constructor(c,d){const n=m;this[n(0x115)]=c,this[n(0x106)]=d;}[m(0x101)](){const o=m;return this['traverseRules'](this[o(0x115)]);}['traverseRules'](c){const p=m;if(typeof c===p(0xff)&&p(0x111)in c)return this['pipe'](c[p(0x111)]);if(typeof c===p(0xff)&&c!==null){const d={};for(const e in c){Object['prototype'][p(0x105)][p(0x10b)](c,e)&&(d[e]=this[p(0x113)](c[e]));}return d;}else return this[p(0x118)](c);}['pipe'](c){const q=m,d=new pipe_1['Pipe'](c,this[q(0x106)]);return d['process']();}['resolve'](c){const r=m,d=new pipe_1[(r(0x109))]([[c]],this[r(0x106)]);return d[r(0x10c)]();}static[m(0x116)](c,d,e){const s=m;if(typeof c===s(0x10e))return c;if(Array[s(0x117)](c[s(0x108)])&&c[s(0x108)]['includes'](e||0xc8)||e[s(0x102)]()===(c[s(0x108)]||0xc8)['toString']()){if(!c['match'])return!![];const f=c[s(0x100)]==='or';let g=!![],h=![];return c['match'][s(0x110)](({expected:i,actual:j})=>{const t=s;if(f&&!h||!f&&g){const k=pipe_1[t(0x109)]['resolve'](j,d)===i;if(f&&k)h=!![];else!f&&!k&&(g=![]);}}),f?h:g;}return![];}}exports[m(0x112)]=MapperService;
1
+ 'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=parseInt(l(0x8f))/0x1+-parseInt(l(0x8b))/0x2*(-parseInt(l(0x8e))/0x3)+-parseInt(l(0x7e))/0x4+parseInt(l(0x82))/0x5+parseInt(l(0x78))/0x6+parseInt(l(0x84))/0x7*(parseInt(l(0x79))/0x8)+-parseInt(l(0x90))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x2b00d));Object[m(0x80)](exports,m(0x7f),{'value':!![]}),exports[m(0x92)]=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x78;let h=e[f];return h;},b(c,d);}const pipe_1=require('../pipe');class MapperService{constructor(c,d){const n=m;this[n(0x81)]=c,this['data']=d;}['mapRules'](){const o=m;return this['traverseRules'](this[o(0x81)]);}[m(0x7d)](c){const p=m;if(typeof c===p(0x95)&&'@pipe'in c)return this[p(0x87)](c['@pipe']);if(typeof c===p(0x95)&&c!==null){const d={};for(const e in c){Object[p(0x8d)][p(0x83)][p(0x7a)](c,e)&&(d[e]=this['traverseRules'](c[e]));}return d;}else return this[p(0x89)](c);}[m(0x87)](c){const q=m,d=new pipe_1[(q(0x93))](c,this['data']);return d[q(0x86)]();}[m(0x89)](c){const r=m,d=new pipe_1[(r(0x93))]([[c]],this[r(0x88)]);return d['process']();}static[m(0x8c)](c,d,e){const s=m;if(typeof c==='boolean')return c;if(Array[s(0x85)](c[s(0x7c)])&&c[s(0x7c)][s(0x91)](e||0xc8)||e[s(0x94)]()===(c[s(0x7c)]||0xc8)[s(0x94)]()){if(!c[s(0x7b)])return!![];const f=c[s(0x8a)]==='or';let g=!![],h=![];return c[s(0x7b)]['forEach'](({expected:i,actual:j})=>{const t=s;if(f&&!h||!f&&g){const k=pipe_1['Pipe'][t(0x89)](j,d)===i;if(f&&k)h=!![];else!f&&!k&&(g=![]);}}),f?h:g;}return![];}}function a(){const u=['48310EvLLzT','evaluate','prototype','39QuczkR','258393RaGwoX','2256480FfxTLY','includes','MapperService','Pipe','toString','object','620628AUTjro','636400sGxECM','call','match','code','traverseRules','1408728SWRsQP','__esModule','defineProperty','rules','118235xiwuSb','hasOwnProperty','7ffBDBu','isArray','process','pipe','data','resolve','gate'];a=function(){return u;};return a();}exports[m(0x92)]=MapperService;
@@ -12,16 +12,16 @@ declare class MeshData {
12
12
  instances: Map<string, Promise<HotMesh> | HotMesh>;
13
13
  search: WorkflowSearchOptions;
14
14
  static workflow: {
15
- sleep: typeof import("../meshflow/workflow").WorkflowService.sleepFor;
16
- sleepFor: typeof import("../meshflow/workflow").WorkflowService.sleepFor;
17
- signal: typeof import("../meshflow/workflow").WorkflowService.signal;
18
- hook: typeof import("../meshflow/workflow").WorkflowService.hook;
19
- waitForSignal: typeof import("../meshflow/workflow").WorkflowService.waitFor;
20
- waitFor: typeof import("../meshflow/workflow").WorkflowService.waitFor;
15
+ sleep: typeof import("../meshflow/workflow/sleepFor").sleepFor;
16
+ sleepFor: typeof import("../meshflow/workflow/sleepFor").sleepFor;
17
+ signal: typeof import("../meshflow/workflow/signal").signal;
18
+ hook: typeof import("../meshflow/workflow/hook").hook;
19
+ waitForSignal: typeof import("../meshflow/workflow/waitFor").waitFor;
20
+ waitFor: typeof import("../meshflow/workflow/waitFor").waitFor;
21
21
  getHotMesh: typeof import("../meshflow/workflow").WorkflowService.getHotMesh;
22
- random: typeof import("../meshflow/workflow").WorkflowService.random;
23
- search: typeof import("../meshflow/workflow").WorkflowService.search;
24
- getContext: typeof import("../meshflow/workflow").WorkflowService.getContext;
22
+ random: typeof import("../meshflow/workflow/random").random;
23
+ search: typeof import("../meshflow/workflow/searchMethods").search;
24
+ getContext: typeof import("../meshflow/workflow/context").getContext;
25
25
  interrupt: (entity: string, id: string, options?: JobInterruptOptions) => Promise<void>;
26
26
  execChild: <T>(options?: Partial<WorkflowOptions>) => Promise<T>;
27
27
  executeChild: <T_1>(options?: Partial<WorkflowOptions>) => Promise<T_1>;
@@ -67,7 +67,7 @@ declare class MeshData {
67
67
  generateSearchQuery(query: FindWhereQuery[] | string, search?: WorkflowSearchOptions): string;
68
68
  createSearchIndex(entity: string, options?: CallOptions, searchOptions?: WorkflowSearchOptions): Promise<void>;
69
69
  listSearchIndexes(): Promise<string[]>;
70
- static proxyActivities: typeof import("../meshflow/workflow").WorkflowService.proxyActivities;
70
+ static proxyActivities: typeof import("../meshflow/workflow/proxyActivities").proxyActivities;
71
71
  static shutdown(): Promise<void>;
72
72
  }
73
73
  export { MeshData };
@@ -25,6 +25,7 @@ class ClientService {
25
25
  appId: targetNS,
26
26
  logLevel: enums_1.HMSH_LOGLEVEL,
27
27
  engine: {
28
+ readonly: this.connection.readonly ?? undefined,
28
29
  connection: this.connection,
29
30
  },
30
31
  });
@@ -1 +1 @@
1
- 'use strict';const q=b;(function(c,d){const p=b,e=c();while(!![]){try{const f=parseInt(p(0x126))/0x1*(-parseInt(p(0x142))/0x2)+-parseInt(p(0x140))/0x3*(parseInt(p(0x123))/0x4)+parseInt(p(0x12a))/0x5+parseInt(p(0x119))/0x6+-parseInt(p(0x11b))/0x7*(-parseInt(p(0x148))/0x8)+parseInt(p(0x14c))/0x9*(parseInt(p(0x12f))/0xa)+parseInt(p(0x12b))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x97dac));function b(c,d){const e=a();return b=function(f,g){f=f-0x118;let h=e[f];return h;},b(c,d);}Object[q(0x145)](exports,q(0x14d),{'value':!![]}),exports[q(0x12c)]=void 0x0;const utils_1=require('../../modules/utils'),serializer_1=require(q(0x13b));class ExporterService{constructor(c,d,e){const r=q;this['appId']=c,this[r(0x137)]=e,this[r(0x134)]=d;}async[q(0x13f)](c,d={}){const s=q;if(!ExporterService[s(0x121)]['has'](this[s(0x13a)])){const g=this['store'][s(0x143)]();ExporterService[s(0x121)][s(0x13d)](this[s(0x13a)],await g);}const e=await this[s(0x134)][s(0x124)](c),f=this[s(0x125)](e,d);return f;}[q(0x125)](c,d){const t=q,e=[],f={},g={},h={},i=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object[t(0x144)](c)['forEach'](([j,k])=>{const u=t,l=j[u(0x12e)](i);if(l)this['inflateTransition'](l,k,h);else{if(j[u(0x133)]('_'))g[j[u(0x14a)](0x1)]=k;else{if(j[u(0x133)]('-')){const m=this['keyToObject'](j);e[u(0x118)]({...m,'key':j,'value':this[u(0x149)](k,d[u(0x135)])});}else j[u(0x129)]===0x3&&(f[this[u(0x11f)](j)]=serializer_1['SerializerService'][u(0x11c)](k));}}}),this[t(0x11e)]({'data':(0x0,utils_1[t(0x11a)])(g),'state':Object[t(0x144)]((0x0,utils_1[t(0x11a)])(f))[0x0][0x1],'status':parseInt(c[':'],0xa),'timeline':this['sortParts'](e),'transitions':this['sortEntriesByCreated'](h)},d['block'],d[t(0x127)]);}[q(0x149)](c,d){const v=q,e=serializer_1[v(0x132)][v(0x11c)](c);if(d!==![])return e;return e&&typeof e===v(0x141)&&(v(0x13c)in e&&(e[v(0x13c)]={}),v(0x122)in e&&(e[v(0x122)]={})),e;}['inflateKey'](c){const w=q,d=ExporterService['symbols'][w(0x13e)](this[w(0x13a)]);if(c in d){const e=d[c],f=e[w(0x120)]('/');return f[w(0x128)]('/');}return c;}[q(0x11e)](c,d=[],e=[]){const x=q;let f={};return e&&e[x(0x129)]>0x0?e[x(0x12d)](g=>{g in c&&(f[g]=c[g]);}):f={...c},d&&d[x(0x129)]>0x0&&d[x(0x12d)](g=>{g in f&&delete f[g];}),f;}[q(0x11d)](c,d,e){const y=q,[f,g,h]=c,i=this['inflateKey'](g),j=i[y(0x120)]('/'),k=j[0x0],l=i[y(0x14e)](y(0x138)),m=i[y(0x14e)](y(0x139));if(l||m){const n=k+','+h,o=e[n];!o?e[n]={'activity':k,'dimensions':h,'created':l?d:null,'updated':m?d:null}:o[l?'created':'updated']=d;}}[q(0x14b)](c){const z=q,d=Object['values'](c);return d[z(0x147)]((e,f)=>{const A=z;return(e[A(0x146)]||e[A(0x136)])[A(0x130)](f['created']||f[A(0x136)]);}),d;}['keyToObject'](c){const C=q;function d(f){const B=b,g=f[B(0x120)](',');if(g['length']>0x1)return g[B(0x131)](),g[B(0x128)](',');}const e=c[C(0x120)]('-');return e[C(0x129)]===0x4?{'index':parseInt(e[0x2],0xa),'dimension':d(e[0x1])}:{'index':parseInt(e[0x2],0xa),'secondary':parseInt(e[0x3],0xa),'dimension':d(e[0x1])};}['sortParts'](c){const D=q;return c[D(0x147)]((d,e)=>{const {dimension:f,index:g,secondary:h}=d,{dimension:i,index:j,secondary:k}=e;if(f===undefined&&i!==undefined)return-0x1;if(f!==undefined&&i===undefined)return 0x1;if(f!==undefined&&i!==undefined){if(f<i)return-0x1;if(f>i)return 0x1;}if(g<j)return-0x1;if(g>j)return 0x1;if(h===undefined&&k!==undefined)return-0x1;if(h!==undefined&&k===undefined)return 0x1;if(h!==undefined&&k!==undefined){if(h<k)return-0x1;if(h>k)return 0x1;}return 0x0;});}}exports[q(0x12c)]=ExporterService,ExporterService[q(0x121)]=new Map();function a(){const E=['join','length','1652925lmnZjM','13450833rYQrpu','ExporterService','forEach','match','54470XkLrKC','localeCompare','shift','SerializerService','startsWith','store','values','updated','logger','/output/metadata/ac','/output/metadata/au','appId','../serializer','data','set','get','export','3449847OpmLCW','object','828794zxVhVW','getAllSymbols','entries','defineProperty','created','sort','4568PrXODI','resolveValue','substring','sortEntriesByCreated','855yHDMcG','__esModule','endsWith','push','1085136kdXopT','restoreHierarchy','9359WQLuGa','fromString','inflateTransition','filterFields','inflateKey','split','symbols','$error','4RwCyaU','getRaw','inflate','3JxAOJb','allow'];a=function(){return E;};return a();}
1
+ 'use strict';const q=b;(function(c,d){const p=b,e=c();while(!![]){try{const f=-parseInt(p(0x1d2))/0x1*(parseInt(p(0x1cc))/0x2)+-parseInt(p(0x1d1))/0x3*(-parseInt(p(0x1e6))/0x4)+parseInt(p(0x1d6))/0x5+parseInt(p(0x1d7))/0x6+-parseInt(p(0x1cd))/0x7+-parseInt(p(0x1ff))/0x8*(-parseInt(p(0x1e9))/0x9)+-parseInt(p(0x1d5))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xe9d7a));function a(){const D=['6222696jYiilY','data','split','$error','__esModule','sortEntriesByCreated','symbols','inflate','resolveValue','entries','updated','/output/metadata/ac','endsWith','get','allow','16gRXjjk','join','object','135ocUtZl','keyToObject','inflateKey','values','SerializerService','block','../serializer','getRaw','sort','length','defineProperty','appId','forEach','inflateTransition','filterFields','push','created','shift','sortParts','/output/metadata/au','export','restoreHierarchy','859864nNEeXX','../../modules/utils','set','10XnRBQv','6522250raRppZ','ExporterService','startsWith','localeCompare','951348VqfGas','347239lKJDnM','store','match','11681250eUeIaQ','4380315IOOTJD'];a=function(){return D;};return a();}function b(c,d){const e=a();return b=function(f,g){f=f-0x1cc;let h=e[f];return h;},b(c,d);}Object[q(0x1f3)](exports,q(0x1db),{'value':!![]}),exports[q(0x1ce)]=void 0x0;const utils_1=require(q(0x200)),serializer_1=require(q(0x1ef));class ExporterService{constructor(c,d,e){const r=q;this[r(0x1f4)]=c,this['logger']=e,this[r(0x1d3)]=d;}async[q(0x1fd)](c,d={}){const s=q;if(!ExporterService['symbols']['has'](this[s(0x1f4)])){const g=this[s(0x1d3)]['getAllSymbols']();ExporterService['symbols'][s(0x201)](this[s(0x1f4)],await g);}const e=await this[s(0x1d3)][s(0x1f0)](c),f=this[s(0x1de)](e,d);return f;}['inflate'](c,d){const t=q,e=[],f={},g={},h={},i=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object[t(0x1e0)](c)['forEach'](([j,k])=>{const u=t,l=j[u(0x1d4)](i);if(l)this[u(0x1f6)](l,k,h);else{if(j[u(0x1cf)]('_'))g[j['substring'](0x1)]=k;else{if(j[u(0x1cf)]('-')){const m=this[u(0x1ea)](j);e[u(0x1f8)]({...m,'key':j,'value':this[u(0x1df)](k,d[u(0x1ec)])});}else j['length']===0x3&&(f[this[u(0x1eb)](j)]=serializer_1[u(0x1ed)]['fromString'](k));}}}),this[t(0x1f7)]({'data':(0x0,utils_1[t(0x1fe)])(g),'state':Object[t(0x1e0)]((0x0,utils_1[t(0x1fe)])(f))[0x0][0x1],'status':parseInt(c[':'],0xa),'timeline':this[t(0x1fb)](e),'transitions':this['sortEntriesByCreated'](h)},d[t(0x1ee)],d[t(0x1e5)]);}[q(0x1df)](c,d){const v=q,e=serializer_1['SerializerService']['fromString'](c);if(d!==![])return e;return e&&typeof e===v(0x1e8)&&('data'in e&&(e[v(0x1d8)]={}),v(0x1da)in e&&(e[v(0x1da)]={})),e;}[q(0x1eb)](c){const w=q,d=ExporterService[w(0x1dd)][w(0x1e4)](this[w(0x1f4)]);if(c in d){const e=d[c],f=e[w(0x1d9)]('/');return f['join']('/');}return c;}['filterFields'](c,d=[],e=[]){const x=q;let f={};return e&&e[x(0x1f2)]>0x0?e['forEach'](g=>{g in c&&(f[g]=c[g]);}):f={...c},d&&d[x(0x1f2)]>0x0&&d[x(0x1f5)](g=>{g in f&&delete f[g];}),f;}['inflateTransition'](c,d,e){const y=q,[f,g,h]=c,i=this[y(0x1eb)](g),j=i['split']('/'),k=j[0x0],l=i['endsWith'](y(0x1e2)),m=i[y(0x1e3)](y(0x1fc));if(l||m){const n=k+','+h,o=e[n];!o?e[n]={'activity':k,'dimensions':h,'created':l?d:null,'updated':m?d:null}:o[l?y(0x1f9):'updated']=d;}}[q(0x1dc)](c){const z=q,d=Object['values'](c);return d[z(0x1f1)]((e,f)=>{const A=z;return(e[A(0x1f9)]||e[A(0x1e1)])[A(0x1d0)](f[A(0x1f9)]||f[A(0x1e1)]);}),d;}['keyToObject'](c){const C=q;function d(f){const B=b,g=f[B(0x1d9)](',');if(g['length']>0x1)return g[B(0x1fa)](),g[B(0x1e7)](',');}const e=c[C(0x1d9)]('-');return e[C(0x1f2)]===0x4?{'index':parseInt(e[0x2],0xa),'dimension':d(e[0x1])}:{'index':parseInt(e[0x2],0xa),'secondary':parseInt(e[0x3],0xa),'dimension':d(e[0x1])};}[q(0x1fb)](c){return c['sort']((d,e)=>{const {dimension:f,index:g,secondary:h}=d,{dimension:i,index:j,secondary:k}=e;if(f===undefined&&i!==undefined)return-0x1;if(f!==undefined&&i===undefined)return 0x1;if(f!==undefined&&i!==undefined){if(f<i)return-0x1;if(f>i)return 0x1;}if(g<j)return-0x1;if(g>j)return 0x1;if(h===undefined&&k!==undefined)return-0x1;if(h!==undefined&&k===undefined)return 0x1;if(h!==undefined&&k!==undefined){if(h<k)return-0x1;if(h>k)return 0x1;}return 0x0;});}}exports['ExporterService']=ExporterService,ExporterService['symbols']=new Map();
@@ -0,0 +1 @@
1
+ export declare function all<T>(...promises: Promise<T>[]): Promise<T[]>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.all = void 0;
4
+ async function all(...promises) {
5
+ await new Promise((resolve) => setTimeout(resolve, 1));
6
+ return await Promise.all(promises);
7
+ }
8
+ exports.all = all;
@@ -0,0 +1,18 @@
1
+ import { MeshFlowChildError, MeshFlowFatalError, MeshFlowMaxedError, MeshFlowProxyError, MeshFlowRetryError, MeshFlowSleepError, MeshFlowTimeoutError, MeshFlowWaitForError } from '../../../modules/errors';
2
+ import { KeyService, KeyType } from '../../../modules/key';
3
+ import { asyncLocalStorage } from '../../../modules/storage';
4
+ import { deterministicRandom, guid, s, sleepImmediate } from '../../../modules/utils';
5
+ import { HotMesh } from '../../hotmesh';
6
+ import { SerializerService } from '../../serializer';
7
+ import { ActivityConfig, ChildResponseType, HookOptions, ProxyResponseType, ProxyType, WorkflowContext, WorkflowOptions } from '../../../types/meshflow';
8
+ import { JobInterruptOptions } from '../../../types/job';
9
+ import { StreamCode, StreamStatus } from '../../../types/stream';
10
+ import { StringAnyType, StringScalarType, StringStringType } from '../../../types/serializer';
11
+ import { HMSH_CODE_MESHFLOW_CHILD, HMSH_CODE_MESHFLOW_FATAL, HMSH_CODE_MESHFLOW_MAXED, HMSH_CODE_MESHFLOW_PROXY, HMSH_CODE_MESHFLOW_SLEEP, HMSH_CODE_MESHFLOW_TIMEOUT, HMSH_CODE_MESHFLOW_WAIT, HMSH_MESHFLOW_EXP_BACKOFF, HMSH_MESHFLOW_MAX_ATTEMPTS, HMSH_MESHFLOW_MAX_INTERVAL } from '../../../modules/enums';
12
+ import { MeshFlowChildErrorType, MeshFlowProxyErrorType } from '../../../types/error';
13
+ import { TelemetryService } from '../../telemetry';
14
+ import { QuorumMessage } from '../../../types';
15
+ import { UserMessage } from '../../../types/quorum';
16
+ import { Search } from '../search';
17
+ import { WorkerService } from '../worker';
18
+ export { MeshFlowChildError, MeshFlowFatalError, MeshFlowMaxedError, MeshFlowProxyError, MeshFlowRetryError, MeshFlowSleepError, MeshFlowTimeoutError, MeshFlowWaitForError, KeyService, KeyType, asyncLocalStorage, deterministicRandom, guid, s, sleepImmediate, HotMesh, SerializerService, ActivityConfig, ChildResponseType, HookOptions, ProxyResponseType, ProxyType, WorkflowContext, WorkflowOptions, JobInterruptOptions, StreamCode, StreamStatus, StringAnyType, StringScalarType, StringStringType, HMSH_CODE_MESHFLOW_CHILD, HMSH_CODE_MESHFLOW_FATAL, HMSH_CODE_MESHFLOW_MAXED, HMSH_CODE_MESHFLOW_PROXY, HMSH_CODE_MESHFLOW_SLEEP, HMSH_CODE_MESHFLOW_TIMEOUT, HMSH_CODE_MESHFLOW_WAIT, HMSH_MESHFLOW_EXP_BACKOFF, HMSH_MESHFLOW_MAX_ATTEMPTS, HMSH_MESHFLOW_MAX_INTERVAL, MeshFlowChildErrorType, MeshFlowProxyErrorType, TelemetryService, QuorumMessage, UserMessage, Search, WorkerService, };
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkerService = exports.Search = exports.TelemetryService = exports.HMSH_MESHFLOW_MAX_INTERVAL = exports.HMSH_MESHFLOW_MAX_ATTEMPTS = exports.HMSH_MESHFLOW_EXP_BACKOFF = exports.HMSH_CODE_MESHFLOW_WAIT = exports.HMSH_CODE_MESHFLOW_TIMEOUT = exports.HMSH_CODE_MESHFLOW_SLEEP = exports.HMSH_CODE_MESHFLOW_PROXY = exports.HMSH_CODE_MESHFLOW_MAXED = exports.HMSH_CODE_MESHFLOW_FATAL = exports.HMSH_CODE_MESHFLOW_CHILD = exports.StreamStatus = exports.SerializerService = exports.HotMesh = exports.sleepImmediate = exports.s = exports.guid = exports.deterministicRandom = exports.asyncLocalStorage = exports.KeyType = exports.KeyService = exports.MeshFlowWaitForError = exports.MeshFlowTimeoutError = exports.MeshFlowSleepError = exports.MeshFlowRetryError = exports.MeshFlowProxyError = exports.MeshFlowMaxedError = exports.MeshFlowFatalError = exports.MeshFlowChildError = void 0;
4
+ const errors_1 = require("../../../modules/errors");
5
+ Object.defineProperty(exports, "MeshFlowChildError", { enumerable: true, get: function () { return errors_1.MeshFlowChildError; } });
6
+ Object.defineProperty(exports, "MeshFlowFatalError", { enumerable: true, get: function () { return errors_1.MeshFlowFatalError; } });
7
+ Object.defineProperty(exports, "MeshFlowMaxedError", { enumerable: true, get: function () { return errors_1.MeshFlowMaxedError; } });
8
+ Object.defineProperty(exports, "MeshFlowProxyError", { enumerable: true, get: function () { return errors_1.MeshFlowProxyError; } });
9
+ Object.defineProperty(exports, "MeshFlowRetryError", { enumerable: true, get: function () { return errors_1.MeshFlowRetryError; } });
10
+ Object.defineProperty(exports, "MeshFlowSleepError", { enumerable: true, get: function () { return errors_1.MeshFlowSleepError; } });
11
+ Object.defineProperty(exports, "MeshFlowTimeoutError", { enumerable: true, get: function () { return errors_1.MeshFlowTimeoutError; } });
12
+ Object.defineProperty(exports, "MeshFlowWaitForError", { enumerable: true, get: function () { return errors_1.MeshFlowWaitForError; } });
13
+ const key_1 = require("../../../modules/key");
14
+ Object.defineProperty(exports, "KeyService", { enumerable: true, get: function () { return key_1.KeyService; } });
15
+ Object.defineProperty(exports, "KeyType", { enumerable: true, get: function () { return key_1.KeyType; } });
16
+ const storage_1 = require("../../../modules/storage");
17
+ Object.defineProperty(exports, "asyncLocalStorage", { enumerable: true, get: function () { return storage_1.asyncLocalStorage; } });
18
+ const utils_1 = require("../../../modules/utils");
19
+ Object.defineProperty(exports, "deterministicRandom", { enumerable: true, get: function () { return utils_1.deterministicRandom; } });
20
+ Object.defineProperty(exports, "guid", { enumerable: true, get: function () { return utils_1.guid; } });
21
+ Object.defineProperty(exports, "s", { enumerable: true, get: function () { return utils_1.s; } });
22
+ Object.defineProperty(exports, "sleepImmediate", { enumerable: true, get: function () { return utils_1.sleepImmediate; } });
23
+ const hotmesh_1 = require("../../hotmesh");
24
+ Object.defineProperty(exports, "HotMesh", { enumerable: true, get: function () { return hotmesh_1.HotMesh; } });
25
+ const serializer_1 = require("../../serializer");
26
+ Object.defineProperty(exports, "SerializerService", { enumerable: true, get: function () { return serializer_1.SerializerService; } });
27
+ const stream_1 = require("../../../types/stream");
28
+ Object.defineProperty(exports, "StreamStatus", { enumerable: true, get: function () { return stream_1.StreamStatus; } });
29
+ const enums_1 = require("../../../modules/enums");
30
+ Object.defineProperty(exports, "HMSH_CODE_MESHFLOW_CHILD", { enumerable: true, get: function () { return enums_1.HMSH_CODE_MESHFLOW_CHILD; } });
31
+ Object.defineProperty(exports, "HMSH_CODE_MESHFLOW_FATAL", { enumerable: true, get: function () { return enums_1.HMSH_CODE_MESHFLOW_FATAL; } });
32
+ Object.defineProperty(exports, "HMSH_CODE_MESHFLOW_MAXED", { enumerable: true, get: function () { return enums_1.HMSH_CODE_MESHFLOW_MAXED; } });
33
+ Object.defineProperty(exports, "HMSH_CODE_MESHFLOW_PROXY", { enumerable: true, get: function () { return enums_1.HMSH_CODE_MESHFLOW_PROXY; } });
34
+ Object.defineProperty(exports, "HMSH_CODE_MESHFLOW_SLEEP", { enumerable: true, get: function () { return enums_1.HMSH_CODE_MESHFLOW_SLEEP; } });
35
+ Object.defineProperty(exports, "HMSH_CODE_MESHFLOW_TIMEOUT", { enumerable: true, get: function () { return enums_1.HMSH_CODE_MESHFLOW_TIMEOUT; } });
36
+ Object.defineProperty(exports, "HMSH_CODE_MESHFLOW_WAIT", { enumerable: true, get: function () { return enums_1.HMSH_CODE_MESHFLOW_WAIT; } });
37
+ Object.defineProperty(exports, "HMSH_MESHFLOW_EXP_BACKOFF", { enumerable: true, get: function () { return enums_1.HMSH_MESHFLOW_EXP_BACKOFF; } });
38
+ Object.defineProperty(exports, "HMSH_MESHFLOW_MAX_ATTEMPTS", { enumerable: true, get: function () { return enums_1.HMSH_MESHFLOW_MAX_ATTEMPTS; } });
39
+ Object.defineProperty(exports, "HMSH_MESHFLOW_MAX_INTERVAL", { enumerable: true, get: function () { return enums_1.HMSH_MESHFLOW_MAX_INTERVAL; } });
40
+ const telemetry_1 = require("../../telemetry");
41
+ Object.defineProperty(exports, "TelemetryService", { enumerable: true, get: function () { return telemetry_1.TelemetryService; } });
42
+ const search_1 = require("../search");
43
+ Object.defineProperty(exports, "Search", { enumerable: true, get: function () { return search_1.Search; } });
44
+ const worker_1 = require("../worker");
45
+ Object.defineProperty(exports, "WorkerService", { enumerable: true, get: function () { return worker_1.WorkerService; } });
@@ -0,0 +1,2 @@
1
+ import { WorkflowContext } from './common';
2
+ export declare function getContext(): WorkflowContext;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getContext = void 0;
4
+ const common_1 = require("./common");
5
+ function getContext() {
6
+ const store = common_1.asyncLocalStorage.getStore();
7
+ const workflowId = store.get('workflowId');
8
+ const replay = store.get('replay');
9
+ const cursor = store.get('cursor');
10
+ const interruptionRegistry = store.get('interruptionRegistry');
11
+ const workflowDimension = store.get('workflowDimension') ?? '';
12
+ const workflowTopic = store.get('workflowTopic');
13
+ const connection = store.get('connection');
14
+ const namespace = store.get('namespace');
15
+ const originJobId = store.get('originJobId');
16
+ const workflowTrace = store.get('workflowTrace');
17
+ const canRetry = store.get('canRetry');
18
+ const workflowSpan = store.get('workflowSpan');
19
+ const expire = store.get('expire');
20
+ const COUNTER = store.get('counter');
21
+ const raw = store.get('raw');
22
+ return {
23
+ canRetry,
24
+ COUNTER,
25
+ counter: COUNTER.counter,
26
+ cursor,
27
+ interruptionRegistry,
28
+ connection,
29
+ expire,
30
+ namespace,
31
+ originJobId,
32
+ raw,
33
+ replay,
34
+ workflowId,
35
+ workflowDimension,
36
+ workflowTopic,
37
+ workflowTrace,
38
+ workflowSpan,
39
+ };
40
+ }
41
+ exports.getContext = getContext;
@@ -0,0 +1 @@
1
+ export declare function didRun(prefix: string): Promise<[boolean, number, any]>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.didRun = void 0;
4
+ const common_1 = require("./common");
5
+ const context_1 = require("./context");
6
+ async function didRun(prefix) {
7
+ const { COUNTER, replay, workflowDimension } = (0, context_1.getContext)();
8
+ const execIndex = COUNTER.counter = COUNTER.counter + 1;
9
+ const sessionId = `-${prefix}${workflowDimension}-${execIndex}-`;
10
+ if (sessionId in replay) {
11
+ const restored = common_1.SerializerService.fromString(replay[sessionId]);
12
+ return [true, execIndex, restored];
13
+ }
14
+ return [false, execIndex, null];
15
+ }
16
+ exports.didRun = didRun;
@@ -0,0 +1,4 @@
1
+ import { StringAnyType } from './common';
2
+ export declare function emit(events: StringAnyType, config?: {
3
+ once: boolean;
4
+ }): Promise<boolean>;