create-cwa 2.0.0-alpha.14 → 2.0.0-alpha.16

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.
package/dist/index.js CHANGED
@@ -182,7 +182,14 @@ Sample content is bundled. Load it after the API container is healthy:
182
182
  docker compose exec php bin/console doctrine:fixtures:load --append
183
183
  \`\`\`
184
184
  `
185
- : '';
185
+ : `## Admin account
186
+
187
+ The database starts empty. Create an admin once the API container is healthy:
188
+
189
+ \`\`\`bash
190
+ docker compose exec php bin/console silverback:api-components:user:create --admin
191
+ \`\`\`
192
+ `;
186
193
  const readme = `# ${answers.projectName}
187
194
 
188
195
  A [CWA](https://github.com/components-web-app/components-web-app) project.
@@ -264,7 +271,7 @@ async function main() {
264
271
  }
265
272
  }
266
273
  if (!answers.fixtures) {
267
- await removeExcluded(tempDir, ['api/src/DataFixtures/Parts/']);
274
+ await removeExcluded(tempDir, ['api/src/DataFixtures/']);
268
275
  }
269
276
  await processNuxtConfig(tempDir, answers.features);
270
277
  await replaceProjectName(tempDir, answers.projectName);
@@ -338,6 +345,11 @@ async function main() {
338
345
  outroLines.push('Load sample content (once the API container is healthy):');
339
346
  outroLines.push(' docker compose exec php bin/console doctrine:fixtures:load --append');
340
347
  }
348
+ else {
349
+ outroLines.push('');
350
+ outroLines.push('Create an admin (once the API container is healthy):');
351
+ outroLines.push(' docker compose exec php bin/console silverback:api-components:user:create --admin');
352
+ }
341
353
  outro(outroLines.join('\n'));
342
354
  }
343
355
  main().catch((err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cwa",
3
- "version": "2.0.0-alpha.14",
3
+ "version": "2.0.0-alpha.16",
4
4
  "description": "Create a new CWA (Components Web App) project",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -236,7 +236,14 @@ Sample content is bundled. Load it after the API container is healthy:
236
236
  docker compose exec php bin/console doctrine:fixtures:load --append
237
237
  \`\`\`
238
238
  `
239
- : ''
239
+ : `## Admin account
240
+
241
+ The database starts empty. Create an admin once the API container is healthy:
242
+
243
+ \`\`\`bash
244
+ docker compose exec php bin/console silverback:api-components:user:create --admin
245
+ \`\`\`
246
+ `
240
247
 
241
248
  const readme = `# ${answers.projectName}
242
249
 
@@ -329,7 +336,7 @@ async function main(): Promise<void> {
329
336
  }
330
337
 
331
338
  if (!answers.fixtures) {
332
- await removeExcluded(tempDir, ['api/src/DataFixtures/Parts/'])
339
+ await removeExcluded(tempDir, ['api/src/DataFixtures/'])
333
340
  }
334
341
 
335
342
  await processNuxtConfig(tempDir, answers.features)
@@ -415,6 +422,10 @@ async function main(): Promise<void> {
415
422
  outroLines.push('')
416
423
  outroLines.push('Load sample content (once the API container is healthy):')
417
424
  outroLines.push(' docker compose exec php bin/console doctrine:fixtures:load --append')
425
+ } else {
426
+ outroLines.push('')
427
+ outroLines.push('Create an admin (once the API container is healthy):')
428
+ outroLines.push(' docker compose exec php bin/console silverback:api-components:user:create --admin')
418
429
  }
419
430
 
420
431
  outro(outroLines.join('\n'))