2019-07-16 08:40:01 +02:00
|
|
|
import {
|
2018-07-15 19:26:58 +02:00
|
|
|
IBasicStorage,
|
2018-04-30 18:34:55 +02:00
|
|
|
Callback,
|
2018-08-21 08:05:34 +02:00
|
|
|
RemoteUser,
|
2018-04-30 18:34:55 +02:00
|
|
|
Config,
|
|
|
|
Logger,
|
2019-09-08 00:46:50 +02:00
|
|
|
IPluginStorage,
|
2019-08-10 13:38:06 +02:00
|
|
|
Package,
|
2019-09-08 00:46:50 +02:00
|
|
|
ITokenActions,
|
2019-08-10 13:38:06 +02:00
|
|
|
} from '@verdaccio/types';
|
2018-07-15 23:23:14 +02:00
|
|
|
|
2018-08-21 08:05:34 +02:00
|
|
|
export type JWTPayload = RemoteUser & {
|
|
|
|
password?: string;
|
2020-08-13 23:36:23 +02:00
|
|
|
};
|
2018-08-21 08:05:34 +02:00
|
|
|
|
2019-07-16 08:40:01 +02:00
|
|
|
export interface Utils {
|
2018-07-15 23:23:14 +02:00
|
|
|
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;
|
2019-07-16 08:40:01 +02:00
|
|
|
semverSort: (keys: string[]) => string[];
|
2018-07-15 23:23:14 +02:00
|
|
|
}
|
|
|
|
|
2019-07-16 08:40:01 +02:00
|
|
|
export interface Profile {
|
2018-10-12 11:07:55 +02:00
|
|
|
tfa: boolean;
|
|
|
|
name: string;
|
|
|
|
email: string;
|
|
|
|
email_verified: string;
|
|
|
|
created: string;
|
|
|
|
updated: string;
|
|
|
|
cidr_whitelist: any;
|
|
|
|
fullname: string;
|
|
|
|
}
|
|
|
|
|
2019-09-08 00:46:50 +02:00
|
|
|
export interface IStorage extends IBasicStorage<Config>, ITokenActions {
|
2018-04-30 18:34:55 +02:00
|
|
|
config: Config;
|
2019-09-08 00:46:50 +02:00
|
|
|
storagePlugin: IPluginStorage<Config>;
|
2018-04-30 18:34:55 +02:00
|
|
|
logger: Logger;
|
2018-02-26 21:28:09 +01:00
|
|
|
}
|
|
|
|
|
2018-12-13 19:05:47 +01:00
|
|
|
/**
|
|
|
|
* @property { string | number | Styles } [ruleOrSelector]
|
|
|
|
*/
|
2019-07-16 08:40:01 +02:00
|
|
|
export interface Styles {
|
|
|
|
[ruleOrSelector: string]: string | number | Styles;
|
2021-03-14 08:42:46 +01:00
|
|
|
}
|