create-rstack 1.7.4 → 1.7.6
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.d.ts +2 -0
- package/dist/index.js +13 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
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)
|
|
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({
|
|
@@ -1871,4 +1880,4 @@ function collectAgentsFiles(agentsMdSearchDirs) {
|
|
|
1871
1880
|
}
|
|
1872
1881
|
return agentsFiles;
|
|
1873
1882
|
}
|
|
1874
|
-
export { checkCancel, copyFolder, create, mergePackageJson, fe as multiselect, ve as select, he as text };
|
|
1883
|
+
export { BUILTIN_TOOLS, checkCancel, copyFolder, create, mergePackageJson, fe as multiselect, ve as select, he as text };
|