Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
process.on('exit', () => {
assert.strictEqual(warningTimes, 1);
});
process.stderr.write = (data) => {
if (writeTimes === 0)
assert.ok(leakWarning.test(data));
else
assert.fail('stderr.write should be called only once');
writeTimes++;
};
const oldDefault = EventEmitter.defaultMaxListeners;
EventEmitter.defaultMaxListeners = 1;
const e = new EventEmitter();
e.on('hello', () => {});
e.on('hello', () => {});
// TODO: Figure out how to validate console. Currently,
// there is no obvious way of validating that console
// exists here exactly when it should.
var path = require('path');
var fs = require('fs');
// hide warning //
var emitter = require('events');
emitter.defaultMaxListeners = 20;
var appRoot = 'src/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var paths = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: 'dist/',
doc:'./doc',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/',
packageName: pkg.name,
useTypeScriptForDTS: false,
importsToAdd: [],
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
'use strict';
/*jshint esversion: 6 */
const path = require('path');
const fs = require('fs');
const findRoot = require('find-root');
const runAll = require('npm-run-all');
const async = require('async');
const promisify = require('es6-promisify');
var EventEmitter = require('events');
var config = require('./config.json');
const debug = require('debug')('azure-iot-tools-build-parallel');
// See section titled "About MaxListenersExceededWarning" in https://github.com/mysticatea/npm-run-all/blob/HEAD/docs/node-api.md
EventEmitter.defaultMaxListeners = 30;
/**
* Print usage information
*/
var usage = function () {
console.log('usage: node ' + __filename + ' task');
console.log('where task is one of:');
for (var taskName in config.tasks) {
if (config.tasks.hasOwnProperty(taskName)) {
console.log(" " + taskName + " - " + config.tasks[taskName].description);
}
}
};
/**
* Do miscellaneous work necessary to set up the running of this script.
var path = require('path');
var fs = require('fs');
// hide warning //
var emitter = require('events');
emitter.defaultMaxListeners = 20;
var appRoot = 'src/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var paths = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: 'dist/',
doc:'./doc',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/',
packageName: pkg.name,
ignore: [],
useTypeScriptForDTS: false,
var path = require('path');
var fs = require('fs');
// hide warning //
var emitter = require('events');
emitter.defaultMaxListeners = 20;
var appRoot = 'src/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var paths = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: 'dist/',
doc:'./doc',
unitTests: 'test/**/*.js',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/',
packageName: pkg.name,
ignore: [],
var path = require('path');
var fs = require('fs');
// hide warning //
var emitter = require('events');
emitter.defaultMaxListeners = 20;
var appRoot = 'src/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var paths = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: 'dist/',
doc:'./doc',
sample: 'sample',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/',
packageName: pkg.name,
useTypeScriptForDTS: false,
var path = require('path');
var fs = require('fs');
// hide warning //
var emitter = require('events');
emitter.defaultMaxListeners = 20;
var appRoot = 'src/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var paths = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: 'dist/',
doc:'./doc',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/',
packageName: pkg.name,
ignore: [],
useTypeScriptForDTS: false,
var path = require('path');
var fs = require('fs');
// hide warning //
var emitter = require('events');
emitter.defaultMaxListeners = 5;
var appRoot = 'src/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var paths = {
root: appRoot,
source: appRoot + '**/*.js',
style: 'styles/**/*.css',
output: 'dist/',
doc:'./doc',
test: 'test/**/*.js',
exampleSource: 'doc/example/',
exampleOutput: 'doc/example-dist/',
packageName: pkg.name,
ignore: [],
useTypeScriptForDTS: false,
var path = require('path');
var fs = require('fs');
// hide warning //
var emitter = require('events');
emitter.defaultMaxListeners = 20;
var appRoot = 'src/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var paths = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: 'dist/',
doc:'./doc',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/',
packageName: pkg.name,
ignore: [],
useTypeScriptForDTS: false,
var path = require('path');
var fs = require('fs');
// hide warning //
var emitter = require('events');
emitter.defaultMaxListeners = 20;
var appRoot = 'src/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var paths = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: 'dist/',
doc:'./doc',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/',
packageName: pkg.name,
ignore: [],
useTypeScriptForDTS: false,