@nestjs/schematics 11.0.9 → 12.0.0-alpha.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.
Files changed (101) hide show
  1. package/dist/lib/application/files/js/package.json +10 -10
  2. package/dist/lib/application/files/ts/package.json +3 -3
  3. package/dist/lib/application/files/ts/tsconfig.json +0 -1
  4. package/dist/lib/application/files/ts-esm/.prettierrc +4 -0
  5. package/dist/lib/application/files/ts-esm/README.md +98 -0
  6. package/dist/lib/application/files/ts-esm/eslint.config.mjs +34 -0
  7. package/dist/lib/application/files/ts-esm/nest-cli.json +8 -0
  8. package/dist/lib/application/files/ts-esm/package.json +50 -0
  9. package/dist/lib/application/files/ts-esm/src/app.controller.__specFileSuffix__.ts +22 -0
  10. package/dist/lib/application/files/ts-esm/src/app.controller.ts +12 -0
  11. package/dist/lib/application/files/ts-esm/src/app.module.ts +10 -0
  12. package/dist/lib/application/files/ts-esm/src/app.service.ts +8 -0
  13. package/dist/lib/application/files/ts-esm/src/main.ts +8 -0
  14. package/dist/lib/application/files/ts-esm/test/app.e2e-__specFileSuffix__.ts +25 -0
  15. package/dist/lib/application/files/ts-esm/tsconfig.build.json +4 -0
  16. package/dist/lib/application/files/ts-esm/tsconfig.json +24 -0
  17. package/dist/lib/application/files/ts-esm/vitest.config.e2e.ts +10 -0
  18. package/dist/lib/application/files/ts-esm/vitest.config.ts +10 -0
  19. package/dist/lib/application/schema.json +14 -0
  20. package/dist/lib/library/files/ts/tsconfig.lib.json +1 -0
  21. package/dist/lib/sub-app/files/ts/tsconfig.app.json +1 -0
  22. package/dist/lib/sub-app/workspace/ts/tsconfig.app.json +1 -0
  23. package/package.json +21 -49
  24. package/dist/index.d.ts +0 -2
  25. package/dist/index.js +0 -18
  26. package/dist/lib/application/application.factory.d.ts +0 -3
  27. package/dist/lib/application/application.factory.js +0 -63
  28. package/dist/lib/class/class.factory.d.ts +0 -3
  29. package/dist/lib/class/class.factory.js +0 -51
  30. package/dist/lib/client-app/angular/angular.factory.d.ts +0 -3
  31. package/dist/lib/client-app/angular/angular.factory.js +0 -103
  32. package/dist/lib/configuration/configuration.factory.d.ts +0 -3
  33. package/dist/lib/configuration/configuration.factory.js +0 -27
  34. package/dist/lib/controller/controller.factory.d.ts +0 -3
  35. package/dist/lib/controller/controller.factory.js +0 -72
  36. package/dist/lib/decorator/decorator.factory.d.ts +0 -3
  37. package/dist/lib/decorator/decorator.factory.js +0 -35
  38. package/dist/lib/defaults.d.ts +0 -14
  39. package/dist/lib/defaults.js +0 -17
  40. package/dist/lib/filter/filter.factory.d.ts +0 -3
  41. package/dist/lib/filter/filter.factory.js +0 -43
  42. package/dist/lib/gateway/gateway.factory.d.ts +0 -3
  43. package/dist/lib/gateway/gateway.factory.js +0 -72
  44. package/dist/lib/guard/guard.factory.d.ts +0 -3
  45. package/dist/lib/guard/guard.factory.js +0 -43
  46. package/dist/lib/interceptor/interceptor.factory.d.ts +0 -3
  47. package/dist/lib/interceptor/interceptor.factory.js +0 -44
  48. package/dist/lib/interface/interface.factory.d.ts +0 -3
  49. package/dist/lib/interface/interface.factory.js +0 -34
  50. package/dist/lib/library/library.factory.d.ts +0 -3
  51. package/dist/lib/library/library.factory.js +0 -216
  52. package/dist/lib/middleware/middleware.factory.d.ts +0 -3
  53. package/dist/lib/middleware/middleware.factory.js +0 -43
  54. package/dist/lib/module/module.factory.d.ts +0 -3
  55. package/dist/lib/module/module.factory.js +0 -60
  56. package/dist/lib/pipe/pipe.factory.d.ts +0 -3
  57. package/dist/lib/pipe/pipe.factory.js +0 -44
  58. package/dist/lib/provider/provider.factory.d.ts +0 -3
  59. package/dist/lib/provider/provider.factory.js +0 -76
  60. package/dist/lib/readers/file-system.reader.d.ts +0 -10
  61. package/dist/lib/readers/file-system.reader.js +0 -45
  62. package/dist/lib/readers/index.d.ts +0 -2
  63. package/dist/lib/readers/index.js +0 -18
  64. package/dist/lib/readers/reader.d.ts +0 -7
  65. package/dist/lib/readers/reader.js +0 -2
  66. package/dist/lib/resolver/resolver.factory.d.ts +0 -3
  67. package/dist/lib/resolver/resolver.factory.js +0 -71
  68. package/dist/lib/resource/resource.factory.d.ts +0 -3
  69. package/dist/lib/resource/resource.factory.js +0 -145
  70. package/dist/lib/service/service.factory.d.ts +0 -3
  71. package/dist/lib/service/service.factory.js +0 -74
  72. package/dist/lib/sub-app/sub-app.factory.d.ts +0 -3
  73. package/dist/lib/sub-app/sub-app.factory.js +0 -271
  74. package/dist/utils/dependencies.utils.d.ts +0 -15
  75. package/dist/utils/dependencies.utils.js +0 -42
  76. package/dist/utils/formatting.d.ts +0 -1
  77. package/dist/utils/formatting.js +0 -12
  78. package/dist/utils/index.d.ts +0 -11
  79. package/dist/utils/index.js +0 -27
  80. package/dist/utils/jest-module-mapper.d.ts +0 -1
  81. package/dist/utils/jest-module-mapper.js +0 -9
  82. package/dist/utils/json-file.util.d.ts +0 -15
  83. package/dist/utils/json-file.util.js +0 -72
  84. package/dist/utils/metadata.manager.d.ts +0 -13
  85. package/dist/utils/metadata.manager.js +0 -175
  86. package/dist/utils/module-import.declarator.d.ts +0 -10
  87. package/dist/utils/module-import.declarator.js +0 -40
  88. package/dist/utils/module-metadata.declarator.d.ts +0 -4
  89. package/dist/utils/module-metadata.declarator.js +0 -12
  90. package/dist/utils/module.declarator.d.ts +0 -23
  91. package/dist/utils/module.declarator.js +0 -34
  92. package/dist/utils/module.finder.d.ts +0 -13
  93. package/dist/utils/module.finder.js +0 -25
  94. package/dist/utils/name.parser.d.ts +0 -12
  95. package/dist/utils/name.parser.js +0 -17
  96. package/dist/utils/object-sorting.d.ts +0 -1
  97. package/dist/utils/object-sorting.js +0 -13
  98. package/dist/utils/path.solver.d.ts +0 -4
  99. package/dist/utils/path.solver.js +0 -12
  100. package/dist/utils/source-root.helpers.d.ts +0 -6
  101. package/dist/utils/source-root.helpers.js +0 -24
