@scandipwa/magento-scripts 1.14.1-alpha.6 → 1.14.1-alpha.9

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 (52) hide show
  1. package/lib/config/docker.js +49 -13
  2. package/lib/config/get-port-config.js +5 -1
  3. package/lib/config/port-config.js +2 -1
  4. package/lib/config/ssl-terminator/index.js +10 -0
  5. package/lib/config/templates/nginx.template.conf +0 -14
  6. package/lib/config/templates/ssl-terminator.template.conf +27 -0
  7. package/lib/config/templates/varnish.template.vcl +15 -6
  8. package/lib/config/varnish/varnish-6-0.js +11 -0
  9. package/lib/config/varnish/varnish-6-6.js +11 -0
  10. package/lib/config/varnish/varnish-7-0.js +11 -0
  11. package/lib/config/versions/magento-2.3.0.js +4 -5
  12. package/lib/config/versions/magento-2.3.1.js +4 -5
  13. package/lib/config/versions/magento-2.3.2-p2.js +4 -5
  14. package/lib/config/versions/magento-2.3.2.js +4 -5
  15. package/lib/config/versions/magento-2.3.3-p1.js +4 -5
  16. package/lib/config/versions/magento-2.3.3.js +4 -5
  17. package/lib/config/versions/magento-2.3.4-p2.js +4 -5
  18. package/lib/config/versions/magento-2.3.4.js +4 -5
  19. package/lib/config/versions/magento-2.3.5-p1.js +4 -5
  20. package/lib/config/versions/magento-2.3.5-p2.js +4 -5
  21. package/lib/config/versions/magento-2.3.5.js +4 -5
  22. package/lib/config/versions/magento-2.3.6-p1.js +4 -5
  23. package/lib/config/versions/magento-2.3.6.js +4 -5
  24. package/lib/config/versions/magento-2.3.7-p1.js +4 -5
  25. package/lib/config/versions/magento-2.3.7-p2.js +4 -5
  26. package/lib/config/versions/magento-2.3.7-p3.js +4 -5
  27. package/lib/config/versions/magento-2.3.7.js +4 -5
  28. package/lib/config/versions/magento-2.4.0-p1.js +4 -5
  29. package/lib/config/versions/magento-2.4.0.js +4 -5
  30. package/lib/config/versions/magento-2.4.1-p1.js +4 -5
  31. package/lib/config/versions/magento-2.4.1.js +4 -5
  32. package/lib/config/versions/magento-2.4.2-p1.js +4 -5
  33. package/lib/config/versions/magento-2.4.2-p2.js +4 -5
  34. package/lib/config/versions/magento-2.4.2.js +4 -5
  35. package/lib/config/versions/magento-2.4.3-p1.js +4 -5
  36. package/lib/config/versions/magento-2.4.3-p2.js +4 -5
  37. package/lib/config/versions/magento-2.4.3.js +4 -5
  38. package/lib/config/versions/magento-2.4.4.js +4 -5
  39. package/lib/tasks/docker/containers.js +4 -1
  40. package/lib/tasks/file-system/create-nginx-config.js +7 -44
  41. package/lib/tasks/file-system/create-ssl-terminator-config.js +94 -0
  42. package/lib/tasks/file-system/create-varnish-config.js +28 -5
  43. package/lib/tasks/file-system/index.js +2 -0
  44. package/lib/tasks/magento/setup-magento/varnish-config.js +7 -1
  45. package/lib/tasks/php/update-env-php.js +2 -2
  46. package/lib/tasks/php/update-env.php +2 -0
  47. package/lib/tasks/status/index.js +24 -8
  48. package/lib/util/config-file-validator.js +2 -1
  49. package/lib/util/instance-metadata.js +2 -2
  50. package/package.json +2 -2
  51. package/typings/context.d.ts +2 -1
  52. package/typings/index.d.ts +13 -1
@@ -111,7 +111,8 @@ const configurationSchema = Joi.object({
111
111
  elasticsearch: serviceConfigurationSchema.optional(),
112
112
  redis: serviceConfigurationSchema.optional(),
113
113
  composer: composerConfigurationSchema.optional(),
114
- varnish: varnishConfigurationSchema.optional()
114
+ varnish: varnishConfigurationSchema.optional(),
115
+ sslTerminator: nginxConfigurationSchema.optional()
115
116
  });
116
117
 
117
118
  /**
@@ -38,7 +38,7 @@ const getInstanceMetadata = (ctx) => {
38
38
  if (isNgrok) {
39
39
  frontend.push({
40
40
  title: WEB_LOCAL_LOCATION_TITLE,
41
- text: `${ssl.enabled ? 'https' : 'http'}://localhost${ssl.enabled || ports.app === 80 ? '' : `:${ports.app}`}/`
41
+ text: `${ssl.enabled ? 'https' : 'http'}://localhost${ssl.enabled || ports.sslTerminator === 80 ? '' : `:${ports.sslTerminator}`}/`
42
42
  });
43
43
  frontend.push({
44
44
  title: WEB_LOCATION_TITLE,
@@ -47,7 +47,7 @@ const getInstanceMetadata = (ctx) => {
47
47
  } else {
48
48
  frontend.push({
49
49
  title: WEB_LOCATION_TITLE,
50
- text: `${ssl.enabled ? 'https' : 'http'}://${host}${ssl.enabled || ports.app === 80 ? '' : `:${ports.app}`}/`
50
+ text: `${ssl.enabled ? 'https' : 'http'}://${host}${ssl.enabled || ports.sslTerminator === 80 ? '' : `:${ports.sslTerminator}`}/`
51
51
  });
52
52
  }
53
53
 
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.6",
6
+ "version": "1.14.1-alpha.9",
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": "c9e9f8369d2ef70bb16d0a29d29134909ef70884"
54
+ "gitHead": "cf3f08226674ad5c6b6b03db93785dd9acf48025"
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: {
@@ -10,7 +10,14 @@ export interface ServiceWithVersion {
10
10
  version: string
11
11
  }
12
12
 
13
- // export inter/
13
+ export interface SSLTerminatorConfiguration extends ServiceWithVersion {
14
+ /**
15
+ * Configuration file location
16
+ *
17
+ * @example ./my-ssl-terminator-config.conf
18
+ */
19
+ configTemplate: string
20
+ }
14
21
 
15
22
  export interface NginxConfiguration extends ServiceWithVersion {
16
23
  /**
@@ -194,6 +201,11 @@ export interface CMAConfiguration {
194
201
  * Varnish configuration
195
202
  */
196
203
  varnish: VarnishConfiguration
204
+
205
+ /**
206
+ * SSL Terminator configuration
207
+ */
208
+ sslTerminator: SSLTerminatorConfiguration
197
209
  }
198
210
  /**
199
211
  * Magento configuration