create-awesome-node-app 0.4.27 → 0.5.0
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 +35 -2
- package/dist/index.js +35 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1728,6 +1728,10 @@ var processNonInteractiveOptions = async (options) => {
|
|
|
1728
1728
|
const additionalExtensions = options.extend.filter(Boolean).map((extension) => ({ url: extension }));
|
|
1729
1729
|
templatesOrExtensions.push(...additionalExtensions);
|
|
1730
1730
|
}
|
|
1731
|
+
if (options.aiTool && !["cursor", "copilot", "none"].includes(options.aiTool)) {
|
|
1732
|
+
throw new Error("Invalid --ai-tool option. Use: cursor, copilot, or none");
|
|
1733
|
+
}
|
|
1734
|
+
options.aiTool = options.aiTool || "none";
|
|
1731
1735
|
options.templatesOrExtensions = templatesOrExtensions;
|
|
1732
1736
|
if (options.verbose) {
|
|
1733
1737
|
console.log(JSON.stringify(options, null, 2));
|
|
@@ -1774,6 +1778,30 @@ var processInteractiveOptions = async (options) => {
|
|
|
1774
1778
|
})),
|
|
1775
1779
|
initial: options.packageManager ? PACKAGE_MANAGERS.indexOf(options.packageManager) : 0
|
|
1776
1780
|
},
|
|
1781
|
+
{
|
|
1782
|
+
type: "select",
|
|
1783
|
+
name: "aiTool",
|
|
1784
|
+
message: "Which AI coding tool would you like to configure?",
|
|
1785
|
+
choices: [
|
|
1786
|
+
{
|
|
1787
|
+
title: "Cursor Rules",
|
|
1788
|
+
value: "cursor",
|
|
1789
|
+
description: "Add .cursorrules configuration for Cursor IDE"
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
title: "GitHub Copilot Instructions",
|
|
1793
|
+
value: "copilot",
|
|
1794
|
+
description: "Add .github/copilot-instructions.md for GitHub Copilot"
|
|
1795
|
+
},
|
|
1796
|
+
{
|
|
1797
|
+
title: "None",
|
|
1798
|
+
value: "none",
|
|
1799
|
+
description: "Don't add any AI tool configuration"
|
|
1800
|
+
}
|
|
1801
|
+
],
|
|
1802
|
+
initial: 2
|
|
1803
|
+
// Default to "None"
|
|
1804
|
+
},
|
|
1777
1805
|
{
|
|
1778
1806
|
type: "select",
|
|
1779
1807
|
name: "category",
|
|
@@ -1887,6 +1915,8 @@ var processInteractiveOptions = async (options) => {
|
|
|
1887
1915
|
}
|
|
1888
1916
|
const { ...nextAppOptions } = {
|
|
1889
1917
|
extend: [],
|
|
1918
|
+
aiTool: "none",
|
|
1919
|
+
// Default value
|
|
1890
1920
|
...options,
|
|
1891
1921
|
...baseInput,
|
|
1892
1922
|
...templateInput,
|
|
@@ -1915,7 +1945,7 @@ var getCnaOptions = async (options) => {
|
|
|
1915
1945
|
// package.json
|
|
1916
1946
|
var package_default = {
|
|
1917
1947
|
name: "create-awesome-node-app",
|
|
1918
|
-
version: "0.
|
|
1948
|
+
version: "0.5.0",
|
|
1919
1949
|
type: "module",
|
|
1920
1950
|
description: "Command line tool to create Node apps with a lot of different templates and extensions.",
|
|
1921
1951
|
license: "MIT",
|
|
@@ -2069,7 +2099,10 @@ var main = async () => {
|
|
|
2069
2099
|
).option(
|
|
2070
2100
|
"--addons [extensions...]",
|
|
2071
2101
|
"specify extensions to apply for the boilerplate generation"
|
|
2072
|
-
).option("--use-yarn", "use yarn instead of npm or pnpm").option("--use-pnpm", "use pnpm instead of yarn or npm").option(
|
|
2102
|
+
).option("--use-yarn", "use yarn instead of npm or pnpm").option("--use-pnpm", "use pnpm instead of yarn or npm").option(
|
|
2103
|
+
"--ai-tool <tool>",
|
|
2104
|
+
"specify AI tool configuration (cursor, copilot, none)"
|
|
2105
|
+
).option("--interactive", "run in interactive mode to select options", false).option("--list-templates", "list all available templates").option("--list-addons", "list all available addons").action((providedProjectName) => {
|
|
2073
2106
|
projectName = providedProjectName || projectName;
|
|
2074
2107
|
});
|
|
2075
2108
|
program.parse(process.argv);
|
package/dist/index.js
CHANGED
|
@@ -1738,6 +1738,10 @@ var processNonInteractiveOptions = async (options) => {
|
|
|
1738
1738
|
const additionalExtensions = options.extend.filter(Boolean).map((extension) => ({ url: extension }));
|
|
1739
1739
|
templatesOrExtensions.push(...additionalExtensions);
|
|
1740
1740
|
}
|
|
1741
|
+
if (options.aiTool && !["cursor", "copilot", "none"].includes(options.aiTool)) {
|
|
1742
|
+
throw new Error("Invalid --ai-tool option. Use: cursor, copilot, or none");
|
|
1743
|
+
}
|
|
1744
|
+
options.aiTool = options.aiTool || "none";
|
|
1741
1745
|
options.templatesOrExtensions = templatesOrExtensions;
|
|
1742
1746
|
if (options.verbose) {
|
|
1743
1747
|
console.log(JSON.stringify(options, null, 2));
|
|
@@ -1784,6 +1788,30 @@ var processInteractiveOptions = async (options) => {
|
|
|
1784
1788
|
})),
|
|
1785
1789
|
initial: options.packageManager ? PACKAGE_MANAGERS.indexOf(options.packageManager) : 0
|
|
1786
1790
|
},
|
|
1791
|
+
{
|
|
1792
|
+
type: "select",
|
|
1793
|
+
name: "aiTool",
|
|
1794
|
+
message: "Which AI coding tool would you like to configure?",
|
|
1795
|
+
choices: [
|
|
1796
|
+
{
|
|
1797
|
+
title: "Cursor Rules",
|
|
1798
|
+
value: "cursor",
|
|
1799
|
+
description: "Add .cursorrules configuration for Cursor IDE"
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
title: "GitHub Copilot Instructions",
|
|
1803
|
+
value: "copilot",
|
|
1804
|
+
description: "Add .github/copilot-instructions.md for GitHub Copilot"
|
|
1805
|
+
},
|
|
1806
|
+
{
|
|
1807
|
+
title: "None",
|
|
1808
|
+
value: "none",
|
|
1809
|
+
description: "Don't add any AI tool configuration"
|
|
1810
|
+
}
|
|
1811
|
+
],
|
|
1812
|
+
initial: 2
|
|
1813
|
+
// Default to "None"
|
|
1814
|
+
},
|
|
1787
1815
|
{
|
|
1788
1816
|
type: "select",
|
|
1789
1817
|
name: "category",
|
|
@@ -1897,6 +1925,8 @@ var processInteractiveOptions = async (options) => {
|
|
|
1897
1925
|
}
|
|
1898
1926
|
const { ...nextAppOptions } = {
|
|
1899
1927
|
extend: [],
|
|
1928
|
+
aiTool: "none",
|
|
1929
|
+
// Default value
|
|
1900
1930
|
...options,
|
|
1901
1931
|
...baseInput,
|
|
1902
1932
|
...templateInput,
|
|
@@ -1925,7 +1955,7 @@ var getCnaOptions = async (options) => {
|
|
|
1925
1955
|
// package.json
|
|
1926
1956
|
var package_default = {
|
|
1927
1957
|
name: "create-awesome-node-app",
|
|
1928
|
-
version: "0.
|
|
1958
|
+
version: "0.5.0",
|
|
1929
1959
|
type: "module",
|
|
1930
1960
|
description: "Command line tool to create Node apps with a lot of different templates and extensions.",
|
|
1931
1961
|
license: "MIT",
|
|
@@ -2079,7 +2109,10 @@ var main = async () => {
|
|
|
2079
2109
|
).option(
|
|
2080
2110
|
"--addons [extensions...]",
|
|
2081
2111
|
"specify extensions to apply for the boilerplate generation"
|
|
2082
|
-
).option("--use-yarn", "use yarn instead of npm or pnpm").option("--use-pnpm", "use pnpm instead of yarn or npm").option(
|
|
2112
|
+
).option("--use-yarn", "use yarn instead of npm or pnpm").option("--use-pnpm", "use pnpm instead of yarn or npm").option(
|
|
2113
|
+
"--ai-tool <tool>",
|
|
2114
|
+
"specify AI tool configuration (cursor, copilot, none)"
|
|
2115
|
+
).option("--interactive", "run in interactive mode to select options", false).option("--list-templates", "list all available templates").option("--list-addons", "list all available addons").action((providedProjectName) => {
|
|
2083
2116
|
projectName = providedProjectName || projectName;
|
|
2084
2117
|
});
|
|
2085
2118
|
program.parse(process.argv);
|