2016-11-24 22:21:40 +00:00
|
|
|
"use strict";
|
2017-03-11 00:10:37 +00:00
|
|
|
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 });
|
2016-11-24 22:21:40 +00:00
|
|
|
const plugins = require("./npmci.plugins");
|
|
|
|
const paths = require("./npmci.paths");
|
2017-08-28 15:11:47 +00:00
|
|
|
const npmci_env_1 = require("./npmci.env");
|
|
|
|
const npmextra_1 = require("npmextra");
|
|
|
|
// instantiate a kvStorage for the current directory
|
2017-08-28 15:19:31 +00:00
|
|
|
exports.kvStorage = new npmextra_1.KeyValueStore('custom', `${npmci_env_1.repo.user}_${npmci_env_1.repo.repo}`);
|
2017-08-28 16:09:59 +00:00
|
|
|
// handle config retrival
|
|
|
|
let npmciNpmextra = new plugins.npmextra.Npmextra(paths.cwd);
|
|
|
|
let defaultConfig = {
|
|
|
|
npmGlobalTools: [],
|
2017-08-28 17:11:24 +00:00
|
|
|
dockerRegistryRepoMap: {},
|
2017-08-29 04:07:13 +00:00
|
|
|
dockerBuildargEnvMap: {}
|
2017-08-28 16:09:59 +00:00
|
|
|
};
|
|
|
|
exports.configObject = npmciNpmextra.dataFor('npmci', defaultConfig);
|
2017-03-11 00:10:37 +00:00
|
|
|
exports.getConfig = () => __awaiter(this, void 0, void 0, function* () {
|
2017-08-28 16:09:59 +00:00
|
|
|
return exports.configObject;
|
2017-03-11 00:10:37 +00:00
|
|
|
});
|
2017-08-28 17:11:24 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFFQSwyQ0FBMEM7QUFDMUMsdUNBQXNDO0FBRXRDLDJDQUFrQztBQUVsQyx1Q0FBd0M7QUFReEMsb0RBQW9EO0FBQ3pDLFFBQUEsU0FBUyxHQUFHLElBQUksd0JBQWEsQ0FBQyxRQUFRLEVBQUUsR0FBRyxnQkFBSSxDQUFDLElBQUksSUFBSSxnQkFBSSxDQUFDLElBQUksRUFBRSxDQUFDLENBQUE7QUFFL0UseUJBQXlCO0FBQ3pCLElBQUksYUFBYSxHQUFHLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFBO0FBQzVELElBQUksYUFBYSxHQUFrQjtJQUNqQyxjQUFjLEVBQUUsRUFBRTtJQUNsQixxQkFBcUIsRUFBRSxFQUFFO0lBQ3pCLG9CQUFvQixFQUFFLEVBQUU7Q0FDekIsQ0FBQTtBQUNVLFFBQUEsWUFBWSxHQUFHLGFBQWEsQ0FBQyxPQUFPLENBQWdCLE9BQU8sRUFBRSxhQUFhLENBQUMsQ0FBQTtBQUUzRSxRQUFBLFNBQVMsR0FBRztJQUNyQixNQUFNLENBQUMsb0JBQVksQ0FBQTtBQUNyQixDQUFDLENBQUEsQ0FBQSJ9
|