@scandipwa/magento-scripts 1.13.5-alpha.0 → 1.13.5-alpha.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.
- package/lib/commands/start.js +23 -12
- package/lib/tasks/composer/index.js +1 -1
- package/lib/tasks/docker/containers.js +16 -4
- package/lib/tasks/magento/setup-magento/set-base-url.js +2 -1
- package/lib/tasks/php/compile-options.js +2 -2
- package/lib/tasks/php/index.js +22 -8
- package/lib/tasks/requirements/docker/index.js +12 -1
- package/lib/tasks/requirements/docker/permissions.js +58 -0
- package/lib/tasks/status/index.js +24 -9
- package/lib/util/instance-metadata.js +74 -0
- package/package.json +2 -2
package/lib/commands/start.js
CHANGED
|
@@ -9,9 +9,12 @@ const systeminformation = require('systeminformation');
|
|
|
9
9
|
const { getCSAThemes } = require('../util/CSA-theme');
|
|
10
10
|
const shouldUseYarn = require('@scandipwa/scandipwa-dev-utils/should-use-yarn');
|
|
11
11
|
const ConsoleBlock = require('../util/console-block');
|
|
12
|
+
const { getInstanceMetadata } = require('../util/instance-metadata');
|
|
12
13
|
|
|
13
14
|
const cmaGaTrackingId = 'UA-127741417-7';
|
|
14
15
|
|
|
16
|
+
googleAnalytics.setGaTrackingId(cmaGaTrackingId);
|
|
17
|
+
|
|
15
18
|
/**
|
|
16
19
|
* @param {import('yargs')} yargs
|
|
17
20
|
*/
|
|
@@ -64,6 +67,9 @@ module.exports = (yargs) => {
|
|
|
64
67
|
default: false
|
|
65
68
|
}),
|
|
66
69
|
async (args = {}) => {
|
|
70
|
+
/**
|
|
71
|
+
* @type {Listr<import('../../typings/context').ListrContext>}
|
|
72
|
+
*/
|
|
67
73
|
const tasks = new Listr(
|
|
68
74
|
start(), {
|
|
69
75
|
exitOnError: true,
|
|
@@ -75,7 +81,7 @@ module.exports = (yargs) => {
|
|
|
75
81
|
}
|
|
76
82
|
}
|
|
77
83
|
);
|
|
78
|
-
const timeStamp = Date.now()
|
|
84
|
+
const timeStamp = Date.now();
|
|
79
85
|
|
|
80
86
|
if (args.debug) {
|
|
81
87
|
logger.warn('You are running in debug mode. Magento setup will be slow.');
|
|
@@ -90,20 +96,27 @@ module.exports = (yargs) => {
|
|
|
90
96
|
const ctx = await tasks.run();
|
|
91
97
|
|
|
92
98
|
const {
|
|
93
|
-
ports,
|
|
94
|
-
config: { magentoConfiguration, overridenConfiguration: { host, ssl } },
|
|
95
99
|
systemConfiguration: { analytics }
|
|
96
100
|
} = ctx;
|
|
97
101
|
|
|
98
|
-
const
|
|
102
|
+
const instanceMetadata = getInstanceMetadata(ctx);
|
|
99
103
|
|
|
100
104
|
const block = new ConsoleBlock();
|
|
101
105
|
block
|
|
102
106
|
.addHeader('Magento 2')
|
|
103
|
-
.addEmptyLine()
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
.addEmptyLine();
|
|
108
|
+
|
|
109
|
+
block.addLine(logger.style.misc('Frontend'));
|
|
110
|
+
instanceMetadata.frontend.forEach(({ title, text }) => {
|
|
111
|
+
block.addLine(` ${title}: ${text}`);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
block.addEmptyLine();
|
|
115
|
+
|
|
116
|
+
block.addLine(logger.style.misc('Admin'));
|
|
117
|
+
instanceMetadata.admin.forEach(({ title, text }) => {
|
|
118
|
+
block.addLine(` ${title}: ${text}`);
|
|
119
|
+
});
|
|
107
120
|
|
|
108
121
|
const themes = await getCSAThemes();
|
|
109
122
|
if (themes.length > 0) {
|
|
@@ -143,10 +156,8 @@ module.exports = (yargs) => {
|
|
|
143
156
|
}
|
|
144
157
|
|
|
145
158
|
try {
|
|
146
|
-
googleAnalytics.setGaTrackingId(cmaGaTrackingId);
|
|
147
|
-
|
|
148
159
|
if (!process.isFirstStart) {
|
|
149
|
-
await googleAnalytics.trackTiming('CMA start time', Date.now()
|
|
160
|
+
await googleAnalytics.trackTiming('CMA start time', Date.now() - timeStamp);
|
|
150
161
|
googleAnalytics.printAboutAnalytics();
|
|
151
162
|
process.exit(0);
|
|
152
163
|
}
|
|
@@ -160,7 +171,7 @@ module.exports = (yargs) => {
|
|
|
160
171
|
const paramInfo = `Platform: ${platform} ${kernel}, CPU model: ${manufacturer} ${brand}, RAM amount: ${totalRam}MB`;
|
|
161
172
|
|
|
162
173
|
await googleAnalytics.trackEvent('Params', paramInfo, 0, 'OS');
|
|
163
|
-
await googleAnalytics.trackTiming('CMA first start time', Date.now()
|
|
174
|
+
await googleAnalytics.trackTiming('CMA first start time', Date.now() - timeStamp);
|
|
164
175
|
googleAnalytics.printAboutAnalytics();
|
|
165
176
|
} catch (e) {
|
|
166
177
|
await googleAnalytics.trackError(e.message || e);
|
|
@@ -17,7 +17,7 @@ const getComposerVersion = async ({ composer, php }) => {
|
|
|
17
17
|
|
|
18
18
|
const composerVersion = safeRegexExtract({
|
|
19
19
|
string: composerVersionOutput,
|
|
20
|
-
regex: /
|
|
20
|
+
regex: /(\d+\.\d+\.\d+)/i,
|
|
21
21
|
onNoMatch: () => {
|
|
22
22
|
throw new Error(`
|
|
23
23
|
No composer version found in composer version output!\n\n${composerVersionOutput}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
1
2
|
const { execAsyncSpawn } = require('../../util/exec-async-command');
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @param {Object} options
|
|
6
|
+
* @param {number[]} [options.ports] Publish or expose port [docs](https://docs.docker.com/engine/reference/commandline/run/#publish-or-expose-port--p---expose)
|
|
7
|
+
* @param {number[]} [options.mounts] Add bind mounts or volumes using the --mount flag [docs](https://docs.docker.com/engine/reference/commandline/run/#add-bind-mounts-or-volumes-using-the---mount-flag)
|
|
8
|
+
* @param {number[]} [options.mountVolumes] Mount volume [docs](https://docs.docker.com/engine/reference/commandline/run/#mount-volume--v---read-only)
|
|
9
|
+
* @param {Record<string, string>} [options.env] Set environment variables [docs](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file)
|
|
10
|
+
* @param {string} [options.image]
|
|
11
|
+
* @param {string} [options.restart] Restart policies [docs](https://docs.docker.com/engine/reference/commandline/run/#restart-policies---restart)
|
|
12
|
+
* @param {string} [options.name] Container name
|
|
13
|
+
* @param {string} [options.entrypoint] Container entrypoint
|
|
14
|
+
* @param {string} [options.command] Container command
|
|
15
|
+
* @param {Record<"cmd" | "interval" | "retries" | "start-period" | "timeout", string>} [options.healthCheck] Container heathcheck properties
|
|
16
|
+
* @param {string[]} [options.securityOptions] Security options [docs](https://docs.docker.com/engine/reference/commandline/run/#optional-security-options---security-opt)
|
|
17
|
+
*/
|
|
3
18
|
const run = (options) => {
|
|
4
19
|
const {
|
|
5
|
-
expose = [],
|
|
6
20
|
ports = [],
|
|
7
21
|
mounts = [],
|
|
8
22
|
mountVolumes = [],
|
|
@@ -19,7 +33,6 @@ const run = (options) => {
|
|
|
19
33
|
|
|
20
34
|
const restartArg = restart && `--restart ${ restart }`;
|
|
21
35
|
const networkArg = network && `--network ${ network }`;
|
|
22
|
-
const exposeArgs = expose.map((port) => `--expose ${ port }`).join(' ');
|
|
23
36
|
const portsArgs = ports.map((port) => `-p ${ port }`).join(' ');
|
|
24
37
|
const mountsArgs = mounts.map((mount) => `--mount ${ mount }`).join(' ');
|
|
25
38
|
const mountVolumesArgs = mountVolumes.map((mount) => `-v ${mount}`).join(' ');
|
|
@@ -36,7 +49,6 @@ const run = (options) => {
|
|
|
36
49
|
nameArg,
|
|
37
50
|
networkArg,
|
|
38
51
|
restartArg,
|
|
39
|
-
exposeArgs,
|
|
40
52
|
portsArgs,
|
|
41
53
|
mountsArgs,
|
|
42
54
|
mountVolumesArgs,
|
|
@@ -139,7 +151,7 @@ const stopContainers = () => ({
|
|
|
139
151
|
|
|
140
152
|
const getContainerStatus = async (containerName) => {
|
|
141
153
|
try {
|
|
142
|
-
return JSON.parse(await execAsyncSpawn(`docker inspect --format='{{json .State
|
|
154
|
+
return JSON.parse(await execAsyncSpawn(`docker inspect --format='{{json .State}}' ${containerName}`));
|
|
143
155
|
} catch {
|
|
144
156
|
return null;
|
|
145
157
|
}
|
|
@@ -11,8 +11,9 @@ module.exports = () => ({
|
|
|
11
11
|
config: { overridenConfiguration: { host, ssl } },
|
|
12
12
|
mysqlConnection
|
|
13
13
|
} = ctx;
|
|
14
|
+
const isNgrok = host.endsWith('ngrok.io');
|
|
14
15
|
const enableSecureFrontend = ssl.enabled ? '1' : '0';
|
|
15
|
-
const location = `${host}${ ports.app !== 80 ? `:${ports.app}` : '' }/`;
|
|
16
|
+
const location = `${host}${ !isNgrok && ports.app !== 80 ? `:${ports.app}` : '' }/`;
|
|
16
17
|
const secureLocation = `${host}/`; // SSL will work only on port 443, so you cannot run multiple projects with SSL at the same time.
|
|
17
18
|
const httpUrl = `http://${location}`;
|
|
18
19
|
const httpsUrl = `https://${secureLocation}`;
|
|
@@ -44,7 +44,7 @@ const compileOptions = {
|
|
|
44
44
|
'+bz2="$(brew --prefix bzip2)"',
|
|
45
45
|
'+bcmath',
|
|
46
46
|
'+ctype',
|
|
47
|
-
'+curl=$(brew --prefix curl
|
|
47
|
+
'+curl=$(brew --prefix curl)',
|
|
48
48
|
'+intl=$(brew --prefix icu4c)',
|
|
49
49
|
'+dom',
|
|
50
50
|
'+filter',
|
|
@@ -70,7 +70,7 @@ const compileOptions = {
|
|
|
70
70
|
],
|
|
71
71
|
env: {
|
|
72
72
|
// eslint-disable-next-line max-len
|
|
73
|
-
PKG_CONFIG_PATH: '$PKG_CONFIG_PATH:$(brew --prefix libxml2)/lib/pkgconfig:$(brew --prefix icu4c)/lib/pkgconfig:$(brew --prefix openssl@1.1)/lib/pkgconfig:$(brew --prefix curl
|
|
73
|
+
PKG_CONFIG_PATH: '$PKG_CONFIG_PATH:$(brew --prefix libxml2)/lib/pkgconfig:$(brew --prefix icu4c)/lib/pkgconfig:$(brew --prefix openssl@1.1)/lib/pkgconfig:$(brew --prefix curl)/lib/pkgconfig:$(brew --prefix zlib)/lib/pkgconfig',
|
|
74
74
|
CPATH: '$CPATH:$(brew --prefix openssl@1.1)/include',
|
|
75
75
|
CXX: 'g++ -DTRUE=1 -DFALSE=0',
|
|
76
76
|
CC: 'gcc -DTRUE=1 -DFALSE=0',
|
package/lib/tasks/php/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
2
3
|
const logger = require('@scandipwa/scandipwa-dev-utils/logger');
|
|
3
4
|
const pathExists = require('../../util/path-exists');
|
|
4
5
|
const compile = require('./compile');
|
|
@@ -24,15 +25,28 @@ const installPhp = () => ({
|
|
|
24
25
|
task.title = `Installing PHP ${php.version}`;
|
|
25
26
|
|
|
26
27
|
try {
|
|
27
|
-
const
|
|
28
|
-
await
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
const hasPHPVersionDirectory = (
|
|
29
|
+
await Promise.all(
|
|
30
|
+
(
|
|
31
|
+
await fs.promises.readdir(phpbrewConfig.phpPath, {
|
|
32
|
+
encoding: 'utf-8',
|
|
33
|
+
withFileTypes: true
|
|
34
|
+
})
|
|
35
|
+
).map(async (f) => {
|
|
36
|
+
if (!f.isDirectory()) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
if (f.name !== `php-${php.version}`) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return pathExists(path.join(phpbrewConfig.phpPath, f.name, 'bin', 'php'));
|
|
45
|
+
})
|
|
46
|
+
))
|
|
47
|
+
.includes(true);
|
|
48
|
+
|
|
49
|
+
if (hasPHPVersionDirectory && !recompilePhp) {
|
|
36
50
|
task.skip();
|
|
37
51
|
// eslint-disable-next-line consistent-return
|
|
38
52
|
return;
|
|
@@ -3,6 +3,7 @@ const os = require('os');
|
|
|
3
3
|
const { execAsyncSpawn } = require('../../../util/exec-async-command');
|
|
4
4
|
const getIsWsl = require('../../../util/is-wsl');
|
|
5
5
|
const installDocker = require('./install');
|
|
6
|
+
const { checkDockerSocketPermissions } = require('./permissions');
|
|
6
7
|
const getDockerVersion = require('./version');
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -70,4 +71,14 @@ ${ logger.style.link('https://docs.create-magento-app.com/getting-started/prereq
|
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
73
|
|
|
73
|
-
|
|
74
|
+
/**
|
|
75
|
+
* @type {() => import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
|
|
76
|
+
*/
|
|
77
|
+
module.exports = () => ({
|
|
78
|
+
task: (ctx, task) => task.newListr([
|
|
79
|
+
checkDockerSocketPermissions(),
|
|
80
|
+
checkDocker()
|
|
81
|
+
], {
|
|
82
|
+
concurrent: false
|
|
83
|
+
})
|
|
84
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const os = require('os');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const logger = require('@scandipwa/scandipwa-dev-utils/logger');
|
|
4
|
+
const pathExists = require('../../../util/path-exists');
|
|
5
|
+
const { execCommandTask } = require('../../../util/exec-async-command');
|
|
6
|
+
|
|
7
|
+
const dockerSocketPath = '/var/run/docker.sock';
|
|
8
|
+
|
|
9
|
+
const fixCommand = `sudo chmod 666 ${ dockerSocketPath }`;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @type {() => import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
|
|
13
|
+
*/
|
|
14
|
+
const checkDockerSocketPermissions = () => ({
|
|
15
|
+
title: 'Checking Docker permissions',
|
|
16
|
+
// skip check if socket does not exist
|
|
17
|
+
skip: async () => !await pathExists(dockerSocketPath),
|
|
18
|
+
task: async (ctx, task) => {
|
|
19
|
+
try {
|
|
20
|
+
await fs.promises.access(dockerSocketPath, fs.constants.R_OK);
|
|
21
|
+
} catch (e) {
|
|
22
|
+
// check for permission
|
|
23
|
+
if (Math.abs(e.errno) === Math.abs(os.constants.errno.EACCES)) {
|
|
24
|
+
const confirmPrompt = await task.prompt({
|
|
25
|
+
type: 'Confirm',
|
|
26
|
+
message: `We detected that your Docker socket, located in ${ logger.style.file(dockerSocketPath) }, have permissions set, that prevents user (${ logger.style.misc(os.userInfo().username) }) from accessing it.
|
|
27
|
+
|
|
28
|
+
We can fix it by running the following command: ${ logger.style.command(fixCommand) }
|
|
29
|
+
|
|
30
|
+
Would you like to fix this permission issue?
|
|
31
|
+
|
|
32
|
+
Otherwise installation will likely fail.`
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
if (confirmPrompt) {
|
|
36
|
+
task.output = 'Enter your sudo password!';
|
|
37
|
+
task.output = logger.style.command(`>[sudo] password for ${ os.userInfo().username }:`);
|
|
38
|
+
return task.newListr(
|
|
39
|
+
execCommandTask(fixCommand, {
|
|
40
|
+
callback: (t) => {
|
|
41
|
+
task.output = t;
|
|
42
|
+
},
|
|
43
|
+
pipeInput: true
|
|
44
|
+
})
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
task.skip(`Permission issue detected in ${ logger.style.file(dockerSocketPath) } but user decided not to fix it.`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
options: {
|
|
52
|
+
bottomBar: 10
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
module.exports = {
|
|
57
|
+
checkDockerSocketPermissions
|
|
58
|
+
};
|
|
@@ -7,6 +7,20 @@ const { getArchSync } = require('../../util/arch');
|
|
|
7
7
|
const ConsoleBlock = require('../../util/console-block');
|
|
8
8
|
const { getComposerVersion } = require('../composer');
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @param {string} port
|
|
12
|
+
* @return {{ host: string, hostPort: string, containerPort: string }}
|
|
13
|
+
*/
|
|
14
|
+
const parsePort = (port) => {
|
|
15
|
+
const [host, hostPort, containerPort] = port.split(':');
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
host,
|
|
19
|
+
hostPort,
|
|
20
|
+
containerPort
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
10
24
|
const prettyStatus = async (ctx) => {
|
|
11
25
|
const {
|
|
12
26
|
ports,
|
|
@@ -64,14 +78,11 @@ const prettyStatus = async (ctx) => {
|
|
|
64
78
|
.addEmptyLine();
|
|
65
79
|
|
|
66
80
|
let containerStatus;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
} else {
|
|
71
|
-
containerStatus = logger.style.code(container.status.Status);
|
|
72
|
-
}
|
|
81
|
+
|
|
82
|
+
if (container.status && container.status.Health) {
|
|
83
|
+
containerStatus = `✓ ${ logger.style.file(container.status.Health.Status) } and ${ logger.style.file('running') }`;
|
|
73
84
|
} else {
|
|
74
|
-
containerStatus = logger.style.
|
|
85
|
+
containerStatus = logger.style.file(container.status.Status);
|
|
75
86
|
}
|
|
76
87
|
|
|
77
88
|
block
|
|
@@ -81,10 +92,14 @@ const prettyStatus = async (ctx) => {
|
|
|
81
92
|
.addLine(`Network: ${logger.style.link(container.network)}`);
|
|
82
93
|
|
|
83
94
|
if (container.ports.length > 0) {
|
|
84
|
-
block.addLine(
|
|
95
|
+
block.addLine('Port forwarding:');
|
|
96
|
+
container.ports.forEach((port) => {
|
|
97
|
+
const { host, hostPort, containerPort } = parsePort(port);
|
|
98
|
+
block.addLine(`${' '.repeat(3)} ${logger.style.link(`${host}:${hostPort}`)} -> ${logger.style.file(containerPort)}`);
|
|
99
|
+
});
|
|
85
100
|
}
|
|
86
101
|
|
|
87
|
-
if (container.env) {
|
|
102
|
+
if (container.env && Object.keys(container.env).length > 0) {
|
|
88
103
|
block.addLine('Environment variables:');
|
|
89
104
|
for (const [envName, envValue] of Object.entries(container.env)) {
|
|
90
105
|
block.addLine(`${' '.repeat(3)} ${logger.style.misc(envName)}=${logger.style.file(envValue)}`);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
const logger = require('@scandipwa/scandipwa-dev-utils/logger');
|
|
2
|
+
|
|
3
|
+
const WEB_LOCAL_LOCATION_TITLE = `Location on ${ logger.style.misc('localhost') }`;
|
|
4
|
+
const WEB_LOCATION_TITLE = 'Location on the Web';
|
|
5
|
+
const WEB_ADMIN_LOCATION_TITLE = 'Panel location';
|
|
6
|
+
const WEB_ADMIN_CREDENTIALS_TITLE = 'Panel credentials';
|
|
7
|
+
|
|
8
|
+
const mapDataStyle = ({ title, text }) => ({
|
|
9
|
+
title,
|
|
10
|
+
text: logger.style.link(text)
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @param {import("../../typings/context").ListrContext} ctx
|
|
15
|
+
* @return {{ frontend: { title: string, text: string }[], admin: { title: string, url: string }[]}}
|
|
16
|
+
*/
|
|
17
|
+
const getInstanceMetadata = (ctx) => {
|
|
18
|
+
const {
|
|
19
|
+
ports,
|
|
20
|
+
config: {
|
|
21
|
+
magentoConfiguration,
|
|
22
|
+
overridenConfiguration: { host, ssl }
|
|
23
|
+
}
|
|
24
|
+
} = ctx;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @type {{ title: string, text: string }[]}
|
|
28
|
+
*/
|
|
29
|
+
const frontend = [];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @type {{ title: string, text: string }[]}
|
|
33
|
+
*/
|
|
34
|
+
const admin = [];
|
|
35
|
+
|
|
36
|
+
const isNgrok = host.endsWith('ngrok.io');
|
|
37
|
+
|
|
38
|
+
if (isNgrok) {
|
|
39
|
+
frontend.push({
|
|
40
|
+
title: WEB_LOCAL_LOCATION_TITLE,
|
|
41
|
+
text: `${ssl.enabled ? 'https' : 'http'}://localhost${ssl.enabled || ports.app === 80 ? '' : `:${ports.app}`}/`
|
|
42
|
+
});
|
|
43
|
+
frontend.push({
|
|
44
|
+
title: WEB_LOCATION_TITLE,
|
|
45
|
+
text: `${ssl.enabled ? 'https' : 'http'}://${host}/`
|
|
46
|
+
});
|
|
47
|
+
} else {
|
|
48
|
+
frontend.push({
|
|
49
|
+
title: WEB_LOCATION_TITLE,
|
|
50
|
+
text: `${ssl.enabled ? 'https' : 'http'}://${host}${ssl.enabled || ports.app === 80 ? '' : `:${ports.app}`}/`
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const webLocation = frontend.find((u) => u.title === WEB_LOCATION_TITLE);
|
|
55
|
+
|
|
56
|
+
admin.push({
|
|
57
|
+
title: WEB_ADMIN_LOCATION_TITLE,
|
|
58
|
+
text: logger.style.link(`${webLocation.text}admin`)
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
admin.push({
|
|
62
|
+
title: WEB_ADMIN_CREDENTIALS_TITLE,
|
|
63
|
+
text: `${logger.style.misc(magentoConfiguration.user)} - ${logger.style.misc(magentoConfiguration.password)}`
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
admin,
|
|
68
|
+
frontend: frontend.map(mapDataStyle)
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
module.exports = {
|
|
73
|
+
getInstanceMetadata
|
|
74
|
+
};
|
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.13.5-alpha.
|
|
6
|
+
"version": "1.13.5-alpha.1",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"types": "./typings/index.d.ts",
|
|
9
9
|
"license": "OSL-3.0",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "e00e8d06964b4a7fc5a0095ea510fc26a06520a8"
|
|
45
45
|
}
|