@flowscripter/dynamic-cli-framework 1.4.1 → 1.4.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowscripter/dynamic-cli-framework",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "A framework for developing CLI applications which supports dynamic discovery and installation of new commands",
5
5
  "keywords": [
6
6
  "bun",
@@ -7,4 +7,5 @@ export default interface BaseCLIFeatureOptions {
7
7
  readonly completionServiceEnabled?: boolean;
8
8
  readonly imagePrinterServiceEnabled?: boolean;
9
9
  readonly validateAllCommands?: boolean;
10
+ readonly promptingEnabled?: boolean;
10
11
  }
@@ -129,6 +129,7 @@ export default class BaseCLI implements CLI {
129
129
  completionServiceEnabled: false,
130
130
  imagePrinterServiceEnabled: false,
131
131
  validateAllCommands: false,
132
+ promptingEnabled: true,
132
133
  ...options,
133
134
  };
134
135
  this.#keyReader = keyReader;
@@ -219,6 +220,7 @@ export default class BaseCLI implements CLI {
219
220
  this.#keyReader,
220
221
  this.#printerService,
221
222
  );
223
+ prompterService.promptEnabled = this.#options.promptingEnabled;
222
224
  this.addServiceProvider(new PrompterServiceProvider(75, prompterService));
223
225
 
224
226
  if (this.#options.argumentPrompterServiceEnabled) {
@@ -29,7 +29,7 @@ export default class DefaultRuntimeCLI extends BaseCLI {
29
29
  supportsHyperlinks(process.stderr),
30
30
  ),
31
31
  new TtyKeyReader(process.stdin),
32
- options,
32
+ { promptingEnabled: process.stdin.isTTY === true, ...options },
33
33
  );
34
34
  }
35
35