Skip to content
Myr

command.js

This file

Path

lib/arguments/command.js

19 lines · 730 bytes · JavaScript

Last changed by

Add more code comments (#984)ehmickybefore adoptionfdd8a9f

History of this file

Take it

Split files into smaller ones (#976)ehmickybefore adoptiond7c6853

lines 1–6why, one step back
1import {logCommand} from '../verbose/start.js';
2import {getVerboseInfo} from '../verbose/info.js';3import {getStartTime} from '../return/duration.js';4import {joinCommand} from './escape.js';5import {normalizeFdSpecificOption} from './specific.js';6

Add more code comments (#984)ehmickybefore adoptionfdd8a9f

line 7why, one step back
7// Compute `result.command`, `result.escapedCommand` and `verbose`-related information

Upgrade xo (#980)ehmickybefore adoptionccfa412

line 8why, one step back
8export const handleCommand = (filePath, rawArguments, rawOptions) => {

Split files into smaller ones (#976)ehmickybefore adoptiond7c6853

line 9why, one step back
9 const startTime = getStartTime();

Upgrade xo (#980)ehmickybefore adoptionccfa412

line 10why, one step back
10 const {command, escapedCommand} = joinCommand(filePath, rawArguments);

Split files into smaller ones (#976)ehmickybefore adoptiond7c6853

lines 11–12why, one step back
11 const verboseInfo = getVerboseInfo(normalizeFdSpecificOption(rawOptions, 'verbose'));
12 logCommand(escapedCommand, verboseInfo, rawOptions);

Upgrade xo (#980)ehmickybefore adoptionccfa412

lines 13–18why, one step back
13 return {
14 command,15 escapedCommand,16 startTime,17 verboseInfo,18 };

Split files into smaller ones (#976)ehmickybefore adoptiond7c6853

line 19why, one step back
19};