@nx/angular 18.2.0-canary.20240327-82dc703 → 18.2.0-canary.20240328-7d2a420

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "18.2.0-canary.20240327-82dc703",
3
+ "version": "18.2.0-canary.20240328-7d2a420",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -78,14 +78,14 @@
78
78
  "tslib": "^2.3.0",
79
79
  "webpack": "^5.80.0",
80
80
  "webpack-merge": "^5.8.0",
81
- "@nx/devkit": "18.2.0-canary.20240327-82dc703",
82
- "@nx/js": "18.2.0-canary.20240327-82dc703",
83
- "@nx/eslint": "18.2.0-canary.20240327-82dc703",
84
- "@nx/webpack": "18.2.0-canary.20240327-82dc703",
85
- "@nx/web": "18.2.0-canary.20240327-82dc703",
86
- "@nx/workspace": "18.2.0-canary.20240327-82dc703",
81
+ "@nx/devkit": "18.2.0-canary.20240328-7d2a420",
82
+ "@nx/js": "18.2.0-canary.20240328-7d2a420",
83
+ "@nx/eslint": "18.2.0-canary.20240328-7d2a420",
84
+ "@nx/webpack": "18.2.0-canary.20240328-7d2a420",
85
+ "@nx/web": "18.2.0-canary.20240328-7d2a420",
86
+ "@nx/workspace": "18.2.0-canary.20240328-7d2a420",
87
87
  "piscina": "^4.4.0",
88
- "@nrwl/angular": "18.2.0-canary.20240327-82dc703"
88
+ "@nrwl/angular": "18.2.0-canary.20240328-7d2a420"
89
89
  },
90
90
  "peerDependencies": {
91
91
  "@angular-devkit/build-angular": ">= 15.0.0 < 18.0.0",
@@ -2,7 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildStaticRemotes = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const child_process_1 = require("child_process");
5
+ const cache_directory_1 = require("nx/src/utils/cache-directory");
6
+ const node_child_process_1 = require("node:child_process");
7
+ const node_path_1 = require("node:path");
8
+ const node_fs_1 = require("node:fs");
6
9
  async function buildStaticRemotes(staticRemotesConfig, nxBin, context, options) {
7
10
  if (!staticRemotesConfig.remotes.length) {
8
11
  return;
@@ -14,7 +17,7 @@ async function buildStaticRemotes(staticRemotesConfig, nxBin, context, options)
14
17
  process.env.NX_MF_DEV_SERVER_STATIC_REMOTES = JSON.stringify(mappedLocationOfRemotes);
15
18
  await new Promise((res) => {
16
19
  devkit_1.logger.info(`NX Building ${staticRemotesConfig.remotes.length} static remotes...`);
17
- const staticProcess = (0, child_process_1.fork)(nxBin, [
20
+ const staticProcess = (0, node_child_process_1.fork)(nxBin, [
18
21
  'run-many',
19
22
  `--target=build`,
20
23
  `--projects=${staticRemotesConfig.remotes.join(',')}`,
@@ -26,9 +29,13 @@ async function buildStaticRemotes(staticRemotesConfig, nxBin, context, options)
26
29
  cwd: context.root,
27
30
  stdio: ['ignore', 'pipe', 'pipe', 'ipc'],
28
31
  });
32
+ // File to debug build failures e.g. 2024-01-01T00_00_0_0Z-build.log'
33
+ const remoteBuildLogFile = (0, node_path_1.join)(cache_directory_1.projectGraphCacheDirectory, `${new Date().toISOString().replace(/[:\.]/g, '_')}-build.log`);
34
+ const stdoutStream = (0, node_fs_1.createWriteStream)(remoteBuildLogFile);
29
35
  staticProcess.stdout.on('data', (data) => {
30
36
  const ANSII_CODE_REGEX = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
31
37
  const stdoutString = data.toString().replace(ANSII_CODE_REGEX, '');
38
+ stdoutStream.write(stdoutString);
32
39
  if (stdoutString.includes('Successfully ran target build')) {
33
40
  staticProcess.stdout.removeAllListeners('data');
34
41
  devkit_1.logger.info(`NX Built ${staticRemotesConfig.remotes.length} static remotes`);
@@ -37,8 +44,9 @@ async function buildStaticRemotes(staticRemotesConfig, nxBin, context, options)
37
44
  });
38
45
  staticProcess.stderr.on('data', (data) => devkit_1.logger.info(data.toString()));
39
46
  staticProcess.on('exit', (code) => {
47
+ stdoutStream.end();
40
48
  if (code !== 0) {
41
- throw new Error(`Remotes failed to build. See above for errors.`);
49
+ throw new Error(`Remote failed to start. A complete log can be found in: ${remoteBuildLogFile}`);
42
50
  }
43
51
  });
44
52
  process.on('SIGTERM', () => staticProcess.kill('SIGTERM'));