mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 20:32:20 +03:00
OmniRoute v3.8.29 — 115 commits since v3.8.28. Full CHANGELOG + 41 i18n mirrors. All content quality gates green (build, unit 8/8, vitest 188/188, PR test policy, quality gates extended, docs sync, quality ratchet). Remaining red CI checks are pre-existing release flakes (coverage-shard/integration/node-compat teardown), a new transitive undici advisory in electron devDeps, and a workflow-level CodeQL fail (0 open alerts). VPS-validated by the operator.
25 lines
948 B
TypeScript
25 lines
948 B
TypeScript
/**
|
|
* Shared combo data-normalization helpers extracted from combo.ts.
|
|
*
|
|
* Tiny side-effect-free guards/normalizers that several combo submodules depend
|
|
* on (shadow routing, combo structure resolution) plus combo.ts itself. Moving
|
|
* them to this leaf module out of the combo.ts god-file (Quality Gate v2 /
|
|
* Fase 9) lets the submodules import them without reaching back into the barrel
|
|
* (no cycles). Logic unchanged; combo.ts imports them back for compatibility.
|
|
*/
|
|
|
|
import type { ResolvedComboTarget } from "./types.ts";
|
|
|
|
export function isRecord(value: unknown): value is Record<string, unknown> {
|
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
}
|
|
|
|
export function dedupeTargetsByExecutionKey(targets: ResolvedComboTarget[]) {
|
|
const seen = new Set<string>();
|
|
return targets.filter((target) => {
|
|
if (seen.has(target.executionKey)) return false;
|
|
seen.add(target.executionKey);
|
|
return true;
|
|
});
|
|
}
|