@@ -22,17 +22,17 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@nestjs/testing": "^11.0.1",
25
- "@babel/core": "7.28.4",
26
- "@babel/node": "7.28.0",
27
- "@babel/plugin-proposal-decorators": "7.28.0",
28
- "@babel/plugin-transform-runtime": "7.28.3",
29
- "@babel/preset-env": "7.28.3",
30
- "@babel/register": "7.28.3",
31
- "@babel/runtime": "7.28.4",
25
+ "@babel/core": "7.29.0",
26
+ "@babel/node": "7.29.0",
27
+ "@babel/plugin-proposal-decorators": "7.29.0",
28
+ "@babel/plugin-transform-runtime": "7.29.0",
29
+ "@babel/preset-env": "7.29.0",
30
+ "@babel/register": "7.28.6",
31
+ "@babel/runtime": "7.28.6",
32
32
  "jest": "30.2.0",
33
- "nodemon": "3.1.10",
34
- "prettier": "3.6.2",
35
- "supertest": "7.1.4"
33
+ "nodemon": "3.1.14",
34
+ "prettier": "3.8.1",
35
+ "supertest": "7.2.2"
36
36
  },
37
37
  "jest": {
38
38
  "moduleFileExtensions": [
@@ -34,12 +34,12 @@
34
34
  "@nestjs/testing": "^11.0.1",
35
35
  "@types/express": "^5.0.0",
36
36
  "@types/jest": "^30.0.0",
37
- "@types/node": "^22.10.7",
38
- "@types/supertest": "^6.0.2",
37
+ "@types/node": "^24.0.0",
38
+ "@types/supertest": "^7.0.0",
39
39
  "eslint": "^9.18.0",
40
40
  "eslint-config-prettier": "^10.0.1",
41
41
  "eslint-plugin-prettier": "^5.2.2",
42
- "globals": "^16.0.0",
42
+ "globals": "^17.0.0",
43
43
  "jest": "^30.0.0",
44
44
  "prettier": "^3.4.2",
45
45
  "source-map-support": "^0.5.21",
@@ -13,7 +13,6 @@
13
13
  "target": "ES2023",
14
14
  "sourceMap": true,
15
15
  "outDir": "./dist",
16
- "baseUrl": "./",
17
16
  "incremental": true,
18
17
  "skipLibCheck": true,
19
18
  "strictNullChecks": true,
@@ -0,0 +1,4 @@
1
+ {
2
+ "singleQuote": true,
3
+ "trailingComma": "all"
4
+ }
@@ -0,0 +1,98 @@
1
+ <p align="center">
2
+ <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
3
+ </p>
4
+
5
+ [circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
6
+ [circleci-url]: https://circleci.com/gh/nestjs/nest
7
+
8
+ <p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
11
+ <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
12
+ <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
13
+ <a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
14
+ <a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
15
+ <a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
16
+ <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
17
+ <a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a>
18
+ <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
19
+ <a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a>
20
+ </p>
21
+ <!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
22
+ [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
23
+
24
+ ## Description
25
+
26
+ [Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
27
+
28
+ ## Project setup
29
+
30
+ ```bash
31
+ $ <%= packageManager %> install
32
+ ```
33
+
34
+ ## Compile and run the project
35
+
36
+ ```bash
37
+ # development
38
+ $ <%= packageManager %> run start
39
+
40
+ # watch mode
41
+ $ <%= packageManager %> run start:dev
42
+
43
+ # production mode
44
+ $ <%= packageManager %> run start:prod
45
+ ```
46
+
47
+ ## Run tests
48
+
49
+ ```bash
50
+ # unit tests
51
+ $ <%= packageManager %> run test
52
+
53
+ # e2e tests
54
+ $ <%= packageManager %> run test:e2e
55
+
56
+ # test coverage
57
+ $ <%= packageManager %> run test:cov
58
+ ```
59
+
60
+ ## Deployment
61
+
62
+ When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.
63
+
64
+ If you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
65
+
66
+ ```bash
67
+ $ <%= packageManager %> install -g @nestjs/mau
68
+ $ mau deploy
69
+ ```
70
+
71
+ With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
72
+
73
+ ## Resources
74
+
75
+ Check out a few resources that may come in handy when working with NestJS:
76
+
77
+ - Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
78
+ - For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
79
+ - To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
80
+ - Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.
81
+ - Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
82
+ - Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
83
+ - To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
84
+ - Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).
85
+
86
+ ## Support
87
+
88
+ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
89
+
90
+ ## Stay in touch
91
+
92
+ - Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
93
+ - Website - [https://nestjs.com](https://nestjs.com/)
94
+ - Twitter - [@nestframework](https://twitter.com/nestframework)
95
+
96
+ ## License
97
+
98
+ Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).
@@ -0,0 +1,34 @@
1
+ // @ts-check
2
+ import eslint from '@eslint/js';
3
+ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
4
+ import globals from 'globals';
5
+ import tseslint from 'typescript-eslint';
6
+
7
+ export default tseslint.config(
8
+ {
9
+ ignores: ['eslint.config.mjs'],
10
+ },
11
+ eslint.configs.recommended,
12
+ ...tseslint.configs.recommendedTypeChecked,
13
+ eslintPluginPrettierRecommended,
14
+ {
15
+ languageOptions: {
16
+ globals: {
17
+ ...globals.node,
18
+ },
19
+ sourceType: 'module',
20
+ parserOptions: {
21
+ projectService: true,
22
+ tsconfigRootDir: import.meta.dirname,
23
+ },
24
+ },
25
+ },
26
+ {
27
+ rules: {
28
+ '@typescript-eslint/no-explicit-any': 'off',
29
+ '@typescript-eslint/no-floating-promises': 'warn',
30
+ '@typescript-eslint/no-unsafe-argument': 'warn',
31
+ "prettier/prettier": ["error", { endOfLine: "auto" }],
32
+ },
33
+ },
34
+ );
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/nest-cli",
3
+ "collection": "@nestjs/schematics",
4
+ "sourceRoot": "src",
5
+ "compilerOptions": {
6
+ "deleteOutDir": true
7
+ }
8
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "<%= name %>",
3
+ "version": "<%= version %>",
4
+ "description": "<%= description %>",
5
+ "author": "<%= author %>",
6
+ "private": true,
7
+ "license": "UNLICENSED",
8
+ "type": "module",
9
+ "scripts": {
10
+ "build": "nest build",
11
+ "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
12
+ "start": "nest start",
13
+ "start:dev": "nest start --watch",
14
+ "start:debug": "nest start --debug --watch",
15
+ "start:prod": "node dist/main",
16
+ "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
17
+ "test": "vitest run",
18
+ "test:watch": "vitest",
19
+ "test:cov": "vitest run --coverage",
20
+ "test:debug": "vitest --inspect-brk --no-file-parallelism",
21
+ "test:e2e": "vitest run --config ./vitest.config.e2e.ts"
22
+ },
23
+ "dependencies": {
24
+ "@nestjs/common": "^11.0.1",
25
+ "@nestjs/core": "^11.0.1",
26
+ "@nestjs/platform-express": "^11.0.1",
27
+ "reflect-metadata": "^0.2.2",
28
+ "rxjs": "^7.8.1"
29
+ },
30
+ "devDependencies": {
31
+ "@eslint/eslintrc": "^3.2.0",
32
+ "@eslint/js": "^9.18.0",
33
+ "@nestjs/cli": "^11.0.0",
34
+ "@nestjs/schematics": "^11.0.0",
35
+ "@nestjs/testing": "^11.0.1",
36
+ "@types/express": "^5.0.0",
37
+ "@types/node": "^24.0.0",
38
+ "@types/supertest": "^7.0.0",
39
+ "eslint": "^9.18.0",
40
+ "eslint-config-prettier": "^10.0.1",
41
+ "eslint-plugin-prettier": "^5.2.2",
42
+ "globals": "^17.0.0",
43
+ "prettier": "^3.4.2",
44
+ "source-map-support": "^0.5.21",
45
+ "supertest": "^7.0.0",
46
+ "typescript": "^5.7.3",
47
+ "typescript-eslint": "^8.20.0",
48
+ "vitest": "^4.0.0-beta.1"
49
+ }
50
+ }
@@ -0,0 +1,22 @@
1
+ import { Test, TestingModule } from '@nestjs/testing';
2
+ import { AppController } from './app.controller.js';
3
+ import { AppService } from './app.service.js';
4
+
5
+ describe('AppController', () => {
6
+ let appController: AppController;
7
+
8
+ beforeEach(async () => {
9
+ const app: TestingModule = await Test.createTestingModule({
10
+ controllers: [AppController],
11
+ providers: [AppService],
12
+ }).compile();
13
+
14
+ appController = app.get<AppController>(AppController);
15
+ });
16
+
17
+ describe('root', () => {
18
+ it('should return "Hello World!"', () => {
19
+ expect(appController.getHello()).toBe('Hello World!');
20
+ });
21
+ });
22
+ });
@@ -0,0 +1,12 @@
1
+ import { Controller, Get } from '@nestjs/common';
2
+ import { AppService } from './app.service.js';
3
+
4
+ @Controller()
5
+ export class AppController {
6
+ constructor(private readonly appService: AppService) {}
7
+
8
+ @Get()
9
+ getHello(): string {
10
+ return this.appService.getHello();
11
+ }
12
+ }
@@ -0,0 +1,10 @@
1
+ import { Module } from '@nestjs/common';
2
+ import { AppController } from './app.controller.js';
3
+ import { AppService } from './app.service.js';
4
+
5
+ @Module({
6
+ imports: [],
7
+ controllers: [AppController],
8
+ providers: [AppService],
9
+ })
10
+ export class AppModule {}
@@ -0,0 +1,8 @@
1
+ import { Injectable } from '@nestjs/common';
2
+
3
+ @Injectable()
4
+ export class AppService {
5
+ getHello(): string {
6
+ return 'Hello World!';
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ import { NestFactory } from '@nestjs/core';
2
+ import { AppModule } from './app.module.js';
3
+
4
+ async function bootstrap() {
5
+ const app = await NestFactory.create(AppModule);
6
+ await app.listen(process.env.PORT ?? 3000);
7
+ }
8
+ bootstrap();
@@ -0,0 +1,25 @@
1
+ import { Test, TestingModule } from '@nestjs/testing';
2
+ import { INestApplication } from '@nestjs/common';
3
+ import request from 'supertest';
4
+ import { App } from 'supertest/types';
5
+ import { AppModule } from './../src/app.module.js';
6
+
7
+ describe('AppController (e2e)', () => {
8
+ let app: INestApplication<App>;
9
+
10
+ beforeEach(async () => {
11
+ const moduleFixture: TestingModule = await Test.createTestingModule({
12
+ imports: [AppModule],
13
+ }).compile();
14
+
15
+ app = moduleFixture.createNestApplication();
16
+ await app.init();
17
+ });
18
+
19
+ it('/ (GET)', () => {
20
+ return request(app.getHttpServer())
21
+ .get('/')
22
+ .expect(200)
23
+ .expect('Hello World!');
24
+ });
25
+ });
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
4
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "nodenext",
4
+ "moduleResolution": "nodenext",
5
+ "resolvePackageJsonExports": true,
6
+ "esModuleInterop": true,
7
+ "isolatedModules": true,
8
+ "declaration": true,
9
+ "removeComments": true,
10
+ "emitDecoratorMetadata": true,
11
+ "experimentalDecorators": true,
12
+ "allowSyntheticDefaultImports": true,
13
+ "target": "ES2023",
14
+ "sourceMap": true,
15
+ "outDir": "./dist",
16
+ "incremental": true,
17
+ "skipLibCheck": true,
18
+ "strictNullChecks": true,
19
+ "forceConsistentCasingInFileNames": true,
20
+ "noImplicitAny": <%= strict %>,
21
+ "strictBindCallApply": <%= strict %>,
22
+ "noFallthroughCasesInSwitch": <%= strict %>
23
+ }
24
+ }
@@ -0,0 +1,10 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ globals: true,
6
+ rootDir: '.',
7
+ testRegex: '.e2e-spec.ts$',
8
+ root: './',
9
+ },
10
+ });
@@ -0,0 +1,10 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ globals: true,
6
+ rootDir: '.',
7
+ testRegex: '.*\.spec\.ts$',
8
+ root: './',
9
+ },
10
+ });
@@ -40,6 +40,20 @@
40
40
  "description": "Nest application version.",
