Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var mocha = require('mocha');
var assert = require('assert');
var nconf = require('nconf');
var testingKeys = nconf.env().file({
file: __dirname + '/../testing_keys.json'
});
var util = require('util');
var merge = require('merge');
var postmark = require('../lib/postmark/index.js');
describe('general client functionality', function() {
// allow some of the more intensive tests to take longer.
this.timeout(30000);
var _client = null;
beforeEach(function() {
_client = new postmark.Client(testingKeys.get('WRITE_TEST_SERVER_TOKEN'));
});
'use strict';
var mocha = require('mocha');
var assert = require('assert');
var nconf = require('nconf');
var testingKeys = nconf.env().file({
file: __dirname + '/../testing_keys.json'
});
var util = require('util');
var merge = require('merge');
var postmark = require('../lib/postmark/index.js');
describe('client email sending', function() {
// allow some of the more intensive tests to take longer.
this.timeout(30000);
var _client = null;
var testTemplateAlias = 'postmark-js-batch-testing template';
beforeEach(function() {
_client = new postmark.Client(testingKeys.get('WRITE_TEST_SERVER_TOKEN'));
_client.deleteTemplate(testTemplateAlias);
var nconf = require ('nconf')
, path = require ('path')
, winston = require ('winston')
;
// Locate the correct configuration file.
var env = process.env.NODE_ENV || 'dev';
var configFile = path.join (__dirname, '../config', env + '.json');
winston.info ('configuration=' + configFile);
// Load the configuration file for the environment.
nconf.env ().file ({file: configFile}).argv ();
// Add the environment to the configuration.
nconf.set ('env', env);
exports = module.exports = nconf;
var express = require('express')
, less = require('less')
, connect = require('connect')
, everyauth = require('everyauth')
, nconf = require('nconf')
, Recaptcha = require('recaptcha').Recaptcha;
/**
* CONFIGURATION
* -------------------------------------------------------------------------------------------------
* load configuration settings from ENV, then settings.json. Contains keys for OAuth logins. See
* settings.example.json.
**/
nconf.env().file({file: 'settings.json'});
/**
* EVERYAUTH AUTHENTICATION
* -------------------------------------------------------------------------------------------------
* allows users to log in and register using OAuth services
**/
everyauth.debug = true;
// Configure Facebook auth
var usersById = {},
nextUserId = 0,
usersByFacebookId = {},
usersByTwitId = {},
usersByLogin = {
util = require('util'),
events = require('events'),
utils = require(path.join(__dirname, 'utils')),
nconf = require('nconf');
// local imports
var ProjectEvents = require(path.join(__dirname, 'localkit', 'projectEvents')),
Monaca = require(path.join(__dirname, 'monaca')),
FileWatcher = require(path.join(__dirname, 'localkit', 'fileWatcher')),
LocalAuth = require(path.join(__dirname, 'localkit', 'localAuth')),
Api = require(path.join(__dirname, 'localkit', 'api')),
broadcastAddresses = require(path.join(__dirname, 'localkit', 'broadcastAddresses')),
inspector = require(path.join(__dirname, 'inspector'));
// config
var config = nconf.env()
.file(path.join(__dirname, 'config.json'))
.get('localkit');
var PAIRING_KEYS_FILE = path.join(
process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'],
'.cordova', 'monaca_pairing_keys.json'
);
/**
* @class Localkit
* @description
* Create localkit object.
* @param {object} monaca - Monaca object.
* @param {boolean} [verbose] - Will output log messages if true.
* @example
* var monaca = new Monaca(),
function createConfigService() {
const config = nconf.env().argv();
// Global environment
config.defaults(DEFAULT_CONFIG_FILE);
/* eslint-disable no-process-env */
if (process.env.NODE_ENV === 'development') {
config.overrides(DEVELOPMENT_CONFIG_FILE);
} else {
config.overrides(PRODUCTION_CONFIG_FILE);
}
/* eslint-ensable no-process-env */
// Set first file/store to user settings
let location = path.join(CONFIG_PATH, 'user.settings.json');
if (!isElectronRenderer) {
try {
var mocha = require('mocha');
var assert = require('assert');
var nconf = require('nconf');
var testingKeys = nconf.env().file({
file: __dirname + '/../testing_keys.json'
});
var util = require('util');
var merge = require('merge');
var postmark = require('../lib/postmark/index.js');
describe('client server handling', function() {
this.timeout(10000);
var _client = null;
beforeEach(function() {
_client = new postmark.Client(testingKeys.get('WRITE_TEST_SERVER_TOKEN'));
});
it("should retrieve current server", function(done) {
const config = require('nconf')
.env({ lowerCase: true, separator: '.' })
.argv()
.file('environment', { file: `config/${process.env.NODE_ENV}.json` })
.file('defaults', { file: 'config/default.json' });
const server = require('./server/server.js');
const PORT = config.get('port');
server.listen(PORT, () => {
console.log(`server on port:${PORT}`);
});
var nconf = require('nconf');
var filename = 'config.'+ (nconf.env().get("AssetServerEnv") || "local") +'.json';
nconf.file({ file: filename });
module.exports = nconf.get('config');
var async = require('async');
var chokidar = require('chokidar');
var osenv = require('osenv');
var cp = require('child_process');
var nconf = require('nconf');
var debounce = require('async-debounce');
var docker_ip;
nconf.env().argv().file('bdsync.json');
nconf.defaults({
'targetPath': process.cwd(),
'ignoreFile' : '.gitignore'
});
function getdockerip (cb) {
cp.exec('boot2docker ip 2>/dev/null', function (err, stdout) {
if (err) {
return cb(err);
}
docker_ip = stdout.trim();
cb();
});
}