npmci/dist/npmci.config.js

31 lines
2.3 KiB
JavaScript
Raw Normal View History

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);
2018-04-04 20:25:13 +00:00
/**
* gets the npmci portion of the npmextra.json file
*/
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
});
2018-04-04 20:25:13 +00:00
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFFQSwyQ0FBMkM7QUFDM0MsdUNBQXVDO0FBRXZDLDJDQUFtQztBQUVuQyx1Q0FBeUM7QUFTekMsb0RBQW9EO0FBQ3pDLFFBQUEsU0FBUyxHQUFHLElBQUksd0JBQWEsQ0FBQyxRQUFRLEVBQUUsR0FBRyxnQkFBSSxDQUFDLElBQUksSUFBSSxnQkFBSSxDQUFDLElBQUksRUFBRSxDQUFDLENBQUM7QUFFaEYseUJBQXlCO0FBQ3pCLElBQUksYUFBYSxHQUFHLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQzdELElBQUksYUFBYSxHQUFrQjtJQUNqQyxjQUFjLEVBQUUsRUFBRTtJQUNsQixxQkFBcUIsRUFBRSxFQUFFO0lBQ3pCLG9CQUFvQixFQUFFLEVBQUU7Q0FDekIsQ0FBQztBQUNTLFFBQUEsWUFBWSxHQUFHLGFBQWEsQ0FBQyxPQUFPLENBQWdCLE9BQU8sRUFBRSxhQUFhLENBQUMsQ0FBQztBQUV2Rjs7R0FFRztBQUNRLFFBQUEsU0FBUyxHQUFHLEdBQWlDLEVBQUU7SUFDeEQsTUFBTSxDQUFDLG9CQUFZLENBQUM7QUFDdEIsQ0FBQyxDQUFBLENBQUMifQ==