UNPKG

rivet

Version:

Suite of utilities for working with the Rivet consumer-driven API contacts testing model.

34 lines (33 loc) 1.19 kB
"use strict"; var __assign = (this && this.__assign) || Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; Object.defineProperty(exports, "__esModule", { value: true }); var configLoader = require("../lib/configLoader"); var fs = require("fs"); var path_1 = require("path"); exports.configDefaults = { aliases: {}, appRoot: fs.realpathSync(process.cwd()), compiledContractsRoot: 'contracts/json/', contractsPath: '**/*.contract.js', contractsRoot: 'contracts/', }; var userConfig = configLoader.load(exports.configDefaults.appRoot); var Config = /** @class */ (function () { function Config(options) { if (options === void 0) { options = {}; } Object.assign(this, __assign({}, exports.configDefaults, userConfig, options, { pkgRoot: path_1.resolve(__dirname, '../../') })); } Config.prototype.set = function (options) { return Object.assign(this, options); }; return Config; }()); exports.Config = Config; exports.default = new Config();