create-rstack 1.7.3 → 1.7.5

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1571,6 +1571,11 @@ function isEmptyDir(path) {
1571
1571
  const files = node_fs.readdirSync(path);
1572
1572
  return 0 === files.length || 1 === files.length && '.git' === files[0];
1573
1573
  }
1574
+ const BUILTIN_TOOLS = [
1575
+ 'eslint',
1576
+ 'prettier',
1577
+ 'biome'
1578
+ ];
1574
1579
  function logHelpMessage(name, templates) {
1575
1580
  src_logger.log(`
1576
1581
  Usage: create-${name} [dir] [options]
@@ -1590,9 +1595,13 @@ function logHelpMessage(name, templates) {
1590
1595
  `);
1591
1596
  }
1592
1597
  async function getTools({ tools, dir, template }) {
1593
- if (tools) return Array.isArray(tools) ? tools : [
1594
- tools
1595
- ];
1598
+ if (tools) {
1599
+ let toolsArr = Array.isArray(tools) ? tools : [
1600
+ tools
1601
+ ];
1602
+ toolsArr = toolsArr.filter((tool)=>BUILTIN_TOOLS.includes(tool));
1603
+ return toolsArr;
1604
+ }
1596
1605
  if (dir && template) return [];
1597
1606
  if ('' === tools) return [];
1598
1607
  return checkCancel(await fe({
@@ -1688,8 +1697,8 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
1688
1697
  });
1689
1698
  const packageRoot = node_path.resolve(src_dirname, '..');
1690
1699
  const agentsMdSearchDirs = [
1691
- srcFolder,
1692
- commonFolder
1700
+ commonFolder,
1701
+ srcFolder
1693
1702
  ];
1694
1703
  for (const tool of tools){
1695
1704
  const toolFolder = node_path.join(packageRoot, `template-${tool}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rstack",
3
- "version": "1.7.3",
3
+ "version": "1.7.5",
4
4
  "description": "Create a new Rstack project",
5
5
  "repository": {
6
6
  "type": "git",