create-newt-app 0.35.4 → 0.35.6

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, 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.35.4";
14
+ var version = "0.35.6";
15
15
  var engines = { "node": ">=24.0.0" };
16
16
  //#endregion
17
17
  //#region src/templates/root/index.ts
@@ -177,44 +177,71 @@ pnpm dev
177
177
  \`\`\`
178
178
 
179
179
  Open [http://localhost:3000](http://localhost:3000).
180
- <% if (deployment === 'spa') { -%>
180
+ <% if (deployment === 'none') { -%>
181
181
 
182
- ## Production build
182
+ ## Production
183
+
184
+ \`\`\`sh
185
+ pnpm db:migrate && pnpm build
186
+ pnpm --filter @<%= projectName %>/web start
187
+ \`\`\`
188
+
189
+ Open [http://localhost:3000](http://localhost:3000).
190
+ <% } else if (deployment === 'spa') { -%>
191
+
192
+ ## Production
183
193
 
184
194
  NestJS serves the static export and the API from one origin, so point \`BETTER_AUTH_URL\` at it:
185
195
 
186
196
  \`\`\`sh
187
- pnpm db:migrate
188
- pnpm build
197
+ pnpm db:migrate && pnpm build
189
198
  cd apps/api
190
199
  BETTER_AUTH_URL=http://localhost:3001 pnpm start:prod
191
200
  \`\`\`
192
201
 
193
202
  Open [http://localhost:3001](http://localhost:3001). In a real deployment, set \`BETTER_AUTH_URL\` to the public URL.
203
+ <% } else if (deployment === 'standalone') { -%>
204
+
205
+ ## Production
206
+
207
+ \`\`\`sh
208
+ docker compose up --build
209
+ \`\`\`
210
+
211
+ The \`migrate\` service applies migrations before the app starts. Open [http://localhost:3000](http://localhost:3000); set \`BETTER_AUTH_URL\` to the public URL in a real deployment.
194
212
  <% } -%>
195
213
 
196
- ## Apps
214
+ ## Commands
197
215
 
198
- - **web**: Next.js frontend (port 3000)
216
+ - \`pnpm dev\`: run in development
217
+ - \`pnpm build\`, \`pnpm typecheck\`, \`pnpm test\`: build, type-check, and test every workspace
218
+ - \`pnpm lint:check\`: lint (fails on errors); \`pnpm format:fix\`: apply formatting
219
+ - \`pnpm db:migrate\`: run migrations; \`pnpm db:make <name>\`: scaffold a new one
199
220
  <% if (nest === 'on') { -%>
200
- - **api**: NestJS backend (port 3001)
201
- <% } else if (nest === 'di-only') { -%>
202
- - **api**: NestJS providers, resolved from the web process (no HTTP server)
221
+ - \`pnpm --filter @<%= projectName %>/api test:e2e\`: run the e2e suite
203
222
  <% } -%>
204
223
 
205
- ## Packages
224
+ ## Environment
225
+
226
+ Set in \`.env\` (a committed \`.env.example\` documents each one):
206
227
 
207
- - **\`@<%= projectName %>/auth\`**: better-auth config
208
- - **\`@<%= projectName %>/db\`**: Kysely client and migrations
209
- - **\`@<%= projectName %>/ui\`**: shared React components
210
- <% if (linter === 'eslint') { -%>
211
- - **\`@<%= projectName %>/eslint-config\`**: shared ESLint config
228
+ - **BETTER_AUTH_URL**: the public origin of the app
229
+ - **BETTER_AUTH_SECRET**: a random secret used to sign sessions
230
+ <% if (database === 'postgres') { -%>
231
+ - **DATABASE_URL**: your Postgres connection string
232
+ <% } else { -%>
233
+ - **DATABASE_URL**: not set for SQLite (the app uses \`dev.db\` at the repo root); set it to a Postgres URL to use Postgres
212
234
  <% } -%>
213
- - **\`@<%= projectName %>/typescript-config\`**: shared tsconfig
214
235
 
215
- ## Formatting
236
+ ## Layout
216
237
 
217
- \`pnpm format\` checks without modifying files and fails if any file is unformatted; \`pnpm format:fix\` applies formatting.
238
+ - **\`apps/web\`**: Next.js frontend (port 3000)
239
+ <% if (nest === 'on') { -%>
240
+ - **\`apps/api\`**: NestJS backend (port 3001)
241
+ <% } else if (nest === 'di-only') { -%>
242
+ - **\`apps/api\`**: NestJS providers, resolved in-process by the web app
243
+ <% } -%>
244
+ - **\`packages/\`**: \`auth\`, \`db\`, \`ui\`<% if (linter === 'eslint') { %>, \`eslint-config\`<% } %>, and shared \`typescript-config\`
218
245
  `
