@mono-labs/cli 0.0.68 → 0.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,12 +2,13 @@ import { program } from '../../app.js';
|
|
|
2
2
|
import runHasteCommand from './runHasteCommand.js';
|
|
3
3
|
import { verifyOptionValue } from './validators.js';
|
|
4
4
|
import { mergeData, setData } from './dataLayer.js';
|
|
5
|
-
|
|
5
|
+
import { getHasteConfig } from '../loadFromRoot.js';
|
|
6
6
|
/**
|
|
7
7
|
* Register commander commands for each haste file definition.
|
|
8
8
|
* Handles argument, options, validation, and action wiring.
|
|
9
9
|
*/
|
|
10
10
|
export function buildCommands(files) {
|
|
11
|
+
const { config } = getHasteConfig();
|
|
11
12
|
Object.entries(files).forEach(([commandName, configObject]) => {
|
|
12
13
|
const optionsData = configObject.options || {};
|
|
13
14
|
|
|
@@ -44,6 +45,7 @@ export function buildCommands(files) {
|
|
|
44
45
|
});
|
|
45
46
|
|
|
46
47
|
current.action(async (arg, cmd) => {
|
|
48
|
+
console.log('optionsData:', optionsData);
|
|
47
49
|
const optionVals = cmd.opts ? cmd.opts() : cmd;
|
|
48
50
|
Object.keys(optionVals).forEach((k) => {
|
|
49
51
|
optionVals[k] = verifyOptionValue(k, optionVals[k], optionsData);
|