create-newt-app 0.31.8 → 0.31.9

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
@@ -11,7 +11,7 @@ import { existsSync, promises } from "fs";
11
11
  import path from "path";
12
12
  import https from "node:https";
13
13
  //#region package.json
14
- var version = "0.31.8";
14
+ var version = "0.31.9";
15
15
  var engines = { "node": ">=24.0.0" };
16
16
  //#endregion
17
17
  //#region src/templates/root/index.ts
@@ -36,10 +36,7 @@ const root$2 = { templates: [
36
36
  "turbo": "<%= versions.turbo %>",
37
37
  "typescript": "<%= versions.typescript %>"
38
38
  },
39
- "pnpm": {
40
- "onlyBuiltDependencies": ["better-sqlite3", "esbuild", "sharp", "unrs-resolver"]
41
- },
42
- "packageManager": "pnpm@10.34.5",
39
+ "packageManager": "pnpm@11.25.0",
43
40
  "engines": {
44
41
  "node": ">=24.0.0"
45
42
  }
@@ -96,7 +93,10 @@ dist
96
93
  *.log
97
94
  .env
98
95
  .env.*
99
- !.env.example`
96
+ !.env.example
97
+ dev.db*
98
+ .git
99
+ coverage`
100
100
  },
101
101
  {
102
102
  filename: ".npmrc",
@@ -151,7 +151,15 @@ dist
151
151
  filename: "pnpm-workspace.yaml",
152
152
  template: `packages:
153
153
  - "apps/*"
154
- - "packages/*"`
154
+ - "packages/*"
155
+
156
+ allowBuilds:
157
+ "@parcel/watcher": true
158
+ "@swc/core": true
159
+ better-sqlite3: true
160
+ esbuild: true
161
+ sharp: true
162
+ unrs-resolver: true`
155
163
  },
156
164
  {
157
165
  filename: "README.md",
@@ -177,8 +185,11 @@ Open [http://localhost:3000](http://localhost:3000).
177
185
  ## Packages
178
186
 
179
187
  - **\`@<%= projectName %>/auth\`**: better-auth config
188
+ - **\`@<%= projectName %>/db\`**: Kysely client and migrations
180
189
  - **\`@<%= projectName %>/ui\`**: shared React components
190
+ <% if (linter === 'eslint') { -%>
181
191
  - **\`@<%= projectName %>/eslint-config\`**: shared ESLint config
192
+ <% } -%>
182
193
  - **\`@<%= projectName %>/typescript-config\`**: shared tsconfig
183
194
  `
184
195
  },
