@mono-labs/cli 0.0.165 → 0.0.167

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.
@@ -5,6 +5,7 @@ import { verifyOptionValue } from './validators.js';
5
5
  import { mergeData, setData } from './dataLayer.js';
6
6
  import { getHasteConfig } from '../loadFromRoot.js';
7
7
  import { pruneRepo } from '../prune/prune.js';
8
+ import { testFlag } from './testflag.js';
8
9
  /**
9
10
  * Register commander commands for each haste file definition.
10
11
  * Handles argument, options, validation, and action wiring.
@@ -58,7 +59,11 @@ export function buildCommands(files) {
58
59
  const argSpec = required ? `<${type}>` : `[${type}]`;
59
60
  current = current.argument(argSpec, argInfo.description || '');
60
61
  }
61
- console.log('firstConfigObject:', JSON.stringify(configObject, null, 2));
62
+ if (testFlag)
63
+ console.log(
64
+ 'firstConfigObject:',
65
+ JSON.stringify(configObject, null, 2)
66
+ );
62
67
 
63
68
  // Options
64
69
  Object.entries(optionsData).forEach(([optionKey, meta]) => {
@@ -4,6 +4,19 @@ import { killAllBackground } from './runners/processManager.js';
4
4
  import { getHasteConfig } from '../loadFromRoot.js';
5
5
  import { parseEnvFile } from './readEnv.js';
6
6
  import path from 'node:path';
7
+ import { testFlag } from './testflag.js';
8
+
9
+ export function getAllowAllKeys(cfg) {
10
+ const decls = cfg.options ?? {};
11
+ return Object.entries(decls)
12
+ .filter(
13
+ ([, v]) =>
14
+ Boolean(v?.allowAll) &&
15
+ Array.isArray(v?.options) &&
16
+ v.options.length > 0
17
+ )
18
+ .map(([k]) => k);
19
+ }
7
20
 
8
21
  /**
9
22
  * Orchestrate execution of a single haste command definition.
@@ -74,11 +87,12 @@ export async function runHasteCommand(configObject, options = {}) {
74
87
  console.log(`→ background action: ${cmd}`);
75
88
  runBackground(cmd, envObj, options);
76
89
  }
77
-
78
- console.log(`→ foreground action (attached): ${fg}`);
79
- console.log('options:', options);
80
- console.log('secondConfigObject:', JSON.stringify(configObject, null, 2));
81
- console.log('config', JSON.stringify(configObject.options || {}, null, 2));
90
+ if (testFlag) {
91
+ console.log(`→ foreground action (attached): ${fg}`);
92
+ console.log('options:', options);
93
+ console.log('secondConfigObject:', JSON.stringify(configObject, null, 2));
94
+ console.log('config', JSON.stringify(configObject.options || {}, null, 2));
95
+ }
82
96
 
83
97
  try {
84
98
  await runBackground(fg, envObj, options, true);
@@ -0,0 +1 @@
1
+ export const testFlag = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mono-labs/cli",
3
- "version": "0.0.165",
3
+ "version": "0.0.167",
4
4
  "description": "A CLI tool for building and deploying projects",
5
5
  "type": "module",
6
6
  "main": "index.js",