add option for npm access level

This commit is contained in:
2018-04-04 22:25:13 +02:00
parent c8c17e6cba
commit 0ab1e1ab7c
70 changed files with 1977 additions and 1846 deletions

View File

@@ -1,28 +1,28 @@
import * as plugins from './mod.plugins'
import { Objectmap } from 'lik'
import * as plugins from './mod.plugins';
import { Objectmap } from 'lik';
import { DockerRegistry } from './mod.classes.dockerregistry'
import { DockerRegistry } from './mod.classes.dockerregistry';
export class RegistryStorage {
objectMap = new Objectmap<DockerRegistry>()
constructor () {
objectMap = new Objectmap<DockerRegistry>();
constructor() {
// Nothing here
}
addRegistry (registryArg: DockerRegistry) {
this.objectMap.add(registryArg)
addRegistry(registryArg: DockerRegistry) {
this.objectMap.add(registryArg);
}
getRegistryByUrl (registryUrlArg: string) {
getRegistryByUrl(registryUrlArg: string) {
return this.objectMap.find(registryArg => {
return registryArg.registryUrl === registryUrlArg
})
return registryArg.registryUrl === registryUrlArg;
});
}
async loginAll () {
async loginAll() {
await this.objectMap.forEach(async registryArg => {
await registryArg.login()
})
plugins.beautylog.success('logged in successfully into all available DockerRegistries!')
await registryArg.login();
});
plugins.beautylog.success('logged in successfully into all available DockerRegistries!');
}
}