@angular/build 18.1.0-next.0 → 18.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.
- package/package.json +23 -14
- package/src/builders/application/build-action.d.ts +1 -1
- package/src/builders/application/build-action.js +2 -3
- package/src/builders/application/execute-build.d.ts +1 -1
- package/src/builders/application/execute-build.js +2 -3
- package/src/builders/application/execute-post-bundle.d.ts +1 -1
- package/src/builders/application/execute-post-bundle.js +2 -3
- package/src/builders/application/i18n.d.ts +1 -1
- package/src/builders/application/i18n.js +3 -4
- package/src/builders/application/index.d.ts +1 -1
- package/src/builders/application/index.js +3 -4
- package/src/builders/application/options.d.ts +3 -3
- package/src/builders/application/options.js +2 -3
- package/src/builders/application/setup-bundling.d.ts +1 -1
- package/src/builders/application/setup-bundling.js +3 -9
- package/src/builders/dev-server/builder.d.ts +1 -2
- package/src/builders/dev-server/builder.js +2 -3
- package/src/builders/dev-server/index.d.ts +1 -1
- package/src/builders/dev-server/index.js +1 -1
- package/src/builders/dev-server/internal.d.ts +1 -1
- package/src/builders/dev-server/internal.js +1 -1
- package/src/builders/dev-server/options.d.ts +5 -1
- package/src/builders/dev-server/options.js +27 -3
- package/src/builders/dev-server/output.d.ts +1 -1
- package/src/builders/dev-server/output.js +1 -1
- 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.d.ts +1 -1
- package/src/builders/dev-server/vite-server.js +43 -35
- package/src/builders/extract-i18n/application-extraction.d.ts +1 -1
- package/src/builders/extract-i18n/application-extraction.js +2 -3
- package/src/builders/extract-i18n/builder.d.ts +1 -1
- package/src/builders/extract-i18n/builder.js +2 -3
- package/src/builders/extract-i18n/index.d.ts +1 -1
- package/src/builders/extract-i18n/index.js +1 -1
- package/src/builders/extract-i18n/options.d.ts +1 -1
- package/src/builders/extract-i18n/options.js +2 -3
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/private.d.ts +1 -1
- package/src/private.js +1 -1
- package/src/tools/babel/plugins/adjust-static-class-members.d.ts +1 -2
- package/src/tools/babel/plugins/adjust-static-class-members.js +3 -4
- package/src/tools/babel/plugins/adjust-typescript-enums.d.ts +1 -2
- package/src/tools/babel/plugins/adjust-typescript-enums.js +3 -4
- package/src/tools/babel/plugins/elide-angular-metadata.d.ts +1 -2
- package/src/tools/babel/plugins/elide-angular-metadata.js +3 -4
- package/src/tools/babel/plugins/index.d.ts +1 -1
- package/src/tools/babel/plugins/index.js +1 -1
- package/src/tools/babel/plugins/pure-toplevel-functions.d.ts +1 -2
- package/src/tools/babel/plugins/pure-toplevel-functions.js +2 -2
- package/src/tools/babel/typings.d.ts +1 -1
- package/src/tools/esbuild/angular/angular-host.d.ts +1 -1
- package/src/tools/esbuild/angular/angular-host.js +3 -4
- package/src/tools/esbuild/angular/compilation/angular-compilation.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/angular-compilation.js +1 -1
- package/src/tools/esbuild/angular/compilation/aot-compilation.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/aot-compilation.js +43 -8
- package/src/tools/esbuild/angular/compilation/factory.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/factory.js +2 -3
- package/src/tools/esbuild/angular/compilation/index.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/index.js +1 -1
- package/src/tools/esbuild/angular/compilation/jit-bootstrap-transformer.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/jit-bootstrap-transformer.js +3 -4
- package/src/tools/esbuild/angular/compilation/jit-compilation.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/jit-compilation.js +1 -1
- package/src/tools/esbuild/angular/compilation/noop-compilation.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/noop-compilation.js +1 -1
- package/src/tools/esbuild/angular/compilation/parallel-compilation.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/parallel-compilation.js +1 -1
- package/src/tools/esbuild/angular/compilation/parallel-worker.d.ts +3 -2
- package/src/tools/esbuild/angular/compilation/parallel-worker.js +11 -8
- package/src/tools/esbuild/angular/compilation-state.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation-state.js +3 -3
- package/src/tools/esbuild/angular/compiler-plugin.d.ts +2 -2
- package/src/tools/esbuild/angular/compiler-plugin.js +27 -13
- package/src/tools/esbuild/angular/component-stylesheets.d.ts +1 -1
- package/src/tools/esbuild/angular/component-stylesheets.js +1 -1
- package/src/tools/esbuild/angular/diagnostics.d.ts +1 -1
- package/src/tools/esbuild/angular/diagnostics.js +2 -3
- package/src/tools/esbuild/angular/file-reference-tracker.d.ts +1 -1
- package/src/tools/esbuild/angular/file-reference-tracker.js +1 -1
- package/src/tools/esbuild/angular/jit-plugin-callbacks.d.ts +1 -1
- package/src/tools/esbuild/angular/jit-plugin-callbacks.js +2 -3
- package/src/tools/esbuild/angular/jit-resource-transformer.d.ts +1 -1
- package/src/tools/esbuild/angular/jit-resource-transformer.js +2 -3
- package/src/tools/esbuild/angular/source-file-cache.d.ts +1 -1
- package/src/tools/esbuild/angular/source-file-cache.js +1 -1
- package/src/tools/esbuild/angular/uri.d.ts +1 -1
- package/src/tools/esbuild/angular/uri.js +5 -5
- package/src/tools/esbuild/angular/web-worker-transformer.d.ts +1 -1
- package/src/tools/esbuild/angular/web-worker-transformer.js +2 -3
- package/src/tools/esbuild/application-code-bundle.d.ts +1 -1
- package/src/tools/esbuild/application-code-bundle.js +21 -7
- package/src/tools/esbuild/budget-stats.d.ts +1 -1
- package/src/tools/esbuild/budget-stats.js +2 -3
- package/src/tools/esbuild/bundler-context.d.ts +1 -1
- package/src/tools/esbuild/bundler-context.js +1 -1
- package/src/tools/esbuild/bundler-execution-result.d.ts +1 -1
- package/src/tools/esbuild/bundler-execution-result.js +1 -1
- package/src/tools/esbuild/cache.d.ts +1 -1
- package/src/tools/esbuild/cache.js +1 -1
- package/src/tools/esbuild/commonjs-checker.d.ts +1 -1
- package/src/tools/esbuild/commonjs-checker.js +2 -3
- package/src/tools/esbuild/compiler-plugin-options.d.ts +1 -1
- package/src/tools/esbuild/compiler-plugin-options.js +3 -4
- package/src/tools/esbuild/external-packages-plugin.d.ts +1 -1
- package/src/tools/esbuild/external-packages-plugin.js +2 -3
- package/src/tools/esbuild/global-scripts.d.ts +1 -1
- package/src/tools/esbuild/global-scripts.js +2 -3
- package/src/tools/esbuild/global-styles.d.ts +1 -1
- package/src/tools/esbuild/global-styles.js +3 -4
- package/src/tools/esbuild/i18n-inliner-worker.d.ts +2 -2
- package/src/tools/esbuild/i18n-inliner-worker.js +2 -2
- package/src/tools/esbuild/i18n-inliner.d.ts +1 -1
- package/src/tools/esbuild/i18n-inliner.js +1 -1
- package/src/tools/esbuild/i18n-locale-plugin.d.ts +1 -1
- package/src/tools/esbuild/i18n-locale-plugin.js +3 -3
- package/src/tools/esbuild/index-html-generator.d.ts +1 -1
- package/src/tools/esbuild/index-html-generator.js +9 -12
- package/src/tools/esbuild/javascript-transformer-worker.d.ts +1 -1
- package/src/tools/esbuild/javascript-transformer-worker.js +2 -2
- package/src/tools/esbuild/javascript-transformer.d.ts +2 -2
- package/src/tools/esbuild/javascript-transformer.js +1 -1
- package/src/tools/esbuild/license-extractor.d.ts +1 -1
- package/src/tools/esbuild/license-extractor.js +2 -3
- package/src/tools/esbuild/lmdb-cache-store.d.ts +1 -1
- package/src/tools/esbuild/lmdb-cache-store.js +1 -1
- package/src/tools/esbuild/load-result-cache.d.ts +1 -1
- package/src/tools/esbuild/load-result-cache.js +3 -3
- package/src/tools/esbuild/profiling.d.ts +1 -1
- package/src/tools/esbuild/profiling.js +5 -6
- package/src/tools/esbuild/rxjs-esm-resolution-plugin.d.ts +1 -1
- package/src/tools/esbuild/rxjs-esm-resolution-plugin.js +2 -3
- package/src/tools/esbuild/sourcemap-ignorelist-plugin.d.ts +1 -1
- package/src/tools/esbuild/sourcemap-ignorelist-plugin.js +2 -3
- package/src/tools/esbuild/stylesheets/bundle-options.d.ts +1 -1
- package/src/tools/esbuild/stylesheets/bundle-options.js +2 -3
- package/src/tools/esbuild/stylesheets/css-inline-fonts-plugin.d.ts +1 -1
- package/src/tools/esbuild/stylesheets/css-inline-fonts-plugin.js +2 -3
- package/src/tools/esbuild/stylesheets/css-language.d.ts +1 -1
- package/src/tools/esbuild/stylesheets/css-language.js +1 -1
- package/src/tools/esbuild/stylesheets/css-resource-plugin.d.ts +1 -1
- package/src/tools/esbuild/stylesheets/css-resource-plugin.js +2 -3
- package/src/tools/esbuild/stylesheets/less-language.d.ts +1 -1
- package/src/tools/esbuild/stylesheets/less-language.js +1 -1
- package/src/tools/esbuild/stylesheets/sass-language.d.ts +1 -1
- package/src/tools/esbuild/stylesheets/sass-language.js +30 -4
- package/src/tools/esbuild/stylesheets/stylesheet-plugin-factory.d.ts +9 -2
- package/src/tools/esbuild/stylesheets/stylesheet-plugin-factory.js +46 -41
- package/src/tools/esbuild/utils.d.ts +1 -1
- package/src/tools/esbuild/utils.js +16 -17
- package/src/tools/esbuild/virtual-module-plugin.d.ts +1 -1
- package/src/tools/esbuild/virtual-module-plugin.js +2 -3
- package/src/tools/esbuild/watcher.d.ts +1 -1
- package/src/tools/esbuild/watcher.js +3 -3
- package/src/tools/sass/lexer.d.ts +1 -1
- package/src/tools/sass/lexer.js +2 -3
- package/src/tools/sass/rebasing-importer.d.ts +1 -1
- package/src/tools/sass/rebasing-importer.js +3 -3
- package/src/tools/sass/sass-service.d.ts +1 -1
- package/src/tools/sass/sass-service.js +4 -2
- package/src/tools/sass/worker.d.ts +3 -5
- package/src/tools/sass/worker.js +2 -2
- package/src/tools/vite/angular-memory-plugin.d.ts +1 -1
- package/src/tools/vite/angular-memory-plugin.js +2 -3
- package/src/tools/vite/i18n-locale-plugin.d.ts +1 -1
- package/src/tools/vite/i18n-locale-plugin.js +3 -3
- package/src/utils/bundle-calculator.d.ts +1 -1
- package/src/utils/bundle-calculator.js +5 -5
- package/src/utils/check-port.d.ts +1 -1
- package/src/utils/check-port.js +28 -9
- package/src/utils/color.d.ts +1 -1
- package/src/utils/color.js +1 -1
- package/src/utils/delete-output-dir.d.ts +1 -1
- package/src/utils/delete-output-dir.js +2 -3
- package/src/utils/environment-options.d.ts +1 -1
- package/src/utils/environment-options.js +1 -1
- package/src/utils/error.d.ts +1 -1
- package/src/utils/error.js +2 -3
- package/src/utils/format-bytes.d.ts +1 -1
- package/src/utils/format-bytes.js +2 -3
- package/src/utils/i18n-options.d.ts +1 -1
- package/src/utils/i18n-options.js +3 -4
- package/src/utils/index-file/add-event-dispatch-contract.d.ts +1 -1
- package/src/utils/index-file/add-event-dispatch-contract.js +2 -3
- package/src/utils/index-file/augment-index-html.d.ts +1 -1
- package/src/utils/index-file/augment-index-html.js +22 -10
- package/src/utils/index-file/html-rewriting-stream.d.ts +1 -1
- package/src/utils/index-file/html-rewriting-stream.js +2 -3
- package/src/utils/index-file/index-html-generator.d.ts +1 -1
- package/src/utils/index-file/index-html-generator.js +1 -1
- package/src/utils/index-file/inline-critical-css.d.ts +1 -1
- package/src/utils/index-file/inline-critical-css.js +1 -1
- package/src/utils/index-file/inline-fonts.d.ts +1 -1
- package/src/utils/index-file/inline-fonts.js +1 -1
- package/src/utils/index-file/nonce.d.ts +1 -1
- package/src/utils/index-file/nonce.js +2 -3
- package/src/utils/index-file/valid-self-closing-tags.d.ts +1 -1
- package/src/utils/index-file/valid-self-closing-tags.js +1 -1
- package/src/utils/index.d.ts +1 -1
- package/src/utils/index.js +1 -1
- package/src/utils/load-esm.d.ts +1 -1
- package/src/utils/load-esm.js +2 -3
- package/src/utils/load-proxy-config.d.ts +1 -1
- package/src/utils/load-proxy-config.js +2 -3
- package/src/utils/load-translations.d.ts +1 -1
- package/src/utils/load-translations.js +2 -3
- package/src/utils/normalize-asset-patterns.d.ts +1 -1
- package/src/utils/normalize-asset-patterns.js +3 -3
- package/src/utils/normalize-cache.d.ts +1 -1
- package/src/utils/normalize-cache.js +3 -4
- package/src/utils/normalize-optimization.d.ts +1 -1
- package/src/utils/normalize-optimization.js +2 -3
- package/src/utils/normalize-source-maps.d.ts +1 -1
- package/src/utils/normalize-source-maps.js +2 -3
- package/src/utils/postcss-configuration.d.ts +1 -1
- package/src/utils/postcss-configuration.js +4 -5
- package/src/utils/purge-cache.d.ts +1 -1
- package/src/utils/purge-cache.js +2 -3
- package/src/utils/resolve-assets.d.ts +1 -1
- package/src/utils/resolve-assets.js +2 -3
- package/src/utils/routes-extractor/extractor.d.ts +1 -1
- package/src/utils/routes-extractor/extractor.js +1 -1
- package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.d.ts +1 -1
- package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.js +4 -5
- package/src/utils/server-rendering/esm-in-memory-loader/register-hooks.d.ts +1 -1
- package/src/utils/server-rendering/esm-in-memory-loader/register-hooks.js +1 -1
- package/src/utils/server-rendering/fetch-patch.d.ts +1 -1
- package/src/utils/server-rendering/fetch-patch.js +2 -3
- package/src/utils/server-rendering/load-esm-from-memory.d.ts +1 -1
- package/src/utils/server-rendering/load-esm-from-memory.js +2 -3
- package/src/utils/server-rendering/main-bundle-exports.d.ts +1 -1
- package/src/utils/server-rendering/main-bundle-exports.js +1 -1
- package/src/utils/server-rendering/prerender.d.ts +1 -1
- package/src/utils/server-rendering/prerender.js +2 -3
- package/src/utils/server-rendering/render-page.d.ts +1 -1
- package/src/utils/server-rendering/render-page.js +2 -3
- package/src/utils/server-rendering/render-worker.d.ts +1 -1
- package/src/utils/server-rendering/render-worker.js +1 -1
- package/src/utils/server-rendering/routes-extractor-worker.d.ts +1 -1
- package/src/utils/server-rendering/routes-extractor-worker.js +1 -1
- package/src/utils/service-worker.d.ts +1 -3
- package/src/utils/service-worker.js +4 -5
- package/src/utils/spinner.d.ts +1 -1
- package/src/utils/spinner.js +1 -1
- package/src/utils/stats-table.d.ts +1 -1
- package/src/utils/stats-table.js +3 -4
- package/src/utils/supported-browsers.d.ts +1 -1
- package/src/utils/supported-browsers.js +2 -3
- package/src/utils/tty.d.ts +1 -1
- package/src/utils/tty.js +2 -3
- package/src/utils/url.d.ts +1 -1
- package/src/utils/url.js +2 -3
- package/src/utils/version.d.ts +1 -1
- package/src/utils/version.js +2 -3
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/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;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import type { TranslationLoader } from './load-translations';
|
|
9
9
|
export interface LocaleDescription {
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
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;
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export declare function addEventDispatchContract(html: string): Promise<string>;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/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;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export type LoadOutputFileFunctionType = (file: string) => Promise<string>;
|
|
9
9
|
export type CrossOriginValue = 'none' | 'anonymous' | 'use-credentials';
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/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");
|
|
@@ -74,7 +74,8 @@ async function augmentIndexHtml(params) {
|
|
|
74
74
|
}
|
|
75
75
|
scriptTags.push(`<script ${attrs.join(' ')}></script>`);
|
|
76
76
|
}
|
|
77
|
-
let
|
|
77
|
+
let headerLinkTags = [];
|
|
78
|
+
let bodyLinkTags = [];
|
|
78
79
|
for (const src of stylesheets) {
|
|
79
80
|
const attrs = [`rel="stylesheet"`, `href="${deployUrl}${src}"`];
|
|
80
81
|
if (crossOrigin !== 'none') {
|
|
@@ -84,7 +85,7 @@ async function augmentIndexHtml(params) {
|
|
|
84
85
|
const content = await loadOutputFile(src);
|
|
85
86
|
attrs.push(generateSriAttributes(content));
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
+
headerLinkTags.push(`<link ${attrs.join(' ')}>`);
|
|
88
89
|
}
|
|
89
90
|
if (params.hints?.length) {
|
|
90
91
|
for (const hint of params.hints) {
|
|
@@ -113,7 +114,15 @@ async function augmentIndexHtml(params) {
|
|
|
113
114
|
const content = await loadOutputFile(hint.url);
|
|
114
115
|
attrs.push(generateSriAttributes(content));
|
|
115
116
|
}
|
|
116
|
-
|
|
117
|
+
const tag = `<link ${attrs.join(' ')}>`;
|
|
118
|
+
if (hint.mode === 'modulepreload') {
|
|
119
|
+
// Module preloads should be placed by the inserted script elements in the body since
|
|
120
|
+
// they are only useful in combination with the scripts.
|
|
121
|
+
bodyLinkTags.push(tag);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
headerLinkTags.push(tag);
|
|
125
|
+
}
|
|
117
126
|
}
|
|
118
127
|
}
|
|
119
128
|
const dir = lang ? await getLanguageDirection(lang, warnings) : undefined;
|
|
@@ -165,7 +174,7 @@ async function augmentIndexHtml(params) {
|
|
|
165
174
|
.on('endTag', (tag) => {
|
|
166
175
|
switch (tag.tagName) {
|
|
167
176
|
case 'head':
|
|
168
|
-
for (const linkTag of
|
|
177
|
+
for (const linkTag of headerLinkTags) {
|
|
169
178
|
rewriter.emitRaw(linkTag);
|
|
170
179
|
}
|
|
171
180
|
if (imageDomains) {
|
|
@@ -175,9 +184,13 @@ async function augmentIndexHtml(params) {
|
|
|
175
184
|
}
|
|
176
185
|
}
|
|
177
186
|
}
|
|
178
|
-
|
|
187
|
+
headerLinkTags = [];
|
|
179
188
|
break;
|
|
180
189
|
case 'body':
|
|
190
|
+
for (const linkTag of bodyLinkTags) {
|
|
191
|
+
rewriter.emitRaw(linkTag);
|
|
192
|
+
}
|
|
193
|
+
bodyLinkTags = [];
|
|
181
194
|
// Add script tags
|
|
182
195
|
for (const scriptTag of scriptTags) {
|
|
183
196
|
rewriter.emitRaw(scriptTag);
|
|
@@ -189,15 +202,14 @@ async function augmentIndexHtml(params) {
|
|
|
189
202
|
});
|
|
190
203
|
const content = await transformedContent();
|
|
191
204
|
return {
|
|
192
|
-
content:
|
|
205
|
+
content: headerLinkTags.length || scriptTags.length
|
|
193
206
|
? // In case no body/head tags are not present (dotnet partial templates)
|
|
194
|
-
|
|
207
|
+
headerLinkTags.join('') + scriptTags.join('') + content
|
|
195
208
|
: content,
|
|
196
209
|
warnings,
|
|
197
210
|
errors,
|
|
198
211
|
};
|
|
199
212
|
}
|
|
200
|
-
exports.augmentIndexHtml = augmentIndexHtml;
|
|
201
213
|
function generateSriAttributes(content) {
|
|
202
214
|
const algo = 'sha384';
|
|
203
215
|
const hash = (0, node_crypto_1.createHash)(algo).update(content, 'utf8').digest('base64');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export declare function htmlRewritingStream(content: string): Promise<{
|
|
9
9
|
rewriter: import('parse5-html-rewriting-stream').RewritingStream;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/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;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { NormalizedCachedOptions } from '../normalize-cache';
|
|
9
9
|
import { NormalizedOptimizationOptions } from '../normalize-optimization';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.IndexHtmlGenerator = void 0;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export interface InlineCriticalCssProcessOptions {
|
|
9
9
|
outputPath: string;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { NormalizedCachedOptions } from '../normalize-cache';
|
|
9
9
|
export interface InlineFontsOptions {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* Finds the `ngCspNonce` value and copies it to all inline `<style>` and `<script> `tags.
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/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.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
/** A list of valid self closing HTML elements */
|
|
9
9
|
export declare const VALID_SELF_CLOSING_TAGS: Set<string>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.VALID_SELF_CLOSING_TAGS = void 0;
|
package/src/utils/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export * from './normalize-asset-patterns';
|
|
9
9
|
export * from './normalize-optimization';
|
package/src/utils/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
package/src/utils/load-esm.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* This uses a dynamic import to load a module which may be ESM.
|
package/src/utils/load-esm.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/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;
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export declare function loadProxyConfiguration(root: string, proxyConfig: string | undefined): Promise<Record<string, object> | undefined>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -30,7 +30,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.loadProxyConfiguration =
|
|
33
|
+
exports.loadProxyConfiguration = loadProxyConfiguration;
|
|
34
34
|
const fast_glob_1 = require("fast-glob");
|
|
35
35
|
const node_fs_1 = require("node:fs");
|
|
36
36
|
const promises_1 = require("node:fs/promises");
|
|
@@ -96,7 +96,6 @@ async function loadProxyConfiguration(root, proxyConfig) {
|
|
|
96
96
|
}
|
|
97
97
|
return normalizeProxyConfiguration(proxyConfiguration);
|
|
98
98
|
}
|
|
99
|
-
exports.loadProxyConfiguration = loadProxyConfiguration;
|
|
100
99
|
/**
|
|
101
100
|
* Converts glob patterns to regular expressions to support Vite's proxy option.
|
|
102
101
|
* Also converts the Webpack supported array form to an object form supported by both.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import type { Diagnostics } from '@angular/localize/tools';
|
|
9
9
|
export type TranslationLoader = (path: string) => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -30,7 +30,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.createTranslationLoader =
|
|
33
|
+
exports.createTranslationLoader = createTranslationLoader;
|
|
34
34
|
const crypto_1 = require("crypto");
|
|
35
35
|
const fs = __importStar(require("fs"));
|
|
36
36
|
const load_esm_1 = require("./load-esm");
|
|
@@ -60,7 +60,6 @@ async function createTranslationLoader() {
|
|
|
60
60
|
messages.join('\n'));
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
exports.createTranslationLoader = createTranslationLoader;
|
|
64
63
|
async function importParsers() {
|
|
65
64
|
try {
|
|
66
65
|
// Load ESM `@angular/localize/tools` using the TypeScript dynamic import workaround.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { AssetPattern, AssetPatternClass } from '../builders/application/schema';
|
|
9
9
|
export declare class MissingAssetSourceRootException extends Error {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -33,7 +33,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
33
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
34
|
};
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
36
|
+
exports.MissingAssetSourceRootException = void 0;
|
|
37
|
+
exports.normalizeAssetPatterns = normalizeAssetPatterns;
|
|
37
38
|
const fs_1 = require("fs");
|
|
38
39
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
39
40
|
const path = __importStar(require("path"));
|
|
@@ -93,4 +94,3 @@ function normalizeAssetPatterns(assetPatterns, workspaceRoot, projectRoot, proje
|
|
|
93
94
|
return assetPattern;
|
|
94
95
|
});
|
|
95
96
|
}
|
|
96
|
-
exports.normalizeAssetPatterns = normalizeAssetPatterns;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export interface NormalizedCachedOptions {
|
|
9
9
|
/** Whether disk cache is enabled. */
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.normalizeCacheOptions =
|
|
10
|
+
exports.normalizeCacheOptions = normalizeCacheOptions;
|
|
11
11
|
const node_path_1 = require("node:path");
|
|
12
12
|
/** Version placeholder is replaced during the build process with actual package version */
|
|
13
|
-
const VERSION = '18.1.0-next.
|
|
13
|
+
const VERSION = '18.1.0-next.2';
|
|
14
14
|
function hasCacheMetadata(value) {
|
|
15
15
|
return (!!value &&
|
|
16
16
|
typeof value === 'object' &&
|
|
@@ -43,4 +43,3 @@ function normalizeCacheOptions(projectMetadata, worspaceRoot) {
|
|
|
43
43
|
path: (0, node_path_1.join)(cacheBasePath, VERSION),
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
exports.normalizeCacheOptions = normalizeCacheOptions;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { FontsClass, OptimizationClass, OptimizationUnion, StylesClass } from '../builders/application/schema';
|
|
9
9
|
export type NormalizedOptimizationOptions = Required<Omit<OptimizationClass, 'fonts' | 'styles'>> & {
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.normalizeOptimization =
|
|
10
|
+
exports.normalizeOptimization = normalizeOptimization;
|
|
11
11
|
function normalizeOptimization(optimization = true) {
|
|
12
12
|
if (typeof optimization === 'object') {
|
|
13
13
|
const styleOptimization = !!optimization.styles;
|
|
@@ -39,4 +39,3 @@ function normalizeOptimization(optimization = true) {
|
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
exports.normalizeOptimization = normalizeOptimization;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { SourceMapClass, SourceMapUnion } from '../builders/application/schema';
|
|
9
9
|
export declare function normalizeSourceMaps(sourceMap: SourceMapUnion): SourceMapClass;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.normalizeSourceMaps =
|
|
10
|
+
exports.normalizeSourceMaps = normalizeSourceMaps;
|
|
11
11
|
function normalizeSourceMaps(sourceMap) {
|
|
12
12
|
const scripts = typeof sourceMap === 'object' ? sourceMap.scripts : sourceMap;
|
|
13
13
|
const styles = typeof sourceMap === 'object' ? sourceMap.styles : sourceMap;
|
|
@@ -20,4 +20,3 @@ function normalizeSourceMaps(sourceMap) {
|
|
|
20
20
|
styles,
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
exports.normalizeSourceMaps = normalizeSourceMaps;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export interface PostcssConfiguration {
|
|
9
9
|
plugins: [name: string, options?: object | string][];
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.generateSearchDirectories = generateSearchDirectories;
|
|
11
|
+
exports.findTailwindConfiguration = findTailwindConfiguration;
|
|
12
|
+
exports.loadPostcssConfiguration = loadPostcssConfiguration;
|
|
11
13
|
const promises_1 = require("node:fs/promises");
|
|
12
14
|
const node_path_1 = require("node:path");
|
|
13
15
|
const postcssConfigurationFiles = ['postcss.config.json', '.postcssrc.json'];
|
|
@@ -23,7 +25,6 @@ async function generateSearchDirectories(roots) {
|
|
|
23
25
|
files: new Set(entries.filter((entry) => entry.isFile()).map((entry) => entry.name)),
|
|
24
26
|
}))));
|
|
25
27
|
}
|
|
26
|
-
exports.generateSearchDirectories = generateSearchDirectories;
|
|
27
28
|
function findFile(searchDirectories, potentialFiles) {
|
|
28
29
|
for (const { root, files } of searchDirectories) {
|
|
29
30
|
for (const potential of potentialFiles) {
|
|
@@ -37,7 +38,6 @@ function findFile(searchDirectories, potentialFiles) {
|
|
|
37
38
|
function findTailwindConfiguration(searchDirectories) {
|
|
38
39
|
return findFile(searchDirectories, tailwindConfigFiles);
|
|
39
40
|
}
|
|
40
|
-
exports.findTailwindConfiguration = findTailwindConfiguration;
|
|
41
41
|
async function readPostcssConfiguration(configurationFile) {
|
|
42
42
|
const data = await (0, promises_1.readFile)(configurationFile, 'utf-8');
|
|
43
43
|
const config = JSON.parse(data);
|
|
@@ -83,4 +83,3 @@ async function loadPostcssConfiguration(searchDirectories) {
|
|
|
83
83
|
}
|
|
84
84
|
return config;
|
|
85
85
|
}
|
|
86
|
-
exports.loadPostcssConfiguration = loadPostcssConfiguration;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext } from '@angular-devkit/architect';
|
|
9
9
|
/** Delete stale cache directories used by previous versions of build-angular. */
|