@scandipwa/magento-scripts 1.14.1-alpha.7 → 1.15.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 +9 -4
- package/lib/commands/logs.js +1 -0
- package/lib/commands/start.js +18 -5
- package/lib/config/cma-config.js +16 -0
- package/lib/config/dependencies-for-platforms.js +15 -3
- package/lib/config/docker.js +46 -13
- package/lib/config/get-port-config.js +7 -2
- package/lib/config/index.js +2 -1
- package/lib/config/php/extensions/libsodium.js +2 -1
- package/lib/config/port-config.js +2 -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 +2 -0
- package/lib/config/templates/nginx.template.conf +0 -31
- package/lib/config/templates/ssl-terminator.template.conf +27 -0
- package/lib/config/templates/varnish.template.vcl +9 -4
- package/lib/config/versions/magento-2.3.0.js +3 -1
- package/lib/config/versions/magento-2.3.1.js +3 -1
- package/lib/config/versions/magento-2.3.2-p2.js +3 -1
- package/lib/config/versions/magento-2.3.2.js +3 -1
- package/lib/config/versions/magento-2.3.3-p1.js +3 -1
- package/lib/config/versions/magento-2.3.3.js +3 -1
- package/lib/config/versions/magento-2.3.4-p2.js +3 -1
- package/lib/config/versions/magento-2.3.4.js +3 -1
- package/lib/config/versions/magento-2.3.5-p1.js +3 -1
- package/lib/config/versions/magento-2.3.5-p2.js +3 -1
- package/lib/config/versions/magento-2.3.5.js +3 -1
- package/lib/config/versions/magento-2.3.6-p1.js +3 -1
- package/lib/config/versions/magento-2.3.6.js +3 -1
- package/lib/config/versions/magento-2.3.7-p1.js +3 -1
- package/lib/config/versions/magento-2.3.7-p2.js +3 -1
- package/lib/config/versions/magento-2.3.7-p3.js +3 -1
- package/lib/config/versions/magento-2.3.7.js +3 -1
- package/lib/config/versions/magento-2.4.0-p1.js +3 -1
- package/lib/config/versions/magento-2.4.0.js +3 -1
- package/lib/config/versions/magento-2.4.1-p1.js +3 -1
- package/lib/config/versions/magento-2.4.1.js +3 -1
- package/lib/config/versions/magento-2.4.2-p1.js +3 -1
- package/lib/config/versions/magento-2.4.2-p2.js +3 -1
- package/lib/config/versions/magento-2.4.2.js +3 -1
- package/lib/config/versions/magento-2.4.3-p1.js +3 -1
- package/lib/config/versions/magento-2.4.3-p2.js +3 -1
- package/lib/config/versions/magento-2.4.3.js +3 -1
- package/lib/config/versions/magento-2.4.4.js +3 -1
- package/lib/config/xml-parser.js +63 -0
- package/lib/errors/known-error.js +15 -0
- package/lib/errors/unknown-error.js +15 -0
- package/lib/tasks/cli/create-bashrc-config.js +2 -1
- package/lib/tasks/composer/index.js +5 -3
- package/lib/tasks/composer/local-auth-json.js +8 -4
- package/lib/tasks/docker/network.js +2 -1
- package/lib/tasks/execute/index.js +2 -3
- package/lib/tasks/file-system/create-nginx-config.js +4 -43
- 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-phpstorm-config/database-config.js +249 -0
- package/lib/tasks/file-system/create-phpstorm-config/eslint-config.js +85 -0
- package/lib/tasks/file-system/create-phpstorm-config/exclude-folder-config.js +154 -0
- package/lib/tasks/file-system/create-phpstorm-config/index.js +27 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/coding-standard-config.js +26 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/config.js +54 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/custom-ruleset-path-config.js +28 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/default-properties-config.js +42 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/eslint-inspection-config.js +37 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/index.js +80 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/magento-coding-standard-config.js +26 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/mess-detector-validation-inspection-config.js +142 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/paths.js +20 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-fixer-validation-inspection-config.js +60 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-validation-inspection-config.js +116 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/stylelint-inspection-config.js +37 -0
- package/lib/tasks/file-system/create-phpstorm-config/keys.js +14 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/index.js +67 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/mess-detector-config.js +54 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-code-sniffer-config.js +66 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-cs-fixer-config.js +58 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-project-shared-configuration-config.js +59 -0
- package/lib/tasks/file-system/create-phpstorm-config/stylelint-config.js +77 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/composer-settings-config.js +97 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/format-setting-config.js +57 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/index.js +66 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-debug-general-config.js +64 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-server-config.js +57 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/properties-component-config.js +49 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/run-manager-config.js +64 -0
- package/lib/tasks/file-system/create-phpstorm-config/xml-utils.js +5 -0
- package/lib/tasks/file-system/create-ssl-terminator-config.js +96 -0
- package/lib/tasks/file-system/create-varnish-config.js +2 -1
- package/lib/tasks/file-system/create-vscode-config.js +3 -2
- package/lib/tasks/file-system/index.js +3 -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/adjust-full-page-cache.js +26 -0
- package/lib/tasks/magento/setup-magento/delete-admin-users.js +1 -1
- package/lib/tasks/magento/setup-magento/delete-customers.js +7 -4
- package/lib/tasks/magento/setup-magento/delete-orders.js +6 -4
- package/lib/tasks/magento/setup-magento/flush-redis-config.js +2 -1
- 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/set-base-url.js +7 -2
- package/lib/tasks/magento/setup-magento/upgrade-magento.js +11 -1
- 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/import-dump-to-mysql.js +13 -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 +27 -54
- package/lib/tasks/php/compile.js +6 -4
- package/lib/tasks/php/configure.js +7 -66
- package/lib/tasks/php/extensions/disable.js +2 -1
- package/lib/tasks/php/extensions/enable.js +2 -1
- package/lib/tasks/php/extensions/index.js +74 -0
- package/lib/tasks/php/extensions/install.js +3 -3
- package/lib/tasks/php/index.js +7 -6
- package/lib/tasks/php/install-sodium.js +93 -0
- package/lib/tasks/php/update-phpbrew.js +7 -3
- package/lib/tasks/php/validate-php.js +67 -0
- package/lib/tasks/php-fpm/start-php-fpm.js +4 -2
- package/lib/tasks/requirements/composer.js +59 -5
- 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/dependency/mac.js +18 -3
- package/lib/tasks/requirements/docker/index.js +94 -40
- package/lib/tasks/requirements/docker/install-on-mac.js +29 -0
- package/lib/tasks/requirements/docker/install.js +2 -1
- package/lib/tasks/requirements/docker/running-status.js +32 -31
- package/lib/tasks/requirements/docker/version.js +2 -1
- package/lib/tasks/requirements/index.js +3 -0
- package/lib/tasks/requirements/node-version.js +2 -1
- package/lib/tasks/requirements/php-version.js +26 -24
- package/lib/tasks/requirements/phpbrew/index.js +2 -1
- package/lib/tasks/requirements/phpbrew/install.js +14 -2
- package/lib/tasks/requirements/phpbrew/version.js +2 -1
- package/lib/tasks/requirements/platform.js +5 -3
- package/lib/tasks/requirements/rosetta.js +32 -0
- package/lib/tasks/start.js +10 -2
- package/lib/tasks/status/index.js +24 -8
- package/lib/tasks/theme/build-theme.js +2 -1
- package/lib/tasks/theme/install-theme.js +2 -1
- 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 +2 -1
- package/lib/tasks/theme/setup-themes.js +10 -3
- package/lib/tasks/theme/symlink-theme.js +8 -1
- package/lib/util/CSA-theme.js +4 -0
- package/lib/util/analytics.js +317 -0
- package/lib/util/arch.js +1 -1
- package/lib/util/config-file-validator.js +4 -2
- package/lib/util/config-php-json.js +3 -2
- package/lib/util/env-php-json.js +3 -2
- package/lib/util/exec-async-command.d.ts +2 -0
- package/lib/util/exec-async-command.js +31 -15
- package/lib/util/exec-async.js +9 -0
- package/lib/util/get-brew-bin-path.js +64 -0
- 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 +15 -5
- package/lib/util/instance-metadata.js +11 -4
- package/lib/util/ip.js +47 -1
- package/lib/util/magento-task.js +20 -9
- package/lib/util/php-task.js +7 -7
- package/lib/util/request.js +0 -0
- package/lib/util/resolve-configuration-with-overrides.js +2 -1
- package/lib/util/run-composer.js +5 -3
- package/lib/util/run-magento.js +3 -2
- package/lib/util/run-php.js +7 -2
- package/lib/util/wait-for-it.js +3 -2
- package/package.json +5 -3
- package/typings/context.d.ts +4 -0
- package/typings/index.d.ts +13 -1
- package/typings/phpstorm.d.ts +33 -0
- package/lib/tasks/file-system/create-php-storm-config.js +0 -82
- package/lib/tasks/magento/setup-magento/disable-full-page-cache.js +0 -20
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -45,7 +46,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
45
46
|
composer: {
|
|
46
47
|
version: '1'
|
|
47
48
|
},
|
|
48
|
-
varnish: varnish66({ templateDir })
|
|
49
|
+
varnish: varnish66({ templateDir }),
|
|
50
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
49
51
|
},
|
|
50
52
|
magento: defaultMagentoConfig,
|
|
51
53
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -45,7 +46,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
45
46
|
composer: {
|
|
46
47
|
version: '1'
|
|
47
48
|
},
|
|
48
|
-
varnish: varnish66({ templateDir })
|
|
49
|
+
varnish: varnish66({ templateDir }),
|
|
50
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
49
51
|
},
|
|
50
52
|
magento: defaultMagentoConfig,
|
|
51
53
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -45,7 +46,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
45
46
|
composer: {
|
|
46
47
|
version: '1'
|
|
47
48
|
},
|
|
48
|
-
varnish: varnish66({ templateDir })
|
|
49
|
+
varnish: varnish66({ templateDir }),
|
|
50
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
49
51
|
},
|
|
50
52
|
magento: defaultMagentoConfig,
|
|
51
53
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -45,7 +46,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
45
46
|
composer: {
|
|
46
47
|
version: '1'
|
|
47
48
|
},
|
|
48
|
-
varnish: varnish66({ templateDir })
|
|
49
|
+
varnish: varnish66({ templateDir }),
|
|
50
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
49
51
|
},
|
|
50
52
|
magento: defaultMagentoConfig,
|
|
51
53
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -45,7 +46,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
45
46
|
composer: {
|
|
46
47
|
version: '1'
|
|
47
48
|
},
|
|
48
|
-
varnish: varnish66({ templateDir })
|
|
49
|
+
varnish: varnish66({ templateDir }),
|
|
50
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
49
51
|
},
|
|
50
52
|
magento: defaultMagentoConfig,
|
|
51
53
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -45,7 +46,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
45
46
|
composer: {
|
|
46
47
|
version: '1'
|
|
47
48
|
},
|
|
48
|
-
varnish: varnish66({ templateDir })
|
|
49
|
+
varnish: varnish66({ templateDir }),
|
|
50
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
49
51
|
},
|
|
50
52
|
magento: defaultMagentoConfig,
|
|
51
53
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -45,7 +46,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
45
46
|
composer: {
|
|
46
47
|
version: '1'
|
|
47
48
|
},
|
|
48
|
-
varnish: varnish66({ templateDir })
|
|
49
|
+
varnish: varnish66({ templateDir }),
|
|
50
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
49
51
|
},
|
|
50
52
|
magento: defaultMagentoConfig,
|
|
51
53
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -45,7 +46,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
45
46
|
composer: {
|
|
46
47
|
version: '1'
|
|
47
48
|
},
|
|
48
|
-
varnish: varnish66({ templateDir })
|
|
49
|
+
varnish: varnish66({ templateDir }),
|
|
50
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
49
51
|
},
|
|
50
52
|
magento: defaultMagentoConfig,
|
|
51
53
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -43,7 +44,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
43
44
|
composer: {
|
|
44
45
|
version: '2'
|
|
45
46
|
},
|
|
46
|
-
varnish: varnish66({ templateDir })
|
|
47
|
+
varnish: varnish66({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
47
49
|
},
|
|
48
50
|
magento: defaultMagentoConfig,
|
|
49
51
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -43,7 +44,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
43
44
|
composer: {
|
|
44
45
|
version: '2'
|
|
45
46
|
},
|
|
46
|
-
varnish: varnish66({ templateDir })
|
|
47
|
+
varnish: varnish66({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
47
49
|
},
|
|
48
50
|
magento: defaultMagentoConfig,
|
|
49
51
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -43,7 +44,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
43
44
|
composer: {
|
|
44
45
|
version: '2'
|
|
45
46
|
},
|
|
46
|
-
varnish: varnish66({ templateDir })
|
|
47
|
+
varnish: varnish66({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
47
49
|
},
|
|
48
50
|
magento: defaultMagentoConfig,
|
|
49
51
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -43,7 +44,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
43
44
|
composer: {
|
|
44
45
|
version: '2'
|
|
45
46
|
},
|
|
46
|
-
varnish: varnish66({ templateDir })
|
|
47
|
+
varnish: varnish66({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
47
49
|
},
|
|
48
50
|
magento: defaultMagentoConfig,
|
|
49
51
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish60 } = require('../varnish/varnish-6-0');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -43,7 +44,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
43
44
|
composer: {
|
|
44
45
|
version: '1'
|
|
45
46
|
},
|
|
46
|
-
varnish: varnish60({ templateDir })
|
|
47
|
+
varnish: varnish60({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
47
49
|
},
|
|
48
50
|
magento: defaultMagentoConfig,
|
|
49
51
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish60 } = require('../varnish/varnish-6-0');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -43,7 +44,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
43
44
|
composer: {
|
|
44
45
|
version: '1'
|
|
45
46
|
},
|
|
46
|
-
varnish: varnish60({ templateDir })
|
|
47
|
+
varnish: varnish60({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
47
49
|
},
|
|
48
50
|
magento: defaultMagentoConfig,
|
|
49
51
|
host: 'localhost',
|
|
@@ -1,6 +1,7 @@
|
|
|
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');
|
|
4
5
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
5
6
|
|
|
6
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -45,7 +46,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
45
46
|
composer: {
|
|
46
47
|
version: '1'
|
|
47
48
|
},
|
|
48
|
-
varnish: varnish66({ templateDir })
|
|
49
|
+
varnish: varnish66({ templateDir }),
|
|
50
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
49
51
|
},
|
|
50
52
|
magento: defaultMagentoConfig,
|
|
51
53
|
host: 'localhost',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
3
4
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
4
5
|
|
|
5
6
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -43,7 +44,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
43
44
|
composer: {
|
|
44
45
|
version: '1'
|
|
45
46
|
},
|
|
46
|
-
varnish: varnish66({ templateDir })
|
|
47
|
+
varnish: varnish66({ templateDir }),
|
|
48
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
47
49
|
},
|
|
48
50
|
magento: defaultMagentoConfig,
|
|
49
51
|
host: 'localhost',
|
|
@@ -1,6 +1,7 @@
|
|
|
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');
|
|
4
5
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
5
6
|
|
|
6
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -47,7 +48,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
47
48
|
composer: {
|
|
48
49
|
version: '2'
|
|
49
50
|
},
|
|
50
|
-
varnish: varnish66({ templateDir })
|
|
51
|
+
varnish: varnish66({ templateDir }),
|
|
52
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
51
53
|
},
|
|
52
54
|
magento: defaultMagentoConfig,
|
|
53
55
|
host: 'localhost',
|
|
@@ -1,6 +1,7 @@
|
|
|
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');
|
|
4
5
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
5
6
|
|
|
6
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -47,7 +48,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
47
48
|
composer: {
|
|
48
49
|
version: '2'
|
|
49
50
|
},
|
|
50
|
-
varnish: varnish66({ templateDir })
|
|
51
|
+
varnish: varnish66({ templateDir }),
|
|
52
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
51
53
|
},
|
|
52
54
|
magento: defaultMagentoConfig,
|
|
53
55
|
host: 'localhost',
|
|
@@ -1,6 +1,7 @@
|
|
|
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');
|
|
4
5
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
5
6
|
|
|
6
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -46,7 +47,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
46
47
|
composer: {
|
|
47
48
|
version: '2'
|
|
48
49
|
},
|
|
49
|
-
varnish: varnish66({ templateDir })
|
|
50
|
+
varnish: varnish66({ templateDir }),
|
|
51
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
50
52
|
},
|
|
51
53
|
magento: defaultMagentoConfig,
|
|
52
54
|
host: 'localhost',
|
|
@@ -1,6 +1,7 @@
|
|
|
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');
|
|
4
5
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
5
6
|
|
|
6
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -47,7 +48,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
47
48
|
composer: {
|
|
48
49
|
version: '2'
|
|
49
50
|
},
|
|
50
|
-
varnish: varnish66({ templateDir })
|
|
51
|
+
varnish: varnish66({ templateDir }),
|
|
52
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
51
53
|
},
|
|
52
54
|
magento: defaultMagentoConfig,
|
|
53
55
|
host: 'localhost',
|
|
@@ -1,6 +1,7 @@
|
|
|
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');
|
|
4
5
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
5
6
|
|
|
6
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -47,7 +48,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
47
48
|
composer: {
|
|
48
49
|
version: '2'
|
|
49
50
|
},
|
|
50
|
-
varnish: varnish66({ templateDir })
|
|
51
|
+
varnish: varnish66({ templateDir }),
|
|
52
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
51
53
|
},
|
|
52
54
|
magento: defaultMagentoConfig,
|
|
53
55
|
host: 'localhost',
|
|
@@ -1,6 +1,7 @@
|
|
|
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');
|
|
4
5
|
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
5
6
|
|
|
6
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -47,7 +48,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
47
48
|
composer: {
|
|
48
49
|
version: '2'
|
|
49
50
|
},
|
|
50
|
-
varnish: varnish66({ templateDir })
|
|
51
|
+
varnish: varnish66({ templateDir }),
|
|
52
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
51
53
|
},
|
|
52
54
|
magento: defaultMagentoConfig,
|
|
53
55
|
host: 'localhost',
|
|
@@ -1,6 +1,7 @@
|
|
|
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');
|
|
4
5
|
const { varnish70 } = require('../varnish/varnish-7-0');
|
|
5
6
|
|
|
6
7
|
module.exports = ({ templateDir } = {}) => ({
|
|
@@ -47,7 +48,8 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
47
48
|
composer: {
|
|
48
49
|
version: '2'
|
|
49
50
|
},
|
|
50
|
-
varnish: varnish70({ templateDir })
|
|
51
|
+
varnish: varnish70({ templateDir }),
|
|
52
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
51
53
|
},
|
|
52
54
|
magento: defaultMagentoConfig,
|
|
53
55
|
host: 'localhost',
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const { XMLParser, XMLBuilder } = require('fast-xml-parser');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const pathExists = require('../util/path-exists');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @type {import('fast-xml-parser').X2jOptions}
|
|
8
|
+
*/
|
|
9
|
+
const xmlParserConfig = {
|
|
10
|
+
ignoreAttributes: false,
|
|
11
|
+
parseAttributeValue: false,
|
|
12
|
+
trimValues: true,
|
|
13
|
+
allowBooleanAttributes: true,
|
|
14
|
+
cdataPropName: '_cdata'
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @type {Partial<import('fast-xml-parser').XmlBuilderOptions>}
|
|
19
|
+
*/
|
|
20
|
+
const xmlBuilderConfig = {
|
|
21
|
+
...xmlParserConfig,
|
|
22
|
+
format: true,
|
|
23
|
+
suppressEmptyNode: true,
|
|
24
|
+
suppressBooleanAttributes: false,
|
|
25
|
+
processEntities: true
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const parser = new XMLParser(xmlParserConfig);
|
|
29
|
+
const builder = new XMLBuilder(xmlBuilderConfig);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Load xml file to js object
|
|
33
|
+
* @param {String} filePath
|
|
34
|
+
*/
|
|
35
|
+
const loadXmlFile = async (filePath) => {
|
|
36
|
+
const fileData = await fs.promises.readFile(filePath, 'utf-8');
|
|
37
|
+
|
|
38
|
+
return parser.parse(fileData);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Build xml from js object and write it to file
|
|
43
|
+
* @param {String} filePath
|
|
44
|
+
* @param {String} fileData
|
|
45
|
+
*/
|
|
46
|
+
const buildXmlFile = async (filePath, fileData) => {
|
|
47
|
+
const xmlFileData = builder.build(fileData).replace(/"/ig, '"');
|
|
48
|
+
|
|
49
|
+
const { dir } = path.parse(filePath);
|
|
50
|
+
|
|
51
|
+
if (!await pathExists(dir)) {
|
|
52
|
+
await fs.promises.mkdir(dir, {
|
|
53
|
+
recursive: true
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
await fs.promises.writeFile(filePath, xmlFileData, 'utf-8');
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
module.exports = {
|
|
61
|
+
loadXmlFile,
|
|
62
|
+
buildXmlFile
|
|
63
|
+
};
|
|
@@ -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
|
/**
|
|
@@ -20,7 +21,7 @@ const createBashrcConfigFile = () => ({
|
|
|
20
21
|
}
|
|
21
22
|
});
|
|
22
23
|
} catch (e) {
|
|
23
|
-
throw new
|
|
24
|
+
throw new UnknownError(`Unexpected error accrued during php.ini config creation\n\n${e}`);
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
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,25 +2,29 @@ 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');
|
|
7
|
+
|
|
8
|
+
const authJsonPath = path.join(process.cwd(), 'auth.json');
|
|
5
9
|
|
|
6
10
|
/**
|
|
7
11
|
* @type {() => import('listr2').ListrTask<import('../../../typings/context').ListrContext>}
|
|
8
12
|
*/
|
|
9
13
|
const localAuthJson = () => ({
|
|
10
14
|
task: async (ctx, task) => {
|
|
11
|
-
if (await pathExists(
|
|
15
|
+
if (await pathExists(authJsonPath)) {
|
|
12
16
|
task.title = 'Using local auth.json';
|
|
13
|
-
const localAuthJson = await fs.promises.readFile(
|
|
17
|
+
const localAuthJson = await fs.promises.readFile(authJsonPath);
|
|
14
18
|
|
|
15
19
|
let localAuthJsonContent;
|
|
16
20
|
try {
|
|
17
21
|
localAuthJsonContent = JSON.parse(localAuthJson);
|
|
18
22
|
} catch (e) {
|
|
19
|
-
throw new
|
|
23
|
+
throw new UnknownError(`Could not parse ./auth.json file as JSON!\n\n${e}`);
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
if (!localAuthJsonContent || !localAuthJsonContent['http-basic'] || !localAuthJsonContent['http-basic']['repo.magento.com']) {
|
|
23
|
-
throw new
|
|
27
|
+
throw new KnownError(`Your ./auth.json file does not contain the ${ logger.style.misc("{ 'http-basic': { 'repo.magento.com': <> } }") } field.`);
|
|
24
28
|
}
|
|
25
29
|
|
|
26
30
|
process.env.COMPOSER_AUTH = localAuthJson;
|
|
@@ -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
|
}
|
|
@@ -10,9 +10,8 @@ const executeInContainer = ({ containerName, commands }) => {
|
|
|
10
10
|
spawn('docker', [
|
|
11
11
|
'exec',
|
|
12
12
|
'-it',
|
|
13
|
-
containerName
|
|
14
|
-
|
|
15
|
-
], {
|
|
13
|
+
containerName
|
|
14
|
+
].concat(...commands.map((command) => command.split(' '))), {
|
|
16
15
|
stdio: [0, 1, 2]
|
|
17
16
|
});
|
|
18
17
|
|