2017-08-27 23:03:59 +00:00
|
|
|
"use strict";
|
|
|
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
|
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
|
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
|
|
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
|
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
|
|
});
|
|
|
|
};
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
2017-08-27 23:35:21 +00:00
|
|
|
const plugins = require("./mod.plugins");
|
2017-08-27 23:03:59 +00:00
|
|
|
const lik_1 = require("lik");
|
|
|
|
class RegistryStorage {
|
|
|
|
constructor() {
|
|
|
|
this.objectMap = new lik_1.Objectmap();
|
|
|
|
// Nothing here
|
|
|
|
}
|
|
|
|
addRegistry(registryArg) {
|
|
|
|
this.objectMap.add(registryArg);
|
|
|
|
}
|
|
|
|
getRegistryByUrl(registryUrlArg) {
|
|
|
|
return this.objectMap.find(registryArg => {
|
|
|
|
return registryArg.registryUrl === registryUrlArg;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
loginAll() {
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
yield this.objectMap.forEach((registryArg) => __awaiter(this, void 0, void 0, function* () {
|
|
|
|
yield registryArg.login();
|
|
|
|
}));
|
2017-08-27 23:35:21 +00:00
|
|
|
plugins.beautylog.success('logged in successfully into all available DockerRegistries!');
|
2017-08-27 23:03:59 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
exports.RegistryStorage = RegistryStorage;
|
2018-04-04 20:25:13 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kLmNsYXNzZXMucmVnaXN0cnlz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