2020-10-24 14:37:08 +02:00
|
|
|
import { VerdaccioConfigGoogleStorage } from '../../src/types';
|
|
|
|
|
|
|
|
class Config implements VerdaccioConfigGoogleStorage {
|
|
|
|
projectId: string;
|
|
|
|
keyFilename: string;
|
|
|
|
bucket: string;
|
|
|
|
kind: string;
|
2020-11-08 15:20:02 +01:00
|
|
|
config_path: string;
|
2020-10-24 14:37:08 +02:00
|
|
|
secret: string;
|
|
|
|
user_agent: string;
|
|
|
|
server_id: string;
|
|
|
|
packages: PackageList;
|
|
|
|
uplinks: UpLinksConfList;
|
|
|
|
logs: LoggerConf[];
|
|
|
|
// @ts-ignore
|
|
|
|
security: Security;
|
|
|
|
$key: any;
|
|
|
|
$value: any;
|
|
|
|
|
|
|
|
constructor() {
|
2020-11-08 15:20:02 +01:00
|
|
|
this.config_path = './test';
|
2020-10-24 14:37:08 +02:00
|
|
|
this.secret = '12345';
|
|
|
|
this.uplinks = {
|
|
|
|
npmjs: {
|
|
|
|
url: 'http://never_use:0000/',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
this.server_id = '';
|
|
|
|
this.user_agent = '';
|
|
|
|
this.packages = {};
|
|
|
|
this.logs = [];
|
|
|
|
this.kind = 'partial_test_metadataDatabaseKey';
|
|
|
|
this.bucket = 'verdaccio-plugin';
|
|
|
|
this.projectId = 'verdaccio-01';
|
|
|
|
// this.keyFilename = './verdaccio-01-56f693e3aab0.json';
|
|
|
|
}
|
|
|
|
checkSecretKey(): string {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
getMatchedPackagesSpec(): void {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default new Config();
|