41
41
  "default": "0.0.1"
42
42
  },
43
+ "type": {
44
+ "type": "string",
45
+ "description": "Nest application module type (CJS or ESM).",
46
+ "enum": ["cjs", "esm"],
47
+ "default": "cjs",
48
+ "x-prompt": {
49
+ "message": "Which module system would you like to use?",
50
+ "type": "list",
51
+ "items": [
52
+ { "value": "cjs", "label": "CJS (CommonJS)" },
53
+ { "value": "esm", "label": "ESM (ES Modules)" }
54
+ ]
55
+ }
56
+ },
43
57
  "language": {
44
58
  "type": "string",
45
59
  "description": "Nest application language."
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "extends": "../../tsconfig.json",
3
3
  "compilerOptions": {
4
+ "composite": true,
4
5
  "declaration": true,
5
6
  "outDir": "../../dist/libs/<%= name %>"
6
7
  },
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "extends": "../../tsconfig.json",
3
3
  "compilerOptions": {
4
+ "composite": true,
4
5
  "declaration": false,
5
6
  "outDir": "../../dist/apps/<%= name %>"
6
7
  },
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "extends": "../../tsconfig.json",
3
3
  "compilerOptions": {
4
+ "composite": true,
4
5
  "declaration": false,
5
6
  "outDir": "../../dist/apps/<%= name %>"
6
7
  },
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@nestjs/schematics",
3
- "version": "11.0.9",
3
+ "version": "12.0.0-alpha.1",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@schematics)",
5
+ "type": "module",
5
6
  "main": "dist/index.js",
