create-awesome-node-app 0.6.7 → 0.7.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.js CHANGED
@@ -1816,19 +1816,24 @@ var processInteractiveOptions = async (options) => {
1816
1816
  }
1817
1817
  return nextOptions;
1818
1818
  };
1819
+ var resolveInteractiveMode = (options, ci = isCI) => {
1820
+ const explicit = options.interactive;
1821
+ if (explicit === true) return true;
1822
+ if (explicit === false) return false;
1823
+ return !ci;
1824
+ };
1819
1825
  var getCnaOptions = async (options) => {
1820
- const shouldUseInteractiveMode = !isCI && options.interactive;
1826
+ const shouldUseInteractiveMode = resolveInteractiveMode(options);
1821
1827
  if (shouldUseInteractiveMode) {
1822
- return processInteractiveOptions(options);
1823
- } else {
1824
- return processNonInteractiveOptions(options);
1828
+ return processInteractiveOptions({ ...options, interactive: true });
1825
1829
  }
1830
+ return processNonInteractiveOptions(options);
1826
1831
  };
1827
1832
 
1828
1833
  // package.json
1829
1834
  var package_default = {
1830
1835
  name: "create-awesome-node-app",
1831
- version: "0.6.7",
1836
+ version: "0.7.0",
1832
1837
  type: "module",
1833
1838
  description: "Command line tool to create Node apps with a lot of different templates and extensions.",
1834
1839
  license: "MIT",
@@ -1892,6 +1897,7 @@ var package_default = {
1892
1897
  },
1893
1898
  devDependencies: {
1894
1899
  "@create-node-app/eslint-config-ts": "*",
1900
+ "@create-node-app/core": "^0.5.6",
1895
1901
  "@types/node": "^24.5.2",
1896
1902
  "@types/prompts": "^2.4.9",
1897
1903
  "@types/yargs": "^17.0.33",
@@ -1994,7 +2000,14 @@ var main = async () => {
1994
2000
  ).option(
1995
2001
  "--addons [extensions...]",
1996
2002
  "specify extensions to apply for the boilerplate generation"
1997
- ).option("--use-yarn", "use yarn instead of npm or pnpm").option("--use-pnpm", "use pnpm instead of yarn or npm").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) => {
2003
+ ).option("--use-yarn", "use yarn instead of npm or pnpm").option("--use-pnpm", "use pnpm instead of yarn or npm").option(
2004
+ "--interactive",
2005
+ "force interactive mode (default outside CI unless --no-interactive)",
2006
+ void 0
2007
+ ).option(
2008
+ "--no-interactive",
2009
+ "disable interactive mode (use only flags / non-interactive flow)"
2010
+ ).option("--list-templates", "list all available templates").option("--list-addons", "list all available addons").action((providedProjectName) => {
1998
2011
  projectName = providedProjectName || projectName;
1999
2012
  });
2000
2013
  program.parse(process.argv);