@magento/create-pwa 2.4.6 → 2.5.6-alpha.12

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 (2) hide show
  1. package/lib/index.js +5 -11
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -13,13 +13,11 @@ const defaultSampleBackends = require('@magento/pwa-buildpack/sampleBackends.jso
13
13
 
14
14
  const uniqBy = (array, property) => {
15
15
  const map = new Map();
16
-
17
16
  for (const element of array) {
18
17
  if (element && element.hasOwnProperty(property)) {
19
18
  map.set(element[property], element);
20
19
  }
21
20
  }
22
-
23
21
  return Array.from(map.values());
24
22
  };
25
23
 
@@ -32,7 +30,6 @@ const fetchSampleBackends = async () => {
32
30
  'https://fvp0esmt8f.execute-api.us-east-1.amazonaws.com/default/getSampleBackends'
33
31
  );
34
32
  const { sampleBackends } = await res.json();
35
-
36
33
  return sampleBackends.environments;
37
34
  } catch {
38
35
  return [];
@@ -129,14 +126,7 @@ module.exports = async () => {
129
126
  default: 'https://magento2.localhost',
130
127
  when: ({ backendUrl }) => !backendUrl
131
128
  },
132
- {
133
- name: 'backendEdition',
134
- type: 'list',
135
- message:
136
- 'Edition of the magento store (Adobe Commerce or Magento Open Source)',
137
- choices: ['AC', 'EE', 'MOS', 'CE'],
138
- default: 'AC'
139
- },
129
+ // Removed the question for backendEdition and set it directly
140
130
  {
141
131
  name: 'braintreeToken',
142
132
  message:
@@ -163,6 +153,7 @@ module.exports = async () => {
163
153
  answers = await inquirer.prompt(questions);
164
154
 
165
155
  answers.backendUrl = answers.backendUrl || answers.customBackendUrl;
156
+
166
157
  const args = questions.reduce(
167
158
  (args, q) => {
168
159
  if (q.name === 'customBackendUrl' || q.name === 'directory') {
@@ -184,6 +175,9 @@ module.exports = async () => {
184
175
  ['create-project', answers.directory]
185
176
  );
186
177
 
178
+ // Set backendEdition directly without asking
179
+ args.push('--backend-edition', `"AC"`);
180
+
187
181
  const argsString = args.join(' ');
188
182
 
189
183
  console.log(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magento/create-pwa",
3
- "version": "2.4.6",
3
+ "version": "2.5.6-alpha.12",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "homepage": "https://github.com/magento/pwa-studio/tree/main/packages/create-pwa#readme",
31
31
  "dependencies": {
32
- "@magento/pwa-buildpack": "~11.4.3",
33
- "@magento/venia-concept": "~14.0.0",
32
+ "@magento/pwa-buildpack": "11.5.4-alpha.12",
33
+ "@magento/venia-concept": "14.2.0-alpha.12",
34
34
  "chalk": "^2.4.2",
35
35
  "change-case": "^3.1.0",
36
36
  "compression": "~1.7.4",