6
7
  "files": [
7
8
  "dist/**/*"
@@ -11,8 +12,8 @@
11
12
  },
12
13
  "scripts": {
13
14
  "postbuild": "npm run copy:collection && npm run copy:lib",
14
- "build": "rm -rf dist && tsc --project tsconfig.lib.json",
15
- "clean": "gulp clean:src",
15
+ "build": "rm -rf dist && tsc -b tsconfig.lib.json",
16
+ "clean": "find src -type f \\( -name '*.js' -o -name '*.d.ts' -o -name '*.js.map' -o -name '*.d.ts.map' \\) -not -path '*/files/*' -not -path '*/workspace/*' -not -name '*.schema.d.ts' -delete",
16
17
  "copy:collection": "cpx src/collection.json dist && cpx 'src/lib/**/schema.json' dist/lib",
17
18
  "copy:lib": "cpx 'src/lib/**/{files,workspace}/**/*.*' dist/lib && cpx 'src/lib/**/{files,workspace}/**/.!(gitignore)' dist/lib",
18
19
  "lint": "eslint '{src,test}/**/*.ts' --fix",
@@ -20,8 +21,8 @@
20
21
  "publish:next": "npm publish --access public --tag next",
21
22
  "prepublish:npm": "npm run build",
22
23
  "publish:npm": "npm publish --access public",
23
- "test": "npm run clean && NODE_ENV=test jest -w 1 --no-cache --config jest.json",
24
- "test:dev": "NODE_ENV=test npm run -s test -- --watchAll",
24
+ "test": "npm run clean && NODE_ENV=test NODE_OPTIONS=\"--require tsx/cjs\" vitest run",
25
+ "test:dev": "NODE_ENV=test NODE_OPTIONS=\"--require tsx/cjs\" vitest",
25
26
  "prerelease": "npm run build",
26
27
  "release": "release-it",
27
28
  "prepare": "husky"
@@ -41,64 +42,35 @@
41
42
  },
