Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* Modules
* Node
* @constant
*/
const path = require('path')
/**
* Modules
* External
* @constant
*/
const appRootPath = require('app-root-path')
appRootPath.setPath(path.join(__dirname, '..'))
const CliProgress = require('@sidneys/cli-progress')
const moment = require('moment')
/* eslint-disable no-unused-vars */
const momentDurationFormat = require('moment-duration-format')
/* eslint-enable */
/**
* Modules
* Internal
* @constant
*/
const formatter = require('./formatter')
const theme = require('./theme')
/**
* Timecode format
const entry_file = require.main && require.main.filename;
let rootDir;
if (process.env.CWD) {
rootDir = process.env.CWD;
} else if (entry_file) {
rootDir = entry_file.substring(
0,
entry_file.lastIndexOf('server/server.js')
);
} else {
rootDir = process.cwd(); // not always consistent
}
return rootDir;
}());
appRoot.setPath(appRootDir);
const root = dir => appRoot.resolve(dir || '');
let serverConfig = {};
/**
*
* @param filePath
* @returns {*} json formatted content
*/
const loadYaml = filePath => {
try {
return yaml.safeLoad(fs.readFileSync(filePath), 'utf8');
} catch (e) {
return false;
}
import * as root from 'app-root-path';
let resolvedPath: string;
resolvedPath = root.resolve('../dir');
resolvedPath = root.path;
resolvedPath = root.toString();
let resolvedModule: any = root.require('app-root-path');
root.setPath('C:\\app-root');
setup: function(w) {
require('babel-polyfill');
require('app-root-path').setPath(w.projectCacheDir);
}
};
/**
* Modules
* Node
* @constant
*/
const path = require('path')
/**
* Modules
* External
* @constant
*/
const appRootPath = require('app-root-path')
appRootPath.setPath(path.join(__dirname, '..'))
const ellipsize = require('ellipsize')
const stringWidth = require('string-width')
/**
* Ellipse character
* @type {string}
* @constant
* @default
*/
const ellipseCharacter = '…'
/**
* Convert file paths to prettified file name
* @param {String} filePath - File path
* @param {Number=} targetLength - File name length before adding ellipsis
/**
* Modules
* External
* @constant
*/
const _ = require('lodash')
const appRootPath = require('app-root-path')
const readPkg = require('read-pkg')
const simpleReload = require('simple-reload')
const detectInstalled = require('detect-installed')
/**
* Modules
* Configuration
*/
appRootPath.setPath(path.join(__dirname, '..'))
/**
* Modules
* Internal
* @constant
*/
const packageJson = require(path.join(appRootPath.path, 'package.json'))
const logger = require('@sidneys/logger')({ write: false })
/**
* Filesystem
* @constant
* @default
*/
const applicationPath = path.join(appRootPath.path, packageJson.main)
* Modules
* External
* @constant
*/
const appRootPath = require('app-root-path')
const electronConnect = require('electron-connect')
const gulp = require('gulp')
const logger = require('@sidneys/logger')({ write: true })
const minimist = require('minimist')
/**
* Modules
* Configuration
*/
appRootPath.setPath(path.join(__dirname))
/**
* Modules
* Internal
* @constant
*/
const packageJson = require(path.join(appRootPath.path, 'package.json'))
/**
* Filesystem
* @constant
* @default
*/
const applicationPath = path.join(appRootPath['path'], packageJson.main)
* Modules
* Node
* @constant
*/
const childProcess = require('child_process')
const os = require('os')
const readline = require('readline')
const path = require('path')
/**
* Modules
* External
* @constant
*/
const appRootPath = require('app-root-path')
appRootPath.setPath(path.join(__dirname, '..'))
const ellipsize = require('ellipsize')
const ini = require('ini')
const which = require('which')
/**
* Modules
* Internal
* @constant
*/
const progressBar = require('./progress-bar')
const parseFFmpegLog = require('./parse-ffmpeg-log')
const predictProgressbarWidth = require('./predict-progressbar-width')
const formatter = require('./formatter')
const theme = require('./theme')