@scandipwa/magento-scripts 2.0.0-alpha.13 → 2.0.0-alpha.16

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.
@@ -28,7 +28,8 @@ const parsePort = (port) => {
28
28
  const prettyStatus = async (ctx) => {
29
29
  const {
30
30
  config: {
31
- baseConfig
31
+ baseConfig,
32
+ projectConfig
32
33
  },
33
34
  magentoVersion,
34
35
  dockerVersion,
@@ -48,7 +49,7 @@ const prettyStatus = async (ctx) => {
48
49
  block
49
50
  .addHeader(`magento-scripts version: ${ logger.style.link(packageVersion) }`)
50
51
  .addEmptyLine()
51
- .addLine(`Project: ${logger.style.file(baseConfig.prefix)} ${prefix === folderName ? '(without prefix)' : '(with prefix)'} (with php container)`)
52
+ .addLine(`Project: ${logger.style.file(baseConfig.prefix)} ${prefix === folderName ? '(without prefix)' : '(with prefix)'} (with php container)${ projectConfig.debug ? ' (with debugging)' : '' }`)
52
53
  .addLine(`Project location: ${logger.style.link(process.cwd())}`);
53
54
 
54
55
  if (projectCreatedAt) {
@@ -74,19 +75,25 @@ const prettyStatus = async (ctx) => {
74
75
 
75
76
  let containerStatus;
76
77
 
77
- if (container.status && container.status.Health) {
78
- containerStatus = `✓ ${ logger.style.file(container.status.Health.Status) } and ${ logger.style.file('running') }`;
79
- } else if (container.status) {
80
- containerStatus = logger.style.file(container.status.Status);
78
+ if (container.status && container.status.State && container.status.State.Health) {
79
+ containerStatus = `✓ ${ logger.style.file(container.status.State.Health.Status) } and ${ logger.style.file('running') }`;
80
+ } else if (container.status && container.status.State) {
81
+ containerStatus = logger.style.file(container.status.State.Status);
81
82
  } else {
82
83
  containerStatus = '✖ Not running';
83
84
  }
84
85
 
85
86
  block
86
87
  .addLine(`Status: ${containerStatus}`)
87
- .addLine(`Name: ${logger.style.misc(container.name)}`)
88
- .addLine(`Image: ${logger.style.file(container.image)}`)
89
- .addLine(`Network: ${logger.style.link(container.network)}`);
88
+ .addLine(`Name: ${logger.style.misc(container.name)}`);
89
+
90
+ if (container.status && container.status.Config && container.status.Config.Image) {
91
+ block.addLine(`Image: ${logger.style.file(container.status.Config.Image)}`);
92
+ } else {
93
+ block.addLine(`Image: ${logger.style.file(container.image)}`);
94
+ }
95
+
96
+ block.addLine(`Network: ${logger.style.link(container.network)}`);
90
97
 
91
98
  if (!containerStatus.includes('Not running') && container.forwardedPorts && container.forwardedPorts.length > 0) {
92
99
  block.addLine('Port forwarding:');
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Scripts and configuration used by CMA.",
4
4
  "homepage": "https://docs.create-magento-app.com/",
5
5
  "repository": "github:scandipwa/create-magento-app",
6
- "version": "2.0.0-alpha.13",
6
+ "version": "2.0.0-alpha.16",
7
7
  "main": "./index.js",
8
8
  "types": "./typings/index.d.ts",
9
9
  "license": "OSL-3.0",
@@ -54,5 +54,5 @@
54
54
  "mysql",
55
55
  "scandipwa"
56
56
  ],
57
- "gitHead": "92a6255dbb6fb46334c0677be8f1ff2c7adab56f"
57
+ "gitHead": "04c17be45e2a405c9ae08858de49d3232a5f8037"
58
58
  }
@@ -1,5 +1,6 @@
1
1
  import mysql2 from 'mysql2';
2
2
 
3
+ import { ProjectConfig } from '../lib/config/config';
3
4
  import { DockerVersionResult } from '../lib/tasks/docker/api';
4
5
  import { CMAConfiguration, PHPExtensions } from './index';
5
6
  import { PHPStormConfig } from './phpstorm';
@@ -86,6 +87,7 @@ export interface ListrContext {
86
87
  userConfiguration: Omit<CMAConfiguration, 'prefix' | 'useNonOverlappingPorts'>
87
88
  nonOverridenConfiguration: Omit<CMAConfiguration, 'prefix' | 'useNonOverlappingPorts'>
88
89
  phpStorm: PHPStormConfig
90
+ projectConfig: ProjectConfig
89
91
  }
90
92
  systemConfiguration: {
91
93
  analytics: boolean