@scandipwa/magento-scripts 2.4.10-alpha.0 → 2.4.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.
Files changed (77) hide show
  1. package/lib/commands/cli.js +25 -9
  2. package/lib/commands/execute.js +18 -4
  3. package/lib/config/docker.js +17 -12
  4. package/lib/config/magento/required-php-extensions/magento-2.4.js +1 -0
  5. package/lib/config/php-config.js +2 -1
  6. package/lib/config/services/composer/versions/composer-1.js +1 -1
  7. package/lib/config/services/composer/versions/composer-2.9.js +8 -0
  8. package/lib/config/services/composer/versions/index.js +2 -1
  9. package/lib/config/services/elasticsearch/versions/elasticsearch-6.8.js +4 -4
  10. package/lib/config/services/elasticsearch/versions/elasticsearch-7.6.js +2 -1
  11. package/lib/config/services/mariadb/versions/index.js +2 -1
  12. package/lib/config/services/mariadb/versions/mariadb-11.8.js +11 -0
  13. package/lib/config/services/nginx/versions/nginx-1.18.js +2 -1
  14. package/lib/config/services/nginx/versions/nginx-1.22.js +2 -1
  15. package/lib/config/services/nginx/versions/nginx-1.24.js +2 -1
  16. package/lib/config/services/nginx/versions/nginx-1.26.js +2 -1
  17. package/lib/config/services/nginx/versions/nginx-1.28.js +3 -2
  18. package/lib/config/services/php/versions/php-8.1.js +1 -1
  19. package/lib/config/services/php/versions/php-8.2.js +1 -1
  20. package/lib/config/services/php/versions/php-8.3.js +1 -1
  21. package/lib/config/services/php/versions/php-8.4.js +1 -1
  22. package/lib/config/services/php/versions/php-8.5.js +32 -0
  23. package/lib/config/services/redis/index.js +3 -1
  24. package/lib/config/services/redis/valkey-9.0.js +8 -0
  25. package/lib/config/services/varnish/index.js +2 -1
  26. package/lib/config/services/varnish/varnish-8-0.js +15 -0
  27. package/lib/config/templates/magentorc.template +1 -0
  28. package/lib/config/templates/nginx.template.conf +1 -1
  29. package/lib/config/versions/magento-2.4.4-p16.js +1 -1
  30. package/lib/config/versions/magento-2.4.4-p17.js +41 -0
  31. package/lib/config/versions/magento-2.4.4-p18.js +43 -0
  32. package/lib/config/versions/magento-2.4.5-p16.js +41 -0
  33. package/lib/config/versions/magento-2.4.5-p17.js +43 -0
  34. package/lib/config/versions/magento-2.4.6-p14.js +41 -0
  35. package/lib/config/versions/magento-2.4.6-p15.js +43 -0
  36. package/lib/config/versions/magento-2.4.7-p1.js +2 -2
  37. package/lib/config/versions/magento-2.4.7-p10.js +42 -0
  38. package/lib/config/versions/magento-2.4.7-p2.js +2 -2
  39. package/lib/config/versions/magento-2.4.7-p3.js +2 -2
  40. package/lib/config/versions/magento-2.4.7-p4.js +2 -2
  41. package/lib/config/versions/magento-2.4.7-p5.js +2 -2
  42. package/lib/config/versions/magento-2.4.7-p6.js +2 -2
  43. package/lib/config/versions/magento-2.4.7-p7.js +2 -2
  44. package/lib/config/versions/magento-2.4.7-p8.js +2 -2
  45. package/lib/config/versions/magento-2.4.7-p9.js +41 -0
  46. package/lib/config/versions/magento-2.4.7.js +2 -2
  47. package/lib/config/versions/magento-2.4.8-p1.js +2 -2
  48. package/lib/config/versions/magento-2.4.8-p2.js +2 -2
  49. package/lib/config/versions/magento-2.4.8-p3.js +2 -3
  50. package/lib/config/versions/magento-2.4.8-p4.js +42 -0
  51. package/lib/config/versions/magento-2.4.8-p5.js +42 -0
  52. package/lib/config/versions/magento-2.4.8.js +2 -2
  53. package/lib/config/versions/magento-2.4.9-beta1.js +41 -0
  54. package/lib/config/versions/magento-2.4.9.js +44 -0
  55. package/lib/tasks/docker/containers/container-api.d.ts +4 -4
  56. package/lib/tasks/docker/containers/container-api.js +2 -2
  57. package/lib/tasks/docker/containers/tasks.js +31 -18
  58. package/lib/tasks/docker/image/image-api.d.ts +12 -0
  59. package/lib/tasks/docker/image/image-api.js +22 -1
  60. package/lib/tasks/docker/project-image-builder.js +25 -13
  61. package/lib/tasks/execute.js +51 -7
  62. package/lib/tasks/magento/setup-magento/clear-logs.js +31 -0
  63. package/lib/tasks/magento/setup-magento/disable-2fa.js +13 -0
  64. package/lib/tasks/magento/setup-magento/index.js +29 -1
  65. package/lib/tasks/magento/setup-magento/set-base-url.js +42 -15
  66. package/lib/tasks/magento/setup-magento/urn-highlighter.js +84 -2
  67. package/lib/tasks/requirements/searchengine-version.js +25 -30
  68. package/lib/tasks/start.js +9 -5
  69. package/lib/util/config-file-validator.js +15 -7
  70. package/lib/util/execute-in-container.js +88 -6
  71. package/lib/util/instance-metadata.js +15 -9
  72. package/lib/util/open-browser.js +7 -0
  73. package/lib/util/wait-for-logs.js +5 -2
  74. package/package.json +2 -2
  75. package/typings/context.d.ts +4 -2
  76. package/typings/index.d.ts +22 -0
  77. package/lib/config/services/elasticsearch/base-repo.js +0 -3