219
246
  },
220
247
  {
@@ -252,7 +279,24 @@ Read \`docs/README.md\` inside that installed package first, then read the relev
252
279
  This block is written and re-added by \`turbo\` before repository-scoped commands when an AI agent is detected. In the Turborepo source repository, its template is defined in \`crates/turborepo-cli/src/cli/agent_guidance.rs\`. Removing the managed block while updates are enabled means a later qualifying invocation will add it again. Set \`"agentGuidance": false\` in the root \`turbo.json\` or \`turbo.jsonc\` to opt out; this does not remove an existing block. Keep the block committed with your work to avoid an uncommitted change on the next agent invocation.
253
280
  <!-- END:turborepo-agent-rules --><% if (shadcn) { %>
254
281
 
255
- After making changes, run \`pnpm lint:check\` and fix all errors.<% } %>`
282
+ After making changes, run \`pnpm lint:check\` and fix all errors.<% } %>
283
+
284
+ # Project notes
285
+
286
+ - **web** runs on port 3000<% if (nest === 'on') { %>; **api** (NestJS) runs on port 3001<% } %>.
287
+ <% if (nest === 'on') { -%>
288
+ - In development, \`apps/web\` rewrites \`/api/*\` to \`http://localhost:3001/api/*\` (see \`apps/web/next.config.js\`). The backend is a separate process; start both from the repo root with \`pnpm dev\`.
289
+ <% } else if (nest === 'di-only') { -%>
290
+ - There is no separate backend process. API routes are Next.js route handlers that resolve NestJS providers in-process.
291
+ <% } else { -%>
292
+ - There is no backend. API routes are served in-process by Next.js route handlers.
293
+ <% } -%>
294
+ - Migrations live in \`packages/db\`. Run \`pnpm db:migrate\`; scaffold a new one with \`pnpm db:make <name>\`.
295
+ - Environment is read from the root \`.env\` (see \`.env.example\`): \`DATABASE_URL\`, \`BETTER_AUTH_URL\`, \`BETTER_AUTH_SECRET\`.
296
+ <% if (nest !== 'off') { -%>
297
+ - NestJS controllers must validate request bodies with a schema (the api registers a global \`StandardSchemaValidationPipe\`); keep the todo controller as the reference for how to do it.
298
+ <% } -%>
299
+ `
256
300
  },
