(queries: QueryBuilder, context: ResolutionContext, change?: FlowChange)
| 718 | * touch, and from what changed where the language's record allows. |
| 719 | */ |
| 720 | export async function planParameterFlows(queries: QueryBuilder, context: ResolutionContext, change?: FlowChange): Promise<ParameterFlowPlan[]> { |
| 721 | const flows = queries.parameterFlows; |
| 722 | const plans: ParameterFlowPlan[] = []; |
| 723 | for (const language of LANGUAGES) { |
| 724 | const changed = change?.languages.get(language.language); |
| 725 | if (change?.settled && !changed && flows.getRecord(language.language)) continue; |
| 726 | const files = flows.getFilePathsByLanguage(language.language); |
| 727 | if (files.length === 0) continue; |
| 728 | const sync = changed?.record ? { ...changed, record: changed.record } : undefined; |
| 729 | const plan = (sync ? await planFlows(language, flows, context, files, sync) : null) ?? await planFlows(language, flows, context, files); |
| 730 | if (plan) plans.push(plan); |
| 731 | } |
| 732 | return plans; |
| 733 | } |
no test coverage detected