feat: Implement basic general folder support (#2051)

- Related: #1748
This commit is contained in:
Dermot Duffy
2025-05-21 19:59:21 -07:00
committed by GitHub
parent 2eb0d9e35e
commit c6a4c8aea2
350 changed files with 12837 additions and 4509 deletions
+21 -9
View File
@@ -1,17 +1,29 @@
import { add, sub } from 'date-fns';
import sortBy from 'lodash-es/sortBy';
import { sortBy } from 'lodash-es';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import {
MemoryRequestCache,
RecordingSegmentsCache,
} from '../../src/camera-manager/cache.js';
import { RecordingSegmentsCache } from '../../src/camera-manager/cache.js';
import { DateRange } from '../../src/camera-manager/range.js';
import { RecordingSegment } from '../../src/camera-manager/types.js';
import {
CameraManagerRequestCache,
CameraQuery,
Engine,
EventQuery,
QueryResultsType,
QueryReturnType,
QueryType,
RecordingSegment,
} from '../../src/camera-manager/types.js';
describe('MemoryRequestCache', () => {
const cache = new MemoryRequestCache();
const request = { request: 'foo' };
const response = { response: 'bar' };
const cache = new CameraManagerRequestCache();
const request: CameraQuery = {
type: QueryType.Event,
cameraIDs: new Set(['camera-1']),
};
const response: QueryReturnType<EventQuery> = {
type: QueryResultsType.Event,
engine: Engine.Generic,
};
beforeEach(() => {
cache.clear();