create-awesome-node-app 0.4.9 → 0.4.11

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) => ({
@@ -3521,11 +3520,11 @@ var getCnaOptions = async (options) => {
3521
3520
  ]);
3522
3521
  const templates = await getTemplatesForCategory(baseInput.category);
3523
3522
  const templateOptions = templates.map((template) => {
3524
- var _a2;
3523
+ var _a;
3525
3524
  return {
3526
3525
  title: template.name,
3527
- value: template.type,
3528
- 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(", "))
3529
3528
  };
3530
3529
  });
3531
3530
  const templateInput = await (0, import_prompts.default)(
@@ -3553,9 +3552,9 @@ var getCnaOptions = async (options) => {
3553
3552
  ]
3554
3553
  );
3555
3554
  const existingTemplate = templates.find(
3556
- (template) => template.type === templateInput.template
3555
+ (template) => template.url === templateInput.template
3557
3556
  );
3558
- 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;
3559
3558
  const customOptions = (existingTemplate == null ? void 0 : existingTemplate.customOptions) || [];
3560
3559
  const appConfig = await (0, import_prompts.default)([
3561
3560
  // The following prompts are placeholders for future inputs
@@ -3577,7 +3576,7 @@ var getCnaOptions = async (options) => {
3577
3576
  appConfig.templatesOrExtensions = [];
3578
3577
  appConfig.extend = [];
3579
3578
  const extensionsGroupedByCategory = await getExtensionsGroupedByCategory([
3580
- templateInput.template,
3579
+ (existingTemplate == null ? void 0 : existingTemplate.type) || "custom",
3581
3580
  "all"
3582
3581
  ]);
3583
3582
  for (const [category, extensions] of Object.entries(
@@ -3588,11 +3587,11 @@ var getCnaOptions = async (options) => {
3588
3587
  name: "selected",
3589
3588
  message: `Select extensions for ${category}`,
3590
3589
  choices: extensions.map((extension) => {
3591
- var _a2;
3590
+ var _a;
3592
3591
  return {
3593
3592
  title: extension.name,
3594
3593
  value: extension.url,
3595
- 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(", "))
3596
3595
  };
3597
3596
  }),
3598
3597
  initial: 0
@@ -3641,7 +3640,7 @@ var getCnaOptions = async (options) => {
3641
3640
  // package.json
3642
3641
  var package_default = {
3643
3642
  name: "create-awesome-node-app",
3644
- version: "0.4.9",
3643
+ version: "0.4.11",
3645
3644
  type: "module",
3646
3645
  description: "Command line tool to create Node apps with a lot of different templates and extensions.",
3647
3646
  license: "MIT",
@@ -3681,7 +3680,7 @@ var package_default = {
3681
3680
  scripts: {
3682
3681
  build: "tsup src/index.ts --format cjs,esm --dts",
3683
3682
  dev: "tsup src/index.ts --watch --format cjs,esm --dts",
3684
- typecheck: "tsc --noEmit",
3683
+ "type-check": "tsc --noEmit",
3685
3684
  lint: "eslint .",
3686
3685
  "lint:fix": "eslint . --fix"
3687
3686
  },
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) => ({
@@ -3531,11 +3530,11 @@ var getCnaOptions = async (options) => {
3531
3530
  ]);
3532
3531
  const templates = await getTemplatesForCategory(baseInput.category);
3533
3532
  const templateOptions = templates.map((template) => {
3534
- var _a2;
3533
+ var _a;
3535
3534
  return {
3536
3535
  title: template.name,
3537
- value: template.type,
3538
- 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(", "))
3539
3538
  };
3540
3539
  });
3541
3540
  const templateInput = await prompts(
@@ -3563,9 +3562,9 @@ var getCnaOptions = async (options) => {
3563
3562
  ]
3564
3563
  );
3565
3564
  const existingTemplate = templates.find(
3566
- (template) => template.type === templateInput.template
3565
+ (template) => template.url === templateInput.template
3567
3566
  );
3568
- 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;
3569
3568
  const customOptions = (existingTemplate == null ? void 0 : existingTemplate.customOptions) || [];
3570
3569
  const appConfig = await prompts([
3571
3570
  // The following prompts are placeholders for future inputs
@@ -3587,7 +3586,7 @@ var getCnaOptions = async (options) => {
3587
3586
  appConfig.templatesOrExtensions = [];
3588
3587
  appConfig.extend = [];
3589
3588
  const extensionsGroupedByCategory = await getExtensionsGroupedByCategory([
3590
- templateInput.template,
3589
+ (existingTemplate == null ? void 0 : existingTemplate.type) || "custom",
3591
3590
  "all"
3592
3591
  ]);
3593
3592
  for (const [category, extensions] of Object.entries(
@@ -3598,11 +3597,11 @@ var getCnaOptions = async (options) => {
3598
3597
  name: "selected",
3599
3598
  message: `Select extensions for ${category}`,
3600
3599
  choices: extensions.map((extension) => {
3601
- var _a2;
3600
+ var _a;
3602
3601
  return {
3603
3602
  title: extension.name,
3604
3603
  value: extension.url,
3605
- 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(", "))
3606
3605
  };
3607
3606
  }),
3608
3607
  initial: 0
@@ -3651,7 +3650,7 @@ var getCnaOptions = async (options) => {
3651
3650
  // package.json
3652
3651
  var package_default = {
3653
3652
  name: "create-awesome-node-app",
3654
- version: "0.4.9",
3653
+ version: "0.4.11",
3655
3654
  type: "module",
3656
3655
  description: "Command line tool to create Node apps with a lot of different templates and extensions.",
3657
3656
  license: "MIT",
@@ -3691,7 +3690,7 @@ var package_default = {
3691
3690
  scripts: {
3692
3691
  build: "tsup src/index.ts --format cjs,esm --dts",
3693
3692
  dev: "tsup src/index.ts --watch --format cjs,esm --dts",
3694
- typecheck: "tsc --noEmit",
3693
+ "type-check": "tsc --noEmit",
3695
3694
  lint: "eslint .",
3696
3695
  "lint:fix": "eslint . --fix"
3697
3696
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-awesome-node-app",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
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",
@@ -40,7 +40,7 @@
40
40
  "scripts": {
41
41
  "build": "tsup src/index.ts --format cjs,esm --dts",
42
42
  "dev": "tsup src/index.ts --watch --format cjs,esm --dts",
43
- "typecheck": "tsc --noEmit",
43
+ "type-check": "tsc --noEmit",
44
44
  "lint": "eslint .",
45
45
  "lint:fix": "eslint . --fix"
46
46
  },