Skip to content

Commit 41745df

Browse files
committed
Remove destructuring
1 parent 56fb670 commit 41745df

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

packages/cli/src/plugins/logger.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,20 +181,17 @@ export function logger({
181181

182182
// Create hook functions.
183183
function beforeExecute({ state }: HookPayload<'beforeExecute'>) {
184-
const { client, commandQueue } = state;
185-
log(client, 'Starting execution', {
184+
log(state.client, 'Starting execution', {
186185
commandString: state.context.commandString,
187-
commandCount: commandQueue.length,
186+
commandCount: state.commandQueue.length,
188187
commands: state.commandQueue.map((cmd) => cmd.commandName).join(' → '),
189188
});
190189
}
191190
function beforeCommand({ state, data }: HookPayload<'beforeCommand'>) {
192-
const { command, client, params } = state;
193-
if (!command) return;
194-
const { commandName } = command;
195-
log(client, 'Executing command', {
196-
name: commandName,
197-
params,
191+
if (!state.command) return;
192+
log(state.client, 'Executing command', {
193+
name: state.command.commandName,
194+
params: state.params,
198195
data,
199196
step: `${state.i + 1}/${state.commandQueue.length}`,
200197
});

0 commit comments

Comments
 (0)