@scandipwa/magento-scripts 1.14.1-alpha.4 → 1.14.1-alpha.7

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.
Files changed (50) hide show
  1. package/lib/config/docker.js +12 -7
  2. package/lib/config/templates/nginx.template.conf +17 -0
  3. package/lib/config/templates/varnish.template.vcl +15 -6
  4. package/lib/config/varnish/varnish-6-0.js +11 -0
  5. package/lib/config/varnish/varnish-6-6.js +11 -0
  6. package/lib/config/varnish/varnish-7-0.js +11 -0
  7. package/lib/config/versions/magento-2.3.0.js +2 -5
  8. package/lib/config/versions/magento-2.3.1.js +2 -5
  9. package/lib/config/versions/magento-2.3.2-p2.js +2 -5
  10. package/lib/config/versions/magento-2.3.2.js +2 -5
  11. package/lib/config/versions/magento-2.3.3-p1.js +2 -5
  12. package/lib/config/versions/magento-2.3.3.js +2 -5
  13. package/lib/config/versions/magento-2.3.4-p2.js +2 -5
  14. package/lib/config/versions/magento-2.3.4.js +2 -5
  15. package/lib/config/versions/magento-2.3.5-p1.js +2 -5
  16. package/lib/config/versions/magento-2.3.5-p2.js +2 -5
  17. package/lib/config/versions/magento-2.3.5.js +2 -5
  18. package/lib/config/versions/magento-2.3.6-p1.js +2 -5
  19. package/lib/config/versions/magento-2.3.6.js +2 -5
  20. package/lib/config/versions/magento-2.3.7-p1.js +2 -5
  21. package/lib/config/versions/magento-2.3.7-p2.js +2 -5
  22. package/lib/config/versions/magento-2.3.7-p3.js +2 -5
  23. package/lib/config/versions/magento-2.3.7.js +2 -5
  24. package/lib/config/versions/magento-2.4.0-p1.js +2 -5
  25. package/lib/config/versions/magento-2.4.0.js +2 -5
  26. package/lib/config/versions/magento-2.4.1-p1.js +2 -5
  27. package/lib/config/versions/magento-2.4.1.js +2 -5
  28. package/lib/config/versions/magento-2.4.2-p1.js +2 -5
  29. package/lib/config/versions/magento-2.4.2-p2.js +2 -5
  30. package/lib/config/versions/magento-2.4.2.js +2 -5
  31. package/lib/config/versions/magento-2.4.3-p1.js +2 -5
  32. package/lib/config/versions/magento-2.4.3-p2.js +2 -5
  33. package/lib/config/versions/magento-2.4.3.js +2 -5
  34. package/lib/config/versions/magento-2.4.4.js +2 -5
  35. package/lib/tasks/docker/containers.js +4 -1
  36. package/lib/tasks/file-system/create-nginx-config.js +5 -2
  37. package/lib/tasks/file-system/create-varnish-config.js +6 -5
  38. package/lib/tasks/magento/setup-magento/migrate-database.js +3 -5
  39. package/lib/tasks/magento/setup-magento/upgrade-magento.js +17 -3
  40. package/lib/tasks/magento/setup-magento/varnish-config.js +7 -1
  41. package/lib/tasks/php/update-env-php.js +2 -2
  42. package/lib/tasks/php/update-env.php +2 -0
  43. package/lib/tasks/start.js +3 -8
  44. package/lib/tasks/theme/build-theme.js +26 -8
  45. package/lib/tasks/theme/install-theme.js +16 -4
  46. package/lib/tasks/theme/setup-themes.js +1 -0
  47. package/lib/tasks/theme/symlink-theme.js +18 -3
  48. package/lib/util/match-filesystem.js +2 -1
  49. package/package.json +2 -2
  50. package/typings/context.d.ts +3 -1
