@scandipwa/magento-scripts 2.4.9 → 2.4.10

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 (62) hide show
  1. package/lib/commands/cli.js +25 -9
  2. package/lib/config/docker.js +17 -12
  3. package/lib/config/magento/required-php-extensions/magento-2.4.js +1 -0
  4. package/lib/config/php-config.js +2 -1
  5. package/lib/config/services/composer/versions/composer-1.js +1 -1
  6. package/lib/config/services/composer/versions/composer-2.9.js +8 -0
  7. package/lib/config/services/composer/versions/index.js +2 -1
  8. package/lib/config/services/elasticsearch/versions/elasticsearch-6.8.js +4 -4
  9. package/lib/config/services/elasticsearch/versions/elasticsearch-7.6.js +2 -1
  10. package/lib/config/services/nginx/versions/nginx-1.18.js +2 -1
  11. package/lib/config/services/nginx/versions/nginx-1.22.js +2 -1
  12. package/lib/config/services/nginx/versions/nginx-1.24.js +2 -1
  13. package/lib/config/services/nginx/versions/nginx-1.26.js +2 -1
  14. package/lib/config/services/nginx/versions/nginx-1.28.js +3 -2
  15. package/lib/config/services/php/versions/php-8.1.js +1 -1
  16. package/lib/config/services/php/versions/php-8.2.js +1 -1
  17. package/lib/config/services/php/versions/php-8.3.js +1 -1
  18. package/lib/config/services/php/versions/php-8.4.js +1 -1
  19. package/lib/config/services/php/versions/php-8.5.js +32 -0
  20. package/lib/config/templates/magentorc.template +1 -0
  21. package/lib/config/templates/nginx.template.conf +1 -1
  22. package/lib/config/versions/magento-2.4.4-p16.js +1 -1
  23. package/lib/config/versions/magento-2.4.4-p17.js +41 -0
  24. package/lib/config/versions/magento-2.4.5-p16.js +41 -0
  25. package/lib/config/versions/magento-2.4.6-p14.js +41 -0
  26. package/lib/config/versions/magento-2.4.7-p1.js +2 -2
  27. package/lib/config/versions/magento-2.4.7-p2.js +2 -2
  28. package/lib/config/versions/magento-2.4.7-p3.js +2 -2
  29. package/lib/config/versions/magento-2.4.7-p4.js +2 -2
  30. package/lib/config/versions/magento-2.4.7-p5.js +2 -2
  31. package/lib/config/versions/magento-2.4.7-p6.js +2 -2
  32. package/lib/config/versions/magento-2.4.7-p7.js +2 -2
  33. package/lib/config/versions/magento-2.4.7-p8.js +2 -2
  34. package/lib/config/versions/magento-2.4.7-p9.js +41 -0
  35. package/lib/config/versions/magento-2.4.7.js +2 -2
  36. package/lib/config/versions/magento-2.4.8-p1.js +2 -2
  37. package/lib/config/versions/magento-2.4.8-p2.js +2 -2
  38. package/lib/config/versions/magento-2.4.8-p3.js +2 -3
  39. package/lib/config/versions/magento-2.4.8-p4.js +43 -0
  40. package/lib/config/versions/magento-2.4.8.js +2 -2
  41. package/lib/config/versions/magento-2.4.9-beta1.js +41 -0
  42. package/lib/tasks/docker/containers/container-api.js +2 -2
  43. package/lib/tasks/docker/containers/tasks.js +31 -18
  44. package/lib/tasks/docker/image/image-api.d.ts +12 -0
  45. package/lib/tasks/docker/image/image-api.js +22 -1
  46. package/lib/tasks/docker/project-image-builder.js +21 -11
  47. package/lib/tasks/execute.js +2 -1
  48. package/lib/tasks/magento/setup-magento/clear-logs.js +31 -0
  49. package/lib/tasks/magento/setup-magento/disable-2fa.js +13 -0
  50. package/lib/tasks/magento/setup-magento/set-base-url.js +42 -15
  51. package/lib/tasks/magento/setup-magento/urn-highlighter.js +84 -2
  52. package/lib/tasks/requirements/searchengine-version.js +24 -2
  53. package/lib/tasks/start.js +9 -5
  54. package/lib/util/config-file-validator.js +15 -7
  55. package/lib/util/execute-in-container.js +4 -3
  56. package/lib/util/instance-metadata.js +15 -9
  57. package/lib/util/open-browser.js +7 -0
  58. package/lib/util/wait-for-logs.js +27 -6
  59. package/package.json +2 -2
  60. package/typings/context.d.ts +4 -2
  61. package/typings/index.d.ts +22 -0
  62. package/lib/config/services/elasticsearch/base-repo.js +0 -3
