@angular-devkit/build-angular 14.0.3 → 14.1.0-next.2

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.
@@ -35,6 +35,7 @@ const core_1 = require("@angular-devkit/core");
35
35
  const fs_1 = require("fs");
36
36
  const path_1 = require("path");
37
37
  const url_1 = require("url");
38
+ const error_1 = require("../../utils/error");
38
39
  const load_esm_1 = require("../../utils/load-esm");
39
40
  const webpack_browser_config_1 = require("../../utils/webpack-browser-config");
40
41
  const hmr_loader_1 = require("../plugins/hmr/hmr-loader");
@@ -187,6 +188,7 @@ async function addProxyConfig(root, proxyConfig) {
187
188
  return require(proxyPath);
188
189
  }
189
190
  catch (e) {
191
+ (0, error_1.assertIsError)(e);
190
192
  if (e.code === 'ERR_REQUIRE_ESM') {
191
193
  // Load the ESM configuration file using the TypeScript dynamic import workaround.
192
194
  // Once TypeScript provides support for keeping the dynamic import this workaround can be
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.IndexHtmlWebpackPlugin = void 0;
11
11
  const path_1 = require("path");
12
12
  const webpack_1 = require("webpack");
13
+ const error_1 = require("../../utils/error");
13
14
  const index_html_generator_1 = require("../../utils/index-file/index-html-generator");
14
15
  const webpack_diagnostics_1 = require("../../utils/webpack-diagnostics");
15
16
  const PLUGIN_NAME = 'index-html-webpack-plugin';
@@ -58,6 +59,7 @@ class IndexHtmlWebpackPlugin extends index_html_generator_1.IndexHtmlGenerator {
58
59
  errors.forEach((msg) => (0, webpack_diagnostics_1.addError)(this.compilation, msg));
59
60
  }
60
61
  catch (error) {
62
+ (0, error_1.assertIsError)(error);
61
63
  (0, webpack_diagnostics_1.addError)(this.compilation, error.message);
62
64
  }
63
65
  };
@@ -33,6 +33,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
33
33
  exports.JsonStatsPlugin = void 0;
34
34
  const fs_1 = require("fs");
35
35
  const path_1 = require("path");
36
+ const error_1 = require("../../utils/error");
36
37
  const webpack_diagnostics_1 = require("../../utils/webpack-diagnostics");
37
38
  class JsonStatsPlugin {
38
39
  constructor(statsOutputPath) {
@@ -50,6 +51,7 @@ class JsonStatsPlugin {
50
51
  .on('error', reject));
51
52
  }
52
53
  catch (error) {
54
+ (0, error_1.assertIsError)(error);
53
55
  (0, webpack_diagnostics_1.addError)(stats.compilation, `Unable to write stats file: ${error.message || 'unknown error'}`);
54
56
  }
55
57
  });
@@ -34,6 +34,7 @@ exports.postcss = void 0;
34
34
  const loader_utils_1 = require("loader-utils");
35
35
  const path = __importStar(require("path"));
36
36
  const url = __importStar(require("url"));
37
+ const error_1 = require("../../utils/error");
37
38
  function wrapUrl(url) {
38
39
  let wrappedUrl;
39
40
  const hasSingleQuotes = url.indexOf("'") >= 0;
@@ -146,6 +147,7 @@ function default_1(options) {
146
147
  processedUrl = await process(originalUrl, context, resourceCache);
147
148
  }
148
149
  catch (err) {
150
+ (0, error_1.assertIsError)(err);
149
151
  loader.emitError(decl.error(err.message, { word: originalUrl }));
150
152
  continue;
151
153
  }