create-awesome-node-app 0.4.8 → 0.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.
package/dist/index.cjs CHANGED
@@ -3480,7 +3480,6 @@ var getExtensionsGroupedByCategory = async (type) => {
3480
3480
  // src/options.ts
3481
3481
  import_prompts.default.override(import_yargs.default.argv);
3482
3482
  var getCnaOptions = async (options) => {
3483
- var _a;
3484
3483
  const categories = await getTemplateCategories();
3485
3484
  const categoriesOptions = [
3486
3485
  ...categories.map((category) => ({
@@ -3500,21 +3499,6 @@ var getCnaOptions = async (options) => {
3500
3499
  message: `What's your project name?`,
3501
3500
  initial: options.projectName
3502
3501
  },
3503
- {
3504
- type: "select",
3505
- name: "language",
3506
- message: "What language do you want to use?",
3507
- choices: [
3508
- {
3509
- title: "JavaScript",
3510
- value: "js",
3511
- disabled: true,
3512
- description: "Wrong answer! Use TypeScript instead..."
3513
- },
3514
- { title: "TypeScript", value: "ts", description: "Correct answer! :D" }
3515
- ],
3516
- initial: 1
3517
- },
3518
3502
  {
3519
3503
  type: "select",
3520
3504
  name: "packageManager",
@@ -3536,11 +3520,11 @@ var getCnaOptions = async (options) => {
3536
3520
  ]);
3537
3521
  const templates = await getTemplatesForCategory(baseInput.category);
3538
3522
  const templateOptions = templates.map((template) => {
3539
- var _a2;
3523
+ var _a;
3540
3524
  return {
3541
3525
  title: template.name,
3542
- value: template.type,
3543
- description: template.description + " Keywords: " + ((_a2 = template.labels) == null ? void 0 : _a2.join(", "))
3526
+ value: template.url,
3527
+ description: template.description + " Keywords: " + ((_a = template.labels) == null ? void 0 : _a.join(", "))
3544
3528
  };
3545
3529
  });
3546
3530
  const templateInput = await (0, import_prompts.default)(
@@ -3568,9 +3552,9 @@ var getCnaOptions = async (options) => {
3568
3552
  ]
3569
3553
  );
3570
3554
  const existingTemplate = templates.find(
3571
- (template) => template.type === templateInput.template
3555
+ (template) => template.url === templateInput.template
3572
3556
  );
3573
- const templateTemplateOrExtension = baseInput.category === "custom" ? templateInput.template : (_a = templates.find((template) => template.type === templateInput.template)) == null ? void 0 : _a.url;
3557
+ const templateTemplateOrExtension = templateInput.template;
3574
3558
  const customOptions = (existingTemplate == null ? void 0 : existingTemplate.customOptions) || [];
3575
3559
  const appConfig = await (0, import_prompts.default)([
3576
3560
  // The following prompts are placeholders for future inputs
@@ -3603,11 +3587,11 @@ var getCnaOptions = async (options) => {
3603
3587
  name: "selected",
3604
3588
  message: `Select extensions for ${category}`,
3605
3589
  choices: extensions.map((extension) => {
3606
- var _a2;
3590
+ var _a;
3607
3591
  return {
3608
3592
  title: extension.name,
3609
3593
  value: extension.url,
3610
- description: extension.description + " Keywords: " + ((_a2 = extension.labels) == null ? void 0 : _a2.join(", "))
3594
+ description: extension.description + " Keywords: " + ((_a = extension.labels) == null ? void 0 : _a.join(", "))
3611
3595
  };
3612
3596
  }),
3613
3597
  initial: 0
@@ -3656,7 +3640,7 @@ var getCnaOptions = async (options) => {
3656
3640
  // package.json
3657
3641
  var package_default = {
3658
3642
  name: "create-awesome-node-app",
3659
- version: "0.4.8",
3643
+ version: "0.4.10",
3660
3644
  type: "module",
3661
3645
  description: "Command line tool to create Node apps with a lot of different templates and extensions.",
3662
3646
  license: "MIT",
package/dist/index.js CHANGED
@@ -3490,7 +3490,6 @@ var getExtensionsGroupedByCategory = async (type) => {
3490
3490
  // src/options.ts
3491
3491
  prompts.override(yargs.argv);
3492
3492
  var getCnaOptions = async (options) => {
3493
- var _a;
3494
3493
  const categories = await getTemplateCategories();
3495
3494
  const categoriesOptions = [
3496
3495
  ...categories.map((category) => ({
@@ -3510,21 +3509,6 @@ var getCnaOptions = async (options) => {
3510
3509
  message: `What's your project name?`,
3511
3510
  initial: options.projectName
3512
3511
  },
3513
- {
3514
- type: "select",
3515
- name: "language",
3516
- message: "What language do you want to use?",
3517
- choices: [
3518
- {
3519
- title: "JavaScript",
3520
- value: "js",
3521
- disabled: true,
3522
- description: "Wrong answer! Use TypeScript instead..."
3523
- },
3524
- { title: "TypeScript", value: "ts", description: "Correct answer! :D" }
3525
- ],
3526
- initial: 1
3527
- },
3528
3512
  {
3529
3513
  type: "select",
3530
3514
  name: "packageManager",
@@ -3546,11 +3530,11 @@ var getCnaOptions = async (options) => {
3546
3530
  ]);
3547
3531
  const templates = await getTemplatesForCategory(baseInput.category);
3548
3532
  const templateOptions = templates.map((template) => {
3549
- var _a2;
3533
+ var _a;
3550
3534
  return {
3551
3535
  title: template.name,
3552
- value: template.type,
3553
- description: template.description + " Keywords: " + ((_a2 = template.labels) == null ? void 0 : _a2.join(", "))
3536
+ value: template.url,
3537
+ description: template.description + " Keywords: " + ((_a = template.labels) == null ? void 0 : _a.join(", "))
3554
3538
  };
3555
3539
  });
3556
3540
  const templateInput = await prompts(
@@ -3578,9 +3562,9 @@ var getCnaOptions = async (options) => {
3578
3562
  ]
3579
3563
  );
3580
3564
  const existingTemplate = templates.find(
3581
- (template) => template.type === templateInput.template
3565
+ (template) => template.url === templateInput.template
3582
3566
  );
3583
- const templateTemplateOrExtension = baseInput.category === "custom" ? templateInput.template : (_a = templates.find((template) => template.type === templateInput.template)) == null ? void 0 : _a.url;
3567
+ const templateTemplateOrExtension = templateInput.template;
3584
3568
  const customOptions = (existingTemplate == null ? void 0 : existingTemplate.customOptions) || [];
3585
3569
  const appConfig = await prompts([
3586
3570
  // The following prompts are placeholders for future inputs
@@ -3613,11 +3597,11 @@ var getCnaOptions = async (options) => {
3613
3597
  name: "selected",
3614
3598
  message: `Select extensions for ${category}`,
3615
3599
  choices: extensions.map((extension) => {
3616
- var _a2;
3600
+ var _a;
3617
3601
  return {
3618
3602
  title: extension.name,
3619
3603
  value: extension.url,
3620
- description: extension.description + " Keywords: " + ((_a2 = extension.labels) == null ? void 0 : _a2.join(", "))
3604
+ description: extension.description + " Keywords: " + ((_a = extension.labels) == null ? void 0 : _a.join(", "))
3621
3605
  };
3622
3606
  }),
3623
3607
  initial: 0
@@ -3666,7 +3650,7 @@ var getCnaOptions = async (options) => {
3666
3650
  // package.json
3667
3651
  var package_default = {
3668
3652
  name: "create-awesome-node-app",
3669
- version: "0.4.8",
3653
+ version: "0.4.10",
3670
3654
  type: "module",
3671
3655
  description: "Command line tool to create Node apps with a lot of different templates and extensions.",
3672
3656
  license: "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-awesome-node-app",
3
- "version": "0.4.8",
3
+ "version": "0.4.10",
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",