aboutsummaryrefslogtreecommitdiff
path: root/node_modules/npm-conf
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/npm-conf')
-rw-r--r--node_modules/npm-conf/index.js43
-rw-r--r--node_modules/npm-conf/lib/conf.js174
-rw-r--r--node_modules/npm-conf/lib/defaults.js169
-rw-r--r--node_modules/npm-conf/lib/make.js91
-rw-r--r--node_modules/npm-conf/lib/types.js127
-rw-r--r--node_modules/npm-conf/lib/util.js147
-rw-r--r--node_modules/npm-conf/license9
-rw-r--r--node_modules/npm-conf/node_modules/pify/index.js84
-rw-r--r--node_modules/npm-conf/node_modules/pify/license9
-rw-r--r--node_modules/npm-conf/node_modules/pify/package.json51
-rw-r--r--node_modules/npm-conf/node_modules/pify/readme.md131
-rw-r--r--node_modules/npm-conf/package.json50
-rw-r--r--node_modules/npm-conf/readme.md47
13 files changed, 1132 insertions, 0 deletions
diff --git a/node_modules/npm-conf/index.js b/node_modules/npm-conf/index.js
new file mode 100644
index 0000000..ee735e1
--- /dev/null
+++ b/node_modules/npm-conf/index.js
@@ -0,0 +1,43 @@
+'use strict';
+const path = require('path');
+const Conf = require('./lib/conf');
+const defaults = require('./lib/defaults');
+
+// https://github.com/npm/npm/blob/latest/lib/config/core.js#L101-L200
+module.exports = opts => {
+ const conf = new Conf(Object.assign({}, defaults.defaults));
+
+ conf.add(Object.assign({}, opts), 'cli');
+ conf.addEnv();
+ conf.loadPrefix();
+
+ const projectConf = path.resolve(conf.localPrefix, '.npmrc');
+ const userConf = conf.get('userconfig');
+
+ if (!conf.get('global') && projectConf !== userConf) {
+ conf.addFile(projectConf, 'project');
+ } else {
+ conf.add({}, 'project');
+ }
+
+ conf.addFile(conf.get('userconfig'), 'user');
+
+ if (conf.get('prefix')) {
+ const etc = path.resolve(conf.get('prefix'), 'etc');
+ conf.root.globalconfig = path.resolve(etc, 'npmrc');
+ conf.root.globalignorefile = path.resolve(etc, 'npmignore');
+ }
+
+ conf.addFile(conf.get('globalconfig'), 'global');
+ conf.loadUser();
+
+ const caFile = conf.get('cafile');
+
+ if (caFile) {
+ conf.loadCAFile(caFile);
+ }
+
+ return conf;
+};
+
+module.exports.defaults = Object.assign({}, defaults.defaults);
diff --git a/node_modules/npm-conf/lib/conf.js b/node_modules/npm-conf/lib/conf.js
new file mode 100644
index 0000000..b2a8f0a
--- /dev/null
+++ b/node_modules/npm-conf/lib/conf.js
@@ -0,0 +1,174 @@
+'use strict';
+const fs = require('fs');
+const path = require('path');
+const ConfigChain = require('config-chain').ConfigChain;
+const util = require('./util');
+
+class Conf extends ConfigChain {
+ // https://github.com/npm/npm/blob/latest/lib/config/core.js#L208-L222
+ constructor(base) {
+ super(base);
+ this.root = base;
+ }
+
+ // https://github.com/npm/npm/blob/latest/lib/config/core.js#L332-L342
+ add(data, marker) {
+ try {
+ for (const x of Object.keys(data)) {
+ data[x] = util.parseField(data[x], x);
+ }
+ } catch (err) {
+ throw err;
+ }
+
+ return super.add(data, marker);
+ }
+
+ // https://github.com/npm/npm/blob/latest/lib/config/core.js#L312-L325
+ addFile(file, name) {
+ name = name || file;
+
+ const marker = {__source__: name};
+
+ this.sources[name] = {path: file, type: 'ini'};
+ this.push(marker);
+ this._await();
+
+ try {
+ const contents = fs.readFileSync(file, 'utf8');
+ this.addString(contents, file, 'ini', marker);
+ } catch (err) {
+ this.add({}, marker);
+ }
+
+ return this;
+ }
+
+ // https://github.com/npm/npm/blob/latest/lib/config/core.js#L344-L360
+ addEnv(env) {
+ env = env || process.env;
+
+ const conf = {};
+
+ Object.keys(env)
+ .filter(x => /^npm_config_/i.test(x))
+ .forEach(x => {
+ if (!env[x]) {
+ return;
+ }
+
+ const p = x.toLowerCase()
+ .replace(/^npm_config_/, '')
+ .replace(/(?!^)_/g, '-');
+
+ conf[p] = env[x];
+ });
+
+ return super.addEnv('', conf, 'env');
+ }
+
+ // https://github.com/npm/npm/blob/latest/lib/config/load-prefix.js
+ loadPrefix() {
+ const cli = this.list[0];
+
+ Object.defineProperty(this, 'prefix', {
+ enumerable: true,
+ set: prefix => {
+ const g = this.get('global');
+ this[g ? 'globalPrefix' : 'localPrefix'] = prefix;
+ },
+ get: () => {
+ const g = this.get('global');
+ return g ? this.globalPrefix : this.localPrefix;
+ }
+ });
+
+ Object.defineProperty(this, 'globalPrefix', {
+ enumerable: true,
+ set: prefix => {
+ this.set('prefix', prefix);
+ },
+ get: () => {
+ return path.resolve(this.get('prefix'));
+ }
+ });
+
+ let p;
+
+ Object.defineProperty(this, 'localPrefix', {
+ enumerable: true,
+ set: prefix => {
+ p = prefix;
+ },
+ get: () => {
+ return p;
+ }
+ });
+
+ if (Object.prototype.hasOwnProperty.call(cli, 'prefix')) {
+ p = path.resolve(cli.prefix);
+ } else {
+ try {
+ const prefix = util.findPrefix(process.cwd());
+ p = prefix;
+ } catch (err) {
+ throw err;
+ }
+ }
+
+ return p;
+ }
+
+ // https://github.com/npm/npm/blob/latest/lib/config/load-cafile.js
+ loadCAFile(file) {
+ if (!file) {
+ return;
+ }
+
+ try {
+ const contents = fs.readFileSync(file, 'utf8');
+ const delim = '-----END CERTIFICATE-----';
+ const output = contents
+ .split(delim)
+ .filter(x => Boolean(x.trim()))
+ .map(x => x.trimLeft() + delim);
+
+ this.set('ca', output);
+ } catch (err) {
+ if (err.code === 'ENOENT') {
+ return;
+ }
+
+ throw err;
+ }
+ }
+
+ // https://github.com/npm/npm/blob/latest/lib/config/set-user.js
+ loadUser() {
+ const defConf = this.root;
+
+ if (this.get('global')) {
+ return;
+ }
+
+ if (process.env.SUDO_UID) {
+ defConf.user = Number(process.env.SUDO_UID);
+ return;
+ }
+
+ const prefix = path.resolve(this.get('prefix'));
+
+ try {
+ const stats = fs.statSync(prefix);
+ defConf.user = stats.uid;
+ } catch (err) {
+ if (err.code === 'ENOENT') {
+ return;
+ }
+
+ throw err;
+ }
+ }
+}
+
+module.exports = Conf;
diff --git a/node_modules/npm-conf/lib/defaults.js b/node_modules/npm-conf/lib/defaults.js
new file mode 100644
index 0000000..6c0db4a
--- /dev/null
+++ b/node_modules/npm-conf/lib/defaults.js
@@ -0,0 +1,169 @@
+
+ // Generated with `lib/make.js`
+ 'use strict';
+ const os = require('os');
+ const path = require('path');
+
+ const temp = os.tmpdir();
+ const uidOrPid = process.getuid ? process.getuid() : process.pid;
+ const hasUnicode = () => true;
+ const isWindows = process.platform === 'win32';
+
+ const osenv = {
+ editor: () => process.env.EDITOR || process.env.VISUAL || (isWindows ? 'notepad.exe' : 'vi'),
+ shell: () => isWindows ? (process.env.COMSPEC || 'cmd.exe') : (process.env.SHELL || '/bin/bash')
+ };
+
+ const umask = {
+ fromString: () => process.umask()
+ };
+
+ let home = os.homedir();
+
+ if (home) {
+ process.env.HOME = home;
+ } else {
+ home = path.resolve(temp, 'npm-' + uidOrPid);
+ }
+
+ const cacheExtra = process.platform === 'win32' ? 'npm-cache' : '.npm';
+ const cacheRoot = process.platform === 'win32' ? process.env.APPDATA : home;
+ const cache = path.resolve(cacheRoot, cacheExtra);
+
+ let defaults;
+ let globalPrefix;
+
+ Object.defineProperty(exports, 'defaults', {
+ get: function () {
+ if (defaults) return defaults;
+
+ if (process.env.PREFIX) {
+ globalPrefix = process.env.PREFIX;
+ } else if (process.platform === 'win32') {
+ // c:\node\node.exe --> prefix=c:\node\
+ globalPrefix = path.dirname(process.execPath);
+ } else {
+ // /usr/local/bin/node --> prefix=/usr/local
+ globalPrefix = path.dirname(path.dirname(process.execPath)); // destdir only is respected on Unix
+
+ if (process.env.DESTDIR) {
+ globalPrefix = path.join(process.env.DESTDIR, globalPrefix);
+ }
+ }
+
+ defaults = {
+ access: null,
+ 'allow-same-version': false,
+ 'always-auth': false,
+ also: null,
+ 'auth-type': 'legacy',
+ 'bin-links': true,
+ browser: null,
+ ca: null,
+ cafile: null,
+ cache: cache,
+ 'cache-lock-stale': 60000,
+ 'cache-lock-retries': 10,
+ 'cache-lock-wait': 10000,
+ 'cache-max': Infinity,
+ 'cache-min': 10,
+ cert: null,
+ color: true,
+ depth: Infinity,
+ description: true,
+ dev: false,
+ 'dry-run': false,
+ editor: osenv.editor(),
+ 'engine-strict': false,
+ force: false,
+ 'fetch-retries': 2,
+ 'fetch-retry-factor': 10,
+ 'fetch-retry-mintimeout': 10000,
+ 'fetch-retry-maxtimeout': 60000,
+ git: 'git',
+ 'git-tag-version': true,
+ global: false,
+ globalconfig: path.resolve(globalPrefix, 'etc', 'npmrc'),
+ 'global-style': false,
+ group: process.platform === 'win32' ? 0 : process.env.SUDO_GID || process.getgid && process.getgid(),
+ 'ham-it-up': false,
+ heading: 'npm',
+ 'if-present': false,
+ 'ignore-prepublish': false,
+ 'ignore-scripts': false,
+ 'init-module': path.resolve(home, '.npm-init.js'),
+ 'init-author-name': '',
+ 'init-author-email': '',
+ 'init-author-url': '',
+ 'init-version': '1.0.0',
+ 'init-license': 'ISC',
+ json: false,
+ key: null,
+ 'legacy-bundling': false,
+ link: false,
+ 'local-address': undefined,
+ loglevel: 'notice',
+ logstream: process.stderr,
+ 'logs-max': 10,
+ long: false,
+ maxsockets: 50,
+ message: '%s',
+ 'metrics-registry': null,
+ 'node-version': process.version,
+ 'offline': false,
+ 'onload-script': false,
+ only: null,
+ optional: true,
+ 'package-lock': true,
+ parseable: false,
+ 'prefer-offline': false,
+ 'prefer-online': false,
+ prefix: globalPrefix,
+ production: process.env.NODE_ENV === 'production',
+ 'progress': !process.env.TRAVIS && !process.env.CI,
+ 'proprietary-attribs': true,
+ proxy: null,
+ 'https-proxy': null,
+ 'user-agent': 'npm/{npm-version} ' + 'node/{node-version} ' + '{platform} ' + '{arch}',
+ 'rebuild-bundle': true,
+ registry: 'https://registry.npmjs.org/',
+ rollback: true,
+ save: true,
+ 'save-bundle': false,
+ 'save-dev': false,
+ 'save-exact': false,
+ 'save-optional': false,
+ 'save-prefix': '^',
+ 'save-prod': false,
+ scope: '',
+ 'script-shell': null,
+ 'scripts-prepend-node-path': 'warn-only',
+ searchopts: '',
+ searchexclude: null,
+ searchlimit: 20,
+ searchstaleness: 15 * 60,
+ 'send-metrics': false,
+ shell: osenv.shell(),
+ shrinkwrap: true,
+ 'sign-git-tag': false,
+ 'sso-poll-frequency': 500,
+ 'sso-type': 'oauth',
+ 'strict-ssl': true,
+ tag: 'latest',
+ 'tag-version-prefix': 'v',
+ timing: false,
+ tmp: temp,
+ unicode: hasUnicode(),
+ 'unsafe-perm': process.platform === 'win32' || process.platform === 'cygwin' || !(process.getuid && process.setuid && process.getgid && process.setgid) || process.getuid() !== 0,
+ usage: false,
+ user: process.platform === 'win32' ? 0 : 'nobody',
+ userconfig: path.resolve(home, '.npmrc'),
+ umask: process.umask ? process.umask() : umask.fromString('022'),
+ version: false,
+ versions: false,
+ viewer: process.platform === 'win32' ? 'browser' : 'man',
+ _exit: true
+ };
+ return defaults;
+ }
+})
diff --git a/node_modules/npm-conf/lib/make.js b/node_modules/npm-conf/lib/make.js
new file mode 100644
index 0000000..fb79d6c
--- /dev/null
+++ b/node_modules/npm-conf/lib/make.js
@@ -0,0 +1,91 @@
+'use strict';
+const fs = require('fs');
+const path = require('path');
+const babylon = require('babylon');
+const generate = require('babel-generator').default;
+const traverse = require('babel-traverse').default;
+
+const defaultsTemplate = body => `
+ // Generated with \`lib/make.js\`
+ 'use strict';
+ const os = require('os');
+ const path = require('path');
+
+ const temp = os.tmpdir();
+ const uidOrPid = process.getuid ? process.getuid() : process.pid;
+ const hasUnicode = () => true;
+ const isWindows = process.platform === 'win32';
+
+ const osenv = {
+ editor: () => process.env.EDITOR || process.env.VISUAL || (isWindows ? 'notepad.exe' : 'vi'),
+ shell: () => isWindows ? (process.env.COMSPEC || 'cmd.exe') : (process.env.SHELL || '/bin/bash')
+ };
+
+ const umask = {
+ fromString: () => process.umask()
+ };
+
+ let home = os.homedir();
+
+ if (home) {
+ process.env.HOME = home;
+ } else {
+ home = path.resolve(temp, 'npm-' + uidOrPid);
+ }
+
+ const cacheExtra = process.platform === 'win32' ? 'npm-cache' : '.npm';
+ const cacheRoot = process.platform === 'win32' ? process.env.APPDATA : home;
+ const cache = path.resolve(cacheRoot, cacheExtra);
+
+ let defaults;
+ let globalPrefix;
+
+ ${body}
+`;
+
+const typesTemplate = body => `
+ // Generated with \`lib/make.js\`
+ 'use strict';
+ const path = require('path');
+ const Stream = require('stream').Stream;
+ const url = require('url');
+
+ const Umask = () => {};
+ const getLocalAddresses = () => [];
+ const semver = () => {};
+
+ ${body}
+`;
+
+const defaults = require.resolve('npm/lib/config/defaults');
+const ast = babylon.parse(fs.readFileSync(defaults, 'utf8'));
+
+const isDefaults = node =>
+ node.callee.type === 'MemberExpression' &&
+ node.callee.object.name === 'Object' &&
+ node.callee.property.name === 'defineProperty' &&
+ node.arguments.some(x => x.name === 'exports');
+
+const isTypes = node =>
+ node.type === 'MemberExpression' &&
+ node.object.name === 'exports' &&
+ node.property.name === 'types';
+
+let defs;
+let types;
+
+traverse(ast, {
+ CallExpression(path) {
+ if (isDefaults(path.node)) {
+ defs = path.node;
+ }
+ },
+ AssignmentExpression(path) {
+ if (path.node.left && isTypes(path.node.left)) {
+ types = path.node;
+ }
+ }
+});
+
+fs.writeFileSync(path.join(__dirname, 'defaults.js'), defaultsTemplate(generate(defs, {}, ast).code));
+fs.writeFileSync(path.join(__dirname, 'types.js'), typesTemplate(generate(types, {}, ast).code));
diff --git a/node_modules/npm-conf/lib/types.js b/node_modules/npm-conf/lib/types.js
new file mode 100644
index 0000000..ae82bc5
--- /dev/null
+++ b/node_modules/npm-conf/lib/types.js
@@ -0,0 +1,127 @@
+
+ // Generated with `lib/make.js`
+ 'use strict';
+ const path = require('path');
+ const Stream = require('stream').Stream;
+ const url = require('url');
+
+ const Umask = () => {};
+ const getLocalAddresses = () => [];
+ const semver = () => {};
+
+ exports.types = {
+ access: [null, 'restricted', 'public'],
+ 'allow-same-version': Boolean,
+ 'always-auth': Boolean,
+ also: [null, 'dev', 'development'],
+ 'auth-type': ['legacy', 'sso', 'saml', 'oauth'],
+ 'bin-links': Boolean,
+ browser: [null, String],
+ ca: [null, String, Array],
+ cafile: path,
+ cache: path,
+ 'cache-lock-stale': Number,
+ 'cache-lock-retries': Number,
+ 'cache-lock-wait': Number,
+ 'cache-max': Number,
+ 'cache-min': Number,
+ cert: [null, String],
+ color: ['always', Boolean],
+ depth: Number,
+ description: Boolean,
+ dev: Boolean,
+ 'dry-run': Boolean,
+ editor: String,
+ 'engine-strict': Boolean,
+ force: Boolean,
+ 'fetch-retries': Number,
+ 'fetch-retry-factor': Number,
+ 'fetch-retry-mintimeout': Number,
+ 'fetch-retry-maxtimeout': Number,
+ git: String,
+ 'git-tag-version': Boolean,
+ global: Boolean,
+ globalconfig: path,
+ 'global-style': Boolean,
+ group: [Number, String],
+ 'https-proxy': [null, url],
+ 'user-agent': String,
+ 'ham-it-up': Boolean,
+ 'heading': String,
+ 'if-present': Boolean,
+ 'ignore-prepublish': Boolean,
+ 'ignore-scripts': Boolean,
+ 'init-module': path,
+ 'init-author-name': String,
+ 'init-author-email': String,
+ 'init-author-url': ['', url],
+ 'init-license': String,
+ 'init-version': semver,
+ json: Boolean,
+ key: [null, String],
+ 'legacy-bundling': Boolean,
+ link: Boolean,
+ // local-address must be listed as an IP for a local network interface
+ // must be IPv4 due to node bug
+ 'local-address': getLocalAddresses(),
+ loglevel: ['silent', 'error', 'warn', 'notice', 'http', 'timing', 'info', 'verbose', 'silly'],
+ logstream: Stream,
+ 'logs-max': Number,
+ long: Boolean,
+ maxsockets: Number,
+ message: String,
+ 'metrics-registry': [null, String],
+ 'node-version': [null, semver],
+ offline: Boolean,
+ 'onload-script': [null, String],
+ only: [null, 'dev', 'development', 'prod', 'production'],
+ optional: Boolean,
+ 'package-lock': Boolean,
+ parseable: Boolean,
+ 'prefer-offline': Boolean,
+ 'prefer-online': Boolean,
+ prefix: path,
+ production: Boolean,
+ progress: Boolean,
+ 'proprietary-attribs': Boolean,
+ proxy: [null, false, url],
+ // allow proxy to be disabled explicitly
+ 'rebuild-bundle': Boolean,
+ registry: [null, url],
+ rollback: Boolean,
+ save: Boolean,
+ 'save-bundle': Boolean,
+ 'save-dev': Boolean,
+ 'save-exact': Boolean,
+ 'save-optional': Boolean,
+ 'save-prefix': String,
+ 'save-prod': Boolean,
+ scope: String,
+ 'script-shell': [null, String],
+ 'scripts-prepend-node-path': [false, true, 'auto', 'warn-only'],
+ searchopts: String,
+ searchexclude: [null, String],
+ searchlimit: Number,
+ searchstaleness: Number,
+ 'send-metrics': Boolean,
+ shell: String,
+ shrinkwrap: Boolean,
+ 'sign-git-tag': Boolean,
+ 'sso-poll-frequency': Number,
+ 'sso-type': [null, 'oauth', 'saml'],
+ 'strict-ssl': Boolean,
+ tag: String,
+ timing: Boolean,
+ tmp: path,
+ unicode: Boolean,
+ 'unsafe-perm': Boolean,
+ usage: Boolean,
+ user: [Number, String],
+ userconfig: path,
+ umask: Umask,
+ version: Boolean,
+ 'tag-version-prefix': String,
+ versions: Boolean,
+ viewer: String,
+ _exit: Boolean
+}
diff --git a/node_modules/npm-conf/lib/util.js b/node_modules/npm-conf/lib/util.js
new file mode 100644
index 0000000..5cde7bc
--- /dev/null
+++ b/node_modules/npm-conf/lib/util.js
@@ -0,0 +1,147 @@
+'use strict';
+const fs = require('fs');
+const path = require('path');
+const types = require('./types');
+
+// https://github.com/npm/npm/blob/latest/lib/config/core.js#L409-L423
+const envReplace = str => {
+ if (typeof str !== 'string' || !str) {
+ return str;
+ }
+
+ // Replace any ${ENV} values with the appropriate environment
+ const regex = /(\\*)\$\{([^}]+)\}/g;
+
+ return str.replace(regex, (orig, esc, name) => {
+ esc = esc.length > 0 && esc.length % 2;
+
+ if (esc) {
+ return orig;
+ }
+
+ if (process.env[name] === undefined) {
+ throw new Error(`Failed to replace env in config: ${orig}`);
+ }
+
+ return process.env[name];
+ });
+};
+
+// https://github.com/npm/npm/blob/latest/lib/config/core.js#L362-L407
+const parseField = (field, key) => {
+ if (typeof field !== 'string') {
+ return field;
+ }
+
+ const typeList = [].concat(types[key]);
+ const isPath = typeList.indexOf(path) !== -1;
+ const isBool = typeList.indexOf(Boolean) !== -1;
+ const isString = typeList.indexOf(String) !== -1;
+ const isNumber = typeList.indexOf(Number) !== -1;
+
+ field = `${field}`.trim();
+
+ if (/^".*"$/.test(field)) {
+ try {
+ field = JSON.parse(field);
+ } catch (err) {
+ throw new Error(`Failed parsing JSON config key ${key}: ${field}`);
+ }
+ }
+
+ if (isBool && !isString && field === '') {
+ return true;
+ }
+
+ switch (field) { // eslint-disable-line default-case
+ case 'true': {
+ return true;
+ }
+
+ case 'false': {
+ return false;
+ }
+
+ case 'null': {
+ return null;
+ }
+
+ case 'undefined': {
+ return undefined;
+ }
+ }
+
+ field = envReplace(field);
+
+ if (isPath) {
+ const regex = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\//;
+
+ if (regex.test(field) && process.env.HOME) {
+ field = path.resolve(process.env.HOME, field.substr(2));
+ }
+
+ field = path.resolve(field);
+ }
+
+ if (isNumber && !field.isNan()) {
+ field = Number(field);
+ }
+
+ return field;
+};
+
+// https://github.com/npm/npm/blob/latest/lib/config/find-prefix.js
+const findPrefix = name => {
+ name = path.resolve(name);
+
+ let walkedUp = false;
+
+ while (path.basename(name) === 'node_modules') {
+ name = path.dirname(name);
+ walkedUp = true;
+ }
+
+ if (walkedUp) {
+ return name;
+ }
+
+ const find = (name, original) => {
+ const regex = /^[a-zA-Z]:(\\|\/)?$/;
+
+ if (name === '/' || (process.platform === 'win32' && regex.test(name))) {
+ return original;
+ }
+
+ try {
+ const files = fs.readdirSync(name);
+
+ if (files.indexOf('node_modules') !== -1 || files.indexOf('package.json') !== -1) {
+ return name;
+ }
+
+ const dirname = path.dirname(name);
+
+ if (dirname === name) {
+ return original;
+ }
+
+ return find(dirname, original);
+ } catch (err) {
+ if (name === original) {
+ if (err.code === 'ENOENT') {
+ return original;
+ }
+
+ throw err;
+ }
+
+ return original;
+ }
+ };
+
+ return find(name, name);
+};
+
+exports.envReplace = envReplace;
+exports.findPrefix = findPrefix;
+exports.parseField = parseField;
diff --git a/node_modules/npm-conf/license b/node_modules/npm-conf/license
new file mode 100644
index 0000000..db6bc32
--- /dev/null
+++ b/node_modules/npm-conf/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> (github.com/kevva)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/npm-conf/node_modules/pify/index.js b/node_modules/npm-conf/node_modules/pify/index.js
new file mode 100644
index 0000000..1dee43a
--- /dev/null
+++ b/node_modules/npm-conf/node_modules/pify/index.js
@@ -0,0 +1,84 @@
+'use strict';
+
+const processFn = (fn, opts) => function () {
+ const P = opts.promiseModule;
+ const args = new Array(arguments.length);
+
+ for (let i = 0; i < arguments.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ return new P((resolve, reject) => {
+ if (opts.errorFirst) {
+ args.push(function (err, result) {
+ if (opts.multiArgs) {
+ const results = new Array(arguments.length - 1);
+
+ for (let i = 1; i < arguments.length; i++) {
+ results[i - 1] = arguments[i];
+ }
+
+ if (err) {
+ results.unshift(err);
+ reject(results);
+ } else {
+ resolve(results);
+ }
+ } else if (err) {
+ reject(err);
+ } else {
+ resolve(result);
+ }
+ });
+ } else {
+ args.push(function (result) {
+ if (opts.multiArgs) {
+ const results = new Array(arguments.length - 1);
+
+ for (let i = 0; i < arguments.length; i++) {
+ results[i] = arguments[i];
+ }
+
+ resolve(results);
+ } else {
+ resolve(result);
+ }
+ });
+ }
+
+ fn.apply(this, args);
+ });
+};
+
+module.exports = (obj, opts) => {
+ opts = Object.assign({
+ exclude: [/.+(Sync|Stream)$/],
+ errorFirst: true,
+ promiseModule: Promise
+ }, opts);
+
+ const filter = key => {
+ const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);
+ return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
+ };
+
+ let ret;
+ if (typeof obj === 'function') {
+ ret = function () {
+ if (opts.excludeMain) {
+ return obj.apply(this, arguments);
+ }
+
+ return processFn(obj, opts).apply(this, arguments);
+ };
+ } else {
+ ret = Object.create(Object.getPrototypeOf(obj));
+ }
+
+ for (const key in obj) { // eslint-disable-line guard-for-in
+ const x = obj[key];
+ ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x;
+ }
+
+ return ret;
+};
diff --git a/node_modules/npm-conf/node_modules/pify/license b/node_modules/npm-conf/node_modules/pify/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/npm-conf/node_modules/pify/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/npm-conf/node_modules/pify/package.json b/node_modules/npm-conf/node_modules/pify/package.json
new file mode 100644
index 0000000..468d857
--- /dev/null
+++ b/node_modules/npm-conf/node_modules/pify/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "pify",
+ "version": "3.0.0",
+ "description": "Promisify a callback-style function",
+ "license": "MIT",
+ "repository": "sindresorhus/pify",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava && npm run optimization-test",
+ "optimization-test": "node --allow-natives-syntax optimization-test.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "promise",
+ "promises",
+ "promisify",
+ "all",
+ "denodify",
+ "denodeify",
+ "callback",
+ "cb",
+ "node",
+ "then",
+ "thenify",
+ "convert",
+ "transform",
+ "wrap",
+ "wrapper",
+ "bind",
+ "to",
+ "async",
+ "await",
+ "es2015",
+ "bluebird"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "pinkie-promise": "^2.0.0",
+ "v8-natives": "^1.0.0",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/npm-conf/node_modules/pify/readme.md b/node_modules/npm-conf/node_modules/pify/readme.md
new file mode 100644
index 0000000..376ca4e
--- /dev/null
+++ b/node_modules/npm-conf/node_modules/pify/readme.md
@@ -0,0 +1,131 @@
+# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify)
+
+> Promisify a callback-style function
+
+
+## Install
+
+```
+$ npm install --save pify
+```
+
+
+## Usage
+
+```js
+const fs = require('fs');
+const pify = require('pify');
+
+// Promisify a single function
+pify(fs.readFile)('package.json', 'utf8').then(data => {
+ console.log(JSON.parse(data).name);
+ //=> 'pify'
+});
+
+// Promisify all methods in a module
+pify(fs).readFile('package.json', 'utf8').then(data => {
+ console.log(JSON.parse(data).name);
+ //=> 'pify'
+});
+```
+
+
+## API
+
+### pify(input, [options])
+
+Returns a `Promise` wrapped version of the supplied function or module.
+
+#### input
+
+Type: `Function` `Object`
+
+Callback-style function or module whose methods you want to promisify.
+
+#### options
+
+##### multiArgs
+
+Type: `boolean`<br>
+Default: `false`
+
+By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. This also applies to rejections, where it returns an array of all the callback arguments, including the error.
+
+```js
+const request = require('request');
+const pify = require('pify');
+
+pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => {
+ const [httpResponse, body] = result;
+});
+```
+
+##### include
+
+Type: `string[]` `RegExp[]`
+
+Methods in a module to promisify. Remaining methods will be left untouched.
+
+##### exclude
+
+Type: `string[]` `RegExp[]`<br>
+Default: `[/.+(Sync|Stream)$/]`
+
+Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default.
+
+##### excludeMain
+
+Type: `boolean`<br>
+Default: `false`
+
+If given module is a function itself, it will be promisified. Turn this option on if you want to promisify only methods of the module.
+
+```js
+const pify = require('pify');
+
+function fn() {
+ return true;
+}
+
+fn.method = (data, callback) => {
+ setImmediate(() => {
+ callback(null, data);
+ });
+};
+
+// Promisify methods but not `fn()`
+const promiseFn = pify(fn, {excludeMain: true});
+
+if (promiseFn()) {
+ promiseFn.method('hi').then(data => {
+ console.log(data);
+ });
+}
+```
+
+##### errorFirst
+
+Type: `boolean`<br>
+Default: `true`
+
+Whether the callback has an error as the first argument. You'll want to set this to `false` if you're dealing with an API that doesn't have an error as the first argument, like `fs.exists()`, some browser APIs, Chrome Extension APIs, etc.
+
+##### promiseModule
+
+Type: `Function`
+
+Custom promise module to use instead of the native one.
+
+Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill.
+
+
+## Related
+
+- [p-event](https://github.com/sindresorhus/p-event) - Promisify an event by waiting for it to be emitted
+- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently
+- [More…](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/npm-conf/package.json b/node_modules/npm-conf/package.json
new file mode 100644
index 0000000..ac93509
--- /dev/null
+++ b/node_modules/npm-conf/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "npm-conf",
+ "version": "1.1.3",
+ "description": "Get the npm config",
+ "license": "MIT",
+ "repository": "kevva/npm-conf",
+ "author": {
+ "name": "Kevin Martensson",
+ "email": "kevinmartensson@gmail.com",
+ "url": "github.com/kevva"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "prepublish": "node lib/make.js",
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js",
+ "lib"
+ ],
+ "keywords": [
+ "conf",
+ "config",
+ "global",
+ "npm",
+ "path",
+ "prefix",
+ "rc"
+ ],
+ "dependencies": {
+ "config-chain": "^1.1.11",
+ "pify": "^3.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "babel-generator": "^6.24.1",
+ "babel-traverse": "^6.24.1",
+ "babylon": "^6.17.1",
+ "npm": "^5.0.4",
+ "xo": "*"
+ },
+ "xo": {
+ "ignores": [
+ "lib/defaults.js",
+ "lib/types.js"
+ ]
+ }
+}
diff --git a/node_modules/npm-conf/readme.md b/node_modules/npm-conf/readme.md
new file mode 100644
index 0000000..d346d3e
--- /dev/null
+++ b/node_modules/npm-conf/readme.md
@@ -0,0 +1,47 @@
+# npm-conf [![Build Status](https://travis-ci.org/kevva/npm-conf.svg?branch=master)](https://travis-ci.org/kevva/npm-conf)
+
+> Get the npm config
+
+
+## Install
+
+```
+$ npm install npm-conf
+```
+
+
+## Usage
+
+```js
+const npmConf = require('npm-conf');
+
+const conf = npmConf();
+
+conf.get('prefix')
+//=> //=> /Users/unicorn/.npm-packages
+
+conf.get('registry')
+//=> https://registry.npmjs.org/
+```
+
+To get a list of all available `npm` config options:
+
+```bash
+$ npm config list --long
+```
+
+
+## API
+
+### npmConf()
+
+Returns the `npm` config.
+
+### npmConf.defaults
+
+Returns the default `npm` config.
+
+
+## License
+
+MIT © [Kevin Mårtensson](https://github.com/kevva)