create-newt-app 0.35.6 → 0.36.1
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/README.md +2 -0
- package/dist/index.js +235 -194
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
npm create newt-app
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
<img src="https://raw.githubusercontent.com/zeevo/newt-app/main/.github/assets/demo.gif" alt="npm create newt-app walking through its prompts" width="700">
|
|
21
|
+
|
|
20
22
|
Next.js and NestJS in one production-grade monorepo: a real backend, auth, and a database, curated so you're not deleting half of it on day one.
|
|
21
23
|
|
|
22
24
|
## Options
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { existsSync, promises, readdirSync } from "fs";
|
|
|
11
11
|
import path from "path";
|
|
12
12
|
import https from "node:https";
|
|
13
13
|
//#region package.json
|
|
14
|
-
var version = "0.
|
|
14
|
+
var version = "0.36.1";
|
|
15
15
|
var engines = { "node": ">=24.0.0" };
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/templates/root/index.ts
|
|
@@ -304,13 +304,11 @@ After making changes, run \`pnpm lint:check\` and fix all errors.<% } %>
|
|
|
304
304
|
}
|
|
305
305
|
] };
|
|
306
306
|
//#endregion
|
|
307
|
-
//#region src/templates/web/
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
filename: "apps/web/package.json",
|
|
313
|
-
template: `{
|
|
307
|
+
//#region src/templates/web/templates/package-json.ts
|
|
308
|
+
var package_json_default$7 = {
|
|
309
|
+
when: (s) => s.nest !== "di-only" && !s.stylex,
|
|
310
|
+
filename: "apps/web/package.json",
|
|
311
|
+
template: `{
|
|
314
312
|
"name": "web",
|
|
315
313
|
"version": "0.1.0",
|
|
316
314
|
"type": "module",
|
|
@@ -342,10 +340,12 @@ const web$1 = {
|
|
|
342
340
|
"typescript": "<%= versions.typescript %>"
|
|
343
341
|
}
|
|
344
342
|
}`
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
343
|
+
};
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region src/templates/web/templates/gitignore.ts
|
|
346
|
+
var gitignore_default = {
|
|
347
|
+
filename: "apps/web/.gitignore",
|
|
348
|
+
template: `# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
349
349
|
|
|
350
350
|
# dependencies
|
|
351
351
|
/node_modules
|
|
@@ -381,11 +381,13 @@ yarn-error.log*
|
|
|
381
381
|
# typescript
|
|
382
382
|
*.tsbuildinfo
|
|
383
383
|
next-env.d.ts`
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
384
|
+
};
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region src/templates/web/templates/next-config.ts
|
|
387
|
+
var next_config_default$2 = {
|
|
388
|
+
when: (s) => s.deployment === "none" && s.nest === "on",
|
|
389
|
+
filename: "apps/web/next.config.js",
|
|
390
|
+
template: `import dotenv from 'dotenv';
|
|
389
391
|
import { resolve } from 'path';
|
|
390
392
|
|
|
391
393
|
// Load root .env first, then local .env (local takes precedence)
|
|
@@ -405,16 +407,20 @@ const nextConfig = {
|
|
|
405
407
|
};
|
|
406
408
|
|
|
407
409
|
export default nextConfig;`
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
410
|
+
};
|
|
411
|
+
//#endregion
|
|
412
|
+
//#region src/templates/web/templates/postcss-config.ts
|
|
413
|
+
var postcss_config_default$3 = {
|
|
414
|
+
when: (s) => !s.stylex,
|
|
415
|
+
filename: "apps/web/postcss.config.mjs",
|
|
416
|
+
template: `export { default } from "@<%= projectName %>/ui/postcss.config";`
|
|
417
|
+
};
|
|
418
|
+
//#endregion
|
|
419
|
+
//#region src/templates/web/templates/tsconfig.ts
|
|
420
|
+
var tsconfig_default$5 = {
|
|
421
|
+
when: (s) => s.nest !== "di-only",
|
|
422
|
+
filename: "apps/web/tsconfig.json",
|
|
423
|
+
template: `{
|
|
418
424
|
"extends": "@<%= projectName %>/typescript-config/nextjs.json",
|
|
419
425
|
"compilerOptions": {
|
|
420
426
|
"plugins": [
|
|
@@ -436,11 +442,13 @@ export default nextConfig;`
|
|
|
436
442
|
],
|
|
437
443
|
"exclude": ["node_modules"]
|
|
438
444
|
}`
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
445
|
+
};
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region src/templates/web/templates/layout.ts
|
|
448
|
+
var layout_default$2 = {
|
|
449
|
+
when: (s) => !s.shadcn && !s.stylex,
|
|
450
|
+
filename: "apps/web/app/layout.tsx",
|
|
451
|
+
template: `import type { Metadata } from "next";
|
|
444
452
|
import localFont from "next/font/local";
|
|
445
453
|
import Providers from "@/app/providers";
|
|
446
454
|
import "@<%= projectName %>/ui/globals.css";
|
|
@@ -483,11 +491,13 @@ export default function RootLayout({
|
|
|
483
491
|
</html>
|
|
484
492
|
);
|
|
485
493
|
}`
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
494
|
+
};
|
|
495
|
+
//#endregion
|
|
496
|
+
//#region src/templates/web/templates/page.ts
|
|
497
|
+
var page_default$2 = {
|
|
498
|
+
when: (s) => !s.todoExample && !s.shadcn && !s.stylex,
|
|
499
|
+
filename: "apps/web/app/page.tsx",
|
|
500
|
+
template: `'use client';
|
|
491
501
|
|
|
492
502
|
import { useQuery } from '@tanstack/react-query';
|
|
493
503
|
import { authClient } from '@/lib/auth-client';
|
|
@@ -595,11 +605,13 @@ export default function Home() {
|
|
|
595
605
|
</main>
|
|
596
606
|
);
|
|
597
607
|
}`
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
608
|
+
};
|
|
609
|
+
//#endregion
|
|
610
|
+
//#region src/templates/web/templates/providers.ts
|
|
611
|
+
var providers_default$1 = {
|
|
612
|
+
when: (s) => !s.shadcn,
|
|
613
|
+
filename: "apps/web/app/providers.tsx",
|
|
614
|
+
template: `'use client';
|
|
603
615
|
|
|
604
616
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
605
617
|
import { useState } from 'react';
|
|
@@ -608,11 +620,13 @@ export default function Providers({ children }: { children: React.ReactNode }) {
|
|
|
608
620
|
const [client] = useState(() => new QueryClient());
|
|
609
621
|
return <QueryClientProvider client={client}>{children}</QueryClientProvider>;
|
|
610
622
|
}`
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
623
|
+
};
|
|
624
|
+
//#endregion
|
|
625
|
+
//#region src/templates/web/templates/auth-form.ts
|
|
626
|
+
var auth_form_default$2 = {
|
|
627
|
+
when: (s) => !s.shadcn && !s.stylex,
|
|
628
|
+
filename: "apps/web/app/auth-form.tsx",
|
|
629
|
+
template: `'use client';
|
|
616
630
|
|
|
617
631
|
import { useForm } from '@tanstack/react-form';
|
|
618
632
|
import { useState } from 'react';
|
|
@@ -740,23 +754,29 @@ export function AuthForm() {
|
|
|
740
754
|
</>
|
|
741
755
|
);
|
|
742
756
|
}`
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
757
|
+
};
|
|
758
|
+
//#endregion
|
|
759
|
+
//#region src/templates/web/templates/auth-route.ts
|
|
760
|
+
var auth_route_default = {
|
|
761
|
+
filename: "apps/web/app/api/auth/[...all]/route.ts",
|
|
762
|
+
template: `import { auth } from "@<%= projectName %>/auth";
|
|
747
763
|
import { toNextJsHandler } from "better-auth/next-js";
|
|
748
764
|
|
|
749
765
|
export const { GET, POST } = toNextJsHandler(auth);`
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
766
|
+
};
|
|
767
|
+
//#endregion
|
|
768
|
+
//#region src/templates/web/templates/auth-client.ts
|
|
769
|
+
var auth_client_default = {
|
|
770
|
+
filename: "apps/web/lib/auth-client.ts",
|
|
771
|
+
template: `import { createAuthClient } from "better-auth/react";
|
|
754
772
|
|
|
755
773
|
export const authClient = createAuthClient();`
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
774
|
+
};
|
|
775
|
+
//#endregion
|
|
776
|
+
//#region src/templates/web/templates/manifest.ts
|
|
777
|
+
var manifest_default = {
|
|
778
|
+
filename: "apps/web/app/manifest.json",
|
|
779
|
+
template: `{
|
|
760
780
|
"name": "<%= projectName %>",
|
|
761
781
|
"short_name": "<%= projectName %>",
|
|
762
782
|
"icons": [
|
|
@@ -777,7 +797,109 @@ export const authClient = createAuthClient();`
|
|
|
777
797
|
"background_color": "#ffffff",
|
|
778
798
|
"display": "standalone"
|
|
779
799
|
}`
|
|
780
|
-
|
|
800
|
+
};
|
|
801
|
+
//#endregion
|
|
802
|
+
//#region src/templates/versions.ts
|
|
803
|
+
const versions = {
|
|
804
|
+
"@babel/plugin-proposal-decorators": "^8.0.2",
|
|
805
|
+
"@babel/plugin-transform-class-properties": "^8.0.1",
|
|
806
|
+
"@base-ui/react": "^1.6.0",
|
|
807
|
+
"@eslint/js": "^9.39.1",
|
|
808
|
+
"@nestjs/cli": "^12.0.7",
|
|
809
|
+
"@nestjs/common": "^12.1.0",
|
|
810
|
+
"@nestjs/core": "^12.1.0",
|
|
811
|
+
"@nestjs/platform-express": "^12.1.0",
|
|
812
|
+
"@nestjs/schematics": "^12.0.5",
|
|
813
|
+
"@nestjs/serve-static": "^12.0.0",
|
|
814
|
+
"@nestjs/testing": "^12.1.0",
|
|
815
|
+
"@next/eslint-plugin-next": "^16.4.0",
|
|
816
|
+
"@oxlint/plugins": "^1.74.0",
|
|
817
|
+
"@shadcn/lint": "^0.1.0",
|
|
818
|
+
"@shadcn/react": "^0.2.1",
|
|
819
|
+
"@stylexjs/babel-plugin": "0.19.0",
|
|
820
|
+
"@stylexjs/postcss-plugin": "0.19.0",
|
|
821
|
+
"@stylexjs/stylex": "0.19.0",
|
|
822
|
+
"@swc/core": "^1.10.0",
|
|
823
|
+
"@tailwindcss/postcss": "^4.2.1",
|
|
824
|
+
"@tanstack/react-form": "^1.28.5",
|
|
825
|
+
"@tanstack/react-query": "^5.90.21",
|
|
826
|
+
"@thallesp/nestjs-better-auth": "^2.8.0",
|
|
827
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
828
|
+
"@types/express": "^5.0.0",
|
|
829
|
+
"@types/jest": "^30.0.0",
|
|
830
|
+
"@types/node": "^24.13.3",
|
|
831
|
+
"@types/pg": "^8.11.13",
|
|
832
|
+
"@types/react": "19.2.14",
|
|
833
|
+
"@types/react-dom": "19.2.3",
|
|
834
|
+
"@types/supertest": "^6.0.2",
|
|
835
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
836
|
+
auth: "^1.5.5",
|
|
837
|
+
"babel-plugin-transform-typescript-metadata": "^0.4.0",
|
|
838
|
+
"better-auth": "^1.2.8",
|
|
839
|
+
"better-sqlite3": "^12.11.1",
|
|
840
|
+
"class-variance-authority": "^0.7.1",
|
|
841
|
+
clsx: "^2.1.1",
|
|
842
|
+
cmdk: "^1.1.1",
|
|
843
|
+
cn: "^0.3.0",
|
|
844
|
+
"date-fns": "^4.2.1",
|
|
845
|
+
dotenv: "^17.3.1",
|
|
846
|
+
"dotenv-cli": "^11.0.0",
|
|
847
|
+
"embla-carousel-react": "^8.6.0",
|
|
848
|
+
eslint: "^9.39.1",
|
|
849
|
+
"eslint-config-prettier": "^10.1.1",
|
|
850
|
+
"eslint-plugin-only-warn": "^1.1.0",
|
|
851
|
+
"eslint-plugin-react": "^7.37.5",
|
|
852
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
853
|
+
"eslint-plugin-turbo": "^2.7.1",
|
|
854
|
+
globals: "^16.5.0",
|
|
855
|
+
"input-otp": "^1.4.2",
|
|
856
|
+
jest: "^30.0.0",
|
|
857
|
+
kysely: "^0.28.2",
|
|
858
|
+
"lucide-react": "^1.16.0",
|
|
859
|
+
next: "16.4.0",
|
|
860
|
+
"next-themes": "^0.4.6",
|
|
861
|
+
oxfmt: "^0.59.0",
|
|
862
|
+
oxlint: "^1.80.0",
|
|
863
|
+
pg: "^8.14.1",
|
|
864
|
+
prettier: "^3.7.4",
|
|
865
|
+
react: "^19.2.4",
|
|
866
|
+
"react-day-picker": "^10.0.1",
|
|
867
|
+
"react-dom": "^19.2.4",
|
|
868
|
+
"react-resizable-panels": "^4.11.1",
|
|
869
|
+
recharts: "^3.8.0",
|
|
870
|
+
"reflect-metadata": "^0.2.2",
|
|
871
|
+
rxjs: "^7.8.1",
|
|
872
|
+
shadcn: "^4.7.0",
|
|
873
|
+
sonner: "^2.0.7",
|
|
874
|
+
supertest: "^7.0.0",
|
|
875
|
+
"tailwind-merge": "^3.6.0",
|
|
876
|
+
tailwindcss: "^4.2.1",
|
|
877
|
+
"ts-jest": "^29.2.5",
|
|
878
|
+
tsx: "^4.19.4",
|
|
879
|
+
turbo: "^2.8.16",
|
|
880
|
+
"tw-animate-css": "^1.4.0",
|
|
881
|
+
typescript: "6.0.2",
|
|
882
|
+
"typescript-eslint": "^8.50.0",
|
|
883
|
+
"unplugin-swc": "^1.5.9",
|
|
884
|
+
vitest: "^4.1.10",
|
|
885
|
+
zod: "^4.6.5"
|
|
886
|
+
};
|
|
887
|
+
//#endregion
|
|
888
|
+
//#region src/templates/web/index.ts
|
|
889
|
+
const web$1 = {
|
|
890
|
+
templates: [
|
|
891
|
+
package_json_default$7,
|
|
892
|
+
gitignore_default,
|
|
893
|
+
next_config_default$2,
|
|
894
|
+
postcss_config_default$3,
|
|
895
|
+
tsconfig_default$5,
|
|
896
|
+
layout_default$2,
|
|
897
|
+
page_default$2,
|
|
898
|
+
providers_default$1,
|
|
899
|
+
auth_form_default$2,
|
|
900
|
+
auth_route_default,
|
|
901
|
+
auth_client_default,
|
|
902
|
+
manifest_default
|
|
781
903
|
],
|
|
782
904
|
staticFiles: [
|
|
783
905
|
{
|
|
@@ -812,15 +934,21 @@ export const authClient = createAuthClient();`
|
|
|
812
934
|
src: "web/static/public/web-app-manifest-512x512.png",
|
|
813
935
|
filename: "apps/web/public/web-app-manifest-512x512.png"
|
|
814
936
|
}
|
|
815
|
-
]
|
|
937
|
+
],
|
|
938
|
+
packages: [{
|
|
939
|
+
package: "zod",
|
|
940
|
+
module: "apps/web",
|
|
941
|
+
version: versions.zod
|
|
942
|
+
}]
|
|
816
943
|
};
|
|
817
944
|
//#endregion
|
|
818
945
|
//#region src/templates/api/index.ts
|
|
819
|
-
const api$1 = {
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
946
|
+
const api$1 = {
|
|
947
|
+
templates: [
|
|
948
|
+
{
|
|
949
|
+
when: (s) => s.nest === "on" && s.deployment !== "spa",
|
|
950
|
+
filename: "apps/api/package.json",
|
|
951
|
+
template: `{
|
|
824
952
|
"name": "api",
|
|
825
953
|
"version": "0.0.1",
|
|
826
954
|
"private": true,
|
|
@@ -854,10 +982,10 @@ const api$1 = { templates: [
|
|
|
854
982
|
"typescript": "<%= versions.typescript %>"
|
|
855
983
|
}
|
|
856
984
|
}`
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
filename: "apps/api/nest-cli.json",
|
|
988
|
+
template: `{
|
|
861
989
|
"$schema": "https://json.schemastore.org/nest-cli",
|
|
862
990
|
"collection": "@nestjs/schematics",
|
|
863
991
|
"sourceRoot": "src",
|
|
@@ -865,11 +993,11 @@ const api$1 = { templates: [
|
|
|
865
993
|
"deleteOutDir": true
|
|
866
994
|
}
|
|
867
995
|
}`
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
when: (s) => s.nest === "on",
|
|
999
|
+
filename: "apps/api/tsconfig.json",
|
|
1000
|
+
template: `{
|
|
873
1001
|
"compilerOptions": {
|
|
874
1002
|
"module": "nodenext",
|
|
875
1003
|
"moduleResolution": "nodenext",
|
|
@@ -893,28 +1021,28 @@ const api$1 = { templates: [
|
|
|
893
1021
|
},
|
|
894
1022
|
"exclude": ["vitest.config.mts", "vitest.config.e2e.mts", "node_modules", "dist"]
|
|
895
1023
|
}`
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
filename: "apps/api/tsconfig.build.json",
|
|
1027
|
+
template: `{
|
|
900
1028
|
"extends": "./tsconfig.json",
|
|
901
1029
|
"exclude": ["node_modules", "test", "dist", "**/*spec.ts", "vitest.config.mts", "vitest.config.e2e.mts", "jest.config.ts"]
|
|
902
1030
|
}`
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
when: (s) => s.nest === "di-only" && !s.todoExample,
|
|
1034
|
+
filename: "apps/api/src/app.module.ts",
|
|
1035
|
+
template: `import { Module } from '@nestjs/common';
|
|
908
1036
|
import { AppService } from './app.service';
|
|
909
1037
|
|
|
910
1038
|
@Module({
|
|
911
1039
|
providers: [AppService],
|
|
912
1040
|
})
|
|
913
1041
|
export class AppModule {}`
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
filename: "apps/api/src/app.service.ts",
|
|
1045
|
+
template: `import { Injectable } from '@nestjs/common';
|
|
918
1046
|
|
|
919
1047
|
@Injectable()
|
|
920
1048
|
export class AppService {
|
|
@@ -922,10 +1050,10 @@ export class AppService {
|
|
|
922
1050
|
return 'Hello from Nest';
|
|
923
1051
|
}
|
|
924
1052
|
}`
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
filename: "apps/api/src/app.service.spec.ts",
|
|
1056
|
+
template: `import { Test, TestingModule } from '@nestjs/testing';
|
|
929
1057
|
import { AppService } from './app.service';
|
|
930
1058
|
|
|
931
1059
|
describe('AppService', () => {
|
|
@@ -943,8 +1071,14 @@ describe('AppService', () => {
|
|
|
943
1071
|
expect(service).toBeDefined();
|
|
944
1072
|
});
|
|
945
1073
|
});`
|
|
946
|
-
|
|
947
|
-
]
|
|
1074
|
+
}
|
|
1075
|
+
],
|
|
1076
|
+
packages: [{
|
|
1077
|
+
package: "zod",
|
|
1078
|
+
module: "apps/api",
|
|
1079
|
+
version: versions.zod
|
|
1080
|
+
}]
|
|
1081
|
+
};
|
|
948
1082
|
//#endregion
|
|
949
1083
|
//#region src/templates/auth/index.ts
|
|
950
1084
|
const auth = { templates: [
|
|
@@ -1526,92 +1660,6 @@ const ui$1 = { templates: [
|
|
|
1526
1660
|
tsconfig_default$1
|
|
1527
1661
|
] };
|
|
1528
1662
|
//#endregion
|
|
1529
|
-
//#region src/templates/versions.ts
|
|
1530
|
-
const versions = {
|
|
1531
|
-
"@babel/plugin-proposal-decorators": "^8.0.2",
|
|
1532
|
-
"@babel/plugin-transform-class-properties": "^8.0.1",
|
|
1533
|
-
"@base-ui/react": "^1.6.0",
|
|
1534
|
-
"@eslint/js": "^9.39.1",
|
|
1535
|
-
"@nestjs/cli": "^12.0.7",
|
|
1536
|
-
"@nestjs/common": "^12.1.0",
|
|
1537
|
-
"@nestjs/core": "^12.1.0",
|
|
1538
|
-
"@nestjs/platform-express": "^12.1.0",
|
|
1539
|
-
"@nestjs/schematics": "^12.0.5",
|
|
1540
|
-
"@nestjs/serve-static": "^12.0.0",
|
|
1541
|
-
"@nestjs/testing": "^12.1.0",
|
|
1542
|
-
"@next/eslint-plugin-next": "^16.4.0",
|
|
1543
|
-
"@oxlint/plugins": "^1.74.0",
|
|
1544
|
-
"@shadcn/lint": "^0.1.0",
|
|
1545
|
-
"@shadcn/react": "^0.2.1",
|
|
1546
|
-
"@stylexjs/babel-plugin": "0.19.0",
|
|
1547
|
-
"@stylexjs/postcss-plugin": "0.19.0",
|
|
1548
|
-
"@stylexjs/stylex": "0.19.0",
|
|
1549
|
-
"@swc/core": "^1.10.0",
|
|
1550
|
-
"@tailwindcss/postcss": "^4.2.1",
|
|
1551
|
-
"@tanstack/react-form": "^1.28.5",
|
|
1552
|
-
"@tanstack/react-query": "^5.90.21",
|
|
1553
|
-
"@thallesp/nestjs-better-auth": "^2.8.0",
|
|
1554
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
1555
|
-
"@types/express": "^5.0.0",
|
|
1556
|
-
"@types/jest": "^30.0.0",
|
|
1557
|
-
"@types/node": "^24.13.3",
|
|
1558
|
-
"@types/pg": "^8.11.13",
|
|
1559
|
-
"@types/react": "19.2.14",
|
|
1560
|
-
"@types/react-dom": "19.2.3",
|
|
1561
|
-
"@types/supertest": "^6.0.2",
|
|
1562
|
-
"@vitest/coverage-v8": "^4.1.10",
|
|
1563
|
-
auth: "^1.5.5",
|
|
1564
|
-
"babel-plugin-transform-typescript-metadata": "^0.4.0",
|
|
1565
|
-
"better-auth": "^1.2.8",
|
|
1566
|
-
"better-sqlite3": "^12.11.1",
|
|
1567
|
-
"class-variance-authority": "^0.7.1",
|
|
1568
|
-
clsx: "^2.1.1",
|
|
1569
|
-
cmdk: "^1.1.1",
|
|
1570
|
-
cn: "^0.3.0",
|
|
1571
|
-
"date-fns": "^4.2.1",
|
|
1572
|
-
dotenv: "^17.3.1",
|
|
1573
|
-
"dotenv-cli": "^11.0.0",
|
|
1574
|
-
"embla-carousel-react": "^8.6.0",
|
|
1575
|
-
eslint: "^9.39.1",
|
|
1576
|
-
"eslint-config-prettier": "^10.1.1",
|
|
1577
|
-
"eslint-plugin-only-warn": "^1.1.0",
|
|
1578
|
-
"eslint-plugin-react": "^7.37.5",
|
|
1579
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
1580
|
-
"eslint-plugin-turbo": "^2.7.1",
|
|
1581
|
-
globals: "^16.5.0",
|
|
1582
|
-
"input-otp": "^1.4.2",
|
|
1583
|
-
jest: "^30.0.0",
|
|
1584
|
-
kysely: "^0.28.2",
|
|
1585
|
-
"lucide-react": "^1.16.0",
|
|
1586
|
-
next: "16.4.0",
|
|
1587
|
-
"next-themes": "^0.4.6",
|
|
1588
|
-
oxfmt: "^0.59.0",
|
|
1589
|
-
oxlint: "^1.80.0",
|
|
1590
|
-
pg: "^8.14.1",
|
|
1591
|
-
prettier: "^3.7.4",
|
|
1592
|
-
react: "^19.2.4",
|
|
1593
|
-
"react-day-picker": "^10.0.1",
|
|
1594
|
-
"react-dom": "^19.2.4",
|
|
1595
|
-
"react-resizable-panels": "^4.11.1",
|
|
1596
|
-
recharts: "^3.8.0",
|
|
1597
|
-
"reflect-metadata": "^0.2.2",
|
|
1598
|
-
rxjs: "^7.8.1",
|
|
1599
|
-
shadcn: "^4.7.0",
|
|
1600
|
-
sonner: "^2.0.7",
|
|
1601
|
-
supertest: "^7.0.0",
|
|
1602
|
-
"tailwind-merge": "^3.6.0",
|
|
1603
|
-
tailwindcss: "^4.2.1",
|
|
1604
|
-
"ts-jest": "^29.2.5",
|
|
1605
|
-
tsx: "^4.19.4",
|
|
1606
|
-
turbo: "^2.8.16",
|
|
1607
|
-
"tw-animate-css": "^1.4.0",
|
|
1608
|
-
typescript: "6.0.2",
|
|
1609
|
-
"typescript-eslint": "^8.50.0",
|
|
1610
|
-
"unplugin-swc": "^1.5.9",
|
|
1611
|
-
vitest: "^4.1.10",
|
|
1612
|
-
zod: "^4.6.5"
|
|
1613
|
-
};
|
|
1614
|
-
//#endregion
|
|
1615
1663
|
//#region src/templates/shadcn-ui/index.ts
|
|
1616
1664
|
const shadcnUi = {
|
|
1617
1665
|
templates: [
|
|
@@ -13801,18 +13849,11 @@ const todoExampleApi = { templates: [
|
|
|
13801
13849
|
db_schema_default,
|
|
13802
13850
|
db_migration_todos_default
|
|
13803
13851
|
] };
|
|
13804
|
-
const todoExampleControllers = {
|
|
13805
|
-
|
|
13806
|
-
|
|
13807
|
-
|
|
13808
|
-
|
|
13809
|
-
],
|
|
13810
|
-
packages: [{
|
|
13811
|
-
package: "zod",
|
|
13812
|
-
module: "apps/api",
|
|
13813
|
-
version: versions.zod
|
|
13814
|
-
}]
|
|
13815
|
-
};
|
|
13852
|
+
const todoExampleControllers = { templates: [
|
|
13853
|
+
todos_controller_default,
|
|
13854
|
+
todos_module_controllers_default,
|
|
13855
|
+
app_module_controllers_default
|
|
13856
|
+
] };
|
|
13816
13857
|
const todoExampleDi = { templates: [
|
|
13817
13858
|
web_todos_route_default,
|
|
13818
13859
|
web_todos_id_route_default,
|
|
@@ -14452,7 +14493,7 @@ async function doInit(options) {
|
|
|
14452
14493
|
}
|
|
14453
14494
|
}
|
|
14454
14495
|
const program = new Command();
|
|
14455
|
-
program.name("create-newt-app").version(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("--stylex", "Use StyleX instead of Tailwind", 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: none, standalone, or spa", "none").option("--nest <mode>", "NestJS: on, off, or di-only", "on").option("--include-example", "Include the todo example", false).option("--extras <list>", "Extras, comma-separated: anti-slop", "").action(async (name, options, command) => {
|
|
14496
|
+
program.name("create-newt-app").version(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("-y, --yes", "Skip prompts and use the defaults", false).option("--shadcn", "Include shadcn/ui", false).option("--stylex", "Use StyleX instead of Tailwind", 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: none, standalone, or spa", "none").option("--nest <mode>", "NestJS: on, off, or di-only", "on").option("--include-example", "Include the todo example", false).option("--extras <list>", "Extras, comma-separated: anti-slop", "").action(async (name, options, command) => {
|
|
14456
14497
|
intro(`Create a ${chalk.blue("newt")} app.`);
|
|
14457
14498
|
const explicitFlags = Object.entries({
|
|
14458
14499
|
shadcn: "--shadcn",
|
|
@@ -14465,7 +14506,7 @@ program.name("create-newt-app").version(version).description("Create a new newt-
|
|
|
14465
14506
|
includeExample: "--include-example",
|
|
14466
14507
|
extras: "--extras"
|
|
14467
14508
|
}).filter(([option]) => command.getOptionValueSource(option) === "cli").map(([, flag]) => flag);
|
|
14468
|
-
const nonInteractive = explicitFlags.length > 0;
|
|
14509
|
+
const nonInteractive = options.yes || explicitFlags.length > 0;
|
|
14469
14510
|
const extras = options.extras.split(",").map((extra) => extra.trim()).filter(Boolean);
|
|
14470
14511
|
const invalid = [
|
|
14471
14512
|
{
|