@@ -43,6 +43,7 @@ module.exports = async ({ configuration, ssl, host }, config) => {
43
43
  const isLinux = os.platform() === 'linux';
44
44
  const isWsl = await getIsWsl();
45
45
  const isArm = (await getArch()) === 'arm64';
46
+ const isNotNativeLinux = (!isLinux || isWsl);
46
47
 
47
48
  if (!isLinux) {
48
49
  /**
@@ -79,7 +80,8 @@ module.exports = async ({ configuration, ssl, host }, config) => {
79
80
  name: `${ prefix }_varnish-vcl-data`,
80
81
  opts: {
81
82
  type: 'nfs',
82
- device: `${ path.join(cacheDir, 'varnish', 'default.vcl') }`
83
+ device: `${ path.join(cacheDir, 'varnish') }`,
84
+ o: 'bind'
83
85
  }
84
86
  };
85
87
  }
@@ -89,7 +91,7 @@ module.exports = async ({ configuration, ssl, host }, config) => {
89
91
  const dockerConfig = {
90
92
  nginx: {
91
93
  _: 'Nginx',
92
- ports: (!isLinux || isWsl) ? [
94
+ ports: isNotNativeLinux ? [
93
95
  `${ isIpAddress(host) ? host : '127.0.0.1' }:${ ports.app }:80`
94
96
  ] : [],
95
97
  healthCheck: {
@@ -109,7 +111,7 @@ module.exports = async ({ configuration, ssl, host }, config) => {
109
111
  ],
110
112
  restart: 'on-failure:5',
111
113
  // TODO: use connect instead
112
- network: (!isLinux || isWsl) ? network.name : 'host',
114
+ network: isNotNativeLinux ? network.name : 'host',
113
115
  image: `nginx:${ nginx.version }`,
114
116
  imageDetails: {
115
117
  name: 'nginx',
@@ -215,16 +217,19 @@ module.exports = async ({ configuration, ssl, host }, config) => {
215
217
  },
216
218
  name: `${ prefix }_varnish`,
217
219
  mountVolumes: isLinux ? [
218
- `${ path.join(cacheDir, 'varnish', 'default.vcl') }:/etc/varnish/default.vcl:ro`
220
+ `${ path.join(cacheDir, 'varnish') }:/etc/varnish`
219
221
  ] : [
220
- `${ volumes.varnish.name }:/etc/varnish/default.vcl`
222
+ `${ volumes.varnish.name }:/etc/varnish`
221
223
  ],
224
+ ports: isNotNativeLinux ? [
225
+ `${ isIpAddress(host) ? host : '127.0.0.1' }:${ ports.varnish }:80`
226
+ ] : [],
222
227
  env: {
223
228
  VARNISH_SIZE: '2G'
224
229
  },
225
230
  restart: 'on-failure:30',
226
- network: (!isLinux || isWsl) ? network.name : 'host',
227
- command: `varnishd -F -a :${ ports.varnish } -t 600 -f /etc/varnish/default.vcl`,
231
+ network: isNotNativeLinux ? network.name : 'host',
232
+ command: `varnishd -F -a :${ isNotNativeLinux ? 80 : ports.varnish } -t 600 -f /etc/varnish/default.vcl`,
228
233
  tmpfs: [
229
234
  '/var/lib/varnish:exec'
230
235
  ]
@@ -39,6 +39,16 @@ server {
39
39
  }
40
40
 
41
41
  location / {
42
+ # proxy_set_header X-Real-IP $remote_addr;
43
+ # proxy_set_header X-Forwarded-For $remote_addr;
44
+ # proxy_set_header Host $http_host;
45
+
46
+ # if ($request_method = PURGE) {
47
+ # rewrite ^/(.*)$ $1 break;
48
+ # proxy_pass http://<%= it.hostMachine %>:<%= it.ports.varnish %>/;
49
+ # break;
50
+ # }
51
+
42
52
  try_files $uri $uri/ /index.php$is_args$args;
43
53
  }
44
54
 
@@ -212,4 +222,11 @@ server {
212
222
  location @webp-to-jpg {
213
223
  rewrite ^(.*)\.webp$ $1.jpg last;
214
224
  }
225
+
226
+ # location @purgepass {
227
+ # # some other configuration
228
+ # proxy_pass http://<%= it.hostMachine %>:<%= it.ports.varnish %>;
229
+ # proxy_set_header Host $host;
230
+ # proxy_set_header X-Real-IP $remote_addr;
231
+ # }
215
232
  }
@@ -7,19 +7,28 @@ import std;
7
7
 
8
8
  backend default {
9
9
  .host = "<%= it.hostMachine %>";
10
- .port = "<%= it.hostPort %>";
10
+ .host_header = "Host: localhost";
11
+ .port = "<%= it.nginxPort %>";
11
12
  .first_byte_timeout = 600s;
12
13
  .probe = {
13
- .url = "/health_check.php";
14
- .timeout = 2s;
15
- .interval = 5s;
16
- .window = 10;
17
- .threshold = 5;
14
+ # .url = "/health_check.php";
15
+ .request =
16
+ "GET /health_check.php HTTP/1.1"
17
+ "Host: localhost"
18
+ "Connection: close"
19
+ "User-Agent: Varnish Health Probe";
20
+ .interval = 10s;
21
+ .timeout = 5s;
22
+ .window = 5;
23
+ .threshold = 3;
18
24
  }
19
25
  }
20
26
 
21
27
  acl purge {
22
28
  "<%= it.hostMachine %>";
29
+ "localhost";
30
+ "172.0.0.0"/8;
31
+ "192.168.0.0"/16;
23
32
  }
24
33
 
25
34
  sub vcl_recv {
@@ -0,0 +1,11 @@
1
+ const path = require('path');
2
+
3
+ const varnish60 = ({ templateDir }) => ({
4
+ enabled: true,
5
+ version: '6.0',
6
+ configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
7
+ });
8
+
9
+ module.exports = {
10
+ varnish60
11
+ };
@@ -0,0 +1,11 @@
1
+ const path = require('path');
2
+
3
+ const varnish66 = ({ templateDir }) => ({
4
+ enabled: true,
5
+ version: '6.6',
6
+ configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
7
+ });
8
+
9
+ module.exports = {
10
+ varnish66
11
+ };
@@ -0,0 +1,11 @@
1
+ const path = require('path');
2
+
3
+ const varnish70 = ({ templateDir }) => ({
4
+ enabled: true,
5
+ version: '7.0',
6
+ configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
7
+ });
8
+
9
+ module.exports = {
10
+ varnish70
11
+ };
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.0',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '5',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.1',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '5',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.2-p2',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '5',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.2',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '5',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.3-p1',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '6.2',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.3',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '6.2',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.4-p2',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '6.2',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.4',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '6.2',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.5-p1',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '6.3',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.5-p2',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '6.3',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.5',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '6.3',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.6-p1',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '6.4',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.6',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '6.4',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.7-p1',
@@ -42,11 +43,7 @@ module.exports = ({ templateDir } = {}) => ({
42
43
  composer: {
43
44
  version: '2'
44
45
  },
45
- varnish: {
46
- enabled: true,
47
- version: '6.5',
48
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
49
- }
46
+ varnish: varnish66({ templateDir })
50
47
  },
51
48
  magento: defaultMagentoConfig,
52
49
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.7-p2',
@@ -42,11 +43,7 @@ module.exports = ({ templateDir } = {}) => ({
42
43
  composer: {
43
44
  version: '2'
44
45
  },
45
- varnish: {
46
- enabled: true,
47
- version: '6.5',
48
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
49
- }
46
+ varnish: varnish66({ templateDir })
50
47
  },
51
48
  magento: defaultMagentoConfig,
52
49
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.7-p3',
@@ -42,11 +43,7 @@ module.exports = ({ templateDir } = {}) => ({
42
43
  composer: {
43
44
  version: '2'
44
45
  },
45
- varnish: {
46
- enabled: true,
47
- version: '6.5',
48
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
49
- }
46
+ varnish: varnish66({ templateDir })
50
47
  },
51
48
  magento: defaultMagentoConfig,
52
49
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.3.7',
@@ -42,11 +43,7 @@ module.exports = ({ templateDir } = {}) => ({
42
43
  composer: {
43
44
  version: '2'
44
45
  },
45
- varnish: {
46
- enabled: true,
47
- version: '6.5',
48
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
49
- }
46
+ varnish: varnish66({ templateDir })
50
47
  },
51
48
  magento: defaultMagentoConfig,
52
49
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish60 } = require('../varnish/varnish-6-0');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.4.0-p1',
@@ -42,11 +43,7 @@ module.exports = ({ templateDir } = {}) => ({
42
43
  composer: {
43
44
  version: '1'
44
45
  },
45
- varnish: {
46
- enabled: true,
47
- version: '6',
48
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
49
- }
46
+ varnish: varnish60({ templateDir })
50
47
  },
51
48
  magento: defaultMagentoConfig,
52
49
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish60 } = require('../varnish/varnish-6-0');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.4.0',
@@ -42,11 +43,7 @@ module.exports = ({ templateDir } = {}) => ({
42
43
  composer: {
43
44
  version: '1'
44
45
  },
45
- varnish: {
46
- enabled: true,
47
- version: '6',
48
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
49
- }
46
+ varnish: varnish60({ templateDir })
50
47
  },
51
48
  magento: defaultMagentoConfig,
52
49
  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 { varnish66 } = require('../varnish/varnish-6-6');
4
5
 
5
6
  module.exports = ({ templateDir } = {}) => ({
6
7
  magentoVersion: '2.4.1-p1',
@@ -44,11 +45,7 @@ module.exports = ({ templateDir } = {}) => ({
44
45
  composer: {
45
46
  version: '1'
46
47
  },
47
- varnish: {
48
- enabled: true,
49
- version: '6.2',
50
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
51
- }
48
+ varnish: varnish66({ templateDir })
52
49
  },
53
50
  magento: defaultMagentoConfig,
54
51
  host: 'localhost',
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { defaultMagentoConfig } = require('../magento-config');
3
+ const { varnish66 } = require('../varnish/varnish-6-6');
3
4
 
4
5
  module.exports = ({ templateDir } = {}) => ({
5
6
  magentoVersion: '2.4.1',
@@ -42,11 +43,7 @@ module.exports = ({ templateDir } = {}) => ({
42
43
  composer: {
43
44
  version: '1'
44
45
  },
45
- varnish: {
46
- enabled: true,
47
- version: '6.2',
48
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
49
- }
46
+ varnish: varnish66({ templateDir })
50
47
  },
51
48
  magento: defaultMagentoConfig,
52
49
  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 { varnish66 } = require('../varnish/varnish-6-6');
4
5
 
5
6
  module.exports = ({ templateDir } = {}) => ({
6
7
  magentoVersion: '2.4.2-p1',
@@ -46,11 +47,7 @@ module.exports = ({ templateDir } = {}) => ({
46
47
  composer: {
47
48
  version: '2'
48
49
  },
49
- varnish: {
50
- enabled: true,
51
- version: '6.4',
52
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
53
- }
50
+ varnish: varnish66({ templateDir })
54
51
  },
55
52
  magento: defaultMagentoConfig,
56
53
  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 { varnish66 } = require('../varnish/varnish-6-6');
4
5
 
5
6
  module.exports = ({ templateDir } = {}) => ({
6
7
  magentoVersion: '2.4.2-p2',
@@ -46,11 +47,7 @@ module.exports = ({ templateDir } = {}) => ({
46
47
  composer: {
47
48
  version: '2'
48
49
  },
49
- varnish: {
50
- enabled: true,
51
- version: '6.4',
52
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
53
- }
50
+ varnish: varnish66({ templateDir })
54
51
  },
55
52
  magento: defaultMagentoConfig,
56
53
  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 { varnish66 } = require('../varnish/varnish-6-6');
4
5
 
5
6
  module.exports = ({ templateDir } = {}) => ({
6
7
  magentoVersion: '2.4.2',
@@ -45,11 +46,7 @@ module.exports = ({ templateDir } = {}) => ({
45
46
  composer: {
46
47
  version: '2'
47
48
  },
48
- varnish: {
49
- enabled: true,
50
- version: '6.4',
51
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
52
- }
49
+ varnish: varnish66({ templateDir })
53
50
  },
54
51
  magento: defaultMagentoConfig,
55
52
  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 { varnish66 } = require('../varnish/varnish-6-6');
4
5
 
5
6
  module.exports = ({ templateDir } = {}) => ({
6
7
  magentoVersion: '2.4.3-p1',
@@ -46,11 +47,7 @@ module.exports = ({ templateDir } = {}) => ({
46
47
  composer: {
47
48
  version: '2'
48
49
  },
49
- varnish: {
50
- enabled: true,
51
- version: '6.5',
52
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
53
- }
50
+ varnish: varnish66({ templateDir })
54
51
  },
55
52
  magento: defaultMagentoConfig,
56
53
  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 { varnish66 } = require('../varnish/varnish-6-6');
4
5
 
5
6
  module.exports = ({ templateDir } = {}) => ({
6
7
  magentoVersion: '2.4.3-p2',
@@ -46,11 +47,7 @@ module.exports = ({ templateDir } = {}) => ({
46
47
  composer: {
47
48
  version: '2'
48
49
  },
49
- varnish: {
50
- enabled: true,
51
- version: '6.5',
52
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
53
- }
50
+ varnish: varnish66({ templateDir })
54
51
  },
55
52
  magento: defaultMagentoConfig,
56
53
  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 { varnish66 } = require('../varnish/varnish-6-6');
4
5
 
5
6
  module.exports = ({ templateDir } = {}) => ({
6
7
  magentoVersion: '2.4.3',
@@ -46,11 +47,7 @@ module.exports = ({ templateDir } = {}) => ({
46
47
  composer: {
47
48
  version: '2'
48
49
  },
49
- varnish: {
50
- enabled: true,
51
- version: '6.5',
52
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
53
- }
50
+ varnish: varnish66({ templateDir })
54
51
  },
55
52
  magento: defaultMagentoConfig,
56
53
  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 { varnish70 } = require('../varnish/varnish-7-0');
4
5
 
5
6
  module.exports = ({ templateDir } = {}) => ({
6
7
  magentoVersion: '2.4.4',
@@ -46,11 +47,7 @@ module.exports = ({ templateDir } = {}) => ({
46
47
  composer: {
47
48
  version: '2'
48
49
  },
49
- varnish: {
50
- enabled: true,
51
- version: '7.0',
52
- configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
53
- }
50
+ varnish: varnish70({ templateDir })
54
51
  },
55
52
  magento: defaultMagentoConfig,
56
53
  host: 'localhost',
@@ -30,9 +30,11 @@ const run = (options) => {
30
30
  command = '',
31
31
  healthCheck,
32
32
  securityOptions = [],
33
- tmpfs = []
33
+ tmpfs = [],
34
+ expose = []
34
35
  } = options;
35
36
 
37
+ const exposeArg = expose && expose.map((e) => `--expose=${ e }`);
36
38
  const restartArg = restart && `--restart ${ restart }`;
37
39
  const networkArg = network && `--network ${ network }`;
38
40
  const portsArgs = ports.map((port) => `-p ${ port }`).join(' ');
@@ -53,6 +55,7 @@ const run = (options) => {
53
55
  networkArg,
54
56
  restartArg,
55
57
  portsArgs,
58
+ exposeArg,
56
59
  mountsArgs,
57
60
  mountVolumesArgs,
58
61
  envArgs,
@@ -63,6 +63,9 @@ const createNginxConfig = () => ({
63
63
 
64
64
  const networkToBindTo = isIpAddress(host) ? host : '127.0.0.1';
65
65
  const isLinux = os.platform() === 'linux';
66
+ const isNativeLinux = isLinux && !isWsl;
67
+ const hostMachine = isNativeLinux ? '127.0.0.1' : 'host.docker.internal';
68
+ const hostPort = isNativeLinux ? ports.app : 80;
66
69
 
67
70
  try {
68
71
  await setConfigFile({
@@ -77,8 +80,8 @@ const createNginxConfig = () => ({
77
80
  templateArgs: {
78
81
  ports,
79
82
  mageRoot: baseConfig.magentoDir,
80
- hostMachine: (isLinux && !isWsl) ? '127.0.0.1' : 'host.docker.internal',
81
- hostPort: (isLinux && !isWsl) ? ports.app : 80,
83
+ hostMachine,
84
+ hostPort,
82
85
  config: overridenConfiguration,
83
86
  networkToBindTo
84
87
  }
@@ -1,4 +1,3 @@
1
- const os = require('os');
2
1
  const path = require('path');
3
2
  const setConfigFile = require('../../util/set-config');
4
3
 
@@ -17,7 +16,8 @@ const createVarnishConfig = () => ({
17
16
  cacheDir
18
17
  }
19
18
  },
20
- isWsl
19
+ isWsl,
20
+ platform
21
21
  } = ctx;
22
22
 
23
23
  const {
@@ -26,7 +26,8 @@ const createVarnishConfig = () => ({
26
26
  }
27
27
  } = overridenConfiguration;
28
28
 
29
- const isLinux = os.platform() === 'linux';
29
+ const isLinux = platform === 'linux';
30
+ const isNativeLinux = isLinux && !isWsl;
30
31
 
31
32
  try {
32
33
  await setConfigFile({
@@ -38,8 +39,8 @@ const createVarnishConfig = () => ({
38
39
  template: varnish.configTemplate,
39
40
  overwrite: true,
40
41
  templateArgs: {
41
- hostMachine: (isLinux && !isWsl) ? '127.0.0.1' : 'host.docker.internal',
42
- hostPort: (isLinux && !isWsl) ? ports.app : 80
42
+ hostMachine: isNativeLinux ? '127.0.0.1' : 'host.docker.internal',
43
+ nginxPort: ports.app
43
44
  }
44
45
  });
45
46
  } catch (e) {
@@ -3,7 +3,6 @@ const runMagentoCommand = require('../../../util/run-magento');
3
3
  const configureElasticsearch = require('./configure-elasticsearch');
4
4
  const installMagento = require('./install-magento');
5
5
  const upgradeMagento = require('./upgrade-magento');
6
- const setupPersistedQuery = require('../../theme/setup-persisted-query');
7
6
  const varnishConfigSetup = require('./varnish-config');
8
7
 
9
8
  /**
@@ -25,6 +24,7 @@ const migrateDatabase = (options = {}) => ({
25
24
 
26
25
  if (tableCount === 0) {
27
26
  if (options.onlyInstallMagento) {
27
+ ctx.isSetupUpgradeNeeded = false;
28
28
  return task.newListr(
29
29
  installMagento({ isDbEmpty: true })
30
30
  );
@@ -32,7 +32,6 @@ const migrateDatabase = (options = {}) => ({
32
32
 
33
33
  return task.newListr([
34
34
  installMagento({ isDbEmpty: true }),
35
- setupPersistedQuery(),
36
35
  upgradeMagento(),
37
36
  magentoTask('cache:enable'),
38
37
  varnishConfigSetup(),
@@ -53,9 +52,9 @@ const migrateDatabase = (options = {}) => ({
53
52
 
54
53
  switch (code) {
55
54
  case 0: {
55
+ ctx.isSetupUpgradeNeeded = false;
56
56
  // no setup is needed, but still to be sure configure ES
57
57
  return task.newListr([
58
- setupPersistedQuery(),
59
58
  varnishConfigSetup(),
60
59
  configureElasticsearch()
61
60
  ], {
@@ -69,6 +68,7 @@ const migrateDatabase = (options = {}) => ({
69
68
  }
70
69
  case 1: {
71
70
  if (options.onlyInstallMagento) {
71
+ ctx.isSetupUpgradeNeeded = false;
72
72
  return task.newListr(
73
73
  installMagento()
74
74
  );
@@ -76,7 +76,6 @@ const migrateDatabase = (options = {}) => ({
76
76
 
77
77
  return task.newListr([
78
78
  installMagento(),
79
- setupPersistedQuery(),
80
79
  upgradeMagento(),
81
80
  magentoTask('cache:enable'),
82
81
  varnishConfigSetup(),
@@ -92,7 +91,6 @@ const migrateDatabase = (options = {}) => ({
92
91
  }
93
92
  case 2: {
94
93
  return task.newListr([
95
- setupPersistedQuery(),
96
94
  varnishConfigSetup(),
97
95
  configureElasticsearch(),
98
96
  upgradeMagento()
@@ -4,9 +4,23 @@ const magentoTask = require('../../../util/magento-task');
4
4
  * @type {() => import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
5
5
  */
6
6
  const upgradeMagento = () => ({
7
- task: (ctx, task) => task.newListr(
8
- magentoTask('setup:upgrade --no-interaction')
9
- )
7
+ skip: (ctx) => {
8
+ if ('isSetupUpgradeNeeded' in ctx) {
9
+ return !ctx.isSetupUpgradeNeeded;
10
+ }
11
+
12
+ return false;
13
+ },
14
+ task: (_ctx, task) => task.newListr([
15
+ magentoTask('setup:upgrade --no-interaction'),
16
+ {
17
+ task: (ctx) => {
18
+ ctx.isSetupUpgradeNeeded = false;
19
+ }
20
+ }
21
+ ], {
22
+ concurrent: false
23
+ })
10
24
  });
11
25
 
12
26
  module.exports = upgradeMagento;
@@ -1,4 +1,6 @@
1
+ const os = require('os');
1
2
  const { updateTableValues } = require('../../../util/database');
3
+ const getIsWsl = require('../../../util/is-wsl');
2
4
 
3
5
  /**
4
6
  * @type {() => import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
@@ -20,6 +22,10 @@ const varnishConfigSetup = () => ({
20
22
  ports
21
23
  } = ctx;
22
24
 
25
+ const isLinux = os.platform() === 'linux';
26
+ const isWsl = await getIsWsl();
27
+ // const host = (isLinux && !isWsl) ? 'localhost' : 'host.docker.internal';
28
+
23
29
  if (varnishEnabled) {
24
30
  await updateTableValues('core_config_data', [
25
31
  {
@@ -32,7 +38,7 @@ const varnishConfigSetup = () => ({
32
38
  },
33
39
  {
34
40
  path: 'system/full_page_cache/varnish/access_list',
35
- value: 'localhost'
41
+ value: (!isLinux || isWsl) ? 'host.docker.internal,localhost' : 'localhost'
36
42
  },
37
43
  {
38
44
  path: 'system/full_page_cache/caching_application',
@@ -14,7 +14,7 @@ const updateEnvPHP = () => ({
14
14
  return;
15
15
  }
16
16
 
17
- const useVarinsh = ctx.config.overridenConfiguration.configuration.varnish.enabled ? '1' : '';
17
+ const useVarnish = ctx.config.overridenConfiguration.configuration.varnish.enabled ? '1' : '';
18
18
  const varnishHost = '127.0.0.1';
19
19
  const varnishPort = ctx.ports.varnish;
20
20
  const previousVarnishPort = ctx.cachedPorts
@@ -25,7 +25,7 @@ const updateEnvPHP = () => ({
25
25
  phpTask(`-f ${ path.join(__dirname, 'update-env.php') }`, {
26
26
  noTitle: true,
27
27
  env: {
28
- USE_VARNISH: useVarinsh,
28
+ USE_VARNISH: useVarnish,
29
29
  VARNISH_PORT: `${ varnishPort }`,
30
30
  VARNISH_HOST: varnishHost,
31
31
  PREVIOUS_VARNISH_PORT: `${ previousVarnishPort }`
@@ -161,6 +161,8 @@ class EnvUpdater
161
161
  } else {
162
162
  $this->config['http_cache_hosts'] = [$varnishConfig];
163
163
  }
164
+ } else {
165
+ unset($this->config['http_cache_hosts']);
164
166
  }
165
167
  }
166
168
 
@@ -126,6 +126,7 @@ const configureProject = () => ({
126
126
  */
127
127
  const finishProjectConfiguration = () => ({
128
128
  title: 'Finishing project configuration',
129
+ skip: ({ skipSetup }) => skipSetup,
129
130
  task: (ctx, task) => task.newListr([
130
131
  {
131
132
  skip: (ctx) => !ctx.importDb,
@@ -143,16 +144,10 @@ const finishProjectConfiguration = () => ({
143
144
  });
144
145
  }
145
146
  },
146
- {
147
- title: 'Setting up themes',
148
- skip: (ctx) => !ctx.magentoFirstInstall,
149
- task: (subCtx, subTask) => subTask.newListr(
150
- setupThemes()
151
- )
152
- }
147
+ setupThemes()
153
148
  ], {
154
149
  rendererOptions: {
155
- collapse: true
150
+ collapse: false
156
151
  }
157
152
  })
158
153
  });
@@ -1,7 +1,8 @@
1
1
  const path = require('path');
2
2
  const pathExists = require('../../util/path-exists');
3
3
  const { execAsyncSpawn } = require('../../util/exec-async-command');
4
- const shouldUseYarn = require('@scandipwa/scandipwa-dev-utils/should-use-yarn');
4
+ const logger = require('@scandipwa/scandipwa-dev-utils/logger');
5
+ const matchFilesystem = require('../../util/match-filesystem');
5
6
 
6
7
  /**
7
8
  * @type {(theme: import('../../../typings/theme').Theme) => import('listr2').ListrTask<import('../../../typings/context').ListrContext>}
@@ -13,15 +14,32 @@ const buildTheme = ({ themePath }) => ({
13
14
 
14
15
  if (!await pathExists(path.join(themePath, 'node_modules'))) {
15
16
  task.output = 'Installing theme dependencies';
16
- await execAsyncSpawn(shouldUseYarn() ? 'yarn' : 'npm i', {
17
- cwd: path.join(process.cwd(), themePath),
18
- callback: !verbose ? undefined : (t) => {
19
- task.output = t;
20
- }
21
- });
17
+ const commandToInstallDependencies = await pathExists(path.join(themePath, 'package-lock.json'))
18
+ ? 'npm ci'
19
+ : 'npm i';
20
+
21
+ try {
22
+ await execAsyncSpawn(commandToInstallDependencies, {
23
+ cwd: path.join(process.cwd(), themePath),
24
+ callback: !verbose ? undefined : (t) => {
25
+ task.output = t;
26
+ }
27
+ });
28
+ } catch (e) {
29
+ throw new Error(`We were unable to install theme dependencies in ${themePath} using ${logger.style.code(commandToInstallDependencies)} command!
30
+ If you have ${logger.style.file('package-lock.json')} in theme directory make sure it's up to date with ${logger.style.file('package.json')} file content.`);
31
+ }
22
32
  }
23
33
 
24
- if (await pathExists(path.join(themePath, 'magento', 'Magento_Theme'))) {
34
+ const magentoThemeDirPath = path.join(themePath, 'magento', 'Magento_Theme');
35
+ const isMagentoThemeDirMatching = await matchFilesystem(magentoThemeDirPath, {
36
+ templates: true,
37
+ web: [
38
+ 'static'
39
+ ]
40
+ });
41
+
42
+ if (isMagentoThemeDirMatching) {
25
43
  task.skip();
26
44
  return;
27
45
  }
@@ -1,13 +1,23 @@
1
+ const path = require('path');
2
+ const getJsonfileData = require('../../util/get-jsonfile-data');
1
3
  const runComposerCommand = require('../../util/run-composer');
2
4
 
3
5
  /**
4
6
  * @type {(theme: import('../../../typings/theme').Theme) => import('listr2').ListrTask<import('../../../typings/context').ListrContext>}
5
7
  */
6
- const installTheme = ({ composerData }) => ({
8
+ const installTheme = (theme) => ({
7
9
  title: 'Installing theme in composer.json',
8
- task: async ({ magentoVersion, verbose = false }, task) => {
10
+ task: async (ctx, task) => {
11
+ const { magentoVersion, verbose = false } = ctx;
12
+ const composerJsonData = await getJsonfileData(path.join(process.cwd(), 'composer.json'));
13
+
14
+ if (composerJsonData.require[theme.composerData.name]) {
15
+ task.skip();
16
+ return;
17
+ }
18
+
9
19
  try {
10
- await runComposerCommand(`require ${composerData.name}`, {
20
+ await runComposerCommand(`require ${theme.composerData.name}`, {
11
21
  magentoVersion,
12
22
  callback: !verbose ? undefined : (t) => {
13
23
  task.output = t;
@@ -16,9 +26,11 @@ const installTheme = ({ composerData }) => ({
16
26
  } catch (e) {
17
27
  throw new Error(
18
28
  `Unexpected error while installing theme.
19
- See ERROR log below.\n\n${e}`
29
+ See ERROR log below.\n\n${e}`
20
30
  );
21
31
  }
32
+
33
+ ctx.isSetupUpgradeNeeded = true;
22
34
  },
23
35
  options: {
24
36
  bottomBar: 10
@@ -12,6 +12,7 @@ const buildTheme = require('./build-theme');
12
12
  * @type {() => import('listr2').ListrTask<import('../../../typings/context').ListrContext>}
13
13
  */
14
14
  const setupThemes = () => ({
15
+ title: 'Setting up themes',
15
16
  task: async (ctx, task) => {
16
17
  const { config: { baseConfig } } = ctx;
17
18
  const composerData = await getJsonfileData(path.join(baseConfig.magentoDir, 'composer.json'));
@@ -1,13 +1,26 @@
1
+ const path = require('path');
2
+ const getJsonfileData = require('../../util/get-jsonfile-data');
1
3
  const runComposerCommand = require('../../util/run-composer');
2
4
 
3
5
  /**
4
6
  * @type {(theme: import('../../../typings/theme').Theme) => import('listr2').ListrTask<import('../../../typings/context').ListrContext>}
5
7
  */
6
- const symlinkTheme = ({ absoluteThemePath }) => ({
8
+ const symlinkTheme = (theme) => ({
7
9
  title: 'Setting symbolic link for theme in composer.json',
8
- task: async ({ magentoVersion, verbose = false }, task) => {
10
+ task: async (ctx, task) => {
11
+ const { magentoVersion, verbose = false } = ctx;
12
+ const composerJsonData = await getJsonfileData(path.join(process.cwd(), 'composer.json'));
13
+ const repositories = Array.isArray(composerJsonData.repositories)
14
+ ? composerJsonData.repositories.reduce((acc, repo, index) => ({ ...acc, [`${index}`]: repo }), {})
15
+ : composerJsonData.repositories;
16
+
17
+ if (Object.values(repositories).some((value) => value.url === theme.themePath)) {
18
+ task.skip();
19
+ return;
20
+ }
21
+
9
22
  try {
10
- await runComposerCommand(`config repo.scandipwa path ${absoluteThemePath}`, {
23
+ await runComposerCommand(`config repo.scandipwa path ${theme.absoluteThemePath}`, {
11
24
  magentoVersion,
12
25
  callback: !verbose ? undefined : (t) => {
13
26
  task.output = t;
@@ -19,6 +32,8 @@ const symlinkTheme = ({ absoluteThemePath }) => ({
19
32
  See ERROR log above.\n\n${e}`
20
33
  );
21
34
  }
35
+
36
+ ctx.isSetupUpgradeNeeded = true;
22
37
  }
23
38
  });
24
39
 
@@ -13,7 +13,8 @@ const matchFilesystem = async (cwd, structure) => {
13
13
  .every((value) => value === true);
14
14
 
15
15
  return ok;
16
- } if (typeof structure === 'object') {
16
+ }
17
+ if (typeof structure === 'object') {
17
18
  const ok = (await Promise.all(Object.entries(structure).map(([key, value]) => {
18
19
  if (typeof value === 'boolean') {
19
20
  return pathExists(path.join(cwd, key));
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Scripts and configuration used by CMA.",
4
4
  "homepage": "https://docs.create-magento-app.com/",
5
5
  "repository": "github:scandipwa/create-magento-app",
6
- "version": "1.14.1-alpha.4",
6
+ "version": "1.14.1-alpha.7",
7
7
  "main": "./index.js",
8
8
  "types": "./typings/index.d.ts",
9
9
  "license": "OSL-3.0",
@@ -51,5 +51,5 @@
51
51
  "mysql",
52
52
  "scandipwa"
53
53
  ],
54
- "gitHead": "41436e9871ef44477f79f93c751b5d7315de8187"
54
+ "gitHead": "56b2ede6e6f7a92c4429ab7baa3b9fcdf432957f"
55
55
  }
@@ -16,6 +16,7 @@ export interface ListrContext {
16
16
  }
17
17
  arch: 'arm64' | 'x64'
18
18
  isArm: boolean
19
+ isWsl: boolean
19
20
  platform?: NodeJS.Platform
20
21
  platformVersion?: string
21
22
  /**
@@ -52,7 +53,7 @@ export interface ListrContext {
52
53
  o: string
53
54
  }
54
55
  }>
55
- getContainers(): Record<'nginx' | 'redis' | 'mysql' | 'elasticsearch', {
56
+ getContainers(): Record<'nginx' | 'redis' | 'mysql' | 'elasticsearch' | 'varnish', {
56
57
  _: string
57
58
  ports: string[]
58
59
  healthCheck: {
@@ -89,4 +90,5 @@ export interface ListrContext {
89
90
  useNonOverlappingPorts: boolean
90
91
  }
91
92
  mysqlConnection: mysql2.Connection
93
+ isSetupUpgradeNeeded?: boolean
92
94
  }