@newt-app/templates 0.7.0 → 0.8.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.
Files changed (2) hide show
  1. package/dist/index.js +102 -92
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -183,6 +183,22 @@ BETTER_AUTH_URL=http://localhost:3000
183
183
  BETTER_AUTH_SECRET=your-secret-here`
184
184
  };
185
185
 
186
+ // src/root/templates/agents-md.ts
187
+ var agents_md_default = {
188
+ filename: "AGENTS.md",
189
+ template: `<!-- BEGIN:nextjs-agent-rules -->
190
+ # This is NOT the Next.js you know
191
+
192
+ This version has breaking changes \u2014 APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in \`node_modules/next/dist/docs/\` before writing any code. Heed deprecation notices.
193
+ <!-- END:nextjs-agent-rules -->`
194
+ };
195
+
196
+ // src/root/templates/claude-md.ts
197
+ var claude_md_default = {
198
+ filename: "CLAUDE.md",
199
+ template: `@AGENTS.md`
200
+ };
201
+
186
202
  // src/root/index.ts
187
203
  var root = {
188
204
  templates: [
@@ -194,7 +210,9 @@ var root = {
194
210
  turbo_json_default,
195
211
  pnpm_workspace_default,
196
212
  readme_default,
197
- env_example_default
213
+ env_example_default,
214
+ agents_md_default,
215
+ claude_md_default
198
216
  ]
199
217
  };
200
218
  var root_default = root;
@@ -342,7 +360,6 @@ dotenv.config({ path: resolve(process.cwd(), '.env') });
342
360
 
343
361
  /** @type {import('next').NextConfig} */
344
362
  const nextConfig = {
345
- output: "standalone",
346
363
  async rewrites() {
347
364
  return [
348
365
  {
@@ -9134,131 +9151,97 @@ var single_process_pages_default = singleProcessPages;
9134
9151
 
9135
9152
  // src/nest-di-only/templates/api-package-json.ts
9136
9153
  var api_package_json_default4 = {
9137
- filename: "packages/api/package.json",
9154
+ filename: "apps/api/package.json",
9138
9155
  template: `{
9139
9156
  "name": "@<%= projectName %>/api",
9140
9157
  "version": "0.0.1",
9158
+ "description": "",
9159
+ "author": "",
9141
9160
  "private": true,
9161
+ "license": "UNLICENSED",
9142
9162
  "exports": {
9143
- ".": {
9144
- "default": "./dist/index.js",
9145
- "types": "./dist/index.d.ts"
9146
- }
9163
+ ".": "./src/index.ts"
9147
9164
  },
9148
9165
  "scripts": {
9149
- "build": "tsc",
9150
- "dev": "tsc --watch"
9166
+ "build": "nest build",
9167
+ "start": "nest start",
9168
+ "dev": "nest start --watch",
9169
+ "start:dev": "nest start --watch",
9170
+ "start:debug": "nest start --debug --watch",
9171
+ "start:prod": "node dist/main",
9172
+ "lint": "eslint \\"{src,apps,libs,test}/**/*.ts\\" --fix"
9151
9173
  },
9152
9174
  "dependencies": {
9153
- "@<%= projectName %>/auth": "workspace:*",
9154
9175
  "@nestjs/common": "^11.0.1",
9155
9176
  "@nestjs/core": "^11.0.1",
9177
+ "@nestjs/platform-express": "^11.0.1",
9178
+ "@<%= projectName %>/auth": "workspace:*",
9179
+ "@thallesp/nestjs-better-auth": "^2.5.1",
9180
+ "dotenv": "^17.3.1",
9156
9181
  "reflect-metadata": "^0.2.2",
9157
9182
  "rxjs": "^7.8.1"
9158
9183
  },
9159
9184
  "devDependencies": {
9160
- "@<%= projectName %>/typescript-config": "workspace:*",
9161
- "@types/node": "^22.15.3",
9162
- "typescript": "6.0.2"
9185
+ "@eslint/eslintrc": "^3.2.0",
9186
+ "@eslint/js": "^9.18.0",
9187
+ "@nestjs/cli": "^11.0.0",
9188
+ "@nestjs/schematics": "^11.0.0",
9189
+ "@nestjs/testing": "^11.0.1",
9190
+ "@types/express": "^5.0.0",
9191
+ "@types/node": "^22.10.7",
9192
+ "@types/supertest": "^6.0.2",
9193
+ "eslint": "^9.18.0",
9194
+ "eslint-config-prettier": "^10.0.1",
9195
+ "globals": "^16.0.0",
9196
+ "supertest": "^7.0.0",
9197
+ "ts-node": "^10.9.2",
9198
+ "tsconfig-paths": "^4.2.0",
9199
+ "typescript": "6.0.2",
9200
+ "typescript-eslint": "^8.20.0"
9163
9201
  }
9164
9202
  }`
9165
9203
  };
9166
9204
 
9167
9205
  // src/nest-di-only/templates/api-tsconfig.ts
9168
9206
  var api_tsconfig_default = {
9169
- filename: "packages/api/tsconfig.json",
9207
+ filename: "apps/api/tsconfig.json",
9170
9208
  template: `{
9171
9209
  "compilerOptions": {
9210
+ "module": "nodenext",
9211
+ "moduleResolution": "nodenext",
9212
+ "resolvePackageJsonExports": true,
9213
+ "esModuleInterop": true,
9214
+ "isolatedModules": true,
9172
9215
  "declaration": true,
9173
- "declarationMap": true,
9216
+ "removeComments": true,
9174
9217
  "emitDecoratorMetadata": true,
9175
9218
  "experimentalDecorators": true,
9176
- "module": "CommonJS",
9177
- "outDir": "dist",
9178
- "rootDir": "src",
9219
+ "allowSyntheticDefaultImports": true,
9220
+ "target": "ES2023",
9221
+ "sourceMap": true,
9222
+ "outDir": "./dist",
9223
+ "rootDir": "./src",
9179
9224
  "skipLibCheck": true,
9180
- "strict": true,
9181
- "target": "ES2021"
9225
+ "strictNullChecks": true,
9226
+ "forceConsistentCasingInFileNames": true,
9227
+ "noImplicitAny": false,
9228
+ "strictBindCallApply": false,
9229
+ "noFallthroughCasesInSwitch": false,
9230
+ "types": [<% if (testing === 'jest') { %>"jest", <% } %>"node"]
9182
9231
  },
9183
- "include": ["src"],
9232
+ "include": ["src/**/*"],
9184
9233
  "exclude": ["node_modules", "dist"]
9185
9234
  }`
9186
9235
  };
9187
9236
 
9188
9237
  // src/nest-di-only/templates/api-index.ts
9189
9238
  var api_index_default = {
9190
- filename: "packages/api/src/index.ts",
9239
+ filename: "apps/api/src/index.ts",
9191
9240
  template: `export { AppModule } from './app.module';
9192
9241
  export { TodosService } from './todos/todos.service';
9193
9242
  export type { Todo } from './todos/todos.service';`
9194
9243
  };
9195
9244
 
9196
- // src/nest-di-only/templates/api-app-module.ts
9197
- var api_app_module_default2 = {
9198
- filename: "packages/api/src/app.module.ts",
9199
- template: `import { Module } from '@nestjs/common';
9200
- import { TodosModule } from './todos/todos.module';
9201
-
9202
- @Module({
9203
- imports: [TodosModule],
9204
- })
9205
- export class AppModule {}`
9206
- };
9207
-
9208
- // src/nest-di-only/templates/api-todos-service.ts
9209
- var api_todos_service_default = {
9210
- filename: "packages/api/src/todos/todos.service.ts",
9211
- template: `import { Injectable, NotFoundException } from '@nestjs/common';
9212
-
9213
- export interface Todo {
9214
- id: number;
9215
- title: string;
9216
- done: boolean;
9217
- }
9218
-
9219
- @Injectable()
9220
- export class TodosService {
9221
- private todos: Todo[] = [];
9222
- private nextId = 1;
9223
-
9224
- findAll(): Todo[] {
9225
- return this.todos;
9226
- }
9227
-
9228
- create(title: string): Todo {
9229
- const todo: Todo = { id: this.nextId++, title, done: false };
9230
- this.todos.push(todo);
9231
- return todo;
9232
- }
9233
-
9234
- toggle(id: number): Todo {
9235
- const todo = this.todos.find((t) => t.id === id);
9236
- if (!todo) throw new NotFoundException(\`Todo \${id} not found\`);
9237
- todo.done = !todo.done;
9238
- return todo;
9239
- }
9240
-
9241
- remove(id: number): void {
9242
- const index = this.todos.findIndex((t) => t.id === id);
9243
- if (index === -1) throw new NotFoundException(\`Todo \${id} not found\`);
9244
- this.todos.splice(index, 1);
9245
- }
9246
- }`
9247
- };
9248
-
9249
- // src/nest-di-only/templates/api-todos-module.ts
9250
- var api_todos_module_default = {
9251
- filename: "packages/api/src/todos/todos.module.ts",
9252
- template: `import { Module } from '@nestjs/common';
9253
- import { TodosService } from './todos.service';
9254
-
9255
- @Module({
9256
- providers: [TodosService],
9257
- exports: [TodosService],
9258
- })
9259
- export class TodosModule {}`
9260
- };
9261
-
9262
9245
  // src/nest-di-only/templates/web-nest-context.ts
9263
9246
  var web_nest_context_default = {
9264
9247
  filename: "apps/web/lib/nest.ts",
@@ -9397,21 +9380,48 @@ const nextConfig = {
9397
9380
  export default nextConfig;`
9398
9381
  };
9399
9382
 
9383
+ // src/nest-di-only/templates/web-tsconfig.ts
9384
+ var web_tsconfig_default = {
9385
+ filename: "apps/web/tsconfig.json",
9386
+ template: `{
9387
+ "extends": "@<%= projectName %>/typescript-config/nextjs.json",
9388
+ "compilerOptions": {
9389
+ "plugins": [
9390
+ {
9391
+ "name": "next"
9392
+ }
9393
+ ],
9394
+ "strictNullChecks": true,
9395
+ "experimentalDecorators": true,
9396
+ "emitDecoratorMetadata": true,
9397
+ "paths": {
9398
+ "@/*": ["./*"]
9399
+ }
9400
+ },
9401
+ "include": [
9402
+ "**/*.ts",
9403
+ "**/*.tsx",
9404
+ "next-env.d.ts",
9405
+ "next.config.js",
9406
+ ".next/types/**/*.ts"
9407
+ ],
9408
+ "exclude": ["node_modules"]
9409
+ }`
9410
+ };
9411
+
9400
9412
  // src/nest-di-only/index.ts
9401
9413
  var nestDiOnly = {
9402
9414
  templates: [
9403
9415
  api_package_json_default4,
9404
9416
  api_tsconfig_default,
9405
9417
  api_index_default,
9406
- api_app_module_default2,
9407
- api_todos_service_default,
9408
- api_todos_module_default,
9409
9418
  web_nest_context_default,
9410
9419
  web_todos_route_default,
9411
9420
  web_todos_id_route_default,
9412
9421
  web_todos_toggle_route_default,
9413
9422
  web_package_json_default3,
9414
- web_next_config_default4
9423
+ web_next_config_default4,
9424
+ web_tsconfig_default
9415
9425
  ]
9416
9426
  };
9417
9427
  var nest_di_only_default = nestDiOnly;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newt-app/templates",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "private": false,
5
5
  "description": "Templates for newt-app",
6
6
  "type": "module",