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/utils": "*",
"@stock-bot/browser": "*", "@stock-bot/browser": "*",
"@stock-bot/proxy": "*", "@stock-bot/proxy": "*",
"hono": "^4.0.0" "hono": "^4.0.0",
"pako": "^2.1.0"
}, },
"devDependencies": { "devDependencies": {
"typescript": "^5.0.0" "typescript": "^5.0.0"

View file

@ -12,6 +12,7 @@ import { IbHandler } from './ib/ib.handler';
import { QMHandler } from './qm/qm.handler'; import { QMHandler } from './qm/qm.handler';
import { WebShareHandler } from './webshare/webshare.handler'; import { WebShareHandler } from './webshare/webshare.handler';
import { TradingViewHandler } from './tradingview/tradingview.handler'; import { TradingViewHandler } from './tradingview/tradingview.handler';
import { TeHandler } from './te/te.handler';
// Add more handler imports as needed // 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 // The HandlerScanner in the DI container will handle the actual registration
// We just need to ensure handlers are imported so their decorators run // 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', { logger.info('Handler imports loaded', {
count: handlers.length, 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-ingestion" },
{ "path": "./data-pipeline" }, { "path": "./data-pipeline" },
{ "path": "./web-api" }, { "path": "./web-api" },
{ "path": "./web-app" } { "path": "./web-app" },
{ "path": "./engine"},
{ "path": "./orchestrator"}
] ]
} }

View file

@ -78,6 +78,7 @@
"@stock-bot/stock-config": "*", "@stock-bot/stock-config": "*",
"@stock-bot/utils": "*", "@stock-bot/utils": "*",
"hono": "^4.0.0", "hono": "^4.0.0",
"pako": "^2.1.0",
}, },
"devDependencies": { "devDependencies": {
"typescript": "^5.0.0", "typescript": "^5.0.0",
@ -1990,6 +1991,8 @@
"package-json-from-dist": ["package-json-from-dist@1.0.1", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="], "package-json-from-dist": ["package-json-from-dist@1.0.1", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="],
"pako": ["pako@2.1.0", "", {}, "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug=="],
"parent-module": ["parent-module@1.0.1", "", { "dependencies": { "callsites": "^3.0.0" } }, "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g=="], "parent-module": ["parent-module@1.0.1", "", { "dependencies": { "callsites": "^3.0.0" } }, "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g=="],
"parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="], "parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="],