UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

71 lines (69 loc) 2.63 kB
import { Config, DatabaseAdapter, ImageProcessor, LucidHonoGeneric, LucidLogger, ServiceContext } from "./types-CfF1T11a.js"; import z from "zod/v4"; import * as hono2 from "hono"; import * as hono_types10 from "hono/types"; //#region src/utils/errors/lucid-error.d.ts /** * The LucidError class should be used to throw errors in functions that sit outside of API request lifecycle. This class will log the error and optionally kill the process. * @class * @extends Error * @param {string} data.message - The error message * @param {string} [data.scope] - Used to identify the scope of the logged error * @param {boolean} [data.kill] - If true, the process will exit with code 1 * @returns {void} * @example * throw new LucidError({ * message: "Cannot set a value to a read-only property", * scope: "plugin-name", * kill: true, * }); */ declare class LucidError extends Error { scope?: string; kill?: boolean; constructor(data: { message: string; scope?: string; kill?: boolean; data?: Record<string, unknown>; }); } //#endregion //#region src/libs/logger/index.d.ts declare const loggerProxy: LucidLogger; //#endregion //#region src/libs/image-processor/sharp-processor.d.ts /** * A Sharp-based image processor that can resize, convert formats, and optimise images. * * This processor dynamically imports Sharp to avoid dependency issues. */ declare const sharpProcessor: ImageProcessor; //#endregion //#region src/libs/image-processor/passthrough-processor.d.ts /** * A passthrough image processor that returns the original buffer without any processing. * * This is useful if you want to use the original image without any processing or the platform * you're using doesn't support other services or Sharp which is used by default. */ declare const passthroughProcessor: ImageProcessor; //#endregion //#region src/index.d.ts declare const _default: { createApp: (props: { config: Config; app?: hono2.Hono<LucidHonoGeneric>; hono?: { middleware?: Array<(app: hono2.Hono<LucidHonoGeneric>, config: Config) => Promise<void>>; extensions?: Array<(app: hono2.Hono<LucidHonoGeneric>, config: Config) => Promise<void>>; }; }) => Promise<hono2.Hono<LucidHonoGeneric, hono_types10.BlankSchema, "/">>; setupCronJobs: (service: ServiceContext) => { schedule: "0 0 * * *"; register: () => Promise<void>; }; }; //#endregion export { DatabaseAdapter, LucidError, _default as default, loggerProxy as logger, passthroughProcessor as passthroughImageProcessor, sharpProcessor as sharpImageProcessor, z }; //# sourceMappingURL=index.d.ts.map