@hotmeshio/hotmesh 0.3.27 → 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 (118) 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.d.ts +2 -0
  98. package/build/services/stream/providers/postgres/kvtables.js +1 -0
  99. package/build/services/stream/providers/postgres/postgres.d.ts +2 -8
  100. package/build/services/stream/providers/postgres/postgres.js +1 -1
  101. package/build/services/stream/providers/redis/ioredis.js +1 -1
  102. package/build/services/stream/providers/redis/redis.js +1 -1
  103. package/build/services/stream/providers/stream-initializable.js +1 -1
  104. package/build/services/sub/providers/nats/nats.js +1 -1
  105. package/build/services/sub/providers/postgres/postgres.js +1 -1
  106. package/build/services/sub/providers/redis/ioredis.js +1 -1
  107. package/build/services/sub/providers/redis/redis.js +1 -1
  108. package/build/services/task/index.js +1 -1
  109. package/build/services/telemetry/index.d.ts +1 -1
  110. package/build/services/telemetry/index.js +1 -1
  111. package/build/services/worker/index.js +1 -1
  112. package/build/types/manifest.d.ts +2 -0
  113. package/build/types/provider.d.ts +2 -0
  114. package/package.json +1 -1
  115. package/types/manifest.ts +12 -2
  116. package/types/provider.ts +14 -0
  117. package/build/services/meshflow/workflow.d.ts +0 -35
  118. 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(0x179))/0x1*(-parseInt(l(0x18e))/0x2)+-parseInt(l(0x18b))/0x3+-parseInt(l(0x169))/0x4+-parseInt(l(0x164))/0x5*(parseInt(l(0x197))/0x6)+-parseInt(l(0x192))/0x7*(parseInt(l(0x170))/0x8)+-parseInt(l(0x195))/0x9+-parseInt(l(0x15f))/0xa*(-parseInt(l(0x15a))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x93983));function a(){const L=['metadata','toString','462392UkTXBs','lastIndexOf','getSeed','getDimensionalAddress','targetLength','getDimensionalSeed','defineProperty','length','verifySyntheticInteger','23uKTbzZ','CollationFaultType','isArray','verifyInteger','transact','config','ancestor','notarizeEntry','forEach','context','isInactive','__esModule','exec','find','activities','CollatorService','notarizeEarlyExit','trigger','2530494aMjmfm','dad','INVALID','28858tiPITY','collator-trigger-activity-not-found','notarizeCompletion','reverse','84uckWuN','ancestors','isPrimed','9781749vxbfAj','CollationError','66060miaiPp','store','getDimensionsById','collateSynthetic','notarizeEarlyCompletion','split','type','assertJobActive','888000001000001','getDigitAtIndex','transitions','getDimensionalIndex','exit','indexOf','INACTIVE','collate','substring','authorizeReentry','11NyKXrt','jid','push','isInceptionOverage','../../types/collator','40662430TAJiMW','notarizeReentry','getTriggerSeed','enter','leg','505vnhdEX','keys','aid','resolveReentryDimension','cycle','230424doaOXQ','DUPLICATE','notarizeInception','../../modules/errors','compile'];a=function(){return L;};return a();}Object[m(0x176)](exports,m(0x184),{'value':!![]}),exports['CollatorService']=void 0x0;const errors_1=require(m(0x16c)),collator_1=require(m(0x15e));class CollatorService{static[m(0x19e)](c,d,e,f=0x0){if(c<=f)throw new errors_1['InactiveJobError'](d,c,e);}static[m(0x173)](c,d=![]){const n=m;let e=c[n(0x182)][n(0x16e)][n(0x18c)]||c[n(0x16e)][n(0x18c)];return d&&e&&c[n(0x163)]===0x2&&(e=e[n(0x158)](0x0,e[n(0x171)](','))+',0'),CollatorService[n(0x199)]([...c[n(0x17e)][n(0x193)],c['metadata'][n(0x166)]],e);}static[m(0x167)](c){const o=m,d=c[o(0x17e)][o(0x17f)],e=c['config'][o(0x193)],f=e[o(0x155)](d),g=c[o(0x16e)][o(0x18c)][o(0x19c)](',');return g[o(0x177)]=f+0x1,g[o(0x15c)]('0'),g['join'](',');}static async[m(0x180)](c,d){const p=m,e=await c[p(0x198)][p(0x157)](c[p(0x182)]['metadata']['jid'],c['metadata'][p(0x166)],-0x5af3107a4000,this['getDimensionalAddress'](c),d);return this[p(0x17c)](e,0x1,p(0x162)),e;}static async[m(0x159)](c,d){const q=m,e=await c[q(0x198)][q(0x157)](c[q(0x182)][q(0x16e)][q(0x15b)],c[q(0x16e)][q(0x166)],-0x9184e72a000,this[q(0x173)](c),d);return e;}static async[m(0x189)](c,d){const r=m;return await c[r(0x198)][r(0x157)](c[r(0x182)][r(0x16e)][r(0x15b)],c['metadata'][r(0x166)],-0xa012317b000,this[r(0x173)](c),d);}static async[m(0x19b)](c,d){const s=m,e=c[s(0x17e)][s(0x168)]?0x9184e72a000:0xa012317b000;return await c[s(0x198)][s(0x157)](c['context'][s(0x16e)][s(0x15b)],c[s(0x16e)][s(0x166)],0xf4241-e,this[s(0x173)](c),d);}static async[m(0x16b)](c,d,e){const t=m;d&&await c[t(0x198)][t(0x19a)](c[t(0x182)][t(0x16e)][t(0x15b)],d,0xf4240,e);}static async[m(0x15d)](c,d){const u=m;if(d){const e=await c[u(0x198)]['collateSynthetic'](c[u(0x182)][u(0x16e)][u(0x15b)],d,0xf4240);return e>0xf4240;}return![];}static async[m(0x160)](c,d,e){const v=m,f=c[v(0x182)]['metadata'][v(0x15b)],g=e||c[v(0x198)][v(0x17d)]();await c[v(0x198)][v(0x157)](f,c[v(0x16e)][v(0x166)],0xf4240,this[v(0x173)](c,!![]),g),await c[v(0x198)]['collateSynthetic'](f,d,0xf4240,g);const [h,i]=await g[v(0x185)](),j=Array[v(0x17b)](h)?h[0x1]:h,k=Array[v(0x17b)](i)?i[0x1]:i;return this['verifyInteger'](j,0x2,v(0x162)),this['verifySyntheticInteger'](k),j;}static async['notarizeContinuation'](c,d){const w=m;return await c[w(0x198)][w(0x157)](c[w(0x182)][w(0x16e)][w(0x15b)],c[w(0x16e)]['aid'],0x1,this[w(0x173)](c),d);}static async[m(0x190)](c,d){const x=m,e=c[x(0x17e)][x(0x168)]?0x0:0xe8d4a51000;return await c[x(0x198)][x(0x157)](c[x(0x182)][x(0x16e)][x(0x15b)],c['metadata']['aid'],0x1-e,this[x(0x173)](c),d);}static['getDigitAtIndex'](c,d){const y=m,e=c[y(0x16f)]();if(d<0x0||d>=e['length'])return null;const f=parseInt(e[d],0xa);return f;}static[m(0x153)](c){const z=m,d=c[z(0x16f)]();if(d['length']<0x9)return null;const e=d[z(0x158)](0x3,0x9),f=parseInt(e,0xa);return f-0x1;}static['isDuplicate'](c,d){const A=m;return this[A(0x1a0)](c,d)<0x8;}static['isInactive'](c){const B=m;return this[B(0x1a0)](c,0x2)<0x9;}static[m(0x194)](c,d){const C=m;return d==0x1?c!=-0x5af3107a4000:this[C(0x1a0)](c,0x0)<0x9&&this[C(0x1a0)](c,0x1)<0x9;}static[m(0x178)](c){const D=m,d=c['toString'](),e=parseInt(d[d['length']-0x1],0xa);if(e>0x0)throw new errors_1[(D(0x196))](c,0x2,D(0x162),collator_1[D(0x17a)][D(0x156)]);else{if(c>=0x1e8480)throw new errors_1['CollationError'](c,0x2,D(0x162),collator_1[D(0x17a)][D(0x16a)]);}}static[m(0x17c)](c,d,e){const E=m;let f;if(d===0x1&&e===E(0x162)){if(!this[E(0x194)](c,0x1))f=collator_1[E(0x17a)]['MISSING'];else{if(this['isDuplicate'](c,0x0))f=collator_1[E(0x17a)]['DUPLICATE'];else c!=0x331a2bfa73000&&(f=collator_1['CollationFaultType'][E(0x18d)]);}}else{if(d===0x1&&e===E(0x154)){if(c===-0x9184e72a000)f=collator_1['CollationFaultType']['MISSING'];else this['isDuplicate'](c,0x1)&&(f=collator_1[E(0x17a)][E(0x16a)]);}else{if(d===0x2&&e===E(0x162)){if(!this[E(0x194)](c,0x2))f=collator_1['CollationFaultType']['FORBIDDEN'];else this[E(0x183)](c)&&(f=collator_1[E(0x17a)][E(0x156)]);}}}if(f)throw new errors_1[(E(0x196))](c,d,e,f);}static[m(0x199)](c,d){const F=m,e={'$ADJACENT':d+',0'};let f=d;return c[F(0x191)]()[F(0x181)](g=>{const G=F;e[g]=f,f=f[G(0x158)](0x0,f[G(0x171)](','));}),e;}static[m(0x172)](){return'999000000000000';}static[m(0x161)](){const H=m;return H(0x19f);}static[m(0x16d)](c){CollatorService['bindAncestorArray'](c);}static['bindAncestorArray'](c){const I=m;c[I(0x181)](d=>{const J=I,e={},f=Object[J(0x165)](d['activities'])[J(0x186)](h=>d['activities'][h][J(0x19d)]===J(0x18a));if(!f)throw new Error(J(0x18f));const g=(h,i)=>{const K=J;e[h]=i,d[K(0x187)][h][K(0x193)]=i;const j=d[K(0x152)]?.[h]||[];j[K(0x181)](k=>{g(k['to'],[...i,h]);});};g(f,[]);});}static[m(0x175)](c=0x0){return','+c;}}function b(c,d){const e=a();return b=function(f,g){f=f-0x152;let h=e[f];return h;},b(c,d);}exports[m(0x188)]=CollatorService,CollatorService[m(0x174)]=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';function b(c,d){const e=a();return b=function(f,g){f=f-0x1c5;let h=e[f];return h;},b(c,d);}function a(){const X=['./validator','transitions','topic','join','bindParents','8255349ZRsnli','KeyType','data/','ENGINE','concat','WORKER','deployActivitySchemas','SerializerService','publishes','expire','__esModule','store','306667WYrmwZ','../../modules/utils','generateSymKeys','startsWith','filterSymVals','getSymKey','convertTopicsToTypes','parent','pow','deployConsumerGroups','bindSelf','PRODUCES','deploySubscriptions','cycle','string','maps','input','app','groupMappingRules','bindCycleTarget','schema','findTrigger','CollatorService','length','deployTransitions','Symbol\x20index\x20out\x20of\x20bounds','worker','push','resolveMappableValue','keys','1222908TlpCEy','Deployer','CONTEXT_VARS','convertActivitiesToHooks','ACTIVITY','stream','output/data','object','../serializer','791866hqwyUo','55410eVEcvz','resolve','substring','8tGWRqP','hooks','match','conditions','split','hook/data','produces','manifest','JOB','setHookRules','output','getVID','90TMxrDn','await','subtype','collectValues','@pipe','deployConsumerGroup','mintKey','activity','deployHookPatterns','data','setSchemas','enum','info','router-stream-group-exists','trigger','STREAMS','consumes','defineProperty','activities','resolveMappingDependencies','reserveSymbolRange','../pipe','examples','112357afFnYP','hook','persistent','isArray','$job','createConsumerGroup','396240FzRmUC','includes','generateSymVals','entries','resolveJobMapsPaths','logger','type','subscribes','job','addSymbols','ancestor','traverse','getSymbolValues','graphs','bindSymbols','add','Pipe','addSymbolValues'];a=function(){return X;};return a();}const u=b;(function(c,d){const t=b,e=c();while(!![]){try{const f=parseInt(t(0x1c9))/0x1+parseInt(t(0x1f0))/0x2+parseInt(t(0x1e7))/0x3+-parseInt(t(0x21d))/0x4+parseInt(t(0x1f1))/0x5*(parseInt(t(0x200))/0x6)+-parseInt(t(0x217))/0x7*(-parseInt(t(0x1f4))/0x8)+-parseInt(t(0x234))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x436e4));Object[u(0x211)](exports,u(0x1c7),{'value':!![]}),exports[u(0x1e8)]=void 0x0;const key_1=require('../../modules/key'),utils_1=require(u(0x1ca)),collator_1=require('../collator'),serializer_1=require(u(0x1ef)),pipe_1=require(u(0x215)),validator_1=require(u(0x22f)),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[v(0x1fb)]=null,this[v(0x1fb)]=c;}async['deploy'](c,d){const w=u;this[w(0x1c8)]=c,this[w(0x1ec)]=d,collator_1[w(0x1df)]['compile'](this['manifest'][w(0x1da)][w(0x22a)]),this[w(0x1ea)](),this[w(0x1cf)](),this['copyJobSchemas'](),this['bindBackRefs'](),this[w(0x233)](),this[w(0x1dc)](),this[w(0x213)](),this[w(0x221)](),await this[w(0x1cb)](),await this[w(0x21f)](),await this[w(0x208)](),await this[w(0x23a)](),await this[w(0x1d5)](),await this[w(0x1e1)](),await this[w(0x1d2)]();}[u(0x1ff)](){const x=u;return{'id':this[x(0x1fb)]['app']['id'],'version':this[x(0x1fb)][x(0x1da)]['version']};}async[u(0x1cb)](){const y=u;for(const c of this[y(0x1fb)]['app'][y(0x22a)]){const [,d]=this[y(0x1de)](c),e=d[y(0x224)],[f,g,h]=await this[y(0x1c8)][y(0x214)]('$'+e,DEFAULT_RANGE_SIZE,y(0x1fc)),i='',j=this[y(0x22b)](f,g,h,i,d[y(0x1d4)]);Object[y(0x1e6)](j)[y(0x1e0)]&&await this[y(0x1c8)][y(0x226)]('$'+e,j);for(const [k,l]of Object[y(0x220)](c[y(0x212)])){const [m,n,o]=await this[y(0x1c8)]['reserveSymbolRange'](k,DEFAULT_RANGE_SIZE,y(0x1eb)),p=k+'/';this[y(0x1d3)](l[y(0x210)],l[y(0x1fa)],k);const q=this[y(0x22b)](m,n,o,p,l['produces']);Object['keys'](q)[y(0x1e0)]&&await this[y(0x1c8)][y(0x226)](k,q);}}}['bindSelf'](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(0x21e)](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(0x1e2));const l=(0x0,utils_1[A(0x1ce)])(c);c++,h[k]=l,i[k]=l;}}return h;}['copyJobSchemas'](){const B=u,c=this[B(0x1fb)][B(0x1da)]['graphs'];for(const d of c){const e=d[B(0x1fe)]?.[B(0x1dd)],f=d[B(0x1d9)]?.[B(0x1dd)];if(!e&&!f)continue;const g=d['activities'];for(const h in g){if(g[h]['type']===B(0x20e)){const i=g[h];e&&(!i['job']&&(i['job']={}),i[B(0x225)][B(0x1dd)]=e),f&&(i['output']={'schema':f});}}}}['bindBackRefs'](){const C=u;for(const c of this[C(0x1fb)][C(0x1da)][C(0x22a)]){const d=c[C(0x212)],e=this['findTrigger'](c)[0x0];for(const f in d){d[f][C(0x20e)]=e,d[f]['subscribes']=c['subscribes'],c[C(0x1c5)]&&(d[f][C(0x1c5)]=c[C(0x1c5)]),d[f]['expire']=c[C(0x1c6)]??undefined,d[f][C(0x219)]=c['persistent']??undefined;}}}[u(0x1dc)](){const D=u;for(const c of this[D(0x1fb)][D(0x1da)]['graphs']){const d=c[D(0x212)];for(const e in d){const f=d[e];f[D(0x223)]==='cycle'&&(d[f[D(0x227)]][D(0x1d6)]=!![]);}}}[u(0x1cf)](){const E=u;for(const c of this[E(0x1fb)][E(0x1da)]['graphs']){const d=c[E(0x212)];for(const e in d){const f=d[e];[E(0x1e3),E(0x201)][E(0x21e)](f[E(0x223)])&&f[E(0x231)]&&!f[E(0x202)]&&(f[E(0x202)]=f[E(0x231)]);}}}[u(0x1ea)](){const F=u;for(const c of this['manifest'][F(0x1da)][F(0x22a)]){const d=c[F(0x212)];for(const e in d){const f=d[e];[F(0x207)][F(0x21e)](f[F(0x223)])&&(f['type']=F(0x218));}}}async['bindParents'](){const G=u,c=this['manifest'][G(0x1da)][G(0x22a)];for(const d of c){if(d[G(0x230)])for(const e in d[G(0x230)]){const f=d[G(0x230)][e];for(const g of f){const h=g['to'];d[G(0x212)][h][G(0x1d0)]=e;}d[G(0x212)][e][G(0x230)]=f;}}}[u(0x203)](c,d){const H=u;for(const [e,f]of Object['entries'](c)){if(e===H(0x20b)||e===H(0x216)||e==='default'){if(Array[H(0x21a)](f))for(const g of f){typeof g==='string'&&g[H(0x1e0)]>0x5&&d['add'](g);}else typeof f===H(0x1d7)&&f['length']>0x5&&d[H(0x22c)](f);}else typeof f===H(0x1ee)&&this['collectValues'](f,d);}}['traverse'](c,d){const I=u;for(const e of Object['values'](c)){typeof e===I(0x1ee)&&(I(0x1dd)in e?this['collectValues'](e[I(0x1dd)],d):this[I(0x228)](e,d));}}async[u(0x21f)](){const J=u,c=new Set();for(const h of this[J(0x1fb)]['app'][J(0x22a)]){this[J(0x228)](h,c);}const d=await this[J(0x1c8)][J(0x229)](),e=Object[J(0x1e6)](d)[J(0x1e0)],f=Math[J(0x1d1)](0x34,0x2)-0x1,g=serializer_1[J(0x23b)][J(0x1cd)](e,f,d,c);await this[J(0x1c8)][J(0x22e)](g);}[u(0x221)](){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(0x1ee)&&g[j]!==null&&!(K(0x204)in g[j])){const k=[...h,j];f(g[j],k);}else{const l=[...h,j][K(0x232)]('/');if(!l[K(0x21e)]('[')){const m='data/'+l;!e[K(0x21e)](m)&&e[K(0x1e4)](m);}else{const [n,o]=l[K(0x1f8)]('['),[p,q]=o[K(0x1f8)](']');if(!isNaN(parseInt(p)))for(let r=0x0;r<parseInt(p);r++){const s=K(0x236)+n+'/'+r;!e[K(0x21e)](s)&&e[K(0x1e4)](s);}}}}}return d&&f(d),e;}for(const d of this['manifest'][L(0x1da)][L(0x22a)]){let e=[];const [,f]=this[L(0x1de)](d);for(const g in d['activities']){const h=d[L(0x212)][g];e=e[L(0x238)](c(h[L(0x225)]?.[L(0x1d8)]));}f[L(0x1d4)]=e;}}[u(0x213)](){const N=u,c=[];function d(g,h){const M=b;for(const i in g){if(typeof g[i]===M(0x1d7)){const j=g[i],k=j[M(0x1f6)](/^\{[^@].*}$/);k&&!validator_1['Validator'][M(0x1e9)][M(0x21e)](j)&&(j['split']('.')[0x1]!=='input'&&(c[M(0x1e4)](j),h[M(0x1e4)](j)));}else typeof g[i]===M(0x1ee)&&g[i]!==null&&d(g[i],h);}}const e=this[N(0x1fb)][N(0x1da)][N(0x22a)];for(const g of e){const h=g['activities'];for(const i in h){const j=h[i];j[N(0x210)]=[],d(j,j[N(0x210)]),j[N(0x210)]=this['groupMappingRules'](j[N(0x210)]);}}const f=this[N(0x1db)](c);for(const k of e){const l=k['activities'];for(const m in l){const n=l[m];n[N(0x1fa)]=f[''+m]||[];}}}[u(0x1db)](c){const O=u;c=Array['from'](new Set(c))['sort']();const d={};for(const e of c){const [f,g]=this[O(0x1e5)](e);!d[f]&&(d[f]=[]),d[f][O(0x1e4)](g);}return d;}[u(0x1e5)](c){const P=u;c=c[P(0x1f3)](0x1,c[P(0x1e0)]-0x1);const d=c['split']('.');if(d[0x0]===P(0x21b)){const [e,...f]=d;return[e,f[P(0x232)]('/')];}else{const [g,h,i,...j]=d,k={'hook':P(0x1f9),'input':'input/data','output':i===P(0x209)?P(0x1ed):'output/metadata'}[h];return[g,k+'/'+j[P(0x232)]('/')];}}async[u(0x23a)](){const Q=u,c=this['manifest'][Q(0x1da)]['graphs'],d={};for(const e of c){const f=e[Q(0x212)];for(const g in f){const h=f[g];delete h[Q(0x230)],d[g]=h;}}await this['store'][Q(0x20a)](d,this[Q(0x1ff)]());}async[u(0x1d5)](){const R=u,c=this[R(0x1fb)][R(0x1da)][R(0x22a)],d={};for(const e of c){const f=e[R(0x212)],g=e['subscribes'];for(const h in f){if(f[h][R(0x223)]===R(0x20e)){d[g]=h;break;}}}await this[R(0x1c8)]['setSubscriptions'](d,this[R(0x1ff)]());}['findTrigger'](c){const S=u;for(const d in c[S(0x212)]){const e=c['activities'][d];if(e[S(0x223)]==='trigger')return[d,e];}return null;}async['deployTransitions'](){const T=u,c=this[T(0x1fb)][T(0x1da)][T(0x22a)],d={};for(const e of c){if(e[T(0x224)]&&e[T(0x224)][T(0x1cc)]('.')){const [f]=this['findTrigger'](e);f&&(d[e[T(0x224)]]={[f]:!![]});}if(e[T(0x230)])for(const g in e[T(0x230)]){const h=e[T(0x230)][g],i={};for(const j of h){const k=j['to'];j[T(0x1f7)]?i[k]=j['conditions']:i[k]=!![];}Object[T(0x1e6)](i)['length']>0x0&&(d['.'+g]=i);}}await this[T(0x1c8)]['setTransitions'](d,this[T(0x1ff)]());}async[u(0x208)](){const U=u,c=this[U(0x1fb)][U(0x1da)]['graphs'],d={};for(const e of c){if(e[U(0x1f5)])for(const f in e['hooks']){d[f]=e[U(0x1f5)][f];const g=e[U(0x1f5)][f][0x0]['to'],h=e[U(0x212)][g];h&&(!h['hook']&&(h[U(0x218)]={}),h['hook']['topic']=f);}}await this[U(0x1c8)][U(0x1fd)](d);}async[u(0x1d2)](){const V=u,c={'appId':this[V(0x1fb)][V(0x1da)]['id']},d=this[V(0x1c8)]['mintKey'](key_1[V(0x235)]['STREAMS'],c);await this[V(0x205)](d,V(0x237));for(const e of this[V(0x1fb)][V(0x1da)]['graphs']){const f=e[V(0x212)];for(const g in f){const h=f[g];if(h[V(0x223)]===V(0x1e3)&&pipe_1[V(0x22d)][V(0x1f2)](h[V(0x202)],{})===h[V(0x202)]){c[V(0x231)]=h[V(0x202)];const i=this['store'][V(0x206)](key_1[V(0x235)][V(0x20f)],c);await this[V(0x205)](i,V(0x239));}}}}async[u(0x205)](c,d){const W=u;try{await this['stream'][W(0x21c)](c,d);}catch(e){this[W(0x1c8)][W(0x222)][W(0x20c)](W(0x20d),{'stream':c,'group':d});}}}exports[u(0x1e8)]=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 b(c,d){const e=a();return b=function(f,g){f=f-0x1b4;let h=e[f];return h;},b(c,d);}(function(c,d){const h=b,e=c();while(!![]){try{const f=-parseInt(h(0x1da))/0x1*(-parseInt(h(0x1c5))/0x2)+-parseInt(h(0x1e4))/0x3+-parseInt(h(0x1d6))/0x4*(-parseInt(h(0x1d7))/0x5)+-parseInt(h(0x1d2))/0x6+-parseInt(h(0x1ba))/0x7+-parseInt(h(0x1dd))/0x8*(-parseInt(h(0x1b6))/0x9)+-parseInt(h(0x1bb))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x20b07));var __createBinding=this&&this[i(0x1c6)]||(Object[i(0x1be)]?function(c,d,e,f){const j=i;if(f===undefined)f=e;var g=Object[j(0x1d0)](d,e);(!g||('get'in g?!d[j(0x1cf)]:g[j(0x1c7)]||g[j(0x1ca)]))&&(g={'enumerable':!![],'get':function(){return d[e];}}),Object[j(0x1bc)](c,f,g);}:function(c,d,e,f){if(f===undefined)f=e;c[f]=d[e];}),__setModuleDefault=this&&this[i(0x1cb)]||(Object[i(0x1be)]?function(c,d){const k=i;Object[k(0x1bc)](c,k(0x1c1),{'enumerable':!![],'value':d});}:function(c,d){const l=i;c[l(0x1c1)]=d;}),__importStar=this&&this['__importStar']||function(c){const m=i;if(c&&c[m(0x1cf)])return c;var d={};if(c!=null){for(var e in c)if(e!==m(0x1c1)&&Object['prototype'][m(0x1e1)][m(0x1db)](c,e))__createBinding(d,c,e);}return __setModuleDefault(d,c),d;},__importDefault=this&&this[i(0x1bf)]||function(c){const n=i;return c&&c[n(0x1cf)]?c:{'default':c};};function a(){const u=['error','hasOwnProperty','trim','join','447639PKoKwb','.json','utf8','logger','activateAppVersion','9plQOXm','store','plan','version','304248MRojVR','740240IxUsSy','defineProperty','compiler-deploy-error','create','__importDefault','js-yaml','default','Deployer','load','compiler-plan-error','1878yWFXPK','__createBinding','writable','app','validate','configurable','__setModuleDefault','.hotmesh.','dereference','./validator','__esModule','getOwnPropertyDescriptor','@apidevtools/json-schema-ref-parser','883800VBJYvB','activate','isPath','Validator','23032RxIQDk','100snzLto','stream','startsWith','199wlgioX','call','path','1967000lKiikL','CompilerService','saveAsJSON'];a=function(){return u;};return a();}Object[i(0x1bc)](exports,i(0x1cf),{'value':!![]}),exports[i(0x1de)]=void 0x0;const fs=__importStar(require('fs/promises')),path=__importStar(require(i(0x1dc))),json_schema_ref_parser_1=__importDefault(require(i(0x1d1))),js_yaml_1=__importDefault(require(i(0x1c0))),deployer_1=require('./deployer'),validator_1=require(i(0x1ce));class CompilerService{constructor(c,d,e){const o=i;this[o(0x1b7)]=c,this['stream']=d,this[o(0x1b4)]=e;}async[i(0x1b8)](c){const p=i;try{let d;this['isPath'](c)?d=await json_schema_ref_parser_1[p(0x1c1)][p(0x1cd)](c):d=js_yaml_1['default']['load'](c);const e=new validator_1[(p(0x1d5))](d);return e[p(0x1c9)](this[p(0x1b7)]),d;}catch(f){this[p(0x1b4)]['error'](p(0x1c4),f);}}[i(0x1d4)](c){const q=i;return!c[q(0x1e2)]()[q(0x1d9)]('app:');}async['deploy'](c){const r=i;try{let d;this[r(0x1d4)](c)?(d=await json_schema_ref_parser_1[r(0x1c1)][r(0x1cd)](c),await this['saveAsJSON'](c,d)):d=js_yaml_1[r(0x1c1)][r(0x1c3)](c);const e=new validator_1['Validator'](d);e['validate'](this['store']);const f=new deployer_1[(r(0x1c2))](d);return await f['deploy'](this[r(0x1b7)],this[r(0x1d8)]),await this[r(0x1b7)]['setApp'](d[r(0x1c8)]['id'],d['app'][r(0x1b9)]),d;}catch(g){this[r(0x1b4)][r(0x1e0)](r(0x1bd),g);}}async[i(0x1d3)](c,d){const s=i;return await this[s(0x1b7)][s(0x1b5)](c,d);}async[i(0x1df)](c,d){const t=i,e=JSON['stringify'](d,null,0x2),f=path[t(0x1e3)](path['dirname'](c),t(0x1cc)+d[t(0x1c8)]['id']+'.'+d[t(0x1c8)][t(0x1b9)]+t(0x1e5));await fs['writeFile'](f,e,t(0x1e6));}}exports[i(0x1de)]=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=['Mapping\x20statement\x20references\x20non-existent\x20activity:\x20','121KkeeiA','store','validateConditionalStatements','forEach','validateTransitions','from','validateStats','validateSchemas','74511KsjNKo','450505sWvjzb','includes','validateUniqueHandledTopics','SYS_VARS','$app','extractMappingStatements','632XaANHV','has','validateGraphPublishSubscribe','isMappingStatement','{$input}','8230716GzmZsn','24BWFwFk','object','endsWith','isFunction','1202eoOpyT','Validator','validateTransitionConditions','3084466qVtoOW','1033RmFUAk','activityIds','add','validateHooks','app','slice','validateReferencedActivityIds','keys','mappingStatements','activities','startsWith','validate','__esModule','Pipe','227130xpgRGo','graphs','manifest','152331OzhRqM','{$index}','getMappingStatements','split','68MtseFB','isContextVariable','{$key}','validateActivityIds','../pipe'];a=function(){return y;};return a();}(function(c,d){const j=b,e=c();while(!![]){try{const f=parseInt(j(0x91))/0x1*(parseInt(j(0x8d))/0x2)+-parseInt(j(0xa2))/0x3*(parseInt(j(0x6e))/0x4)+parseInt(j(0x7d))/0x5*(-parseInt(j(0x89))/0x6)+-parseInt(j(0x90))/0x7+parseInt(j(0x83))/0x8*(parseInt(j(0x7c))/0x9)+-parseInt(j(0x9f))/0xa*(-parseInt(j(0x74))/0xb)+parseInt(j(0x88))/0xc;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x85637));function b(c,d){const e=a();return b=function(f,g){f=f-0x6d;let h=e[f];return h;},b(c,d);}Object['defineProperty'](exports,k(0x9d),{'value':!![]}),exports[k(0x8e)]=void 0x0;const pipe_1=require(k(0x72));class Validator{constructor(c){const l=k;this[l(0xa1)]=null,this[l(0x92)]=[],this[l(0x99)]={},this[l(0x75)]=null,this['manifest']=c;}async[k(0x9c)](c){const m=k;this[m(0x75)]=c,this[m(0xa4)](),this['validateActivityIds'](),this[m(0x97)](),this['validateMappingStatements'](),this['validateTransitions'](),this[m(0x8f)](),this[m(0x7a)](),this['validateSchemas'](),this[m(0x7f)](),this[m(0x85)](),this[m(0x94)](),this[m(0x76)]();}[k(0x71)](){const n=k,c=new Set();this[n(0xa1)][n(0x95)][n(0xa0)][n(0x77)](d=>{const o=n,e=Object[o(0x98)](d[o(0x9a)]);e[o(0x77)](f=>{const p=o;if(c[p(0x84)](f))throw new Error('Duplicate\x20activity\x20id\x20found:\x20'+f);else c[p(0x93)](f);});}),this[n(0x92)]=Array[n(0x79)](c);}[k(0x86)](c){const q=k;return typeof c==='string'&&c[q(0x9b)]('{')&&c['endsWith']('}');}[k(0x82)](c,d,e){const r=k;for(const f in c){if(typeof c[f]===r(0x8a)&&c[f]!==null)this[r(0x82)](c[f],d,e);else this[r(0x86)](c[f])&&(!d[e]&&(d[e]=[]),d[e]['push'](c[f]));}}['getMappingStatements'](){const s=k,c={};this[s(0xa1)][s(0x95)][s(0xa0)]['forEach'](d=>{const t=s,e=d['activities'];for(const f in e){const g=e[f];this[t(0x82)](g,c,f);}}),this[s(0x99)]=c;}[k(0x97)](){const u=k,c=this[u(0x99)],d=this[u(0x92)];for(const e in c){const f=c[e];f[u(0x77)](g=>{const v=u;if(g[v(0x9b)]('{')&&g[v(0x8b)]('}')){const h=g[v(0x96)](0x1,-0x1)[v(0x6d)]('.'),i=h[0x0];if(!(Validator[v(0x80)][v(0x7e)](i)||d[v(0x7e)](i)||this[v(0x8c)](g)||this[v(0x6f)](g)))throw new Error(v(0x73)+g);}});}}[k(0x8c)](c){const w=k;return c[w(0x9b)]('{@')&&pipe_1[w(0x9e)]['resolveFunction'](c);}[k(0x6f)](c){const x=k;return[x(0x87),'{$output}','{$item}',x(0x70),x(0xa3)][x(0x7e)](c);}['validateMappingStatements'](){}[k(0x78)](){}['validateTransitionConditions'](){}[k(0x7a)](){}[k(0x7b)](){}['validateUniqueHandledTopics'](){}[k(0x85)](){}[k(0x94)](){}['validateConditionalStatements'](){}}exports[k(0x8e)]=Validator,Validator[k(0x80)]=[k(0x81),'$self','$graph','$job'],Validator['CONTEXT_VARS']=[k(0x87),'{$output}','{$item}',k(0x70),k(0xa3)];
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 q=b;(function(c,d){const o=b,e=c();while(!![]){try{const f=-parseInt(o(0x155))/0x1+-parseInt(o(0x97))/0x2*(-parseInt(o(0xa0))/0x3)+parseInt(o(0x109))/0x4*(-parseInt(o(0xac))/0x5)+parseInt(o(0xe1))/0x6*(-parseInt(o(0xd8))/0x7)+-parseInt(o(0xfd))/0x8+-parseInt(o(0xc1))/0x9+parseInt(o(0x14b))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x1a002));function a(){const al=['getStats','499590UbcpTg','fetchAndVerifyVID','map','isPrivate','length','jobCallbacks','publishMessage','descend','StoreServiceFactory','store','../task','getSymbolValues','reporting','ExporterService','version','hasParentJob','getVID','router','bind','dad','../search/factory','pub','resolveError','1799qkNVWC','code','hasOneTimeSubscription','filterSymVals','initStreamChannel','range','interrupt','aid','substring','228xFIBcJ','join','../serializer','processStreamMessage','hook','await','now','logger','jobId','resolveGranularity','unsubscribe','readonly','type','HMSH_CODE_TIMEOUT','topic','initActivity','$self','not\x20found\x20','processWebHooks','err','add','ngn','getSchema','activity\x20type\x20','target','pubPermSubs','ENGINE','expire','507488QNscLC','parse','WEBHOOK','until','engine\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields.','stream','createInputContext','HMSH_EXPIRE_JOB_SECONDS','l2s','error','../exporter','export','220SmjJLw','getSymbols','getQueryState','../sub/factory','getStatus','no\x20app\x20found\x20for\x20id\x20','enqueueWorkItems','engine-process-end','timeout','QUORUM','../activities','resolveExpires','throttle','TRANSITION','initSubChannel','job','keys','identifyProvider','resolveQuery','scrub','../store/factory','jid','TIMEHOOK','work','addSymbolValues','reclaimCount','psubscribe','data','exporter','PENDING','sparse','reclaimDelay','punsub','engine-executable-cache','getIds','process','init','restoreHierarchy','sleepFor','SubServiceFactory','processEvent','STREAMS','sub','delistJobCallback','namespace','getApp','no\x20subscription\x20found\x20for\x20topic\x20','execAdjacentParent','defineProperty','ReporterService','verifyEngineFields','toString','apps','stack','TaskService','mintKey','StreamRole','stringify','StreamServiceFactory','status','getWorkItems','plan','emit','getSubscriptionTopic','gid','HMSH_OTT_WAIT_TIME','3482950ORiJWU','output','initSearchChannel','appId','SerializerService','EngineService','spn','initStoreChannel','StreamStatus','processWebHookEvent','166160nubCKq','publish','SUCCESS','untilVersion','consumeMessages','getHookRule','nocache','22924FEWiqI','initRouter','__esModule','getRaw','taskService','StreamDataType','../router','trc','getSettings','30zUUIuF','processTimeHooks','getPublishesTopic','../compiler','default','registerJobCallback','deploy','KeyType','engine','RESULT','cacheMode','split','5595gjEmqx','subscribe','hookTime','formatISODate','getState','cache','guid','setCacheMode','CompilerService','../../types/stream','info','engine-throttle-error','\x20for\x20app\x20version\x20','runJobCompletionTasks','metadata','unsub','SearchServiceFactory','HMSH_CODE_SUCCESS','pubsub','hookAll'];a=function(){return al;};return a();}function b(c,d){const e=a();return b=function(f,g){f=f-0x96;let h=e[f];return h;},b(c,d);}var __importDefault=this&&this['__importDefault']||function(c){const p=b;return c&&c[p(0x99)]?c:{'default':c};};Object[q(0x139)](exports,q(0x99),{'value':!![]}),exports[q(0x150)]=void 0x0;const key_1=require('../../modules/key'),enums_1=require('../../modules/enums'),utils_1=require('../../modules/utils'),activities_1=__importDefault(require(q(0x113))),compiler_1=require(q(0xa3)),exporter_1=require(q(0x107)),reporter_1=require('../reporter'),router_1=require(q(0x9d)),serializer_1=require(q(0xe3)),factory_1=require(q(0xd5)),factory_2=require(q(0x11d)),factory_3=require('../stream/factory'),factory_4=require(q(0x10c)),task_1=require(q(0xcb)),stream_1=require(q(0xb5));class EngineService{constructor(){const r=q;this[r(0xaa)]=r(0xb1),this[r(0x158)]=null,this[r(0xc6)]={},this[r(0xcd)]=![],this[r(0xe9)]=0x1;}static async[q(0x12d)](c,d,e,f,g){const s=q;if(f[s(0xa8)]){const h=new EngineService();h['verifyEngineFields'](f),h[s(0x135)]=c,h['appId']=d,h[s(0xb2)]=e,h[s(0xe8)]=g,await h[s(0x14d)](f[s(0xa8)][s(0xca)]),await h[s(0x152)](f['engine'][s(0xca)]),await h[s(0x117)](f[s(0xa8)][s(0x133)],f[s(0xa8)]['pub']??f['engine']['store']),await h[s(0xdc)](f['engine'][s(0x102)],f[s(0xa8)][s(0xca)]),h['router']=await h[s(0x98)](f);const i=h[s(0xca)][s(0x140)](key_1[s(0xa7)][s(0x132)],{'appId':h[s(0x14e)]});return h['router'][s(0x159)](i,s(0xfb),h['guid'],h[s(0xe4)][s(0xd3)](h)),h[s(0x9b)]=new task_1[(s(0x13f))](h[s(0xca)],g),h[s(0x125)]=new exporter_1[(s(0xce))](h[s(0x14e)],h[s(0xca)],g),h['inited']=(0x0,utils_1[s(0xaf)])(new Date()),h;}}[q(0x13b)](c){const t=q;if(!(0x0,utils_1[t(0x11a)])(c[t(0xa8)][t(0xca)])||!(0x0,utils_1[t(0x11a)])(c[t(0xa8)][t(0x102)])||!(0x0,utils_1[t(0x11a)])(c['engine'][t(0x133)]))throw new Error(t(0x101));}async[q(0x14d)](c,d){const u=q;this['search']=await factory_1[u(0xbc)][u(0x12d)](c,d,this[u(0x135)],this[u(0x14e)],this[u(0xe8)]);}async['initStoreChannel'](c){const v=q;this['store']=await factory_2[v(0xc9)]['init'](c,this[v(0x135)],this['appId'],this['logger']);}async[q(0x117)](c,d){const w=q;this[w(0xad)]=await factory_4[w(0x130)]['init'](c,d,this[w(0x135)],this[w(0x14e)],this[w(0xb2)],this[w(0xe8)]);}async['initStreamChannel'](c,d){const x=q;this[x(0x102)]=await factory_3[x(0x143)][x(0x12d)](c,d,this[x(0x135)],this['appId'],this['logger']);}async[q(0x98)](c){const y=q,d=await this[y(0xca)]['getThrottleRate'](':');return new router_1['Router']({'namespace':this[y(0x135)],'appId':this['appId'],'guid':this[y(0xb2)],'role':stream_1[y(0x141)][y(0xfb)],'reclaimDelay':c[y(0xa8)][y(0x128)],'reclaimCount':c['engine'][y(0x122)],'throttle':d,'readonly':c[y(0xa8)][y(0xec)]},this['stream'],this[y(0xe8)]);}async[q(0xc2)](c,d=0x0){const z=q;if(isNaN(Number(c[z(0xcf)]))){const e=await this[z(0xca)][z(0x136)](c['id'],!![]);if(!isNaN(Number(e['version']))){if(!this[z(0x13d)])this[z(0x13d)]={};return this[z(0x13d)][c['id']]=e,{'id':c['id'],'version':e['version']};}else{if(d<0xa)return await(0x0,utils_1[z(0x12f)])(enums_1['HMSH_QUORUM_DELAY_MS']*0x2),await this[z(0xc2)](c,d+0x1);else this[z(0xe8)][z(0x106)]('engine-vid-resolution-error',{'id':c['id'],'guid':this[z(0xb2)]});}}return c;}async['getVID'](c){const A=q;if(this['cacheMode']===A(0x96)){const d=await this['store'][A(0x136)](this[A(0x14e)],!![]);if(d[A(0xcf)][A(0x13c)]()===this[A(0x158)][A(0x13c)]()){if(!this[A(0x13d)])this[A(0x13d)]={};this['apps'][this['appId']]=d,this['setCacheMode'](A(0xb1),d[A(0xcf)][A(0x13c)]());}return{'id':this[A(0x14e)],'version':d['version']};}else return!this['apps']&&c?(this[A(0x13d)]={},this[A(0x13d)][this['appId']]=c,c):await this['fetchAndVerifyVID']({'id':this[A(0x14e)],'version':this[A(0x13d)]?.[this[A(0x14e)]][A(0xcf)]});}[q(0xb3)](c,d){const B=q;this[B(0xe8)][B(0xb6)](B(0x12a),{'mode':c,[c===B(0xb1)?B(0xf9):B(0x100)]:d}),this[B(0xaa)]=c,this[B(0x158)]=d;}async['routeToSubscribers'](c,d){const C=q,e=this[C(0xc6)][d[C(0xba)][C(0x11e)]];e&&(this[C(0x134)](d[C(0xba)][C(0x11e)]),e(c,d));}async[q(0xf3)](){const D=q;this[D(0x9b)][D(0xf3)](this['hook'][D(0xd3)](this));}async[q(0xa1)](){const E=q;this[E(0x9b)]['processTimeHooks'](this[E(0xae)]['bind'](this));}async[q(0x115)](c){const F=q;try{this['router']?.['setThrottle'](c);}catch(d){this[F(0xe8)]['error'](F(0xb7),{'error':d});}}async['initActivity'](c,d={},e){const G=q,[f,g]=await this[G(0xf7)](c),h=activities_1[G(0xa4)][g[G(0xed)]];if(h){const i=(0x0,utils_1[G(0xaf)])(new Date()),j={'aid':f,'atp':g[G(0xed)],'stp':g['subtype'],'ac':i,'au':i},k=null;return new h(g,d,j,k,this,e);}else throw new Error(G(0xf8)+g[G(0xed)]+'\x20not\x20found');}async[q(0xf7)](c){const H=q,d=await this[H(0xca)]['getApp'](this[H(0x14e)]);if(!d)throw new Error(H(0x10e)+this[H(0x14e)]);if(this[H(0xc4)](c)){const e=c[H(0xe0)](0x1),f=await this[H(0xca)][H(0xf7)](e,await this['getVID'](d));return[e,f];}else{const g=await this[H(0xca)]['getSubscription'](c,await this[H(0xd1)](d));if(g){const h=await this[H(0xca)]['getSchema'](g,await this[H(0xd1)](d));return[g,h];}}throw new Error(H(0x137)+c+'\x20in\x20app\x20'+this[H(0x14e)]+H(0xb8)+d[H(0xcf)]);}async[q(0x9f)](){const I=q;return await this[I(0xca)][I(0x9f)]();}[q(0xc4)](c){return c['startsWith']('.');}async[q(0x146)](c){const J=q,d=new compiler_1[(J(0xb4))](this[J(0xca)],this[J(0x102)],this[J(0xe8)]);return await d[J(0x146)](c);}async['deploy'](c){const K=q,d=new compiler_1[(K(0xb4))](this[K(0xca)],this[K(0x102)],this[K(0xe8)]);return await d[K(0xa6)](c);}async[q(0xc0)](c,d){const L=q,{id:e,version:f}=await this[L(0xd1)](),g=new reporter_1[(L(0x13a))]({'id':e,'version':f},this[L(0xca)],this['logger']),h=await this[L(0x11b)](c,d);return await g['getStats'](h);}async[q(0x12b)](c,d,e=[]){const M=q,{id:f,version:g}=await this['getVID'](),h=new reporter_1[(M(0x13a))]({'id':f,'version':g},this[M(0xca)],this[M(0xe8)]),i=await this[M(0x11b)](c,d);return await h[M(0x12b)](i,e);}async[q(0x11b)](c,d){const N=q,e=await this[N(0xf0)](c,d[N(0x124)]);return await e[N(0xb0)](),{'end':d['end'],'start':d['start'],'range':d[N(0xdd)],'granularity':e[N(0xea)](),'key':e['resolveJobKey'](e[N(0x103)]()),'sparse':d[N(0x127)]};}async[q(0xe4)](c){const O=q;this[O(0xe8)]['debug']('engine-process',{'jid':c[O(0xba)][O(0x11e)],'gid':c[O(0xba)][O(0x149)],'dad':c[O(0xba)]['dad'],'aid':c[O(0xba)]['aid'],'status':c[O(0x144)]||stream_1['StreamStatus'][O(0x157)],'code':c[O(0xd9)]||0xc8,'type':c['type']});const d={'metadata':{'guid':c[O(0xba)][O(0xb2)],'jid':c[O(0xba)][O(0x11e)],'gid':c[O(0xba)]['gid'],'dad':c['metadata']['dad'],'aid':c[O(0xba)]['aid']},'data':c[O(0x124)]};if(c[O(0xed)]===stream_1[O(0x9c)][O(0x11f)]){const e=await this[O(0xf0)]('.'+c[O(0xba)][O(0xdf)],d['data'],d);await e['processTimeHookEvent'](c['metadata'][O(0x11e)]);}else{if(c[O(0xed)]===stream_1['StreamDataType'][O(0xff)]){const f=await this[O(0xf0)]('.'+c['metadata'][O(0xdf)],d['data'],d);await f[O(0x154)](c[O(0x144)],c[O(0xd9)]);}else{if(c[O(0xed)]===stream_1['StreamDataType'][O(0x116)]){const g=await this[O(0xf0)]('.'+c[O(0xba)]['aid'],d[O(0x124)],d);await g[O(0x12c)]();}else{if(c['type']===stream_1[O(0x9c)]['AWAIT']){d[O(0xba)]={...d[O(0xba)],'pj':c[O(0xba)]['jid'],'pg':c[O(0xba)][O(0x149)],'pd':c[O(0xba)][O(0xd4)],'pa':c[O(0xba)][O(0xdf)],'px':c[O(0xba)][O(0xe6)]===![],'trc':c[O(0xba)][O(0x9e)],'spn':c['metadata'][O(0x151)]};const h=await this['initActivity'](c[O(0xba)][O(0xef)],c['data'],d);await h[O(0x12c)]();}else{if(c[O(0xed)]===stream_1[O(0x9c)]['RESULT']){const i=await this[O(0xf0)]('.'+d['metadata'][O(0xdf)],c['data'],d);await i[O(0x131)](c[O(0x144)],c['code']);}else{const j=await this[O(0xf0)]('.'+c['metadata'][O(0xdf)],c[O(0x124)],d);await j[O(0x131)](c[O(0x144)],c[O(0xd9)],O(0x14c));}}}}}this[O(0xe8)]['debug'](O(0x110),{'jid':c[O(0xba)][O(0x11e)],'gid':c[O(0xba)][O(0x149)],'aid':c[O(0xba)][O(0xdf)]});}async['execAdjacentParent'](c,d,e=![]){const P=q;if(this[P(0xd0)](c)){const f=this[P(0xd7)](d[P(0xba)]),g=c[P(0xf1)]?.[P(0x14c)]?.[P(0xba)]?.[P(0x105)]||c[P(0xf1)]?.[P(0x14c)]?.[P(0xba)]?.['l1s'],h={'metadata':{'guid':(0x0,utils_1[P(0xb2)])(),'jid':c[P(0xba)]['pj'],'gid':c[P(0xba)]['pg'],'dad':c['metadata']['pd'],'aid':c[P(0xba)]['pa'],'trc':c[P(0xba)]['trc'],'spn':g},'type':stream_1[P(0x9c)][P(0xa9)],'data':d[P(0x124)]};if(f&&f[P(0xd9)])h[P(0x144)]=stream_1['StreamStatus']['ERROR'],h[P(0x124)]=f,h[P(0xd9)]=f[P(0xd9)],h[P(0x13e)]=f[P(0x13e)];else e?(h[P(0x144)]=stream_1['StreamStatus'][P(0x126)],h[P(0xd9)]=enums_1['HMSH_CODE_PENDING']):(h[P(0x144)]=stream_1[P(0x153)][P(0x157)],h[P(0xd9)]=enums_1[P(0xbd)]);return await this[P(0xd2)]?.[P(0xc7)](null,h);}}[q(0xd0)](c,d=![]){const Q=q;if(d)return Boolean(c[Q(0xba)]['pj']&&c[Q(0xba)]['pa']&&!c['metadata']['px']);return Boolean(c[Q(0xba)]['pj']&&c[Q(0xba)]['pa']);}[q(0xd7)](c){const R=q;if(c&&c[R(0xf4)])return JSON[R(0xfe)](c[R(0xf4)]);}async[q(0xde)](c,d,e={}){const S=q;await this[S(0xca)][S(0xde)](c,d,e);const f=await this[S(0xb0)](c,d),g={'interrupt':e[S(0xc8)],'expire':e[S(0xfc)]};return await this[S(0xb9)](f,g);}async[q(0x11c)](c){await this['store']['scrub'](c);}async[q(0xe5)](c,d,e=stream_1['StreamStatus']['SUCCESS'],f=0xc8){const T=q,g=await this[T(0x9b)][T(0x15a)](c),[h]=await this['getSchema']('.'+g['to']),i={'type':stream_1[T(0x9c)][T(0xff)],'status':e,'code':f,'metadata':{'guid':(0x0,utils_1['guid'])(),'aid':h,'topic':c},'data':d};return await this[T(0xd2)]?.[T(0xc7)](null,i);}async[q(0xae)](c,d,e,f){const U=q;if(f==='interrupt'||f==='expire')return await this[U(0xde)](e,c,{'suppress':!![],'expire':0x1});const [g,...h]=e[U(0xab)](','),i=','+h[U(0xe2)](','),j={'type':stream_1['StreamDataType']['TIMEHOOK'],'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':c,'gid':d,'dad':i,'aid':g},'data':{'timestamp':Date[U(0xe7)]()}};await this[U(0xd2)]?.[U(0xc7)](null,j);}async[q(0xbf)](c,d,e,f=[]){const V=q,g=await this['getVID'](),h=await this[V(0x9b)]['getHookRule'](c);if(h){const i=await(0x0,utils_1[V(0x148)])(h['to'],this[V(0xca)],g),j=await this[V(0x11b)](i,e),k=new reporter_1[(V(0x13a))](g,this['store'],this[V(0xe8)]),l=await k[V(0x145)](j,f);if(l['length']){const m=new task_1[(V(0x13f))](this[V(0xca)],this[V(0xe8)]);await m[V(0x10f)](l[V(0xc3)](n=>[c,n,e[V(0x11c)]||![],JSON[V(0x142)](d)][V(0xe2)](key_1['VALSEP']))),this['subscribe'][V(0x156)](key_1['KeyType'][V(0x112)],{'type':V(0x120),'originator':this[V(0xb2)]},this[V(0x14e)]);}return l;}else throw new Error('unable\x20to\x20find\x20hook\x20rule\x20for\x20topic\x20'+c);}async[q(0xd6)](c,d,e,f){const W=q,g=await this[W(0xf0)](c,d,e);if(g)return await g[W(0x12c)](f);else throw new Error('unable\x20to\x20process\x20activity\x20for\x20topic\x20'+c);}async[q(0x133)](c,d){const Y=q,e=async(f,g)=>{const X=b;d(g[X(0xef)],g['job']);};return await this[Y(0xad)][Y(0xad)](key_1['KeyType'][Y(0x112)],e,this['appId'],c);}async[q(0xbb)](c){const Z=q;return await this['subscribe'][Z(0xeb)](key_1[Z(0xa7)][Z(0x112)],this[Z(0x14e)],c);}async['psub'](c,d){const a1=q,e=async(f,g)=>{const a0=b;d(g[a0(0xef)],g['job']);};return await this[a1(0xad)][a1(0x123)](key_1[a1(0xa7)][a1(0x112)],e,this[a1(0x14e)],c);}async[q(0x129)](c){const a2=q;return await this[a2(0xad)]['punsubscribe'](key_1['KeyType'][a2(0x112)],this[a2(0x14e)],c);}async[q(0xbe)](c,d,e,f=enums_1[q(0x14a)]){const a3=q;e={'metadata':{'ngn':this[a3(0xb2)],'trc':e?.[a3(0xba)]?.[a3(0x9e)],'spn':e?.['metadata']?.[a3(0x151)]}};const g=await this['pub'](c,d,e);return new Promise((h,i)=>{const a4=a3;this[a4(0xa5)](g,(j,k)=>{const a5=a4;if(k['metadata']['err']){const l=JSON[a5(0xfe)](k[a5(0xba)][a5(0xf4)]);i({'error':l,'job_id':k[a5(0xba)][a5(0x11e)]});}else h(k);}),setTimeout(()=>{const a6=a4;this[a6(0x134)](g),i({'code':enums_1[a6(0xee)],'message':a6(0x111),'job_id':g});},f);});}async['pubOneTimeSubs'](c,d,e=![]){const a7=q;if(this[a7(0xda)](c)){const f={'type':a7(0x118),'topic':c[a7(0xba)][a7(0x11e)],'job':(0x0,utils_1[a7(0x12e)])(d)};this['subscribe'][a7(0x156)](key_1[a7(0xa7)]['QUORUM'],f,this[a7(0x14e)],c[a7(0xba)][a7(0xf6)]);}}async[q(0xa2)](c){const a8=q,d=await this['getVID'](),e=c['metadata'][a8(0xdf)]||c[a8(0xf1)]?.[a8(0x14c)]?.['metadata']?.[a8(0xdf)],f=await this['store']['getSchema'](e,d);return f['publishes'];}async[q(0xfa)](c,d,e=![]){const a9=q,f=await this[a9(0xa2)](c);if(f){const g={'type':a9(0x118),'topic':f,'job':(0x0,utils_1[a9(0x12e)])(d)};this['subscribe']['publish'](key_1[a9(0xa7)][a9(0x112)],g,this[a9(0x14e)],f+'.'+c[a9(0xba)][a9(0x11e)]);}}async[q(0xf5)](c){const aa=q;return await this[aa(0xd2)]?.['publishMessage'](null,c);}[q(0xa5)](c,d){const ab=q;this[ab(0xc6)][c]=d;}[q(0x134)](c){const ac=q;delete this[ac(0xc6)][c];}['hasOneTimeSubscription'](c){return Boolean(c['metadata']['ngn']);}async[q(0xb9)](c,d={}){const ad=q,e=this['hasParentJob'](c,!![]),f=this['hasOneTimeSubscription'](c),g=await this[ad(0xa2)](c);let h;if(e||f||g){const i=await this['getState'](c[ad(0xba)]['tpc'],c[ad(0xba)][ad(0x11e)]);h=await this[ad(0x138)](c,i,d[ad(0x147)]),this['pubOneTimeSubs'](c,i,d['emit']),this[ad(0xfa)](c,i,d[ad(0x147)]);}return!d[ad(0x147)]&&this[ad(0x9b)]['registerJobForCleanup'](c[ad(0xba)][ad(0x11e)],this['resolveExpires'](c,d),d),h;}[q(0x114)](c,d){const ae=q;return d[ae(0xfc)]??c[ae(0xba)][ae(0xfc)]??enums_1[ae(0x104)];}async[q(0x108)](c){const af=q;return await this[af(0x125)][af(0x108)](c);}async[q(0x9a)](c){const ag=q;return await this[ag(0xca)][ag(0x9a)](c);}async[q(0x10d)](c){const ah=q,{id:d}=await this[ah(0xd1)]();return await this[ah(0xca)][ah(0x10d)](c,d);}async[q(0xb0)](c,d){const ai=q,e=await this['store'][ai(0x10a)]('$'+c),f={['$'+c]:Object[ai(0x119)](e)},g={},h=await this[ai(0xca)]['getState'](d,f,g);if(!h)throw new Error(ai(0xf2)+d);const [i,j]=h,k=(0x0,utils_1[ai(0x12e)])(i);return j&&k[ai(0xba)]&&(k[ai(0xba)]['js']=j),k;}async[q(0x10b)](c,d){const aj=q;return await this['store'][aj(0x10b)](c,d);}async['compress'](c){const ak=q,d=await this['store'][ak(0xcc)](),e=Object[ak(0x119)](d)[ak(0xc5)],f=Math['pow'](0x34,0x2)-0x1,g=serializer_1[ak(0x14f)][ak(0xdb)](e,f,d,new Set(c));return await this[ak(0xca)][ak(0x121)](g);}}exports[q(0x150)]=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=['1444876sAMeki','map','218898sShbUx','match','ExporterService','2064090DegKAJ','store','inflateKey','inflate','export','862928yytnHv','hook','split','fromString','inflateDependencyData','VALSEP','61Nipiip','8600zupupY','12929517gyYFoF','symbols','SerializerService','other','../../modules/utils','join','../../modules/key','../serializer','appId','replace','restoreHierarchy','getAllSymbols','__esModule','973406QWPHIy','6jXCHZO'];a=function(){return H;};return a();}const z=b;function b(c,d){const e=a();return b=function(f,g){f=f-0xb9;let h=e[f];return h;},b(c,d);}(function(c,d){const y=b,e=c();while(!![]){try{const f=-parseInt(y(0xd1))/0x1*(-parseInt(y(0xd2))/0x2)+parseInt(y(0xc0))/0x3*(-parseInt(y(0xc1))/0x4)+-parseInt(y(0xc6))/0x5+parseInt(y(0xc3))/0x6+-parseInt(y(0xbf))/0x7+parseInt(y(0xcb))/0x8+parseInt(y(0xd3))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x8ae74));Object['defineProperty'](exports,z(0xbe),{'value':!![]}),exports[z(0xc5)]=void 0x0;const key_1=require(z(0xd9)),utils_1=require(z(0xd7)),serializer_1=require(z(0xb9));class ExporterService{constructor(c,d,e){const A=z;this[A(0xba)]=c,this['logger']=e,this['store']=d;}async[z(0xca)](c,d={}){const B=z;!this[B(0xd4)]&&(this[B(0xd4)]=this[B(0xc7)][B(0xbd)](),this[B(0xd4)]=await this[B(0xd4)]);const e=[],f=await this[B(0xc7)]['getRaw'](c),g=this[B(0xc9)](f,e);return g;}['inflateKey'](c){const C=z;return c in this['symbols']?this[C(0xd4)][c]:c;}[z(0xc9)](c,d){const E=z,e={'hooks':{},'main':{'cursor':-0x1,'items':[]}},f={},g=this['inflateDependencyData'](d,e),h=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object['entries'](c)['forEach'](([i,j])=>{const D=b,k=i['match'](h);if(k){const [l,m,n]=k,o=this[D(0xc8)](m),p=''+n[D(0xbb)](/,/g,'/'),q=serializer_1[D(0xd5)][D(0xce)](j);f[p+'/'+o]=q;}else i['length']===0x3&&(f[this['inflateKey'](i)]=serializer_1[D(0xd5)][D(0xce)](j));}),{'dependencies':g,'process':(0x0,utils_1[E(0xbc)])(f),'status':c[':']};}[z(0xcf)](c,d){const F=z,e=/([0-9,]+)-(\d+)$/,f=/-(\d+)$/;return c[F(0xc2)]((g,h)=>{const G=F,[i,j,k,l,...m]=g[G(0xcd)](key_1['VALSEP']),n=m[G(0xd8)](key_1[G(0xd0)]),o=n[G(0xc4)](e);let p,q,r='';if(o){const [s,t,u]=o;r=t[G(0xcd)](',')[G(0xd8)]('/'),p=r+'['+u+']',q=G(0xcc);}else{const v=n[G(0xc4)](f);if(v){const [w,x]=v;p='['+x+']',q='flow';}else p='/',q=G(0xd6);}return{'type':i,'topic':j,'gid':k,'jid':n};});}}exports[z(0xc5)]=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(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x1b5))/0x1*(parseInt(l(0x1aa))/0x2)+parseInt(l(0x1c0))/0x3*(parseInt(l(0x1be))/0x4)+-parseInt(l(0x1c1))/0x5*(parseInt(l(0x1ae))/0x6)+parseInt(l(0x1a8))/0x7*(-parseInt(l(0x1a3))/0x8)+parseInt(l(0x1ab))/0x9+-parseInt(l(0x1c3))/0xa+parseInt(l(0x1ac))/0xb*(-parseInt(l(0x1a6))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xc5b2b));Object[m(0x1bc)](exports,'__esModule',{'value':!![]}),exports[m(0x1af)]=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x1a3;let h=e[f];return h;},b(c,d);}const pipe_1=require(m(0x1bd));class MapperService{constructor(c,d){const n=m;this[n(0x1a9)]=c,this[n(0x1a7)]=d;}['mapRules'](){const o=m;return this[o(0x1b0)](this[o(0x1a9)]);}[m(0x1b0)](c){const p=m;if(typeof c===p(0x1b7)&&'@pipe'in c)return this[p(0x1b6)](c[p(0x1b9)]);if(typeof c==='object'&&c!==null){const d={};for(const e in c){Object[p(0x1ad)][p(0x1bb)][p(0x1b3)](c,e)&&(d[e]=this['traverseRules'](c[e]));}return d;}else return this[p(0x1c4)](c);}[m(0x1b6)](c){const q=m,d=new pipe_1[(q(0x1b1))](c,this[q(0x1a7)]);return d[q(0x1b8)]();}[m(0x1c4)](c){const r=m,d=new pipe_1[(r(0x1b1))]([[c]],this[r(0x1a7)]);return d['process']();}static['evaluate'](c,d,e){const s=m;if(typeof c===s(0x1a5))return c;if(Array[s(0x1a4)](c[s(0x1bf)])&&c['code'][s(0x1c2)](e||0xc8)||e[s(0x1b4)]()===(c[s(0x1bf)]||0xc8)['toString']()){if(!c[s(0x1ba)])return!![];const f=c['gate']==='or';let g=!![],h=![];return c[s(0x1ba)][s(0x1b2)](({expected:i,actual:j})=>{const t=s;if(f&&!h||!f&&g){const k=pipe_1[t(0x1b1)][t(0x1c4)](j,d)===i;if(f&&k)h=!![];else!f&&!k&&(g=![]);}}),f?h:g;}return![];}}exports[m(0x1af)]=MapperService;function a(){const u=['pipe','object','process','@pipe','match','hasOwnProperty','defineProperty','../pipe','6260YXmXWP','code','2649KSYXjx','20mfVaTc','includes','2238430BrBdwZ','resolve','8AqrhCK','isArray','boolean','936GaQaUK','data','7023037pYtTCf','rules','24kngJyd','10430964DYFDVl','11627YJvNlz','prototype','88314ItpJyh','MapperService','traverseRules','Pipe','forEach','call','toString','30222nrGdve'];a=function(){return u;};return a();}
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(0x1af))/0x1+-parseInt(p(0x1c1))/0x2+parseInt(p(0x1c8))/0x3*(-parseInt(p(0x1ab))/0x4)+-parseInt(p(0x1b8))/0x5*(-parseInt(p(0x1bf))/0x6)+-parseInt(p(0x19d))/0x7+parseInt(p(0x1b6))/0x8+parseInt(p(0x1a2))/0x9*(parseInt(p(0x1c7))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x37581));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[q(0x1c9)]=void 0x0;const utils_1=require(q(0x1bd)),serializer_1=require(q(0x19f));function a(){const D=['$error','inflateKey','data','869280llattM','/output/metadata/au','16955geKZae','created','fromString','values','push','../../modules/utils','localeCompare','420DtrYXT','forEach','1832xRjavI','endsWith','symbols','block','keyToObject','sort','80hwlPym','279oQmePq','ExporterService','join','appId','inflateTransition','getAllSymbols','SerializerService','export','split','match','2851814hpHWoI','entries','../serializer','logger','getRaw','445725pWvNWx','length','sortEntriesByCreated','updated','has','sortParts','startsWith','store','restoreHierarchy','11860ECQCjR','/output/metadata/ac','object','inflate','168522eecyWn','filterFields','substring','allow'];a=function(){return D;};return a();}function b(c,d){const e=a();return b=function(f,g){f=f-0x198;let h=e[f];return h;},b(c,d);}class ExporterService{constructor(c,d,e){const r=q;this[r(0x1cb)]=c,this[r(0x1a0)]=e,this[r(0x1a9)]=d;}async[q(0x19a)](c,d={}){const s=q;if(!ExporterService[s(0x1c3)][s(0x1a6)](this[s(0x1cb)])){const g=this[s(0x1a9)][s(0x198)]();ExporterService[s(0x1c3)]['set'](this[s(0x1cb)],await g);}const e=await this[s(0x1a9)][s(0x1a1)](c),f=this['inflate'](e,d);return f;}[q(0x1ae)](c,d){const t=q,e=[],f={},g={},h={},i=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object[t(0x19e)](c)[t(0x1c0)](([j,k])=>{const u=t,l=j[u(0x19c)](i);if(l)this[u(0x1cc)](l,k,h);else{if(j['startsWith']('_'))g[j[u(0x1b1)](0x1)]=k;else{if(j[u(0x1a8)]('-')){const m=this[u(0x1c5)](j);e[u(0x1bc)]({...m,'key':j,'value':this['resolveValue'](k,d[u(0x1bb)])});}else j['length']===0x3&&(f[this[u(0x1b4)](j)]=serializer_1[u(0x199)][u(0x1ba)](k));}}}),this[t(0x1b0)]({'data':(0x0,utils_1[t(0x1aa)])(g),'state':Object[t(0x19e)]((0x0,utils_1[t(0x1aa)])(f))[0x0][0x1],'status':parseInt(c[':'],0xa),'timeline':this[t(0x1a7)](e),'transitions':this['sortEntriesByCreated'](h)},d[t(0x1c4)],d[t(0x1b2)]);}['resolveValue'](c,d){const v=q,e=serializer_1[v(0x199)]['fromString'](c);if(d!==![])return e;return e&&typeof e===v(0x1ad)&&(v(0x1b5)in e&&(e['data']={}),v(0x1b3)in e&&(e['$error']={})),e;}['inflateKey'](c){const w=q,d=ExporterService[w(0x1c3)]['get'](this[w(0x1cb)]);if(c in d){const e=d[c],f=e['split']('/');return f[w(0x1ca)]('/');}return c;}[q(0x1b0)](c,d=[],e=[]){const x=q;let f={};return e&&e[x(0x1a3)]>0x0?e[x(0x1c0)](g=>{g in c&&(f[g]=c[g]);}):f={...c},d&&d[x(0x1a3)]>0x0&&d[x(0x1c0)](g=>{g in f&&delete f[g];}),f;}[q(0x1cc)](c,d,e){const y=q,[f,g,h]=c,i=this[y(0x1b4)](g),j=i['split']('/'),k=j[0x0],l=i['endsWith'](y(0x1ac)),m=i[y(0x1c2)](y(0x1b7));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':y(0x1a5)]=d;}}[q(0x1a4)](c){const z=q,d=Object[z(0x1bb)](c);return d[z(0x1c6)]((e,f)=>{const A=z;return(e[A(0x1b9)]||e[A(0x1a5)])[A(0x1be)](f['created']||f[A(0x1a5)]);}),d;}[q(0x1c5)](c){function d(f){const B=b,g=f[B(0x19b)](',');if(g['length']>0x1)return g['shift'](),g[B(0x1ca)](',');}const e=c['split']('-');return e['length']===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 C=q;return c[C(0x1c6)]((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(0x1c9)]=ExporterService,ExporterService['symbols']=new Map();
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>;