42
43
  "homepage": "https://github.com/nestjs/schematics#readme",
43
44
  "dependencies": {
44
- "@angular-devkit/core": "19.2.17",
45
- "@angular-devkit/schematics": "19.2.17",
45
+ "@angular-devkit/core": "21.2.0",
46
+ "@angular-devkit/schematics": "21.2.0",
46
47
  "comment-json": "4.4.1",
47
48
  "jsonc-parser": "3.3.1",
48
49
  "pluralize": "8.0.0"
49
50
  },
50
51
  "devDependencies": {
51
- "@commitlint/cli": "20.1.0",
52
- "@commitlint/config-angular": "20.0.0",
53
- "@eslint/eslintrc": "3.3.1",
54
- "@eslint/js": "9.37.0",
55
- "@types/jest": "30.0.0",
56
- "@types/node": "22.18.9",
57
- "@typescript-eslint/eslint-plugin": "8.46.0",
58
- "@typescript-eslint/parser": "8.46.0",
52
+ "@commitlint/cli": "20.4.3",
53
+ "@commitlint/config-angular": "20.4.3",
54
+ "@eslint/js": "10.0.1",
55
+ "@types/node": "24.11.0",
59
56
  "cpx2": "8.0.0",
60
- "eslint": "9.37.0",
57
+ "eslint": "10.0.2",
61
58
  "eslint-config-prettier": "10.1.8",
62
- "eslint-plugin-import": "2.32.0",
63
- "eslint-plugin-prettier": "^5.2.1",
64
- "globals": "16.4.0",
65
- "gulp": "5.0.1",
66
- "gulp-clean": "0.4.0",
59
+ "eslint-plugin-prettier": "5.5.5",
60
+ "globals": "17.4.0",
67
61
  "husky": "9.1.7",
68
- "jest": "30.2.0",
69
- "nyc": "17.1.0",
70
- "prettier": "3.6.2",
71
- "release-it": "19.0.5",
72
- "ts-jest": "29.4.4",
73
- "ts-node": "10.9.2",
62
+ "jiti": "2.4.2",
63
+ "prettier": "3.8.1",
64
+ "release-it": "19.2.4",
74
65
  "typescript": "5.9.3",
75
- "typescript-eslint": "^8.15.0"
66
+ "typescript-eslint": "8.56.1",
67
+ "tsx": "^4.19.0",
68
+ "vitest": "^3.2.1"
76
69
  },
77
70
  "peerDependencies": {
78
71
  "typescript": ">=4.8.2"
79
72
  },
80
73
  "schematics": "./dist/collection.json",
81
- "nyc": {
82
- "include": [
83
- "src"
84
- ],
85
- "exclude": [
86
- "node_modules",
87
- "test"
88
- ],
89
- "extension": [
90
- ".ts"
91
- ],
92
- "require": [
93
- "ts-node/register"
94
- ],
95
- "reporter": [
96
- "text-summary",
97
- "html"
98
- ],
99
- "sourceMap": true,
100
- "instrument": true
101
- },
102
74
  "lint-staged": {
103
75
  "**/*.{ts,json}": []
104
76
  }
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './utils';
2
- export * from './lib/defaults';
package/dist/index.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./utils"), exports);
18
- __exportStar(require("./lib/defaults"), exports);
@@ -1,3 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- import { ApplicationOptions } from './application.schema';
3
- export declare function main(options: ApplicationOptions): Rule;