@travetto/cli 3.4.0-rc.6 → 3.4.0-rc.8

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/util.ts +6 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/cli",
3
- "version": "3.4.0-rc.6",
3
+ "version": "3.4.0-rc.8",
4
4
  "description": "CLI infrastructure for Travetto framework",
5
5
  "keywords": [
6
6
  "cli",
@@ -29,7 +29,7 @@
29
29
  "directory": "module/cli"
30
30
  },
31
31
  "dependencies": {
32
- "@travetto/schema": "^3.4.0-rc.5",
32
+ "@travetto/schema": "^3.4.0-rc.6",
33
33
  "@travetto/terminal": "^3.4.0-rc.0"
34
34
  },
35
35
  "travetto": {
package/src/util.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CompilerClient, Env, ExecUtil } from '@travetto/base';
1
+ import { CompilerClient, Env, ExecUtil, GlobalEnv } from '@travetto/base';
2
2
  import { RootIndex } from '@travetto/manifest';
3
3
 
4
4
  import { CliCommandShape } from './types';
@@ -24,7 +24,9 @@ export class CliUtil {
24
24
  * Run a command as restartable, linking into self
25
25
  */
26
26
  static runWithRestart<T extends CliCommandShape & { canRestart?: boolean }>(cmd: T): Promise<unknown> | undefined {
27
- if (cmd.canRestart === false || Env.isFalse('TRV_CAN_RESTART')) {
27
+ const canRestart = cmd.canRestart ??= GlobalEnv.devMode;
28
+
29
+ if (canRestart === false || Env.isFalse('TRV_CAN_RESTART')) {
28
30
  delete process.env.TRV_CAN_RESTART;
29
31
  return;
30
32
  }
@@ -82,7 +84,8 @@ export class CliUtil {
82
84
  * Debug if IPC available
83
85
  */
84
86
  static async debugIfIpc<T extends CliCommandShape & { debugIpc?: boolean }>(cmd: T): Promise<boolean> {
85
- return cmd.debugIpc !== false && this.triggerIpc('run', cmd);
87
+ const canDebug = cmd.debugIpc ??= GlobalEnv.devMode;
88
+ return canDebug !== false && this.triggerIpc('run', cmd);
86
89
  }
87
90
 
88
91
  /**