// Fires the `git` binary. Memoized. const mGit = function(args, cwd) { const cwdA = safeGetCwd(cwd) const { stdout } = execa.sync('git', args, { cwd: cwdA }) return stdout }
const sync = family => { const {stdout} = execa.sync("ip", args[family]); return parse(stdout); }
const sync = family => { const {stdout} = execa.sync("wmic", gwArgs, spawnOpts); const [gateway, id] = parseGwTable(stdout, family) || []; if (!gateway) { throw new Error("Unable to determine default gateway"); } let name; if (id) { const {stdout} = execa.sync("wmic", ifArgs(id), spawnOpts); name = parseIfTable(stdout); } return {gateway, interface: name ? name : null}; }
function getSimulatorModelId (cli, target) { target = new RegExp(target || '^iPhone'); const args = [ 'run', '--list', '--emulator' ].concat(module.exports.PARAMEDIC_COMMON_ARGS); // Fetches all known simulators/emulators. logger.info('running:'); logger.info(` ${cli} ${args.join(' ')}`); const result = execa.sync(cli, args); if (result.exitCode > 0) { logger.error('Failed to find simulator we deployed to'); return; } logger.info(`Avaliable Emulators:\n${result.stdout}`); logger.info(`Filtering for Targeted Emulator: ${target}`); // Return the individual target that is filtered from the known simulators/emulators based on provided target name. (default: ^iPhone) return result.stdout .split('\n') .filter(i => i.match(target)) .pop() .trim(); }
/** * Creates an initial local commit * @param {string} projectName - source directory path * * @returns {Void} */ const makeInitialCommit = (projectName) => { // Commands to be executed serially const commands = ["init", "add .", `commit -m "Init"`]; // Execute commands serially commands.forEach((cmd) => execa.sync("git", cmd.split(" "), { cwd: projectName }) ); }
if (!existsSync(pkgJsonPath)) { execa.sync('npm', ['init', '-y'])
/** * Execute shell commands * @param {String[]} args args to be supplied * @param {Object} options execa options * @returns {Object} */ const run = (args, options = {}) => execa.sync(CLI_PATH, args, options)
// Fires the `git` binary. Memoized. const mGit = function(args, cwd) { const cwdA = safeGetCwd(cwd) const { stdout } = execa.sync('git', args, { cwd: cwdA }) return stdout }
const sync = family => { const {stdout} = execa.sync("netstat", args[family]); return parse(stdout, family); }
const sync = family => { const {stdout} = execa.sync(db2util, [sql, "-p", family, "-o", "json"]); return parse(stdout); }
const sync = family => { const {stdout} = execa.sync("netstat", args[family]); return parse(stdout); }
const sync = family => { const {stdout} = execa.sync("ip", args[family]); return parse(stdout, family); }
const sync = family => { const {stdout} = execa.sync("netstat", args[family]); return parse(stdout); }
const sync = family => { const {stdout} = execa.sync("netstat", args[family]); return parse(stdout); }
const run = (args, options = {}) => execa.sync(CLI_PATH, args, options)