added pako and te

This commit is contained in:
Boki 2025-07-05 10:24:32 -04:00
parent f6a47f7a8c
commit 505565a09e
9 changed files with 62 additions and 3 deletions

View file

@ -26,7 +26,8 @@
"@stock-bot/utils": "*",
"@stock-bot/browser": "*",
"@stock-bot/proxy": "*",
"hono": "^4.0.0"
"hono": "^4.0.0",
"pako": "^2.1.0"
},
"devDependencies": {
"typescript": "^5.0.0"

View file

@ -12,6 +12,7 @@ import { IbHandler } from './ib/ib.handler';
import { QMHandler } from './qm/qm.handler';
import { WebShareHandler } from './webshare/webshare.handler';
import { TradingViewHandler } from './tradingview/tradingview.handler';
import { TeHandler } from './te/te.handler';
// Add more handler imports as needed
@ -27,7 +28,7 @@ export async function initializeAllHandlers(serviceContainer: IServiceContainer)
// The HandlerScanner in the DI container will handle the actual registration
// We just need to ensure handlers are imported so their decorators run
const handlers = [CeoHandler, IbHandler, QMHandler, WebShareHandler, TradingViewHandler];
const handlers = [CeoHandler, IbHandler, QMHandler, WebShareHandler, TradingViewHandler, TeHandler];
logger.info('Handler imports loaded', {
count: handlers.length,

View file

@ -0,0 +1,2 @@
// Export all action functions here
// export * from './example.action';

View file

@ -0,0 +1,6 @@
export const TE_CONFIG = {
// Add configuration constants here
API_URL: 'https://api.example.com',
REQUEST_TIMEOUT: 30000,
KEY: 'tradingeconomics-charts-core-api-key',
};

View file

@ -0,0 +1,2 @@
export * from './config';
export * from './types';

View file

@ -0,0 +1,13 @@
// Define types and interfaces for the TE handler here
export interface TeData {
id: string;
name: string;
// Add more fields as needed
}
export interface TeResponse {
data: TeData[];
status: string;
timestamp: Date;
}

View file

@ -0,0 +1,29 @@
import {
BaseHandler,
Handler,
Operation,
ScheduledOperation,
} from '@stock-bot/handlers';
@Handler('te')
export class TeHandler extends BaseHandler {
constructor(services: any) {
super(services);
}
@Operation('example-operation')
async exampleOperation(): Promise<unknown> {
this.logger.info('TE handler example operation executed');
return { success: true };
}
@ScheduledOperation('te-scheduled-job', '0 0 * * *', {
priority: 5,
description: 'Daily TE handler scheduled job',
immediately: false,
})
async scheduledJob(): Promise<unknown> {
this.logger.info('TE handler scheduled job executed');
return this.exampleOperation();
}
}

View file

@ -13,6 +13,8 @@
{ "path": "./data-ingestion" },
{ "path": "./data-pipeline" },
{ "path": "./web-api" },
{ "path": "./web-app" }
{ "path": "./web-app" },
{ "path": "./engine"},
{ "path": "./orchestrator"}
]
}