UNPKG

verdaccio

Version:

A lightweight private npm proxy registry

59 lines (58 loc) • 1.73 kB
import type { NextFunction, Request, Response } from 'express'; import type { pluginUtils } from '@verdaccio/core'; import type { Callback, Config, Logger, Manifest, PackageAccess, RemoteUser, StringValue as verdaccio$StringValue } from '@verdaccio/types'; export type StringValue = verdaccio$StringValue; export interface LegacyPackageList { [key: string]: LegacyPackageAccess; } export type LegacyPackageAccess = PackageAccess & { allow_publish?: string[]; allow_proxy?: string[]; allow_access?: string[]; proxy_access?: string[]; unpublish?: string[]; }; export type MatchedPackage = PackageAccess | void; export type JWTPayload = RemoteUser & { password?: string; }; export interface AESPayload { user: string; password: string; } export interface Utils { ErrorCode: any; getLatestVersion: Callback; isObject: (value: any) => boolean; validate_name: (value: any) => boolean; tag_version: (value: any, version: string, tag: string) => void; semverSort: (keys: string[]) => string[]; } export interface Profile { tfa: boolean; name: string; email: string; email_verified: string; created: string; updated: string; cidr_whitelist: any; fullname: string; } export type $RequestExtend = Omit<Request, 'params'> & { remote_user?: any; log: Logger; params: Record<string, string>; }; export type $ResponseExtend = Response & { cookies?: any; }; export type $NextFunctionVer = NextFunction & any; export type $SidebarPackage = Manifest & { latest: any; }; export interface ISyncUplinks { uplinksLook?: boolean; etag?: string; req?: Request; } export type IPluginFilters = pluginUtils.ManifestFilter<Config>[];