@travetto/cli 7.0.0-rc.3 → 7.0.0-rc.4

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/README.md CHANGED
@@ -479,7 +479,7 @@ export class WebHttpCommand implements CliCommandShape {
479
479
  port?: number;
480
480
 
481
481
  /** Kill conflicting port owner */
482
- killConflict?: boolean;
482
+ killConflict?: boolean = Runtime.envType === 'development';
483
483
 
484
484
  preMain(): void {
485
485
  if (this.port) {
@@ -491,13 +491,13 @@ export class WebHttpCommand implements CliCommandShape {
491
491
  await Registry.init();
492
492
  const instance = await DependencyRegistryIndex.getInstance(toConcrete<WebHttpServer>());
493
493
 
494
- const handle = await Util.acquireWithRetry(
495
- () => instance.serve(),
496
- NetUtil.freePortOnConflict,
497
- this.killConflict && !Runtime.production ? 5 : 1
498
- );
499
-
500
- return handle.complete;
494
+ if (this.killConflict) {
495
+ const handle = await Util.acquireWithRetry(() => instance.serve(), NetUtil.freePortOnConflict, 5);
496
+ return handle.complete;
497
+ } else {
498
+ const handle = await instance.serve();
499
+ return handle.complete;
500
+ }
501
501
  }
502
502
  }
503
503
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/cli",
3
- "version": "7.0.0-rc.3",
3
+ "version": "7.0.0-rc.4",
4
4
  "description": "CLI infrastructure for Travetto framework",
5
5
  "keywords": [
6
6
  "cli",
@@ -28,8 +28,8 @@
28
28
  "directory": "module/cli"
29
29
  },
30
30
  "dependencies": {
31
- "@travetto/schema": "^7.0.0-rc.3",
32
- "@travetto/terminal": "^7.0.0-rc.3"
31
+ "@travetto/schema": "^7.0.0-rc.4",
32
+ "@travetto/terminal": "^7.0.0-rc.4"
33
33
  },
34
34
  "travetto": {
35
35
  "displayName": "Command Line Interface",
@@ -69,7 +69,7 @@ const FIELD_CONFIG: {
69
69
  type: Boolean,
70
70
  aliases: ['-cr'],
71
71
  description: 'Should the invocation automatically restart on source changes',
72
- default: Runtime.env === 'development',
72
+ default: Runtime.envType === 'development',
73
73
  required: { active: false },
74
74
  },
75
75
  }