@@ -8,8 +8,8 @@ const pathExists = require('../../../util/path-exists')
8
8
  *
9
9
  * @reference https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-urn.html
10
10
  */
11
- const urnHighlighter = () => ({
12
- title: 'Generating URN highlighter',
11
+ const urnHighlighterForPHPStorm = () => ({
12
+ title: 'Generating URN highlighter for PHPStorm',
13
13
  task: async (ctx, task) => {
14
14
  if (!(await pathExists(path.join(process.cwd(), './.idea')))) {
15
15
  await fs.promises.mkdir(path.join(process.cwd(), './.idea'))
@@ -26,4 +26,86 @@ const urnHighlighter = () => ({
26
26
  }
27
27
  })
28
28
 
29
+ /**
30
+ * @returns {import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
31
+ */
32
+ const vscodeSettingsXmlCatalogs = () => ({
33
+ task: async (ctx, task) => {
34
+ const settingsPath = path.join(process.cwd(), './.vscode/settings.json')
35
+ const catalogEntry = './.vscode/catalog.xml'
36
+
37
+ let settings = {}
38
+ if (await pathExists(settingsPath)) {
39
+ try {
40
+ const content = await fs.promises.readFile(settingsPath, 'utf8')
41
+ settings = JSON.parse(content)
42
+ } catch {
43
+ // If the file is not valid JSON, we'll overwrite the xml.catalogs key only
44
+ }
45
+ }
46
+
47
+ const existing = settings['xml.catalogs']
48
+ /** @type {string[]} */
49
+ const catalogs = Array.isArray(existing) ? existing : []
50
+
51
+ if (catalogs.includes(catalogEntry)) {
52
+ task.skip()
53
+ return
54
+ }
55
+
56
+ settings['xml.catalogs'] = [...catalogs, catalogEntry]
57
+ await fs.promises.writeFile(
58
+ settingsPath,
59
+ JSON.stringify(settings, null, 4),
60
+ 'utf8'
61
+ )
62
+ }
63
+ })
64
+
65
+ /**
66
+ * @returns {import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
67
+ *
68
+ * @reference https://www.thebeardeddeveloper.co.uk/resources/articles/vscode-xml-autocomplete-for-magento
69
+ */
70
+ const urnHighlighterForVSCode = () => ({
71
+ title: 'Generating URN highlighter for VSCode',
72
+ task: async (ctx, task) => {
73
+ if (!(await pathExists(path.join(process.cwd(), './.vscode')))) {
74
+ await fs.promises.mkdir(path.join(process.cwd(), './.vscode'))
75
+ }
76
+
77
+ const subtasks = []
78
+
79
+ if (
80
+ !(await pathExists(
81
+ path.join(process.cwd(), './.vscode/catalog.xml')
82
+ ))
83
+ ) {
84
+ subtasks.push(
85
+ magentoTask(
86
+ 'dev:urn-catalog:generate --ide=vscode ./.vscode/catalog.xml'
87
+ )
88
+ )
89
+ }
90
+
91
+ subtasks.push(vscodeSettingsXmlCatalogs())
92
+
93
+ return task.newListr(subtasks)
94
+ }
95
+ })
96
+
97
+ /**
98
+ * @returns {import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
99
+ */
100
+ const urnHighlighter = () => ({
101
+ title: 'Generating URN highlighter',
102
+ task: (ctx, task) =>
103
+ task.newListr(
104
+ [urnHighlighterForPHPStorm(), urnHighlighterForVSCode()],
105
+ {
106
+ concurrent: true
107
+ }
108
+ )
109
+ })
110
+
29
111
  module.exports = urnHighlighter
@@ -92,38 +92,33 @@ const checkSearchEngineVersion = () => ({
92
92
  }
93
93
  )
94
94
  } else {
95
- await waitForLogs(
96
- searchengine === 'elasticsearch'
97
- ? {
98
- containerName: elasticsearch.name,
99
- customLineParser: (line) => {
100
- try {
101
- const logObject = JSON.parse(line)
95
+ /** @param {string} line */
96
+ const legacyMatcher = (line) => {
97
+ if (!line.startsWith('[')) {
98
+ return false
99
+ }
100
+ try {
101
+ const message = line.replaceAll(/\[[\s\S]+\]/g, '').trim()
102
+
103
+ return message.startsWith('started')
104
+ } catch {
105
+ return false
106
+ }
107
+ }
102
108
 
103
- return logObject.message.startsWith('started')
104
- } catch {
105
- return false
106
- }
107
- }
108
- }
109
- : {
110
- containerName: elasticsearch.name,
111
- customLineParser: (line) => {
112
- if (!line.startsWith('[')) {
113
- return false
114
- }
115
- try {
116
- const message = line
117
- .replaceAll(/\[[\s\S]+\]/g, '')
118
- .trim()
109
+ await waitForLogs({
110
+ containerName: elasticsearch.name,
111
+ customLineParser: (line) => {
112
+ try {
113
+ const logObject = JSON.parse(line)
119
114
 
120
- return message.startsWith('started')
121
- } catch {
122
- return false
123
- }
124
- }
125
- }
126
- )
115
+ return logObject.message.startsWith('started')
116
+ } catch {
117
+ return legacyMatcher(line)
118
+ }
119
+ },
120
+ successOnTimeout: true
121
+ })
127
122
 
128
123
  try {
129
124
  const response = await request(
@@ -27,7 +27,7 @@ const getIsWsl = require('../util/is-wsl')
27
27
  const checkForXDGOpen = require('../util/xdg-open-exists')
28
28
  const {
29
29
  getInstanceMetadata,
30
- constants: { WEB_LOCATION_TITLE }
30
+ constants: { WEB_ADMIN_LOCATION_TITLE }
31
31
  } = require('../util/instance-metadata')
32
32
  const waitingForVarnish = require('./magento/setup-magento/waiting-for-varnish')
33
33
  const checkPHPVersion = require('./requirements/php-version')
@@ -38,6 +38,7 @@ const { setProjectConfigTask } = require('./project-config')
38
38
  const {
39
39
  convertComposerHomeToComposerCacheVolume
40
40
  } = require('./docker/convert-composer-home-to-composer-cache-volume')
41
+ const clearLogs = require('./magento/setup-magento/clear-logs')
41
42
 
42
43
  /**
43
44
  * @returns {import('listr2').ListrTask<import('../../typings/context').ListrContext>}
@@ -148,7 +149,7 @@ const finishProjectConfiguration = () => ({
148
149
  title: 'Finishing project configuration',
149
150
  skip: ({ skipSetup }) => Boolean(skipSetup),
150
151
  task: (ctx, task) =>
151
- task.newListr([setupThemes(), waitingForVarnish()], {
152
+ task.newListr([setupThemes(), waitingForVarnish(), clearLogs()], {
152
153
  rendererOptions: {
153
154
  collapse: false
154
155
  }
@@ -191,9 +192,12 @@ const start = () => ({
191
192
  },
192
193
  task: (ctx) => {
193
194
  const instanceMetadata = getInstanceMetadata(ctx)
194
- const locationOnTheWeb = instanceMetadata.frontend.find(
195
- ({ title }) => title === WEB_LOCATION_TITLE
196
- )
195
+ const locationOnTheWeb =
196
+ instanceMetadata.frontend[0] ||
197
+ instanceMetadata.admin.find(
198
+ (u) => u.title === WEB_ADMIN_LOCATION_TITLE
199
+ )
200
+
197
201
  if (locationOnTheWeb) {
198
202
  openBrowser(locationOnTheWeb.text)
199
203
  }
@@ -101,7 +101,8 @@ const phpConfigurationSchema = Joi.object({
101
101
  extensions: phpExtensionConfiguration.optional(),
102
102
  env: Joi.object()
103
103
  .pattern(Joi.string(), [Joi.string(), Joi.number()])
104
- .optional()
104
+ .optional(),
105
+ platform: Joi.string().optional()
105
106
  })
106
107
 
107
108
  /**
@@ -109,7 +110,9 @@ const phpConfigurationSchema = Joi.object({
109
110
  */
110
111
  const nginxConfigurationSchema = Joi.object({
111
112
  image: Joi.string().optional(),
112
- configTemplate: Joi.string().optional().custom(fileExistsValidator)
113
+ configTemplate: Joi.string().optional().custom(fileExistsValidator),
114
+ platform: Joi.string().optional(),
115
+ runType: Joi.string().valid('website', 'store').optional()
113
116
  })
114
117
 
115
118
  /**
@@ -119,14 +122,16 @@ const varnishConfigurationSchema = Joi.object({
119
122
  enabled: Joi.boolean().optional(),
120
123
  healthCheck: Joi.boolean().optional(),
121
124
  image: Joi.string().optional(),
122
- configTemplate: Joi.string().optional().custom(fileExistsValidator)
125
+ configTemplate: Joi.string().optional().custom(fileExistsValidator),
126
+ platform: Joi.string().optional()
123
127
  })
124
128
 
125
129
  /**
126
130
  * @type {Joi.ObjectSchema<import('../../typings').ServiceWithImage>}
127
131
  */
128
132
  const serviceConfigurationSchema = Joi.object({
129
- image: Joi.string().optional()
133
+ image: Joi.string().optional(),
134
+ platform: Joi.string().optional()
130
135
  })
131
136
 
132
137
  /**
@@ -136,7 +141,8 @@ const mariadbConfigurationSchema = Joi.object({
136
141
  image: Joi.string().optional(),
137
142
  useOptimizerSwitch: Joi.alternatives()
138
143
  .try(Joi.string(), Joi.boolean())
139
- .optional()
144
+ .optional(),
145
+ platform: Joi.string().optional()
140
146
  })
141
147
 
142
148
  /**
@@ -144,12 +150,14 @@ const mariadbConfigurationSchema = Joi.object({
144
150
  */
145
151
  const elasticsearchConfigurationSchema = Joi.object({
146
152
  image: Joi.string().optional(),
147
- env: Joi.object().optional()
153
+ env: Joi.object().optional(),
154
+ platform: Joi.string().optional()
148
155
  })
149
156
 
150
157
  const opensearchConfigurationSchema = Joi.object({
151
158
  image: Joi.string().optional(),
152
- env: Joi.object().optional()
159
+ env: Joi.object().optional(),
160
+ platform: Joi.string().optional()
153
161
  })
154
162
 
155
163
  const searchEngineConfiguration = Joi.string().valid(
@@ -1,10 +1,35 @@
1
1
  const { spawn } = require('child_process')
2
- const { execCommand, run } = require('../tasks/docker/containers/container-api')
2
+ const {
3
+ execCommand,
4
+ run,
5
+ exec
6
+ } = require('../tasks/docker/containers/container-api')
3
7
 
4
8
  /**
5
- * @param {{ containerName: string, commands: string[], user?: string }} param0
9
+ * Escape an argument for use in a shell command string.
10
+ * Wrap in single quotes and escape single quotes inside.
11
+ * @param {string} arg
12
+ * @returns {string}
6
13
  */
7
- const executeInContainer = ({ containerName, commands, user }) => {
14
+ const shellEscapeArg = (arg) => "'" + String(arg).replace(/'/g, "'\\''") + "'"
15
+
16
+ /**
17
+ * Join command args to survive shell re-parsing in `docker run`.
18
+ * @param {string[]} args
19
+ * @returns {string}
20
+ */
21
+ const joinCommandArgs = (...args) =>
22
+ args
23
+ .map((arg) => {
24
+ const value = String(arg)
25
+ return /[\s'"\\$`]/.test(value) ? shellEscapeArg(value) : value
26
+ })
27
+ .join(' ')
28
+
29
+ /**
30
+ * @param {{ containerName: string, commands: string[], user?: string, env?: Record<string, string> }} param0
31
+ */
32
+ const executeInContainer = ({ containerName, commands, user, env }) => {
8
33
  if (!process.stdin.isTTY) {
9
34
  process.stderr.write('This app works only in TTY mode')
10
35
  process.exit(1)
@@ -16,7 +41,8 @@ const executeInContainer = ({ containerName, commands, user }) => {
16
41
  command: commandBin,
17
42
  user,
18
43
  tty: true,
19
- interactive: true
44
+ interactive: true,
45
+ env: env || {}
20
46
  })
21
47
  const [command, ...args] = execArgs
22
48
 
@@ -29,6 +55,37 @@ const executeInContainer = ({ containerName, commands, user }) => {
29
55
  })
30
56
  }
31
57
 
58
+ /**
59
+ * Non-interactive version of executeInContainer for AI terminals and scripts.
60
+ * @param {{ containerName: string, commands: string[], user?: string, workdir?: string, env?: Record<string, string> }} param0
61
+ * @returns {Promise<{ code: number, result: string }>}
62
+ */
63
+ const executeInContainerNonInteractive = async ({
64
+ containerName,
65
+ commands,
66
+ user,
67
+ workdir,
68
+ env
69
+ }) => {
70
+ const [commandBin, ...commandsArgs] = commands
71
+ const fullCommand = joinCommandArgs(commandBin, ...commandsArgs)
72
+
73
+ return exec(
74
+ {
75
+ container: containerName,
76
+ command: fullCommand,
77
+ user,
78
+ workdir,
79
+ tty: false,
80
+ interactive: false,
81
+ env: env || {}
82
+ },
83
+ {
84
+ withCode: true
85
+ }
86
+ )
87
+ }
88
+
32
89
  /**
33
90
  * @param {import('../tasks/docker/containers/container-api').ContainerRunOptions} options
34
91
  * @param {string[]} commands
@@ -44,7 +101,7 @@ const runInContainer = async (options, commands) => {
44
101
  const runResult = await run(
45
102
  {
46
103
  ...options,
47
- command: `${commandBin} ${commandsArgs.join(' ')}`,
104
+ command: joinCommandArgs(commandBin, ...commandsArgs),
48
105
  tty: true,
49
106
  detach: false,
50
107
  rm: true
@@ -58,7 +115,32 @@ const runInContainer = async (options, commands) => {
58
115
  process.exit(runResult.code)
59
116
  }
60
117
 
118
+ /**
119
+ * Non-interactive version of runInContainer for AI terminals and scripts.
120
+ * @param {import('../tasks/docker/containers/container-api').ContainerRunOptions} options
121
+ * @param {string[]} commands
122
+ * @returns {Promise<{ code: number, result: string }>}
123
+ */
124
+ const runInContainerNonInteractive = async (options, commands) => {
125
+ const [commandBin, ...commandsArgs] = commands
126
+
127
+ return run(
128
+ {
129
+ ...options,
130
+ command: joinCommandArgs(commandBin, ...commandsArgs),
131
+ tty: false,
132
+ detach: false,
133
+ rm: true
134
+ },
135
+ {
136
+ withCode: true
137
+ }
138
+ )
139
+ }
140
+
61
141
  module.exports = {
62
142
  executeInContainer,
63
- runInContainer
143
+ executeInContainerNonInteractive,
144
+ runInContainer,
145
+ runInContainerNonInteractive
64
146
  }
@@ -24,7 +24,11 @@ const getInstanceMetadata = (ctx) => {
24
24
  ports,
25
25
  config: {
26
26
  magentoConfiguration,
27
- overridenConfiguration: { ssl, storeDomains }
27
+ overridenConfiguration: {
28
+ ssl,
29
+ storeDomains,
30
+ magento: { adminuri }
31
+ }
28
32
  }
29
33
  } = ctx
30
34
 
@@ -66,14 +70,16 @@ const getInstanceMetadata = (ctx) => {
66
70
  })
67
71
  }
68
72
 
69
- const webLocation = frontend.find((u) => u.title === WEB_LOCATION_TITLE)
70
-
71
- if (webLocation) {
72
- admin.push({
73
- title: WEB_ADMIN_LOCATION_TITLE,
74
- text: logger.style.link(`${webLocation.text}admin`)
75
- })
76
- }
73
+ admin.push({
74
+ title: WEB_ADMIN_LOCATION_TITLE,
75
+ text: logger.style.link(
76
+ `${ssl.enabled ? 'https' : 'http'}://${storeDomains.admin}${
77
+ ssl.enabled || ports.sslTerminator === 80
78
+ ? ''
79
+ : `:${ports.sslTerminator}`
80
+ }/${adminuri}/`
81
+ )
82
+ })
77
83
 
78
84
  admin.push({
79
85
  title: WEB_ADMIN_CREDENTIALS_TITLE,
@@ -1,11 +1,18 @@
1
1
  const { execAsync } = require('./exec-async')
2
2
 
3
+ const isCMANoOpen =
4
+ process.env.CMA_NO_OPEN === '1' || process.env.CMA_NO_OPEN === 'true'
5
+
3
6
  // eslint-disable-next-line no-control-regex
4
7
  const consoleStyleReplacer = /[\u001b]\[\S+?m/g
5
8
  /**
6
9
  * @param {string} url
7
10
  */
8
11
  const openBrowser = async (url) => {
12
+ if (isCMANoOpen) {
13
+ return
14
+ }
15
+
9
16
  const start = process.platform === 'darwin' ? 'open' : 'xdg-open'
10
17
 
11
18
  await execAsync(`${start} ${url.replace(consoleStyleReplacer, '')}`)
@@ -2,12 +2,13 @@ const { execAsyncSpawn } = require('./exec-async-command')
2
2
  const sleep = require('./sleep')
3
3
 
4
4
  /**
5
- * @param {{ containerName: string, timeout?: number, matchText?: string | string[], customLineParser?: (line: string) => boolean }} param0
5
+ * @param {{ containerName: string, timeout?: number, matchText?: string | string[], customLineParser?: (line: string) => boolean, successOnTimeout?: boolean }} param0
6
6
  * @returns {Promise<void>}
7
7
  */
8
8
  const waitForLogs = ({
9
9
  containerName,
10
10
  timeout = 30 * 1000,
11
+ successOnTimeout = false,
11
12
  matchText,
12
13
  customLineParser
13
14
  }) =>
@@ -58,8 +59,10 @@ const waitForLogs = ({
58
59
  })
59
60
  ])
60
61
 
61
- if (timeoutExceeded) {
62
+ if (timeoutExceeded && !successOnTimeout) {
62
63
  reject(new Error('Timeout exception'))
64
+ } else {
65
+ resolve()
63
66
  }
64
67
  })
65
68
 
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": "2.4.10-alpha.0",
6
+ "version": "2.4.11",
7
7
  "main": "./index.js",
8
8
  "types": "./typings/index.d.ts",
9
9
  "license": "OSL-3.0",
@@ -59,5 +59,5 @@
59
59
  "@types/node": "^20.14.11",
60
60
  "@types/yargs": "^17.0.32"
61
61
  },
62
- "gitHead": "2bed7f4719e34e41ed38776eadc6961a88189eab"
62
+ "gitHead": "64c177af194cf32de4d8ae08116f016d30ec7f01"
63
63
  }
@@ -67,15 +67,16 @@ export interface ListrContext {
67
67
  edition?: 'community' | 'enterprise'
68
68
  config: {
69
69
  php: {
70
+ iniPath: string
70
71
  iniTemplatePath: string
71
72
  fpmConfPath: string
72
73
  fpmTemplatePath: string
73
74
  debugIniPath: string
74
75
  debugTemplatePath: string
75
76
  debugFpmConfPath: string
76
- debugFpmTemplatePath: string
77
77
  extensions: PHPExtensions
78
- version: string
78
+ env: Record<string, unknown>
79
+ platform?: 'linux/amd64' | 'linux/arm64' | (string & {})
79
80
  }
80
81
  composer: {
81
82
  dirPath: string
@@ -120,6 +121,7 @@ export interface ListrContext {
120
121
  dependsOn?: string[]
121
122
  serviceReadyLog?: string
122
123
  platform?: string
124
+ execCommandEnv?: Record<string, string>
123
125
  }
124
126
  >
125
127
  }
@@ -14,6 +14,11 @@ export interface ServiceWithImage {
14
14
  * Service Docker image
15
15
  */
16
16
  image: string
17
+
18
+ /**
19
+ * Service platform
20
+ */
21
+ platform?: 'linux/amd64' | 'linux/arm64' | (string & {})
17
22
  }
18
23
 
19
24
  export interface ServiceWithoutImage {
@@ -21,6 +26,11 @@ export interface ServiceWithoutImage {
21
26
  * Service Docker image
22
27
  */
23
28
  image: string
29
+
30
+ /**
31
+ * Service platform
32
+ */
33
+ platform?: 'linux/amd64' | 'linux/arm64' | (string & {})
24
34
  }
25
35
 
26
36
  export interface MariaDBConfiguration extends ServiceWithImage {
@@ -58,6 +68,13 @@ export interface NginxConfiguration extends ServiceWithImage {
58
68
  * @example ./my-nginx-config.conf
59
69
  */
60
70
  configTemplate: string
71
+
72
+ /**
73
+ * Magento run type for nginx configuration
74
+ *
75
+ * @default 'website'
76
+ */
77
+ runType?: 'website' | 'store' | (string & {})
61
78
  }
62
79
 
63
80
  export interface ElasticSearchConfiguration extends ServiceWithImage {
@@ -228,6 +245,11 @@ export interface PHPConfiguration {
228
245
  * Environmental variables used for PHP container
229
246
  */
230
247
  env: Record<string, unknown>
248
+
249
+ /**
250
+ * Service platform
251
+ */
252
+ platform?: 'linux/amd64' | 'linux/arm64' | (string & {})
231
253
  }
232
254
  export interface SSLConfiguration {
233
255
  /**
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- repo: 'ghcr.io/scandipwa/create-magento-app'
3
- }