Create Logger class for debugging

This commit is contained in:
2026-05-23 11:30:35 +02:00
parent adc758dfa5
commit a9f280914d
9 changed files with 81 additions and 40 deletions

View File

@@ -1,11 +1,10 @@
import type { Debugger } from "debug";
import type { Logger } from '../utils/logger.js';
import type { Engine } from "@xo-cash/engine";
import { serializeInvitation } from "@xo-cash/engine";
import { vendingMachineTemplate } from "../templates/vending-machine.js";
import type { Config } from "./config.js";
import type { Database } from "./database/database.js";
import type { ItemsTable } from "./database/tables.js";
import { InvitationSyncClient } from "./invitation-sync-client.js";
import { OrderInvitationTracker } from "./order-invitation-tracker.js";
@@ -40,7 +39,7 @@ export type OrderPaymentServiceDeps = {
database: Database;
config: Config;
syncClient: InvitationSyncClient;
debug: Debugger;
debug: Logger;
templateIdentifier: string;
trackers: Map<string, OrderInvitationTracker>;
};
@@ -55,7 +54,7 @@ export class OrderPaymentService {
engine: Engine;
database: Database;
config: Config;
debug: Debugger;
debug: Logger;
trackers: Map<string, OrderInvitationTracker>;
}): Promise<OrderPaymentService> {
const { templateIdentifier } = await deps.engine.importTemplate(