refactor(imports): replace relative imports with path aliases (#2741)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-13 20:18:22 +02:00
1 parent a59b80ce11
commit 84dcf6b8a8
1834 files changed
+11601 -10725

No files matched your search

@@ -1,12 +1,19 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import type {
VoiceEngineV2CommandResult,
VoiceEngineV2Implementation,
} from '@fluxer/voice_engine_v2/src/implementations';
import type {VoiceEngineV2Command} from '@fluxer/voice_engine_v2/src/protocol';
import {createVoiceEngineV2MemoryEventLogSpillSink} from '@fluxer/voice_engine_v2/src/runtime/eventLogRing';
import {VoiceEngineV2Controller} from '@fluxer/voice_engine_v2/src/runtime/VoiceEngineV2Controller';
import {VoiceEngineV2Runtime} from '@fluxer/voice_engine_v2/src/runtime/VoiceEngineV2Runtime';
import {
FakeVoiceEngineV2Driver,
VoiceEngineV2TestImplementation,
waitForRuntime,
} from '@fluxer/voice_engine_v2/src/testing';
import {describe, expect, it} from 'vitest';
import type {VoiceEngineV2CommandResult, VoiceEngineV2Implementation} from '../implementations';
import type {VoiceEngineV2Command} from '../protocol';
import {FakeVoiceEngineV2Driver, VoiceEngineV2TestImplementation, waitForRuntime} from '../testing';
import {createVoiceEngineV2MemoryEventLogSpillSink} from './eventLogRing';
import {VoiceEngineV2Controller} from './VoiceEngineV2Controller';
import {VoiceEngineV2Runtime} from './VoiceEngineV2Runtime';
interface DeferredCommand {
command: VoiceEngineV2Command;
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import {selectVoiceEngineV2Model, type VoiceEngineV2Snapshot} from '../core';
import {selectVoiceEngineV2Model, type VoiceEngineV2Snapshot} from '@fluxer/voice_engine_v2/src/core';
import type {
VoiceEngineV2AudioControlsPatch,
VoiceEngineV2CameraEncodingOptions,
@@ -28,9 +28,12 @@ import type {
VoiceEngineV2TimerOptions,
VoiceEngineV2WatchedStream,
VoiceEngineV2WatchedStreamKey,
} from '../protocol';
import type {VoiceEngineV2Event} from '../protocol/events';
import type {VoiceEngineV2Runtime, VoiceEngineV2RuntimeListener} from './VoiceEngineV2Runtime';
} from '@fluxer/voice_engine_v2/src/protocol';
import type {VoiceEngineV2Event} from '@fluxer/voice_engine_v2/src/protocol/events';
import type {
VoiceEngineV2Runtime,
VoiceEngineV2RuntimeListener,
} from '@fluxer/voice_engine_v2/src/runtime/VoiceEngineV2Runtime';
export class VoiceEngineV2Controller {
constructor(private readonly runtime: VoiceEngineV2Runtime) {}
@@ -1,24 +1,24 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import {bench, describe} from 'vitest';
import basicSessionFixture from '../../fixtures/basic_session.json';
import {availableVoiceEngineV2Capabilities} from '../core/state';
import basicSessionFixture from '@fluxer/voice_engine_v2/fixtures/basic_session.json';
import {availableVoiceEngineV2Capabilities} from '@fluxer/voice_engine_v2/src/core/state';
import type {
VoiceEngineV2CommandResult,
VoiceEngineV2ExternalEventListener,
VoiceEngineV2Implementation,
} from '../implementations';
import type {VoiceEngineV2Command} from '../protocol/commands';
import type {VoiceEngineV2Event} from '../protocol/events';
} from '@fluxer/voice_engine_v2/src/implementations';
import type {VoiceEngineV2Command} from '@fluxer/voice_engine_v2/src/protocol/commands';
import type {VoiceEngineV2Event} from '@fluxer/voice_engine_v2/src/protocol/events';
import type {
VoiceEngineV2InboundVideoFrame,
VoiceEngineV2MicrophoneOptions,
VoiceEngineV2Participant,
VoiceEngineV2ScreenOptions,
VoiceEngineV2Stats,
} from '../protocol/types';
import {createVoiceEngineV2MemoryEventLogSpillSink} from './eventLogRing';
import {VoiceEngineV2Runtime} from './VoiceEngineV2Runtime';
} from '@fluxer/voice_engine_v2/src/protocol/types';
import {createVoiceEngineV2MemoryEventLogSpillSink} from '@fluxer/voice_engine_v2/src/runtime/eventLogRing';
import {VoiceEngineV2Runtime} from '@fluxer/voice_engine_v2/src/runtime/VoiceEngineV2Runtime';
import {bench, describe} from 'vitest';
interface VoiceEngineV2BenchFixture {
events: Array<VoiceEngineV2Event>;
@@ -1,11 +1,12 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import assert from 'node:assert/strict';
import {describe, expect, it} from 'vitest';
import type {VoiceEngineV2CommandResult, VoiceEngineV2Implementation} from '../implementations';
import type {VoiceEngineV2Command} from '../protocol/commands';
import {FakeVoiceEngineV2Driver, VoiceEngineV2TestImplementation, waitForRuntime} from '../testing';
import {createVoiceEngineV2MemoryEventLogSpillSink} from './eventLogRing';
import type {
VoiceEngineV2CommandResult,
VoiceEngineV2Implementation,
} from '@fluxer/voice_engine_v2/src/implementations';
import type {VoiceEngineV2Command} from '@fluxer/voice_engine_v2/src/protocol/commands';
import {createVoiceEngineV2MemoryEventLogSpillSink} from '@fluxer/voice_engine_v2/src/runtime/eventLogRing';
import {
assertEventLogInvariants,
isVoiceEngineV2ProgrammerError,
@@ -16,7 +17,13 @@ import {
VOICE_ENGINE_V2_RESOURCE_QUEUES_CAP,
VoiceEngineV2Runtime,
type VoiceEngineV2RuntimeDiagnostic,
} from './VoiceEngineV2Runtime';
} from '@fluxer/voice_engine_v2/src/runtime/VoiceEngineV2Runtime';
import {
FakeVoiceEngineV2Driver,
VoiceEngineV2TestImplementation,
waitForRuntime,
} from '@fluxer/voice_engine_v2/src/testing';
import {describe, expect, it} from 'vitest';
class DeferredAllResolveImplementation implements VoiceEngineV2Implementation {
readonly kind = 'js' as const;
@@ -1,42 +1,52 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import assert from 'node:assert/strict';
import {isVoiceEngineV2CommandCompletionStale, transitionVoiceEngineV2} from '../core/reducer';
import {isVoiceEngineV2CommandCompletionStale, transitionVoiceEngineV2} from '@fluxer/voice_engine_v2/src/core/reducer';
import {
availableVoiceEngineV2Capabilities,
createVoiceEngineV2InitialSnapshot,
type VoiceEngineV2Snapshot,
type VoiceEngineV2Transition,
} from '../core/state';
} from '@fluxer/voice_engine_v2/src/core/state';
import {
errorToVoiceEngineV2Error,
type VoiceEngineV2CommandResult,
type VoiceEngineV2Implementation,
} from '../implementations';
import {getVoiceEngineV2CommandResourceKey, type VoiceEngineV2Command} from '../protocol/commands';
import type {VoiceEngineV2Event} from '../protocol/events';
import type {VoiceEngineV2Capabilities, VoiceEngineV2Error, VoiceEngineV2ResourceKey} from '../protocol/types';
import {commandResultToEvent} from './commandEvents';
} from '@fluxer/voice_engine_v2/src/implementations';
import {
getVoiceEngineV2CommandResourceKey,
type VoiceEngineV2Command,
} from '@fluxer/voice_engine_v2/src/protocol/commands';
import type {VoiceEngineV2Event} from '@fluxer/voice_engine_v2/src/protocol/events';
import type {
VoiceEngineV2Capabilities,
VoiceEngineV2Error,
VoiceEngineV2ResourceKey,
} from '@fluxer/voice_engine_v2/src/protocol/types';
import {commandResultToEvent} from '@fluxer/voice_engine_v2/src/runtime/commandEvents';
import {
assertEventLogRingInvariants,
VOICE_ENGINE_V2_EVENT_LOG_CAP,
type VoiceEngineV2EventLogEntry,
VoiceEngineV2EventLogRing,
type VoiceEngineV2EventLogSpillSink,
} from './eventLogRing';
} from '@fluxer/voice_engine_v2/src/runtime/eventLogRing';
import {
canCoalesceVoiceEngineV2Events,
isVoiceEngineV2FrameReceivedEvent,
VOICE_ENGINE_V2_COALESCED_TRACKS_CAP,
} from './frameCoalescing';
} from '@fluxer/voice_engine_v2/src/runtime/frameCoalescing';
import {
createVoiceEngineV2SystemClockPort,
createVoiceEngineV2SystemRandomPort,
type VoiceEngineV2ClockPort,
type VoiceEngineV2RandomPort,
} from './platformPort';
} from '@fluxer/voice_engine_v2/src/runtime/platformPort';
export type {VoiceEngineV2EventLogEntry, VoiceEngineV2EventLogSpillSink} from './eventLogRing';
export type {
VoiceEngineV2EventLogEntry,
VoiceEngineV2EventLogSpillSink,
} from '@fluxer/voice_engine_v2/src/runtime/eventLogRing';
export const VOICE_ENGINE_V2_QUEUED_COMMANDS_CAP = 4096;
export const VOICE_ENGINE_V2_RESOURCE_QUEUES_CAP = 256;
@@ -566,4 +576,4 @@ export function assertEventLogInvariants(runtime: VoiceEngineV2Runtime): void {
runtime.verifyEventLogInvariants();
}
export {commandResultToEvent} from './commandEvents';
export {commandResultToEvent} from '@fluxer/voice_engine_v2/src/runtime/commandEvents';
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import type {VoiceEngineV2CommandResult} from '../implementations';
import type {VoiceEngineV2Command} from '../protocol/commands';
import type {VoiceEngineV2Event} from '../protocol/events';
import type {VoiceEngineV2Error} from '../protocol/types';
import type {VoiceEngineV2CommandResult} from '@fluxer/voice_engine_v2/src/implementations';
import type {VoiceEngineV2Command} from '@fluxer/voice_engine_v2/src/protocol/commands';
import type {VoiceEngineV2Event} from '@fluxer/voice_engine_v2/src/protocol/events';
import type {VoiceEngineV2Error} from '@fluxer/voice_engine_v2/src/protocol/types';
type VoiceEngineV2CommandOfType<Type extends VoiceEngineV2Command['type']> = Extract<
VoiceEngineV2Command,
@@ -1,16 +1,14 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import assert from 'node:assert/strict';
import {describe, expect, it} from 'vitest';
import {transitionVoiceEngineV2} from '../core/reducer';
import {transitionVoiceEngineV2} from '@fluxer/voice_engine_v2/src/core/reducer';
import {
availableVoiceEngineV2Capabilities,
createVoiceEngineV2InitialSnapshot,
type VoiceEngineV2Snapshot,
} from '../core/state';
import type {VoiceEngineV2Event} from '../protocol/events';
import type {VoiceEngineV2InboundVideoFrame} from '../protocol/types';
import {FakeVoiceEngineV2Driver, VoiceEngineV2TestImplementation} from '../testing';
} from '@fluxer/voice_engine_v2/src/core/state';
import type {VoiceEngineV2Event} from '@fluxer/voice_engine_v2/src/protocol/events';
import type {VoiceEngineV2InboundVideoFrame} from '@fluxer/voice_engine_v2/src/protocol/types';
import {
assertEventLogRingInvariants,
createVoiceEngineV2MemoryEventLogSpillSink,
@@ -18,12 +16,14 @@ import {
type VoiceEngineV2EventLogEntry,
VoiceEngineV2EventLogRing,
type VoiceEngineV2EventLogSpillSink,
} from './eventLogRing';
} from '@fluxer/voice_engine_v2/src/runtime/eventLogRing';
import {
assertEventLogInvariants,
type VoiceEngineV2EventLogEntry as RuntimeEventLogEntry,
VoiceEngineV2Runtime,
} from './VoiceEngineV2Runtime';
} from '@fluxer/voice_engine_v2/src/runtime/VoiceEngineV2Runtime';
import {FakeVoiceEngineV2Driver, VoiceEngineV2TestImplementation} from '@fluxer/voice_engine_v2/src/testing';
import {describe, expect, it} from 'vitest';
function makeInboundVideoFrameEvent(timestampUs: number): VoiceEngineV2Event {
const frame: VoiceEngineV2InboundVideoFrame = {
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import assert from 'node:assert/strict';
import type {VoiceEngineV2Command} from '../protocol/commands';
import type {VoiceEngineV2Event} from '../protocol/events';
import type {VoiceEngineV2Command} from '@fluxer/voice_engine_v2/src/protocol/commands';
import type {VoiceEngineV2Event} from '@fluxer/voice_engine_v2/src/protocol/events';
export const VOICE_ENGINE_V2_EVENT_LOG_CAP = 4096;
@@ -1,11 +1,14 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import type {VoiceEngineV2Event} from '@fluxer/voice_engine_v2/src/protocol/events';
import {createVoiceEngineV2MemoryEventLogSpillSink} from '@fluxer/voice_engine_v2/src/runtime/eventLogRing';
import {
coalesceVoiceEngineV2EventSequence,
VOICE_ENGINE_V2_COALESCED_TRACKS_CAP,
} from '@fluxer/voice_engine_v2/src/runtime/frameCoalescing';
import {VoiceEngineV2Runtime} from '@fluxer/voice_engine_v2/src/runtime/VoiceEngineV2Runtime';
import {FakeVoiceEngineV2Driver, VoiceEngineV2TestImplementation} from '@fluxer/voice_engine_v2/src/testing';
import {describe, expect, it} from 'vitest';
import type {VoiceEngineV2Event} from '../protocol/events';
import {FakeVoiceEngineV2Driver, VoiceEngineV2TestImplementation} from '../testing';
import {createVoiceEngineV2MemoryEventLogSpillSink} from './eventLogRing';
import {coalesceVoiceEngineV2EventSequence, VOICE_ENGINE_V2_COALESCED_TRACKS_CAP} from './frameCoalescing';
import {VoiceEngineV2Runtime} from './VoiceEngineV2Runtime';
function makeRuntime(options?: {eventLogCap?: number}): VoiceEngineV2Runtime {
const driver = new FakeVoiceEngineV2Driver();
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import assert from 'node:assert/strict';
import type {VoiceEngineV2Event} from '../protocol/events';
import type {VoiceEngineV2Event} from '@fluxer/voice_engine_v2/src/protocol/events';
export const VOICE_ENGINE_V2_COALESCED_TRACKS_CAP = 64;
@@ -1,20 +1,20 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
export type {VoiceEngineV2MemoryEventLogSpillSink} from './eventLogRing';
export type {VoiceEngineV2MemoryEventLogSpillSink} from '@fluxer/voice_engine_v2/src/runtime/eventLogRing';
export {
assertEventLogRingInvariants,
createVoiceEngineV2MemoryEventLogSpillSink,
VOICE_ENGINE_V2_EVENT_LOG_CAP,
VOICE_ENGINE_V2_MEMORY_EVENT_LOG_SPILL_SINK_CAP,
VoiceEngineV2EventLogRing,
} from './eventLogRing';
export type {VoiceEngineV2FrameReceivedEvent} from './frameCoalescing';
} from '@fluxer/voice_engine_v2/src/runtime/eventLogRing';
export type {VoiceEngineV2FrameReceivedEvent} from '@fluxer/voice_engine_v2/src/runtime/frameCoalescing';
export {
canCoalesceVoiceEngineV2Events,
coalesceVoiceEngineV2EventSequence,
isVoiceEngineV2FrameReceivedEvent,
VOICE_ENGINE_V2_COALESCED_TRACKS_CAP,
} from './frameCoalescing';
} from '@fluxer/voice_engine_v2/src/runtime/frameCoalescing';
export type {
VoiceEngineV2ClockPort,
VoiceEngineV2EntropySource,
@@ -23,7 +23,7 @@ export type {
VoiceEngineV2SystemClockPort,
VoiceEngineV2SystemRandomPort,
VoiceEngineV2WallClockSource,
} from './platformPort';
} from '@fluxer/voice_engine_v2/src/runtime/platformPort';
export {
createVoiceEngineV2DeterministicClockPort,
createVoiceEngineV2DeterministicPlatformPort,
@@ -31,8 +31,8 @@ export {
createVoiceEngineV2SystemClockPort,
createVoiceEngineV2SystemPlatformPort,
createVoiceEngineV2SystemRandomPort,
} from './platformPort';
export {VoiceEngineV2Controller} from './VoiceEngineV2Controller';
} from '@fluxer/voice_engine_v2/src/runtime/platformPort';
export {VoiceEngineV2Controller} from '@fluxer/voice_engine_v2/src/runtime/VoiceEngineV2Controller';
export type {
VoiceEngineV2EventLogEntry,
VoiceEngineV2EventLogSpillSink,
@@ -43,7 +43,7 @@ export type {
VoiceEngineV2RuntimeListenerPayload,
VoiceEngineV2RuntimeOptions,
VoiceEngineV2RuntimeQueueKind,
} from './VoiceEngineV2Runtime';
} from '@fluxer/voice_engine_v2/src/runtime/VoiceEngineV2Runtime';
export {
assertEventLogInvariants,
commandResultToEvent,
@@ -54,4 +54,4 @@ export {
VOICE_ENGINE_V2_QUEUED_COMMANDS_CAP,
VOICE_ENGINE_V2_RESOURCE_QUEUES_CAP,
VoiceEngineV2Runtime,
} from './VoiceEngineV2Runtime';
} from '@fluxer/voice_engine_v2/src/runtime/VoiceEngineV2Runtime';
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import {afterEach, describe, expect, it, vi} from 'vitest';
import {
createVoiceEngineV2SeededRandomPort,
createVoiceEngineV2SystemClockPort,
createVoiceEngineV2SystemRandomPort,
} from './platformPort';
} from '@fluxer/voice_engine_v2/src/runtime/platformPort';
import {afterEach, describe, expect, it, vi} from 'vitest';
afterEach(() => {
vi.restoreAllMocks();
@@ -1,12 +1,16 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import {bench, describe} from 'vitest';
import {
availableVoiceEngineV2Capabilities,
createVoiceEngineV2InitialSnapshot,
type VoiceEngineV2Snapshot,
} from '../core/state';
import type {VoiceEngineV2Participant, VoiceEngineV2Track, VoiceEngineV2TrackSource} from '../protocol/types';
} from '@fluxer/voice_engine_v2/src/core/state';
import type {
VoiceEngineV2Participant,
VoiceEngineV2Track,
VoiceEngineV2TrackSource,
} from '@fluxer/voice_engine_v2/src/protocol/types';
import {bench, describe} from 'vitest';
const PARTICIPANT_COUNT = 8;
const TRACKS_PER_PARTICIPANT = 4;