@scandipwa/magento-scripts 2.0.0-alpha.10 → 2.0.0-alpha.11
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 +5 -0
- package/lib/commands/start.js +17 -3
- package/lib/commands/status.js +9 -1
- package/lib/config/config.js +20 -2
- package/lib/config/docker.js +43 -44
- package/lib/config/index.js +1 -1
- 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/services/composer/versions/composer-1.js +8 -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/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 +6 -5
- 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 +6 -202
- 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.3.0.js +5 -9
- package/lib/config/versions/magento-2.3.1.js +5 -9
- package/lib/config/versions/magento-2.3.2-p1.js +5 -9
- package/lib/config/versions/magento-2.3.2-p2.js +5 -9
- package/lib/config/versions/magento-2.3.2.js +5 -9
- package/lib/config/versions/magento-2.3.3-p1.js +5 -9
- package/lib/config/versions/magento-2.3.3.js +5 -9
- package/lib/config/versions/magento-2.3.4-p1.js +5 -9
- package/lib/config/versions/magento-2.3.4-p2.js +5 -9
- package/lib/config/versions/magento-2.3.4.js +5 -9
- package/lib/config/versions/magento-2.3.5-p1.js +5 -9
- package/lib/config/versions/magento-2.3.5-p2.js +5 -9
- package/lib/config/versions/magento-2.3.5.js +5 -9
- package/lib/config/versions/magento-2.3.6-p1.js +5 -9
- package/lib/config/versions/magento-2.3.6.js +5 -9
- package/lib/config/versions/magento-2.3.7-p1.js +5 -9
- package/lib/config/versions/magento-2.3.7-p2.js +5 -9
- package/lib/config/versions/magento-2.3.7-p3.js +5 -9
- package/lib/config/versions/magento-2.3.7-p4.js +5 -9
- package/lib/config/versions/magento-2.3.7.js +5 -9
- package/lib/config/versions/magento-2.4.0-p1.js +5 -9
- package/lib/config/versions/magento-2.4.0.js +5 -9
- package/lib/config/versions/magento-2.4.1-p1.js +5 -9
- package/lib/config/versions/magento-2.4.1.js +5 -9
- package/lib/config/versions/magento-2.4.2-p1.js +5 -9
- package/lib/config/versions/magento-2.4.2-p2.js +5 -9
- package/lib/config/versions/magento-2.4.2.js +5 -9
- package/lib/config/versions/magento-2.4.3-p1.js +5 -9
- package/lib/config/versions/magento-2.4.3-p2.js +5 -9
- package/lib/config/versions/magento-2.4.3-p3.js +5 -9
- package/lib/config/versions/magento-2.4.3.js +5 -9
- package/lib/config/versions/magento-2.4.4-p1.js +5 -9
- package/lib/config/versions/magento-2.4.4.js +5 -9
- package/lib/config/versions/magento-2.4.5.js +5 -9
- 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 +14 -0
- package/lib/tasks/docker/containers/container-api.js +50 -1
- package/lib/tasks/docker/containers/tasks.js +32 -1
- package/lib/tasks/docker/index.js +6 -1
- package/lib/tasks/docker/project-image-builder.js +6 -8
- package/lib/tasks/docker/volume/index.js +2 -1
- package/lib/tasks/docker/volume/tasks.js +54 -9
- package/lib/tasks/docker/volume/volume-api.d.ts +10 -0
- package/lib/tasks/docker/volume/volume-api.js +25 -1
- package/lib/tasks/execute.js +5 -2
- 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-ssl-terminator-config.js +4 -7
- package/lib/tasks/file-system/create-varnish-config.js +4 -7
- package/lib/tasks/file-system/index.js +2 -0
- 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/install-magento.js +8 -10
- 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 -4
- 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 +107 -18
- 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 -6
- package/lib/tasks/status/index.js +13 -11
- package/lib/tasks/stop.js +2 -0
- package/lib/util/config-file-validator.js +2 -0
- package/lib/util/execute-in-container.js +3 -3
- package/lib/util/systemctl.js +62 -13
- package/package.json +2 -2
- package/typings/context.d.ts +7 -0
- package/typings/index.d.ts +38 -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,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;
|