observability-toolkit 1.8.0 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -3
- package/dist/backends/index.d.ts +119 -0
- package/dist/backends/index.d.ts.map +1 -1
- package/dist/backends/index.js +57 -0
- package/dist/backends/index.js.map +1 -1
- package/dist/backends/index.test.d.ts +5 -0
- package/dist/backends/index.test.d.ts.map +1 -0
- package/dist/backends/index.test.js +156 -0
- package/dist/backends/index.test.js.map +1 -0
- package/dist/backends/local-jsonl-boolean-search.test.js +8 -27
- package/dist/backends/local-jsonl-boolean-search.test.js.map +1 -1
- package/dist/backends/local-jsonl-logs.test.d.ts +2 -0
- package/dist/backends/local-jsonl-logs.test.d.ts.map +1 -0
- package/dist/backends/local-jsonl-logs.test.js +603 -0
- package/dist/backends/local-jsonl-logs.test.js.map +1 -0
- package/dist/backends/local-jsonl-traces.test.d.ts +2 -0
- package/dist/backends/local-jsonl-traces.test.d.ts.map +1 -0
- package/dist/backends/local-jsonl-traces.test.js +1723 -0
- package/dist/backends/local-jsonl-traces.test.js.map +1 -0
- package/dist/backends/local-jsonl.d.ts +4 -1
- package/dist/backends/local-jsonl.d.ts.map +1 -1
- package/dist/backends/local-jsonl.js +185 -1
- package/dist/backends/local-jsonl.js.map +1 -1
- package/dist/backends/local-jsonl.test.js +723 -46
- package/dist/backends/local-jsonl.test.js.map +1 -1
- package/dist/backends/signoz-api.d.ts +32 -0
- package/dist/backends/signoz-api.d.ts.map +1 -1
- package/dist/backends/signoz-api.js +231 -33
- package/dist/backends/signoz-api.js.map +1 -1
- package/dist/backends/signoz-api.test.js +410 -63
- package/dist/backends/signoz-api.test.js.map +1 -1
- package/dist/lib/constants.d.ts +59 -0
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +252 -6
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/constants.test.js +357 -21
- package/dist/lib/constants.test.js.map +1 -1
- package/dist/lib/edge-cases.test.d.ts +11 -0
- package/dist/lib/edge-cases.test.d.ts.map +1 -0
- package/dist/lib/edge-cases.test.js +634 -0
- package/dist/lib/edge-cases.test.js.map +1 -0
- package/dist/lib/error-sanitizer.d.ts +57 -0
- package/dist/lib/error-sanitizer.d.ts.map +1 -0
- package/dist/lib/error-sanitizer.js +207 -0
- package/dist/lib/error-sanitizer.js.map +1 -0
- package/dist/lib/error-sanitizer.test.d.ts +8 -0
- package/dist/lib/error-sanitizer.test.d.ts.map +1 -0
- package/dist/lib/error-sanitizer.test.js +369 -0
- package/dist/lib/error-sanitizer.test.js.map +1 -0
- package/dist/lib/file-utils.d.ts +134 -0
- package/dist/lib/file-utils.d.ts.map +1 -1
- package/dist/lib/file-utils.js +395 -9
- package/dist/lib/file-utils.js.map +1 -1
- package/dist/lib/file-utils.test.js +444 -3
- package/dist/lib/file-utils.test.js.map +1 -1
- package/dist/lib/indexer.d.ts +9 -1
- package/dist/lib/indexer.d.ts.map +1 -1
- package/dist/lib/indexer.js +51 -2
- package/dist/lib/indexer.js.map +1 -1
- package/dist/lib/indexer.test.js +138 -20
- package/dist/lib/indexer.test.js.map +1 -1
- package/dist/lib/input-validator.d.ts +103 -0
- package/dist/lib/input-validator.d.ts.map +1 -0
- package/dist/lib/input-validator.js +250 -0
- package/dist/lib/input-validator.js.map +1 -0
- package/dist/lib/input-validator.test.d.ts +2 -0
- package/dist/lib/input-validator.test.d.ts.map +1 -0
- package/dist/lib/input-validator.test.js +287 -0
- package/dist/lib/input-validator.test.js.map +1 -0
- package/dist/lib/query-sanitizer.d.ts +143 -0
- package/dist/lib/query-sanitizer.d.ts.map +1 -0
- package/dist/lib/query-sanitizer.js +261 -0
- package/dist/lib/query-sanitizer.js.map +1 -0
- package/dist/lib/query-sanitizer.test.d.ts +5 -0
- package/dist/lib/query-sanitizer.test.d.ts.map +1 -0
- package/dist/lib/query-sanitizer.test.js +400 -0
- package/dist/lib/query-sanitizer.test.js.map +1 -0
- package/dist/lib/server-utils.d.ts +80 -0
- package/dist/lib/server-utils.d.ts.map +1 -0
- package/dist/lib/server-utils.js +141 -0
- package/dist/lib/server-utils.js.map +1 -0
- package/dist/lib/shared-schemas.d.ts +59 -0
- package/dist/lib/shared-schemas.d.ts.map +1 -0
- package/dist/lib/shared-schemas.js +58 -0
- package/dist/lib/shared-schemas.js.map +1 -0
- package/dist/lib/shared-schemas.test.d.ts +5 -0
- package/dist/lib/shared-schemas.test.d.ts.map +1 -0
- package/dist/lib/shared-schemas.test.js +106 -0
- package/dist/lib/shared-schemas.test.js.map +1 -0
- package/dist/lib/toon-encoder.d.ts +21 -0
- package/dist/lib/toon-encoder.d.ts.map +1 -0
- package/dist/lib/toon-encoder.js +46 -0
- package/dist/lib/toon-encoder.js.map +1 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +155 -81
- package/dist/server.js.map +1 -1
- package/dist/server.test.js +363 -0
- package/dist/server.test.js.map +1 -1
- package/dist/test-helpers/env-utils.d.ts +65 -0
- package/dist/test-helpers/env-utils.d.ts.map +1 -0
- package/dist/test-helpers/env-utils.js +94 -0
- package/dist/test-helpers/env-utils.js.map +1 -0
- package/dist/test-helpers/file-utils.d.ts +93 -0
- package/dist/test-helpers/file-utils.d.ts.map +1 -0
- package/dist/test-helpers/file-utils.js +206 -0
- package/dist/test-helpers/file-utils.js.map +1 -0
- package/dist/test-helpers/index.d.ts +10 -0
- package/dist/test-helpers/index.d.ts.map +1 -0
- package/dist/test-helpers/index.js +28 -0
- package/dist/test-helpers/index.js.map +1 -0
- package/dist/test-helpers/mock-backends.d.ts +139 -0
- package/dist/test-helpers/mock-backends.d.ts.map +1 -0
- package/dist/test-helpers/mock-backends.js +227 -0
- package/dist/test-helpers/mock-backends.js.map +1 -0
- package/dist/test-helpers/mock-backends.test.d.ts +5 -0
- package/dist/test-helpers/mock-backends.test.d.ts.map +1 -0
- package/dist/test-helpers/mock-backends.test.js +368 -0
- package/dist/test-helpers/mock-backends.test.js.map +1 -0
- package/dist/test-helpers/schema-validators.d.ts +32 -0
- package/dist/test-helpers/schema-validators.d.ts.map +1 -0
- package/dist/test-helpers/schema-validators.js +125 -0
- package/dist/test-helpers/schema-validators.js.map +1 -0
- package/dist/test-helpers/test-data-builders.d.ts +223 -0
- package/dist/test-helpers/test-data-builders.d.ts.map +1 -0
- package/dist/test-helpers/test-data-builders.js +288 -0
- package/dist/test-helpers/test-data-builders.js.map +1 -0
- package/dist/test-helpers/test-data-builders.test.d.ts +2 -0
- package/dist/test-helpers/test-data-builders.test.d.ts.map +1 -0
- package/dist/test-helpers/test-data-builders.test.js +306 -0
- package/dist/test-helpers/test-data-builders.test.js.map +1 -0
- package/dist/test-helpers/tool-validators.d.ts +28 -0
- package/dist/test-helpers/tool-validators.d.ts.map +1 -0
- package/dist/test-helpers/tool-validators.js +56 -0
- package/dist/test-helpers/tool-validators.js.map +1 -0
- package/dist/tools/context-stats.d.ts +1 -0
- package/dist/tools/context-stats.d.ts.map +1 -1
- package/dist/tools/context-stats.js +9 -5
- package/dist/tools/context-stats.js.map +1 -1
- package/dist/tools/context-stats.test.js +24 -10
- package/dist/tools/context-stats.test.js.map +1 -1
- package/dist/tools/get-trace-url.js +2 -2
- package/dist/tools/get-trace-url.js.map +1 -1
- package/dist/tools/health-check.js +2 -2
- package/dist/tools/health-check.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/query-evaluations.d.ts +186 -0
- package/dist/tools/query-evaluations.d.ts.map +1 -0
- package/dist/tools/query-evaluations.js +351 -0
- package/dist/tools/query-evaluations.js.map +1 -0
- package/dist/tools/query-evaluations.test.d.ts +5 -0
- package/dist/tools/query-evaluations.test.d.ts.map +1 -0
- package/dist/tools/query-evaluations.test.js +733 -0
- package/dist/tools/query-evaluations.test.js.map +1 -0
- package/dist/tools/query-llm-events.d.ts +24 -18
- package/dist/tools/query-llm-events.d.ts.map +1 -1
- package/dist/tools/query-llm-events.js +103 -60
- package/dist/tools/query-llm-events.js.map +1 -1
- package/dist/tools/query-llm-events.test.js +271 -9
- package/dist/tools/query-llm-events.test.js.map +1 -1
- package/dist/tools/query-logs.d.ts +28 -20
- package/dist/tools/query-logs.d.ts.map +1 -1
- package/dist/tools/query-logs.js +85 -61
- package/dist/tools/query-logs.js.map +1 -1
- package/dist/tools/query-logs.test.js +74 -145
- package/dist/tools/query-logs.test.js.map +1 -1
- package/dist/tools/query-metrics.d.ts +20 -20
- package/dist/tools/query-metrics.d.ts.map +1 -1
- package/dist/tools/query-metrics.js +109 -61
- package/dist/tools/query-metrics.js.map +1 -1
- package/dist/tools/query-metrics.test.js +26 -61
- package/dist/tools/query-metrics.test.js.map +1 -1
- package/dist/tools/query-traces.d.ts +24 -22
- package/dist/tools/query-traces.d.ts.map +1 -1
- package/dist/tools/query-traces.js +95 -70
- package/dist/tools/query-traces.js.map +1 -1
- package/dist/tools/query-traces.test.js +294 -90
- package/dist/tools/query-traces.test.js.map +1 -1
- package/dist/tools/setup-claudeignore.js +7 -7
- package/dist/tools/setup-claudeignore.js.map +1 -1
- package/dist/tools/setup-claudeignore.test.js +4 -25
- package/dist/tools/setup-claudeignore.test.js.map +1 -1
- package/package.json +3 -4
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared test utilities for environment variable management
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* SigNoz environment variable names
|
|
6
|
+
*/
|
|
7
|
+
export const SIGNOZ_ENV_VARS = ['SIGNOZ_URL', 'SIGNOZ_API_KEY'];
|
|
8
|
+
/**
|
|
9
|
+
* Capture current SigNoz environment variables
|
|
10
|
+
* @returns Snapshot of current env values
|
|
11
|
+
*/
|
|
12
|
+
export function captureEnv() {
|
|
13
|
+
return {
|
|
14
|
+
SIGNOZ_URL: process.env.SIGNOZ_URL,
|
|
15
|
+
SIGNOZ_API_KEY: process.env.SIGNOZ_API_KEY,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Restore environment variables from snapshot
|
|
20
|
+
* @param snapshot - Previously captured env snapshot
|
|
21
|
+
*/
|
|
22
|
+
export function restoreEnv(snapshot) {
|
|
23
|
+
if (snapshot.SIGNOZ_URL !== undefined) {
|
|
24
|
+
process.env.SIGNOZ_URL = snapshot.SIGNOZ_URL;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
delete process.env.SIGNOZ_URL;
|
|
28
|
+
}
|
|
29
|
+
if (snapshot.SIGNOZ_API_KEY !== undefined) {
|
|
30
|
+
process.env.SIGNOZ_API_KEY = snapshot.SIGNOZ_API_KEY;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
delete process.env.SIGNOZ_API_KEY;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Clear SigNoz environment variables (for auto backend tests)
|
|
38
|
+
* Uses delete to fully remove variables (not empty strings) to match undefined behavior
|
|
39
|
+
*/
|
|
40
|
+
export function clearSigNozEnv() {
|
|
41
|
+
delete process.env.SIGNOZ_URL;
|
|
42
|
+
delete process.env.SIGNOZ_API_KEY;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Set SigNoz environment variables for testing
|
|
46
|
+
* @param url - SigNoz URL
|
|
47
|
+
* @param apiKey - SigNoz API key
|
|
48
|
+
*/
|
|
49
|
+
export function setSigNozEnv(url, apiKey) {
|
|
50
|
+
process.env.SIGNOZ_URL = url;
|
|
51
|
+
process.env.SIGNOZ_API_KEY = apiKey;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Create a scoped environment helper for use with beforeEach/afterEach
|
|
55
|
+
* @returns Object with setup and teardown methods
|
|
56
|
+
*/
|
|
57
|
+
export function createEnvScope() {
|
|
58
|
+
const originalEnv = captureEnv();
|
|
59
|
+
return {
|
|
60
|
+
originalEnv,
|
|
61
|
+
clearEnv: clearSigNozEnv,
|
|
62
|
+
restoreEnv: () => restoreEnv(originalEnv),
|
|
63
|
+
setEnv: setSigNozEnv,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Capture and set a new HOME environment variable
|
|
68
|
+
* @param testHome - Path to use as HOME for tests
|
|
69
|
+
* @returns Scope object with restore method
|
|
70
|
+
*/
|
|
71
|
+
export function setHomeEnv(testHome) {
|
|
72
|
+
const originalHome = process.env.HOME;
|
|
73
|
+
process.env.HOME = testHome;
|
|
74
|
+
return {
|
|
75
|
+
originalHome,
|
|
76
|
+
testHome,
|
|
77
|
+
restore: () => {
|
|
78
|
+
if (originalHome !== undefined) {
|
|
79
|
+
process.env.HOME = originalHome;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
delete process.env.HOME;
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Restore HOME environment variable from scope
|
|
89
|
+
* @param scope - Previously created home env scope
|
|
90
|
+
*/
|
|
91
|
+
export function restoreHomeEnv(scope) {
|
|
92
|
+
scope.restore();
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=env-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-utils.js","sourceRoot":"","sources":["../../src/test-helpers/env-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,YAAY,EAAE,gBAAgB,CAAU,CAAC;AAUzE;;;GAGG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO;QACL,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU;QAClC,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc;KAC3C,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,QAAqB;IAC9C,IAAI,QAAQ,CAAC,UAA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AC;gBAC/B,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,YAAY,CAAC;YAClC,CAAC;iBAAM,CAAC;gBACN,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;YAC1B,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAmB;IAChD,KAAK,CAAC,OAAO,EAAE,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared test utilities for file operations
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Create a temporary directory for test fixtures
|
|
6
|
+
* @param prefix - Optional prefix for the temp directory name
|
|
7
|
+
* @returns Absolute path to the created temp directory
|
|
8
|
+
*/
|
|
9
|
+
export declare function createTempDir(prefix?: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Remove a temporary directory and all its contents
|
|
12
|
+
* @param dir - Path to the directory to remove
|
|
13
|
+
*/
|
|
14
|
+
export declare function removeTempDir(dir: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Get the count of cleanup failures (for test diagnostics)
|
|
17
|
+
*/
|
|
18
|
+
export declare function getCleanupFailureCount(): number;
|
|
19
|
+
/**
|
|
20
|
+
* Reset cleanup failure counter (call in test setup)
|
|
21
|
+
*/
|
|
22
|
+
export declare function resetCleanupFailureCount(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Assert no cleanup failures occurred (call in afterEach to detect test pollution)
|
|
25
|
+
* @throws Error if cleanup failures occurred
|
|
26
|
+
*/
|
|
27
|
+
export declare function assertNoCleanupFailures(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Write an array of objects to a JSONL file
|
|
30
|
+
* @param filePath - Path to the JSONL file
|
|
31
|
+
* @param data - Array of objects to write
|
|
32
|
+
*/
|
|
33
|
+
export declare function writeJsonlFile(filePath: string, data: unknown[]): void;
|
|
34
|
+
/**
|
|
35
|
+
* Async version of writeJsonlFile for parallel test execution
|
|
36
|
+
* @param filePath - Path to the JSONL file
|
|
37
|
+
* @param data - Array of objects to write
|
|
38
|
+
*/
|
|
39
|
+
export declare function writeJsonlFileAsync(filePath: string, data: unknown[]): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Get today's date in YYYY-MM-DD format
|
|
42
|
+
* @returns Today's date string
|
|
43
|
+
*/
|
|
44
|
+
export declare function getTestDate(): string;
|
|
45
|
+
/**
|
|
46
|
+
* Get or create a shared temp directory for a test suite
|
|
47
|
+
* Use this for read-only tests that can share fixtures
|
|
48
|
+
* @param suiteId - Unique identifier for the test suite
|
|
49
|
+
* @param prefix - Optional prefix for the temp directory name
|
|
50
|
+
* @returns Absolute path to the shared temp directory
|
|
51
|
+
*/
|
|
52
|
+
export declare function getSharedTempDir(suiteId: string, prefix?: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Clear contents of a shared temp directory without deleting it
|
|
55
|
+
* Use in beforeEach when tests need clean state but can reuse directory
|
|
56
|
+
* @param dir - Path to the directory to clear
|
|
57
|
+
*/
|
|
58
|
+
export declare function clearTempDir(dir: string): void;
|
|
59
|
+
/**
|
|
60
|
+
* Async version of clearTempDir for parallel test execution
|
|
61
|
+
* @param dir - Path to the directory to clear
|
|
62
|
+
*/
|
|
63
|
+
export declare function clearTempDirAsync(dir: string): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Remove a shared temp directory by suite ID
|
|
66
|
+
* Call in after() hook to clean up suite-level fixtures
|
|
67
|
+
* @param suiteId - Unique identifier for the test suite
|
|
68
|
+
*/
|
|
69
|
+
export declare function removeSharedTempDir(suiteId: string): void;
|
|
70
|
+
/**
|
|
71
|
+
* Clean up all shared temp directories
|
|
72
|
+
* Useful for global test teardown
|
|
73
|
+
*/
|
|
74
|
+
export declare function cleanupAllSharedTempDirs(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Create or get a cached test fixture with pre-built indexes
|
|
77
|
+
* Use this when multiple tests need the same indexed data
|
|
78
|
+
* @param fixtureId - Unique identifier for the fixture
|
|
79
|
+
* @param setup - Function to create test data files, receives temp dir path
|
|
80
|
+
* @param buildIndexes - Function to build indexes, receives temp dir path
|
|
81
|
+
* @returns Path to the fixture directory
|
|
82
|
+
*/
|
|
83
|
+
export declare function getIndexedFixture(fixtureId: string, setup: (dir: string) => void | Promise<void>, buildIndexes: (dir: string) => void | Promise<void>): Promise<string>;
|
|
84
|
+
/**
|
|
85
|
+
* Remove an indexed fixture by ID
|
|
86
|
+
* @param fixtureId - Unique identifier for the fixture
|
|
87
|
+
*/
|
|
88
|
+
export declare function removeIndexedFixture(fixtureId: string): void;
|
|
89
|
+
/**
|
|
90
|
+
* Clean up all indexed fixtures
|
|
91
|
+
*/
|
|
92
|
+
export declare function cleanupAllIndexedFixtures(): void;
|
|
93
|
+
//# sourceMappingURL=file-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-utils.d.ts","sourceRoot":"","sources":["../../src/test-helpers/file-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,SAAU,GAAG,MAAM,CAEtD;AAKD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAW/C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAO9C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAGtE;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1F;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAKD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAiB,GAAG,MAAM,CAQjF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAM9C;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAUlE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAMzD;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAS/C;AAWD;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EAC5C,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAClD,OAAO,CAAC,MAAM,CAAC,CAqBjB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAU5D;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAIhD"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared test utilities for file operations
|
|
3
|
+
*/
|
|
4
|
+
import * as fs from 'fs';
|
|
5
|
+
import * as fsp from 'fs/promises';
|
|
6
|
+
import * as path from 'path';
|
|
7
|
+
import * as os from 'os';
|
|
8
|
+
/**
|
|
9
|
+
* Create a temporary directory for test fixtures
|
|
10
|
+
* @param prefix - Optional prefix for the temp directory name
|
|
11
|
+
* @returns Absolute path to the created temp directory
|
|
12
|
+
*/
|
|
13
|
+
export function createTempDir(prefix = 'test-') {
|
|
14
|
+
return fs.mkdtempSync(path.join(os.tmpdir(), prefix));
|
|
15
|
+
}
|
|
16
|
+
/** Track cleanup failures for debugging test pollution */
|
|
17
|
+
let cleanupFailureCount = 0;
|
|
18
|
+
/**
|
|
19
|
+
* Remove a temporary directory and all its contents
|
|
20
|
+
* @param dir - Path to the directory to remove
|
|
21
|
+
*/
|
|
22
|
+
export function removeTempDir(dir) {
|
|
23
|
+
try {
|
|
24
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
cleanupFailureCount++;
|
|
28
|
+
// Log warning to help debug test pollution issues
|
|
29
|
+
console.warn(`[test-cleanup] Failed to remove temp dir (${cleanupFailureCount} total failures): ${dir}`);
|
|
30
|
+
if (error instanceof Error) {
|
|
31
|
+
console.warn(`[test-cleanup] Reason: ${error.message}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get the count of cleanup failures (for test diagnostics)
|
|
37
|
+
*/
|
|
38
|
+
export function getCleanupFailureCount() {
|
|
39
|
+
return cleanupFailureCount;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Reset cleanup failure counter (call in test setup)
|
|
43
|
+
*/
|
|
44
|
+
export function resetCleanupFailureCount() {
|
|
45
|
+
cleanupFailureCount = 0;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Assert no cleanup failures occurred (call in afterEach to detect test pollution)
|
|
49
|
+
* @throws Error if cleanup failures occurred
|
|
50
|
+
*/
|
|
51
|
+
export function assertNoCleanupFailures() {
|
|
52
|
+
const failures = getCleanupFailureCount();
|
|
53
|
+
if (failures > 0) {
|
|
54
|
+
const msg = `Test pollution detected: ${failures} cleanup failure(s) occurred`;
|
|
55
|
+
resetCleanupFailureCount(); // Reset for next test
|
|
56
|
+
throw new Error(msg);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Write an array of objects to a JSONL file
|
|
61
|
+
* @param filePath - Path to the JSONL file
|
|
62
|
+
* @param data - Array of objects to write
|
|
63
|
+
*/
|
|
64
|
+
export function writeJsonlFile(filePath, data) {
|
|
65
|
+
const content = data.map(item => JSON.stringify(item)).join('\n');
|
|
66
|
+
fs.writeFileSync(filePath, content, 'utf-8');
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Async version of writeJsonlFile for parallel test execution
|
|
70
|
+
* @param filePath - Path to the JSONL file
|
|
71
|
+
* @param data - Array of objects to write
|
|
72
|
+
*/
|
|
73
|
+
export async function writeJsonlFileAsync(filePath, data) {
|
|
74
|
+
const content = data.map(item => JSON.stringify(item)).join('\n');
|
|
75
|
+
await fsp.writeFile(filePath, content, 'utf-8');
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Get today's date in YYYY-MM-DD format
|
|
79
|
+
* @returns Today's date string
|
|
80
|
+
*/
|
|
81
|
+
export function getTestDate() {
|
|
82
|
+
return new Date().toISOString().split('T')[0];
|
|
83
|
+
}
|
|
84
|
+
/** Track shared temp directories for suite-level cleanup */
|
|
85
|
+
const sharedTempDirs = new Map();
|
|
86
|
+
/**
|
|
87
|
+
* Get or create a shared temp directory for a test suite
|
|
88
|
+
* Use this for read-only tests that can share fixtures
|
|
89
|
+
* @param suiteId - Unique identifier for the test suite
|
|
90
|
+
* @param prefix - Optional prefix for the temp directory name
|
|
91
|
+
* @returns Absolute path to the shared temp directory
|
|
92
|
+
*/
|
|
93
|
+
export function getSharedTempDir(suiteId, prefix = 'shared-test-') {
|
|
94
|
+
const existing = sharedTempDirs.get(suiteId);
|
|
95
|
+
if (existing && fs.existsSync(existing)) {
|
|
96
|
+
return existing;
|
|
97
|
+
}
|
|
98
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
|
|
99
|
+
sharedTempDirs.set(suiteId, dir);
|
|
100
|
+
return dir;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Clear contents of a shared temp directory without deleting it
|
|
104
|
+
* Use in beforeEach when tests need clean state but can reuse directory
|
|
105
|
+
* @param dir - Path to the directory to clear
|
|
106
|
+
*/
|
|
107
|
+
export function clearTempDir(dir) {
|
|
108
|
+
if (!fs.existsSync(dir))
|
|
109
|
+
return;
|
|
110
|
+
const entries = fs.readdirSync(dir);
|
|
111
|
+
for (const entry of entries) {
|
|
112
|
+
fs.rmSync(path.join(dir, entry), { recursive: true, force: true });
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Async version of clearTempDir for parallel test execution
|
|
117
|
+
* @param dir - Path to the directory to clear
|
|
118
|
+
*/
|
|
119
|
+
export async function clearTempDirAsync(dir) {
|
|
120
|
+
try {
|
|
121
|
+
await fsp.access(dir);
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
return; // Directory doesn't exist
|
|
125
|
+
}
|
|
126
|
+
const entries = await fsp.readdir(dir);
|
|
127
|
+
await Promise.all(entries.map(entry => fsp.rm(path.join(dir, entry), { recursive: true, force: true })));
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Remove a shared temp directory by suite ID
|
|
131
|
+
* Call in after() hook to clean up suite-level fixtures
|
|
132
|
+
* @param suiteId - Unique identifier for the test suite
|
|
133
|
+
*/
|
|
134
|
+
export function removeSharedTempDir(suiteId) {
|
|
135
|
+
const dir = sharedTempDirs.get(suiteId);
|
|
136
|
+
if (dir) {
|
|
137
|
+
removeTempDir(dir);
|
|
138
|
+
sharedTempDirs.delete(suiteId);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Clean up all shared temp directories
|
|
143
|
+
* Useful for global test teardown
|
|
144
|
+
*/
|
|
145
|
+
export function cleanupAllSharedTempDirs() {
|
|
146
|
+
for (const [suiteId, dir] of sharedTempDirs) {
|
|
147
|
+
try {
|
|
148
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
// Ignore cleanup errors
|
|
152
|
+
}
|
|
153
|
+
sharedTempDirs.delete(suiteId);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
const indexedFixtures = new Map();
|
|
157
|
+
/**
|
|
158
|
+
* Create or get a cached test fixture with pre-built indexes
|
|
159
|
+
* Use this when multiple tests need the same indexed data
|
|
160
|
+
* @param fixtureId - Unique identifier for the fixture
|
|
161
|
+
* @param setup - Function to create test data files, receives temp dir path
|
|
162
|
+
* @param buildIndexes - Function to build indexes, receives temp dir path
|
|
163
|
+
* @returns Path to the fixture directory
|
|
164
|
+
*/
|
|
165
|
+
export async function getIndexedFixture(fixtureId, setup, buildIndexes) {
|
|
166
|
+
const existing = indexedFixtures.get(fixtureId);
|
|
167
|
+
if (existing && fs.existsSync(existing.dir)) {
|
|
168
|
+
return existing.dir;
|
|
169
|
+
}
|
|
170
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), `indexed-fixture-${fixtureId}-`));
|
|
171
|
+
// Setup test data
|
|
172
|
+
await setup(dir);
|
|
173
|
+
// Build indexes
|
|
174
|
+
await buildIndexes(dir);
|
|
175
|
+
indexedFixtures.set(fixtureId, {
|
|
176
|
+
dir,
|
|
177
|
+
files: new Map(),
|
|
178
|
+
indexed: true,
|
|
179
|
+
});
|
|
180
|
+
return dir;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Remove an indexed fixture by ID
|
|
184
|
+
* @param fixtureId - Unique identifier for the fixture
|
|
185
|
+
*/
|
|
186
|
+
export function removeIndexedFixture(fixtureId) {
|
|
187
|
+
const fixture = indexedFixtures.get(fixtureId);
|
|
188
|
+
if (fixture) {
|
|
189
|
+
try {
|
|
190
|
+
fs.rmSync(fixture.dir, { recursive: true, force: true });
|
|
191
|
+
}
|
|
192
|
+
catch {
|
|
193
|
+
// Ignore cleanup errors
|
|
194
|
+
}
|
|
195
|
+
indexedFixtures.delete(fixtureId);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Clean up all indexed fixtures
|
|
200
|
+
*/
|
|
201
|
+
export function cleanupAllIndexedFixtures() {
|
|
202
|
+
for (const [id] of indexedFixtures) {
|
|
203
|
+
removeIndexedFixture(id);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=file-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-utils.js","sourceRoot":"","sources":["../../src/test-helpers/file-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,MAAM,GAAG,OAAO;IAC5C,OAAO,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,0DAA0D;AAC1D,IAAI,mBAAmB,GAAG,CAAC,CAAC;AAE5B;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,IAAI,CAAC;QACH,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,mBAAmB,EAAE,CAAC;QACtB,kDAAkD;QAClD,OAAO,CAAC,IAAI,CAAC,6CAA6C,mBAAmB,qBAAqB,GAAG,EAAE,CAAC,CAAC;QACzG,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO,CAAC,IAAI,CAAC,0BAA0B,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;AACH,CAAC;AAED;;GA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WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,mBAAmB,SAAS,GAAG,CAAC,CAAC,CAAC;IAEpF,kBAAkB;IAClB,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAEjB,gBAAgB;IAChB,MAAM,YAAY,CAAC,GAAG,CAAC,CAAC;IAExB,eAAe,CAAC,GAAG,CAAC,SAAS,EAAE;QAC7B,GAAG;QACH,KAAK,EAAE,IAAI,GAAG,EAAE;QAChB,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,SAAiB;IACpD,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/C,IAAI,OAAO,EAAE,CAAC;QACZ,IAAI,CAAC;YACH,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3D,CAAC;QAAC,MAAM,CAAC;YACP,wBAAwB;QAC1B,CAAC;QACD,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB;IACvC,KAAK,MAAM,CAAC,EAAE,CAAC,IAAI,eAAe,EAAE,CAAC;QACnC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test helpers index - re-exports all test utilities
|
|
3
|
+
*/
|
|
4
|
+
export { createTempDir, removeTempDir, getCleanupFailureCount, resetCleanupFailureCount, assertNoCleanupFailures, writeJsonlFile, writeJsonlFileAsync, getTestDate, getSharedTempDir, clearTempDir, clearTempDirAsync, removeSharedTempDir, cleanupAllSharedTempDirs, getIndexedFixture, removeIndexedFixture, cleanupAllIndexedFixtures, } from './file-utils.js';
|
|
5
|
+
export { type TraceDataStore, type LogDataStore, type MetricDataStore, createTraceBackend, createLogBackend, createMetricBackend, getTraceBackendOptions, getLogBackendOptions, getMetricBackendOptions, type MockDataStore, createMockBackend, getMockOptions, } from './mock-backends.js';
|
|
6
|
+
export { type ToolDefinition, validateToolDefinition, validateHandlerExport, } from './tool-validators.js';
|
|
7
|
+
export { validateBackendSchema, validateLimitSchema, validateDateRangeSchema, } from './schema-validators.js';
|
|
8
|
+
export { SIGNOZ_ENV_VARS, type EnvSnapshot, type HomeEnvScope, captureEnv, restoreEnv, clearSigNozEnv, setSigNozEnv, createEnvScope, setHomeEnv, restoreHomeEnv, } from './env-utils.js';
|
|
9
|
+
export { TEST_TIMESTAMP_BASE, TEST_TIMESTAMP, TEST_TIMESTAMP_ISO, TEST_DURATION, TEST_DURATION_MS, type MockSpan, type MockLog, type MockMetric, type MockLLMEvent, type MockEvaluation, resetBuilderCounters, createMockSpan, createMockSpans, createMockLog, createMockLogs, createMockMetric, createMockMetrics, createMockLLMEvent, createMockLLMEvents, createMockEvaluation, createMockEvaluations, createHttpSpan, createDbSpan, createErrorLog, createCorrelatedLog, createHistogramMetric, createLLMEventWithTokens, createScoredEvaluation, createLabeledEvaluation, } from './test-data-builders.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-helpers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,cAAc,EACd,mBAAmB,EACnB,WAAW,EAEX,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EAExB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,eAAe,EAEpB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EAEvB,KAAK,aAAa,EAClB,iBAAiB,EACjB,cAAc,GACf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,KAAK,cAAc,EACnB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,UAAU,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,cAAc,EACd,UAAU,EACV,cAAc,GACf,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAEL,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAEhB,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,cAAc,EAEnB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EAErB,cAAc,EACd,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test helpers index - re-exports all test utilities
|
|
3
|
+
*/
|
|
4
|
+
// File utilities
|
|
5
|
+
export { createTempDir, removeTempDir, getCleanupFailureCount, resetCleanupFailureCount, assertNoCleanupFailures, writeJsonlFile, writeJsonlFileAsync, getTestDate,
|
|
6
|
+
// Shared temp directory utilities (suite-level)
|
|
7
|
+
getSharedTempDir, clearTempDir, clearTempDirAsync, removeSharedTempDir, cleanupAllSharedTempDirs,
|
|
8
|
+
// Indexed fixture utilities
|
|
9
|
+
getIndexedFixture, removeIndexedFixture, cleanupAllIndexedFixtures, } from './file-utils.js';
|
|
10
|
+
// Mock backends
|
|
11
|
+
export {
|
|
12
|
+
// Type-specific factories (recommended)
|
|
13
|
+
createTraceBackend, createLogBackend, createMetricBackend, getTraceBackendOptions, getLogBackendOptions, getMetricBackendOptions, createMockBackend, getMockOptions, } from './mock-backends.js';
|
|
14
|
+
// Tool validators
|
|
15
|
+
export { validateToolDefinition, validateHandlerExport, } from './tool-validators.js';
|
|
16
|
+
// Schema validators
|
|
17
|
+
export { validateBackendSchema, validateLimitSchema, validateDateRangeSchema, } from './schema-validators.js';
|
|
18
|
+
// Environment utilities
|
|
19
|
+
export { SIGNOZ_ENV_VARS, captureEnv, restoreEnv, clearSigNozEnv, setSigNozEnv, createEnvScope, setHomeEnv, restoreHomeEnv, } from './env-utils.js';
|
|
20
|
+
// Test data builders
|
|
21
|
+
export {
|
|
22
|
+
// Constants
|
|
23
|
+
TEST_TIMESTAMP_BASE, TEST_TIMESTAMP, TEST_TIMESTAMP_ISO, TEST_DURATION, TEST_DURATION_MS,
|
|
24
|
+
// Core builders
|
|
25
|
+
resetBuilderCounters, createMockSpan, createMockSpans, createMockLog, createMockLogs, createMockMetric, createMockMetrics, createMockLLMEvent, createMockLLMEvents, createMockEvaluation, createMockEvaluations,
|
|
26
|
+
// Specialized builders
|
|
27
|
+
createHttpSpan, createDbSpan, createErrorLog, createCorrelatedLog, createHistogramMetric, createLLMEventWithTokens, createScoredEvaluation, createLabeledEvaluation, } from './test-data-builders.js';
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/test-helpers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,iB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|
1
|
+
/**
|
|
2
|
+
* Shared mock backend factories for testing
|
|
3
|
+
*
|
|
4
|
+
* Provides type-safe factory functions for creating mock TelemetryBackend instances.
|
|
5
|
+
* Uses discriminated unions and type-specific stores to avoid unsafe type assertions.
|
|
6
|
+
*/
|
|
7
|
+
import type { TelemetryBackend, TraceSpan, LogRecord, MetricDataPoint, LLMEvent, EvaluationResult } from '../backends/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Type-safe store for trace spans
|
|
10
|
+
*/
|
|
11
|
+
export interface TraceDataStore {
|
|
12
|
+
local: TraceSpan[];
|
|
13
|
+
signoz: TraceSpan[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Type-safe store for log records
|
|
17
|
+
*/
|
|
18
|
+
export interface LogDataStore {
|
|
19
|
+
local: LogRecord[];
|
|
20
|
+
signoz: LogRecord[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Type-safe store for metric data points
|
|
24
|
+
*/
|
|
25
|
+
export interface MetricDataStore {
|
|
26
|
+
local: MetricDataPoint[];
|
|
27
|
+
signoz: MetricDataPoint[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Type-safe store for LLM events
|
|
31
|
+
*/
|
|
32
|
+
export interface LLMEventDataStore {
|
|
33
|
+
local: LLMEvent[];
|
|
34
|
+
signoz: LLMEvent[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Type-safe store for evaluation results
|
|
38
|
+
*/
|
|
39
|
+
export interface EvaluationDataStore {
|
|
40
|
+
local: EvaluationResult[];
|
|
41
|
+
signoz: EvaluationResult[];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Generic mock data store for local and signoz backends
|
|
45
|
+
* @deprecated Use type-specific stores (TraceDataStore, LogDataStore, MetricDataStore) for better type safety
|
|
46
|
+
*/
|
|
47
|
+
export interface MockDataStore<T> {
|
|
48
|
+
local: T[];
|
|
49
|
+
signoz: T[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Create a type-safe mock backend for trace data
|
|
53
|
+
* @param store - Type-safe trace data store
|
|
54
|
+
* @param source - Which source to read from ('local' or 'signoz')
|
|
55
|
+
*/
|
|
56
|
+
export declare function createTraceBackend(store: TraceDataStore, source: 'local' | 'signoz'): TelemetryBackend;
|
|
57
|
+
/**
|
|
58
|
+
* Create a type-safe mock backend for log data
|
|
59
|
+
* @param store - Type-safe log data store
|
|
60
|
+
* @param source - Which source to read from ('local' or 'signoz')
|
|
61
|
+
*/
|
|
62
|
+
export declare function createLogBackend(store: LogDataStore, source: 'local' | 'signoz'): TelemetryBackend;
|
|
63
|
+
/**
|
|
64
|
+
* Create a type-safe mock backend for metric data
|
|
65
|
+
* @param store - Type-safe metric data store
|
|
66
|
+
* @param source - Which source to read from ('local' or 'signoz')
|
|
67
|
+
*/
|
|
68
|
+
export declare function createMetricBackend(store: MetricDataStore, source: 'local' | 'signoz'): TelemetryBackend;
|
|
69
|
+
/**
|
|
70
|
+
* Get type-safe mock options for trace backends
|
|
71
|
+
* @param store - Type-safe trace data store
|
|
72
|
+
*/
|
|
73
|
+
export declare function getTraceBackendOptions(store: TraceDataStore): {
|
|
74
|
+
localBackend: TelemetryBackend;
|
|
75
|
+
signozBackend: TelemetryBackend;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Get type-safe mock options for log backends
|
|
79
|
+
* @param store - Type-safe log data store
|
|
80
|
+
*/
|
|
81
|
+
export declare function getLogBackendOptions(store: LogDataStore): {
|
|
82
|
+
localBackend: TelemetryBackend;
|
|
83
|
+
signozBackend: TelemetryBackend;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Get type-safe mock options for metric backends
|
|
87
|
+
* @param store - Type-safe metric data store
|
|
88
|
+
*/
|
|
89
|
+
export declare function getMetricBackendOptions(store: MetricDataStore): {
|
|
90
|
+
localBackend: TelemetryBackend;
|
|
91
|
+
signozBackend: TelemetryBackend;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Create a type-safe mock backend for LLM event data
|
|
95
|
+
* @param store - Type-safe LLM event data store
|
|
96
|
+
* @param source - Which source to read from ('local' or 'signoz')
|
|
97
|
+
*/
|
|
98
|
+
export declare function createLLMEventBackend(store: LLMEventDataStore, source: 'local' | 'signoz'): TelemetryBackend;
|
|
99
|
+
/**
|
|
100
|
+
* Create a type-safe mock backend for evaluation data
|
|
101
|
+
* @param store - Type-safe evaluation data store
|
|
102
|
+
* @param source - Which source to read from ('local' or 'signoz')
|
|
103
|
+
*/
|
|
104
|
+
export declare function createEvaluationBackend(store: EvaluationDataStore, source: 'local' | 'signoz'): TelemetryBackend;
|
|
105
|
+
/**
|
|
106
|
+
* Get type-safe mock options for LLM event backends
|
|
107
|
+
* @param store - Type-safe LLM event data store
|
|
108
|
+
*/
|
|
109
|
+
export declare function getLLMEventBackendOptions(store: LLMEventDataStore): {
|
|
110
|
+
localBackend: TelemetryBackend;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Get type-safe mock options for evaluation backends
|
|
114
|
+
* @param store - Type-safe evaluation data store
|
|
115
|
+
*/
|
|
116
|
+
export declare function getEvaluationBackendOptions(store: EvaluationDataStore): {
|
|
117
|
+
localBackend: TelemetryBackend;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Create a mock TelemetryBackend that returns data from a mock store
|
|
121
|
+
* Uses runtime type guards to safely convert generic data to specific types.
|
|
122
|
+
*
|
|
123
|
+
* @param store - Mock data store with local and signoz arrays
|
|
124
|
+
* @param dataType - Type of data this backend returns
|
|
125
|
+
* @param source - Which source to read from ('local' or 'signoz')
|
|
126
|
+
* @deprecated Use type-specific factories (createTraceBackend, createLogBackend, createMetricBackend) for compile-time type safety
|
|
127
|
+
*/
|
|
128
|
+
export declare function createMockBackend<T>(store: MockDataStore<T>, dataType: 'traces' | 'logs' | 'metrics', source: 'local' | 'signoz'): TelemetryBackend;
|
|
129
|
+
/**
|
|
130
|
+
* Get mock options with both local and signoz backends
|
|
131
|
+
* @param store - Mock data store with local and signoz arrays
|
|
132
|
+
* @param dataType - Type of data these backends return
|
|
133
|
+
* @deprecated Use type-specific options (getTraceBackendOptions, getLogBackendOptions, getMetricBackendOptions) for compile-time type safety
|
|
134
|
+
*/
|
|
135
|
+
export declare function getMockOptions<T>(store: MockDataStore<T>, dataType: 'traces' | 'logs' | 'metrics'): {
|
|
136
|
+
localBackend: TelemetryBackend;
|
|
137
|
+
signozBackend: TelemetryBackend;
|
|
138
|
+
};
|
|
139
|
+
//# sourceMappingURL=mock-backends.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-backends.d.ts","sourceRoot":"","sources":["../../src/test-helpers/mock-backends.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,eAAe,EACf,QAAQ,EACR,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAM9B;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,MAAM,EAAE,QAAQ,EAAE,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B;AAED;;;GAGG;AACH,M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