This commit is contained in:
Boki 2025-06-23 22:32:51 -04:00
parent d7979500eb
commit ce5fa9da4a
25 changed files with 68 additions and 175 deletions

View file

@ -23,6 +23,7 @@
"config-cli": "./dist/cli.js"
},
"dependencies": {
"@stock-bot/logger": "workspace:*",
"zod": "^3.22.4"
},
"devDependencies": {

View file

@ -2,7 +2,7 @@ import { readFileSync } from 'fs';
import { ConfigLoaderError } from '../errors';
import type { ConfigLoader } from '../types';
export interface EnvLoaderOptions {
interface EnvLoaderOptions {
convertCase?: boolean;
parseJson?: boolean;
parseValues?: boolean;

View file

@ -10,7 +10,19 @@
"dependencies": {
"@stock-bot/config": "workspace:*",
"@stock-bot/logger": "workspace:*",
"@stock-bot/types": "workspace:*"
"@stock-bot/types": "workspace:*",
"@stock-bot/browser": "workspace:*",
"@stock-bot/cache": "workspace:*",
"@stock-bot/mongodb": "workspace:*",
"@stock-bot/postgres": "workspace:*",
"@stock-bot/proxy": "workspace:*",
"@stock-bot/questdb": "workspace:*",
"@stock-bot/queue": "workspace:*",
"@stock-bot/shutdown": "workspace:*",
"@stock-bot/handlers": "workspace:*",
"zod": "^3.23.8",
"hono": "^4.0.0",
"awilix": "^12.0.5"
},
"devDependencies": {
"@types/pg": "^8.10.7"

View file

@ -14,7 +14,8 @@
"@stock-bot/logger": "workspace:*",
"@stock-bot/types": "workspace:*",
"@stock-bot/cache": "workspace:*",
"@stock-bot/utils": "workspace:*"
"@stock-bot/utils": "workspace:*",
"mongodb": "^6.12.0"
},
"devDependencies": {
"@types/node": "^20.11.0",

View file

@ -4,7 +4,7 @@ import { Queue, QueueEvents } from 'bullmq';
// const logger = getLogger('queue-metrics');
export interface QueueMetrics {
interface QueueMetrics {
// Job counts
waiting: number;
active: number;

View file

@ -10,7 +10,9 @@
"clean": "rm -rf dist",
"test": "bun test"
},
"dependencies": {},
"dependencies": {
"@stock-bot/logger": "workspace:*"
},
"devDependencies": {
"typescript": "^5.0.0",
"@types/node": "^20.0.0"

View file

@ -73,31 +73,6 @@ export interface DynamicPoolConfig {
evaluationInterval: number; // ms between checks
}
/**
* Health Status Types
*/
export type MongoDBHealthStatus = 'healthy' | 'degraded' | 'unhealthy';
export interface MongoDBHealthCheck {
status: MongoDBHealthStatus;
timestamp: Date;
latency: number;
connections: {
active: number;
available: number;
total: number;
};
errors?: string[];
}
export interface MongoDBMetrics {
operationsPerSecond: number;
averageLatency: number;
errorRate: number;
connectionPoolUtilization: number;
documentsProcessed: number;
}
/**
* Base Document Interface
*/

View file

@ -39,17 +39,6 @@ export interface QuestDBConnectionOptions {
*/
export type QuestDBHealthStatus = 'healthy' | 'degraded' | 'unhealthy';
export interface QuestDBHealthCheck {
status: QuestDBHealthStatus;
timestamp: Date;
latency: number;
protocols: {
http: boolean;
pg: boolean;
influx: boolean;
};
errors?: string[];
}
export interface QuestDBMetrics {
queriesPerSecond: number;
@ -77,7 +66,7 @@ export type TableNames =
/**
* Time-Series Data Types
*/
export interface BaseTimeSeriesData {
interface BaseTimeSeriesData {
timestamp: Date;
symbol?: string;
}
@ -160,7 +149,7 @@ export interface InsertResult {
/**
* Schema Definition Types
*/
export interface ColumnDefinition {
interface ColumnDefinition {
name: string;
type:
| 'SYMBOL'
@ -177,7 +166,7 @@ export interface ColumnDefinition {
capacity?: number; // For SYMBOL type
}
export interface TableDefinition {
interface TableDefinition {
name: string;
columns: ColumnDefinition[];
partitionBy?: 'NONE' | 'DAY' | 'MONTH' | 'YEAR';
@ -224,7 +213,7 @@ export interface PerformanceMetrics {
/**
* Query Builder Types
*/
export interface TimeSeriesQuery {
interface TimeSeriesQuery {
table: TableNames | string;
columns?: string[];
timeRange?: TimeRange;
@ -236,7 +225,7 @@ export interface TimeSeriesQuery {
limit?: number;
}
export interface AggregationQuery {
interface AggregationQuery {
aggregations: Record<string, string>;
groupBy?: string[];
having?: string[];
@ -278,7 +267,7 @@ export interface TableSchema {
dedup?: boolean;
}
export interface ColumnSchema {
interface ColumnSchema {
name: string;
type:
| 'SYMBOL'
@ -297,7 +286,7 @@ export interface ColumnSchema {
indexed?: boolean;
}
export interface IndexDefinition {
interface IndexDefinition {
columns: string[];
type: 'HASH' | 'BTREE';
unique?: boolean;

View file

@ -6,8 +6,6 @@ export interface BrowserOptions {
enableNetworkLogging?: boolean;
}
// Keep the old name for backward compatibility
export type FastBrowserOptions = BrowserOptions;
export interface ScrapingResult<T = unknown> {
data: T;