@milaboratories/pl-middle-layer 1.46.20 → 1.46.22

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 (402) hide show
  1. package/dist/block_registry/index.d.ts +3 -3
  2. package/dist/block_registry/registry-v2-provider.cjs.map +1 -1
  3. package/dist/block_registry/registry-v2-provider.d.ts +2 -2
  4. package/dist/block_registry/registry-v2-provider.js.map +1 -1
  5. package/dist/block_registry/registry.cjs +54 -53
  6. package/dist/block_registry/registry.cjs.map +1 -1
  7. package/dist/block_registry/registry.d.ts +4 -4
  8. package/dist/block_registry/registry.d.ts.map +1 -1
  9. package/dist/block_registry/registry.js +54 -53
  10. package/dist/block_registry/registry.js.map +1 -1
  11. package/dist/block_registry/watcher.cjs +12 -12
  12. package/dist/block_registry/watcher.cjs.map +1 -1
  13. package/dist/block_registry/watcher.d.ts +6 -6
  14. package/dist/block_registry/watcher.d.ts.map +1 -1
  15. package/dist/block_registry/watcher.js +12 -12
  16. package/dist/block_registry/watcher.js.map +1 -1
  17. package/dist/block_registry/well_known_registries.cjs +6 -6
  18. package/dist/block_registry/well_known_registries.cjs.map +1 -1
  19. package/dist/block_registry/well_known_registries.d.ts +1 -1
  20. package/dist/block_registry/well_known_registries.js +6 -6
  21. package/dist/block_registry/well_known_registries.js.map +1 -1
  22. package/dist/cfg_render/executor.cjs +11 -11
  23. package/dist/cfg_render/executor.cjs.map +1 -1
  24. package/dist/cfg_render/executor.d.ts +5 -5
  25. package/dist/cfg_render/executor.js +11 -11
  26. package/dist/cfg_render/executor.js.map +1 -1
  27. package/dist/cfg_render/operation.d.ts +5 -5
  28. package/dist/cfg_render/renderer.cjs +74 -75
  29. package/dist/cfg_render/renderer.cjs.map +1 -1
  30. package/dist/cfg_render/renderer.d.ts +2 -2
  31. package/dist/cfg_render/renderer.d.ts.map +1 -1
  32. package/dist/cfg_render/renderer.js +74 -75
  33. package/dist/cfg_render/renderer.js.map +1 -1
  34. package/dist/cfg_render/traverse.cjs +27 -27
  35. package/dist/cfg_render/traverse.cjs.map +1 -1
  36. package/dist/cfg_render/traverse.d.ts +1 -1
  37. package/dist/cfg_render/traverse.js +27 -27
  38. package/dist/cfg_render/traverse.js.map +1 -1
  39. package/dist/cfg_render/util.cjs +1 -1
  40. package/dist/cfg_render/util.cjs.map +1 -1
  41. package/dist/cfg_render/util.d.ts +1 -1
  42. package/dist/cfg_render/util.js +1 -1
  43. package/dist/cfg_render/util.js.map +1 -1
  44. package/dist/debug/index.cjs +4 -2
  45. package/dist/debug/index.cjs.map +1 -1
  46. package/dist/debug/index.d.ts +2 -2
  47. package/dist/debug/index.d.ts.map +1 -1
  48. package/dist/debug/index.js +4 -2
  49. package/dist/debug/index.js.map +1 -1
  50. package/dist/dev_env/index.cjs +8 -8
  51. package/dist/dev_env/index.cjs.map +1 -1
  52. package/dist/dev_env/index.js +8 -8
  53. package/dist/dev_env/index.js.map +1 -1
  54. package/dist/dev_env/util.cjs +1 -1
  55. package/dist/dev_env/util.cjs.map +1 -1
  56. package/dist/dev_env/util.d.ts +1 -1
  57. package/dist/dev_env/util.js +1 -1
  58. package/dist/dev_env/util.js.map +1 -1
  59. package/dist/index.d.ts +16 -16
  60. package/dist/js_render/computable_context.cjs +78 -78
  61. package/dist/js_render/computable_context.cjs.map +1 -1
  62. package/dist/js_render/computable_context.d.ts +9 -9
  63. package/dist/js_render/computable_context.d.ts.map +1 -1
  64. package/dist/js_render/computable_context.js +78 -78
  65. package/dist/js_render/computable_context.js.map +1 -1
  66. package/dist/js_render/context.cjs +33 -27
  67. package/dist/js_render/context.cjs.map +1 -1
  68. package/dist/js_render/context.d.ts +7 -7
  69. package/dist/js_render/context.d.ts.map +1 -1
  70. package/dist/js_render/context.js +33 -27
  71. package/dist/js_render/context.js.map +1 -1
  72. package/dist/js_render/index.cjs +10 -6
  73. package/dist/js_render/index.cjs.map +1 -1
  74. package/dist/js_render/index.d.ts +6 -6
  75. package/dist/js_render/index.d.ts.map +1 -1
  76. package/dist/js_render/index.js +10 -6
  77. package/dist/js_render/index.js.map +1 -1
  78. package/dist/middle_layer/active_cfg.cjs.map +1 -1
  79. package/dist/middle_layer/active_cfg.d.ts +3 -3
  80. package/dist/middle_layer/active_cfg.d.ts.map +1 -1
  81. package/dist/middle_layer/active_cfg.js.map +1 -1
  82. package/dist/middle_layer/block.cjs +1 -1
  83. package/dist/middle_layer/block.cjs.map +1 -1
  84. package/dist/middle_layer/block.d.ts +6 -6
  85. package/dist/middle_layer/block.d.ts.map +1 -1
  86. package/dist/middle_layer/block.js +1 -1
  87. package/dist/middle_layer/block.js.map +1 -1
  88. package/dist/middle_layer/block_ctx.cjs +9 -9
  89. package/dist/middle_layer/block_ctx.cjs.map +1 -1
  90. package/dist/middle_layer/block_ctx.d.ts +6 -6
  91. package/dist/middle_layer/block_ctx.d.ts.map +1 -1
  92. package/dist/middle_layer/block_ctx.js +9 -9
  93. package/dist/middle_layer/block_ctx.js.map +1 -1
  94. package/dist/middle_layer/block_ctx_unsafe.cjs +1 -1
  95. package/dist/middle_layer/block_ctx_unsafe.cjs.map +1 -1
  96. package/dist/middle_layer/block_ctx_unsafe.d.ts +5 -5
  97. package/dist/middle_layer/block_ctx_unsafe.js +1 -1
  98. package/dist/middle_layer/block_ctx_unsafe.js.map +1 -1
  99. package/dist/middle_layer/driver_kit.cjs +1 -2
  100. package/dist/middle_layer/driver_kit.cjs.map +1 -1
  101. package/dist/middle_layer/driver_kit.d.ts +7 -7
  102. package/dist/middle_layer/driver_kit.d.ts.map +1 -1
  103. package/dist/middle_layer/driver_kit.js +1 -2
  104. package/dist/middle_layer/driver_kit.js.map +1 -1
  105. package/dist/middle_layer/frontend_path.cjs +5 -5
  106. package/dist/middle_layer/frontend_path.cjs.map +1 -1
  107. package/dist/middle_layer/frontend_path.d.ts +4 -4
  108. package/dist/middle_layer/frontend_path.d.ts.map +1 -1
  109. package/dist/middle_layer/frontend_path.js +5 -5
  110. package/dist/middle_layer/frontend_path.js.map +1 -1
  111. package/dist/middle_layer/index.d.ts +4 -4
  112. package/dist/middle_layer/middle_layer.cjs +11 -11
  113. package/dist/middle_layer/middle_layer.cjs.map +1 -1
  114. package/dist/middle_layer/middle_layer.d.ts +18 -18
  115. package/dist/middle_layer/middle_layer.d.ts.map +1 -1
  116. package/dist/middle_layer/middle_layer.js +11 -11
  117. package/dist/middle_layer/middle_layer.js.map +1 -1
  118. package/dist/middle_layer/navigation_states.cjs +2 -2
  119. package/dist/middle_layer/navigation_states.cjs.map +1 -1
  120. package/dist/middle_layer/navigation_states.d.ts +2 -2
  121. package/dist/middle_layer/navigation_states.js +2 -2
  122. package/dist/middle_layer/navigation_states.js.map +1 -1
  123. package/dist/middle_layer/ops.cjs +5 -5
  124. package/dist/middle_layer/ops.cjs.map +1 -1
  125. package/dist/middle_layer/ops.d.ts +11 -11
  126. package/dist/middle_layer/ops.d.ts.map +1 -1
  127. package/dist/middle_layer/ops.js +5 -5
  128. package/dist/middle_layer/ops.js.map +1 -1
  129. package/dist/middle_layer/project.cjs +71 -63
  130. package/dist/middle_layer/project.cjs.map +1 -1
  131. package/dist/middle_layer/project.d.ts +10 -10
  132. package/dist/middle_layer/project.d.ts.map +1 -1
  133. package/dist/middle_layer/project.js +71 -63
  134. package/dist/middle_layer/project.js.map +1 -1
  135. package/dist/middle_layer/project_list.cjs +2 -2
  136. package/dist/middle_layer/project_list.cjs.map +1 -1
  137. package/dist/middle_layer/project_list.d.ts +6 -6
  138. package/dist/middle_layer/project_list.d.ts.map +1 -1
  139. package/dist/middle_layer/project_list.js +2 -2
  140. package/dist/middle_layer/project_list.js.map +1 -1
  141. package/dist/middle_layer/project_overview.cjs +40 -40
  142. package/dist/middle_layer/project_overview.cjs.map +1 -1
  143. package/dist/middle_layer/project_overview.d.ts +5 -5
  144. package/dist/middle_layer/project_overview.d.ts.map +1 -1
  145. package/dist/middle_layer/project_overview.js +40 -40
  146. package/dist/middle_layer/project_overview.js.map +1 -1
  147. package/dist/middle_layer/project_overview_light.cjs.map +1 -1
  148. package/dist/middle_layer/project_overview_light.d.ts +2 -2
  149. package/dist/middle_layer/project_overview_light.d.ts.map +1 -1
  150. package/dist/middle_layer/project_overview_light.js.map +1 -1
  151. package/dist/middle_layer/render.cjs +1 -1
  152. package/dist/middle_layer/render.cjs.map +1 -1
  153. package/dist/middle_layer/render.d.ts +4 -4
  154. package/dist/middle_layer/render.js +1 -1
  155. package/dist/middle_layer/render.js.map +1 -1
  156. package/dist/middle_layer/render.test.d.ts +2 -2
  157. package/dist/middle_layer/types.d.ts +3 -3
  158. package/dist/middle_layer/util.cjs +9 -4
  159. package/dist/middle_layer/util.cjs.map +1 -1
  160. package/dist/middle_layer/util.d.ts +4 -4
  161. package/dist/middle_layer/util.d.ts.map +1 -1
  162. package/dist/middle_layer/util.js +9 -4
  163. package/dist/middle_layer/util.js.map +1 -1
  164. package/dist/model/args.cjs +19 -15
  165. package/dist/model/args.cjs.map +1 -1
  166. package/dist/model/args.d.ts +1 -1
  167. package/dist/model/args.d.ts.map +1 -1
  168. package/dist/model/args.js +19 -15
  169. package/dist/model/args.js.map +1 -1
  170. package/dist/model/block_pack.d.ts +2 -2
  171. package/dist/model/block_pack_spec.cjs +3 -3
  172. package/dist/model/block_pack_spec.cjs.map +1 -1
  173. package/dist/model/block_pack_spec.d.ts +8 -8
  174. package/dist/model/block_pack_spec.js +3 -3
  175. package/dist/model/block_pack_spec.js.map +1 -1
  176. package/dist/model/block_storage_helper.cjs +4 -4
  177. package/dist/model/block_storage_helper.cjs.map +1 -1
  178. package/dist/model/block_storage_helper.d.ts +2 -2
  179. package/dist/model/block_storage_helper.d.ts.map +1 -1
  180. package/dist/model/block_storage_helper.js +4 -4
  181. package/dist/model/block_storage_helper.js.map +1 -1
  182. package/dist/model/index.d.ts +3 -3
  183. package/dist/model/project_helper.cjs +30 -13
  184. package/dist/model/project_helper.cjs.map +1 -1
  185. package/dist/model/project_helper.d.ts +4 -4
  186. package/dist/model/project_helper.d.ts.map +1 -1
  187. package/dist/model/project_helper.js +30 -13
  188. package/dist/model/project_helper.js.map +1 -1
  189. package/dist/model/project_model.cjs +23 -23
  190. package/dist/model/project_model.cjs.map +1 -1
  191. package/dist/model/project_model.d.ts +6 -6
  192. package/dist/model/project_model.d.ts.map +1 -1
  193. package/dist/model/project_model.js +23 -23
  194. package/dist/model/project_model.js.map +1 -1
  195. package/dist/model/project_model_util.cjs +2 -2
  196. package/dist/model/project_model_util.cjs.map +1 -1
  197. package/dist/model/project_model_util.d.ts +3 -3
  198. package/dist/model/project_model_util.d.ts.map +1 -1
  199. package/dist/model/project_model_util.js +2 -2
  200. package/dist/model/project_model_util.js.map +1 -1
  201. package/dist/model/project_model_v1.cjs +2 -2
  202. package/dist/model/project_model_v1.cjs.map +1 -1
  203. package/dist/model/project_model_v1.js +2 -2
  204. package/dist/model/project_model_v1.js.map +1 -1
  205. package/dist/model/template_spec.d.ts +5 -5
  206. package/dist/mutator/block-pack/block_pack.cjs +43 -43
  207. package/dist/mutator/block-pack/block_pack.cjs.map +1 -1
  208. package/dist/mutator/block-pack/block_pack.d.ts +6 -6
  209. package/dist/mutator/block-pack/block_pack.d.ts.map +1 -1
  210. package/dist/mutator/block-pack/block_pack.js +43 -43
  211. package/dist/mutator/block-pack/block_pack.js.map +1 -1
  212. package/dist/mutator/block-pack/frontend.cjs +2 -2
  213. package/dist/mutator/block-pack/frontend.cjs.map +1 -1
  214. package/dist/mutator/block-pack/frontend.d.ts +2 -2
  215. package/dist/mutator/block-pack/frontend.d.ts.map +1 -1
  216. package/dist/mutator/block-pack/frontend.js +2 -2
  217. package/dist/mutator/block-pack/frontend.js.map +1 -1
  218. package/dist/mutator/context_export.cjs +5 -5
  219. package/dist/mutator/context_export.cjs.map +1 -1
  220. package/dist/mutator/context_export.d.ts +2 -2
  221. package/dist/mutator/context_export.d.ts.map +1 -1
  222. package/dist/mutator/context_export.js +5 -5
  223. package/dist/mutator/context_export.js.map +1 -1
  224. package/dist/mutator/migration.cjs +7 -7
  225. package/dist/mutator/migration.cjs.map +1 -1
  226. package/dist/mutator/migration.d.ts +1 -1
  227. package/dist/mutator/migration.d.ts.map +1 -1
  228. package/dist/mutator/migration.js +7 -7
  229. package/dist/mutator/migration.js.map +1 -1
  230. package/dist/mutator/project.cjs +147 -148
  231. package/dist/mutator/project.cjs.map +1 -1
  232. package/dist/mutator/project.d.ts +13 -13
  233. package/dist/mutator/project.d.ts.map +1 -1
  234. package/dist/mutator/project.js +147 -148
  235. package/dist/mutator/project.js.map +1 -1
  236. package/dist/mutator/template/direct_template_loader.cjs +16 -16
  237. package/dist/mutator/template/direct_template_loader.cjs.map +1 -1
  238. package/dist/mutator/template/direct_template_loader.d.ts +2 -2
  239. package/dist/mutator/template/direct_template_loader.d.ts.map +1 -1
  240. package/dist/mutator/template/direct_template_loader.js +16 -16
  241. package/dist/mutator/template/direct_template_loader.js.map +1 -1
  242. package/dist/mutator/template/direct_template_loader_v3.cjs +13 -13
  243. package/dist/mutator/template/direct_template_loader_v3.cjs.map +1 -1
  244. package/dist/mutator/template/direct_template_loader_v3.d.ts +3 -3
  245. package/dist/mutator/template/direct_template_loader_v3.d.ts.map +1 -1
  246. package/dist/mutator/template/direct_template_loader_v3.js +13 -13
  247. package/dist/mutator/template/direct_template_loader_v3.js.map +1 -1
  248. package/dist/mutator/template/render_block.cjs +7 -7
  249. package/dist/mutator/template/render_block.cjs.map +1 -1
  250. package/dist/mutator/template/render_block.d.ts +1 -1
  251. package/dist/mutator/template/render_block.d.ts.map +1 -1
  252. package/dist/mutator/template/render_block.js +7 -7
  253. package/dist/mutator/template/render_block.js.map +1 -1
  254. package/dist/mutator/template/render_template.cjs +10 -10
  255. package/dist/mutator/template/render_template.cjs.map +1 -1
  256. package/dist/mutator/template/render_template.d.ts +2 -2
  257. package/dist/mutator/template/render_template.js +10 -10
  258. package/dist/mutator/template/render_template.js.map +1 -1
  259. package/dist/mutator/template/template_loading.cjs +17 -17
  260. package/dist/mutator/template/template_loading.cjs.map +1 -1
  261. package/dist/mutator/template/template_loading.d.ts +2 -2
  262. package/dist/mutator/template/template_loading.js +17 -17
  263. package/dist/mutator/template/template_loading.js.map +1 -1
  264. package/dist/network_check/network_check.cjs +33 -32
  265. package/dist/network_check/network_check.cjs.map +1 -1
  266. package/dist/network_check/network_check.d.ts +6 -6
  267. package/dist/network_check/network_check.d.ts.map +1 -1
  268. package/dist/network_check/network_check.js +33 -32
  269. package/dist/network_check/network_check.js.map +1 -1
  270. package/dist/network_check/pings.cjs +3 -3
  271. package/dist/network_check/pings.cjs.map +1 -1
  272. package/dist/network_check/pings.d.ts +4 -4
  273. package/dist/network_check/pings.d.ts.map +1 -1
  274. package/dist/network_check/pings.js +3 -3
  275. package/dist/network_check/pings.js.map +1 -1
  276. package/dist/network_check/template.cjs +57 -44
  277. package/dist/network_check/template.cjs.map +1 -1
  278. package/dist/network_check/template.d.ts +8 -8
  279. package/dist/network_check/template.d.ts.map +1 -1
  280. package/dist/network_check/template.js +57 -44
  281. package/dist/network_check/template.js.map +1 -1
  282. package/dist/pool/data.cjs +45 -33
  283. package/dist/pool/data.cjs.map +1 -1
  284. package/dist/pool/data.d.ts +3 -3
  285. package/dist/pool/data.d.ts.map +1 -1
  286. package/dist/pool/data.js +45 -33
  287. package/dist/pool/data.js.map +1 -1
  288. package/dist/pool/driver.cjs +18 -16
  289. package/dist/pool/driver.cjs.map +1 -1
  290. package/dist/pool/driver.d.ts +5 -5
  291. package/dist/pool/driver.d.ts.map +1 -1
  292. package/dist/pool/driver.js +18 -16
  293. package/dist/pool/driver.js.map +1 -1
  294. package/dist/pool/index.d.ts +2 -2
  295. package/dist/pool/p_object_collection.cjs +5 -5
  296. package/dist/pool/p_object_collection.cjs.map +1 -1
  297. package/dist/pool/p_object_collection.d.ts +2 -2
  298. package/dist/pool/p_object_collection.d.ts.map +1 -1
  299. package/dist/pool/p_object_collection.js +5 -5
  300. package/dist/pool/p_object_collection.js.map +1 -1
  301. package/dist/pool/result_pool.cjs +6 -6
  302. package/dist/pool/result_pool.cjs.map +1 -1
  303. package/dist/pool/result_pool.d.ts +6 -6
  304. package/dist/pool/result_pool.d.ts.map +1 -1
  305. package/dist/pool/result_pool.js +6 -6
  306. package/dist/pool/result_pool.js.map +1 -1
  307. package/dist/test/block_packs.d.ts +2 -2
  308. package/dist/test/known_templates.d.ts +1 -1
  309. package/dist/worker/WorkerManager.cjs +7 -8
  310. package/dist/worker/WorkerManager.cjs.map +1 -1
  311. package/dist/worker/WorkerManager.d.ts +2 -2
  312. package/dist/worker/WorkerManager.d.ts.map +1 -1
  313. package/dist/worker/WorkerManager.js +7 -8
  314. package/dist/worker/WorkerManager.js.map +1 -1
  315. package/dist/worker/worker.cjs +6 -4
  316. package/dist/worker/worker.cjs.map +1 -1
  317. package/dist/worker/worker.js +6 -4
  318. package/dist/worker/worker.js.map +1 -1
  319. package/dist/worker/workerApi.cjs.map +1 -1
  320. package/dist/worker/workerApi.js.map +1 -1
  321. package/package.json +41 -41
  322. package/src/block_registry/index.ts +3 -3
  323. package/src/block_registry/registry-v2-provider.ts +2 -2
  324. package/src/block_registry/registry.test.ts +17 -17
  325. package/src/block_registry/registry.ts +55 -60
  326. package/src/block_registry/watcher.ts +24 -23
  327. package/src/block_registry/well_known_registries.ts +7 -7
  328. package/src/cfg_render/executor.test.ts +36 -36
  329. package/src/cfg_render/executor.ts +24 -24
  330. package/src/cfg_render/operation.ts +5 -5
  331. package/src/cfg_render/renderer.ts +96 -93
  332. package/src/cfg_render/traverse.ts +50 -50
  333. package/src/cfg_render/util.ts +3 -3
  334. package/src/debug/index.ts +6 -4
  335. package/src/dev_env/index.ts +16 -16
  336. package/src/dev_env/util.ts +3 -3
  337. package/src/index.ts +16 -16
  338. package/src/js_render/computable_context.ts +143 -126
  339. package/src/js_render/context.ts +72 -44
  340. package/src/js_render/index.ts +51 -24
  341. package/src/middle_layer/active_cfg.ts +14 -12
  342. package/src/middle_layer/block.ts +30 -23
  343. package/src/middle_layer/block_ctx.ts +27 -31
  344. package/src/middle_layer/block_ctx_unsafe.ts +9 -9
  345. package/src/middle_layer/driver_kit.ts +13 -19
  346. package/src/middle_layer/frontend_path.ts +18 -23
  347. package/src/middle_layer/index.ts +4 -4
  348. package/src/middle_layer/middle_layer.ts +57 -55
  349. package/src/middle_layer/navigation_states.ts +6 -6
  350. package/src/middle_layer/ops.ts +43 -42
  351. package/src/middle_layer/project.ts +274 -173
  352. package/src/middle_layer/project_list.ts +14 -15
  353. package/src/middle_layer/project_overview.ts +104 -113
  354. package/src/middle_layer/project_overview_light.ts +7 -9
  355. package/src/middle_layer/render.test.ts +49 -48
  356. package/src/middle_layer/render.ts +9 -9
  357. package/src/middle_layer/types.ts +3 -3
  358. package/src/middle_layer/util.ts +17 -12
  359. package/src/model/args.ts +22 -19
  360. package/src/model/block_pack.ts +2 -2
  361. package/src/model/block_pack_spec.ts +11 -11
  362. package/src/model/block_storage_helper.ts +11 -11
  363. package/src/model/index.ts +3 -3
  364. package/src/model/project_helper.ts +78 -32
  365. package/src/model/project_model.test.ts +5 -9
  366. package/src/model/project_model.ts +48 -49
  367. package/src/model/project_model_util.test.ts +86 -53
  368. package/src/model/project_model_util.ts +18 -14
  369. package/src/model/project_model_v1.ts +3 -3
  370. package/src/model/template_spec.ts +5 -5
  371. package/src/mutator/block-pack/block_pack.test.ts +25 -25
  372. package/src/mutator/block-pack/block_pack.ts +70 -68
  373. package/src/mutator/block-pack/frontend.ts +6 -13
  374. package/src/mutator/context_export.ts +12 -10
  375. package/src/mutator/migration.ts +20 -14
  376. package/src/mutator/project-v3.test.ts +123 -118
  377. package/src/mutator/project.test.ts +105 -94
  378. package/src/mutator/project.ts +357 -274
  379. package/src/mutator/template/direct_template_loader.ts +26 -32
  380. package/src/mutator/template/direct_template_loader_v3.ts +51 -25
  381. package/src/mutator/template/render_block.ts +14 -21
  382. package/src/mutator/template/render_template.ts +13 -13
  383. package/src/mutator/template/template_loading.ts +23 -23
  384. package/src/mutator/template/template_render.test.ts +87 -86
  385. package/src/network_check/network_check.test.ts +4 -4
  386. package/src/network_check/network_check.ts +102 -79
  387. package/src/network_check/pings.ts +35 -16
  388. package/src/network_check/template.test.ts +47 -44
  389. package/src/network_check/template.ts +151 -95
  390. package/src/network_check/test_utils.ts +1 -1
  391. package/src/pool/data.ts +81 -69
  392. package/src/pool/driver.ts +56 -51
  393. package/src/pool/index.ts +2 -2
  394. package/src/pool/p_object_collection.ts +16 -15
  395. package/src/pool/result_pool.ts +23 -34
  396. package/src/test/block_packs.ts +15 -15
  397. package/src/test/explicit_templates.ts +4 -4
  398. package/src/test/known_templates.ts +10 -10
  399. package/src/test_env.ts +1 -1
  400. package/src/worker/WorkerManager.ts +22 -18
  401. package/src/worker/worker.ts +11 -9
  402. package/src/worker/workerApi.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sources":["../../src/cfg_render/executor.ts"],"sourcesContent":["import type {\n ArgumentKey,\n ArgumentValues,\n ExecutionEnvironment,\n Operation,\n Subroutine,\n} from './operation';\nimport Denque from 'denque';\nimport { assertNever, notEmpty } from '@milaboratories/ts-helpers';\nimport type { ComputableCtx, ComputableRenderingOps } from '@milaboratories/computable';\nimport { Computable } from '@milaboratories/computable';\nimport type { Cfg } from '@platforma-sdk/model';\nimport { renderCfg, resOp } from './renderer';\nimport canonicalize from 'canonicalize';\nimport type { BlockContextAny } from '../middle_layer/block_ctx';\nimport type { MiddleLayerDriverKit } from '../middle_layer/driver_kit';\nimport { NonKeyCtxFields, toCfgContext } from '../middle_layer/block_ctx_unsafe';\n\n/** Addresses pending subroutines inside the stack */\ntype SubroutineKey = symbol;\n\n/** Represents destination of the result of an operation. I.e. when sequence of\n * subroutine invocations, and computables terminates with result, this object\n * determines to which argument of which pending subroutine it should be delivered.\n * See special value for delivery of the final \"return\" result. */\ntype Destination = {\n op: SubroutineKey;\n arg: ArgumentKey;\n};\n\n/** Special address of operation, see below. */\nconst ReturnOpKey: unique symbol = Symbol();\n/** The same, but for the argument part of destination, see below. */\nconst ReturnArgKey = 'return';\n\n/** Special destination, telling the executor that corresponding result should\n * be exposed as a final result, and execution terminate at this point. */\nconst ReturnDestination = { op: ReturnOpKey, arg: ReturnArgKey } as Destination;\n\nfunction isReturnDestination(destination: Destination): boolean {\n return destination.op == ReturnOpKey && destination.arg == ReturnArgKey;\n}\n\n/** Queued operation, used inside the executor */\ntype QueuedOperation = {\n operation: Operation;\n destination: Destination;\n};\n\n/** Queued computation, returned by the first round of config execution. Such\n * computables should be returned in the intermediate representation of the\n * enclosing computable, and after they are resolved and passed to the\n * postprocessing routine, should be injected into the execution stack to\n * finalize the computation. */\ntype ScheduledComputable = {\n destination: Destination;\n computable: Computable<unknown>;\n};\n\n/** This is what ScheduledComputable transforms from intermediate\n * representation to post-processing. */\ntype MaterializedComputable = {\n destination: Destination;\n computable: unknown;\n};\n\n/** Main entry inside the execution stack. */\ntype PendingSubroutine = {\n subroutine: Subroutine;\n destination: Destination;\n argCounter: number;\n args: ArgumentValues;\n};\n\n/** Execution stack. The closest concept that this object along with enclosed\n * {@link PendingSubroutine}s represent is a Continuation.\n * https://en.wikipedia.org/wiki/Continuation */\ntype ExecutionStack = {\n result?: unknown;\n pendingSubroutines: Map<SubroutineKey, PendingSubroutine>;\n};\n\n/** Returns initial stack value. */\nfunction zeroStack(): ExecutionStack {\n return { pendingSubroutines: new Map<SubroutineKey, PendingSubroutine>() };\n}\n\n/** Implements main executor mechanism.\n * @param env to be passed to while executing operations\n * @param stack execution stack to continue execution from\n * @param operations operations to initiate the execution process\n * @param allowComputables if false, scheduling of async computables will result in error\n * */\nfunction execute(\n env: ExecutionEnvironment,\n stack: ExecutionStack,\n operations: QueuedOperation[],\n allowComputables: boolean,\n): ScheduledComputable[] {\n const operationQueue = new Denque<QueuedOperation>(operations);\n\n /** Returns false if final result is set as result of this operation,\n * true if we should continue processing. */\n const deliverResult = (destination: Destination, result: unknown): boolean => {\n if (isReturnDestination(destination)) {\n stack.result = result;\n return false;\n }\n\n const pending = notEmpty(stack.pendingSubroutines.get(destination.op));\n if (destination.arg in pending.args) throw new Error('argument already set');\n pending.args[destination.arg] = result;\n pending.argCounter--;\n if (pending.argCounter === 0) {\n stack.pendingSubroutines.delete(destination.op);\n operationQueue.push({\n destination: pending.destination,\n operation: pending.subroutine(pending.args),\n });\n }\n\n return true;\n };\n\n // computables, scheduled during computation, are aggregated in this array,\n // and returned from the function in the end\n const computables: ScheduledComputable[] = [];\n\n // each loop = execution of a single queued operation\n mainLoop: while (operationQueue.length > 0) {\n const op = operationQueue.shift()!;\n const action = op.operation(env);\n switch (action.type) {\n case 'ReturnResult':\n if (!deliverResult(op.destination, action.result)) break mainLoop; // this terminates execution\n break; // switch\n\n case 'ScheduleSubroutine':\n {\n const newOpKey = Symbol();\n\n const argRequests = Object.entries(action.args);\n const initialArgCounter = argRequests.length;\n\n if (initialArgCounter === 0)\n // if no pending arguments\n operationQueue.push({\n destination: op.destination,\n operation: action.subroutine({}),\n });\n else {\n for (const [arg, operation] of argRequests)\n operationQueue.push({\n destination: { op: newOpKey, arg },\n operation,\n });\n\n stack.pendingSubroutines.set(newOpKey, {\n argCounter: initialArgCounter,\n args: {},\n subroutine: action.subroutine,\n destination: op.destination,\n });\n }\n }\n break;\n\n case 'ScheduleComputable':\n if (!allowComputables)\n throw new Error('asynchronous operations are forbidden in this context');\n computables.push({\n destination: op.destination,\n computable: action.computable,\n });\n break;\n\n default:\n assertNever(action);\n }\n }\n\n return computables;\n}\n\n//\n// Computable\n//\n\n/** Main method to render configurations */\nexport function computableFromCfg(\n drivers: MiddleLayerDriverKit,\n bCtx: BlockContextAny,\n cfg: Cfg,\n ops: Partial<ComputableRenderingOps> = {},\n): Computable<unknown> {\n return computableFromCfgUnsafe(drivers, toCfgContext(bCtx), cfg, ops);\n}\n\nexport function computableFromCfgUnsafe(\n drivers: MiddleLayerDriverKit,\n ctx: Record<string, unknown>,\n cfg: Cfg,\n ops: Partial<ComputableRenderingOps> = {},\n): Computable<unknown> {\n const key\n = `${ctx.blockId}#`\n + canonicalize({\n ctx: Object.fromEntries(\n Object.entries(ctx).filter(([k]) => NonKeyCtxFields.indexOf(k) === -1),\n ),\n cfg: cfg,\n })!;\n return Computable.makeRaw(\n (c) => {\n const env: ExecutionEnvironment = { drivers, cCtx: c };\n const stack = zeroStack();\n const computables = execute(\n env,\n stack,\n [\n {\n destination: ReturnDestination,\n operation: renderCfg(ctx, cfg),\n },\n ],\n true,\n );\n return {\n ir: computables,\n postprocessValue(value: MaterializedComputable[]): unknown {\n const resolvedOps: QueuedOperation[] = [];\n for (const mc of value)\n resolvedOps.push({ destination: mc.destination, operation: resOp(mc.computable) });\n const postEnv: ExecutionEnvironment = {\n drivers,\n get cCtx(): ComputableCtx {\n throw new Error('asynchronous operations are forbidden in this context');\n },\n };\n\n // Post process can be called several times, that's why it must be a side-effect-free function.\n // But `execute` modifies a stack, so we have to defensively copy it here.\n const copyOfPendingSubrotines = new Map<SubroutineKey, PendingSubroutine>();\n for (const [key, value] of stack.pendingSubroutines)\n copyOfPendingSubrotines.set(key, { ...value, args: { ...value.args } });\n const copiedStack: ExecutionStack = {\n result: stack.result,\n pendingSubroutines: copyOfPendingSubrotines,\n };\n execute(postEnv, copiedStack, resolvedOps, false);\n if (!('result' in copiedStack))\n throw new Error('illegal cfg rendering stack state, no result');\n return copiedStack.result;\n },\n };\n },\n { ...ops, key },\n );\n}\n"],"names":[],"mappings":";;;;;;;AA8BA;AACA,MAAM,WAAW,GAAkB,MAAM,EAAE;AAC3C;AACA,MAAM,YAAY,GAAG,QAAQ;AAE7B;AAC0E;AAC1E,MAAM,iBAAiB,GAAG,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAiB;AAE/E,SAAS,mBAAmB,CAAC,WAAwB,EAAA;IACnD,OAAO,WAAW,CAAC,EAAE,IAAI,WAAW,IAAI,WAAW,CAAC,GAAG,IAAI,YAAY;AACzE;AAyCA;AACA,SAAS,SAAS,GAAA;AAChB,IAAA,OAAO,EAAE,kBAAkB,EAAE,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AC9C,MAAM,WAAW,GAAsB,EAAE;gBACzC,KAAK,MAAM,EAAE,IAAI,KAAK;oBACpB,WAAW,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;AACpF,gBAAA,MAAM,OAAO,GAAyB;oBACpC,OAAO;AACP,oBAAA,IAAI,IAAI,GAAA;AACN,wBAAA,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC;oBAC1E,CAAC;iBACF;;;AAID,gBAAA,MAAM,uBAAuB,GAAG,IAAI,GAAG,EAAoC;gBAC3E,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,KAAK,CAAC,kBAAkB;AACjD,oBAAA,uBAAuB,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;AACzE,gBAAA,MAAM,WAAW,GAAmB;oBAClC,MAAM,EAAE,KAAK,CAAC,MAAM;AACpB,oBAAA,kBAAkB,EAAE,uBAAuB;iBAC5C;gBACD,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,CAAC;AACjD,gBAAA,IAAI,EAAE,QAAQ,IAAI,WAAW,CAAC;AAC5B,oBAAA,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC;gBACjE,OAAO,WAAW,CAAC,MAAM;YAC3B,CAAC;SACF;IACH,CAAC,EACD,EAAE,GAAG,GAAG,EAAE,GAAG,EAAE,CAChB;AACH;;;;"}
1
+ {"version":3,"file":"executor.js","sources":["../../src/cfg_render/executor.ts"],"sourcesContent":["import type {\n ArgumentKey,\n ArgumentValues,\n ExecutionEnvironment,\n Operation,\n Subroutine,\n} from \"./operation\";\nimport Denque from \"denque\";\nimport { assertNever, notEmpty } from \"@milaboratories/ts-helpers\";\nimport type { ComputableCtx, ComputableRenderingOps } from \"@milaboratories/computable\";\nimport { Computable } from \"@milaboratories/computable\";\nimport type { Cfg } from \"@platforma-sdk/model\";\nimport { renderCfg, resOp } from \"./renderer\";\nimport canonicalize from \"canonicalize\";\nimport type { BlockContextAny } from \"../middle_layer/block_ctx\";\nimport type { MiddleLayerDriverKit } from \"../middle_layer/driver_kit\";\nimport { NonKeyCtxFields, toCfgContext } from \"../middle_layer/block_ctx_unsafe\";\n\n/** Addresses pending subroutines inside the stack */\ntype SubroutineKey = symbol;\n\n/** Represents destination of the result of an operation. I.e. when sequence of\n * subroutine invocations, and computables terminates with result, this object\n * determines to which argument of which pending subroutine it should be delivered.\n * See special value for delivery of the final \"return\" result. */\ntype Destination = {\n op: SubroutineKey;\n arg: ArgumentKey;\n};\n\n/** Special address of operation, see below. */\nconst ReturnOpKey: unique symbol = Symbol();\n/** The same, but for the argument part of destination, see below. */\nconst ReturnArgKey = \"return\";\n\n/** Special destination, telling the executor that corresponding result should\n * be exposed as a final result, and execution terminate at this point. */\nconst ReturnDestination = { op: ReturnOpKey, arg: ReturnArgKey } as Destination;\n\nfunction isReturnDestination(destination: Destination): boolean {\n return destination.op == ReturnOpKey && destination.arg == ReturnArgKey;\n}\n\n/** Queued operation, used inside the executor */\ntype QueuedOperation = {\n operation: Operation;\n destination: Destination;\n};\n\n/** Queued computation, returned by the first round of config execution. Such\n * computables should be returned in the intermediate representation of the\n * enclosing computable, and after they are resolved and passed to the\n * postprocessing routine, should be injected into the execution stack to\n * finalize the computation. */\ntype ScheduledComputable = {\n destination: Destination;\n computable: Computable<unknown>;\n};\n\n/** This is what ScheduledComputable transforms from intermediate\n * representation to post-processing. */\ntype MaterializedComputable = {\n destination: Destination;\n computable: unknown;\n};\n\n/** Main entry inside the execution stack. */\ntype PendingSubroutine = {\n subroutine: Subroutine;\n destination: Destination;\n argCounter: number;\n args: ArgumentValues;\n};\n\n/** Execution stack. The closest concept that this object along with enclosed\n * {@link PendingSubroutine}s represent is a Continuation.\n * https://en.wikipedia.org/wiki/Continuation */\ntype ExecutionStack = {\n result?: unknown;\n pendingSubroutines: Map<SubroutineKey, PendingSubroutine>;\n};\n\n/** Returns initial stack value. */\nfunction zeroStack(): ExecutionStack {\n return { pendingSubroutines: new Map<SubroutineKey, PendingSubroutine>() };\n}\n\n/** Implements main executor mechanism.\n * @param env to be passed to while executing operations\n * @param stack execution stack to continue execution from\n * @param operations operations to initiate the execution process\n * @param allowComputables if false, scheduling of async computables will result in error\n * */\nfunction execute(\n env: ExecutionEnvironment,\n stack: ExecutionStack,\n operations: QueuedOperation[],\n allowComputables: boolean,\n): ScheduledComputable[] {\n const operationQueue = new Denque<QueuedOperation>(operations);\n\n /** Returns false if final result is set as result of this operation,\n * true if we should continue processing. */\n const deliverResult = (destination: Destination, result: unknown): boolean => {\n if (isReturnDestination(destination)) {\n stack.result = result;\n return false;\n }\n\n const pending = notEmpty(stack.pendingSubroutines.get(destination.op));\n if (destination.arg in pending.args) throw new Error(\"argument already set\");\n pending.args[destination.arg] = result;\n pending.argCounter--;\n if (pending.argCounter === 0) {\n stack.pendingSubroutines.delete(destination.op);\n operationQueue.push({\n destination: pending.destination,\n operation: pending.subroutine(pending.args),\n });\n }\n\n return true;\n };\n\n // computables, scheduled during computation, are aggregated in this array,\n // and returned from the function in the end\n const computables: ScheduledComputable[] = [];\n\n // each loop = execution of a single queued operation\n mainLoop: while (operationQueue.length > 0) {\n const op = operationQueue.shift()!;\n const action = op.operation(env);\n switch (action.type) {\n case \"ReturnResult\":\n if (!deliverResult(op.destination, action.result)) break mainLoop; // this terminates execution\n break; // switch\n\n case \"ScheduleSubroutine\":\n {\n const newOpKey = Symbol();\n\n const argRequests = Object.entries(action.args);\n const initialArgCounter = argRequests.length;\n\n if (initialArgCounter === 0)\n // if no pending arguments\n operationQueue.push({\n destination: op.destination,\n operation: action.subroutine({}),\n });\n else {\n for (const [arg, operation] of argRequests)\n operationQueue.push({\n destination: { op: newOpKey, arg },\n operation,\n });\n\n stack.pendingSubroutines.set(newOpKey, {\n argCounter: initialArgCounter,\n args: {},\n subroutine: action.subroutine,\n destination: op.destination,\n });\n }\n }\n break;\n\n case \"ScheduleComputable\":\n if (!allowComputables)\n throw new Error(\"asynchronous operations are forbidden in this context\");\n computables.push({\n destination: op.destination,\n computable: action.computable,\n });\n break;\n\n default:\n assertNever(action);\n }\n }\n\n return computables;\n}\n\n//\n// Computable\n//\n\n/** Main method to render configurations */\nexport function computableFromCfg(\n drivers: MiddleLayerDriverKit,\n bCtx: BlockContextAny,\n cfg: Cfg,\n ops: Partial<ComputableRenderingOps> = {},\n): Computable<unknown> {\n return computableFromCfgUnsafe(drivers, toCfgContext(bCtx), cfg, ops);\n}\n\nexport function computableFromCfgUnsafe(\n drivers: MiddleLayerDriverKit,\n ctx: Record<string, unknown>,\n cfg: Cfg,\n ops: Partial<ComputableRenderingOps> = {},\n): Computable<unknown> {\n const key =\n `${ctx.blockId}#` +\n canonicalize({\n ctx: Object.fromEntries(\n Object.entries(ctx).filter(([k]) => NonKeyCtxFields.indexOf(k) === -1),\n ),\n cfg: cfg,\n })!;\n return Computable.makeRaw(\n (c) => {\n const env: ExecutionEnvironment = { drivers, cCtx: c };\n const stack = zeroStack();\n const computables = execute(\n env,\n stack,\n [\n {\n destination: ReturnDestination,\n operation: renderCfg(ctx, cfg),\n },\n ],\n true,\n );\n return {\n ir: computables,\n postprocessValue(value: MaterializedComputable[]): unknown {\n const resolvedOps: QueuedOperation[] = [];\n for (const mc of value)\n resolvedOps.push({ destination: mc.destination, operation: resOp(mc.computable) });\n const postEnv: ExecutionEnvironment = {\n drivers,\n get cCtx(): ComputableCtx {\n throw new Error(\"asynchronous operations are forbidden in this context\");\n },\n };\n\n // Post process can be called several times, that's why it must be a side-effect-free function.\n // But `execute` modifies a stack, so we have to defensively copy it here.\n const copyOfPendingSubrotines = new Map<SubroutineKey, PendingSubroutine>();\n for (const [key, value] of stack.pendingSubroutines)\n copyOfPendingSubrotines.set(key, { ...value, args: { ...value.args } });\n const copiedStack: ExecutionStack = {\n result: stack.result,\n pendingSubroutines: copyOfPendingSubrotines,\n };\n execute(postEnv, copiedStack, resolvedOps, false);\n if (!(\"result\" in copiedStack))\n throw new Error(\"illegal cfg rendering stack state, no result\");\n return copiedStack.result;\n },\n };\n },\n { ...ops, key },\n );\n}\n"],"names":[],"mappings":";;;;;;;AA8BA;AACA,MAAM,WAAW,GAAkB,MAAM,EAAE;AAC3C;AACA,MAAM,YAAY,GAAG,QAAQ;AAE7B;AAC0E;AAC1E,MAAM,iBAAiB,GAAG,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAiB;AAE/E,SAAS,mBAAmB,CAAC,WAAwB,EAAA;IACnD,OAAO,WAAW,CAAC,EAAE,IAAI,WAAW,IAAI,WAAW,CAAC,GAAG,IAAI,YAAY;AACzE;AAyCA;AACA,SAAS,SAAS,GAAA;AAChB,IAAA,OAAO,EAAE,kBAAkB,EAAE,IAAI,GAAG,EAAoC,EAAE;AAC5E;AAEA;;;;;AAKK;AACL,SAAS,OAAO,CACd,GAAyB,EACzB,KAAqB,EACrB,UAA6B,EAC7B,gBAAyB,EAAA;AAEzB,IAAA,MAAM,cAAc,GAAG,IAAI,MAAM,CAAkB,UAAU,CAAC;AAE9D;AAC4C;AAC5C,IAAA,MAAM,aAAa,GAAG,CAAC,WAAwB,EAAE,MAAe,KAAa;AAC3E,QAAA,IAAI,mBAAmB,CAAC,WAAW,CAAC,EAAE;AACpC,YAAA,KAAK,CAAC,MAAM,GAAG,MAAM;AACrB,YAAA,OAAO,KAAK;QACd;AAEA,QAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;AACtE,QAAA,IAAI,WAAW,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC;QAC5E,OAAO,CAAC,IAAI,CAAC,WAAW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,GAAmB;oBAClC,MAAM,EAAE,KAAK,CAAC,MAAM;AACpB,oBAAA,kBAAkB,EAAE,uBAAuB;iBAC5C;gBACD,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,CAAC;AACjD,gBAAA,IAAI,EAAE,QAAQ,IAAI,WAAW,CAAC;AAC5B,oBAAA,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC;gBACjE,OAAO,WAAW,CAAC,MAAM;YAC3B,CAAC;SACF;IACH,CAAC,EACD,EAAE,GAAG,GAAG,EAAE,GAAG,EAAE,CAChB;AACH;;;;"}
@@ -1,5 +1,5 @@
1
- import type { Computable, ComputableCtx } from '@milaboratories/computable';
2
- import type { MiddleLayerDriverKit } from '../middle_layer/driver_kit';
1
+ import type { Computable, ComputableCtx } from "@milaboratories/computable";
2
+ import type { MiddleLayerDriverKit } from "../middle_layer/driver_kit";
3
3
  export type ArgumentKey = string;
4
4
  export type ExecutionEnvironment = {
5
5
  /** Each configuration is rendered inside a computable callback, this is the
@@ -12,16 +12,16 @@ export type ArgumentValues = Record<ArgumentKey, unknown>;
12
12
  export type ArgumentRequests = Record<ArgumentKey, Operation>;
13
13
  export type Subroutine = (args: ArgumentValues) => Operation;
14
14
  export type ScheduleSubroutine = {
15
- type: 'ScheduleSubroutine';
15
+ type: "ScheduleSubroutine";
16
16
  subroutine: Subroutine;
17
17
  args: ArgumentRequests;
18
18
  };
19
19
  export type ScheduleComputable = {
20
- type: 'ScheduleComputable';
20
+ type: "ScheduleComputable";
21
21
  computable: Computable<unknown>;
22
22
  };
23
23
  export type ReturnResult = {
24
- type: 'ReturnResult';
24
+ type: "ReturnResult";
25
25
  result: unknown;
26
26
  };
27
27
  export type OperationAction = ScheduleSubroutine | ScheduleComputable | ReturnResult;
@@ -7,7 +7,7 @@ var computable = require('@milaboratories/computable');
7
7
 
8
8
  function res(result) {
9
9
  return {
10
- type: 'ReturnResult',
10
+ type: "ReturnResult",
11
11
  result: result,
12
12
  };
13
13
  }
@@ -58,7 +58,7 @@ function SRMapArrayValues1(ctx, ops) {
58
58
  if (source === undefined)
59
59
  return resOp(undefined);
60
60
  return () => ({
61
- type: 'ScheduleSubroutine',
61
+ type: "ScheduleSubroutine",
62
62
  subroutine: SRCollectArrayFromArgs(source.length),
63
63
  args: mapArrayToRecord(source, (e) => renderCfg({ ...ctx, [ops.itVar]: e }, ops.mapping)),
64
64
  });
@@ -83,7 +83,7 @@ function SRMapRecordValues1(ctx, ops) {
83
83
  nextArgs[k] = renderCfg(newCtx, ops.mapping);
84
84
  }
85
85
  return () => ({
86
- type: 'ScheduleSubroutine',
86
+ type: "ScheduleSubroutine",
87
87
  subroutine: SRMapRecordValues2,
88
88
  args: nextArgs,
89
89
  });
@@ -149,7 +149,7 @@ function SRMapResourceFields1(ctx, ops) {
149
149
  }
150
150
  }
151
151
  return {
152
- type: 'ScheduleSubroutine',
152
+ type: "ScheduleSubroutine",
153
153
  subroutine: SRMapResourceFields2,
154
154
  args: nextArgs,
155
155
  };
@@ -165,7 +165,7 @@ const SRGetBlobContent = (range) => (args) => {
165
165
  return resOp(undefined);
166
166
  return ({ drivers }) => {
167
167
  return {
168
- type: 'ScheduleComputable',
168
+ type: "ScheduleComputable",
169
169
  computable: computable.Computable.make((ctx) => {
170
170
  return drivers.blobDriver.getDownloadedBlob(ctx.accessor(source).node().resourceInfo);
171
171
  }, {
@@ -186,7 +186,7 @@ const SRGetBlobContentAsString = (range) => (args) => {
186
186
  // getting target resource id and type
187
187
  const resourceInfo = cCtx.accessor(source).node().resourceInfo;
188
188
  return {
189
- type: 'ScheduleComputable',
189
+ type: "ScheduleComputable",
190
190
  computable: computable.Computable.make((ctx) => drivers.blobDriver.getDownloadedBlob(resourceInfo, ctx), {
191
191
  postprocessValue: async (value) => {
192
192
  if (value === undefined)
@@ -204,7 +204,7 @@ const SRGetBlobContentAsJson = (range) => (args) => {
204
204
  return resOp(undefined);
205
205
  return ({ drivers }) => {
206
206
  return {
207
- type: 'ScheduleComputable',
207
+ type: "ScheduleComputable",
208
208
  computable: computable.Computable.make((c) => drivers.blobDriver.getDownloadedBlob(c.accessor(source).node().resourceInfo, c), {
209
209
  postprocessValue: async (value) => {
210
210
  if (value == undefined)
@@ -224,7 +224,7 @@ const SRGetDownloadedBlobContent = (args) => {
224
224
  return resOp(undefined);
225
225
  return (ctx) => {
226
226
  return {
227
- type: 'ScheduleComputable',
227
+ type: "ScheduleComputable",
228
228
  computable: ctx.drivers.blobDriver.getDownloadedBlob(source),
229
229
  };
230
230
  };
@@ -235,7 +235,7 @@ const SRGetOnDemandBlobContent = (args) => {
235
235
  return resOp(undefined);
236
236
  return ({ drivers }) => {
237
237
  return {
238
- type: 'ScheduleComputable',
238
+ type: "ScheduleComputable",
239
239
  computable: drivers.blobDriver.getOnDemandBlob(source),
240
240
  };
241
241
  };
@@ -246,7 +246,7 @@ const SRExtractArchiveAndGetURL = (format) => (args) => {
246
246
  return resOp(undefined);
247
247
  return ({ drivers }) => {
248
248
  return {
249
- type: 'ScheduleComputable',
249
+ type: "ScheduleComputable",
250
250
  computable: drivers.blobToURLDriver.extractArchiveAndGetURL(source, format),
251
251
  };
252
252
  };
@@ -257,7 +257,7 @@ const SRGetImportProgress = (args) => {
257
257
  return resOp(undefined);
258
258
  return ({ drivers }) => {
259
259
  return {
260
- type: 'ScheduleComputable',
260
+ type: "ScheduleComputable",
261
261
  computable: drivers.uploadDriver.getProgressId(source),
262
262
  };
263
263
  };
@@ -268,7 +268,7 @@ const SRGetLastLogs = (lines) => (args) => {
268
268
  return resOp(undefined);
269
269
  return ({ drivers }) => {
270
270
  return {
271
- type: 'ScheduleComputable',
271
+ type: "ScheduleComputable",
272
272
  computable: drivers.logDriver.getLastLogs(source, lines),
273
273
  };
274
274
  };
@@ -279,7 +279,7 @@ const SRGetProgressLog = (patternToSearch) => (args) => {
279
279
  return resOp(undefined);
280
280
  return ({ drivers }) => {
281
281
  return {
282
- type: 'ScheduleComputable',
282
+ type: "ScheduleComputable",
283
283
  computable: drivers.logDriver.getProgressLog(source, patternToSearch),
284
284
  };
285
285
  };
@@ -290,7 +290,7 @@ const SRGetProgressLogWithInfo = (patternToSearch) => (args) => {
290
290
  return resOp(undefined);
291
291
  return ({ drivers }) => {
292
292
  return {
293
- type: 'ScheduleComputable',
293
+ type: "ScheduleComputable",
294
294
  computable: drivers.logDriver.getProgressLogWithInfo(source, patternToSearch),
295
295
  };
296
296
  };
@@ -301,7 +301,7 @@ const SRGetLogHandle = (args) => {
301
301
  return resOp(undefined);
302
302
  return ({ drivers }) => {
303
303
  return {
304
- type: 'ScheduleComputable',
304
+ type: "ScheduleComputable",
305
305
  computable: drivers.logDriver.getLogHandle(source),
306
306
  };
307
307
  };
@@ -309,210 +309,209 @@ const SRGetLogHandle = (args) => {
309
309
  /** Renders configuration into executor's Operation */
310
310
  function renderCfg(ctx, cfg) {
311
311
  switch (cfg.type) {
312
- case 'GetFromCtx':
313
- {
314
- const ctxValue = ctx[cfg.variable];
315
- if (typeof ctxValue === 'function') {
316
- return (e) => res(ctxValue(e.cCtx));
317
- }
318
- else {
319
- return resOp(ctxValue);
320
- }
312
+ case "GetFromCtx": {
313
+ const ctxValue = ctx[cfg.variable];
314
+ if (typeof ctxValue === "function") {
315
+ return (e) => res(ctxValue(e.cCtx));
321
316
  }
322
- case 'Isolate':
317
+ else {
318
+ return resOp(ctxValue);
319
+ }
320
+ }
321
+ case "Isolate":
323
322
  return ({ drivers }) => ({
324
- type: 'ScheduleComputable',
323
+ type: "ScheduleComputable",
325
324
  computable: executor.computableFromCfgUnsafe(drivers, ctx, cfg.cfg),
326
325
  });
327
- case 'Immediate':
326
+ case "Immediate":
328
327
  return resOp(cfg.value);
329
- case 'GetJsonField':
328
+ case "GetJsonField":
330
329
  return () => ({
331
- type: 'ScheduleSubroutine',
330
+ type: "ScheduleSubroutine",
332
331
  subroutine: SRGetJsonField,
333
332
  args: {
334
333
  source: renderCfg(ctx, cfg.source),
335
334
  field: renderCfg(ctx, cfg.field),
336
335
  },
337
336
  });
338
- case 'MapArrayValues':
337
+ case "MapArrayValues":
339
338
  return () => ({
340
- type: 'ScheduleSubroutine',
339
+ type: "ScheduleSubroutine",
341
340
  subroutine: SRMapArrayValues1(ctx, cfg),
342
341
  args: {
343
342
  source: renderCfg(ctx, cfg.source),
344
343
  },
345
344
  });
346
- case 'MapRecordValues':
345
+ case "MapRecordValues":
347
346
  return () => ({
348
- type: 'ScheduleSubroutine',
347
+ type: "ScheduleSubroutine",
349
348
  subroutine: SRMapRecordValues1(ctx, cfg),
350
349
  args: {
351
350
  source: renderCfg(ctx, cfg.source),
352
351
  },
353
352
  });
354
- case 'MakeObject':
353
+ case "MakeObject":
355
354
  return () => ({
356
- type: 'ScheduleSubroutine',
355
+ type: "ScheduleSubroutine",
357
356
  subroutine: SRMakeObject,
358
357
  args: util.mapRecord(cfg.template, (c) => renderCfg(ctx, c)),
359
358
  });
360
- case 'MakeArray':
359
+ case "MakeArray":
361
360
  return () => ({
362
- type: 'ScheduleSubroutine',
361
+ type: "ScheduleSubroutine",
363
362
  subroutine: SRCollectArrayFromArgs(cfg.template.length),
364
363
  args: mapArrayToRecord(cfg.template, (e) => renderCfg(ctx, e)),
365
364
  });
366
- case 'Flatten':
365
+ case "Flatten":
367
366
  return () => ({
368
- type: 'ScheduleSubroutine',
367
+ type: "ScheduleSubroutine",
369
368
  subroutine: SRFlatten,
370
369
  args: {
371
370
  source: renderCfg(ctx, cfg.source),
372
371
  },
373
372
  });
374
- case 'IsEmpty':
373
+ case "IsEmpty":
375
374
  return () => ({
376
- type: 'ScheduleSubroutine',
375
+ type: "ScheduleSubroutine",
377
376
  subroutine: SRIsEmpty,
378
377
  args: {
379
378
  arg: renderCfg(ctx, cfg.arg),
380
379
  },
381
380
  });
382
- case 'Not':
381
+ case "Not":
383
382
  return () => ({
384
- type: 'ScheduleSubroutine',
383
+ type: "ScheduleSubroutine",
385
384
  subroutine: SRNot,
386
385
  args: {
387
386
  operand: renderCfg(ctx, cfg.operand),
388
387
  },
389
388
  });
390
- case 'And':
389
+ case "And":
391
390
  return () => ({
392
- type: 'ScheduleSubroutine',
391
+ type: "ScheduleSubroutine",
393
392
  subroutine: SRAnd,
394
393
  args: {
395
394
  operand1: renderCfg(ctx, cfg.operand1),
396
395
  operand2: renderCfg(ctx, cfg.operand2),
397
396
  },
398
397
  });
399
- case 'Or':
398
+ case "Or":
400
399
  return () => ({
401
- type: 'ScheduleSubroutine',
400
+ type: "ScheduleSubroutine",
402
401
  subroutine: SROr,
403
402
  args: {
404
403
  operand1: renderCfg(ctx, cfg.operand1),
405
404
  operand2: renderCfg(ctx, cfg.operand2),
406
405
  },
407
406
  });
408
- case 'MapResourceFields':
407
+ case "MapResourceFields":
409
408
  return () => ({
410
- type: 'ScheduleSubroutine',
409
+ type: "ScheduleSubroutine",
411
410
  subroutine: SRMapResourceFields1(ctx, cfg),
412
411
  args: {
413
412
  source: renderCfg(ctx, cfg.source),
414
413
  },
415
414
  });
416
- case 'GetResourceField':
415
+ case "GetResourceField":
417
416
  return () => ({
418
- type: 'ScheduleSubroutine',
417
+ type: "ScheduleSubroutine",
419
418
  subroutine: SRGetResourceField,
420
419
  args: {
421
420
  source: renderCfg(ctx, cfg.source),
422
421
  field: renderCfg(ctx, cfg.field),
423
422
  },
424
423
  });
425
- case 'GetResourceValueAsJson':
424
+ case "GetResourceValueAsJson":
426
425
  return () => ({
427
- type: 'ScheduleSubroutine',
426
+ type: "ScheduleSubroutine",
428
427
  subroutine: SRResourceValueAsJson,
429
428
  args: {
430
429
  source: renderCfg(ctx, cfg.source),
431
430
  },
432
431
  });
433
- case 'GetBlobContent':
432
+ case "GetBlobContent":
434
433
  return () => ({
435
- type: 'ScheduleSubroutine',
434
+ type: "ScheduleSubroutine",
436
435
  subroutine: SRGetBlobContent(cfg.range),
437
436
  args: {
438
437
  source: renderCfg(ctx, cfg.source),
439
438
  },
440
439
  });
441
- case 'GetBlobContentAsString':
440
+ case "GetBlobContentAsString":
442
441
  return () => ({
443
- type: 'ScheduleSubroutine',
442
+ type: "ScheduleSubroutine",
444
443
  subroutine: SRGetBlobContentAsString(cfg.range),
445
444
  args: {
446
445
  source: renderCfg(ctx, cfg.source),
447
446
  },
448
447
  });
449
- case 'GetBlobContentAsJson':
448
+ case "GetBlobContentAsJson":
450
449
  return () => ({
451
- type: 'ScheduleSubroutine',
450
+ type: "ScheduleSubroutine",
452
451
  subroutine: SRGetBlobContentAsJson(cfg.range),
453
452
  args: {
454
453
  source: renderCfg(ctx, cfg.source),
455
454
  },
456
455
  });
457
- case 'GetDownloadedBlobContent':
456
+ case "GetDownloadedBlobContent":
458
457
  return () => ({
459
- type: 'ScheduleSubroutine',
458
+ type: "ScheduleSubroutine",
460
459
  subroutine: SRGetDownloadedBlobContent,
461
460
  args: {
462
461
  source: renderCfg(ctx, cfg.source),
463
462
  },
464
463
  });
465
- case 'GetOnDemandBlobContent':
464
+ case "GetOnDemandBlobContent":
466
465
  return () => ({
467
- type: 'ScheduleSubroutine',
466
+ type: "ScheduleSubroutine",
468
467
  subroutine: SRGetOnDemandBlobContent,
469
468
  args: {
470
469
  source: renderCfg(ctx, cfg.source),
471
470
  },
472
471
  });
473
- case 'ExtractArchiveAndGetURL':
472
+ case "ExtractArchiveAndGetURL":
474
473
  return () => ({
475
- type: 'ScheduleSubroutine',
474
+ type: "ScheduleSubroutine",
476
475
  subroutine: SRExtractArchiveAndGetURL(cfg.format),
477
476
  args: {
478
477
  source: renderCfg(ctx, cfg.source),
479
478
  },
480
479
  });
481
- case 'GetImportProgress':
480
+ case "GetImportProgress":
482
481
  return () => ({
483
- type: 'ScheduleSubroutine',
482
+ type: "ScheduleSubroutine",
484
483
  subroutine: SRGetImportProgress,
485
484
  args: {
486
485
  source: renderCfg(ctx, cfg.source),
487
486
  },
488
487
  });
489
- case 'GetLastLogs':
488
+ case "GetLastLogs":
490
489
  return () => ({
491
- type: 'ScheduleSubroutine',
490
+ type: "ScheduleSubroutine",
492
491
  subroutine: SRGetLastLogs(cfg.lines),
493
492
  args: {
494
493
  source: renderCfg(ctx, cfg.source),
495
494
  },
496
495
  });
497
- case 'GetProgressLog':
496
+ case "GetProgressLog":
498
497
  return () => ({
499
- type: 'ScheduleSubroutine',
498
+ type: "ScheduleSubroutine",
500
499
  subroutine: SRGetProgressLog(cfg.patternToSearch),
501
500
  args: {
502
501
  source: renderCfg(ctx, cfg.source),
503
502
  },
504
503
  });
505
- case 'GetProgressLogWithInfo':
504
+ case "GetProgressLogWithInfo":
506
505
  return () => ({
507
- type: 'ScheduleSubroutine',
506
+ type: "ScheduleSubroutine",
508
507
  subroutine: SRGetProgressLogWithInfo(cfg.patternToSearch),
509
508
  args: {
510
509
  source: renderCfg(ctx, cfg.source),
511
510
  },
512
511
  });
513
- case 'GetLogHandle':
512
+ case "GetLogHandle":
514
513
  return () => ({
515
- type: 'ScheduleSubroutine',
514
+ type: "ScheduleSubroutine",
516
515
  subroutine: SRGetLogHandle,
517
516
  args: {
518
517
  source: renderCfg(ctx, cfg.source),