@@ -450,7 +461,7 @@ export default function Home() {
450
461
  return (
451
462
  <main className="max-w-lg mx-auto min-h-full px-4 py-8 space-y-4">
452
463
  <div className="pb-4 border-b">
453
- <p className="font-mono text-sm text-muted-foreground">apps/web/page.tsx</p>
464
+ <p className="font-mono text-sm text-muted-foreground">apps/web/app/page.tsx</p>
454
465
  <p className="text-sm text-muted-foreground">Delete me to get started!</p>
455
466
  </div>
456
467
 
@@ -466,7 +477,7 @@ export default function Home() {
466
477
 
467
478
  <div className="rounded-xl border p-6 space-y-1">
468
479
  <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">next.js</p>
469
- <p className="font-mono text-sm text-muted-foreground">apps/web/layout.tsx</p>
480
+ <p className="font-mono text-sm text-muted-foreground">apps/web/app/layout.tsx</p>
470
481
  <p className="text-sm text-muted-foreground">Next.js rendering</p>
471
482
  </div>
472
483
 
@@ -730,34 +741,6 @@ export const authClient: ReturnType<typeof createAuthClient> = createAuthClient(
730
741
  {
731
742
  src: "web/static/public/web-app-manifest-512x512.png",
732
743
  filename: "apps/web/public/web-app-manifest-512x512.png"
733
- },
734
- {
735
- src: "web/static/public/file-text.svg",
736
- filename: "apps/web/public/file-text.svg"
737
- },
738
- {
739
- src: "web/static/public/globe.svg",
740
- filename: "apps/web/public/globe.svg"
741
- },
742
- {
743
- src: "web/static/public/next.svg",
744
- filename: "apps/web/public/next.svg"
745
- },
746
- {
747
- src: "web/static/public/turborepo-dark.svg",
748
- filename: "apps/web/public/turborepo-dark.svg"
749
- },
750
- {
751
- src: "web/static/public/turborepo-light.svg",
752
- filename: "apps/web/public/turborepo-light.svg"
753
- },
754
- {
755
- src: "web/static/public/vercel.svg",
756
- filename: "apps/web/public/vercel.svg"
757
- },
758
- {
759
- src: "web/static/public/window.svg",
760
- filename: "apps/web/public/window.svg"
761
744
  }
762
745
  ]
763
746
  };
@@ -1017,6 +1000,7 @@ export interface SessionTable {
1017
1000
 
1018
1001
  export interface AccountTable {
1019
1002
  id: string;
1003
+ issuer: string;
1020
1004
  accountId: string;
1021
1005
  providerId: string;
1022
1006
  userId: string;
@@ -1340,50 +1324,6 @@ export const Button = ({ children, onClick, type = "button", disabled, className
1340
1324
  </button>
1341
1325
  );
1342
1326
  };`
1343
- },
1344
- {
1345
- filename: "packages/ui/src/card.tsx",
1346
- template: `import { type JSX } from "react";
1347
-
1348
- export function Card({
1349
- className,
1350
- title,
1351
- children,
1352
- href,
1353
- }: {
1354
- className?: string;
1355
- title: string;
1356
- children: React.ReactNode;
1357
- href: string;
1358
- }): JSX.Element {
1359
- return (
1360
- <a
1361
- className={className}
1362
- href={\`\${href}?utm_source=create-turbo&utm_medium=basic&utm_campaign=create-turbo"\`}
1363
- rel="noopener noreferrer"
1364
- target="_blank"
1365
- >
1366
- <h2>
1367
- {title} <span>-&gt;</span>
1368
- </h2>
1369
- <p>{children}</p>
1370
- </a>
1371
- );
1372
- }`
1373
- },
1374
- {
1375
- filename: "packages/ui/src/code.tsx",
1376
- template: `import { type JSX } from "react";
1377
-
1378
- export function Code({
1379
- children,
1380
- className,
1381
- }: {
1382
- children: React.ReactNode;
1383
- className?: string;
1384
- }): JSX.Element {
1385
- return <code className={className}>{children}</code>;
1386
- }`
1387
1327
  },
1388
1328
  {
1389
1329
  filename: "packages/ui/src/link.tsx",
@@ -1521,7 +1461,7 @@ const versions = {
1521
1461
  "@nestjs/schematics": "^11.0.0",
1522
1462
  "@nestjs/serve-static": "^5.0.0",
1523
1463
  "@nestjs/testing": "^11.0.1",
1524
- "@next/eslint-plugin-next": "^16.3.3",
1464
+ "@next/eslint-plugin-next": "^16.3.4",
1525
1465
  "@oxlint/plugins": "^1.74.0",
1526
1466
  "@shadcn/react": "^0.2.1",
1527
1467
  "@swc/core": "^1.10.0",
@@ -1559,7 +1499,7 @@ const versions = {
1559
1499
  jest: "^30.0.0",
1560
1500
  kysely: "^0.28.2",
1561
1501
  "lucide-react": "^1.16.0",
1562
- next: "16.3.3",
1502
+ next: "16.3.4",
1563
1503
  "next-themes": "^0.4.6",
1564
1504
  oxfmt: "^0.59.0",
1565
1505
  oxlint: "^1.74.0",
@@ -1972,7 +1912,7 @@ export default function Home() {
1972
1912
  <main className="max-w-lg mx-auto min-h-full px-4 py-8 space-y-4">
1973
1913
  <div className="pb-4 border-b flex items-start justify-between">
1974
1914
  <div>
1975
- <p className="font-mono text-sm text-muted-foreground">apps/web/page.tsx</p>
1915
+ <p className="font-mono text-sm text-muted-foreground">apps/web/app/page.tsx</p>
1976
1916
  <p className="text-sm text-muted-foreground">Delete me to get started!</p>
1977
1917
  </div>
1978
1918
  <ModeToggle />
@@ -1995,7 +1935,7 @@ export default function Home() {
1995
1935
  </CardTitle>
1996
1936
  </CardHeader>
1997
1937
  <CardContent>
1998
- <p className="font-mono text-sm text-muted-foreground">apps/web/layout.tsx</p>
1938
+ <p className="font-mono text-sm text-muted-foreground">apps/web/app/layout.tsx</p>
1999
1939
  <p className="text-sm text-muted-foreground">Next.js rendering</p>
2000
1940
  </CardContent>
2001
1941
  </Card>
@@ -11422,9 +11362,8 @@ describe('AppController', () => {
11422
11362
  filename: "apps/api/src/app.module.ts",
11423
11363
  template: `<% if (deployment === 'spa') { %>import { join } from 'path';
11424
11364
  <% } %>import { Module } from '@nestjs/common';
11425
- import { APP_GUARD } from '@nestjs/core';
11426
11365
  <% if (deployment === 'spa') { %>import { ServeStaticModule } from '@nestjs/serve-static';
11427
- <% } %>import { AuthGuard, AuthModule } from '@thallesp/nestjs-better-auth';
11366
+ <% } %>import { AuthModule } from '@thallesp/nestjs-better-auth';
11428
11367
  import { auth } from '@<%= projectName %>/auth';
11429
11368
  import { AppController } from './app.controller';
11430
11369
  import { AppService } from './app.service';
@@ -11441,7 +11380,7 @@ import { AppService } from './app.service';
11441
11380
  <% } else { %> imports: [AuthModule.forRoot({ auth })],
11442
11381
  <% } -%>
11443
11382
  controllers: [AppController],
11444
- providers: [AppService, { provide: APP_GUARD, useClass: AuthGuard }],
11383
+ providers: [AppService],
11445
11384
  })
11446
11385
  export class AppModule {}`
11447
11386
  },
@@ -11618,6 +11557,7 @@ export interface SessionTable {
11618
11557
 
11619
11558
  export interface AccountTable {
11620
11559
  id: string;
11560
+ issuer: string;
11621
11561
  accountId: string;
11622
11562
  providerId: string;
11623
11563
  userId: string;
@@ -11735,9 +11675,8 @@ var app_module_controllers_default = {
11735
11675
  filename: "apps/api/src/app.module.ts",
11736
11676
  template: `<% if (deployment === 'spa') { %>import { join } from 'path';
11737
11677
  <% } %>import { Module } from '@nestjs/common';
11738
- import { APP_GUARD } from '@nestjs/core';
11739
11678
  <% if (deployment === 'spa') { %>import { ServeStaticModule } from '@nestjs/serve-static';
11740
- <% } %>import { AuthGuard, AuthModule } from '@thallesp/nestjs-better-auth';
11679
+ <% } %>import { AuthModule } from '@thallesp/nestjs-better-auth';
11741
11680
  import { auth } from '@<%= projectName %>/auth';
11742
11681
  import { AppController } from './app.controller';
11743
11682
  import { AppService } from './app.service';
@@ -11756,7 +11695,7 @@ import { TodosModule } from './todos/todos.module';
11756
11695
  <% } else { %> imports: [AuthModule.forRoot({ auth }), TodosModule],
11757
11696
  <% } -%>
11758
11697
  controllers: [AppController],
11759
- providers: [AppService, { provide: APP_GUARD, useClass: AuthGuard }],
11698
+ providers: [AppService],
11760
11699
  })
11761
11700
  export class AppModule {}`
11762
11701
  };
@@ -12016,7 +11955,7 @@ export default function Home() {
12016
11955
  return (
12017
11956
  <main className="max-w-lg mx-auto min-h-full px-4 py-8 space-y-4">
12018
11957
  <div className="pb-4 border-b">
12019
- <p className="font-mono text-sm text-muted-foreground">apps/web/page.tsx</p>
11958
+ <p className="font-mono text-sm text-muted-foreground">apps/web/app/page.tsx</p>
12020
11959
  <p className="text-sm text-muted-foreground">Delete me to get started!</p>
12021
11960
  </div>
12022
11961
 
@@ -12032,7 +11971,7 @@ export default function Home() {
12032
11971
 
12033
11972
  <div className="rounded-xl border p-6 space-y-1">
12034
11973
  <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">next.js</p>
12035
- <p className="font-mono text-sm text-muted-foreground">apps/web/layout.tsx</p>
11974
+ <p className="font-mono text-sm text-muted-foreground">apps/web/app/layout.tsx</p>
12036
11975
  <p className="text-sm text-muted-foreground">Next.js rendering</p>
12037
11976
  </div>
12038
11977
 
@@ -12251,7 +12190,7 @@ export default function Home() {
12251
12190
  <main className="max-w-lg mx-auto min-h-full px-4 py-8 space-y-4">
12252
12191
  <div className="pb-4 border-b flex items-start justify-between">
12253
12192
  <div>
12254
- <p className="font-mono text-sm text-muted-foreground">apps/web/page.tsx</p>
12193
+ <p className="font-mono text-sm text-muted-foreground">apps/web/app/page.tsx</p>
12255
12194
  <p className="text-sm text-muted-foreground">Delete me to get started!</p>
12256
12195
  </div>
12257
12196
  <ModeToggle />
@@ -12274,7 +12213,7 @@ export default function Home() {
12274
12213
  </CardTitle>
12275
12214
  </CardHeader>
12276
12215
  <CardContent>
12277
- <p className="font-mono text-sm text-muted-foreground">apps/web/layout.tsx</p>
12216
+ <p className="font-mono text-sm text-muted-foreground">apps/web/app/layout.tsx</p>
12278
12217
  <p className="text-sm text-muted-foreground">Next.js rendering</p>
12279
12218
  </CardContent>
12280
12219
  </Card>
@@ -12789,10 +12728,14 @@ async function doInit(options) {
12789
12728
  }
12790
12729
  };
12791
12730
  try {
12792
- const preflight = [validateNodeVersion(process.version, engines.node), await checkRequiredTools({
12793
- install: options.install,
12794
- git: options.git
12795
- }, hasCommand)].find((result) => !result.valid);
12731
+ const preflight = [
12732
+ validateNodeVersion(process.version, engines.node),
12733
+ ...options.name ? [validateProjectName(options.name)] : [],
12734
+ await checkRequiredTools({
12735
+ install: options.install,
12736
+ git: options.git
12737
+ }, hasCommand)
12738
+ ].find((result) => !result.valid);
12796
12739
  if (preflight) throw new Error(preflight.error);
12797
12740
  const answers = await p.group(groupOpts, { onCancel: () => {
12798
12741
  console.log("Exiting.");