UNPKG

cnpmcore

Version:

Private NPM Registry for Enterprise

41 lines (40 loc) 1.23 kB
import { type Context } from 'egg'; import type { DownloadInfo, UpstreamRegistryInfo } from '../../core/service/CacheService.ts'; import { AbstractController } from './AbstractController.ts'; type SiteTotalData = LegacyInfo & SiteEnvInfo & TotalInfo; interface LegacyInfo { source_registry: string; changes_stream_registry: string; sync_changes_steam: unknown; } interface SiteEnvInfo { sync_model: string; sync_binary: boolean; instance_start_time: Date; node_version: string; egg_version: string; app_version: string; engine: string; cache_time: string; } interface TotalInfo { last_package: string; last_package_version: string; doc_count: number | bigint; doc_version_count: number | bigint; update_seq: number | bigint; download: DownloadInfo; upstream_registries?: UpstreamRegistryInfo[]; } export declare class HomeController extends AbstractController { private readonly cacheService; private readonly homeService; showTotal(): Promise<SiteTotalData>; ping(ctx: Context): Promise<{ pong: boolean; use: number; }>; miscPost(ctx: Context): Promise<void>; miscGet(ctx: Context): Promise<void>; } export {};