@scandipwa/magento-scripts 2.0.0-alpha.8 → 2.0.0
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/cli.js +18 -1
- package/lib/commands/logs.js +28 -2
- package/lib/commands/start.js +24 -3
- package/lib/commands/status.js +9 -1
- package/lib/config/config.js +20 -2
- package/lib/config/dependencies-for-platforms.js +1 -1
- package/lib/config/docker.js +94 -54
- package/lib/config/get-project-configuration.js +5 -0
- package/lib/config/index.js +10 -3
- package/lib/config/php/versions/php-7.2.js +1 -0
- package/lib/config/php/versions/php-7.3.js +1 -0
- package/lib/config/php/versions/php-7.4.js +1 -0
- package/lib/config/php/versions/php-8.1.js +1 -0
- package/lib/config/php-config.js +4 -3
- package/lib/config/port-config.js +3 -1
- package/lib/config/services/composer/versions/composer-1.js +13 -0
- package/lib/config/services/composer/versions/composer-2.js +8 -0
- package/lib/config/services/composer/versions/index.js +4 -0
- package/lib/config/services/maildev/index.js +7 -0
- package/lib/config/services/nginx/versions/index.js +3 -0
- package/lib/config/services/nginx/versions/nginx-1.18.js +11 -0
- package/lib/config/{ssl-terminator → services/ssl-terminator}/index.js +3 -0
- package/lib/config/templates/magentorc.template +12 -5
- package/lib/config/templates/nginx.fastcgi_params.template +29 -0
- package/lib/config/templates/php-debug.template.ini +31 -0
- package/lib/config/templates/php-fpm.template.conf +1 -2
- package/lib/config/templates/php.template.ini +5 -201
- package/lib/config/templates/ssl-terminator.template.conf +2 -0
- package/lib/config/templates/varnish.template.vcl +20 -13
- package/lib/config/varnish/varnish-6-0.js +4 -0
- package/lib/config/varnish/varnish-6-6.js +4 -0
- package/lib/config/varnish/varnish-7-0.js +4 -0
- package/lib/config/versions/magento-2.2.10.js +41 -0
- package/lib/config/versions/magento-2.3.0.js +8 -10
- package/lib/config/versions/magento-2.3.1.js +8 -10
- package/lib/config/versions/magento-2.3.2-p1.js +8 -10
- package/lib/config/versions/magento-2.3.2-p2.js +8 -10
- package/lib/config/versions/magento-2.3.2.js +8 -10
- package/lib/config/versions/magento-2.3.3-p1.js +8 -10
- package/lib/config/versions/magento-2.3.3.js +8 -10
- package/lib/config/versions/magento-2.3.4-p1.js +8 -10
- package/lib/config/versions/magento-2.3.4-p2.js +8 -10
- package/lib/config/versions/magento-2.3.4.js +8 -10
- package/lib/config/versions/magento-2.3.5-p1.js +8 -10
- package/lib/config/versions/magento-2.3.5-p2.js +8 -10
- package/lib/config/versions/magento-2.3.5.js +8 -10
- package/lib/config/versions/magento-2.3.6-p1.js +8 -10
- package/lib/config/versions/magento-2.3.6.js +8 -10
- package/lib/config/versions/magento-2.3.7-p1.js +8 -10
- package/lib/config/versions/magento-2.3.7-p2.js +8 -10
- package/lib/config/versions/magento-2.3.7-p3.js +8 -10
- package/lib/config/versions/magento-2.3.7-p4.js +8 -10
- package/lib/config/versions/magento-2.3.7.js +8 -10
- package/lib/config/versions/magento-2.4.0-p1.js +8 -10
- package/lib/config/versions/magento-2.4.0.js +8 -10
- package/lib/config/versions/magento-2.4.1-p1.js +8 -10
- package/lib/config/versions/magento-2.4.1.js +8 -10
- package/lib/config/versions/magento-2.4.2-p1.js +8 -10
- package/lib/config/versions/magento-2.4.2-p2.js +8 -10
- package/lib/config/versions/magento-2.4.2.js +8 -10
- package/lib/config/versions/magento-2.4.3-p1.js +8 -10
- package/lib/config/versions/magento-2.4.3-p2.js +8 -10
- package/lib/config/versions/magento-2.4.3-p3.js +8 -10
- package/lib/config/versions/magento-2.4.3.js +8 -10
- package/lib/config/versions/magento-2.4.4-p1.js +8 -10
- package/lib/config/versions/magento-2.4.4.js +8 -10
- package/lib/config/versions/magento-2.4.5.js +8 -10
- package/lib/tasks/cli/create-bashrc-config.js +4 -2
- package/lib/tasks/composer/local-auth-json.js +1 -1
- package/lib/tasks/database/connect-to-database.js +6 -3
- package/lib/tasks/database/create-magento-database.js +5 -2
- package/lib/tasks/database/create-magento-user.js +50 -0
- package/lib/tasks/database/default-magento-database.js +3 -0
- package/lib/tasks/database/default-magento-user.js +7 -0
- package/lib/tasks/database/import-dump-to-database.js +3 -2
- package/lib/tasks/docker/api.d.ts +25 -1
- package/lib/tasks/docker/api.js +31 -1
- package/lib/tasks/docker/containers/container-api.d.ts +21 -0
- package/lib/tasks/docker/containers/container-api.js +82 -17
- package/lib/tasks/docker/containers/tasks.js +44 -13
- package/lib/tasks/docker/convert-composer-home-to-composer-cache-volume.js +52 -0
- package/lib/tasks/docker/convert-mysql-to-mariadb.js +2 -2
- package/lib/tasks/docker/image/image-api.d.ts +44 -0
- package/lib/tasks/docker/image/image-api.js +30 -2
- package/lib/tasks/docker/index.js +6 -1
- package/lib/tasks/docker/project-image-builder.js +37 -14
- package/lib/tasks/docker/system/index.js +5 -0
- package/lib/tasks/docker/system/system-api.d.ts +71 -0
- package/lib/tasks/docker/system/system-api.js +29 -0
- package/lib/tasks/docker/volume/index.js +2 -1
- package/lib/tasks/docker/volume/tasks.js +67 -9
- package/lib/tasks/docker/volume/volume-api.d.ts +40 -0
- package/lib/tasks/docker/volume/volume-api.js +54 -1
- package/lib/tasks/execute.js +11 -9
- package/lib/tasks/file-system/create-nginx-config.js +3 -5
- package/lib/tasks/file-system/create-php-config.js +2 -23
- package/lib/tasks/file-system/create-php-debug-config.js +45 -0
- package/lib/tasks/file-system/create-php-fpm-config.js +2 -4
- package/lib/tasks/file-system/create-phpstorm-config/exclude-folder-config.js +13 -3
- package/lib/tasks/file-system/create-phpstorm-config/index.js +2 -1
- package/lib/tasks/file-system/create-ssl-terminator-config.js +23 -8
- package/lib/tasks/file-system/create-varnish-config.js +4 -7
- package/lib/tasks/file-system/create-vscode-config.js +2 -1
- package/lib/tasks/file-system/index.js +3 -2
- package/lib/tasks/magento/setup-magento/configure-elasticsearch.js +2 -4
- package/lib/tasks/magento/setup-magento/flush-redis-config.js +3 -6
- package/lib/tasks/magento/setup-magento/index.js +2 -0
- package/lib/tasks/magento/setup-magento/install-magento.js +8 -13
- package/lib/tasks/magento/setup-magento/set-base-url.js +2 -1
- package/lib/tasks/magento/setup-magento/set-mail-config.js +22 -0
- package/lib/tasks/magento/setup-magento/varnish-config.js +4 -9
- package/lib/tasks/magento/setup-magento/waiting-for-varnish.js +15 -16
- package/lib/tasks/php/php-container.js +1 -1
- package/lib/tasks/php/update-env-php.js +3 -5
- package/lib/tasks/{prefix → project-config}/index.js +6 -6
- package/lib/tasks/requirements/composer-credentials.js +7 -3
- package/lib/tasks/requirements/docker/context.js +88 -0
- package/lib/tasks/requirements/docker/index.js +111 -19
- package/lib/tasks/requirements/docker/install.js +21 -7
- package/lib/tasks/requirements/docker/permissions.js +2 -11
- package/lib/tasks/requirements/docker/running-status.js +94 -24
- package/lib/tasks/requirements/docker/version.js +1 -0
- package/lib/tasks/requirements/index.js +0 -2
- package/lib/tasks/requirements/php-version.js +4 -2
- package/lib/tasks/start.js +27 -8
- package/lib/tasks/status/index.js +60 -21
- package/lib/tasks/stop.js +2 -0
- package/lib/tasks/theme/retrieve-theme-data.js +12 -2
- package/lib/util/config-file-validator.js +17 -3
- package/lib/util/execute-in-container.js +35 -5
- package/lib/util/instance-metadata.js +14 -2
- package/lib/util/systemctl.js +62 -13
- package/package.json +2 -2
- package/typings/context.d.ts +11 -0
- package/typings/index.d.ts +46 -1
- package/lib/tasks/requirements/dependency/arch.js +0 -50
- package/lib/tasks/requirements/dependency/centos.js +0 -36
- package/lib/tasks/requirements/dependency/fedora.js +0 -36
- package/lib/tasks/requirements/dependency/index.js +0 -33
- package/lib/tasks/requirements/dependency/mac.js +0 -124
- package/lib/tasks/requirements/dependency/ubuntu.js +0 -83
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const dependenciesForPlatforms = require('../../../config/dependencies-for-platforms');
|
|
2
|
-
const { execAsyncSpawn } = require('../../../util/exec-async-command');
|
|
3
|
-
const installDependenciesTask = require('../../../util/install-dependencies-task');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @type {() => import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
|
|
7
|
-
*/
|
|
8
|
-
const centosDependenciesCheck = () => ({
|
|
9
|
-
title: 'Checking CentOS dependencies',
|
|
10
|
-
task: async (ctx, task) => {
|
|
11
|
-
const installedDependencies = (await execAsyncSpawn('yum list installed')).split('\n')
|
|
12
|
-
.filter((pkg) => !pkg.toLowerCase().includes('installed packages'))
|
|
13
|
-
.map((pkg) => pkg.match(/^(\S+)/i))
|
|
14
|
-
.filter(Boolean)
|
|
15
|
-
.map((pkg) => pkg[1])
|
|
16
|
-
.map((pkg) => pkg.match(/^(\S+)\.\S+/i))
|
|
17
|
-
.filter(Boolean)
|
|
18
|
-
.map((pkg) => pkg[1]);
|
|
19
|
-
|
|
20
|
-
const dependenciesToInstall = dependenciesForPlatforms
|
|
21
|
-
.CentOS
|
|
22
|
-
.dependencies
|
|
23
|
-
.filter((dep) => !installedDependencies.includes(dep));
|
|
24
|
-
|
|
25
|
-
if (dependenciesToInstall.length > 0) {
|
|
26
|
-
return task.newListr(
|
|
27
|
-
installDependenciesTask({
|
|
28
|
-
platform: 'CentOS',
|
|
29
|
-
dependenciesToInstall
|
|
30
|
-
})
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
module.exports = centosDependenciesCheck;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const dependenciesForPlatforms = require('../../../config/dependencies-for-platforms');
|
|
2
|
-
const { execAsyncSpawn } = require('../../../util/exec-async-command');
|
|
3
|
-
const installDependenciesTask = require('../../../util/install-dependencies-task');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @type {() => import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
|
|
7
|
-
*/
|
|
8
|
-
const fedoraDependenciesCheck = () => ({
|
|
9
|
-
title: 'Checking Fedora Linux dependencies',
|
|
10
|
-
task: async (ctx, task) => {
|
|
11
|
-
const installedDependencies = (await execAsyncSpawn('yum list installed')).split('\n')
|
|
12
|
-
.filter((pkg) => !pkg.toLowerCase().includes('installed packages'))
|
|
13
|
-
.map((pkg) => pkg.match(/^(\S+)/i))
|
|
14
|
-
.filter(Boolean)
|
|
15
|
-
.map((pkg) => pkg[1])
|
|
16
|
-
.map((pkg) => pkg.match(/^(\S+)\.\S+/i))
|
|
17
|
-
.filter(Boolean)
|
|
18
|
-
.map((pkg) => pkg[1]);
|
|
19
|
-
|
|
20
|
-
const dependenciesToInstall = dependenciesForPlatforms
|
|
21
|
-
.Fedora
|
|
22
|
-
.dependencies
|
|
23
|
-
.filter((dep) => !installedDependencies.includes(dep));
|
|
24
|
-
|
|
25
|
-
if (dependenciesToInstall.length > 0) {
|
|
26
|
-
return task.newListr(
|
|
27
|
-
installDependenciesTask({
|
|
28
|
-
platform: 'Fedora',
|
|
29
|
-
dependenciesToInstall
|
|
30
|
-
})
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
module.exports = fedoraDependenciesCheck;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const archDependenciesCheck = require('./arch');
|
|
2
|
-
const fedoraDependenciesCheck = require('./fedora');
|
|
3
|
-
const centosDependenciesCheck = require('./centos');
|
|
4
|
-
const ubuntuDependenciesCheck = require('./ubuntu');
|
|
5
|
-
const macDependenciesCheck = require('./mac');
|
|
6
|
-
const osPlatform = require('../../../util/os-platform');
|
|
7
|
-
|
|
8
|
-
const dependencyCheck = async () => {
|
|
9
|
-
if (process.platform === 'darwin') {
|
|
10
|
-
return macDependenciesCheck();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const distro = await osPlatform();
|
|
14
|
-
switch (distro) {
|
|
15
|
-
case 'Arch Linux': {
|
|
16
|
-
return archDependenciesCheck();
|
|
17
|
-
}
|
|
18
|
-
case 'Fedora': {
|
|
19
|
-
return fedoraDependenciesCheck();
|
|
20
|
-
}
|
|
21
|
-
case 'CentOS': {
|
|
22
|
-
return centosDependenciesCheck();
|
|
23
|
-
}
|
|
24
|
-
case 'Ubuntu': {
|
|
25
|
-
return ubuntuDependenciesCheck();
|
|
26
|
-
}
|
|
27
|
-
default: {
|
|
28
|
-
// skip check
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
module.exports = dependencyCheck;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
const dependenciesForPlatforms = require('../../../config/dependencies-for-platforms');
|
|
2
|
-
const { execAsyncSpawn, execCommandTask } = require('../../../util/exec-async-command');
|
|
3
|
-
const {
|
|
4
|
-
BREW_BIN_PATH_ARM_NATIVE,
|
|
5
|
-
BREW_BIN_PATH_ARM_ROSETTA,
|
|
6
|
-
BREW_BIN_PATH_INTEL,
|
|
7
|
-
getBrewCommand
|
|
8
|
-
} = require('../../../util/get-brew-bin-path');
|
|
9
|
-
const installDependenciesTask = require('../../../util/install-dependencies-task');
|
|
10
|
-
const pathExists = require('../../../util/path-exists');
|
|
11
|
-
|
|
12
|
-
const brewInstallCommand = '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @returns {import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
|
|
16
|
-
*/
|
|
17
|
-
const installBrewRosettaTask = () => ({
|
|
18
|
-
title: 'Installing Brew using Rosetta 2',
|
|
19
|
-
task: async (ctx, task) => {
|
|
20
|
-
if (await pathExists(BREW_BIN_PATH_ARM_ROSETTA)) {
|
|
21
|
-
task.skip('Brew in Rosetta is already installed');
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return task.newListr(
|
|
26
|
-
execCommandTask(brewInstallCommand, {
|
|
27
|
-
useRosetta2: true
|
|
28
|
-
})
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @returns {import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
|
|
35
|
-
*/
|
|
36
|
-
const installBrewNativeTask = () => ({
|
|
37
|
-
title: 'Installing Brew',
|
|
38
|
-
task: async (ctx, task) => {
|
|
39
|
-
if (
|
|
40
|
-
(ctx.arch === 'arm64' && await pathExists(BREW_BIN_PATH_ARM_NATIVE))
|
|
41
|
-
|| (ctx.arch === 'x64' && await pathExists(BREW_BIN_PATH_INTEL))
|
|
42
|
-
) {
|
|
43
|
-
task.skip('Brew in native path is already installed');
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return task.newListr(
|
|
48
|
-
execCommandTask(brewInstallCommand, {
|
|
49
|
-
useRosetta2: false
|
|
50
|
-
})
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @returns {import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
|
|
57
|
-
*/
|
|
58
|
-
const macDependenciesCheck = () => ({
|
|
59
|
-
title: 'Checking MacOS dependencies',
|
|
60
|
-
task: async (ctx, task) => {
|
|
61
|
-
const tasks = [installBrewNativeTask()];
|
|
62
|
-
|
|
63
|
-
if (ctx.arch === 'arm64') {
|
|
64
|
-
tasks.push(installBrewRosettaTask());
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return task.newListr(
|
|
68
|
-
tasks.concat([
|
|
69
|
-
{
|
|
70
|
-
task: async () => {
|
|
71
|
-
const installDependenciesTasks = [];
|
|
72
|
-
if (ctx.arch === 'arm64') {
|
|
73
|
-
const installedNativeDependencies = (
|
|
74
|
-
await execAsyncSpawn(`${await getBrewCommand({ native: true })} list`, { useRosetta2: false })
|
|
75
|
-
).split('\n');
|
|
76
|
-
const dependenciesToInstallOnArm = dependenciesForPlatforms['darwin-arm']
|
|
77
|
-
.dependencies
|
|
78
|
-
.filter((dep) => !installedNativeDependencies.includes(dep));
|
|
79
|
-
|
|
80
|
-
if (dependenciesToInstallOnArm.length > 0) {
|
|
81
|
-
installDependenciesTasks.push(
|
|
82
|
-
installDependenciesTask({
|
|
83
|
-
platform: 'darwin-arm',
|
|
84
|
-
dependenciesToInstall: dependenciesToInstallOnArm,
|
|
85
|
-
useMacNativeEnvironment: true
|
|
86
|
-
})
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const installedDependencies = (
|
|
92
|
-
await execAsyncSpawn(`${await getBrewCommand({ native: false })} list`, { useRosetta2: true })
|
|
93
|
-
).split('\n');
|
|
94
|
-
const dependenciesToInstall = dependenciesForPlatforms
|
|
95
|
-
.darwin
|
|
96
|
-
.dependencies
|
|
97
|
-
.filter((dep) => !installedDependencies.includes(dep));
|
|
98
|
-
|
|
99
|
-
if (dependenciesToInstall.length > 0) {
|
|
100
|
-
installDependenciesTasks.push(
|
|
101
|
-
installDependenciesTask({
|
|
102
|
-
platform: 'darwin',
|
|
103
|
-
dependenciesToInstall,
|
|
104
|
-
useMacNativeEnvironment: false
|
|
105
|
-
})
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (installDependenciesTasks.length > 0) {
|
|
110
|
-
return task.newListr(installDependenciesTasks);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
task.skip();
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
])
|
|
117
|
-
);
|
|
118
|
-
},
|
|
119
|
-
options: {
|
|
120
|
-
bottomBar: 10
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
module.exports = macDependenciesCheck;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
const logger = require('@scandipwa/scandipwa-dev-utils/logger');
|
|
2
|
-
const os = require('os');
|
|
3
|
-
const dependenciesForPlatforms = require('../../../config/dependencies-for-platforms');
|
|
4
|
-
const { execAsyncSpawn, execCommandTask } = require('../../../util/exec-async-command');
|
|
5
|
-
const installDependenciesTask = require('../../../util/install-dependencies-task');
|
|
6
|
-
|
|
7
|
-
const pkgRegex = /^(\S+)\/\S+\s(\S+)\s\S+\s\S+$/i;
|
|
8
|
-
|
|
9
|
-
const updateSystem = () => ({
|
|
10
|
-
title: 'Updating Ubuntu system',
|
|
11
|
-
task: async (ctx, task) => {
|
|
12
|
-
task.output = 'Enter your sudo password!';
|
|
13
|
-
task.output = logger.style.command(`>[sudo] password for ${ os.userInfo().username }:`);
|
|
14
|
-
|
|
15
|
-
return task.newListr(
|
|
16
|
-
execCommandTask('sudo apt update', {
|
|
17
|
-
callback: (t) => {
|
|
18
|
-
task.output = t;
|
|
19
|
-
},
|
|
20
|
-
pipeInput: true
|
|
21
|
-
})
|
|
22
|
-
);
|
|
23
|
-
},
|
|
24
|
-
options: {
|
|
25
|
-
bottomBar: 10
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @type {() => import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
|
|
31
|
-
*/
|
|
32
|
-
const ubuntuDependenciesCheck = () => ({
|
|
33
|
-
title: 'Checking Ubuntu Linux dependencies',
|
|
34
|
-
task: async (ctx, task) => {
|
|
35
|
-
const installedDependencies = (await execAsyncSpawn('apt list --installed')).split('\n')
|
|
36
|
-
.filter((pkg) => pkgRegex.test(pkg))
|
|
37
|
-
.map((pkg) => pkg.match(pkgRegex))
|
|
38
|
-
.map((pkg) => pkg[1]);
|
|
39
|
-
|
|
40
|
-
const dependenciesToInstall = dependenciesForPlatforms
|
|
41
|
-
.Ubuntu
|
|
42
|
-
.dependencies
|
|
43
|
-
.filter((dep) => {
|
|
44
|
-
if (Array.isArray(dep)) {
|
|
45
|
-
return !dep.some((dp) => installedDependencies.includes(dp));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return !installedDependencies.includes(dep);
|
|
49
|
-
})
|
|
50
|
-
.map((dep) => (Array.isArray(dep) ? dep[0] : dep));
|
|
51
|
-
|
|
52
|
-
if (dependenciesToInstall.length > 0) {
|
|
53
|
-
const runSystemUpdate = await task.prompt({
|
|
54
|
-
type: 'Confirm',
|
|
55
|
-
message: `Would you like to run ${logger.style.command('apt update')} before installing missing ${dependenciesToInstall.length} dependenc${dependenciesToInstall.length > 1 ? 'ies' : 'y'}?`
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
if (runSystemUpdate) {
|
|
59
|
-
return task.newListr([
|
|
60
|
-
updateSystem(),
|
|
61
|
-
installDependenciesTask({
|
|
62
|
-
platform: 'Ubuntu',
|
|
63
|
-
dependenciesToInstall
|
|
64
|
-
})
|
|
65
|
-
], {
|
|
66
|
-
concurrent: false
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return task.newListr(
|
|
71
|
-
installDependenciesTask({
|
|
72
|
-
platform: 'Ubuntu',
|
|
73
|
-
dependenciesToInstall
|
|
74
|
-
})
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
options: {
|
|
79
|
-
bottomBar: 10
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
module.exports = ubuntuDependenciesCheck;
|