create-cwa 2.0.0-alpha.19 → 2.0.0-alpha.20

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
@@ -184,11 +184,13 @@ docker compose exec php bin/console doctrine:fixtures:load --append
184
184
  `
185
185
  : `## Admin account
186
186
 
187
- The database starts empty. Create an admin once the API container is healthy:
187
+ No sample content is bundled. Create the admin (\`ADMIN_USERNAME\` / \`ADMIN_PASSWORD\` / \`ADMIN_EMAIL\`, default \`admin\` / \`admin\`) once the API container is healthy:
188
188
 
189
189
  \`\`\`bash
190
- docker compose exec php bin/console silverback:api-components:user:create --admin
190
+ docker compose exec php bin/console doctrine:fixtures:load --append
191
191
  \`\`\`
192
+
193
+ Or create one by hand: \`docker compose exec php bin/console silverback:api-components:user:create --admin\`.
192
194
  `;
193
195
  const readme = `# ${answers.projectName}
194
196
 
@@ -271,7 +273,8 @@ async function main() {
271
273
  }
272
274
  }
273
275
  if (!answers.fixtures) {
274
- await removeExcluded(tempDir, ['api/src/DataFixtures/']);
276
+ // Sample content only: UsersFixture stays, so the admin is still created from ADMIN_* (#142).
277
+ await removeExcluded(tempDir, ['api/src/DataFixtures/AppScaffold.php', 'api/src/DataFixtures/Parts/']);
275
278
  }
276
279
  await processNuxtConfig(tempDir, answers.features);
277
280
  await replaceProjectName(tempDir, answers.projectName);
@@ -347,8 +350,8 @@ async function main() {
347
350
  }
348
351
  else {
349
352
  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');
353
+ outroLines.push('Create the admin from ADMIN_* (once the API container is healthy):');
354
+ outroLines.push(' docker compose exec php bin/console doctrine:fixtures:load --append');
352
355
  }
353
356
  outro(outroLines.join('\n'));
354
357
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cwa",
3
- "version": "2.0.0-alpha.19",
3
+ "version": "2.0.0-alpha.20",
4
4
  "description": "Create a new CWA (Components Web App) project",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -238,11 +238,13 @@ docker compose exec php bin/console doctrine:fixtures:load --append
238
238
  `
239
239
  : `## Admin account
240
240
 
241
- The database starts empty. Create an admin once the API container is healthy:
241
+ No sample content is bundled. Create the admin (\`ADMIN_USERNAME\` / \`ADMIN_PASSWORD\` / \`ADMIN_EMAIL\`, default \`admin\` / \`admin\`) once the API container is healthy:
242
242
 
243
243
  \`\`\`bash
244
- docker compose exec php bin/console silverback:api-components:user:create --admin
244
+ docker compose exec php bin/console doctrine:fixtures:load --append
245
245
  \`\`\`
246
+
247
+ Or create one by hand: \`docker compose exec php bin/console silverback:api-components:user:create --admin\`.
246
248
  `
247
249
 
248
250
  const readme = `# ${answers.projectName}
@@ -336,7 +338,8 @@ async function main(): Promise<void> {
336
338
  }
337
339
 
338
340
  if (!answers.fixtures) {
339
- await removeExcluded(tempDir, ['api/src/DataFixtures/'])
341
+ // Sample content only: UsersFixture stays, so the admin is still created from ADMIN_* (#142).
342
+ await removeExcluded(tempDir, ['api/src/DataFixtures/AppScaffold.php', 'api/src/DataFixtures/Parts/'])
340
343
  }
341
344
 
342
345
  await processNuxtConfig(tempDir, answers.features)
@@ -424,8 +427,8 @@ async function main(): Promise<void> {
424
427
  outroLines.push(' docker compose exec php bin/console doctrine:fixtures:load --append')
425
428
  } else {
426
429
  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')
430
+ outroLines.push('Create the admin from ADMIN_* (once the API container is healthy):')
431
+ outroLines.push(' docker compose exec php bin/console doctrine:fixtures:load --append')
429
432
  }
430
433
 
431
434
  outro(outroLines.join('\n'))
package/.gitignore DELETED
@@ -1,2 +0,0 @@
1
- dist/
2
- node_modules/