-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(exos-scripts): Bump to exos-scripts v1.0.1
- Loading branch information
1 parent
5c14d65
commit 62187eb
Showing
7 changed files
with
33 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
const defaultOptions = { | ||
import type { Option } from "yargs-interactive"; | ||
|
||
const defaultOptions: Option = { | ||
interactive: { describe: "Use interactive mode", default: true }, | ||
}; | ||
|
||
interface CommandOption { | ||
default: unknown; | ||
} | ||
|
||
/** | ||
* Check current options and decide what to do. | ||
* If there is a missing property, run interactive mode | ||
* using the other properties as default values | ||
* @param commandOptions | ||
*/ | ||
function getCommandOptions(commandOptions: CommandOption[]): unknown { | ||
const toReturn = Object.assign({}, defaultOptions, commandOptions); | ||
return toReturn; | ||
function getCommandOptions(commandOptions: Option): Option { | ||
return { | ||
...defaultOptions, | ||
...commandOptions, | ||
}; | ||
} | ||
|
||
export default getCommandOptions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters