@nx/node 16.0.0-beta.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 (103) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +22 -0
  3. package/README.md +61 -0
  4. package/executors.json +26 -0
  5. package/generators.json +62 -0
  6. package/index.d.ts +3 -0
  7. package/index.js +10 -0
  8. package/index.js.map +1 -0
  9. package/migrations.json +60 -0
  10. package/package.json +48 -0
  11. package/src/executors/node/compat.d.ts +2 -0
  12. package/src/executors/node/compat.js +6 -0
  13. package/src/executors/node/compat.js.map +1 -0
  14. package/src/executors/node/node.impl.d.ts +4 -0
  15. package/src/executors/node/node.impl.js +14 -0
  16. package/src/executors/node/node.impl.js.map +1 -0
  17. package/src/executors/node/schema.json +74 -0
  18. package/src/executors/webpack/compat.d.ts +2 -0
  19. package/src/executors/webpack/compat.js +6 -0
  20. package/src/executors/webpack/compat.js.map +1 -0
  21. package/src/executors/webpack/schema.json +275 -0
  22. package/src/executors/webpack/webpack.impl.d.ts +8 -0
  23. package/src/executors/webpack/webpack.impl.js +19 -0
  24. package/src/executors/webpack/webpack.impl.js.map +1 -0
  25. package/src/generators/application/application.d.ts +10 -0
  26. package/src/generators/application/application.js +277 -0
  27. package/src/generators/application/application.js.map +1 -0
  28. package/src/generators/application/files/common/src/assets/.gitkeep +0 -0
  29. package/src/generators/application/files/common/src/main.ts__tmpl__ +1 -0
  30. package/src/generators/application/files/common/tsconfig.app.json +10 -0
  31. package/src/generators/application/files/common/tsconfig.json +10 -0
  32. package/src/generators/application/files/common/webpack.config.js__tmpl__ +8 -0
  33. package/src/generators/application/files/express/src/main.ts__tmpl__ +14 -0
  34. package/src/generators/application/files/fastify/src/app/app.spec.ts__tmpl__ +20 -0
  35. package/src/generators/application/files/fastify/src/app/app.ts__tmpl__ +27 -0
  36. package/src/generators/application/files/fastify/src/app/plugins/sensible.ts__tmpl__ +12 -0
  37. package/src/generators/application/files/fastify/src/app/routes/root.ts__tmpl__ +7 -0
  38. package/src/generators/application/files/fastify/src/main.ts__tmpl__ +23 -0
  39. package/src/generators/application/files/koa/src/main.ts__tmpl__ +14 -0
  40. package/src/generators/application/schema.d.ts +26 -0
  41. package/src/generators/application/schema.json +123 -0
  42. package/src/generators/e2e-project/e2e-project.d.ts +5 -0
  43. package/src/generators/e2e-project/e2e-project.js +108 -0
  44. package/src/generators/e2e-project/e2e-project.js.map +1 -0
  45. package/src/generators/e2e-project/files/cli/jest.config.ts__tmpl__ +14 -0
  46. package/src/generators/e2e-project/files/cli/src/__fileName__/__fileName__.spec.ts__tmpl__ +13 -0
  47. package/src/generators/e2e-project/files/cli/src/test-setup.ts__tmpl__ +1 -0
  48. package/src/generators/e2e-project/files/cli/tsconfig.json__tmpl__ +13 -0
  49. package/src/generators/e2e-project/files/cli/tsconfig.spec.json__tmpl__ +12 -0
  50. package/src/generators/e2e-project/files/server/common/jest.config.ts__tmpl__ +16 -0
  51. package/src/generators/e2e-project/files/server/common/src/__fileName__/__fileName__.spec.ts__tmpl__ +10 -0
  52. package/src/generators/e2e-project/files/server/common/src/support/global-setup.ts__tmpl__ +11 -0
  53. package/src/generators/e2e-project/files/server/common/src/support/global-teardown.ts__tmpl__ +7 -0
  54. package/src/generators/e2e-project/files/server/common/src/support/test-setup.ts__tmpl__ +10 -0
  55. package/src/generators/e2e-project/files/server/common/tsconfig.json__tmpl__ +13 -0
  56. package/src/generators/e2e-project/files/server/common/tsconfig.spec.json__tmpl__ +12 -0
  57. package/src/generators/e2e-project/files/server/nest/src/__fileName__/__fileName__.spec.ts__tmpl__ +10 -0
  58. package/src/generators/e2e-project/schema.d.ts +11 -0
  59. package/src/generators/e2e-project/schema.json +65 -0
  60. package/src/generators/init/init.d.ts +5 -0
  61. package/src/generators/init/init.js +37 -0
  62. package/src/generators/init/init.js.map +1 -0
  63. package/src/generators/init/schema.d.ts +6 -0
  64. package/src/generators/init/schema.json +27 -0
  65. package/src/generators/library/files/lib/package.json__tmpl__ +4 -0
  66. package/src/generators/library/files/lib/src/lib/__fileName__.spec.ts__tmpl__ +7 -0
  67. package/src/generators/library/files/lib/src/lib/__fileName__.ts__tmpl__ +3 -0
  68. package/src/generators/library/files/lib/tsconfig.lib.json +11 -0
  69. package/src/generators/library/library.d.ts +14 -0
  70. package/src/generators/library/library.js +108 -0
  71. package/src/generators/library/library.js.map +1 -0
  72. package/src/generators/library/schema.d.ts +24 -0
  73. package/src/generators/library/schema.json +129 -0
  74. package/src/generators/setup-docker/files/Dockerfile__tmpl__ +24 -0
  75. package/src/generators/setup-docker/schema.d.ts +6 -0
  76. package/src/generators/setup-docker/schema.json +29 -0
  77. package/src/generators/setup-docker/setup-docker.d.ts +6 -0
  78. package/src/generators/setup-docker/setup-docker.js +54 -0
  79. package/src/generators/setup-docker/setup-docker.js.map +1 -0
  80. package/src/migrations/update-13-0-0/remove-deprecated-options-13-0-0.d.ts +2 -0
  81. package/src/migrations/update-13-0-0/remove-deprecated-options-13-0-0.js +31 -0
  82. package/src/migrations/update-13-0-0/remove-deprecated-options-13-0-0.js.map +1 -0
  83. package/src/migrations/update-13-0-0/remove-webpack-5-packages-13-0-0.d.ts +2 -0
  84. package/src/migrations/update-13-0-0/remove-webpack-5-packages-13-0-0.js +33 -0
  85. package/src/migrations/update-13-0-0/remove-webpack-5-packages-13-0-0.js.map +1 -0
  86. package/src/migrations/update-13-8-5/rename-build-to-webpack.d.ts +2 -0
  87. package/src/migrations/update-13-8-5/rename-build-to-webpack.js +17 -0
  88. package/src/migrations/update-13-8-5/rename-build-to-webpack.js.map +1 -0
  89. package/src/migrations/update-13-8-5/rename-execute-to-node.d.ts +2 -0
  90. package/src/migrations/update-13-8-5/rename-execute-to-node.js +17 -0
  91. package/src/migrations/update-13-8-5/rename-execute-to-node.js.map +1 -0
  92. package/src/migrations/update-13-8-5/update-package-to-tsc.d.ts +2 -0
  93. package/src/migrations/update-13-8-5/update-package-to-tsc.js +39 -0
  94. package/src/migrations/update-13-8-5/update-package-to-tsc.js.map +1 -0
  95. package/src/migrations/update-14-7-6/update-webpack-executor.d.ts +2 -0
  96. package/src/migrations/update-14-7-6/update-webpack-executor.js +21 -0
  97. package/src/migrations/update-14-7-6/update-webpack-executor.js.map +1 -0
  98. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
  99. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
  100. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
  101. package/src/utils/versions.d.ts +13 -0
  102. package/src/utils/versions.js +17 -0
  103. package/src/utils/versions.js.map +1 -0