@@ -5,9 +5,10 @@ const KnownError = require('../../../errors/known-error')
5
5
  * @param {number} scopeId
6
6
  * @param {string} code
7
7
  * @param {string} host
8
+ * @param {'websites' | 'stores'} scopeType
8
9
  * @returns {import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
9
10
  */
10
- const setBaseUrlForScope = (scopeId, code, host) => ({
11
+ const setBaseUrlForScope = (scopeId, code, host, scopeType) => ({
11
12
  title: `store code ${code} at ${host}`,
12
13
  task: async (ctx, task) => {
13
14
  const {
@@ -31,7 +32,7 @@ const setBaseUrlForScope = (scopeId, code, host) => ({
31
32
  const secureLocation = `${host}/` // SSL will work only on port 443, so you cannot run multiple projects with SSL at the same time.
32
33
  const httpUrl = `http://${location}`
33
34
  const httpsUrl = `https://${secureLocation}`
34
- const scope = scopeId === 0 ? 'default' : 'websites'
35
+ const scope = scopeId === 0 ? 'default' : scopeType
35
36
  const table = 'core_config_data'
36
37
  const values = [
37
38
  {
@@ -83,11 +84,13 @@ const setBaseUrl = () => ({
83
84
  task: async (ctx, task) => {
84
85
  const {
85
86
  config: {
86
- overridenConfiguration: { ssl, storeDomains }
87
+ overridenConfiguration: { ssl, storeDomains, configuration }
87
88
  },
88
89
  databaseConnection
89
90
  } = ctx
90
91
 
92
+ const runType = configuration?.nginx?.runType || 'website'
93
+
91
94
  const enableSecureFrontend = ssl.enabled ? '1' : '0'
92
95
 
93
96
  await updateTableValues(
@@ -110,27 +113,33 @@ const setBaseUrl = () => ({
110
113
  { databaseConnection, task }
111
114
  )
112
115
 
113
- /** @type {{ website_id: number, code: string }[][]}} */
114
- const [storeWebsites] = await databaseConnection.query(
115
- `select * from store_website;`
116
+ const scopeType = runType === 'store' ? 'stores' : 'websites'
117
+ const tableName = runType === 'store' ? 'store' : 'store_website'
118
+ const idField = runType === 'store' ? 'store_id' : 'website_id'
119
+
120
+ const [entities] = await databaseConnection.query(
121
+ `select * from ${tableName};`
116
122
  )
117
123
 
118
- if (!storeWebsites || storeWebsites.length === 0) {
124
+ if (!entities || entities.length === 0) {
119
125
  throw new KnownError(
120
- `No store websites found in database, store_website table is empty or does not exist`
126
+ `No ${
127
+ runType === 'store' ? 'stores' : 'store websites'
128
+ } found in database, ${tableName} table is empty or does not exist`
121
129
  )
122
130
  }
123
131
 
124
132
  const storeDomainsWithMapping = Object.entries(storeDomains).reduce(
125
133
  (acc, [key, val]) => {
126
- const storeWebsite = storeWebsites.find(
127
- ({ code }) => code === key
134
+ const entity = entities.find(
135
+ /** @param {{ code: string }} entity */
136
+ (entity) => entity.code === key
128
137
  )
129
- if (storeWebsite) {
138
+ if (entity) {
130
139
  return {
131
140
  ...acc,
132
- [storeWebsite.code]: {
133
- websiteId: storeWebsite.website_id,
141
+ [entity.code]: {
142
+ scopeId: entity[idField],
134
143
  domain: val
135
144
  }
136
145
  }
@@ -141,10 +150,28 @@ const setBaseUrl = () => ({
141
150
  {}
142
151
  )
143
152
 
153
+ // Check for missing store codes when runType is 'store'
154
+ if (runType === 'store') {
155
+ const missingCodes = Object.keys(storeDomains).filter(
156
+ (code) =>
157
+ !entities.some(
158
+ /** @param {{ code: string }} entity */
159
+ (entity) => entity.code === code
160
+ )
161
+ )
162
+ if (missingCodes.length > 0) {
163
+ throw new KnownError(
164
+ `Store codes not found in database: ${missingCodes.join(
165
+ ', '
166
+ )}. Please check your storeDomains configuration in cma.js matches the store codes in the store table.`
167
+ )
168
+ }
169
+ }
170
+
144
171
  return task.newListr(
145
172
  Object.entries(storeDomainsWithMapping).map(
146
- ([storeCode, { websiteId, domain }]) =>
147
- setBaseUrlForScope(websiteId, storeCode, domain)
173
+ ([storeCode, { scopeId, domain }]) =>
174
+ setBaseUrlForScope(scopeId, storeCode, domain, scopeType)
148
175
  ),
149
176
  {
150
177
  concurrent: true,
@@ -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,10 +92,32 @@ const checkSearchEngineVersion = () => ({
92
92
  }
93
93
  )
94
94
  } else {
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
+ }
108
+
95
109
  await waitForLogs({
96
110
  containerName: elasticsearch.name,
97
- matchText:
98
- searchengine === 'elasticsearch' ? '"started"' : '] started'
111
+ customLineParser: (line) => {
112
+ try {
113
+ const logObject = JSON.parse(line)
114
+
115
+ return logObject.message.startsWith('started')
116
+ } catch {
117
+ return legacyMatcher(line)
118
+ }
119
+ },
120
+ successOnTimeout: true
99
121
  })
100
122
 
101
123
  try {
@@ -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(
@@ -2,9 +2,9 @@ const { spawn } = require('child_process')
2
2
  const { execCommand, run } = require('../tasks/docker/containers/container-api')
3
3
 
4
4
  /**
5
- * @param {{ containerName: string, commands: string[], user?: string }} param0
5
+ * @param {{ containerName: string, commands: string[], user?: string, env?: Record<string, string> }} param0
6
6
  */
7
- const executeInContainer = ({ containerName, commands, user }) => {
7
+ const executeInContainer = ({ containerName, commands, user, env }) => {
8
8
  if (!process.stdin.isTTY) {
9
9
  process.stderr.write('This app works only in TTY mode')
10
10
  process.exit(1)
@@ -16,7 +16,8 @@ const executeInContainer = ({ containerName, commands, user }) => {
16
16
  command: commandBin,
17
17
  user,
18
18
  tty: true,
19
- interactive: true
19
+ interactive: true,
20
+ env: env || {}
20
21
  })
21
22
  const [command, ...args] = execArgs
22
23
 
@@ -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,10 +2,16 @@ const { execAsyncSpawn } = require('./exec-async-command')
2
2
  const sleep = require('./sleep')
3
3
 
4
4
  /**
5
- * @param {{ containerName: string, timeout?: number, matchText: string }} 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
- const waitForLogs = ({ containerName, timeout = 30 * 1000, matchText }) =>
8
+ const waitForLogs = ({
9
+ containerName,
10
+ timeout = 30 * 1000,
11
+ successOnTimeout = false,
12
+ matchText,
13
+ customLineParser
14
+ }) =>
9
15
  // eslint-disable-next-line no-async-promise-executor
10
16
  new Promise(async (resolve, reject) => {
11
17
  let matched = false
@@ -26,9 +32,22 @@ const waitForLogs = ({ containerName, timeout = 30 * 1000, matchText }) =>
26
32
  }
27
33
 
28
34
  result.split('\n').forEach((line) => {
29
- if (line.includes(matchText)) {
30
- matched = true
31
- resolve()
35
+ if (customLineParser) {
36
+ if (customLineParser(line)) {
37
+ matched = true
38
+ resolve()
39
+ }
40
+ } else if (matchText) {
41
+ if (
42
+ Array.isArray(matchText)
43
+ ? matchText.some((text) =>
44
+ line.includes(text)
45
+ )
46
+ : line.includes(matchText)
47
+ ) {
48
+ matched = true
49
+ resolve()
50
+ }
32
51
  }
33
52
  })
34
53
 
@@ -40,8 +59,10 @@ const waitForLogs = ({ containerName, timeout = 30 * 1000, matchText }) =>
40
59
  })
41
60
  ])
42
61
 
43
- if (timeoutExceeded) {
62
+ if (timeoutExceeded && !successOnTimeout) {
44
63
  reject(new Error('Timeout exception'))
64
+ } else {
65
+ resolve()
45
66
  }
46
67
  })
47
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.9",
6
+ "version": "2.4.10",
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": "84df2774959c2bac35204a36d92383b82dfd54b0"
62
+ "gitHead": "c901bd4d25f0e127f9fc286ba979e49d2a145757"
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
- }