create-awesome-node-app 0.3.1 → 0.3.3

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.cjs CHANGED
@@ -3458,10 +3458,14 @@ var getTemplatesForCategory = async (category) => {
3458
3458
  return templates;
3459
3459
  };
3460
3460
  var getExtensionsGroupedByCategory = async (type) => {
3461
+ const safeType = Array.isArray(type) ? type : [type];
3461
3462
  const templateData = await getTemplateData();
3462
- const extensions = templateData.extensions.filter(
3463
- (extension) => extension.type === type
3464
- );
3463
+ const extensions = templateData.extensions.filter((extension) => {
3464
+ const safeExtensionType = Array.isArray(extension.type) ? extension.type : [extension.type];
3465
+ return safeExtensionType.some(
3466
+ (extensionType) => safeType.includes(extensionType)
3467
+ );
3468
+ });
3465
3469
  const extensionsGroupedByCategory = extensions.reduce((acc, extension) => {
3466
3470
  const category = extension.category;
3467
3471
  if (!acc[category]) {
@@ -3575,9 +3579,10 @@ var getCnaOptions = async (options) => {
3575
3579
  ]);
3576
3580
  appConfig.templatesOrExtensions = [];
3577
3581
  appConfig.extend = [];
3578
- const extensionsGroupedByCategory = await getExtensionsGroupedByCategory(
3579
- templateInput.template
3580
- );
3582
+ const extensionsGroupedByCategory = await getExtensionsGroupedByCategory([
3583
+ templateInput.template,
3584
+ "all"
3585
+ ]);
3581
3586
  for (const [category, extensions] of Object.entries(
3582
3587
  extensionsGroupedByCategory
3583
3588
  )) {
@@ -3639,7 +3644,7 @@ var getCnaOptions = async (options) => {
3639
3644
  // package.json
3640
3645
  var package_default = {
3641
3646
  name: "create-awesome-node-app",
3642
- version: "0.3.1",
3647
+ version: "0.3.3",
3643
3648
  type: "module",
3644
3649
  description: "Command line tool to create Node apps with a lot of different templates and extensions.",
3645
3650
  license: "MIT",
package/dist/index.js CHANGED
@@ -3464,10 +3464,14 @@ var getTemplatesForCategory = async (category) => {
3464
3464
  return templates;
3465
3465
  };
3466
3466
  var getExtensionsGroupedByCategory = async (type) => {
3467
+ const safeType = Array.isArray(type) ? type : [type];
3467
3468
  const templateData = await getTemplateData();
3468
- const extensions = templateData.extensions.filter(
3469
- (extension) => extension.type === type
3470
- );
3469
+ const extensions = templateData.extensions.filter((extension) => {
3470
+ const safeExtensionType = Array.isArray(extension.type) ? extension.type : [extension.type];
3471
+ return safeExtensionType.some(
3472
+ (extensionType) => safeType.includes(extensionType)
3473
+ );
3474
+ });
3471
3475
  const extensionsGroupedByCategory = extensions.reduce((acc, extension) => {
3472
3476
  const category = extension.category;
3473
3477
  if (!acc[category]) {
@@ -3581,9 +3585,10 @@ var getCnaOptions = async (options) => {
3581
3585
  ]);
3582
3586
  appConfig.templatesOrExtensions = [];
3583
3587
  appConfig.extend = [];
3584
- const extensionsGroupedByCategory = await getExtensionsGroupedByCategory(
3585
- templateInput.template
3586
- );
3588
+ const extensionsGroupedByCategory = await getExtensionsGroupedByCategory([
3589
+ templateInput.template,
3590
+ "all"
3591
+ ]);
3587
3592
  for (const [category, extensions] of Object.entries(
3588
3593
  extensionsGroupedByCategory
3589
3594
  )) {
@@ -3645,7 +3650,7 @@ var getCnaOptions = async (options) => {
3645
3650
  // package.json
3646
3651
  var package_default = {
3647
3652
  name: "create-awesome-node-app",
3648
- version: "0.3.1",
3653
+ version: "0.3.3",
3649
3654
  type: "module",
3650
3655
  description: "Command line tool to create Node apps with a lot of different templates and extensions.",
3651
3656
  license: "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-awesome-node-app",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "description": "Command line tool to create Node apps with a lot of different templates and extensions.",
6
6
  "license": "MIT",