create-newt-app 0.22.20 → 0.23.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.d.ts CHANGED
@@ -7,7 +7,7 @@ type Options = {
7
7
  name?: string;
8
8
  install: boolean;
9
9
  git: boolean;
10
- ci: boolean;
10
+ nonInteractive: boolean;
11
11
  shadcn: boolean;
12
12
  testing: Testing;
13
13
  database: Database;
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import chalk from "chalk";
7
7
  // package.json
8
8
  var package_default = {
9
9
  name: "create-newt-app",
10
- version: "0.22.20",
10
+ version: "0.23.0",
11
11
  license: "MIT",
12
12
  private: false,
13
13
  type: "module",
@@ -10330,6 +10330,33 @@ const nextConfig = {
10330
10330
  export default nextConfig;`
10331
10331
  };
10332
10332
 
10333
+ // src/templates/single-process-custom-server/templates/web-tsconfig.ts
10334
+ var web_tsconfig_default = {
10335
+ filename: "apps/web/tsconfig.json",
10336
+ template: `{
10337
+ "extends": "@<%= projectName %>/typescript-config/nextjs.json",
10338
+ "compilerOptions": {
10339
+ "plugins": [
10340
+ {
10341
+ "name": "next"
10342
+ }
10343
+ ],
10344
+ "strictNullChecks": true,
10345
+ "paths": {
10346
+ "@/*": ["./*"]
10347
+ }
10348
+ },
10349
+ "include": [
10350
+ "**/*.ts",
10351
+ "**/*.tsx",
10352
+ "next-env.d.ts",
10353
+ "next.config.js",
10354
+ ".next/types/**/*.ts"
10355
+ ],
10356
+ "exclude": ["node_modules", "server.ts"]
10357
+ }`
10358
+ };
10359
+
10333
10360
  // src/templates/single-process-custom-server/templates/web-tsconfig-server.ts
10334
10361
  var web_tsconfig_server_default = {
10335
10362
  filename: "apps/web/tsconfig.server.json",
@@ -10359,6 +10386,7 @@ var singleProcessCustomServer = {
10359
10386
  web_server_default,
10360
10387
  web_package_json_default,
10361
10388
  web_next_config_default,
10389
+ web_tsconfig_default,
10362
10390
  web_tsconfig_server_default
10363
10391
  ]
10364
10392
  };
@@ -10648,7 +10676,7 @@ export default nextConfig;`
10648
10676
  };
10649
10677
 
10650
10678
  // src/templates/nest-di-only/templates/web-tsconfig.ts
10651
- var web_tsconfig_default = {
10679
+ var web_tsconfig_default2 = {
10652
10680
  filename: "apps/web/tsconfig.json",
10653
10681
  template: `{
10654
10682
  "extends": "@<%= projectName %>/typescript-config/nextjs.json",
@@ -10699,7 +10727,7 @@ var nestDiOnly = {
10699
10727
  web_hello_route_default,
10700
10728
  web_package_json_default2,
10701
10729
  web_next_config_default3,
10702
- web_tsconfig_default
10730
+ web_tsconfig_default2
10703
10731
  ]
10704
10732
  };
10705
10733
  var nest_di_only_default = nestDiOnly;
@@ -11918,7 +11946,7 @@ async function doInit(options) {
11918
11946
  }
11919
11947
  })
11920
11948
  },
11921
- ...!options.ci && {
11949
+ ...!options.nonInteractive && {
11922
11950
  shadcn: () => p.confirm({
11923
11951
  message: "Use shadcn/ui?",
11924
11952
  initialValue: true
@@ -11974,13 +12002,13 @@ async function doInit(options) {
11974
12002
  process.exit(0);
11975
12003
  }
11976
12004
  });
11977
- const useShadcn = options.ci ? options.shadcn : group2.shadcn ?? true;
11978
- const testing = options.ci ? options.testing : group2.testing ?? "jest";
11979
- const database = options.ci ? options.database : group2.database ?? "sqlite";
11980
- const linter = options.ci ? options.linter : group2.linter ?? "eslint";
11981
- const deployment = options.ci ? options.deployment : group2.deployment ?? "none";
11982
- const nestDiOnly2 = options.ci ? options.nestDiOnly : group2.nestDiOnly ?? false;
11983
- const todoExample = options.ci ? !options.bare : group2.todoExample ?? true;
12005
+ const useShadcn = options.nonInteractive ? options.shadcn : group2.shadcn ?? true;
12006
+ const testing = options.nonInteractive ? options.testing : group2.testing ?? "jest";
12007
+ const database = options.nonInteractive ? options.database : group2.database ?? "sqlite";
12008
+ const linter = options.nonInteractive ? options.linter : group2.linter ?? "eslint";
12009
+ const deployment = options.nonInteractive ? options.deployment : group2.deployment ?? "none";
12010
+ const nestDiOnly2 = options.nonInteractive ? options.nestDiOnly : group2.nestDiOnly ?? false;
12011
+ const todoExample = options.nonInteractive ? !options.bare : group2.todoExample ?? true;
11984
12012
  const deploymentModule = deployment === "standalone" ? templates.deploymentStandalone : deployment === "custom-server" ? templates.deploymentCustomServer : deployment === "spa" ? templates.deploymentSpa : null;
11985
12013
  const webModule = deployment === "spa" ? {
11986
12014
  ...templates.web,
@@ -12059,14 +12087,26 @@ async function doInit(options) {
12059
12087
  }
12060
12088
  }
12061
12089
  var program = new Command();
12062
- program.name("create-newt-app").version(package_default.version).description("Create a new newt-app monorepo").argument("[name]").option("-ni, --no-install", "Skip pnpm install", true).option("-ng, --no-git", "Skip git initialization", true).option("--ci", "Non-interactive mode", false).option("--shadcn", "Include shadcn/ui (used with --ci)", false).option("--testing <framework>", "Testing framework: vitest or jest (used with --ci)", "jest").option("--database <database>", "Database: sqlite or postgres (used with --ci)", "sqlite").option("--linter <linter>", "Linter: eslint or oxc (used with --ci)", "eslint").option("--deployment <strategy>", "Deployment extras: standalone, custom-server, spa (used with --ci)", "none").option("--nest-di-only", "Use NestJS for dependency injection only (used with --ci)", false).option("--bare", "Skip the todo example (used with --ci)", false).action(
12063
- async (name, options) => {
12090
+ program.name("create-newt-app").version(package_default.version).description("Create a new newt-app monorepo").argument("[name]").option("-ni, --no-install", "Skip pnpm install", true).option("-ng, --no-git", "Skip git initialization", true).option("--shadcn", "Include shadcn/ui", false).option("--testing <framework>", "Testing framework: vitest or jest", "jest").option("--database <database>", "Database: sqlite or postgres", "sqlite").option("--linter <linter>", "Linter: eslint or oxc", "eslint").option("--deployment <strategy>", "Deployment extras: standalone, custom-server, spa", "none").option("--nest-di-only", "Use NestJS for dependency injection only", false).option("--bare", "Skip the todo example", false).action(
12091
+ async (name, options, command) => {
12064
12092
  intro(`Create a ${chalk.blue("newt")} app.`);
12093
+ const configFlags = [
12094
+ "shadcn",
12095
+ "testing",
12096
+ "database",
12097
+ "linter",
12098
+ "deployment",
12099
+ "nestDiOnly",
12100
+ "bare"
12101
+ ];
12102
+ const nonInteractive = configFlags.some(
12103
+ (flag) => command.getOptionValueSource(flag) === "cli"
12104
+ );
12065
12105
  await doInit({
12066
12106
  name,
12067
12107
  install: options.install,
12068
12108
  git: options.git,
12069
- ci: options.ci,
12109
+ nonInteractive,
12070
12110
  shadcn: options.shadcn,
12071
12111
  testing: options.testing === "vitest" ? "vitest" : "jest",
12072
12112
  database: options.database === "postgres" ? "postgres" : "sqlite",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-newt-app",
3
- "version": "0.22.20",
3
+ "version": "0.23.0",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "type": "module",