@angular/build 18.0.3 → 18.1.0-next.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.
- package/package.json +17 -17
- package/src/builders/application/build-action.js +1 -2
- package/src/builders/application/execute-build.js +1 -2
- package/src/builders/application/execute-post-bundle.js +1 -2
- package/src/builders/application/i18n.js +2 -3
- package/src/builders/application/index.js +2 -3
- package/src/builders/application/options.d.ts +2 -2
- package/src/builders/application/options.js +1 -2
- package/src/builders/application/setup-bundling.js +2 -8
- package/src/builders/dev-server/builder.d.ts +0 -1
- package/src/builders/dev-server/builder.js +1 -2
- package/src/builders/dev-server/options.d.ts +4 -0
- package/src/builders/dev-server/options.js +26 -2
- package/src/builders/dev-server/schema.d.ts +10 -0
- package/src/builders/dev-server/schema.json +11 -0
- package/src/builders/dev-server/vite-server.js +42 -34
- package/src/builders/extract-i18n/application-extraction.js +1 -2
- package/src/builders/extract-i18n/builder.js +1 -2
- package/src/builders/extract-i18n/options.js +1 -2
- package/src/tools/babel/plugins/adjust-static-class-members.d.ts +0 -1
- package/src/tools/babel/plugins/adjust-static-class-members.js +2 -3
- package/src/tools/babel/plugins/adjust-typescript-enums.d.ts +0 -1
- package/src/tools/babel/plugins/adjust-typescript-enums.js +2 -3
- package/src/tools/babel/plugins/elide-angular-metadata.d.ts +0 -1
- package/src/tools/babel/plugins/elide-angular-metadata.js +2 -3
- package/src/tools/babel/plugins/pure-toplevel-functions.d.ts +0 -1
- package/src/tools/babel/plugins/pure-toplevel-functions.js +1 -1
- package/src/tools/esbuild/angular/angular-host.js +2 -3
- package/src/tools/esbuild/angular/compilation/aot-compilation.js +42 -7
- package/src/tools/esbuild/angular/compilation/factory.js +1 -2
- package/src/tools/esbuild/angular/compilation/jit-bootstrap-transformer.js +2 -3
- package/src/tools/esbuild/angular/compilation/parallel-worker.d.ts +2 -1
- package/src/tools/esbuild/angular/compilation/parallel-worker.js +10 -7
- package/src/tools/esbuild/angular/compilation-state.js +2 -2
- package/src/tools/esbuild/angular/compiler-plugin.js +15 -7
- package/src/tools/esbuild/angular/diagnostics.js +1 -2
- package/src/tools/esbuild/angular/jit-plugin-callbacks.js +1 -2
- package/src/tools/esbuild/angular/jit-resource-transformer.js +1 -2
- package/src/tools/esbuild/angular/uri.js +4 -4
- package/src/tools/esbuild/angular/web-worker-transformer.js +1 -2
- package/src/tools/esbuild/application-code-bundle.js +4 -5
- package/src/tools/esbuild/budget-stats.js +1 -2
- package/src/tools/esbuild/commonjs-checker.js +1 -2
- package/src/tools/esbuild/compiler-plugin-options.js +1 -2
- package/src/tools/esbuild/external-packages-plugin.js +1 -2
- package/src/tools/esbuild/global-scripts.js +1 -2
- package/src/tools/esbuild/global-styles.js +1 -2
- package/src/tools/esbuild/i18n-inliner-worker.d.ts +1 -1
- package/src/tools/esbuild/i18n-inliner-worker.js +1 -1
- package/src/tools/esbuild/i18n-locale-plugin.js +2 -2
- package/src/tools/esbuild/index-html-generator.js +1 -2
- package/src/tools/esbuild/javascript-transformer-worker.js +1 -1
- package/src/tools/esbuild/javascript-transformer.d.ts +1 -1
- package/src/tools/esbuild/license-extractor.js +1 -2
- package/src/tools/esbuild/load-result-cache.js +2 -2
- package/src/tools/esbuild/profiling.js +4 -5
- package/src/tools/esbuild/rxjs-esm-resolution-plugin.js +1 -2
- package/src/tools/esbuild/sourcemap-ignorelist-plugin.js +1 -2
- package/src/tools/esbuild/stylesheets/bundle-options.js +1 -2
- package/src/tools/esbuild/stylesheets/css-inline-fonts-plugin.js +1 -2
- package/src/tools/esbuild/stylesheets/css-resource-plugin.js +1 -2
- package/src/tools/esbuild/stylesheets/sass-language.js +2 -2
- package/src/tools/esbuild/utils.js +15 -16
- package/src/tools/esbuild/virtual-module-plugin.js +1 -2
- package/src/tools/esbuild/watcher.js +2 -2
- package/src/tools/sass/lexer.js +1 -2
- package/src/tools/sass/rebasing-importer.js +2 -2
- package/src/tools/sass/sass-service.js +3 -1
- package/src/tools/sass/worker.d.ts +2 -4
- package/src/tools/sass/worker.js +1 -1
- package/src/tools/vite/angular-memory-plugin.js +1 -2
- package/src/tools/vite/i18n-locale-plugin.js +2 -2
- package/src/utils/bundle-calculator.js +4 -4
- package/src/utils/check-port.js +1 -2
- package/src/utils/delete-output-dir.js +1 -2
- package/src/utils/error.js +1 -2
- package/src/utils/format-bytes.js +1 -2
- package/src/utils/i18n-options.js +2 -3
- package/src/utils/index-file/add-event-dispatch-contract.js +1 -2
- package/src/utils/index-file/augment-index-html.js +1 -2
- package/src/utils/index-file/html-rewriting-stream.js +1 -2
- package/src/utils/index-file/nonce.js +1 -2
- package/src/utils/load-esm.js +1 -2
- package/src/utils/load-proxy-config.js +1 -2
- package/src/utils/load-translations.js +1 -2
- package/src/utils/normalize-asset-patterns.js +2 -2
- package/src/utils/normalize-cache.js +2 -3
- package/src/utils/normalize-optimization.js +1 -2
- package/src/utils/normalize-source-maps.js +1 -2
- package/src/utils/postcss-configuration.js +3 -4
- package/src/utils/purge-cache.js +1 -2
- package/src/utils/resolve-assets.js +1 -2
- package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.js +3 -4
- package/src/utils/server-rendering/fetch-patch.js +1 -2
- package/src/utils/server-rendering/load-esm-from-memory.js +1 -2
- package/src/utils/server-rendering/prerender.js +1 -2
- package/src/utils/server-rendering/render-page.js +1 -2
- package/src/utils/service-worker.d.ts +0 -2
- package/src/utils/service-worker.js +3 -4
- package/src/utils/stats-table.js +2 -3
- package/src/utils/supported-browsers.js +1 -2
- package/src/utils/tty.js +1 -2
- package/src/utils/url.js +1 -2
- package/src/utils/version.js +1 -2
|
@@ -26,7 +26,7 @@ export declare class JavaScriptTransformer {
|
|
|
26
26
|
#private;
|
|
27
27
|
readonly maxThreads: number;
|
|
28
28
|
private readonly cache?;
|
|
29
|
-
constructor(options: JavaScriptTransformerOptions, maxThreads: number, cache?: Cache<Uint8Array
|
|
29
|
+
constructor(options: JavaScriptTransformerOptions, maxThreads: number, cache?: Cache<Uint8Array> | undefined);
|
|
30
30
|
/**
|
|
31
31
|
* Performs JavaScript transformations on a file from the filesystem.
|
|
32
32
|
* If no transformations are required, the data for the original file will be returned.
|
|
@@ -10,7 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.extractLicenses =
|
|
13
|
+
exports.extractLicenses = extractLicenses;
|
|
14
14
|
const promises_1 = require("node:fs/promises");
|
|
15
15
|
const node_path_1 = __importDefault(require("node:path"));
|
|
16
16
|
/**
|
|
@@ -155,4 +155,3 @@ async function extractLicenses(metafile, rootDirectory) {
|
|
|
155
155
|
}
|
|
156
156
|
return extractedLicenseContent;
|
|
157
157
|
}
|
|
158
|
-
exports.extractLicenses = extractLicenses;
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.MemoryLoadResultCache =
|
|
10
|
+
exports.MemoryLoadResultCache = void 0;
|
|
11
|
+
exports.createCachedLoad = createCachedLoad;
|
|
11
12
|
const node_path_1 = require("node:path");
|
|
12
13
|
function createCachedLoad(cache, callback) {
|
|
13
14
|
if (cache === undefined) {
|
|
@@ -31,7 +32,6 @@ function createCachedLoad(cache, callback) {
|
|
|
31
32
|
return result;
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
|
-
exports.createCachedLoad = createCachedLoad;
|
|
35
35
|
class MemoryLoadResultCache {
|
|
36
36
|
#loadResults = new Map();
|
|
37
37
|
#fileDependencies = new Map();
|
|
@@ -7,13 +7,15 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.resetCumulativeDurations = resetCumulativeDurations;
|
|
11
|
+
exports.logCumulativeDurations = logCumulativeDurations;
|
|
12
|
+
exports.profileAsync = profileAsync;
|
|
13
|
+
exports.profileSync = profileSync;
|
|
11
14
|
const environment_options_1 = require("../../utils/environment-options");
|
|
12
15
|
let cumulativeDurations;
|
|
13
16
|
function resetCumulativeDurations() {
|
|
14
17
|
cumulativeDurations?.clear();
|
|
15
18
|
}
|
|
16
|
-
exports.resetCumulativeDurations = resetCumulativeDurations;
|
|
17
19
|
function logCumulativeDurations() {
|
|
18
20
|
if (!environment_options_1.debugPerformance || !cumulativeDurations) {
|
|
19
21
|
return;
|
|
@@ -36,7 +38,6 @@ function logCumulativeDurations() {
|
|
|
36
38
|
console.log(`DURATION[${name}]: ${total.toFixed(9)}s [count: ${durations.length}; avg: ${average.toFixed(9)}s; min: ${min?.toFixed(9)}s; max: ${max?.toFixed(9)}s]`);
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
|
-
exports.logCumulativeDurations = logCumulativeDurations;
|
|
40
41
|
function recordDuration(name, startTime, cumulative) {
|
|
41
42
|
const duration = Number(process.hrtime.bigint() - startTime) / 10 ** 9;
|
|
42
43
|
if (cumulative) {
|
|
@@ -62,7 +63,6 @@ async function profileAsync(name, action, cumulative) {
|
|
|
62
63
|
recordDuration(name, startTime, cumulative);
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
exports.profileAsync = profileAsync;
|
|
66
66
|
function profileSync(name, action, cumulative) {
|
|
67
67
|
if (!environment_options_1.debugPerformance) {
|
|
68
68
|
return action();
|
|
@@ -75,4 +75,3 @@ function profileSync(name, action, cumulative) {
|
|
|
75
75
|
recordDuration(name, startTime, cumulative);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
exports.profileSync = profileSync;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.createRxjsEsmResolutionPlugin =
|
|
10
|
+
exports.createRxjsEsmResolutionPlugin = createRxjsEsmResolutionPlugin;
|
|
11
11
|
const RXJS_ESM_RESOLUTION = Symbol('RXJS_ESM_RESOLUTION');
|
|
12
12
|
/**
|
|
13
13
|
* Creates a plugin that forces ESM resolution of rxjs.
|
|
@@ -41,4 +41,3 @@ function createRxjsEsmResolutionPlugin() {
|
|
|
41
41
|
},
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
exports.createRxjsEsmResolutionPlugin = createRxjsEsmResolutionPlugin;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.createSourcemapIgnorelistPlugin =
|
|
10
|
+
exports.createSourcemapIgnorelistPlugin = createSourcemapIgnorelistPlugin;
|
|
11
11
|
/**
|
|
12
12
|
* The field identifier for the sourcemap Chrome Devtools ignore list extension.
|
|
13
13
|
*
|
|
@@ -70,4 +70,3 @@ function createSourcemapIgnorelistPlugin() {
|
|
|
70
70
|
},
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
exports.createSourcemapIgnorelistPlugin = createSourcemapIgnorelistPlugin;
|
|
@@ -10,7 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.createStylesheetBundleOptions =
|
|
13
|
+
exports.createStylesheetBundleOptions = createStylesheetBundleOptions;
|
|
14
14
|
const node_path_1 = __importDefault(require("node:path"));
|
|
15
15
|
const css_inline_fonts_plugin_1 = require("./css-inline-fonts-plugin");
|
|
16
16
|
const css_language_1 = require("./css-language");
|
|
@@ -61,4 +61,3 @@ function createStylesheetBundleOptions(options, cache, inlineComponentData) {
|
|
|
61
61
|
plugins,
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
exports.createStylesheetBundleOptions = createStylesheetBundleOptions;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.createCssInlineFontsPlugin =
|
|
10
|
+
exports.createCssInlineFontsPlugin = createCssInlineFontsPlugin;
|
|
11
11
|
const inline_fonts_1 = require("../../../utils/index-file/inline-fonts");
|
|
12
12
|
const load_result_cache_1 = require("../load-result-cache");
|
|
13
13
|
/**
|
|
@@ -54,4 +54,3 @@ function createCssInlineFontsPlugin({ cache, cacheOptions, }) {
|
|
|
54
54
|
},
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
exports.createCssInlineFontsPlugin = createCssInlineFontsPlugin;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.createCssResourcePlugin =
|
|
10
|
+
exports.createCssResourcePlugin = createCssResourcePlugin;
|
|
11
11
|
const promises_1 = require("node:fs/promises");
|
|
12
12
|
const node_path_1 = require("node:path");
|
|
13
13
|
const load_result_cache_1 = require("../load-result-cache");
|
|
@@ -111,4 +111,3 @@ function createCssResourcePlugin(cache) {
|
|
|
111
111
|
},
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
exports.createCssResourcePlugin = createCssResourcePlugin;
|
|
@@ -30,7 +30,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.SassStylesheetLanguage =
|
|
33
|
+
exports.SassStylesheetLanguage = void 0;
|
|
34
|
+
exports.shutdownSassWorkerPool = shutdownSassWorkerPool;
|
|
34
35
|
const node_path_1 = require("node:path");
|
|
35
36
|
const node_url_1 = require("node:url");
|
|
36
37
|
const cache_1 = require("../cache");
|
|
@@ -49,7 +50,6 @@ function shutdownSassWorkerPool() {
|
|
|
49
50
|
}
|
|
50
51
|
sassWorkerPoolPromise = undefined;
|
|
51
52
|
}
|
|
52
|
-
exports.shutdownSassWorkerPool = shutdownSassWorkerPool;
|
|
53
53
|
exports.SassStylesheetLanguage = Object.freeze({
|
|
54
54
|
name: 'sass',
|
|
55
55
|
componentFilter: /^s[ac]ss;/,
|
|
@@ -10,7 +10,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.
|
|
13
|
+
exports.logBuildStats = logBuildStats;
|
|
14
|
+
exports.calculateEstimatedTransferSizes = calculateEstimatedTransferSizes;
|
|
15
|
+
exports.withSpinner = withSpinner;
|
|
16
|
+
exports.withNoProgress = withNoProgress;
|
|
17
|
+
exports.getFeatureSupport = getFeatureSupport;
|
|
18
|
+
exports.writeResultFiles = writeResultFiles;
|
|
19
|
+
exports.emitFilesToDisk = emitFilesToDisk;
|
|
20
|
+
exports.createOutputFileFromText = createOutputFileFromText;
|
|
21
|
+
exports.createOutputFileFromData = createOutputFileFromData;
|
|
22
|
+
exports.convertOutputFile = convertOutputFile;
|
|
23
|
+
exports.transformSupportedBrowsersToTargets = transformSupportedBrowsersToTargets;
|
|
24
|
+
exports.getSupportedNodeTargets = getSupportedNodeTargets;
|
|
25
|
+
exports.createJsonBuildManifest = createJsonBuildManifest;
|
|
26
|
+
exports.logMessages = logMessages;
|
|
27
|
+
exports.isZonelessApp = isZonelessApp;
|
|
14
28
|
const esbuild_1 = require("esbuild");
|
|
15
29
|
const node_crypto_1 = require("node:crypto");
|
|
16
30
|
const node_fs_1 = require("node:fs");
|
|
@@ -76,7 +90,6 @@ function logBuildStats(metafile, initial, budgetFailures, colors, changedFiles,
|
|
|
76
90
|
}
|
|
77
91
|
return '';
|
|
78
92
|
}
|
|
79
|
-
exports.logBuildStats = logBuildStats;
|
|
80
93
|
async function calculateEstimatedTransferSizes(outputFiles) {
|
|
81
94
|
const sizes = new Map();
|
|
82
95
|
if (outputFiles.length <= 0) {
|
|
@@ -115,7 +128,6 @@ async function calculateEstimatedTransferSizes(outputFiles) {
|
|
|
115
128
|
}
|
|
116
129
|
});
|
|
117
130
|
}
|
|
118
|
-
exports.calculateEstimatedTransferSizes = calculateEstimatedTransferSizes;
|
|
119
131
|
async function withSpinner(text, action) {
|
|
120
132
|
const spinner = new spinner_1.Spinner(text);
|
|
121
133
|
spinner.start();
|
|
@@ -126,11 +138,9 @@ async function withSpinner(text, action) {
|
|
|
126
138
|
spinner.stop();
|
|
127
139
|
}
|
|
128
140
|
}
|
|
129
|
-
exports.withSpinner = withSpinner;
|
|
130
141
|
async function withNoProgress(text, action) {
|
|
131
142
|
return action();
|
|
132
143
|
}
|
|
133
|
-
exports.withNoProgress = withNoProgress;
|
|
134
144
|
/**
|
|
135
145
|
* Generates a syntax feature object map for Angular applications based on a list of targets.
|
|
136
146
|
* A full set of feature names can be found here: https://esbuild.github.io/api/#supported
|
|
@@ -181,7 +191,6 @@ function getFeatureSupport(target, nativeAsyncAwait) {
|
|
|
181
191
|
}
|
|
182
192
|
return supported;
|
|
183
193
|
}
|
|
184
|
-
exports.getFeatureSupport = getFeatureSupport;
|
|
185
194
|
async function writeResultFiles(outputFiles, assetFiles, { base, browser, server }) {
|
|
186
195
|
const directoryExists = new Set();
|
|
187
196
|
const ensureDirectoryExists = async (destPath) => {
|
|
@@ -224,7 +233,6 @@ async function writeResultFiles(outputFiles, assetFiles, { base, browser, server
|
|
|
224
233
|
});
|
|
225
234
|
}
|
|
226
235
|
}
|
|
227
|
-
exports.writeResultFiles = writeResultFiles;
|
|
228
236
|
const MAX_CONCURRENT_WRITES = 64;
|
|
229
237
|
async function emitFilesToDisk(files, writeFileCallback) {
|
|
230
238
|
// Write files in groups of MAX_CONCURRENT_WRITES to avoid too many open files
|
|
@@ -237,7 +245,6 @@ async function emitFilesToDisk(files, writeFileCallback) {
|
|
|
237
245
|
await Promise.all(actions);
|
|
238
246
|
}
|
|
239
247
|
}
|
|
240
|
-
exports.emitFilesToDisk = emitFilesToDisk;
|
|
241
248
|
function createOutputFileFromText(path, text, type) {
|
|
242
249
|
return {
|
|
243
250
|
path,
|
|
@@ -254,7 +261,6 @@ function createOutputFileFromText(path, text, type) {
|
|
|
254
261
|
},
|
|
255
262
|
};
|
|
256
263
|
}
|
|
257
|
-
exports.createOutputFileFromText = createOutputFileFromText;
|
|
258
264
|
function createOutputFileFromData(path, data, type) {
|
|
259
265
|
return {
|
|
260
266
|
path,
|
|
@@ -273,7 +279,6 @@ function createOutputFileFromData(path, data, type) {
|
|
|
273
279
|
},
|
|
274
280
|
};
|
|
275
281
|
}
|
|
276
|
-
exports.createOutputFileFromData = createOutputFileFromData;
|
|
277
282
|
function convertOutputFile(file, type) {
|
|
278
283
|
const { path, contents, hash } = file;
|
|
279
284
|
return {
|
|
@@ -289,7 +294,6 @@ function convertOutputFile(file, type) {
|
|
|
289
294
|
},
|
|
290
295
|
};
|
|
291
296
|
}
|
|
292
|
-
exports.convertOutputFile = convertOutputFile;
|
|
293
297
|
/**
|
|
294
298
|
* Transform browserlists result to esbuild target.
|
|
295
299
|
* @see https://esbuild.github.io/api/#target
|
|
@@ -333,7 +337,6 @@ function transformSupportedBrowsersToTargets(supportedBrowsers) {
|
|
|
333
337
|
}
|
|
334
338
|
return transformed;
|
|
335
339
|
}
|
|
336
|
-
exports.transformSupportedBrowsersToTargets = transformSupportedBrowsersToTargets;
|
|
337
340
|
const SUPPORTED_NODE_VERSIONS = '^18.19.1 || ^20.11.1 || >=22.0.0';
|
|
338
341
|
/**
|
|
339
342
|
* Transform supported Node.js versions to esbuild target.
|
|
@@ -346,7 +349,6 @@ function getSupportedNodeTargets() {
|
|
|
346
349
|
}
|
|
347
350
|
return SUPPORTED_NODE_VERSIONS.split('||').map((v) => 'node' + (0, semver_1.coerce)(v)?.version);
|
|
348
351
|
}
|
|
349
|
-
exports.getSupportedNodeTargets = getSupportedNodeTargets;
|
|
350
352
|
async function createJsonBuildManifest(result, normalizedOptions) {
|
|
351
353
|
const { colors: color, outputOptions: { base, server, browser }, ssrOptions, } = normalizedOptions;
|
|
352
354
|
const { warnings, errors, prerenderedRoutes } = result;
|
|
@@ -362,7 +364,6 @@ async function createJsonBuildManifest(result, normalizedOptions) {
|
|
|
362
364
|
};
|
|
363
365
|
return JSON.stringify(manifest, undefined, 2);
|
|
364
366
|
}
|
|
365
|
-
exports.createJsonBuildManifest = createJsonBuildManifest;
|
|
366
367
|
async function logMessages(logger, executionResult, color, jsonLogs) {
|
|
367
368
|
const { warnings, errors, logs } = executionResult;
|
|
368
369
|
if (logs.length) {
|
|
@@ -378,7 +379,6 @@ async function logMessages(logger, executionResult, color, jsonLogs) {
|
|
|
378
379
|
logger.error((await (0, esbuild_1.formatMessages)(errors, { kind: 'error', color })).join('\n'));
|
|
379
380
|
}
|
|
380
381
|
}
|
|
381
|
-
exports.logMessages = logMessages;
|
|
382
382
|
/**
|
|
383
383
|
* Ascertain whether the application operates without `zone.js`, we currently rely on the polyfills setting to determine its status.
|
|
384
384
|
* If a file with an extension is provided or if `zone.js` is included in the polyfills, the application is deemed as not zoneless.
|
|
@@ -389,4 +389,3 @@ function isZonelessApp(polyfills) {
|
|
|
389
389
|
// TODO: Instead, we should rely on the presence of zone.js in the polyfills build metadata.
|
|
390
390
|
return !polyfills?.some((p) => p === 'zone.js' || /\.[mc]?[jt]s$/.test(p));
|
|
391
391
|
}
|
|
392
|
-
exports.isZonelessApp = isZonelessApp;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.createVirtualModulePlugin =
|
|
10
|
+
exports.createVirtualModulePlugin = createVirtualModulePlugin;
|
|
11
11
|
const load_result_cache_1 = require("./load-result-cache");
|
|
12
12
|
/**
|
|
13
13
|
* Creates an esbuild plugin that generated virtual modules.
|
|
@@ -40,4 +40,3 @@ function createVirtualModulePlugin(options) {
|
|
|
40
40
|
},
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
exports.createVirtualModulePlugin = createVirtualModulePlugin;
|
|
@@ -10,7 +10,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.
|
|
13
|
+
exports.ChangedFiles = void 0;
|
|
14
|
+
exports.createWatcher = createWatcher;
|
|
14
15
|
const watchpack_1 = __importDefault(require("watchpack"));
|
|
15
16
|
class ChangedFiles {
|
|
16
17
|
added = new Set();
|
|
@@ -115,4 +116,3 @@ function createWatcher(options) {
|
|
|
115
116
|
},
|
|
116
117
|
};
|
|
117
118
|
}
|
|
118
|
-
exports.createWatcher = createWatcher;
|
package/src/tools/sass/lexer.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.findUrls =
|
|
10
|
+
exports.findUrls = findUrls;
|
|
11
11
|
// TODO: Combine everything into a single pass lexer
|
|
12
12
|
/**
|
|
13
13
|
* Determines if a unicode code point is a CSS whitespace character.
|
|
@@ -169,4 +169,3 @@ function* findUrls(contents) {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
exports.findUrls = findUrls;
|
|
@@ -10,7 +10,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.
|
|
13
|
+
exports.LoadPathsUrlRebasingImporter = exports.ModuleUrlRebasingImporter = exports.RelativeUrlRebasingImporter = void 0;
|
|
14
|
+
exports.sassBindWorkaround = sassBindWorkaround;
|
|
14
15
|
const magic_string_1 = __importDefault(require("magic-string"));
|
|
15
16
|
const node_fs_1 = require("node:fs");
|
|
16
17
|
const node_path_1 = require("node:path");
|
|
@@ -328,4 +329,3 @@ function sassBindWorkaround(importer) {
|
|
|
328
329
|
importer.load = importer.load.bind(importer);
|
|
329
330
|
return importer;
|
|
330
331
|
}
|
|
331
|
-
exports.sassBindWorkaround = sassBindWorkaround;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
10
10
|
if (value !== null && value !== void 0) {
|
|
11
11
|
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
12
|
-
var dispose;
|
|
12
|
+
var dispose, inner;
|
|
13
13
|
if (async) {
|
|
14
14
|
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
15
15
|
dispose = value[Symbol.asyncDispose];
|
|
@@ -17,8 +17,10 @@ var __addDisposableResource = (this && this.__addDisposableResource) || function
|
|
|
17
17
|
if (dispose === void 0) {
|
|
18
18
|
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
19
19
|
dispose = value[Symbol.dispose];
|
|
20
|
+
if (async) inner = dispose;
|
|
20
21
|
}
|
|
21
22
|
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
23
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
22
24
|
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
23
25
|
}
|
|
24
26
|
else if (async) {
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="node" />
|
|
9
|
-
/// <reference types="source-map-js/source-map" />
|
|
10
8
|
import { MessagePort } from 'node:worker_threads';
|
|
11
9
|
import { SourceSpan, StringOptions } from 'sass';
|
|
12
10
|
import type { SerializableWarningMessage } from './sass-service';
|
|
@@ -45,14 +43,14 @@ export default function renderSassStylesheet(request: RenderRequestMessage): Pro
|
|
|
45
43
|
result: {
|
|
46
44
|
loadedUrls: string[];
|
|
47
45
|
css: string;
|
|
48
|
-
sourceMap?: import("source-map-js").RawSourceMap
|
|
46
|
+
sourceMap?: import("source-map-js").RawSourceMap;
|
|
49
47
|
};
|
|
50
48
|
error?: undefined;
|
|
51
49
|
} | {
|
|
52
50
|
warnings: SerializableWarningMessage[] | undefined;
|
|
53
51
|
error: {
|
|
54
52
|
span: Omit<SourceSpan, "url"> & {
|
|
55
|
-
url?: string
|
|
53
|
+
url?: string;
|
|
56
54
|
};
|
|
57
55
|
message: string;
|
|
58
56
|
stack: string | undefined;
|
package/src/tools/sass/worker.js
CHANGED
|
@@ -10,6 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.default = renderSassStylesheet;
|
|
13
14
|
const remapping_1 = __importDefault(require("@ampproject/remapping"));
|
|
14
15
|
const node_path_1 = require("node:path");
|
|
15
16
|
const node_url_1 = require("node:url");
|
|
@@ -126,7 +127,6 @@ async function renderSassStylesheet(request) {
|
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
|
-
exports.default = renderSassStylesheet;
|
|
130
130
|
/**
|
|
131
131
|
* Converts a Sass SourceSpan object into a serializable form.
|
|
132
132
|
* The SourceSpan object contains a URL property which must be converted into a string.
|
|
@@ -10,7 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.createAngularMemoryPlugin =
|
|
13
|
+
exports.createAngularMemoryPlugin = createAngularMemoryPlugin;
|
|
14
14
|
const remapping_1 = __importDefault(require("@ampproject/remapping"));
|
|
15
15
|
const mrmime_1 = require("mrmime");
|
|
16
16
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
@@ -221,7 +221,6 @@ function createAngularMemoryPlugin(options) {
|
|
|
221
221
|
},
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
|
-
exports.createAngularMemoryPlugin = createAngularMemoryPlugin;
|
|
225
224
|
/**
|
|
226
225
|
* Reads the resolved Vite client code from disk and updates the content to remove
|
|
227
226
|
* an unactionable suggestion to update the Vite configuration file to disable the
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.LOCALE_DATA_BASE_MODULE = void 0;
|
|
11
|
+
exports.createAngularLocaleDataPlugin = createAngularLocaleDataPlugin;
|
|
11
12
|
/**
|
|
12
13
|
* The base module location used to search for locale specific data.
|
|
13
14
|
*/
|
|
@@ -52,4 +53,3 @@ function createAngularLocaleDataPlugin() {
|
|
|
52
53
|
},
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
|
-
exports.createAngularLocaleDataPlugin = createAngularLocaleDataPlugin;
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.ThresholdSeverity = exports.BudgetType = void 0;
|
|
11
|
+
exports.calculateThresholds = calculateThresholds;
|
|
12
|
+
exports.checkBudgets = checkBudgets;
|
|
13
|
+
exports.checkThresholds = checkThresholds;
|
|
11
14
|
const schema_1 = require("../builders/application/schema");
|
|
12
15
|
Object.defineProperty(exports, "BudgetType", { enumerable: true, get: function () { return schema_1.Type; } });
|
|
13
16
|
const format_bytes_1 = require("./format-bytes");
|
|
@@ -75,7 +78,6 @@ function* calculateThresholds(budget) {
|
|
|
75
78
|
};
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
|
-
exports.calculateThresholds = calculateThresholds;
|
|
79
81
|
/**
|
|
80
82
|
* Calculates the sizes for bundles in the budget type provided.
|
|
81
83
|
*/
|
|
@@ -266,7 +268,6 @@ function* checkBudgets(budgets, stats, checkComponentStyles) {
|
|
|
266
268
|
}
|
|
267
269
|
}
|
|
268
270
|
}
|
|
269
|
-
exports.checkBudgets = checkBudgets;
|
|
270
271
|
function* checkThresholds(thresholds, size, label) {
|
|
271
272
|
for (const threshold of thresholds) {
|
|
272
273
|
switch (threshold.type) {
|
|
@@ -300,4 +301,3 @@ function* checkThresholds(thresholds, size, label) {
|
|
|
300
301
|
}
|
|
301
302
|
}
|
|
302
303
|
}
|
|
303
|
-
exports.checkThresholds = checkThresholds;
|
package/src/utils/check-port.js
CHANGED
|
@@ -10,7 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.checkPort =
|
|
13
|
+
exports.checkPort = checkPort;
|
|
14
14
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
15
15
|
const node_net_1 = require("node:net");
|
|
16
16
|
const load_esm_1 = require("./load-esm");
|
|
@@ -55,4 +55,3 @@ async function checkPort(port, host) {
|
|
|
55
55
|
.listen(port, host);
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
exports.checkPort = checkPort;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.deleteOutputDir =
|
|
10
|
+
exports.deleteOutputDir = deleteOutputDir;
|
|
11
11
|
const promises_1 = require("node:fs/promises");
|
|
12
12
|
const node_path_1 = require("node:path");
|
|
13
13
|
/**
|
|
@@ -43,4 +43,3 @@ async function deleteOutputDir(root, outputPath, emptyOnlyDirectories) {
|
|
|
43
43
|
await (0, promises_1.rm)(fullEntry, { force: true, recursive: true, maxRetries: 3 });
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
exports.deleteOutputDir = deleteOutputDir;
|
package/src/utils/error.js
CHANGED
|
@@ -10,7 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.assertIsError =
|
|
13
|
+
exports.assertIsError = assertIsError;
|
|
14
14
|
const assert_1 = __importDefault(require("assert"));
|
|
15
15
|
function assertIsError(value) {
|
|
16
16
|
const isError = value instanceof Error ||
|
|
@@ -18,4 +18,3 @@ function assertIsError(value) {
|
|
|
18
18
|
(typeof value === 'object' && value && 'name' in value && 'message' in value);
|
|
19
19
|
(0, assert_1.default)(isError, 'catch clause variable is not an Error instance');
|
|
20
20
|
}
|
|
21
|
-
exports.assertIsError = assertIsError;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.formatSize =
|
|
10
|
+
exports.formatSize = formatSize;
|
|
11
11
|
function formatSize(size) {
|
|
12
12
|
if (size <= 0) {
|
|
13
13
|
return '0 bytes';
|
|
@@ -19,4 +19,3 @@ function formatSize(size) {
|
|
|
19
19
|
const fractionDigits = index === 0 ? 0 : 2;
|
|
20
20
|
return `${roundedSize.toFixed(fractionDigits)} ${abbreviations[index]}`;
|
|
21
21
|
}
|
|
22
|
-
exports.formatSize = formatSize;
|
|
@@ -10,7 +10,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.
|
|
13
|
+
exports.createI18nOptions = createI18nOptions;
|
|
14
|
+
exports.loadTranslations = loadTranslations;
|
|
14
15
|
const node_path_1 = __importDefault(require("node:path"));
|
|
15
16
|
function normalizeTranslationFileOption(option, locale, expectObjectInError) {
|
|
16
17
|
if (typeof option === 'string') {
|
|
@@ -112,7 +113,6 @@ function createI18nOptions(projectMetadata, inline) {
|
|
|
112
113
|
}
|
|
113
114
|
return i18n;
|
|
114
115
|
}
|
|
115
|
-
exports.createI18nOptions = createI18nOptions;
|
|
116
116
|
function loadTranslations(locale, desc, workspaceRoot, loader, logger, usedFormats, duplicateTranslation) {
|
|
117
117
|
let translations = undefined;
|
|
118
118
|
for (const file of desc.files) {
|
|
@@ -158,4 +158,3 @@ function loadTranslations(locale, desc, workspaceRoot, loader, logger, usedForma
|
|
|
158
158
|
}
|
|
159
159
|
desc.translation = translations;
|
|
160
160
|
}
|
|
161
|
-
exports.loadTranslations = loadTranslations;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.addEventDispatchContract =
|
|
10
|
+
exports.addEventDispatchContract = addEventDispatchContract;
|
|
11
11
|
const promises_1 = require("node:fs/promises");
|
|
12
12
|
const html_rewriting_stream_1 = require("./html-rewriting-stream");
|
|
13
13
|
let jsActionContractScript;
|
|
@@ -25,4 +25,3 @@ async function addEventDispatchContract(html) {
|
|
|
25
25
|
});
|
|
26
26
|
return transformedContent();
|
|
27
27
|
}
|
|
28
|
-
exports.addEventDispatchContract = addEventDispatchContract;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.augmentIndexHtml =
|
|
10
|
+
exports.augmentIndexHtml = augmentIndexHtml;
|
|
11
11
|
const node_crypto_1 = require("node:crypto");
|
|
12
12
|
const node_path_1 = require("node:path");
|
|
13
13
|
const load_esm_1 = require("../load-esm");
|
|
@@ -197,7 +197,6 @@ async function augmentIndexHtml(params) {
|
|
|
197
197
|
errors,
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
|
-
exports.augmentIndexHtml = augmentIndexHtml;
|
|
201
200
|
function generateSriAttributes(content) {
|
|
202
201
|
const algo = 'sha384';
|
|
203
202
|
const hash = (0, node_crypto_1.createHash)(algo).update(content, 'utf8').digest('base64');
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.htmlRewritingStream =
|
|
10
|
+
exports.htmlRewritingStream = htmlRewritingStream;
|
|
11
11
|
const node_stream_1 = require("node:stream");
|
|
12
12
|
const promises_1 = require("node:stream/promises");
|
|
13
13
|
const load_esm_1 = require("../load-esm");
|
|
@@ -25,4 +25,3 @@ async function htmlRewritingStream(content) {
|
|
|
25
25
|
}),
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
exports.htmlRewritingStream = htmlRewritingStream;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.addNonce =
|
|
10
|
+
exports.addNonce = addNonce;
|
|
11
11
|
const html_rewriting_stream_1 = require("./html-rewriting-stream");
|
|
12
12
|
/**
|
|
13
13
|
* Pattern matching the name of the Angular nonce attribute. Note that this is
|
|
@@ -34,7 +34,6 @@ async function addNonce(html) {
|
|
|
34
34
|
});
|
|
35
35
|
return transformedContent();
|
|
36
36
|
}
|
|
37
|
-
exports.addNonce = addNonce;
|
|
38
37
|
/** Finds the Angular nonce in an HTML string. */
|
|
39
38
|
async function findNonce(html) {
|
|
40
39
|
// Inexpensive check to avoid parsing the HTML when we're sure there's no nonce.
|
package/src/utils/load-esm.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.loadEsmModule =
|
|
10
|
+
exports.loadEsmModule = loadEsmModule;
|
|
11
11
|
/**
|
|
12
12
|
* Lazily compiled dynamic import loader function.
|
|
13
13
|
*/
|
|
@@ -28,4 +28,3 @@ function loadEsmModule(modulePath) {
|
|
|
28
28
|
load ??= new Function('modulePath', `return import(modulePath);`);
|
|
29
29
|
return load(modulePath);
|
|
30
30
|
}
|
|
31
|
-
exports.loadEsmModule = loadEsmModule;
|