Skip to content

Commit

Permalink
refactor: removes unused imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
medanat committed Jul 19, 2018
1 parent 6466ee4 commit b8b48e8
Show file tree
Hide file tree
Showing 20 changed files with 1 addition and 47 deletions.
1 change: 0 additions & 1 deletion lib/API/CliUx.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ var p = require('path');
var chalk = require('chalk');
var Common = require('../Common');
var Spinner = require('./Spinner.js');
var os = require('os');
var UX = module.exports = {};

/**
Expand Down
2 changes: 0 additions & 2 deletions lib/API/Configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ var cst = require('../../constants.js');
var UX = require('./CliUx');
var chalk = require('chalk');
var Configuration = require('../Configuration.js');
//@todo double check that imported methods works
var InteractorDaemonizer = require('@pm2/agent/src/InteractorClient');

module.exports = function(CLI) {

Expand Down
1 change: 0 additions & 1 deletion lib/API/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
var os = require('os');
var p = require('path');
var blessed = require('blessed');
var fs = require('fs');
var debug = require('debug')('pm2:monit');
var sprintf = require('sprintf-js').sprintf;

Expand Down
8 changes: 0 additions & 8 deletions lib/API/Modules/Modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ var UX = require('../CliUx');
var chalk = require('chalk');
var forEachLimit = require('async/forEachLimit');

var path = require('path');
var fs = require('fs');
var p = path;
var Configuration = require('../../Configuration.js');
var Utility = require('../../Utility.js');

var MODULE_CONF_PREFIX = 'module-db';

var Modularizer = require('./Modularizer.js');
var ModularizerV1 = require('./Modularizerv1.js');

Expand Down
2 changes: 0 additions & 2 deletions lib/API/Startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Use of this source code is governed by a license that
* can be found in the LICENSE file.
*/
var debug = require('debug')('pm2:cli:startup');
var chalk = require('chalk');
var path = require('path');
var fs = require('fs');
Expand All @@ -12,7 +11,6 @@ var eachLimit = require('async/eachLimit');
var exec = require('child_process').exec;
var Common = require('../Common.js');
var cst = require('../../constants.js');
var spawn = require('child_process').spawn;