@@ -0,0 +1,275 @@
1
+ {
2
+ "version": 2,
3
+ "outputCapture": "direct-nodejs",
4
+ "title": "Node Application Build Target",
5
+ "description": "Node application build target options for Build Facade.",
6
+ "cli": "nx",
7
+ "type": "object",
8
+ "properties": {
9
+ "main": {
10
+ "type": "string",
11
+ "description": "The name of the main entry-point file.",
12
+ "x-completion-type": "file",
13
+ "x-completion-glob": "main@(.js|.ts)"
14
+ },
15
+ "tsConfig": {
16
+ "type": "string",
17
+ "description": "The name of the Typescript configuration file.",
18
+ "x-completion-type": "file",
19
+ "x-completion-glob": "tsconfig.*.json"
20
+ },
21
+ "outputPath": {
22
+ "type": "string",
23
+ "description": "The output path of the generated files.",
24
+ "x-completion-type": "directory",
25
+ "x-priority": "important"
26
+ },
27
+ "deleteOutputPath": {
28
+ "type": "boolean",
29
+ "description": "Delete the output path before building.",
30
+ "default": true
31
+ },
32
+ "watch": {
33
+ "type": "boolean",
34
+ "description": "Run build when files change.",
35
+ "default": false
36
+ },
37
+ "watchOptions": {
38
+ "type": "object",
39
+ "description": "A set of options used to customize watch mode.",
40
+ "properties": {
41
+ "aggregateTimeout": {
42
+ "type": "integer"
43
+ },
44
+ "ignored": {
45
+ "oneOf": [
46
+ {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "string"
50
+ }
51
+ },
52
+ {
53
+ "type": "string"
54
+ }
55
+ ]
56
+ },
57
+ "poll": {
58
+ "type": "integer"
59
+ },
60
+ "followSymlinks": {
61
+ "type": "boolean"
62
+ },
63
+ "stdin": {
64
+ "type": "boolean"
65
+ }
66
+ }
67
+ },
68
+ "poll": {
69
+ "type": "number",
70
+ "description": "Frequency of file watcher in ms."
71
+ },
72
+ "sourceMap": {
73
+ "type": "boolean",
74
+ "description": "Produce source maps.",
75
+ "default": true
76
+ },
77
+ "progress": {
78
+ "type": "boolean",
79
+ "description": "Log progress to the console while building.",
80
+ "default": false
81
+ },
82
+ "assets": {
83
+ "type": "array",
84
+ "description": "List of static application assets.",
85
+ "default": [],
86
+ "items": {
87
+ "$ref": "#/definitions/assetPattern"
88
+ }
89
+ },
90
+ "externalDependencies": {
91
+ "oneOf": [
92
+ {
93
+ "type": "string",
94
+ "enum": ["none", "all"]
95
+ },
96
+ {
97
+ "type": "array",
98
+ "items": {
99
+ "type": "string"
100
+ }
101
+ }
102
+ ],
103
+ "description": "Dependencies to keep external to the bundle. (`all` (default), `none`, or an array of module names)",
104
+ "default": "all"
105
+ },
106
+ "statsJson": {
107
+ "type": "boolean",
108
+ "description": "Generates a `stats.json` file which can be analyzed using tools such as: `webpack-bundle-analyzer` or `<https://webpack.github.io/analyse>`.",
109
+ "default": false
110
+ },
111
+ "verbose": {
112
+ "type": "boolean",
113
+ "description": "Emits verbose output",
114
+ "default": false
115
+ },
116
+ "extractLicenses": {
117
+ "type": "boolean",
118
+ "description": "Extract all licenses in a separate file, in the case of production builds only.",
119
+ "default": false
120
+ },
121
+ "optimization": {
122
+ "type": "boolean",
123
+ "description": "Defines the optimization level of the build.",
124
+ "default": false
125
+ },
126
+ "maxWorkers": {
127
+ "type": "number",
128
+ "description": "Number of workers to use for type checking. (defaults to # of CPUS)"
129
+ },
130
+ "memoryLimit": {
131
+ "type": "number",
132
+ "description": "Memory limit for type checking service process in MB. (defaults to `2048`)",
133
+ "default": 2048
134
+ },
135
+ "fileReplacements": {
136
+ "description": "Replace files with other files in the build.",
137
+ "type": "array",
138
+ "items": {
139
+ "type": "object",
140
+ "properties": {
141
+ "replace": {
142
+ "type": "string",
143
+ "description": "The file to be replaced.",
144
+ "x-completion-type": "file"
145
+ },
146
+ "with": {
147
+ "type": "string",
148
+ "description": "The file to replace with.",
149
+ "x-completion-type": "file"
150
+ }
151
+ },
152
+ "additionalProperties": false,
153
+ "required": ["replace", "with"]
154
+ },
155
+ "default": []
156
+ },
157
+ "webpackConfig": {
158
+ "oneOf": [
159
+ {
160
+ "type": "array",
161
+ "items": {
162
+ "type": "string",
163
+ "x-completion-type": "file",
164
+ "x-completion-glob": "webpack?(*)@(.js|.ts)"
165
+ }
166
+ },
167
+ {
168
+ "type": "string",
169
+ "x-completion-type": "file",
170
+ "x-completion-glob": "webpack?(*)@(.js|.ts)"
171
+ }
172
+ ],
173
+ "description": "Path to a function which takes a webpack config, context and returns the resulting webpack config. See https://nx.dev/guides/customize-webpack"
174
+ },
175
+ "buildLibsFromSource": {
176
+ "type": "boolean",
177
+ "description": "Read buildable libraries from source instead of building them separately.",
178
+ "default": true
179
+ },
180
+ "generatePackageJson": {
181
+ "type": "boolean",
182
+ "description": "Generates a `package.json` and pruned lock file with the project's `node_module` dependencies populated for installing in a container. If a `package.json` exists in the project's directory, it will be reused with dependencies populated.",
183
+ "default": false
184
+ },
185
+ "transformers": {
186
+ "type": "array",
187
+ "description": "List of TypeScript Compiler Transfomers Plugins.",
188
+ "default": [],
189
+ "aliases": ["tsPlugins"],
190
+ "items": {
191
+ "$ref": "#/definitions/transformerPattern"
192
+ }
193
+ },
194
+ "additionalEntryPoints": {
195
+ "type": "array",
196
+ "items": {
197
+ "type": "object",
198
+ "properties": {
199
+ "entryName": {
200
+ "type": "string",
201
+ "description": "Name of the additional entry file."
202
+ },
203
+ "entryPath": {
204
+ "type": "string",
205
+ "description": "Path to the additional entry file.",
206
+ "x-completion-type": "file",
207
+ "x-completion-glob": "**/*@(.js|.ts)"
208
+ }
209
+ }
210
+ }
211
+ },
212
+ "outputFileName": {
213
+ "type": "string",
214
+ "description": "Name of the main output file. (defaults to `main.js`)",
215
+ "default": "main.js"
216
+ }
217
+ },
218
+ "required": ["tsConfig", "main"],
219
+ "definitions": {
220
+ "assetPattern": {
221
+ "oneOf": [
222
+ {
223
+ "type": "object",
224
+ "properties": {
225
+ "glob": {
226
+ "type": "string",
227
+ "description": "The pattern to match."
228
+ },
229
+ "input": {
230
+ "type": "string",
231
+ "description": "The input directory path in which to apply `glob`. Defaults to the project root."
232
+ },
233
+ "ignore": {
234
+ "description": "An array of globs to ignore.",
235
+ "type": "array",
236
+ "items": {
237
+ "type": "string"
238
+ }
239
+ },
240
+ "output": {
241
+ "type": "string",
242
+ "description": "Absolute path within the output."
243
+ }
244
+ },
245
+ "additionalProperties": false,
246
+ "required": ["glob", "input", "output"]
247
+ },
248
+ {
249
+ "type": "string"
250
+ }
251
+ ]
252
+ },
253
+ "transformerPattern": {
254
+ "oneOf": [
255
+ {
256
+ "type": "string"
257
+ },
258
+ {
259
+ "type": "object",
260
+ "properties": {
261
+ "name": {
262
+ "type": "string"
263
+ },
264
+ "options": {
265
+ "type": "object",
266
+ "additionalProperties": true
267
+ }
268
+ },
269
+ "additionalProperties": false,
270
+ "required": ["name"]
271
+ }
272
+ ]
273
+ }
274
+ }
275
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * For backwards compat.
3
+ * TODO(v16): Remove in Nx 16.
4
+ */
5
+ import { ExecutorContext } from '@nx/devkit';
6
+ import type { WebpackExecutorOptions } from '@nx/webpack';
7
+ export declare function webpackExecutor(options: WebpackExecutorOptions, context: ExecutorContext): AsyncGenerator<import("@nx/webpack").WebpackExecutorEvent, void, undefined>;
8
+ export default webpackExecutor;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.webpackExecutor = void 0;
4
+ const tslib_1 = require("tslib");
5
+ /**
6
+ * For backwards compat.
7
+ * TODO(v16): Remove in Nx 16.
8
+ */
9
+ const devkit_1 = require("@nx/devkit");
10
+ const webpack_1 = require("@nx/webpack");
11
+ function webpackExecutor(options, context) {
12
+ return tslib_1.__asyncGenerator(this, arguments, function* webpackExecutor_1() {
13
+ devkit_1.logger.warn('"@nrwl/node:webpack" executor is deprecated. Use "@nrwl/webpack:webpack" instead in your project.json.');
14
+ yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, webpack_1.webpackExecutor)(Object.assign(Object.assign({}, options), { target: 'node', compiler: 'tsc', scripts: [], styles: [] }), context))));
15
+ });
16
+ }
17
+ exports.webpackExecutor = webpackExecutor;
18
+ exports.default = webpackExecutor;
19
+ //# sourceMappingURL=webpack.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webpack.impl.js","sourceRoot":"","sources":["../../../../../../packages/node/src/executors/webpack/webpack.impl.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAAqD;AAErD,yCAAqE;AAErE,SAAuB,eAAe,CACpC,OAA+B,EAC/B,OAAwB;;QAExB,eAAM,CAAC,IAAI,CACT,wGAAwG,CACzG,CAAC;QACF,sBAAA,KAAK,CAAC,CAAC,yBAAA,sBAAA,IAAA,yBAAmB,kCAEnB,OAAO,KACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,KAAK,EACf,OAAO,EAAE,EAAE,EACX,MAAM,EAAE,EAAE,KAEZ,OAAO,CACR,CAAA,CAAA,CAAA,CAAC;IACJ,CAAC;CAAA;AAjBD,0CAiBC;AAED,kBAAe,eAAe,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { GeneratorCallback, Tree } from '@nx/devkit';
2
+ import { Schema } from './schema';
3
+ export interface NormalizedSchema extends Schema {
4
+ appProjectRoot: string;
5
+ parsedTags: string[];
6
+ }
7
+ export declare function addLintingToApplication(tree: Tree, options: NormalizedSchema): Promise<GeneratorCallback>;
8
+ export declare function applicationGenerator(tree: Tree, schema: Schema): Promise<any>;
9
+ export default applicationGenerator;
10
+ export declare const applicationSchematic: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
@@ -0,0 +1,277 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.applicationSchematic = exports.applicationGenerator = exports.addLintingToApplication = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const linter_1 = require("@nx/linter");
7
+ const jest_1 = require("@nx/jest");
8
+ const js_1 = require("@nx/js");
9
+ const path_1 = require("path");
10
+ const init_1 = require("../init/init");
11
+ const versions_1 = require("../../utils/versions");
12
+ const e2e_project_1 = require("../e2e-project/e2e-project");
13
+ const setup_docker_1 = require("../setup-docker/setup-docker");
14
+ const lint_project_1 = require("@nx/linter/src/generators/lint-project/lint-project");
15
+ function getWebpackBuildConfig(project, options) {
16
+ return {
17
+ executor: `@nrwl/webpack:webpack`,
18
+ outputs: ['{options.outputPath}'],
19
+ defaultConfiguration: 'production',
20
+ options: {
21
+ target: 'node',
22
+ compiler: 'tsc',
23
+ outputPath: (0, devkit_1.joinPathFragments)('dist', options.rootProject ? options.name : options.appProjectRoot),
24
+ main: (0, devkit_1.joinPathFragments)(project.sourceRoot, 'main' + (options.js ? '.js' : '.ts')),
25
+ tsConfig: (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json'),
26
+ assets: [(0, devkit_1.joinPathFragments)(project.sourceRoot, 'assets')],
27
+ isolatedConfig: true,
28
+ webpackConfig: (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'webpack.config.js'),
29
+ },
30
+ configurations: {
31
+ development: {},
32
+ production: Object.assign({}, (options.docker && { generateLockfile: true })),
33
+ },
34
+ };
35
+ }
36
+ function getEsBuildConfig(project, options) {
37
+ return {
38
+ executor: '@nrwl/esbuild:esbuild',
39
+ outputs: ['{options.outputPath}'],
40
+ defaultConfiguration: 'production',
41
+ options: {
42
+ platform: 'node',
43
+ outputPath: (0, devkit_1.joinPathFragments)('dist', options.rootProject ? options.name : options.appProjectRoot),
44
+ // Use CJS for Node apps for widest compatibility.
45
+ format: ['cjs'],
46
+ bundle: false,
47
+ main: (0, devkit_1.joinPathFragments)(project.sourceRoot, 'main' + (options.js ? '.js' : '.ts')),
48
+ tsConfig: (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json'),
49
+ assets: [(0, devkit_1.joinPathFragments)(project.sourceRoot, 'assets')],
50
+ generatePackageJson: true,
51
+ esbuildOptions: {
52
+ sourcemap: true,
53
+ // Generate CJS files as .js so imports can be './foo' rather than './foo.cjs'.
54
+ outExtension: { '.js': '.js' },
55
+ },
56
+ },
57
+ configurations: {
58
+ development: {},
59
+ production: Object.assign(Object.assign({}, (options.docker && { generateLockfile: true })), { esbuildOptions: {
60
+ sourcemap: false,
61
+ // Generate CJS files as .js so imports can be './foo' rather than './foo.cjs'.
62
+ outExtension: { '.js': '.js' },
63
+ } }),
64
+ },
65
+ };
66
+ }
67
+ function getServeConfig(options) {
68
+ return {
69
+ executor: '@nrwl/js:node',
70
+ defaultConfiguration: 'development',
71
+ options: {
72
+ buildTarget: `${options.name}:build`,
73
+ },
74
+ configurations: {
75
+ development: {
76
+ buildTarget: `${options.name}:build:development`,
77
+ },
78
+ production: {
79
+ buildTarget: `${options.name}:build:production`,
80
+ },
81
+ },
82
+ };
83
+ }
84
+ function addProject(tree, options) {
85
+ const project = {
86
+ root: options.appProjectRoot,
87
+ sourceRoot: (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'src'),
88
+ projectType: 'application',
89
+ targets: {},
90
+ tags: options.parsedTags,
91
+ };
92
+ project.targets.build =
93
+ options.bundler === 'esbuild'
94
+ ? getEsBuildConfig(project, options)
95
+ : getWebpackBuildConfig(project, options);
96
+ project.targets.serve = getServeConfig(options);
97
+ (0, devkit_1.addProjectConfiguration)(tree, options.name, project, options.standaloneConfig);
98
+ }
99
+ function addAppFiles(tree, options) {
100
+ (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, './files/common'), options.appProjectRoot, Object.assign(Object.assign({}, options), { tmpl: '', name: options.name, root: options.appProjectRoot, offset: (0, devkit_1.offsetFromRoot)(options.appProjectRoot), rootTsConfigPath: (0, js_1.getRelativePathToRootTsConfig)(tree, options.appProjectRoot) }));
101
+ if (options.bundler !== 'webpack') {
102
+ tree.delete((0, devkit_1.joinPathFragments)(options.appProjectRoot, 'webpack.config.js'));
103
+ }
104
+ if (options.framework && options.framework !== 'none') {
105
+ (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, `./files/${options.framework}`), options.appProjectRoot, Object.assign(Object.assign({}, options), { tmpl: '', name: options.name, root: options.appProjectRoot, offset: (0, devkit_1.offsetFromRoot)(options.appProjectRoot), rootTsConfigPath: (0, js_1.getRelativePathToRootTsConfig)(tree, options.appProjectRoot) }));
106
+ }
107
+ if (options.js) {
108
+ (0, devkit_1.toJS)(tree);
109
+ }
110
+ if (options.pascalCaseFiles) {
111
+ devkit_1.logger.warn('NOTE: --pascalCaseFiles is a noop');
112
+ }
113
+ }
114
+ function addProxy(tree, options) {
115
+ const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.frontendProject);
116
+ if (projectConfig.targets && projectConfig.targets.serve) {
117
+ const pathToProxyFile = `${projectConfig.root}/proxy.conf.json`;
118
+ projectConfig.targets.serve.options = Object.assign(Object.assign({}, projectConfig.targets.serve.options), { proxyConfig: pathToProxyFile });
119
+ if (!tree.exists(pathToProxyFile)) {
120
+ tree.write(pathToProxyFile, JSON.stringify({
121
+ '/api': {
122
+ target: `http://localhost:${options.port}`,
123
+ secure: false,
124
+ },
125
+ }, null, 2));
126
+ }
127
+ else {
128
+ //add new entry to existing config
129
+ const proxyFileContent = tree.read(pathToProxyFile).toString();
130
+ const proxyModified = Object.assign(Object.assign({}, JSON.parse(proxyFileContent)), { [`/${options.name}-api`]: {
131
+ target: `http://localhost:${options.port}`,
132
+ secure: false,
133
+ } });
134
+ tree.write(pathToProxyFile, JSON.stringify(proxyModified, null, 2));
135
+ }
136
+ (0, devkit_1.updateProjectConfiguration)(tree, options.frontendProject, projectConfig);
137
+ }
138
+ }
139
+ function addLintingToApplication(tree, options) {
140
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
141
+ const lintTask = yield (0, linter_1.lintProjectGenerator)(tree, {
142
+ linter: options.linter,
143
+ project: options.name,
144
+ tsConfigPaths: [
145
+ (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json'),
146
+ ],
147
+ eslintFilePatterns: [
148
+ (0, lint_project_1.mapLintPattern)(options.appProjectRoot, options.js ? 'js' : 'ts', options.rootProject),
149
+ ],
150
+ unitTestRunner: options.unitTestRunner,
151
+ skipFormat: true,
152
+ setParserOptionsProject: options.setParserOptionsProject,
153
+ rootProject: options.rootProject,
154
+ });
155
+ return lintTask;
156
+ });
157
+ }
158
+ exports.addLintingToApplication = addLintingToApplication;
159
+ function addProjectDependencies(tree, options) {
160
+ const bundlers = {
161
+ webpack: {
162
+ '@nrwl/webpack': versions_1.nxVersion,
163
+ },
164
+ esbuild: {
165
+ '@nrwl/esbuild': versions_1.nxVersion,
166
+ esbuild: versions_1.esbuildVersion,
167
+ },
168
+ };
169
+ const frameworkDependencies = {
170
+ express: {
171
+ express: versions_1.expressVersion,
172
+ '@types/express': versions_1.expressTypingsVersion,
173
+ },
174
+ koa: {
175
+ koa: versions_1.koaVersion,
176
+ '@types/koa': versions_1.koaTypingsVersion,
177
+ },
178
+ fastify: {
179
+ fastify: versions_1.fastifyVersion,
180
+ 'fastify-plugin': versions_1.fastifyPluginVersion,
181
+ '@fastify/autoload': versions_1.fastifyAutoloadVersion,
182
+ '@fastify/sensible': versions_1.fastifySensibleVersion,
183
+ },
184
+ };
185
+ const frameworkDevDependencies = {
186
+ express: {
187
+ '@types/express': versions_1.expressTypingsVersion,
188
+ },
189
+ koa: {
190
+ '@types/koa': versions_1.koaTypingsVersion,
191
+ },
192
+ fastify: {},
193
+ };
194
+ return (0, devkit_1.addDependenciesToPackageJson)(tree, Object.assign({}, frameworkDependencies[options.framework]), Object.assign(Object.assign({}, frameworkDevDependencies[options.framework]), bundlers[options.bundler]));
195
+ }
196
+ function updateTsConfigOptions(tree, options) {
197
+ (0, devkit_1.updateJson)(tree, `${options.appProjectRoot}/tsconfig.json`, (json) => {
198
+ if (options.rootProject) {
199
+ return Object.assign(Object.assign({ compilerOptions: Object.assign(Object.assign(Object.assign({}, js_1.tsConfigBaseOptions), json.compilerOptions), { esModuleInterop: true }) }, json), { extends: undefined, exclude: ['node_modules', 'tmp'] });
200
+ }
201
+ else {
202
+ return Object.assign(Object.assign({}, json), { compilerOptions: Object.assign(Object.assign({}, json.compilerOptions), { esModuleInterop: true }) });
203
+ }
204
+ });
205
+ }
206
+ function applicationGenerator(tree, schema) {
207
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
208
+ const options = normalizeOptions(tree, schema);
209
+ const tasks = [];
210
+ if (options.framework === 'nest') {
211
+ const { applicationGenerator } = (0, devkit_1.ensurePackage)('@nx/nest', versions_1.nxVersion);
212
+ return yield applicationGenerator(tree, Object.assign(Object.assign({}, options), { skipFormat: true }));
213
+ }
214
+ const initTask = yield (0, init_1.initGenerator)(tree, Object.assign(Object.assign({}, schema), { skipFormat: true }));
215
+ tasks.push(initTask);
216
+ const installTask = addProjectDependencies(tree, options);
217
+ tasks.push(installTask);
218
+ addAppFiles(tree, options);
219
+ addProject(tree, options);
220
+ updateTsConfigOptions(tree, options);
221
+ if (options.linter === linter_1.Linter.EsLint) {
222
+ const lintTask = yield addLintingToApplication(tree, options);
223
+ tasks.push(lintTask);
224
+ }
225
+ if (options.unitTestRunner === 'jest') {
226
+ const jestTask = yield (0, jest_1.jestProjectGenerator)(tree, Object.assign(Object.assign({}, options), { project: options.name, setupFile: 'none', skipSerializers: true, supportTsx: options.js, testEnvironment: 'node', compiler: 'tsc', skipFormat: true }));
227
+ tasks.push(jestTask);
228
+ }
229
+ else {
230
+ // No need for default spec file if unit testing is not setup.
231
+ tree.delete((0, devkit_1.joinPathFragments)(options.appProjectRoot, 'src/app/app.spec.ts'));
232
+ }
233
+ if (options.e2eTestRunner === 'jest') {
234
+ const e2eTask = yield (0, e2e_project_1.e2eProjectGenerator)(tree, Object.assign(Object.assign({}, options), { projectType: options.framework === 'none' ? 'cli' : 'server', name: options.rootProject ? 'e2e' : `${options.name}-e2e`, project: options.name, port: options.port, isNest: options.isNest, skipFormat: true }));
235
+ tasks.push(e2eTask);
236
+ }
237
+ if (options.js) {
238
+ (0, devkit_1.updateTsConfigsToJs)(tree, { projectRoot: options.appProjectRoot });
239
+ }
240
+ if (options.frontendProject) {
241
+ addProxy(tree, options);
242
+ }
243
+ if (options.docker) {
244
+ const dockerTask = yield (0, setup_docker_1.setupDockerGenerator)(tree, Object.assign(Object.assign({}, options), { project: options.name, skipFormat: true }));
245
+ tasks.push(dockerTask);
246
+ }
247
+ if (!options.skipFormat) {
248
+ yield (0, devkit_1.formatFiles)(tree);
249
+ }
250
+ return (0, devkit_1.runTasksInSerial)(...tasks);
251
+ });
252
+ }
253
+ exports.applicationGenerator = applicationGenerator;
254
+ function normalizeOptions(host, options) {
255
+ var _a, _b, _c, _d, _e, _f;
256
+ const { layoutDirectory, projectDirectory } = (0, devkit_1.extractLayoutDirectory)(options.directory);
257
+ const appsDir = layoutDirectory !== null && layoutDirectory !== void 0 ? layoutDirectory : (0, devkit_1.getWorkspaceLayout)(host).appsDir;
258
+ const appDirectory = projectDirectory
259
+ ? `${(0, devkit_1.names)(projectDirectory).fileName}/${(0, devkit_1.names)(options.name).fileName}`
260
+ : (0, devkit_1.names)(options.name).fileName;
261
+ const appProjectName = appDirectory.replace(new RegExp('/', 'g'), '-');
262
+ const appProjectRoot = options.rootProject
263
+ ? '.'
264
+ : (0, devkit_1.joinPathFragments)(appsDir, appDirectory);
265
+ options.bundler = (_a = options.bundler) !== null && _a !== void 0 ? _a : 'esbuild';
266
+ options.e2eTestRunner = (_b = options.e2eTestRunner) !== null && _b !== void 0 ? _b : 'jest';
267
+ const parsedTags = options.tags
268
+ ? options.tags.split(',').map((s) => s.trim())
269
+ : [];
270
+ return Object.assign(Object.assign({}, options), { name: (0, devkit_1.names)(appProjectName).fileName, frontendProject: options.frontendProject
271
+ ? (0, devkit_1.names)(options.frontendProject).fileName
272
+ : undefined, appProjectRoot,
273
+ parsedTags, linter: (_c = options.linter) !== null && _c !== void 0 ? _c : linter_1.Linter.EsLint, unitTestRunner: (_d = options.unitTestRunner) !== null && _d !== void 0 ? _d : 'jest', rootProject: (_e = options.rootProject) !== null && _e !== void 0 ? _e : false, port: (_f = options.port) !== null && _f !== void 0 ? _f : 3333 });
274
+ }
275
+ exports.default = applicationGenerator;
276
+ exports.applicationSchematic = (0, devkit_1.convertNxGenerator)(applicationGenerator);
277
+ //# sourceMappingURL=application.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../packages/node/src/generators/application/application.ts"],"names":[],"mappings":";;;;AAAA,uCAuBoB;AACpB,uCAA0D;AAC1D,mCAAgD;AAEhD,+BAA4E;AAC5E,+BAA4B;AAE5B,uCAA6C;AAC7C,mDAW8B;AAC9B,4DAAiE;AACjE,+DAAoE;AAGpE,sFAAqF;AAOrF,SAAS,qBAAqB,CAC5B,OAA6B,EAC7B,OAAyB;IAEzB,OAAO;QACL,QAAQ,EAAE,uBAAuB;QACjC,OAAO,EAAE,CAAC,sBAAsB,CAAC;QACjC,oBAAoB,EAAE,YAAY;QAClC,OAAO,EAAE;YACP,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,IAAA,0BAAiB,EAC3B,MAAM,EACN,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAC5D;YACD,IAAI,EAAE,IAAA,0BAAiB,EACrB,OAAO,CAAC,UAAU,EAClB,MAAM,GAAG,CAAC,OAAO,CAAC,EAAE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AAC,QAAQ;YACzC,CAAC,CAAC,SAAS,EACb,cAAc;QACd,UAAU,EACV,MAAM,EAAE,MAAA,OAAO,CAAC,MAAM,mCAAI,eAAM,CAAC,MAAM,EACvC,cAAc,EAAE,MAAA,OAAO,CAAC,cAAc,mCAAI,MAAM,EAChD,WAAW,EAAE,MAAA,OAAO,CAAC,WAAW,mCAAI,KAAK,EACzC,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,IAAI,IAC1B;AACJ,CAAC;AAED,kBAAe,oBAAoB,CAAC;AACvB,QAAA,oBAAoB,GAAG,IAAA,2BAAkB,EAAC,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ console.log('Hello World');
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "<%= offset %>dist/out-tsc",
5
+ "module": "commonjs",
6
+ "types": ["node"]
7
+ },
8
+ "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
9
+ "include": ["src/**/*.ts"]
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "<%= rootTsConfigPath %>",
3
+ "files": [],
4
+ "include": [],
5
+ "references": [
6
+ {
7
+ "path": "./tsconfig.app.json"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,8 @@
1
+ const { composePlugins, withNx} = require('@nrwl/webpack');
2
+
3
+ // Nx plugins for webpack.
4
+ module.exports = composePlugins(withNx(), (config) => {
5
+ // Update the webpack config as needed here.
6
+ // e.g. `config.plugins.push(new MyPlugin())`
7
+ return config;
8
+ });