"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fastify_plugin_1 = __importDefault(require("fastify-plugin"));
const core_1 = require("@yinuo-ngm/core");
const env_1 = require("../env");
exports.default = (0, fastify_plugin_1.default)(async function corePlugin(fastify) {
    const coreApp = await (0, core_1.createCoreApp)({
        sysLogCapacity: env_1.env.sysLogCapacity,
        dataDir: env_1.env.dataDir,
    });
    fastify.decorate("core", coreApp);
    fastify.log.info("[core] core app initialized");
});
