@nx/node 19.5.0-canary.20240704-28939dd → 19.5.0-canary.20240705-653cad2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/node",
3
- "version": "19.5.0-canary.20240704-28939dd",
3
+ "version": "19.5.0-canary.20240705-653cad2",
4
4
  "private": false,
5
5
  "description": "The Node Plugin for Nx contains generators to manage Node applications within an Nx workspace.",
6
6
  "repository": {
@@ -32,11 +32,11 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "tslib": "^2.3.0",
35
- "@nx/devkit": "19.5.0-canary.20240704-28939dd",
36
- "@nx/jest": "19.5.0-canary.20240704-28939dd",
37
- "@nx/js": "19.5.0-canary.20240704-28939dd",
38
- "@nx/eslint": "19.5.0-canary.20240704-28939dd",
39
- "@nrwl/node": "19.5.0-canary.20240704-28939dd"
35
+ "@nx/devkit": "19.5.0-canary.20240705-653cad2",
36
+ "@nx/jest": "19.5.0-canary.20240705-653cad2",
37
+ "@nx/js": "19.5.0-canary.20240705-653cad2",
38
+ "@nx/eslint": "19.5.0-canary.20240705-653cad2",
39
+ "@nrwl/node": "19.5.0-canary.20240705-653cad2"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
@@ -13,12 +13,16 @@ function normalizeOptions(tree, setupOptions) {
13
13
  }
14
14
  function addDocker(tree, options) {
15
15
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
16
+ const outputPath = projectConfig.targets[options.buildTarget]?.options['outputPath'];
16
17
  if (!projectConfig) {
17
18
  throw new Error(`Cannot find project configuration for ${options.project}`);
18
19
  }
20
+ if (!outputPath && !options.outputPath) {
21
+ throw new Error(`The output path for the project ${options.project} is not defined. Please provide it as an option to the generator.`);
22
+ }
19
23
  (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, './files'), projectConfig.root, {
20
24
  tmpl: '',
21
- buildLocation: options.outputPath,
25
+ buildLocation: options.outputPath ?? outputPath,
22
26
  project: options.project,
23
27
  });
24
28
  }