257
301
  {
258
302
  filename: "CLAUDE.md",
@@ -337,45 +381,6 @@ yarn-error.log*
337
381
  # typescript
338
382
  *.tsbuildinfo
339
383
  next-env.d.ts`
340
- },
341
- {
342
- filename: "apps/web/README.md",
343
- template: `This is a [Next.js](https://nextjs.org) project bootstrapped with [\`create-next-app\`](https://nextjs.org/docs/app/api-reference/create-next-app).
344
-
345
- ## Getting Started
346
-
347
- First, run the development server:
348
-
349
- \`\`\`bash
350
- npm run dev
351
- # or
352
- yarn dev
353
- # or
354
- pnpm dev
355
- # or
356
- bun dev
357
- \`\`\`
358
-
359
- Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
360
-
361
- You can start editing the page by modifying \`app/page.tsx\`. The page auto-updates as you edit the file.
362
-
363
- This project uses [\`next/font\`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load Inter, a custom Google Font.
364
-
365
- ## Learn More
366
-
367
- To learn more about Next.js, take a look at the following resources:
368
-
369
- - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
370
- - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
371
-
372
- You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
373
-
374
- ## Deploy on Vercel
375
-
376
- The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
377
-
378
- Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.`
379
384
  },
380
385
  {
381
386
  when: (s) => s.deployment === "none" && s.nest === "on",
@@ -451,7 +456,11 @@ const geistMono = localFont({
451
456
 
452
457
  export const metadata: Metadata = {
453
458
  title: "<%= projectName %>",
459
+ <% if (nest !== 'off') { -%>
454
460
  description: "Next + Nest = Newt",
461
+ <% } else { -%>
462
+ description: "Next.js + better-auth = Newt",
463
+ <% } -%>
455
464
  icons: {
456
465
  icon: [
457
466
  { url: "/icon0.svg", type: "image/svg+xml" },
@@ -507,7 +516,11 @@ export default function Home() {
507
516
  <div>
508
517
  <h1 className="text-4xl font-black tracking-tight"><%= projectName %></h1>
509
518
  <p className="text-sm text-muted-foreground tracking-widest uppercase">
519
+ <% if (nest !== 'off') { -%>
510
520
  Next + Nest = Newt 💜
521
+ <% } else { -%>
522
+ Next.js + better-auth = Newt 💜
523
+ <% } -%>
511
524
  </p>
512
525
  </div>
513
526
  </div>
@@ -518,6 +531,7 @@ export default function Home() {
518
531
  <p className="text-sm text-muted-foreground">Next.js rendering</p>
519
532
  </div>
520
533
 
534
+ <% if (nest === 'on') { -%>
521
535
  <div className="rounded-xl border p-6 space-y-1">
522
536
  <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">nest.js</p>
523
537
  <p className="font-mono text-sm text-muted-foreground">GET /api/hello</p>
@@ -525,6 +539,23 @@ export default function Home() {
525
539
  <code>{JSON.stringify(hello, null, 2)}</code>
526
540
  </pre>
527
541
  </div>
542
+ <% } else if (nest === 'di-only') { -%>
543
+ <div className="rounded-xl border p-6 space-y-1">
544
+ <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">nest.js</p>
545
+ <p className="font-mono text-sm text-muted-foreground">GET /api/hello, served by a Next.js route handler</p>
546
+ <pre className="mt-2 border rounded-md p-3 text-sm bg-muted/50">
547
+ <code>{JSON.stringify(hello, null, 2)}</code>
548
+ </pre>
549
+ </div>
550
+ <% } else { -%>
551
+ <div className="rounded-xl border p-6 space-y-1">
552
+ <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">next.js</p>
553
+ <p className="font-mono text-sm text-muted-foreground">GET /api/hello, served in-process</p>
554
+ <pre className="mt-2 border rounded-md p-3 text-sm bg-muted/50">
555
+ <code>{JSON.stringify(hello, null, 2)}</code>
556
+ </pre>
557
+ </div>
558
+ <% } -%>
528
559
 
529
560
  <div className="rounded-xl border p-6">
530
561
  <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground mb-4">better-auth</p>
@@ -554,9 +585,11 @@ export default function Home() {
554
585
  <li>
555
586
  <Link href="https://nextjs.org">Next.js</Link>
556
587
  </li>
588
+ <% if (nest !== 'off') { -%>
557
589
  <li>
558
590
  <Link href="https://nestjs.com">NestJS</Link>
559
591
  </li>
592
+ <% } -%>
560
593
  </ul>
561
594
  </div>
562
595
  </main>
@@ -910,21 +943,6 @@ describe('AppService', () => {
910
943
  expect(service).toBeDefined();
911
944
  });
912
945
  });`
913
- },
914
- {
915
- filename: "apps/api/README.md",
916
- template: `# API
917
-
918
- NestJS backend for the monorepo.
919
-
920
- ## Scripts
921
-
922
- \`\`\`sh
923
- pnpm dev # watch mode
924
- pnpm build # production build
925
- pnpm test # unit tests<% if (nest === 'on') { %>
926
- pnpm test:e2e # e2e tests<% } %>
927
- \`\`\``
928
946
  }
929
947
  ] };
930
948
  //#endregion
@@ -1078,12 +1096,21 @@ import { FileMigrationProvider, Migrator } from "kysely";
1078
1096
  import { db } from "./index.js";
1079
1097
 
1080
1098
  async function main() {
1099
+ const migrationFolder = path.join(process.cwd(), "src/migrations");
1100
+ try {
1101
+ await fs.access(migrationFolder);
1102
+ } catch {
1103
+ console.log("no migrations yet");
1104
+ await db.destroy();
1105
+ return;
1106
+ }
1107
+
1081
1108
  const migrator = new Migrator({
1082
1109
  db,
1083
1110
  provider: new FileMigrationProvider({
1084
1111
  fs,
1085
1112
  path,
1086
- migrationFolder: path.join(process.cwd(), "src/migrations"),
1113
+ migrationFolder,
1087
1114
  }),
1088
1115
  });
1089
1116
 
@@ -1150,23 +1177,6 @@ async function main() {
1150
1177
  main();`
1151
1178
  };
1152
1179
  //#endregion
1153
- //#region src/templates/db/templates/migrations-readme.ts
1154
- var migrations_readme_default = {
1155
- filename: "packages/db/src/migrations/README.md",
1156
- template: `# Migrations
1157
-
1158
- Kysely migrations run in filename order. Each file exports \`up\` and \`down\`.
1159
-
1160
- \`\`\`bash
1161
- pnpm db:make add_widgets # scaffold a new migration
1162
- pnpm db:migrate # apply pending migrations
1163
- \`\`\`
1164
-
1165
- Migrations are written with Kysely's schema builder, so one file compiles to
1166
- both SQLite (dev) and Postgres (prod). Prefer dialect-agnostic column types
1167
- (\`text\`, \`integer\`) and app-generated string ids over auto-increment.`
1168
- };
1169
- //#endregion
1170
1180
  //#region src/templates/db/templates/package-json-sqlite.ts
1171
1181
  var package_json_sqlite_default = {
1172
1182
  filename: "packages/db/package.json",
@@ -1282,8 +1292,7 @@ const shared = [
1282
1292
  tsconfig_default$2,
1283
1293
  src_schema_default,
1284
1294
  src_migrate_default,
1285
- scripts_new_migration_default,
1286
- migrations_readme_default
1295
+ scripts_new_migration_default
1287
1296
  ];
1288
1297
  const dbSqlite = { templates: [
1289
1298
  ...shared,
@@ -1530,7 +1539,7 @@ const versions = {
1530
1539
  "@nestjs/schematics": "^12.0.5",
1531
1540
  "@nestjs/serve-static": "^12.0.0",
1532
1541
  "@nestjs/testing": "^12.1.0",
1533
- "@next/eslint-plugin-next": "^16.3.4",
1542
+ "@next/eslint-plugin-next": "^16.4.0",
1534
1543
  "@oxlint/plugins": "^1.74.0",
1535
1544
  "@shadcn/lint": "^0.1.0",
1536
1545
  "@shadcn/react": "^0.2.1",
@@ -1574,7 +1583,7 @@ const versions = {
1574
1583
  jest: "^30.0.0",
1575
1584
  kysely: "^0.28.2",
1576
1585
  "lucide-react": "^1.16.0",
1577
- next: "16.3.4",
1586
+ next: "16.4.0",
1578
1587
  "next-themes": "^0.4.6",
1579
1588
  oxfmt: "^0.59.0",
1580
1589
  oxlint: "^1.80.0",
@@ -1932,7 +1941,11 @@ const geistMono = localFont({
1932
1941
 
1933
1942
  export const metadata: Metadata = {
1934
1943
  title: "<%= projectName %>",
1944
+ <% if (nest !== 'off') { -%>
1935
1945
  description: "Next + Nest = Newt",
1946
+ <% } else { -%>
1947
+ description: "Next.js + better-auth = Newt",
1948
+ <% } -%>
1936
1949
  icons: {
1937
1950
  icon: [
1938
1951
  { url: "/icon0.svg", type: "image/svg+xml" },
@@ -1996,7 +2009,11 @@ export default function Home() {
1996
2009
  <div>
1997
2010
  <h1 className="text-4xl font-black tracking-tight"><%= projectName %></h1>
1998
2011
  <p className="text-sm text-muted-foreground tracking-widest uppercase">
2012
+ <% if (nest !== 'off') { -%>
1999
2013
  Next + Nest = Newt 💜
2014
+ <% } else { -%>
2015
+ Next.js + better-auth = Newt 💜
2016
+ <% } -%>
2000
2017
  </p>
2001
2018
  </div>
2002
2019
  </div>
@@ -2013,6 +2030,7 @@ export default function Home() {
2013
2030
  </CardContent>
2014
2031
  </Card>
2015
2032
 
2033
+ <% if (nest === 'on') { -%>
2016
2034
  <Card>
2017
2035
  <CardHeader>
2018
2036
  <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">
@@ -2026,6 +2044,35 @@ export default function Home() {
2026
2044
  </pre>
2027
2045
  </CardContent>
2028
2046
  </Card>
2047
+ <% } else if (nest === 'di-only') { -%>
2048
+ <Card>
2049
+ <CardHeader>
2050
+ <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">
2051
+ nest.js
2052
+ </p>
2053
+ </CardHeader>
2054
+ <CardContent>
2055
+ <p className="font-mono text-sm text-muted-foreground">GET /api/hello, served by a Next.js route handler</p>
2056
+ <pre className="mt-2 rounded-md border p-3 text-sm bg-muted/50">
2057
+ <code>{JSON.stringify(hello, null, 2)}</code>
2058
+ </pre>
2059
+ </CardContent>
2060
+ </Card>
2061
+ <% } else { -%>
2062
+ <Card>
2063
+ <CardHeader>
2064
+ <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">
2065
+ next.js
2066
+ </p>
2067
+ </CardHeader>
2068
+ <CardContent>
2069
+ <p className="font-mono text-sm text-muted-foreground">GET /api/hello, served in-process</p>
2070
+ <pre className="mt-2 rounded-md border p-3 text-sm bg-muted/50">
2071
+ <code>{JSON.stringify(hello, null, 2)}</code>
2072
+ </pre>
2073
+ </CardContent>
2074
+ </Card>
2075
+ <% } -%>
2029
2076
 
2030
2077
  <Card>
2031
2078
  <CardHeader>
@@ -2061,9 +2108,11 @@ export default function Home() {
2061
2108
  <li>
2062
2109
  <Link href="https://nextjs.org">Next.js</Link>
2063
2110
  </li>
2111
+ <% if (nest !== 'off') { -%>
2064
2112
  <li>
2065
2113
  <Link href="https://nestjs.com">NestJS</Link>
2066
2114
  </li>
2115
+ <% } -%>
2067
2116
  </ul>
2068
2117
  </div>
2069
2118
  </main>
@@ -10245,7 +10294,11 @@ const geistMono = localFont({
10245
10294
 
10246
10295
  export const metadata: Metadata = {
10247
10296
  title: "<%= projectName %>",
10297
+ <% if (nest !== 'off') { -%>
10248
10298
  description: "Next + Nest = Newt",
10299
+ <% } else { -%>
10300
+ description: "Next.js + better-auth = Newt",
10301
+ <% } -%>
10249
10302
  icons: {
10250
10303
  icon: [
10251
10304
  { url: "/icon0.svg", type: "image/svg+xml" },
@@ -10312,7 +10365,11 @@ export default function Home() {
10312
10365
  <div>
10313
10366
  <h1 {...stylex.props(styles.h1)}><%= projectName %></h1>
10314
10367
  <p {...stylex.props(styles.muted, styles.tagline)}>
10368
+ <% if (nest !== 'off') { -%>
10315
10369
  Next + Nest = Newt 💜
10370
+ <% } else { -%>
10371
+ Next.js + better-auth = Newt 💜
10372
+ <% } -%>
10316
10373
  </p>
10317
10374
  </div>
10318
10375
  </div>
@@ -10323,6 +10380,7 @@ export default function Home() {
10323
10380
  <p {...stylex.props(styles.muted)}>Next.js rendering</p>
10324
10381
  </div>
10325
10382
 
10383
+ <% if (nest === 'on') { -%>
10326
10384
  <div {...stylex.props(styles.card)}>
10327
10385
  <p {...stylex.props(styles.eyebrow)}>nest.js</p>
10328
10386
  <p {...stylex.props(styles.mono, styles.muted)}>GET /api/hello</p>
@@ -10330,6 +10388,23 @@ export default function Home() {
10330
10388
  <code>{JSON.stringify(hello, null, 2)}</code>
10331
10389
  </pre>
10332
10390
  </div>
10391
+ <% } else if (nest === 'di-only') { -%>
10392
+ <div {...stylex.props(styles.card)}>
10393
+ <p {...stylex.props(styles.eyebrow)}>nest.js</p>
10394
+ <p {...stylex.props(styles.mono, styles.muted)}>GET /api/hello, served by a Next.js route handler</p>
10395
+ <pre {...stylex.props(styles.pre)}>
10396
+ <code>{JSON.stringify(hello, null, 2)}</code>
10397
+ </pre>
10398
+ </div>
10399
+ <% } else { -%>
10400
+ <div {...stylex.props(styles.card)}>
10401
+ <p {...stylex.props(styles.eyebrow)}>next.js</p>
10402
+ <p {...stylex.props(styles.mono, styles.muted)}>GET /api/hello, served in-process</p>
10403
+ <pre {...stylex.props(styles.pre)}>
10404
+ <code>{JSON.stringify(hello, null, 2)}</code>
10405
+ </pre>
10406
+ </div>
10407
+ <% } -%>
10333
10408
 
10334
10409
  <div {...stylex.props(styles.card)}>
10335
10410
  <p {...stylex.props(styles.eyebrow, styles.eyebrowSpaced)}>better-auth</p>
@@ -10359,9 +10434,11 @@ export default function Home() {
10359
10434
  <li>
10360
10435
  <Link href="https://nextjs.org">Next.js</Link>
10361
10436
  </li>
10437
+ <% if (nest !== 'off') { -%>
10362
10438
  <li>
10363
10439
  <Link href="https://nestjs.com">NestJS</Link>
10364
10440
  </li>
10441
+ <% } -%>
10365
10442
  </ul>
10366
10443
  </div>
10367
10444
  </main>
@@ -11179,37 +11256,10 @@ var plugin_package_json_default = {
11179
11256
  }`
11180
11257
  };
11181
11258
  //#endregion
11182
- //#region src/templates/anti-slop/templates/plugin-readme.ts
11183
- var plugin_readme_default = {
11184
- filename: "tools/oxlint/anti-slop/README.md",
11185
- template: `# anti-slop
11186
-
11187
- Oxlint rules that reject low-evidence TypeScript patterns, vendored from
11188
- [dmmulroy/anti-slop](https://github.com/dmmulroy/anti-slop) at \`6d538555cb15\` (MIT, see LICENSE).
11189
-
11190
- Upstream ships these to be vendored rather than depended on, so these files are
11191
- yours: read them, change the messages, delete the rules you disagree with.
11192
-
11193
- \`.oxlintrc.json\` registers the plugin and turns every rule on as an error.
11194
- Turn one off there:
11195
-
11196
- \`\`\`json
11197
- {
11198
- "rules": {
11199
- "anti-slop/no-runtime-typeof": "off"
11200
- }
11201
- }
11202
- \`\`\`
11203
-
11204
- Vendored shadcn components under \`packages/ui/src/components\` are exempt, since
11205
- they are upstream code you re-pull rather than write.
11206
- `
11207
- };
11208
- //#endregion
11209
11259
  //#region src/templates/anti-slop/index.ts
11210
11260
  const plugin = "tools/oxlint/anti-slop";
11211
11261
  const antiSlop = {
11212
- templates: [plugin_package_json_default, plugin_readme_default],
11262
+ templates: [plugin_package_json_default],
11213
11263
  staticFiles: [
11214
11264
  {
11215
11265
  src: "anti-slop/static/LICENSE",
@@ -12912,7 +12962,11 @@ export default function Home() {
12912
12962
  <div>
12913
12963
  <h1 className="text-4xl font-black tracking-tight"><%= projectName %></h1>
12914
12964
  <p className="text-sm text-muted-foreground tracking-widest uppercase">
12965
+ <% if (nest !== 'off') { -%>
12915
12966
  Next + Nest = Newt 💜
12967
+ <% } else { -%>
12968
+ Next.js + better-auth = Newt 💜
12969
+ <% } -%>
12916
12970
  </p>
12917
12971
  </div>
12918
12972
  </div>
@@ -12923,6 +12977,7 @@ export default function Home() {
12923
12977
  <p className="text-sm text-muted-foreground">Next.js rendering</p>
12924
12978
  </div>
12925
12979
 
12980
+ <% if (nest === 'on') { -%>
12926
12981
  <div className="rounded-xl border p-6 space-y-1">
12927
12982
  <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">nest.js</p>
12928
12983
  <p className="font-mono text-sm text-muted-foreground">GET /api/hello</p>
@@ -12930,6 +12985,23 @@ export default function Home() {
12930
12985
  <code>{JSON.stringify(hello, null, 2)}</code>
12931
12986
  </pre>
12932
12987
  </div>
12988
+ <% } else if (nest === 'di-only') { -%>
12989
+ <div className="rounded-xl border p-6 space-y-1">
12990
+ <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">nest.js</p>
12991
+ <p className="font-mono text-sm text-muted-foreground">GET /api/hello, served by a Next.js route handler</p>
12992
+ <pre className="mt-2 border rounded-md p-3 text-sm bg-muted/50">
12993
+ <code>{JSON.stringify(hello, null, 2)}</code>
12994
+ </pre>
12995
+ </div>
12996
+ <% } else { -%>
12997
+ <div className="rounded-xl border p-6 space-y-1">
12998
+ <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">next.js</p>
12999
+ <p className="font-mono text-sm text-muted-foreground">GET /api/hello, served in-process</p>
13000
+ <pre className="mt-2 border rounded-md p-3 text-sm bg-muted/50">
13001
+ <code>{JSON.stringify(hello, null, 2)}</code>
13002
+ </pre>
13003
+ </div>
13004
+ <% } -%>
12933
13005
 
12934
13006
  <div className="rounded-xl border p-6">
12935
13007
  <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground mb-4">better-auth</p>
@@ -12954,9 +13026,11 @@ export default function Home() {
12954
13026
  <li>
12955
13027
  <Link href="https://nextjs.org">Next.js</Link>
12956
13028
  </li>
13029
+ <% if (nest !== 'off') { -%>
12957
13030
  <li>
12958
13031
  <Link href="https://nestjs.com">NestJS</Link>
12959
13032
  </li>
13033
+ <% } -%>
12960
13034
  </ul>
12961
13035
  </div>
12962
13036
  </main>
@@ -13157,7 +13231,11 @@ export default function Home() {
13157
13231
  <div>
13158
13232
  <h1 className="text-4xl font-black tracking-tight"><%= projectName %></h1>
13159
13233
  <p className="text-sm text-muted-foreground tracking-widest uppercase">
13234
+ <% if (nest !== 'off') { -%>
13160
13235
  Next + Nest = Newt 💜
13236
+ <% } else { -%>
13237
+ Next.js + better-auth = Newt 💜
13238
+ <% } -%>
13161
13239
  </p>
13162
13240
  </div>
13163
13241
  </div>
@@ -13174,6 +13252,7 @@ export default function Home() {
13174
13252
  </CardContent>
13175
13253
  </Card>
13176
13254
 
13255
+ <% if (nest === 'on') { -%>
13177
13256
  <Card>
13178
13257
  <CardHeader>
13179
13258
  <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">
@@ -13187,6 +13266,35 @@ export default function Home() {
13187
13266
  </pre>
13188
13267
  </CardContent>
13189
13268
  </Card>
13269
+ <% } else if (nest === 'di-only') { -%>
13270
+ <Card>
13271
+ <CardHeader>
13272
+ <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">
13273
+ nest.js
13274
+ </p>
13275
+ </CardHeader>
13276
+ <CardContent>
13277
+ <p className="font-mono text-sm text-muted-foreground">GET /api/hello, served by a Next.js route handler</p>
13278
+ <pre className="mt-2 rounded-md border p-3 text-sm bg-muted/50">
13279
+ <code>{JSON.stringify(hello, null, 2)}</code>
13280
+ </pre>
13281
+ </CardContent>
13282
+ </Card>
13283
+ <% } else { -%>
13284
+ <Card>
13285
+ <CardHeader>
13286
+ <p className="text-xs font-mono uppercase tracking-widest text-muted-foreground">
13287
+ next.js
13288
+ </p>
13289
+ </CardHeader>
13290
+ <CardContent>
13291
+ <p className="font-mono text-sm text-muted-foreground">GET /api/hello, served in-process</p>
13292
+ <pre className="mt-2 rounded-md border p-3 text-sm bg-muted/50">
13293
+ <code>{JSON.stringify(hello, null, 2)}</code>
13294
+ </pre>
13295
+ </CardContent>
13296
+ </Card>
13297
+ <% } -%>
13190
13298
 
13191
13299
  <Card>
13192
13300
  <CardHeader>
@@ -13217,9 +13325,11 @@ export default function Home() {
13217
13325
  <li>
13218
13326
  <Link href="https://nextjs.org">Next.js</Link>
13219
13327
  </li>
13328
+ <% if (nest !== 'off') { -%>
13220
13329
  <li>
13221
13330
  <Link href="https://nestjs.com">NestJS</Link>
13222
13331
  </li>
13332
+ <% } -%>
13223
13333
  </ul>
13224
13334
  </div>
13225
13335
  </main>
@@ -13516,7 +13626,11 @@ export default function Home() {
13516
13626
  <div>
13517
13627
  <h1 {...stylex.props(styles.h1)}><%= projectName %></h1>
13518
13628
  <p {...stylex.props(styles.muted, styles.tagline)}>
13629
+ <% if (nest !== 'off') { -%>
13519
13630
  Next + Nest = Newt 💜
13631
+ <% } else { -%>
13632
+ Next.js + better-auth = Newt 💜
13633
+ <% } -%>
13520
13634
  </p>
13521
13635
  </div>
13522
13636
  </div>
@@ -13527,6 +13641,7 @@ export default function Home() {
13527
13641
  <p {...stylex.props(styles.muted)}>Next.js rendering</p>
13528
13642
  </div>
13529
13643
 
13644
+ <% if (nest === 'on') { -%>
13530
13645
  <div {...stylex.props(styles.card)}>
13531
13646
  <p {...stylex.props(styles.eyebrow)}>nest.js</p>
13532
13647
  <p {...stylex.props(styles.mono, styles.muted)}>GET /api/hello</p>
@@ -13534,6 +13649,23 @@ export default function Home() {
13534
13649
  <code>{JSON.stringify(hello, null, 2)}</code>
13535
13650
  </pre>
13536
13651
  </div>
13652
+ <% } else if (nest === 'di-only') { -%>
13653
+ <div {...stylex.props(styles.card)}>
13654
+ <p {...stylex.props(styles.eyebrow)}>nest.js</p>
13655
+ <p {...stylex.props(styles.mono, styles.muted)}>GET /api/hello, served by a Next.js route handler</p>
13656
+ <pre {...stylex.props(styles.pre)}>
13657
+ <code>{JSON.stringify(hello, null, 2)}</code>
13658
+ </pre>
13659
+ </div>
13660
+ <% } else { -%>
13661
+ <div {...stylex.props(styles.card)}>
13662
+ <p {...stylex.props(styles.eyebrow)}>next.js</p>
13663
+ <p {...stylex.props(styles.mono, styles.muted)}>GET /api/hello, served in-process</p>
13664
+ <pre {...stylex.props(styles.pre)}>
13665
+ <code>{JSON.stringify(hello, null, 2)}</code>
13666
+ </pre>
13667
+ </div>
13668
+ <% } -%>
13537
13669
 
13538
13670
  <div {...stylex.props(styles.card)}>
13539
13671
  <p {...stylex.props(styles.eyebrow, styles.eyebrowSpaced)}>better-auth</p>
@@ -13558,9 +13690,11 @@ export default function Home() {
13558
13690
  <li>
13559
13691
  <Link href="https://nextjs.org">Next.js</Link>
13560
13692
  </li>
13693
+ <% if (nest !== 'off') { -%>
13561
13694
  <li>
13562
13695
  <Link href="https://nestjs.com">NestJS</Link>
13563
13696
  </li>
13697
+ <% } -%>
13564
13698
  </ul>
13565
13699
  </div>
13566
13700
  </main>