@scandipwa/magento-scripts 1.15.0 → 1.15.1
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.
|
@@ -5,6 +5,7 @@ const pathExists = require('../util/path-exists');
|
|
|
5
5
|
const { deepmerge } = require('../util/deepmerge');
|
|
6
6
|
const { defaultMagentoConfig } = require('./magento-config');
|
|
7
7
|
const setConfigFile = require('../util/set-config');
|
|
8
|
+
const getJsonfileData = require('../util/get-jsonfile-data');
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @type {() => import('listr2').ListrTask<import('../../typings/context').ListrContext>}
|
|
@@ -16,6 +17,8 @@ const checkConfigurationFile = () => ({
|
|
|
16
17
|
const { cacheDir, templateDir } = getBaseConfig(projectPath);
|
|
17
18
|
const configJSFilePath = path.join(projectPath, 'cma.js');
|
|
18
19
|
const magentoConfigFilePath = path.join(cacheDir, 'app-config.json');
|
|
20
|
+
const composerJsonPath = path.join(process.cwd(), 'composer.json');
|
|
21
|
+
const composerData = await getJsonfileData(composerJsonPath);
|
|
19
22
|
|
|
20
23
|
if (!await pathExists(configJSFilePath)) {
|
|
21
24
|
const legacyMagentoConfigExists = await pathExists(magentoConfigFilePath);
|
|
@@ -28,7 +31,19 @@ const checkConfigurationFile = () => ({
|
|
|
28
31
|
);
|
|
29
32
|
|
|
30
33
|
magentoConfiguration = legacyMagentoConfig.magento || legacyMagentoConfig;
|
|
31
|
-
} else {
|
|
34
|
+
} else if (composerData) {
|
|
35
|
+
if (composerData.require['magento/product-community-edition']) {
|
|
36
|
+
magentoConfiguration = deepmerge(defaultMagentoConfig, {
|
|
37
|
+
edition: 'community'
|
|
38
|
+
});
|
|
39
|
+
} else if (composerData.require['magento/product-enterprise-edition']) {
|
|
40
|
+
magentoConfiguration = deepmerge(defaultMagentoConfig, {
|
|
41
|
+
edition: 'enterprise'
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (!magentoConfiguration) {
|
|
32
47
|
const magentoEdition = await task.prompt({
|
|
33
48
|
type: 'Select',
|
|
34
49
|
message: `Please select Magento edition you want to install.
|
package/lib/util/analytics.js
CHANGED
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": "1.15.
|
|
6
|
+
"version": "1.15.1",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"types": "./typings/index.d.ts",
|
|
9
9
|
"license": "OSL-3.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"mysql2": "2.3.2",
|
|
37
37
|
"node-ssh": "12.0.0",
|
|
38
38
|
"semver": "7.3.5",
|
|
39
|
-
"smol-request": "2.1.
|
|
39
|
+
"smol-request": "^2.1.2",
|
|
40
40
|
"systeminformation": "5.11.7",
|
|
41
41
|
"yargs": "17.3.1"
|
|
42
42
|
},
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"mysql",
|
|
54
54
|
"scandipwa"
|
|
55
55
|
],
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "ba6f9e613e4448cf449c6e82f8d95ff546de2294"
|
|
57
57
|
}
|