All files signals-state.ts

100% Statements 12/12
100% Branches 0/0
100% Functions 5/5
100% Lines 12/12

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 13 14 15 16 17 18 19 20 21 22 23 24 25 26                2x 2x 2x 2x     17x 14x 9x 2x     24x 24x 24x 24x    
// SPDX-FileCopyrightText: 2025-2026 Anaconda, Inc
// SPDX-License-Identifier: Apache-2.0
 
// src/signals-state.ts
import type { AnacondaLogging } from './logging.js';
import type { AnacondaMetrics } from './metrics.js';
import type { AnacondaTrace } from './traces.js';
 
export let __initialized = false;
export let __metrics: AnacondaMetrics | undefined = undefined;
export let __tracing: AnacondaTrace | undefined = undefined;
export let __logging: AnacondaLogging | undefined = undefined;
 
// setters so other modules can update state (imports are read-only)
export function __setInitialized(v: boolean) { __initialized = v; }
export function __setMetrics(v: AnacondaMetrics | undefined) { __metrics = v; }
export function __setTracing(v: AnacondaTrace | undefined) { __tracing = v; }
export function __setLogging(v: AnacondaLogging | undefined) { __logging = v; }
 
export function __resetSignals(): void {
  __initialized = false;
  __metrics = undefined;
  __tracing = undefined;
  __logging = undefined;
}