@milaboratories/pl-middle-layer 1.48.11 → 1.48.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_@oxc-project_runtime@0.114.0/helpers/usingCtx.cjs +59 -0
- package/dist/_virtual/_@oxc-project_runtime@0.114.0/helpers/usingCtx.js +58 -0
- package/dist/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/block_registry/index.cjs +3 -0
- package/dist/block_registry/index.d.ts +3 -4
- package/dist/block_registry/index.js +3 -0
- package/dist/block_registry/registry-v2-provider.cjs +18 -19
- package/dist/block_registry/registry-v2-provider.cjs.map +1 -1
- package/dist/block_registry/registry-v2-provider.d.ts +10 -6
- package/dist/block_registry/registry-v2-provider.js +17 -17
- package/dist/block_registry/registry-v2-provider.js.map +1 -1
- package/dist/block_registry/registry.cjs +188 -219
- package/dist/block_registry/registry.cjs.map +1 -1
- package/dist/block_registry/registry.d.ts +18 -14
- package/dist/block_registry/registry.js +184 -217
- package/dist/block_registry/registry.js.map +1 -1
- package/dist/block_registry/watcher.cjs +141 -170
- package/dist/block_registry/watcher.cjs.map +1 -1
- package/dist/block_registry/watcher.d.ts +26 -24
- package/dist/block_registry/watcher.js +139 -168
- package/dist/block_registry/watcher.js.map +1 -1
- package/dist/block_registry/well_known_registries.cjs +9 -8
- package/dist/block_registry/well_known_registries.cjs.map +1 -1
- package/dist/block_registry/well_known_registries.d.ts +8 -4
- package/dist/block_registry/well_known_registries.js +9 -7
- package/dist/block_registry/well_known_registries.js.map +1 -1
- package/dist/cfg_render/executor.cjs +136 -137
- package/dist/cfg_render/executor.cjs.map +1 -1
- package/dist/cfg_render/executor.js +133 -135
- package/dist/cfg_render/executor.js.map +1 -1
- package/dist/cfg_render/renderer.cjs +354 -462
- package/dist/cfg_render/renderer.cjs.map +1 -1
- package/dist/cfg_render/renderer.js +353 -460
- package/dist/cfg_render/renderer.js.map +1 -1
- package/dist/cfg_render/traverse.cjs +58 -60
- package/dist/cfg_render/traverse.cjs.map +1 -1
- package/dist/cfg_render/traverse.js +57 -58
- package/dist/cfg_render/traverse.js.map +1 -1
- package/dist/cfg_render/util.cjs +14 -19
- package/dist/cfg_render/util.cjs.map +1 -1
- package/dist/cfg_render/util.js +14 -17
- package/dist/cfg_render/util.js.map +1 -1
- package/dist/debug/index.cjs +13 -17
- package/dist/debug/index.cjs.map +1 -1
- package/dist/debug/index.js +13 -16
- package/dist/debug/index.js.map +1 -1
- package/dist/dev_env/index.cjs +60 -44
- package/dist/dev_env/index.cjs.map +1 -1
- package/dist/dev_env/index.js +57 -33
- package/dist/dev_env/index.js.map +1 -1
- package/dist/dev_env/util.cjs +12 -32
- package/dist/dev_env/util.cjs.map +1 -1
- package/dist/dev_env/util.js +10 -11
- package/dist/dev_env/util.js.map +1 -1
- package/dist/index.cjs +75 -74
- package/dist/index.d.ts +21 -13
- package/dist/index.js +25 -18
- package/dist/js_render/computable_context.cjs +432 -568
- package/dist/js_render/computable_context.cjs.map +1 -1
- package/dist/js_render/computable_context.js +431 -566
- package/dist/js_render/computable_context.js.map +1 -1
- package/dist/js_render/context.cjs +184 -237
- package/dist/js_render/context.cjs.map +1 -1
- package/dist/js_render/context.js +184 -235
- package/dist/js_render/context.js.map +1 -1
- package/dist/js_render/index.cjs +137 -156
- package/dist/js_render/index.cjs.map +1 -1
- package/dist/js_render/index.js +136 -154
- package/dist/js_render/index.js.map +1 -1
- package/dist/middle_layer/active_cfg.cjs +28 -35
- package/dist/middle_layer/active_cfg.cjs.map +1 -1
- package/dist/middle_layer/active_cfg.js +27 -33
- package/dist/middle_layer/active_cfg.js.map +1 -1
- package/dist/middle_layer/block.cjs +36 -42
- package/dist/middle_layer/block.cjs.map +1 -1
- package/dist/middle_layer/block.js +35 -40
- package/dist/middle_layer/block.js.map +1 -1
- package/dist/middle_layer/block_ctx.cjs +91 -133
- package/dist/middle_layer/block_ctx.cjs.map +1 -1
- package/dist/middle_layer/block_ctx.js +90 -131
- package/dist/middle_layer/block_ctx.js.map +1 -1
- package/dist/middle_layer/block_ctx_unsafe.cjs +20 -19
- package/dist/middle_layer/block_ctx_unsafe.cjs.map +1 -1
- package/dist/middle_layer/block_ctx_unsafe.js +20 -18
- package/dist/middle_layer/block_ctx_unsafe.js.map +1 -1
- package/dist/middle_layer/driver_kit.cjs +47 -51
- package/dist/middle_layer/driver_kit.cjs.map +1 -1
- package/dist/middle_layer/driver_kit.d.ts +31 -27
- package/dist/middle_layer/driver_kit.js +46 -49
- package/dist/middle_layer/driver_kit.js.map +1 -1
- package/dist/middle_layer/frontend_path.cjs +49 -55
- package/dist/middle_layer/frontend_path.cjs.map +1 -1
- package/dist/middle_layer/frontend_path.js +48 -53
- package/dist/middle_layer/frontend_path.js.map +1 -1
- package/dist/middle_layer/index.cjs +4 -0
- package/dist/middle_layer/index.d.ts +4 -5
- package/dist/middle_layer/index.js +4 -0
- package/dist/middle_layer/middle_layer.cjs +216 -245
- package/dist/middle_layer/middle_layer.cjs.map +1 -1
- package/dist/middle_layer/middle_layer.d.ts +95 -91
- package/dist/middle_layer/middle_layer.js +215 -243
- package/dist/middle_layer/middle_layer.js.map +1 -1
- package/dist/middle_layer/navigation_states.cjs +45 -38
- package/dist/middle_layer/navigation_states.cjs.map +1 -1
- package/dist/middle_layer/navigation_states.js +44 -36
- package/dist/middle_layer/navigation_states.js.map +1 -1
- package/dist/middle_layer/ops.cjs +56 -57
- package/dist/middle_layer/ops.cjs.map +1 -1
- package/dist/middle_layer/ops.d.ts +86 -96
- package/dist/middle_layer/ops.js +54 -55
- package/dist/middle_layer/ops.js.map +1 -1
- package/dist/middle_layer/project.cjs +497 -527
- package/dist/middle_layer/project.cjs.map +1 -1
- package/dist/middle_layer/project.d.ts +155 -152
- package/dist/middle_layer/project.js +494 -525
- package/dist/middle_layer/project.js.map +1 -1
- package/dist/middle_layer/project_list.cjs +45 -43
- package/dist/middle_layer/project_list.cjs.map +1 -1
- package/dist/middle_layer/project_list.js +45 -41
- package/dist/middle_layer/project_list.js.map +1 -1
- package/dist/middle_layer/project_overview.cjs +202 -240
- package/dist/middle_layer/project_overview.cjs.map +1 -1
- package/dist/middle_layer/project_overview.js +201 -238
- package/dist/middle_layer/project_overview.js.map +1 -1
- package/dist/middle_layer/project_overview_light.cjs +11 -14
- package/dist/middle_layer/project_overview_light.cjs.map +1 -1
- package/dist/middle_layer/project_overview_light.js +10 -12
- package/dist/middle_layer/project_overview_light.js.map +1 -1
- package/dist/middle_layer/render.cjs +14 -18
- package/dist/middle_layer/render.cjs.map +1 -1
- package/dist/middle_layer/render.js +13 -16
- package/dist/middle_layer/render.js.map +1 -1
- package/dist/middle_layer/types.d.ts +7 -10
- package/dist/middle_layer/util.cjs +26 -21
- package/dist/middle_layer/util.cjs.map +1 -1
- package/dist/middle_layer/util.js +25 -19
- package/dist/middle_layer/util.js.map +1 -1
- package/dist/model/args.cjs +44 -53
- package/dist/model/args.cjs.map +1 -1
- package/dist/model/args.js +44 -51
- package/dist/model/args.js.map +1 -1
- package/dist/model/block_pack_spec.cjs +9 -5
- package/dist/model/block_pack_spec.cjs.map +1 -1
- package/dist/model/block_pack_spec.d.ts +34 -30
- package/dist/model/block_pack_spec.js +9 -4
- package/dist/model/block_pack_spec.js.map +1 -1
- package/dist/model/frontend.d.ts +8 -5
- package/dist/model/index.d.ts +2 -3
- package/dist/model/project_helper.cjs +154 -193
- package/dist/model/project_helper.cjs.map +1 -1
- package/dist/model/project_helper.d.ts +96 -92
- package/dist/model/project_helper.js +153 -191
- package/dist/model/project_helper.js.map +1 -1
- package/dist/model/project_model.cjs +33 -32
- package/dist/model/project_model.cjs.map +1 -1
- package/dist/model/project_model.d.ts +13 -64
- package/dist/model/project_model.js +34 -30
- package/dist/model/project_model.js.map +1 -1
- package/dist/model/project_model_util.cjs +119 -158
- package/dist/model/project_model_util.cjs.map +1 -1
- package/dist/model/project_model_util.js +120 -156
- package/dist/model/project_model_util.js.map +1 -1
- package/dist/model/project_model_v1.cjs +3 -2
- package/dist/model/project_model_v1.cjs.map +1 -1
- package/dist/model/project_model_v1.js +3 -1
- package/dist/model/project_model_v1.js.map +1 -1
- package/dist/model/template_spec.d.ts +20 -16
- package/dist/mutator/block-pack/block_pack.cjs +200 -223
- package/dist/mutator/block-pack/block_pack.cjs.map +1 -1
- package/dist/mutator/block-pack/block_pack.d.ts +20 -19
- package/dist/mutator/block-pack/block_pack.js +199 -221
- package/dist/mutator/block-pack/block_pack.js.map +1 -1
- package/dist/mutator/block-pack/frontend.cjs +14 -16
- package/dist/mutator/block-pack/frontend.cjs.map +1 -1
- package/dist/mutator/block-pack/frontend.js +13 -14
- package/dist/mutator/block-pack/frontend.js.map +1 -1
- package/dist/mutator/context_export.cjs +18 -17
- package/dist/mutator/context_export.cjs.map +1 -1
- package/dist/mutator/context_export.js +17 -15
- package/dist/mutator/context_export.js.map +1 -1
- package/dist/mutator/migration.cjs +86 -112
- package/dist/mutator/migration.cjs.map +1 -1
- package/dist/mutator/migration.js +85 -110
- package/dist/mutator/migration.js.map +1 -1
- package/dist/mutator/project.cjs +903 -1240
- package/dist/mutator/project.cjs.map +1 -1
- package/dist/mutator/project.js +901 -1237
- package/dist/mutator/project.js.map +1 -1
- package/dist/mutator/template/direct_template_loader.cjs +104 -130
- package/dist/mutator/template/direct_template_loader.cjs.map +1 -1
- package/dist/mutator/template/direct_template_loader.js +103 -128
- package/dist/mutator/template/direct_template_loader.js.map +1 -1
- package/dist/mutator/template/direct_template_loader_v3.cjs +104 -124
- package/dist/mutator/template/direct_template_loader_v3.cjs.map +1 -1
- package/dist/mutator/template/direct_template_loader_v3.js +103 -122
- package/dist/mutator/template/direct_template_loader_v3.js.map +1 -1
- package/dist/mutator/template/render_block.cjs +26 -30
- package/dist/mutator/template/render_block.cjs.map +1 -1
- package/dist/mutator/template/render_block.js +26 -23
- package/dist/mutator/template/render_block.js.map +1 -1
- package/dist/mutator/template/render_template.cjs +25 -25
- package/dist/mutator/template/render_template.cjs.map +1 -1
- package/dist/mutator/template/render_template.d.ts +6 -3
- package/dist/mutator/template/render_template.js +24 -23
- package/dist/mutator/template/render_template.js.map +1 -1
- package/dist/mutator/template/template_loading.cjs +42 -46
- package/dist/mutator/template/template_loading.cjs.map +1 -1
- package/dist/mutator/template/template_loading.d.ts +16 -12
- package/dist/mutator/template/template_loading.js +40 -44
- package/dist/mutator/template/template_loading.js.map +1 -1
- package/dist/network_check/network_check.cjs +149 -194
- package/dist/network_check/network_check.cjs.map +1 -1
- package/dist/network_check/network_check.d.ts +50 -66
- package/dist/network_check/network_check.js +146 -190
- package/dist/network_check/network_check.js.map +1 -1
- package/dist/network_check/pings.cjs +71 -69
- package/dist/network_check/pings.cjs.map +1 -1
- package/dist/network_check/pings.js +71 -65
- package/dist/network_check/pings.js.map +1 -1
- package/dist/network_check/template.cjs +256 -273
- package/dist/network_check/template.cjs.map +1 -1
- package/dist/network_check/template.js +253 -265
- package/dist/network_check/template.js.map +1 -1
- package/dist/pool/data.cjs +205 -226
- package/dist/pool/data.cjs.map +1 -1
- package/dist/pool/data.d.ts +10 -27
- package/dist/pool/data.js +196 -209
- package/dist/pool/data.js.map +1 -1
- package/dist/pool/driver.cjs +180 -207
- package/dist/pool/driver.cjs.map +1 -1
- package/dist/pool/driver.d.ts +12 -17
- package/dist/pool/driver.js +178 -205
- package/dist/pool/driver.js.map +1 -1
- package/dist/pool/index.cjs +2 -0
- package/dist/pool/index.d.ts +2 -3
- package/dist/pool/index.js +2 -0
- package/dist/pool/p_object_collection.cjs +67 -79
- package/dist/pool/p_object_collection.cjs.map +1 -1
- package/dist/pool/p_object_collection.d.ts +7 -28
- package/dist/pool/p_object_collection.js +65 -77
- package/dist/pool/p_object_collection.js.map +1 -1
- package/dist/pool/result_pool.cjs +217 -262
- package/dist/pool/result_pool.cjs.map +1 -1
- package/dist/pool/result_pool.d.ts +4 -27
- package/dist/pool/result_pool.js +216 -260
- package/dist/pool/result_pool.js.map +1 -1
- package/dist/worker/WorkerManager.cjs +51 -49
- package/dist/worker/WorkerManager.cjs.map +1 -1
- package/dist/worker/WorkerManager.js +49 -47
- package/dist/worker/WorkerManager.js.map +1 -1
- package/dist/worker/worker.cjs +19 -15
- package/dist/worker/worker.cjs.map +1 -1
- package/dist/worker/worker.d.ts +1 -2
- package/dist/worker/worker.js +18 -13
- package/dist/worker/worker.js.map +1 -1
- package/dist/worker/workerApi.cjs +14 -18
- package/dist/worker/workerApi.cjs.map +1 -1
- package/dist/worker/workerApi.js +13 -16
- package/dist/worker/workerApi.js.map +1 -1
- package/package.json +24 -24
- package/src/mutator/template/template_render.test.ts +22 -18
- package/dist/__external/.pnpm/@rollup_plugin-typescript@12.3.0_rollup@4.52.4_tslib@2.8.1_typescript@5.6.3/__external/tslib/tslib.es6.cjs +0 -77
- package/dist/__external/.pnpm/@rollup_plugin-typescript@12.3.0_rollup@4.52.4_tslib@2.8.1_typescript@5.6.3/__external/tslib/tslib.es6.cjs.map +0 -1
- package/dist/__external/.pnpm/@rollup_plugin-typescript@12.3.0_rollup@4.52.4_tslib@2.8.1_typescript@5.6.3/__external/tslib/tslib.es6.js +0 -74
- package/dist/__external/.pnpm/@rollup_plugin-typescript@12.3.0_rollup@4.52.4_tslib@2.8.1_typescript@5.6.3/__external/tslib/tslib.es6.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/classes/comparator.cjs +0 -162
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/classes/comparator.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/classes/comparator.js +0 -160
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/classes/comparator.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/classes/range.cjs +0 -576
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/classes/range.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/classes/range.js +0 -574
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/classes/range.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/classes/semver.cjs +0 -337
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/classes/semver.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/classes/semver.js +0 -335
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/classes/semver.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/clean.cjs +0 -22
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/clean.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/clean.js +0 -20
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/clean.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/cmp.cjs +0 -73
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/cmp.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/cmp.js +0 -71
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/cmp.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/coerce.cjs +0 -78
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/coerce.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/coerce.js +0 -76
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/coerce.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/compare-build.cjs +0 -23
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/compare-build.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/compare-build.js +0 -21
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/compare-build.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/compare-loose.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/compare-loose.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/compare-loose.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/compare-loose.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/compare.cjs +0 -21
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/compare.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/compare.js +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/compare.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/diff.cjs +0 -74
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/diff.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/diff.js +0 -72
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/diff.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/eq.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/eq.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/eq.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/eq.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/gt.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/gt.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/gt.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/gt.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/gte.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/gte.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/gte.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/gte.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/inc.cjs +0 -35
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/inc.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/inc.js +0 -33
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/inc.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/lt.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/lt.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/lt.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/lt.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/lte.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/lte.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/lte.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/lte.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/major.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/major.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/major.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/major.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/minor.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/minor.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/minor.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/minor.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/neq.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/neq.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/neq.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/neq.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/parse.cjs +0 -32
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/parse.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/parse.js +0 -30
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/parse.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/patch.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/patch.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/patch.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/patch.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/prerelease.cjs +0 -22
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/prerelease.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/prerelease.js +0 -20
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/prerelease.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/rcompare.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/rcompare.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/rcompare.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/rcompare.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/rsort.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/rsort.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/rsort.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/rsort.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/satisfies.cjs +0 -26
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/satisfies.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/satisfies.js +0 -24
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/satisfies.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/sort.cjs +0 -19
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/sort.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/sort.js +0 -17
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/sort.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/valid.cjs +0 -22
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/valid.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/valid.js +0 -20
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/functions/valid.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/index.cjs +0 -145
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/index.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/index.js +0 -143
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/index.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/constants.cjs +0 -49
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/constants.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/constants.js +0 -47
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/constants.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/debug.cjs +0 -23
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/debug.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/debug.js +0 -21
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/debug.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/identifiers.cjs +0 -37
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/identifiers.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/identifiers.js +0 -35
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/identifiers.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/lrucache.cjs +0 -54
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/lrucache.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/lrucache.js +0 -52
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/lrucache.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/parse-options.cjs +0 -29
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/parse-options.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/parse-options.js +0 -27
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/parse-options.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/re.cjs +0 -240
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/re.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/re.js +0 -238
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/internal/re.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/gtr.cjs +0 -20
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/gtr.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/gtr.js +0 -18
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/gtr.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/intersects.cjs +0 -23
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/intersects.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/intersects.js +0 -21
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/intersects.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/ltr.cjs +0 -20
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/ltr.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/ltr.js +0 -18
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/ltr.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/max-satisfying.cjs +0 -42
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/max-satisfying.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/max-satisfying.js +0 -40
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/max-satisfying.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/min-satisfying.cjs +0 -41
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/min-satisfying.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/min-satisfying.js +0 -39
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/min-satisfying.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/min-version.cjs +0 -79
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/min-version.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/min-version.js +0 -77
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/min-version.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/outside.cjs +0 -103
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/outside.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/outside.js +0 -101
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/outside.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/simplify.cjs +0 -64
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/simplify.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/simplify.js +0 -62
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/simplify.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/subset.cjs +0 -266
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/subset.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/subset.js +0 -264
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/subset.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/to-comparators.cjs +0 -24
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/to-comparators.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/to-comparators.js +0 -22
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/to-comparators.js.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/valid.cjs +0 -27
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/valid.cjs.map +0 -1
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/valid.js +0 -25
- package/dist/__external/.pnpm/semver@7.7.2/__external/semver/ranges/valid.js.map +0 -1
- package/dist/_virtual/index.cjs +0 -8
- package/dist/_virtual/index.cjs.map +0 -1
- package/dist/_virtual/index.js +0 -6
- package/dist/_virtual/index.js.map +0 -1
- package/dist/_virtual/re.cjs +0 -6
- package/dist/_virtual/re.cjs.map +0 -1
- package/dist/_virtual/re.js +0 -4
- package/dist/_virtual/re.js.map +0 -1
- package/dist/block_registry/index.d.ts.map +0 -1
- package/dist/block_registry/registry-v2-provider.d.ts.map +0 -1
- package/dist/block_registry/registry.d.ts.map +0 -1
- package/dist/block_registry/registry.test.d.ts +0 -2
- package/dist/block_registry/registry.test.d.ts.map +0 -1
- package/dist/block_registry/watcher.d.ts.map +0 -1
- package/dist/block_registry/well_known_registries.d.ts.map +0 -1
- package/dist/cfg_render/executor.d.ts +0 -9
- package/dist/cfg_render/executor.d.ts.map +0 -1
- package/dist/cfg_render/executor.test.d.ts +0 -2
- package/dist/cfg_render/executor.test.d.ts.map +0 -1
- package/dist/cfg_render/operation.d.ts +0 -29
- package/dist/cfg_render/operation.d.ts.map +0 -1
- package/dist/cfg_render/renderer.d.ts +0 -6
- package/dist/cfg_render/renderer.d.ts.map +0 -1
- package/dist/cfg_render/traverse.d.ts +0 -3
- package/dist/cfg_render/traverse.d.ts.map +0 -1
- package/dist/cfg_render/util.d.ts +0 -5
- package/dist/cfg_render/util.d.ts.map +0 -1
- package/dist/debug/index.d.ts +0 -9
- package/dist/debug/index.d.ts.map +0 -1
- package/dist/dev_env/index.d.ts +0 -21
- package/dist/dev_env/index.d.ts.map +0 -1
- package/dist/dev_env/util.d.ts +0 -3
- package/dist/dev_env/util.d.ts.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/js_render/computable_context.d.ts +0 -74
- package/dist/js_render/computable_context.d.ts.map +0 -1
- package/dist/js_render/context.d.ts +0 -73
- package/dist/js_render/context.d.ts.map +0 -1
- package/dist/js_render/index.d.ts +0 -57
- package/dist/js_render/index.d.ts.map +0 -1
- package/dist/middle_layer/active_cfg.d.ts +0 -6
- package/dist/middle_layer/active_cfg.d.ts.map +0 -1
- package/dist/middle_layer/block.d.ts +0 -10
- package/dist/middle_layer/block.d.ts.map +0 -1
- package/dist/middle_layer/block_ctx.d.ts +0 -23
- package/dist/middle_layer/block_ctx.d.ts.map +0 -1
- package/dist/middle_layer/block_ctx_unsafe.d.ts +0 -16
- package/dist/middle_layer/block_ctx_unsafe.d.ts.map +0 -1
- package/dist/middle_layer/driver_kit.d.ts.map +0 -1
- package/dist/middle_layer/frontend_path.d.ts +0 -6
- package/dist/middle_layer/frontend_path.d.ts.map +0 -1
- package/dist/middle_layer/index.d.ts.map +0 -1
- package/dist/middle_layer/middle_layer.d.ts.map +0 -1
- package/dist/middle_layer/navigation_states.d.ts +0 -10
- package/dist/middle_layer/navigation_states.d.ts.map +0 -1
- package/dist/middle_layer/ops.d.ts.map +0 -1
- package/dist/middle_layer/project.d.ts.map +0 -1
- package/dist/middle_layer/project_list.d.ts +0 -11
- package/dist/middle_layer/project_list.d.ts.map +0 -1
- package/dist/middle_layer/project_overview.d.ts +0 -8
- package/dist/middle_layer/project_overview.d.ts.map +0 -1
- package/dist/middle_layer/project_overview_light.d.ts +0 -8
- package/dist/middle_layer/project_overview_light.d.ts.map +0 -1
- package/dist/middle_layer/render.d.ts +0 -7
- package/dist/middle_layer/render.d.ts.map +0 -1
- package/dist/middle_layer/render.test.d.ts +0 -5
- package/dist/middle_layer/render.test.d.ts.map +0 -1
- package/dist/middle_layer/types.d.ts.map +0 -1
- package/dist/middle_layer/util.d.ts +0 -16
- package/dist/middle_layer/util.d.ts.map +0 -1
- package/dist/model/args.d.ts +0 -14
- package/dist/model/args.d.ts.map +0 -1
- package/dist/model/block_pack.d.ts +0 -8
- package/dist/model/block_pack.d.ts.map +0 -1
- package/dist/model/block_pack_spec.d.ts.map +0 -1
- package/dist/model/frontend.d.ts.map +0 -1
- package/dist/model/index.d.ts.map +0 -1
- package/dist/model/project_helper.d.ts.map +0 -1
- package/dist/model/project_model.d.ts.map +0 -1
- package/dist/model/project_model.test.d.ts +0 -2
- package/dist/model/project_model.test.d.ts.map +0 -1
- package/dist/model/project_model_util.d.ts +0 -43
- package/dist/model/project_model_util.d.ts.map +0 -1
- package/dist/model/project_model_util.test.d.ts +0 -2
- package/dist/model/project_model_util.test.d.ts.map +0 -1
- package/dist/model/project_model_v1.d.ts +0 -8
- package/dist/model/project_model_v1.d.ts.map +0 -1
- package/dist/model/template_spec.d.ts.map +0 -1
- package/dist/mutator/block-pack/block_pack.d.ts.map +0 -1
- package/dist/mutator/block-pack/block_pack.test.d.ts +0 -2
- package/dist/mutator/block-pack/block_pack.test.d.ts.map +0 -1
- package/dist/mutator/block-pack/frontend.d.ts +0 -4
- package/dist/mutator/block-pack/frontend.d.ts.map +0 -1
- package/dist/mutator/context_export.d.ts +0 -9
- package/dist/mutator/context_export.d.ts.map +0 -1
- package/dist/mutator/migration.d.ts +0 -9
- package/dist/mutator/migration.d.ts.map +0 -1
- package/dist/mutator/project-v3.test.d.ts +0 -2
- package/dist/mutator/project-v3.test.d.ts.map +0 -1
- package/dist/mutator/project.d.ts +0 -211
- package/dist/mutator/project.d.ts.map +0 -1
- package/dist/mutator/project.test.d.ts +0 -2
- package/dist/mutator/project.test.d.ts.map +0 -1
- package/dist/mutator/template/direct_template_loader.d.ts +0 -5
- package/dist/mutator/template/direct_template_loader.d.ts.map +0 -1
- package/dist/mutator/template/direct_template_loader_v3.d.ts +0 -15
- package/dist/mutator/template/direct_template_loader_v3.d.ts.map +0 -1
- package/dist/mutator/template/render_block.d.ts +0 -32
- package/dist/mutator/template/render_block.d.ts.map +0 -1
- package/dist/mutator/template/render_template.d.ts.map +0 -1
- package/dist/mutator/template/template_loading.d.ts.map +0 -1
- package/dist/mutator/template/template_render.test.d.ts +0 -2
- package/dist/mutator/template/template_render.test.d.ts.map +0 -1
- package/dist/network_check/network_check.d.ts.map +0 -1
- package/dist/network_check/network_check.test.d.ts +0 -2
- package/dist/network_check/network_check.test.d.ts.map +0 -1
- package/dist/network_check/pings.d.ts +0 -32
- package/dist/network_check/pings.d.ts.map +0 -1
- package/dist/network_check/template.d.ts +0 -57
- package/dist/network_check/template.d.ts.map +0 -1
- package/dist/network_check/template.test.d.ts +0 -2
- package/dist/network_check/template.test.d.ts.map +0 -1
- package/dist/network_check/test_utils.d.ts +0 -6
- package/dist/network_check/test_utils.d.ts.map +0 -1
- package/dist/pool/data.d.ts.map +0 -1
- package/dist/pool/driver.d.ts.map +0 -1
- package/dist/pool/index.d.ts.map +0 -1
- package/dist/pool/p_object_collection.d.ts.map +0 -1
- package/dist/pool/result_pool.d.ts.map +0 -1
- package/dist/test/block_packs.d.ts +0 -6
- package/dist/test/block_packs.d.ts.map +0 -1
- package/dist/test/explicit_templates.d.ts +0 -3
- package/dist/test/explicit_templates.d.ts.map +0 -1
- package/dist/test/known_templates.d.ts +0 -6
- package/dist/test/known_templates.d.ts.map +0 -1
- package/dist/test_env.d.ts +0 -6
- package/dist/test_env.d.ts.map +0 -1
- package/dist/worker/WorkerManager.d.ts +0 -12
- package/dist/worker/WorkerManager.d.ts.map +0 -1
- package/dist/worker/worker.d.ts.map +0 -1
- package/dist/worker/workerApi.d.ts +0 -15
- package/dist/worker/workerApi.d.ts.map +0 -1
|
@@ -1,170 +1,134 @@
|
|
|
1
|
-
import { inferAllReferencedBlocks } from
|
|
1
|
+
import { inferAllReferencedBlocks } from "./args.js";
|
|
2
2
|
|
|
3
|
+
//#region src/model/project_model_util.ts
|
|
3
4
|
function allBlocks(structure) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (const b of g.blocks)
|
|
8
|
-
yield b;
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
class BlockGraph {
|
|
13
|
-
/** Nodes are stored in the map in topological order */
|
|
14
|
-
nodes;
|
|
15
|
-
constructor(nodes) {
|
|
16
|
-
this.nodes = nodes;
|
|
17
|
-
}
|
|
18
|
-
traverseIds(direction, ...rootBlockIds) {
|
|
19
|
-
const all = new Set();
|
|
20
|
-
this.traverse(direction, rootBlockIds, (node) => all.add(node.id));
|
|
21
|
-
return all;
|
|
22
|
-
}
|
|
23
|
-
traverseIdsExcludingRoots(direction, ...rootBlockIds) {
|
|
24
|
-
const result = this.traverseIds(direction, ...rootBlockIds);
|
|
25
|
-
for (const r of rootBlockIds)
|
|
26
|
-
result.delete(r);
|
|
27
|
-
return result;
|
|
28
|
-
}
|
|
29
|
-
traverse(direction, rootBlockIds, cb) {
|
|
30
|
-
let unprocessed = [...rootBlockIds];
|
|
31
|
-
// used to deduplicate possible downstream / upstream blocks and process them only once
|
|
32
|
-
const queued = new Set(unprocessed);
|
|
33
|
-
while (unprocessed.length > 0) {
|
|
34
|
-
const nextUnprocessed = [];
|
|
35
|
-
for (const blockId of unprocessed) {
|
|
36
|
-
const info = this.nodes.get(blockId);
|
|
37
|
-
cb(info);
|
|
38
|
-
info[direction].forEach((v) => {
|
|
39
|
-
if (!queued.has(v)) {
|
|
40
|
-
queued.add(v);
|
|
41
|
-
nextUnprocessed.push(v);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
unprocessed = nextUnprocessed;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
5
|
+
return { *[Symbol.iterator]() {
|
|
6
|
+
for (const g of structure.groups) for (const b of g.blocks) yield b;
|
|
7
|
+
} };
|
|
48
8
|
}
|
|
9
|
+
var BlockGraph = class {
|
|
10
|
+
/** Nodes are stored in the map in topological order */
|
|
11
|
+
nodes;
|
|
12
|
+
constructor(nodes) {
|
|
13
|
+
this.nodes = nodes;
|
|
14
|
+
}
|
|
15
|
+
traverseIds(direction, ...rootBlockIds) {
|
|
16
|
+
const all = /* @__PURE__ */ new Set();
|
|
17
|
+
this.traverse(direction, rootBlockIds, (node) => all.add(node.id));
|
|
18
|
+
return all;
|
|
19
|
+
}
|
|
20
|
+
traverseIdsExcludingRoots(direction, ...rootBlockIds) {
|
|
21
|
+
const result = this.traverseIds(direction, ...rootBlockIds);
|
|
22
|
+
for (const r of rootBlockIds) result.delete(r);
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
traverse(direction, rootBlockIds, cb) {
|
|
26
|
+
let unprocessed = [...rootBlockIds];
|
|
27
|
+
const queued = new Set(unprocessed);
|
|
28
|
+
while (unprocessed.length > 0) {
|
|
29
|
+
const nextUnprocessed = [];
|
|
30
|
+
for (const blockId of unprocessed) {
|
|
31
|
+
const info = this.nodes.get(blockId);
|
|
32
|
+
cb(info);
|
|
33
|
+
info[direction].forEach((v) => {
|
|
34
|
+
if (!queued.has(v)) {
|
|
35
|
+
queued.add(v);
|
|
36
|
+
nextUnprocessed.push(v);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
unprocessed = nextUnprocessed;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
49
44
|
function stagingGraph(structure) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
previous.enrichments = previous.enrichmentTargets = new Set();
|
|
71
|
-
}
|
|
72
|
-
previous = current;
|
|
73
|
-
}
|
|
74
|
-
if (previous !== undefined)
|
|
75
|
-
previous.directDownstream = previous.downstream = new Set();
|
|
76
|
-
return new BlockGraph(result);
|
|
45
|
+
const result = /* @__PURE__ */ new Map();
|
|
46
|
+
let previous = void 0;
|
|
47
|
+
for (const { id } of allBlocks(structure)) {
|
|
48
|
+
const current = {
|
|
49
|
+
id,
|
|
50
|
+
missingReferences: false
|
|
51
|
+
};
|
|
52
|
+
result.set(id, current);
|
|
53
|
+
if (previous === void 0) {
|
|
54
|
+
current.directUpstream = current.upstream = /* @__PURE__ */ new Set();
|
|
55
|
+
current.enrichments = current.enrichmentTargets = /* @__PURE__ */ new Set();
|
|
56
|
+
} else {
|
|
57
|
+
current.directUpstream = current.upstream = new Set([previous.id]);
|
|
58
|
+
previous.directDownstream = previous.downstream = new Set([current.id]);
|
|
59
|
+
previous.enrichments = previous.enrichmentTargets = /* @__PURE__ */ new Set();
|
|
60
|
+
}
|
|
61
|
+
previous = current;
|
|
62
|
+
}
|
|
63
|
+
if (previous !== void 0) previous.directDownstream = previous.downstream = /* @__PURE__ */ new Set();
|
|
64
|
+
return new BlockGraph(result);
|
|
77
65
|
}
|
|
78
66
|
function productionGraph(structure, infoProvider) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
? new Set(references.upstreams)
|
|
114
|
-
: new Set(info.enrichmentTargets.map((t) => t.blockId));
|
|
115
|
-
const node = {
|
|
116
|
-
id,
|
|
117
|
-
missingReferences: references.missingReferences,
|
|
118
|
-
upstream: upstreams,
|
|
119
|
-
directUpstream: references.upstreams,
|
|
120
|
-
enrichmentTargets,
|
|
121
|
-
downstream: new Set(), // will be populated from downstream blocks
|
|
122
|
-
directDownstream: new Set(), // will be populated from downstream blocks
|
|
123
|
-
enrichments: new Set(), // will be populated from downstream blocks
|
|
124
|
-
};
|
|
125
|
-
resultMap.set(id, node);
|
|
126
|
-
references.upstreams.forEach((dep) => resultMap.get(dep).directDownstream.add(id));
|
|
127
|
-
upstreams.forEach((dep) => resultMap.get(dep).downstream.add(id));
|
|
128
|
-
enrichmentTargets.forEach((dep) => resultMap.get(dep)?.enrichments.add(id));
|
|
129
|
-
allAbove.add(id);
|
|
130
|
-
}
|
|
131
|
-
return resultGraph;
|
|
67
|
+
const resultMap = /* @__PURE__ */ new Map();
|
|
68
|
+
const resultGraph = new BlockGraph(resultMap);
|
|
69
|
+
const allAbove = /* @__PURE__ */ new Set();
|
|
70
|
+
for (const { id } of allBlocks(structure)) {
|
|
71
|
+
const info = infoProvider(id);
|
|
72
|
+
if (info === void 0) continue;
|
|
73
|
+
const references = inferAllReferencedBlocks(info.args, allAbove);
|
|
74
|
+
const potentialUpstreams = new Set([...references.upstreams, ...resultGraph.traverseIds("enrichments", ...references.upstreamsRequiringEnrichments)]);
|
|
75
|
+
const upstreams = /* @__PURE__ */ new Set();
|
|
76
|
+
for (const { id: pId } of allBlocks(structure)) {
|
|
77
|
+
if (pId === id) break;
|
|
78
|
+
if (potentialUpstreams.has(pId)) {
|
|
79
|
+
upstreams.add(pId);
|
|
80
|
+
for (const transitiveUpstream of resultGraph.traverseIdsExcludingRoots("upstream", pId)) upstreams.delete(transitiveUpstream);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const enrichmentTargets = info.enrichmentTargets === void 0 ? new Set(references.upstreams) : new Set(info.enrichmentTargets.map((t) => t.blockId));
|
|
84
|
+
const node = {
|
|
85
|
+
id,
|
|
86
|
+
missingReferences: references.missingReferences,
|
|
87
|
+
upstream: upstreams,
|
|
88
|
+
directUpstream: references.upstreams,
|
|
89
|
+
enrichmentTargets,
|
|
90
|
+
downstream: /* @__PURE__ */ new Set(),
|
|
91
|
+
directDownstream: /* @__PURE__ */ new Set(),
|
|
92
|
+
enrichments: /* @__PURE__ */ new Set()
|
|
93
|
+
};
|
|
94
|
+
resultMap.set(id, node);
|
|
95
|
+
references.upstreams.forEach((dep) => resultMap.get(dep).directDownstream.add(id));
|
|
96
|
+
upstreams.forEach((dep) => resultMap.get(dep).downstream.add(id));
|
|
97
|
+
enrichmentTargets.forEach((dep) => resultMap.get(dep)?.enrichments.add(id));
|
|
98
|
+
allAbove.add(id);
|
|
99
|
+
}
|
|
100
|
+
return resultGraph;
|
|
132
101
|
}
|
|
133
102
|
function setsEqual(a, b) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (!b.has(e))
|
|
138
|
-
return false;
|
|
139
|
-
return true;
|
|
103
|
+
if (a.size !== b.size) return false;
|
|
104
|
+
for (const e of a) if (!b.has(e)) return false;
|
|
105
|
+
return true;
|
|
140
106
|
}
|
|
141
107
|
function intersects(a, b) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
if (b.has(e))
|
|
146
|
-
return true;
|
|
147
|
-
return false;
|
|
108
|
+
if (a.size > b.size) return intersects(b, a);
|
|
109
|
+
for (const e of a) if (b.has(e)) return true;
|
|
110
|
+
return false;
|
|
148
111
|
}
|
|
149
112
|
function graphDiff(a, b) {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
113
|
+
const onlyInA = /* @__PURE__ */ new Set();
|
|
114
|
+
const onlyInB = /* @__PURE__ */ new Set();
|
|
115
|
+
const different = /* @__PURE__ */ new Set();
|
|
116
|
+
a.nodes.forEach((fromA) => {
|
|
117
|
+
const fromB = b.nodes.get(fromA.id);
|
|
118
|
+
if (fromB === void 0) onlyInA.add(fromA.id);
|
|
119
|
+
else if (!setsEqual(fromA.upstream, fromB.upstream) || intersects(fromA.upstream, different)) different.add(fromA.id);
|
|
120
|
+
});
|
|
121
|
+
b.nodes.forEach((fromB) => {
|
|
122
|
+
if (!a.nodes.has(fromB.id)) onlyInB.add(fromB.id);
|
|
123
|
+
else if (intersects(fromB.upstream, different)) different.add(fromB.id);
|
|
124
|
+
});
|
|
125
|
+
return {
|
|
126
|
+
onlyInA,
|
|
127
|
+
onlyInB,
|
|
128
|
+
different
|
|
129
|
+
};
|
|
167
130
|
}
|
|
168
131
|
|
|
169
|
-
|
|
170
|
-
|
|
132
|
+
//#endregion
|
|
133
|
+
export { allBlocks, graphDiff, productionGraph, stagingGraph };
|
|
134
|
+
//# sourceMappingURL=project_model_util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project_model_util.js","sources":["../../src/model/project_model_util.ts"],"sourcesContent":["import type { Block, ProjectStructure } from \"./project_model\";\nimport type { Optional, Writable } from \"utility-types\";\nimport { inferAllReferencedBlocks } from \"./args\";\nimport type { PlRef } from \"@milaboratories/pl-model-common\";\n\nexport function allBlocks(structure: ProjectStructure): Iterable<Block> {\n return {\n *[Symbol.iterator]() {\n for (const g of structure.groups) for (const b of g.blocks) yield b;\n },\n };\n}\n\nexport interface BlockGraphNode {\n readonly id: string;\n readonly missingReferences: boolean;\n /** Upstreams, calculated accounting for potential indirect block dependencies */\n readonly upstream: Set<string>;\n /** Direct upstream, listed in block args */\n readonly directUpstream: Set<string>;\n /** Downstreams, calculated accounting for potential indirect block dependencies */\n readonly downstream: Set<string>;\n /** Downstream blocks enriching current block's outputs */\n readonly enrichments: Set<string>;\n /** Direct downstreams listing our block in it's args */\n readonly directDownstream: Set<string>;\n /** Upstream blocks that current block may enrich with its exports */\n readonly enrichmentTargets: Set<string>;\n}\n\nexport type BlockGraphDirection =\n | \"upstream\"\n | \"downstream\"\n | \"directUpstream\"\n | \"directDownstream\"\n | \"enrichments\"\n | \"enrichmentTargets\";\n\nexport class BlockGraph {\n /** Nodes are stored in the map in topological order */\n public readonly nodes: Map<string, BlockGraphNode>;\n\n constructor(nodes: Map<string, BlockGraphNode>) {\n this.nodes = nodes;\n }\n\n public traverseIds(direction: BlockGraphDirection, ...rootBlockIds: string[]): Set<string> {\n const all = new Set<string>();\n this.traverse(direction, rootBlockIds, (node) => all.add(node.id));\n return all;\n }\n\n public traverseIdsExcludingRoots(\n direction: BlockGraphDirection,\n ...rootBlockIds: string[]\n ): Set<string> {\n const result = this.traverseIds(direction, ...rootBlockIds);\n for (const r of rootBlockIds) result.delete(r);\n return result;\n }\n\n public traverse(\n direction: BlockGraphDirection,\n rootBlockIds: string[],\n cb: (node: BlockGraphNode) => void,\n ): void {\n let unprocessed = [...rootBlockIds];\n // used to deduplicate possible downstream / upstream blocks and process them only once\n const queued = new Set<string>(unprocessed);\n while (unprocessed.length > 0) {\n const nextUnprocessed: string[] = [];\n for (const blockId of unprocessed) {\n const info = this.nodes.get(blockId)!;\n cb(info);\n info[direction].forEach((v) => {\n if (!queued.has(v)) {\n queued.add(v);\n nextUnprocessed.push(v);\n }\n });\n }\n unprocessed = nextUnprocessed;\n }\n }\n}\n\nexport function stagingGraph(structure: ProjectStructure) {\n type WNode = Optional<Writable<BlockGraphNode>, BlockGraphDirection>;\n const result = new Map<string, WNode>();\n\n // Simple dependency graph from previous to next\n //\n // more complicated patterns to be implemented later\n // (i.e. groups with specific behaviours for total outputs and inputs)\n //\n let previous: WNode | undefined = undefined;\n for (const { id } of allBlocks(structure)) {\n const current: WNode = {\n id: id,\n missingReferences: false,\n };\n result.set(id, current);\n if (previous === undefined) {\n current.directUpstream = current.upstream = new Set<string>();\n current.enrichments = current.enrichmentTargets = new Set<string>();\n } else {\n current.directUpstream = current.upstream = new Set<string>([previous.id]);\n previous.directDownstream = previous.downstream = new Set<string>([current.id]);\n previous.enrichments = previous.enrichmentTargets = new Set<string>();\n }\n\n previous = current;\n }\n if (previous !== undefined) previous.directDownstream = previous.downstream = new Set<string>();\n\n return new BlockGraph(result as Map<string, BlockGraphNode>);\n}\n\nexport type ProductionGraphBlockInfo = {\n args: unknown;\n enrichmentTargets: PlRef[] | undefined;\n};\n\nexport function productionGraph(\n structure: ProjectStructure,\n infoProvider: (blockId: string) => ProductionGraphBlockInfo | undefined,\n): BlockGraph {\n const resultMap = new Map<string, BlockGraphNode>();\n // result graph is constructed to be able to perform traversal on incomplete graph\n // to calculate potentialUpstreams\n const resultGraph = new BlockGraph(resultMap);\n\n // traversing blocks in topological order defined by the project structure\n // and keeping possibleUpstreams set on each step, to consider only\n // those dependencies that are possible under current topology\n const allAbove = new Set<string>();\n for (const { id } of allBlocks(structure)) {\n const info = infoProvider(id);\n\n // skipping those blocks for which we don't have args\n if (info === undefined) continue;\n\n const references = inferAllReferencedBlocks(info.args, allAbove);\n\n // The algorithm here adds all downstream blocks of direct upstreams as potential upstreams.\n // They may produce additional columns, anchored in our direct upstream, those columns might be needed by the workflow.\n const potentialUpstreams = new Set([\n ...references.upstreams,\n ...resultGraph.traverseIds(\"enrichments\", ...references.upstreamsRequiringEnrichments),\n ]);\n\n // To minimize complexity of the graph, we leave only the closest upstreams, removing all their transitive dependencies,\n // relying on the traversal mechanisms in BContexts and on UI level to connect our block with all upstreams\n const upstreams = new Set<string>();\n for (const { id: pId } of allBlocks(structure)) {\n if (pId === id) break; // stopping on current block\n if (potentialUpstreams.has(pId)) {\n upstreams.add(pId);\n for (const transitiveUpstream of resultGraph.traverseIdsExcludingRoots(\"upstream\", pId))\n upstreams.delete(transitiveUpstream);\n }\n }\n\n // default assumption is that all direct upstreams are enrichment targets\n const enrichmentTargets =\n info.enrichmentTargets === undefined\n ? new Set(references.upstreams)\n : new Set(info.enrichmentTargets.map((t) => t.blockId));\n\n const node: BlockGraphNode = {\n id,\n missingReferences: references.missingReferences,\n upstream: upstreams,\n directUpstream: references.upstreams,\n enrichmentTargets,\n downstream: new Set<string>(), // will be populated from downstream blocks\n directDownstream: new Set<string>(), // will be populated from downstream blocks\n enrichments: new Set<string>(), // will be populated from downstream blocks\n };\n resultMap.set(id, node);\n references.upstreams.forEach((dep) => resultMap.get(dep)!.directDownstream.add(id));\n upstreams.forEach((dep) => resultMap.get(dep)!.downstream.add(id));\n enrichmentTargets.forEach((dep) => resultMap.get(dep)?.enrichments.add(id));\n allAbove.add(id);\n }\n\n return resultGraph;\n}\n\nfunction setsEqual<T>(a: Set<T>, b: Set<T>): boolean {\n if (a.size !== b.size) return false;\n for (const e of a) if (!b.has(e)) return false;\n return true;\n}\n\nfunction intersects<T>(a: Set<T>, b: Set<T>): boolean {\n if (a.size > b.size) return intersects(b, a);\n for (const e of a) if (b.has(e)) return true;\n return false;\n}\n\nexport interface GraphDiff {\n onlyInA: Set<string>;\n /** Nodes that changed the list of their upstreams,\n * and all their downstreams */\n different: Set<string>;\n onlyInB: Set<string>;\n}\n\nexport function graphDiff(a: BlockGraph, b: BlockGraph): GraphDiff {\n const onlyInA = new Set<string>();\n const onlyInB = new Set<string>();\n const different = new Set<string>();\n a.nodes.forEach((fromA) => {\n const fromB = b.nodes.get(fromA.id);\n if (fromB === undefined) onlyInA.add(fromA.id);\n else if (!setsEqual(fromA.upstream, fromB.upstream) || intersects(fromA.upstream, different))\n different.add(fromA.id);\n });\n\n b.nodes.forEach((fromB) => {\n if (!a.nodes.has(fromB.id)) onlyInB.add(fromB.id);\n else if (intersects(fromB.upstream, different)) different.add(fromB.id);\n });\n\n return { onlyInA, onlyInB, different };\n}\n"],"names":[],"mappings":";;AAKM,SAAU,SAAS,CAAC,SAA2B,EAAA;IACnD,OAAO;AACL,QAAA,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAA;AAChB,YAAA,KAAK,MAAM,CAAC,IAAI,SAAS,CAAC,MAAM;AAAE,gBAAA,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM;AAAE,oBAAA,MAAM,CAAC;QACrE,CAAC;KACF;AACH;MA2Ba,UAAU,CAAA;;AAEL,IAAA,KAAK;AAErB,IAAA,WAAA,CAAY,KAAkC,EAAA;AAC5C,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;IACpB;AAEO,IAAA,WAAW,CAAC,SAA8B,EAAE,GAAG,YAAsB,EAAA;AAC1E,QAAA,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU;QAC7B,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,YAAY,EAAE,CAAC,IAAI,KAAK,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAClE,QAAA,OAAO,GAAG;IACZ;AAEO,IAAA,yBAAyB,CAC9B,SAA8B,EAC9B,GAAG,YAAsB,EAAA;QAEzB,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,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AC,OAAO,CAAC,CAAC,KAAK,KAAI;AACxB,QAAA,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACnC,IAAI,KAAK,KAAK,SAAS;AAAE,YAAA,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;AACzC,aAAA,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC;AAC1F,YAAA,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;AAC3B,IAAA,CAAC,CAAC;IAEF,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;QACxB,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;AAAE,YAAA,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;AAC5C,aAAA,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC;AAAE,YAAA,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;AACzE,IAAA,CAAC,CAAC;AAEF,IAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE;AACxC;;;;"}
|
|
1
|
+
{"version":3,"file":"project_model_util.js","names":[],"sources":["../../src/model/project_model_util.ts"],"sourcesContent":["import type { Block, ProjectStructure } from \"./project_model\";\nimport type { Optional, Writable } from \"utility-types\";\nimport { inferAllReferencedBlocks } from \"./args\";\nimport type { PlRef } from \"@milaboratories/pl-model-common\";\n\nexport function allBlocks(structure: ProjectStructure): Iterable<Block> {\n return {\n *[Symbol.iterator]() {\n for (const g of structure.groups) for (const b of g.blocks) yield b;\n },\n };\n}\n\nexport interface BlockGraphNode {\n readonly id: string;\n readonly missingReferences: boolean;\n /** Upstreams, calculated accounting for potential indirect block dependencies */\n readonly upstream: Set<string>;\n /** Direct upstream, listed in block args */\n readonly directUpstream: Set<string>;\n /** Downstreams, calculated accounting for potential indirect block dependencies */\n readonly downstream: Set<string>;\n /** Downstream blocks enriching current block's outputs */\n readonly enrichments: Set<string>;\n /** Direct downstreams listing our block in it's args */\n readonly directDownstream: Set<string>;\n /** Upstream blocks that current block may enrich with its exports */\n readonly enrichmentTargets: Set<string>;\n}\n\nexport type BlockGraphDirection =\n | \"upstream\"\n | \"downstream\"\n | \"directUpstream\"\n | \"directDownstream\"\n | \"enrichments\"\n | \"enrichmentTargets\";\n\nexport class BlockGraph {\n /** Nodes are stored in the map in topological order */\n public readonly nodes: Map<string, BlockGraphNode>;\n\n constructor(nodes: Map<string, BlockGraphNode>) {\n this.nodes = nodes;\n }\n\n public traverseIds(direction: BlockGraphDirection, ...rootBlockIds: string[]): Set<string> {\n const all = new Set<string>();\n this.traverse(direction, rootBlockIds, (node) => all.add(node.id));\n return all;\n }\n\n public traverseIdsExcludingRoots(\n direction: BlockGraphDirection,\n ...rootBlockIds: string[]\n ): Set<string> {\n const result = this.traverseIds(direction, ...rootBlockIds);\n for (const r of rootBlockIds) result.delete(r);\n return result;\n }\n\n public traverse(\n direction: BlockGraphDirection,\n rootBlockIds: string[],\n cb: (node: BlockGraphNode) => void,\n ): void {\n let unprocessed = [...rootBlockIds];\n // used to deduplicate possible downstream / upstream blocks and process them only once\n const queued = new Set<string>(unprocessed);\n while (unprocessed.length > 0) {\n const nextUnprocessed: string[] = [];\n for (const blockId of unprocessed) {\n const info = this.nodes.get(blockId)!;\n cb(info);\n info[direction].forEach((v) => {\n if (!queued.has(v)) {\n queued.add(v);\n nextUnprocessed.push(v);\n }\n });\n }\n unprocessed = nextUnprocessed;\n }\n }\n}\n\nexport function stagingGraph(structure: ProjectStructure) {\n type WNode = Optional<Writable<BlockGraphNode>, BlockGraphDirection>;\n const result = new Map<string, WNode>();\n\n // Simple dependency graph from previous to next\n //\n // more complicated patterns to be implemented later\n // (i.e. groups with specific behaviours for total outputs and inputs)\n //\n let previous: WNode | undefined = undefined;\n for (const { id } of allBlocks(structure)) {\n const current: WNode = {\n id: id,\n missingReferences: false,\n };\n result.set(id, current);\n if (previous === undefined) {\n current.directUpstream = current.upstream = new Set<string>();\n current.enrichments = current.enrichmentTargets = new Set<string>();\n } else {\n current.directUpstream = current.upstream = new Set<string>([previous.id]);\n previous.directDownstream = previous.downstream = new Set<string>([current.id]);\n previous.enrichments = previous.enrichmentTargets = new Set<string>();\n }\n\n previous = current;\n }\n if (previous !== undefined) previous.directDownstream = previous.downstream = new Set<string>();\n\n return new BlockGraph(result as Map<string, BlockGraphNode>);\n}\n\nexport type ProductionGraphBlockInfo = {\n args: unknown;\n enrichmentTargets: PlRef[] | undefined;\n};\n\nexport function productionGraph(\n structure: ProjectStructure,\n infoProvider: (blockId: string) => ProductionGraphBlockInfo | undefined,\n): BlockGraph {\n const resultMap = new Map<string, BlockGraphNode>();\n // result graph is constructed to be able to perform traversal on incomplete graph\n // to calculate potentialUpstreams\n const resultGraph = new BlockGraph(resultMap);\n\n // traversing blocks in topological order defined by the project structure\n // and keeping possibleUpstreams set on each step, to consider only\n // those dependencies that are possible under current topology\n const allAbove = new Set<string>();\n for (const { id } of allBlocks(structure)) {\n const info = infoProvider(id);\n\n // skipping those blocks for which we don't have args\n if (info === undefined) continue;\n\n const references = inferAllReferencedBlocks(info.args, allAbove);\n\n // The algorithm here adds all downstream blocks of direct upstreams as potential upstreams.\n // They may produce additional columns, anchored in our direct upstream, those columns might be needed by the workflow.\n const potentialUpstreams = new Set([\n ...references.upstreams,\n ...resultGraph.traverseIds(\"enrichments\", ...references.upstreamsRequiringEnrichments),\n ]);\n\n // To minimize complexity of the graph, we leave only the closest upstreams, removing all their transitive dependencies,\n // relying on the traversal mechanisms in BContexts and on UI level to connect our block with all upstreams\n const upstreams = new Set<string>();\n for (const { id: pId } of allBlocks(structure)) {\n if (pId === id) break; // stopping on current block\n if (potentialUpstreams.has(pId)) {\n upstreams.add(pId);\n for (const transitiveUpstream of resultGraph.traverseIdsExcludingRoots(\"upstream\", pId))\n upstreams.delete(transitiveUpstream);\n }\n }\n\n // default assumption is that all direct upstreams are enrichment targets\n const enrichmentTargets =\n info.enrichmentTargets === undefined\n ? new Set(references.upstreams)\n : new Set(info.enrichmentTargets.map((t) => t.blockId));\n\n const node: BlockGraphNode = {\n id,\n missingReferences: references.missingReferences,\n upstream: upstreams,\n directUpstream: references.upstreams,\n enrichmentTargets,\n downstream: new Set<string>(), // will be populated from downstream blocks\n directDownstream: new Set<string>(), // will be populated from downstream blocks\n enrichments: new Set<string>(), // will be populated from downstream blocks\n };\n resultMap.set(id, node);\n references.upstreams.forEach((dep) => resultMap.get(dep)!.directDownstream.add(id));\n upstreams.forEach((dep) => resultMap.get(dep)!.downstream.add(id));\n enrichmentTargets.forEach((dep) => resultMap.get(dep)?.enrichments.add(id));\n allAbove.add(id);\n }\n\n return resultGraph;\n}\n\nfunction setsEqual<T>(a: Set<T>, b: Set<T>): boolean {\n if (a.size !== b.size) return false;\n for (const e of a) if (!b.has(e)) return false;\n return true;\n}\n\nfunction intersects<T>(a: Set<T>, b: Set<T>): boolean {\n if (a.size > b.size) return intersects(b, a);\n for (const e of a) if (b.has(e)) return true;\n return false;\n}\n\nexport interface GraphDiff {\n onlyInA: Set<string>;\n /** Nodes that changed the list of their upstreams,\n * and all their downstreams */\n different: Set<string>;\n onlyInB: Set<string>;\n}\n\nexport function graphDiff(a: BlockGraph, b: BlockGraph): GraphDiff {\n const onlyInA = new Set<string>();\n const onlyInB = new Set<string>();\n const different = new Set<string>();\n a.nodes.forEach((fromA) => {\n const fromB = b.nodes.get(fromA.id);\n if (fromB === undefined) onlyInA.add(fromA.id);\n else if (!setsEqual(fromA.upstream, fromB.upstream) || intersects(fromA.upstream, different))\n different.add(fromA.id);\n });\n\n b.nodes.forEach((fromB) => {\n if (!a.nodes.has(fromB.id)) onlyInB.add(fromB.id);\n else if (intersects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C,WAAW,MAAM,UAAU,UAAU,CAAE,WAAU,IAAI,MAAM,GAAG;GACvE;AAEF,QAAO;EAAE;EAAS;EAAS;EAAW"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
'use strict';
|
|
2
1
|
|
|
2
|
+
//#region src/model/project_model_v1.ts
|
|
3
3
|
/** Uses KV for uiState compared to V2 */
|
|
4
4
|
const SchemaVersionV1 = "1";
|
|
5
5
|
const BlockFrontendStateKeyPrefixV1 = "BlockFrontendState/";
|
|
6
6
|
|
|
7
|
+
//#endregion
|
|
7
8
|
exports.BlockFrontendStateKeyPrefixV1 = BlockFrontendStateKeyPrefixV1;
|
|
8
9
|
exports.SchemaVersionV1 = SchemaVersionV1;
|
|
9
|
-
//# sourceMappingURL=project_model_v1.cjs.map
|
|
10
|
+
//# sourceMappingURL=project_model_v1.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project_model_v1.cjs","sources":["../../src/model/project_model_v1.ts"],"sourcesContent":["/** Uses KV for uiState compared to V2 */\nexport const SchemaVersionV1 = \"1\";\n\nexport const BlockFrontendStateKeyPrefixV1 = \"BlockFrontendState/\";\nexport const BlockFrontendStateKeyPatternV1 = /^BlockFrontendState\\/(?<blockid>.*)$/;\n\nexport function blockFrontendStateKeyV1(blockId: string): string {\n return `${BlockFrontendStateKeyPrefixV1}${blockId}`;\n}\n\n/** Returns block id, or undefined if key does not match the pattern. */\nexport function parseBlockFrontendStateKeyV1(key: string): string | undefined {\n const match = key.match(BlockFrontendStateKeyPatternV1);\n if (match === null) return undefined;\n return match.groups![\"blockid\"];\n}\n"],"
|
|
1
|
+
{"version":3,"file":"project_model_v1.cjs","names":[],"sources":["../../src/model/project_model_v1.ts"],"sourcesContent":["/** Uses KV for uiState compared to V2 */\nexport const SchemaVersionV1 = \"1\";\n\nexport const BlockFrontendStateKeyPrefixV1 = \"BlockFrontendState/\";\nexport const BlockFrontendStateKeyPatternV1 = /^BlockFrontendState\\/(?<blockid>.*)$/;\n\nexport function blockFrontendStateKeyV1(blockId: string): string {\n return `${BlockFrontendStateKeyPrefixV1}${blockId}`;\n}\n\n/** Returns block id, or undefined if key does not match the pattern. */\nexport function parseBlockFrontendStateKeyV1(key: string): string | undefined {\n const match = key.match(BlockFrontendStateKeyPatternV1);\n if (match === null) return undefined;\n return match.groups![\"blockid\"];\n}\n"],"mappings":";;;AACA,MAAa,kBAAkB;AAE/B,MAAa,gCAAgC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
//#region src/model/project_model_v1.ts
|
|
1
2
|
/** Uses KV for uiState compared to V2 */
|
|
2
3
|
const SchemaVersionV1 = "1";
|
|
3
4
|
const BlockFrontendStateKeyPrefixV1 = "BlockFrontendState/";
|
|
4
5
|
|
|
6
|
+
//#endregion
|
|
5
7
|
export { BlockFrontendStateKeyPrefixV1, SchemaVersionV1 };
|
|
6
|
-
//# sourceMappingURL=project_model_v1.js.map
|
|
8
|
+
//# sourceMappingURL=project_model_v1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project_model_v1.js","sources":["../../src/model/project_model_v1.ts"],"sourcesContent":["/** Uses KV for uiState compared to V2 */\nexport const SchemaVersionV1 = \"1\";\n\nexport const BlockFrontendStateKeyPrefixV1 = \"BlockFrontendState/\";\nexport const BlockFrontendStateKeyPatternV1 = /^BlockFrontendState\\/(?<blockid>.*)$/;\n\nexport function blockFrontendStateKeyV1(blockId: string): string {\n return `${BlockFrontendStateKeyPrefixV1}${blockId}`;\n}\n\n/** Returns block id, or undefined if key does not match the pattern. */\nexport function parseBlockFrontendStateKeyV1(key: string): string | undefined {\n const match = key.match(BlockFrontendStateKeyPatternV1);\n if (match === null) return undefined;\n return match.groups![\"blockid\"];\n}\n"],"
|
|
1
|
+
{"version":3,"file":"project_model_v1.js","names":[],"sources":["../../src/model/project_model_v1.ts"],"sourcesContent":["/** Uses KV for uiState compared to V2 */\nexport const SchemaVersionV1 = \"1\";\n\nexport const BlockFrontendStateKeyPrefixV1 = \"BlockFrontendState/\";\nexport const BlockFrontendStateKeyPatternV1 = /^BlockFrontendState\\/(?<blockid>.*)$/;\n\nexport function blockFrontendStateKeyV1(blockId: string): string {\n return `${BlockFrontendStateKeyPrefixV1}${blockId}`;\n}\n\n/** Returns block id, or undefined if key does not match the pattern. */\nexport function parseBlockFrontendStateKeyV1(key: string): string | undefined {\n const match = key.match(BlockFrontendStateKeyPatternV1);\n if (match === null) return undefined;\n return match.groups![\"blockid\"];\n}\n"],"mappings":";;AACA,MAAa,kBAAkB;AAE/B,MAAa,gCAAgC"}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { CompiledTemplateV3, TemplateData } from "@milaboratories/pl-model-backend";
|
|
2
|
+
|
|
3
|
+
//#region src/model/template_spec.d.ts
|
|
4
|
+
interface TemplateFromRegistry {
|
|
5
|
+
readonly type: "from-registry";
|
|
6
|
+
registry: string;
|
|
7
|
+
path: string;
|
|
6
8
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
interface ExplicitTemplate {
|
|
10
|
+
readonly type: "explicit";
|
|
11
|
+
content: Uint8Array;
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
interface PreparedTemplate {
|
|
14
|
+
readonly type: "prepared";
|
|
15
|
+
data: TemplateData | CompiledTemplateV3;
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
interface TemplateFromFile {
|
|
18
|
+
readonly type: "from-file";
|
|
19
|
+
path: string;
|
|
18
20
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
type TemplateSpecPrepared = TemplateFromRegistry | ExplicitTemplate | PreparedTemplate;
|
|
22
|
+
type TemplateSpecAny = TemplateSpecPrepared | TemplateFromFile;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ExplicitTemplate, PreparedTemplate, TemplateFromFile, TemplateFromRegistry, TemplateSpecAny, TemplateSpecPrepared };
|
|
21
25
|
//# sourceMappingURL=template_spec.d.ts.map
|