module.exports = function(CLI) {
/**
Expand Down
5 changes: 0 additions & 5 deletions lib/API/pm2-plus/PM2IO.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
'use strict'

var cst = require('../../../constants.js');
var Common = require('../../Common.js');
var KMDaemon = require('@pm2/agent/src/InteractorClient');
const chalk = require('chalk');
const path = require('path');
const fs = require('fs');
const Table = require('cli-table-redemption');
const open = require('../../tools/open.js');
const pkg = require('../../../package.json')
const IOAPI = require('@pm2/js-api')
const semver = require('semver');
const Modularizer = require('../Modules/Modularizer.js');
const promptly = require('promptly')

var CLIAuthStrategy
Expand Down
3 changes: 0 additions & 3 deletions lib/API/pm2-plus/auth-strategies/WebAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ const fs = require('fs')
const url = require('url')
const exec = require('child_process').exec
const tryEach = require('async/tryEach')
const path = require('path')
const os = require('os')
const needle = require('needle');

module.exports = class CustomStrategy extends AuthStrategy {
// the client will try to call this but we handle this part ourselves
Expand Down
7 changes: 0 additions & 7 deletions lib/API/pm2-plus/helpers.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@

var cst = require('../../../constants.js');
var Common = require('../../Common.js');
var KMDaemon = require('@pm2/agent/src/InteractorClient');

const chalk = require('chalk');
const forEach = require('async/forEach');
const path = require('path');
const fs = require('fs');
const Table = require('cli-table-redemption');
const open = require('../../tools/open.js');
const pkg = require('../../../package.json')
const IOAPI = require('@pm2/js-api')
const semver = require('semver');
const Modularizer = require('../Modules/Modularizer.js');
const promptly = require('promptly')

function processesAreAlreadyMonitored(CLI, cb) {
CLI.Client.executeRemote('getMonitorData', {}, function(err, list) {
Expand Down
2 changes: 0 additions & 2 deletions lib/API/pm2-plus/link.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

var cst = require('../../../constants.js');
var Common = require('../../Common.js');
var UX = require('../CliUx');
var chalk = require('chalk');
var path = require('path');
var fs = require('fs');
var KMDaemon = require('@pm2/agent/src/InteractorClient');
var pkg = require('../../../package.json')
Expand Down
1 change: 0 additions & 1 deletion lib/God/ActionMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ var pidusage = require('pidusage');
var util = require('util');
var debug = require('debug')('pm2:ActionMethod');
var Utility = require('../Utility');
var semver = require('semver');

/**
* Description
Expand Down
1 change: 0 additions & 1 deletion lib/God/ClusterMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* @project PM2
*/
var cluster = require('cluster');
var cst = require('../../constants.js');
var Utility = require('../Utility.js');
var pkg = require('../../package.json');

Expand Down
1 change: 0 additions & 1 deletion lib/God/ForkMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
var log = require('debug')('pm2:fork_mode');
var fs = require('fs');
var cst = require('../../constants.js');
var moment = require('moment');
var Utility = require('../Utility.js');
var path = require('path');
Expand Down
2 changes: 0 additions & 2 deletions lib/God/Methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
* @project PM2
*/
var p = require('path');
var Utility = require('../Utility');
var treekill = require('../TreeKill');
var cst = require('../../constants.js');
var debug = require('debug')('pm2:methods');

/**
* Description
Expand Down
1 change: 0 additions & 1 deletion lib/Utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

var fclone = require('fclone');
var fs = require('fs');
var path = require('path');
var cst = require('../constants.js');
var waterfall = require('async/waterfall');
var util = require('util');
Expand Down
1 change: 0 additions & 1 deletion lib/Watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* can be found in the LICENSE file.
*/
var chokidar = require('chokidar');
var p = require('path');
var util = require('util');
var log = require('debug')('pm2:watch');

Expand Down
4 changes: 0 additions & 4 deletions lib/binaries/DevCLI.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ process.env.PM2_DISCRETE_MODE = true;

var commander = require('commander');

var debug = require('debug')('pm2:cli');
var PM2 = require('../..');
var Log = require('../API/Log');
var cst = require('../../constants.js');
var pkg = require('../../package.json');
var platform = require('os').platform();
var moment = require('moment');
var Common = require('../Common');
var chalk = require('chalk');
var path = require('path');
var fmt = require('../tools/fmt.js');
Expand Down
1 change: 0 additions & 1 deletion lib/binaries/Runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

var commander = require('commander');

var debug = require('debug')('pm2:cli');
var PM2 = require('../..');
var Log = require('../../lib/API/Log');
var cst = require('../../constants.js');
Expand Down
1 change: 0 additions & 1 deletion lib/binaries/Runtime4Docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Specialized PM2 CLI for Containers
*/
var commander = require('commander');
var debug = require('debug')('pm2:cli');
var PM2 = require('../..');
var Log = require('../../lib/API/Log');
var cst = require('../../constants.js');
Expand Down
3 changes: 1 addition & 2 deletions lib/completion.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* can be found in the LICENSE file.
*/
var fs = require('fs'),
pth = require('path'),
exec = require('child_process').exec;
pth = require('path');

// hacked from node-tabtab 0.0.4 https://github.com/mklabs/node-tabtab.git
// Itself based on npm completion by @isaac
Expand Down
1 change: 0 additions & 1 deletion lib/tools/isbinaryfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* can be found in the LICENSE file.
*/
var fs = require('fs');
var path = require("path");
var max_bytes = 512;

module.exports = function(bytes, size) {
Expand Down

0 comments on commit b8b48e8

Please sign in to comment.