@gxp-dev/tools 2.0.46 → 2.0.48

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.
@@ -37,6 +37,9 @@ const isOneShot = ONE_SHOT_COMMANDS.includes(command) ||
37
37
  // Check if we should use TUI with auto-start
38
38
  const isTuiCommand = TUI_AUTO_START_COMMANDS.includes(command);
39
39
 
40
+ // --cli flag forces non-TUI mode regardless of TTY
41
+ const forceCliMode = args.includes('--cli');
42
+
40
43
  // If no command or TUI command, try to launch TUI
41
44
  // Fall back to traditional CLI if TUI dependencies are not available
42
45
  if (!isOneShot) {
@@ -48,7 +51,7 @@ if (!isOneShot) {
48
51
  // Check if we're in an interactive terminal (TTY); fall back to CLI if not
49
52
  const isTTY = process.stdout.isTTY && process.stdin.isTTY;
50
53
 
51
- if (fs.existsSync(tuiPath) && isTTY) {
54
+ if (fs.existsSync(tuiPath) && isTTY && !forceCliMode) {
52
55
  // Use dynamic import() for ESM modules (ink v5 is ESM-only)
53
56
  (async () => {
54
57
  try {
@@ -81,8 +84,8 @@ if (!isOneShot) {
81
84
  require("./lib/cli");
82
85
  }
83
86
  })();
84
- } else if (!isTTY) {
85
- // Non-interactive shell — skip TUI and run directly
87
+ } else if (!isTTY || forceCliMode) {
88
+ // Non-interactive shell or --cli flag — skip TUI and run directly
86
89
  require("./lib/cli");
87
90
  } else {
88
91
  // TUI not compiled yet, use traditional CLI
@@ -34,7 +34,7 @@ const REQUIRED_DEV_DEPENDENCIES = {
34
34
 
35
35
  // Default scripts for package.json
36
36
  const DEFAULT_SCRIPTS = {
37
- dev: "gxdev dev",
37
+ dev: "gxdev dev --cli",
38
38
  "dev-app": "gxdev dev",
39
39
  "dev-http": "gxdev dev --no-https",
40
40
  build: "gxdev build",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gxp-dev/tools",
3
- "version": "2.0.46",
3
+ "version": "2.0.48",
4
4
  "description": "Dev tools to create platform plugins",
5
5
  "type": "commonjs",
6
6
  "publishConfig": {