@scandipwa/magento-scripts 1.14.1-alpha.0 → 1.14.1-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/index.js +13 -0
- package/lib/commands/cli.js +28 -1
- package/lib/commands/execute.js +2 -1
- package/lib/commands/logs.js +1 -0
- package/lib/commands/start.js +18 -5
- package/lib/config/dependencies-for-platforms.js +12 -2
- package/lib/config/docker.js +89 -15
- package/lib/config/get-port-config.js +9 -3
- package/lib/config/index.js +2 -1
- package/lib/config/php/extensions/libsodium.js +2 -1
- package/lib/config/port-config.js +3 -1
- package/lib/config/scandipwa-versions.js +2 -1
- package/lib/config/ssl-terminator/index.js +10 -0
- package/lib/config/system-config.js +34 -5
- package/lib/config/templates/magentorc.template +3 -5
- package/lib/config/templates/nginx.template.conf +0 -14
- package/lib/config/templates/php.template.ini +6 -4
- package/lib/config/templates/ssl-terminator.template.conf +27 -0
- package/lib/config/templates/varnish.template.vcl +250 -0
- package/lib/config/varnish/varnish-6-0.js +11 -0
- package/lib/config/varnish/varnish-6-6.js +11 -0
- package/lib/config/varnish/varnish-7-0.js +11 -0
- package/lib/config/versions/magento-2.3.0.js +9 -1
- package/lib/config/versions/magento-2.3.1.js +9 -1
- package/lib/config/versions/magento-2.3.2-p2.js +9 -1
- package/lib/config/versions/magento-2.3.2.js +9 -1
- package/lib/config/versions/magento-2.3.3-p1.js +9 -1
- package/lib/config/versions/magento-2.3.3.js +9 -1
- package/lib/config/versions/magento-2.3.4-p2.js +9 -1
- package/lib/config/versions/magento-2.3.4.js +9 -1
- package/lib/config/versions/magento-2.3.5-p1.js +9 -1
- package/lib/config/versions/magento-2.3.5-p2.js +9 -1
- package/lib/config/versions/magento-2.3.5.js +9 -1
- package/lib/config/versions/magento-2.3.6-p1.js +9 -1
- package/lib/config/versions/magento-2.3.6.js +9 -1
- package/lib/config/versions/magento-2.3.7-p1.js +9 -1
- package/lib/config/versions/magento-2.3.7-p2.js +9 -1
- package/lib/config/versions/magento-2.3.7-p3.js +9 -1
- package/lib/config/versions/magento-2.3.7.js +9 -1
- package/lib/config/versions/magento-2.4.0-p1.js +9 -1
- package/lib/config/versions/magento-2.4.0.js +9 -1
- package/lib/config/versions/magento-2.4.1-p1.js +9 -1
- package/lib/config/versions/magento-2.4.1.js +9 -1
- package/lib/config/versions/magento-2.4.2-p1.js +9 -1
- package/lib/config/versions/magento-2.4.2-p2.js +9 -1
- package/lib/config/versions/magento-2.4.2.js +9 -1
- package/lib/config/versions/magento-2.4.3-p1.js +9 -1
- package/lib/config/versions/magento-2.4.3-p2.js +9 -1
- package/lib/config/versions/magento-2.4.3.js +9 -1
- package/lib/config/versions/magento-2.4.4.js +9 -1
- package/lib/errors/known-error.js +15 -0
- package/lib/errors/unknown-error.js +15 -0
- package/lib/tasks/cli/create-bashrc-config.js +7 -3
- package/lib/tasks/composer/index.js +5 -3
- package/lib/tasks/composer/local-auth-json.js +4 -2
- package/lib/tasks/docker/containers.js +13 -8
- package/lib/tasks/docker/network.js +2 -1
- package/lib/tasks/docker/volumes.js +4 -4
- package/lib/tasks/file-system/create-nginx-config.js +9 -40
- package/lib/tasks/file-system/create-php-config.js +2 -1
- package/lib/tasks/file-system/create-php-fpm-config.js +2 -1
- package/lib/tasks/file-system/create-php-storm-config.js +6 -5
- package/lib/tasks/file-system/create-ssl-terminator-config.js +96 -0
- package/lib/tasks/file-system/create-varnish-config.js +53 -0
- package/lib/tasks/file-system/create-vscode-config.js +3 -2
- package/lib/tasks/file-system/index.js +5 -1
- package/lib/tasks/magento/enable-magento-composer-plugins.js +3 -2
- package/lib/tasks/magento/install-magento.js +7 -5
- package/lib/tasks/magento/setup-magento/configure-elasticsearch.js +1 -1
- package/lib/tasks/magento/setup-magento/disable-2fa.js +4 -12
- package/lib/tasks/magento/setup-magento/disable-full-page-cache.js +20 -0
- package/lib/tasks/magento/setup-magento/flush-redis-config.js +2 -1
- package/lib/tasks/magento/setup-magento/increase-admin-session-lifetime.js +14 -16
- package/lib/tasks/magento/setup-magento/index.js +3 -1
- package/lib/tasks/magento/setup-magento/install-magento.js +2 -1
- package/lib/tasks/magento/setup-magento/migrate-database.js +24 -11
- package/lib/tasks/magento/setup-magento/set-base-url.js +7 -2
- package/lib/tasks/magento/setup-magento/upgrade-magento.js +27 -3
- package/lib/tasks/magento/setup-magento/varnish-config.js +69 -0
- package/lib/tasks/magento/setup-magento/waiting-for-varnish.js +41 -0
- package/lib/tasks/mysql/connect-to-mysql.js +2 -1
- package/lib/tasks/mysql/fix-db.js +2 -2
- package/lib/tasks/mysql/import-dump-to-mysql.js +4 -2
- package/lib/tasks/mysql/import-remote-db/index.js +2 -1
- package/lib/tasks/mysql/import-remote-db/ssh/index.js +2 -1
- package/lib/tasks/mysql/import-remote-db/ssh/regular-server.js +2 -1
- package/lib/tasks/php/bundled-extensions.js +28 -0
- package/lib/tasks/php/compile-options.js +18 -48
- package/lib/tasks/php/compile.js +4 -3
- package/lib/tasks/php/configure.js +7 -66
- package/lib/tasks/php/extensions/index.js +71 -0
- package/lib/tasks/php/index.js +8 -7
- package/lib/tasks/php/update-env-php.js +16 -1
- package/lib/tasks/php/update-env.php +56 -12
- package/lib/tasks/php/update-phpbrew.js +2 -1
- package/lib/tasks/php/validate-php.js +67 -0
- package/lib/tasks/php-fpm/start-php-fpm.js +2 -1
- package/lib/tasks/requirements/composer.js +5 -3
- package/lib/tasks/requirements/dependency/arch.js +2 -1
- package/lib/tasks/requirements/dependency/centos.js +2 -1
- package/lib/tasks/requirements/dependency/fedora.js +2 -1
- package/lib/tasks/requirements/docker/index.js +7 -4
- package/lib/tasks/requirements/docker/install.js +13 -12
- package/lib/tasks/requirements/docker/running-status.js +138 -0
- package/lib/tasks/requirements/docker/version.js +3 -0
- package/lib/tasks/requirements/index.js +5 -5
- package/lib/tasks/requirements/node-version.js +2 -1
- package/lib/tasks/requirements/php-version.js +8 -4
- package/lib/tasks/requirements/phpbrew/index.js +2 -1
- package/lib/tasks/requirements/phpbrew/install.js +2 -1
- package/lib/tasks/requirements/phpbrew/version.js +2 -1
- package/lib/tasks/requirements/platform.js +3 -2
- package/lib/tasks/start.js +11 -10
- package/lib/tasks/status/index.js +25 -9
- package/lib/tasks/theme/build-theme.js +27 -8
- package/lib/tasks/theme/install-theme.js +18 -5
- package/lib/tasks/theme/link-theme.js +2 -2
- package/lib/tasks/theme/retrieve-theme-data.js +2 -1
- package/lib/tasks/theme/setup-persisted-query.js +5 -4
- package/lib/tasks/theme/setup-themes.js +5 -3
- package/lib/tasks/theme/symlink-theme.js +20 -4
- package/lib/util/analytics.js +337 -0
- package/lib/util/config-file-validator.js +14 -2
- package/lib/util/config-php-json.js +20 -0
- package/lib/util/env-php-json.js +3 -2
- package/lib/util/get-installed-magento-version.js +3 -2
- package/lib/util/get-jsonfile-data.js +2 -1
- package/lib/util/install-dependencies-task.js +4 -4
- package/lib/util/instance-metadata.js +11 -4
- package/lib/util/ip.js +45 -1
- package/lib/util/is-running-root.js +3 -0
- package/lib/util/magento-task.js +20 -9
- package/lib/util/match-filesystem.js +2 -1
- package/lib/util/php-task.js +6 -2
- package/lib/util/request.js +0 -0
- package/lib/util/resolve-configuration-with-overrides.js +2 -1
- package/lib/util/run-composer.js +3 -2
- package/lib/util/run-magento.js +3 -2
- package/lib/util/run-php.js +10 -3
- package/lib/util/systemctl.js +46 -0
- package/lib/util/wait-for-it.js +3 -2
- package/package.json +4 -3
- package/typings/context.d.ts +5 -1
- package/typings/index.d.ts +32 -1
- package/lib/tasks/magento/setup-magento/adjust-magento-configuration.js +0 -27
- package/lib/tasks/magento/setup-magento/disable-page-cache.js +0 -11
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
4
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
3
5
|
|
|
4
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
5
7
|
magentoVersion: '2.3.7-p1',
|
|
@@ -16,6 +18,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
16
18
|
SimpleXML: {},
|
|
17
19
|
xdebug: {
|
|
18
20
|
version: '3.1.2'
|
|
21
|
+
},
|
|
22
|
+
apcu: {},
|
|
23
|
+
opcache: {
|
|
24
|
+
extensionName: 'Zend OPcache'
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
},
|
|
@@ -37,7 +43,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
37
43
|
},
|
|
38
44
|
composer: {
|
|
39
45
|
version: '2'
|
|
40
|
-
}
|
|
46
|
+
},
|
|
47
|
+
varnish: varnish66({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
41
49
|
},
|
|
42
50
|
magento: defaultMagentoConfig,
|
|
43
51
|
host: 'localhost',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
4
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
3
5
|
|
|
4
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
5
7
|
magentoVersion: '2.3.7-p2',
|
|
@@ -16,6 +18,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
16
18
|
SimpleXML: {},
|
|
17
19
|
xdebug: {
|
|
18
20
|
version: '3.1.2'
|
|
21
|
+
},
|
|
22
|
+
apcu: {},
|
|
23
|
+
opcache: {
|
|
24
|
+
extensionName: 'Zend OPcache'
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
},
|
|
@@ -37,7 +43,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
37
43
|
},
|
|
38
44
|
composer: {
|
|
39
45
|
version: '2'
|
|
40
|
-
}
|
|
46
|
+
},
|
|
47
|
+
varnish: varnish66({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
41
49
|
},
|
|
42
50
|
magento: defaultMagentoConfig,
|
|
43
51
|
host: 'localhost',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
4
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
3
5
|
|
|
4
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
5
7
|
magentoVersion: '2.3.7-p3',
|
|
@@ -16,6 +18,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
16
18
|
SimpleXML: {},
|
|
17
19
|
xdebug: {
|
|
18
20
|
version: '3.1.2'
|
|
21
|
+
},
|
|
22
|
+
apcu: {},
|
|
23
|
+
opcache: {
|
|
24
|
+
extensionName: 'Zend OPcache'
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
},
|
|
@@ -37,7 +43,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
37
43
|
},
|
|
38
44
|
composer: {
|
|
39
45
|
version: '2'
|
|
40
|
-
}
|
|
46
|
+
},
|
|
47
|
+
varnish: varnish66({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
41
49
|
},
|
|
42
50
|
magento: defaultMagentoConfig,
|
|
43
51
|
host: 'localhost',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
4
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
3
5
|
|
|
4
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
5
7
|
magentoVersion: '2.3.7',
|
|
@@ -16,6 +18,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
16
18
|
SimpleXML: {},
|
|
17
19
|
xdebug: {
|
|
18
20
|
version: '3.1.2'
|
|
21
|
+
},
|
|
22
|
+
apcu: {},
|
|
23
|
+
opcache: {
|
|
24
|
+
extensionName: 'Zend OPcache'
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
},
|
|
@@ -37,7 +43,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
37
43
|
},
|
|
38
44
|
composer: {
|
|
39
45
|
version: '2'
|
|
40
|
-
}
|
|
46
|
+
},
|
|
47
|
+
varnish: varnish66({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
41
49
|
},
|
|
42
50
|
magento: defaultMagentoConfig,
|
|
43
51
|
host: 'localhost',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
4
|
+
const { varnish60 } = require('../varnish/varnish-6-0');
|
|
3
5
|
|
|
4
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
5
7
|
magentoVersion: '2.4.0-p1',
|
|
@@ -16,6 +18,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
16
18
|
SimpleXML: {},
|
|
17
19
|
xdebug: {
|
|
18
20
|
version: '3.1.2'
|
|
21
|
+
},
|
|
22
|
+
apcu: {},
|
|
23
|
+
opcache: {
|
|
24
|
+
extensionName: 'Zend OPcache'
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
},
|
|
@@ -37,7 +43,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
37
43
|
},
|
|
38
44
|
composer: {
|
|
39
45
|
version: '1'
|
|
40
|
-
}
|
|
46
|
+
},
|
|
47
|
+
varnish: varnish60({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
41
49
|
},
|
|
42
50
|
magento: defaultMagentoConfig,
|
|
43
51
|
host: 'localhost',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
4
|
+
const { varnish60 } = require('../varnish/varnish-6-0');
|
|
3
5
|
|
|
4
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
5
7
|
magentoVersion: '2.4.0',
|
|
@@ -16,6 +18,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
16
18
|
SimpleXML: {},
|
|
17
19
|
xdebug: {
|
|
18
20
|
version: '3.1.2'
|
|
21
|
+
},
|
|
22
|
+
apcu: {},
|
|
23
|
+
opcache: {
|
|
24
|
+
extensionName: 'Zend OPcache'
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
},
|
|
@@ -37,7 +43,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
37
43
|
},
|
|
38
44
|
composer: {
|
|
39
45
|
version: '1'
|
|
40
|
-
}
|
|
46
|
+
},
|
|
47
|
+
varnish: varnish60({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
41
49
|
},
|
|
42
50
|
magento: defaultMagentoConfig,
|
|
43
51
|
host: 'localhost',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
3
|
const { libsodium } = require('../php/extensions');
|
|
4
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
5
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
6
|
|
|
5
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
6
8
|
magentoVersion: '2.4.1-p1',
|
|
@@ -18,6 +20,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
18
20
|
libsodium,
|
|
19
21
|
xdebug: {
|
|
20
22
|
version: '3.1.2'
|
|
23
|
+
},
|
|
24
|
+
apcu: {},
|
|
25
|
+
opcache: {
|
|
26
|
+
extensionName: 'Zend OPcache'
|
|
21
27
|
}
|
|
22
28
|
}
|
|
23
29
|
},
|
|
@@ -39,7 +45,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
39
45
|
},
|
|
40
46
|
composer: {
|
|
41
47
|
version: '1'
|
|
42
|
-
}
|
|
48
|
+
},
|
|
49
|
+
varnish: varnish66({ templateDir }),
|
|
50
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
43
51
|
},
|
|
44
52
|
magento: defaultMagentoConfig,
|
|
45
53
|
host: 'localhost',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
4
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
3
5
|
|
|
4
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
5
7
|
magentoVersion: '2.4.1',
|
|
@@ -16,6 +18,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
16
18
|
SimpleXML: {},
|
|
17
19
|
xdebug: {
|
|
18
20
|
version: '3.1.2'
|
|
21
|
+
},
|
|
22
|
+
apcu: {},
|
|
23
|
+
opcache: {
|
|
24
|
+
extensionName: 'Zend OPcache'
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
},
|
|
@@ -37,7 +43,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
37
43
|
},
|
|
38
44
|
composer: {
|
|
39
45
|
version: '1'
|
|
40
|
-
}
|
|
46
|
+
},
|
|
47
|
+
varnish: varnish66({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
41
49
|
},
|
|
42
50
|
magento: defaultMagentoConfig,
|
|
43
51
|
host: 'localhost',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
3
|
const { libsodium } = require('../php/extensions');
|
|
4
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
5
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
6
|
|
|
5
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
6
8
|
magentoVersion: '2.4.2-p1',
|
|
@@ -20,6 +22,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
20
22
|
fileinfo: {},
|
|
21
23
|
xdebug: {
|
|
22
24
|
version: '3.1.2'
|
|
25
|
+
},
|
|
26
|
+
apcu: {},
|
|
27
|
+
opcache: {
|
|
28
|
+
extensionName: 'Zend OPcache'
|
|
23
29
|
}
|
|
24
30
|
}
|
|
25
31
|
},
|
|
@@ -41,7 +47,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
41
47
|
},
|
|
42
48
|
composer: {
|
|
43
49
|
version: '2'
|
|
44
|
-
}
|
|
50
|
+
},
|
|
51
|
+
varnish: varnish66({ templateDir }),
|
|
52
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
45
53
|
},
|
|
46
54
|
magento: defaultMagentoConfig,
|
|
47
55
|
host: 'localhost',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
3
|
const { libsodium } = require('../php/extensions');
|
|
4
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
5
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
6
|
|
|
5
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
6
8
|
magentoVersion: '2.4.2-p2',
|
|
@@ -20,6 +22,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
20
22
|
fileinfo: {},
|
|
21
23
|
xdebug: {
|
|
22
24
|
version: '3.1.2'
|
|
25
|
+
},
|
|
26
|
+
apcu: {},
|
|
27
|
+
opcache: {
|
|
28
|
+
extensionName: 'Zend OPcache'
|
|
23
29
|
}
|
|
24
30
|
}
|
|
25
31
|
},
|
|
@@ -41,7 +47,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
41
47
|
},
|
|
42
48
|
composer: {
|
|
43
49
|
version: '2'
|
|
44
|
-
}
|
|
50
|
+
},
|
|
51
|
+
varnish: varnish66({ templateDir }),
|
|
52
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
45
53
|
},
|
|
46
54
|
magento: defaultMagentoConfig,
|
|
47
55
|
host: 'localhost',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
3
|
const { libsodium } = require('../php/extensions');
|
|
4
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
5
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
6
|
|
|
5
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
6
8
|
magentoVersion: '2.4.2',
|
|
@@ -19,6 +21,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
19
21
|
fileinfo: {},
|
|
20
22
|
xdebug: {
|
|
21
23
|
version: '3.1.2'
|
|
24
|
+
},
|
|
25
|
+
apcu: {},
|
|
26
|
+
opcache: {
|
|
27
|
+
extensionName: 'Zend OPcache'
|
|
22
28
|
}
|
|
23
29
|
}
|
|
24
30
|
},
|
|
@@ -40,7 +46,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
40
46
|
},
|
|
41
47
|
composer: {
|
|
42
48
|
version: '2'
|
|
43
|
-
}
|
|
49
|
+
},
|
|
50
|
+
varnish: varnish66({ templateDir }),
|
|
51
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
44
52
|
},
|
|
45
53
|
magento: defaultMagentoConfig,
|
|
46
54
|
host: 'localhost',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
3
|
const { libsodium } = require('../php/extensions');
|
|
4
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
5
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
6
|
|
|
5
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
6
8
|
magentoVersion: '2.4.3-p1',
|
|
@@ -20,6 +22,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
20
22
|
fileinfo: {},
|
|
21
23
|
xdebug: {
|
|
22
24
|
version: '3.1.2'
|
|
25
|
+
},
|
|
26
|
+
apcu: {},
|
|
27
|
+
opcache: {
|
|
28
|
+
extensionName: 'Zend OPcache'
|
|
23
29
|
}
|
|
24
30
|
}
|
|
25
31
|
},
|
|
@@ -41,7 +47,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
41
47
|
},
|
|
42
48
|
composer: {
|
|
43
49
|
version: '2'
|
|
44
|
-
}
|
|
50
|
+
},
|
|
51
|
+
varnish: varnish66({ templateDir }),
|
|
52
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
45
53
|
},
|
|
46
54
|
magento: defaultMagentoConfig,
|
|
47
55
|
host: 'localhost',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
3
|
const { libsodium } = require('../php/extensions');
|
|
4
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
5
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
6
|
|
|
5
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
6
8
|
magentoVersion: '2.4.3-p2',
|
|
@@ -20,6 +22,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
20
22
|
fileinfo: {},
|
|
21
23
|
xdebug: {
|
|
22
24
|
version: '3.1.2'
|
|
25
|
+
},
|
|
26
|
+
apcu: {},
|
|
27
|
+
opcache: {
|
|
28
|
+
extensionName: 'Zend OPcache'
|
|
23
29
|
}
|
|
24
30
|
}
|
|
25
31
|
},
|
|
@@ -41,7 +47,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
41
47
|
},
|
|
42
48
|
composer: {
|
|
43
49
|
version: '2'
|
|
44
|
-
}
|
|
50
|
+
},
|
|
51
|
+
varnish: varnish66({ templateDir }),
|
|
52
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
45
53
|
},
|
|
46
54
|
magento: defaultMagentoConfig,
|
|
47
55
|
host: 'localhost',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
3
|
const { libsodium } = require('../php/extensions');
|
|
4
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
5
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
6
|
|
|
5
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
6
8
|
magentoVersion: '2.4.3',
|
|
@@ -20,6 +22,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
20
22
|
fileinfo: {},
|
|
21
23
|
xdebug: {
|
|
22
24
|
version: '3.1.2'
|
|
25
|
+
},
|
|
26
|
+
apcu: {},
|
|
27
|
+
opcache: {
|
|
28
|
+
extensionName: 'Zend OPcache'
|
|
23
29
|
}
|
|
24
30
|
}
|
|
25
31
|
},
|
|
@@ -41,7 +47,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
41
47
|
},
|
|
42
48
|
composer: {
|
|
43
49
|
version: '2'
|
|
44
|
-
}
|
|
50
|
+
},
|
|
51
|
+
varnish: varnish66({ templateDir }),
|
|
52
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
45
53
|
},
|
|
46
54
|
magento: defaultMagentoConfig,
|
|
47
55
|
host: 'localhost',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
3
|
const { libsodium } = require('../php/extensions');
|
|
4
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
5
|
+
const { varnish70 } = require('../varnish/varnish-7-0');
|
|
4
6
|
|
|
5
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
6
8
|
magentoVersion: '2.4.4',
|
|
@@ -20,6 +22,10 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
20
22
|
fileinfo: {},
|
|
21
23
|
xdebug: {
|
|
22
24
|
version: '3.1.4'
|
|
25
|
+
},
|
|
26
|
+
apcu: {},
|
|
27
|
+
opcache: {
|
|
28
|
+
extensionName: 'Zend OPcache'
|
|
23
29
|
}
|
|
24
30
|
}
|
|
25
31
|
},
|
|
@@ -41,7 +47,9 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
41
47
|
},
|
|
42
48
|
composer: {
|
|
43
49
|
version: '2'
|
|
44
|
-
}
|
|
50
|
+
},
|
|
51
|
+
varnish: varnish70({ templateDir }),
|
|
52
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
45
53
|
},
|
|
46
54
|
magento: defaultMagentoConfig,
|
|
47
55
|
host: 'localhost',
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class KnownError extends Error {
|
|
2
|
+
/**
|
|
3
|
+
* @param {String} message Error message
|
|
4
|
+
* @param {String} [name] Error name
|
|
5
|
+
* @param {{ reportToAnalytics?: boolean }} [param2]
|
|
6
|
+
*/
|
|
7
|
+
constructor(message, name = 'Known Error', { reportToAnalytics = true } = {}) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = name;
|
|
10
|
+
|
|
11
|
+
this.reportToAnalytics = reportToAnalytics;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
module.exports = KnownError;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class UnknownError extends Error {
|
|
2
|
+
/**
|
|
3
|
+
* @param {String} message Error message
|
|
4
|
+
* @param {String} [name] Error name
|
|
5
|
+
* @param {{ reportToAnalytics?: boolean }} [param2]
|
|
6
|
+
*/
|
|
7
|
+
constructor(message, name = 'Unknown Error', { reportToAnalytics = true } = {}) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = name;
|
|
10
|
+
|
|
11
|
+
this.reportToAnalytics = reportToAnalytics;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
module.exports = UnknownError;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
|
+
const UnknownError = require('../../errors/unknown-error');
|
|
2
3
|
const setConfigFile = require('../../util/set-config');
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -6,18 +7,21 @@ const setConfigFile = require('../../util/set-config');
|
|
|
6
7
|
*/
|
|
7
8
|
const createBashrcConfigFile = () => ({
|
|
8
9
|
title: 'Setting Bashrc config',
|
|
9
|
-
task: async (
|
|
10
|
+
task: async (ctx) => {
|
|
11
|
+
const { config: { php, baseConfig, overridenConfiguration } } = ctx;
|
|
12
|
+
const varnishEnabled = overridenConfiguration.configuration.varnish.enabled;
|
|
10
13
|
try {
|
|
11
14
|
await setConfigFile({
|
|
12
15
|
configPathname: path.join(baseConfig.cacheDir, '.magentorc'),
|
|
13
16
|
template: path.join(baseConfig.templateDir, 'magentorc.template'),
|
|
14
17
|
overwrite: true,
|
|
15
18
|
templateArgs: {
|
|
16
|
-
php
|
|
19
|
+
php,
|
|
20
|
+
varnishEnabled
|
|
17
21
|
}
|
|
18
22
|
});
|
|
19
23
|
} catch (e) {
|
|
20
|
-
throw new
|
|
24
|
+
throw new UnknownError(`Unexpected error accrued during php.ini config creation\n\n${e}`);
|
|
21
25
|
}
|
|
22
26
|
}
|
|
23
27
|
});
|
|
@@ -7,6 +7,8 @@ const { execAsyncSpawn } = require('../../util/exec-async-command');
|
|
|
7
7
|
const pathExists = require('../../util/path-exists');
|
|
8
8
|
const safeRegexExtract = require('../../util/safe-regex-extract');
|
|
9
9
|
const installPrestissimo = require('./install-prestissimo');
|
|
10
|
+
const UnknownError = require('../../errors/unknown-error');
|
|
11
|
+
const KnownError = require('../../errors/known-error');
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* @param {import('../../../typings/context').ListrContext['config']} param0
|
|
@@ -19,7 +21,7 @@ const getComposerVersion = async ({ composer, php }) => {
|
|
|
19
21
|
string: composerVersionOutput,
|
|
20
22
|
regex: /composer.+(\d+\.\d+\.\d+)/i,
|
|
21
23
|
onNoMatch: () => {
|
|
22
|
-
throw new
|
|
24
|
+
throw new UnknownError(`
|
|
23
25
|
No composer version found in composer version output!\n\n${composerVersionOutput}
|
|
24
26
|
|
|
25
27
|
Follow steps below to resolve this issue:
|
|
@@ -56,7 +58,7 @@ const downloadComposerBinary = async ({ composer }) => {
|
|
|
56
58
|
destination: composer.binPath
|
|
57
59
|
});
|
|
58
60
|
} catch (e) {
|
|
59
|
-
throw new
|
|
61
|
+
throw new UnknownError(
|
|
60
62
|
`Unexpected issue, while installing composer.
|
|
61
63
|
Please see the error log below.\n\n${e}`
|
|
62
64
|
);
|
|
@@ -108,7 +110,7 @@ const installComposer = () => ({
|
|
|
108
110
|
break;
|
|
109
111
|
}
|
|
110
112
|
case 'exit': {
|
|
111
|
-
throw new
|
|
113
|
+
throw new KnownError(`Current composer version ${logger.style.misc(`v${currentComposerVersion}`)} is not compatible with version ${logger.style.misc(expectedComposerVersion)}!`);
|
|
112
114
|
}
|
|
113
115
|
case 'continue':
|
|
114
116
|
default: {
|
|
@@ -2,6 +2,8 @@ const path = require('path');
|
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const pathExists = require('../../util/path-exists');
|
|
4
4
|
const logger = require('@scandipwa/scandipwa-dev-utils/logger');
|
|
5
|
+
const UnknownError = require('../../errors/unknown-error');
|
|
6
|
+
const KnownError = require('../../errors/known-error');
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* @type {() => import('listr2').ListrTask<import('../../../typings/context').ListrContext>}
|
|
@@ -16,11 +18,11 @@ const localAuthJson = () => ({
|
|
|
16
18
|
try {
|
|
17
19
|
localAuthJsonContent = JSON.parse(localAuthJson);
|
|
18
20
|
} catch (e) {
|
|
19
|
-
throw new
|
|
21
|
+
throw new UnknownError(`Could not parse ./auth.json file as JSON!\n\n${e}`);
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
if (!localAuthJsonContent || !localAuthJsonContent['http-basic'] || !localAuthJsonContent['http-basic']['repo.magento.com']) {
|
|
23
|
-
throw new
|
|
25
|
+
throw new KnownError(`Your ./auth.json file does not contain the ${ logger.style.misc("{ 'http-basic': { 'repo.magento.com': <> } }") } field.`);
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
process.env.COMPOSER_AUTH = localAuthJson;
|
|
@@ -14,6 +14,7 @@ const { execAsyncSpawn } = require('../../util/exec-async-command');
|
|
|
14
14
|
* @param {string} [options.command] Container command
|
|
15
15
|
* @param {Record<"cmd" | "interval" | "retries" | "start-period" | "timeout", string>} [options.healthCheck] Container heathcheck properties
|
|
16
16
|
* @param {string[]} [options.securityOptions] Security options [docs](https://docs.docker.com/engine/reference/commandline/run/#optional-security-options---security-opt)
|
|
17
|
+
* @param {string[]} [options.tmpfs]
|
|
17
18
|
*/
|
|
18
19
|
const run = (options) => {
|
|
19
20
|
const {
|
|
@@ -28,9 +29,12 @@ const run = (options) => {
|
|
|
28
29
|
entrypoint,
|
|
29
30
|
command = '',
|
|
30
31
|
healthCheck,
|
|
31
|
-
securityOptions = []
|
|
32
|
+
securityOptions = [],
|
|
33
|
+
tmpfs = [],
|
|
34
|
+
expose = []
|
|
32
35
|
} = options;
|
|
33
36
|
|
|
37
|
+
const exposeArg = expose && expose.map((e) => `--expose=${ e }`);
|
|
34
38
|
const restartArg = restart && `--restart ${ restart }`;
|
|
35
39
|
const networkArg = network && `--network ${ network }`;
|
|
36
40
|
const portsArgs = ports.map((port) => `-p ${ port }`).join(' ');
|
|
@@ -41,6 +45,7 @@ const run = (options) => {
|
|
|
41
45
|
const entrypointArg = entrypoint && `--entrypoint "${entrypoint}"`;
|
|
42
46
|
const healthCheckArg = healthCheck && Object.entries(healthCheck).map(([key, value]) => `--health-${key} '${value}'`).join(' ');
|
|
43
47
|
const securityArg = securityOptions.length > 0 && securityOptions.map((opt) => `--security-opt ${opt}`).join(' ');
|
|
48
|
+
const tmpfsArg = tmpfs.length > 0 && tmpfs.map((t) => `--tmpfs ${t}`).join(' ');
|
|
44
49
|
|
|
45
50
|
const dockerCommand = [
|
|
46
51
|
'docker',
|
|
@@ -50,12 +55,14 @@ const run = (options) => {
|
|
|
50
55
|
networkArg,
|
|
51
56
|
restartArg,
|
|
52
57
|
portsArgs,
|
|
58
|
+
exposeArg,
|
|
53
59
|
mountsArgs,
|
|
54
60
|
mountVolumesArgs,
|
|
55
61
|
envArgs,
|
|
56
62
|
entrypointArg,
|
|
57
63
|
healthCheckArg,
|
|
58
64
|
securityArg,
|
|
65
|
+
tmpfsArg,
|
|
59
66
|
image,
|
|
60
67
|
command
|
|
61
68
|
].filter(Boolean).join(' ');
|
|
@@ -107,7 +114,7 @@ const pullContainers = () => ({
|
|
|
107
114
|
const startContainers = () => ({
|
|
108
115
|
title: 'Starting containers',
|
|
109
116
|
task: async ({ ports, config: { docker } }, task) => {
|
|
110
|
-
const containerList = await execAsyncSpawn('docker container ls');
|
|
117
|
+
const containerList = (await execAsyncSpawn('docker container ls --all --format="{{.Names}}"')).split('\n');
|
|
111
118
|
|
|
112
119
|
const missingContainers = Object.values(docker.getContainers(ports)).filter(
|
|
113
120
|
({ name }) => !containerList.includes(name)
|
|
@@ -133,19 +140,17 @@ const startContainers = () => ({
|
|
|
133
140
|
*/
|
|
134
141
|
const stopContainers = () => ({
|
|
135
142
|
title: 'Stopping Docker containers',
|
|
136
|
-
task: async ({
|
|
137
|
-
const containerList = await execAsyncSpawn('docker container ls
|
|
143
|
+
task: async ({ config: { baseConfig: { prefix } } }, task) => {
|
|
144
|
+
const containerList = (await execAsyncSpawn('docker container ls --all --format="{{.Names}}"')).split('\n');
|
|
138
145
|
|
|
139
|
-
const runningContainers =
|
|
140
|
-
({ name }) => containerList.includes(name)
|
|
141
|
-
);
|
|
146
|
+
const runningContainers = containerList.filter((containerName) => containerName.startsWith(prefix));
|
|
142
147
|
|
|
143
148
|
if (runningContainers.length === 0) {
|
|
144
149
|
task.skip();
|
|
145
150
|
return;
|
|
146
151
|
}
|
|
147
152
|
|
|
148
|
-
await stop(runningContainers
|
|
153
|
+
await stop(runningContainers);
|
|
149
154
|
}
|
|
150
155
|
});
|
|
151
156
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const logger = require('@scandipwa/scandipwa-dev-utils/logger');
|
|
2
|
+
const KnownError = require('../../errors/known-error');
|
|
2
3
|
const { execAsyncSpawn } = require('../../util/exec-async-command');
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -29,7 +30,7 @@ Do you want remove all custom networks not used by at least one container?`
|
|
|
29
30
|
);
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
throw new
|
|
33
|
+
throw new KnownError(`Unable to create network for your project.
|
|
33
34
|
You need to delete unused networks yourself.
|
|
34
35
|
Use command ${logger.style.command('docker network prune')}`);
|
|
35
36
|
}
|