All files / apps/developer-portal/layers/snapshot/app/utils metricsArtifact.ts

66.66% Statements 2/3
100% Branches 1/1
0% Functions 0/1
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12    32x               32x  
import type { MetricsArtifact } from "#layers/snapshot/shared/types/MetricsArtifact.ts";
 
const [artifact = null] = Object.values(
    import.meta.glob<MetricsArtifact>("~~/.report/metrics.json", {
        eager: true,
        import: "default",
    }),
);
 
/** The collected metrics artifact, bundled at build time; null when `.report/` has none. */
export const metricsArtifact = (): MetricsArtifact | null => artifact;