Initial open-source release

This commit is contained in:
Andrey Avtomonov 2026-05-10 23:12:26 +02:00
commit 1a42152e6f
1199 changed files with 257054 additions and 0 deletions

View file

@ -0,0 +1,31 @@
import { rm } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { afterEach, describe, expect, it } from 'vitest';
import { findLatestDemoScanReport, runDemoScan } from './demo-scan.js';
describe('demo scan helpers', () => {
const projectDir = join(tmpdir(), `klo-demo-scan-${process.pid}`);
afterEach(async () => {
await rm(projectDir, { recursive: true, force: true });
});
it('runs the packaged SQLite demo scan and finds the latest scan report', async () => {
const { result } = await runDemoScan({
projectDir,
jobId: 'demo-scan-test',
now: () => new Date('2026-05-06T10:00:00.000Z'),
});
expect(result.report).toMatchObject({
connectionId: 'orbit_demo',
driver: 'sqlite',
runId: 'demo-scan-test',
mode: 'structural',
dryRun: false,
});
expect(result.report.artifactPaths.reportPath).toContain('raw-sources/orbit_demo/live-database/');
await expect(findLatestDemoScanReport(projectDir)).resolves.toMatchObject({ runId: 'demo-scan-test' });
});
});