0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/packages/types/index.ts
Juan Picado 8c730c0694 refactor: max-len and printWidth to 100 (#1941)
* refactor: max-len and printWidth to 100

* chore: ci specific pnpm version

* fix: add types peer package

literally get rid of types package
2021-04-09 17:54:20 +02:00

48 lines
1,011 B
TypeScript

import {
IBasicStorage,
Callback,
RemoteUser,
Config,
Logger,
IPluginStorage,
Package,
ITokenActions,
} from '@verdaccio/types';
export type JWTPayload = RemoteUser & {
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;
normalizeDistTags: (pkg: Package) => 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 interface IStorage extends IBasicStorage<Config>, ITokenActions {
config: Config;
storagePlugin: IPluginStorage<Config>;
logger: Logger;
}
/**
* @property { string | number | Styles } [ruleOrSelector]
*/
export interface Styles {
[ruleOrSelector: string]: string | number | Styles;
}