Skip to content

Commit

Permalink
Refactor commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jan 23, 2022
1 parent f4a4c49 commit 71d36f1
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 113 deletions.
5 changes: 2 additions & 3 deletions src/config/normalize/main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { normalizeConfigProps } from './lib/main.js'
import { COMMANDS_PROPS } from './properties.js'
import { DEFINITIONS } from './prop_defs.js'

// Normalize the configuration properties, including default values and
// validation.
export const normalizeConfig = async function (config, command, configInfos) {
const definitions = COMMANDS_PROPS[command]
const context = getContext(command, configInfos)
const configA = await normalizeConfigProps(config, definitions, { context })
const configA = await normalizeConfigProps(config, DEFINITIONS, { context })
const configB = postNormalizeConfig(configA)
return configB
}
Expand Down
Loading

0 comments on commit 71d36f1

Please sign in to comment.