UNPKG

studiocms

Version:

Astro Native CMS for AstroDB. Built from the ground up by the Astro community.

34 lines (33 loc) 1.49 kB
import { Effect } from '../../../effect.js'; import { CacheContext } from '../utils.js'; import { SDKCore_GET } from './get.js'; import { SDKCore_PLUGINS } from './plugins.js'; declare const SDKCore_MIDDLEWARES_base: Effect.Service.Class<SDKCore_MIDDLEWARES, "studiocms/sdk/SDKCore/modules/middlewares", { readonly dependencies: readonly [import("effect/Layer").Layer<SDKCore_GET, never, CacheContext>, import("effect/Layer").Layer<SDKCore_PLUGINS, never, CacheContext>]; readonly effect: Effect.Effect<{ verifyCache: (cacheStore: Map<string, Date>) => Effect.Effect<void, unknown, never>; }, never, CacheContext | SDKCore_GET | SDKCore_PLUGINS>; }>; /** * SDKCore_MIDDLEWARES provides middleware initialization logic for the StudioCMS SDK core. * * @remarks * This service is responsible for ensuring that various cache layers (pages, folder list, folder tree, * page-folder tree, and site configuration) are properly initialized before use. It leverages effectful * operations and logging to manage and trace the initialization process. * * @extends Effect.Service * * @example * ```typescript * const middlewares = yield* Effect.service(SDKCore_MIDDLEWARES); * yield* middlewares.initPages(); * ``` * * @module studiocms/sdk/SDKCore/modules/middlewares * * @property {Function} initPages - Initializes all relevant caches if they are not already populated. */ export declare class SDKCore_MIDDLEWARES extends SDKCore_MIDDLEWARES_base { } export {};