@angular/build 22.3.0-next.1 → 22.3.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 +13 -13
- package/src/builders/application/build-action.js +2 -2
- package/src/builders/application/build-action.js.map +1 -1
- package/src/builders/application/index.js +8 -31
- package/src/builders/application/index.js.map +1 -1
- package/src/builders/application/options.d.ts +1 -3
- package/src/builders/application/options.js +1 -1
- package/src/builders/application/options.js.map +1 -1
- package/src/builders/application/results.d.ts +1 -1
- package/src/builders/dev-server/vite/utils.js +1 -1
- package/src/builders/dev-server/vite/utils.js.map +1 -1
- package/src/builders/extract-i18n/application-extraction.js +2 -1
- package/src/builders/extract-i18n/application-extraction.js.map +1 -1
- package/src/builders/karma/assets-middleware.js +1 -1
- package/src/builders/karma/assets-middleware.js.map +1 -1
- package/src/builders/library/builder-state.d.ts +115 -0
- package/src/builders/library/builder-state.js +282 -0
- package/src/builders/library/builder-state.js.map +1 -0
- package/src/builders/library/builder.js +101 -89
- package/src/builders/library/builder.js.map +1 -1
- package/src/builders/library/execution-result.d.ts +35 -0
- package/src/builders/library/execution-result.js +67 -0
- package/src/builders/library/execution-result.js.map +1 -0
- package/src/builders/library/index.d.ts +1 -1
- package/src/builders/library/index.js.map +1 -1
- package/src/builders/library/options.d.ts +9 -0
- package/src/builders/library/options.js +29 -14
- package/src/builders/library/options.js.map +1 -1
- package/src/builders/library/pipeline/assets.d.ts +3 -3
- package/src/builders/library/pipeline/assets.js +12 -16
- package/src/builders/library/pipeline/assets.js.map +1 -1
- package/src/builders/library/pipeline/build-action.d.ts +11 -24
- package/src/builders/library/pipeline/build-action.js +76 -125
- package/src/builders/library/pipeline/build-action.js.map +1 -1
- package/src/builders/library/pipeline/bundler.d.ts +3 -3
- package/src/builders/library/pipeline/bundler.js +55 -33
- package/src/builders/library/pipeline/bundler.js.map +1 -1
- package/src/builders/library/pipeline/compilation.d.ts +7 -26
- package/src/builders/library/pipeline/compilation.js +59 -69
- package/src/builders/library/pipeline/compilation.js.map +1 -1
- package/src/builders/library/pipeline/entry-points.d.ts +26 -6
- package/src/builders/library/pipeline/entry-points.js +82 -21
- package/src/builders/library/pipeline/entry-points.js.map +1 -1
- package/src/builders/library/pipeline/package-manifests.d.ts +2 -1
- package/src/builders/library/pipeline/package-manifests.js +50 -1
- package/src/builders/library/pipeline/package-manifests.js.map +1 -1
- package/src/builders/library/pipeline/stylesheet-bundler.d.ts +4 -1
- package/src/builders/library/pipeline/stylesheet-bundler.js +1 -1
- package/src/builders/library/pipeline/stylesheet-bundler.js.map +1 -1
- package/src/builders/library/pipeline/utils.d.ts +19 -11
- package/src/builders/library/pipeline/utils.js +27 -11
- package/src/builders/library/pipeline/utils.js.map +1 -1
- package/src/builders/library/schema.json +2 -4
- package/src/builders/library/types.d.ts +62 -22
- package/src/builders/unit-test/runners/vitest/executor.js +0 -5
- package/src/builders/unit-test/runners/vitest/executor.js.map +1 -1
- package/src/builders/unit-test/runners/vitest/plugins.js +13 -1
- package/src/builders/unit-test/runners/vitest/plugins.js.map +1 -1
- package/src/builders/unit-test/test-discovery.js +4 -2
- package/src/builders/unit-test/test-discovery.js.map +1 -1
- package/src/private.d.ts +1 -1
- package/src/private.js +3 -3
- package/src/private.js.map +1 -1
- package/src/tools/angular/angular-host.d.ts +1 -1
- package/src/tools/angular/angular-host.js +5 -2
- package/src/tools/angular/angular-host.js.map +1 -1
- package/src/tools/angular/compilation/angular-compilation.d.ts +1 -0
- package/src/tools/angular/compilation/angular-compilation.js.map +1 -1
- package/src/tools/angular/compilation/aot-compilation.js +325 -80
- package/src/tools/angular/compilation/aot-compilation.js.map +1 -1
- package/src/tools/angular/compilation/compiler-options.js +4 -1
- package/src/tools/angular/compilation/compiler-options.js.map +1 -1
- package/src/tools/angular/compilation/jit-compilation.js +5 -4
- package/src/tools/angular/compilation/jit-compilation.js.map +1 -1
- package/src/tools/angular/compilation/parallel-worker.js +1 -0
- package/src/tools/angular/compilation/parallel-worker.js.map +1 -1
- package/src/tools/angular/compilation/typescript-compilation.d.ts +2 -0
- package/src/tools/angular/compilation/typescript-compilation.js +44 -5
- package/src/tools/angular/compilation/typescript-compilation.js.map +1 -1
- package/src/tools/esbuild/bundler-context.js +5 -1
- package/src/tools/esbuild/bundler-context.js.map +1 -1
- package/src/tools/esbuild/persistent-load-result-cache.js +2 -4
- package/src/tools/esbuild/persistent-load-result-cache.js.map +1 -1
- package/src/tools/esbuild/utils.d.ts +1 -2
- package/src/tools/esbuild/utils.js +0 -13
- package/src/tools/esbuild/utils.js.map +1 -1
- package/src/tools/sass/rebasing-importer.d.ts +1 -1
- package/src/tools/sass/rebasing-importer.js +6 -3
- package/src/tools/sass/rebasing-importer.js.map +1 -1
- package/src/tools/vite/middlewares/assets-middleware.js +1 -1
- package/src/tools/vite/middlewares/assets-middleware.js.map +1 -1
- package/src/utils/concurrency.d.ts +4 -0
- package/src/utils/concurrency.js +5 -0
- package/src/utils/concurrency.js.map +1 -1
- package/src/utils/delete-output-dir.js +3 -2
- package/src/utils/delete-output-dir.js.map +1 -1
- package/src/utils/disk-files.d.ts +30 -0
- package/src/utils/disk-files.js +68 -0
- package/src/utils/disk-files.js.map +1 -0
- package/src/utils/index-file/nonce.d.ts +2 -1
- package/src/utils/index-file/nonce.js +22 -4
- package/src/utils/index-file/nonce.js.map +1 -1
- package/src/utils/normalize-asset-patterns.d.ts +18 -3
- package/src/utils/normalize-asset-patterns.js +34 -67
- package/src/utils/normalize-asset-patterns.js.map +1 -1
- package/src/utils/normalize-cache.js +2 -2
- package/src/utils/normalize-cache.js.map +1 -1
- package/src/utils/postcss-configuration.d.ts +2 -2
- package/src/utils/postcss-configuration.js +3 -3
- package/src/utils/postcss-configuration.js.map +1 -1
- package/src/utils/resolve-assets.js +28 -9
- package/src/utils/resolve-assets.js.map +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 +3 -3
- package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.js.map +1 -1
- package/src/utils/server-rendering/esm-in-memory-loader/register-hooks.js +3 -2
- package/src/utils/server-rendering/esm-in-memory-loader/register-hooks.js.map +1 -1
- package/src/utils/test-files.js +5 -57
- package/src/utils/test-files.js.map +1 -1
- package/src/utils/watcher.d.ts +53 -0
- package/src/utils/watcher.js +404 -76
- package/src/utils/watcher.js.map +1 -1
- package/src/builders/library/pipeline/types.d.ts +0 -54
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.js","sourceRoot":"","sources":["builder.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["builder.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCH,sDAmIC;AAlKD,iFAGuD;AACvD,uDAAiF;AACjF,qDAAwE;AACxE,qEAAgE;AAChE,6CAAkD;AAClD,2CAAkD;AAClD,2CAA+C;AAC/C,qDAA+D;AAC/D,yDAA+D;AAC/D,uEAAsE;AACtE,iDAAqE;AAErE,mDAA+C;AAE/C,uCAAoD;AAEpD,0DAAmE;AACnE,4CAAmD;AAInD;;;;;;GAMG;AACI,KAAK,SAAS,CAAC,CAAC,qBAAqB,CAC1C,OAA8B,EAC9B,OAAkD;IAElD,IAAA,wCAA8B,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAEtD,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC;IAC5C,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,wCAAwC,EAAE,CAAC;QAE1E,OAAO;IACT,CAAC;IAED,MAAM,CAAC,iBAAiB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC5C,IAAA,iCAAuB,EAAC,OAAO,EAAE,WAAW,EAAE,OAAO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C,oBAAoB,UAAU,IAAI,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
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.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import type { BuilderOutput } from '@angular-devkit/architect';
|
|
9
|
+
/**
|
|
10
|
+
* Encapsulates the diagnostic messages (`errors`, `warnings`, and `logs`) and
|
|
11
|
+
* builder output status for a single library build iteration.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ExecutionResult {
|
|
14
|
+
#private;
|
|
15
|
+
/** Formatted error messages produced during the build iteration. */
|
|
16
|
+
get errors(): readonly string[];
|
|
17
|
+
/** Formatted warning messages produced during the build iteration. */
|
|
18
|
+
get warnings(): readonly string[];
|
|
19
|
+
/** Informational log messages produced during the build iteration. */
|
|
20
|
+
get logs(): readonly string[];
|
|
21
|
+
/** Whether any errors have been recorded in the build iteration. */
|
|
22
|
+
get hasErrors(): boolean;
|
|
23
|
+
/** Architect builder output status for the build iteration. */
|
|
24
|
+
get output(): BuilderOutput;
|
|
25
|
+
/** Records an informational log message. */
|
|
26
|
+
addLog(value: string): void;
|
|
27
|
+
/** Records a formatted error message. */
|
|
28
|
+
addError(error: string): void;
|
|
29
|
+
/** Records multiple formatted error messages. */
|
|
30
|
+
addErrors(errors: Iterable<string>): void;
|
|
31
|
+
/** Records a formatted warning message. */
|
|
32
|
+
addWarning(warning: string): void;
|
|
33
|
+
/** Records multiple formatted warning messages. */
|
|
34
|
+
addWarnings(warnings: Iterable<string>): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
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.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ExecutionResult = void 0;
|
|
11
|
+
/**
|
|
12
|
+
* Encapsulates the diagnostic messages (`errors`, `warnings`, and `logs`) and
|
|
13
|
+
* builder output status for a single library build iteration.
|
|
14
|
+
*/
|
|
15
|
+
class ExecutionResult {
|
|
16
|
+
#errors = [];
|
|
17
|
+
#warnings = [];
|
|
18
|
+
#logs = [];
|
|
19
|
+
/** Formatted error messages produced during the build iteration. */
|
|
20
|
+
get errors() {
|
|
21
|
+
return this.#errors;
|
|
22
|
+
}
|
|
23
|
+
/** Formatted warning messages produced during the build iteration. */
|
|
24
|
+
get warnings() {
|
|
25
|
+
return this.#warnings;
|
|
26
|
+
}
|
|
27
|
+
/** Informational log messages produced during the build iteration. */
|
|
28
|
+
get logs() {
|
|
29
|
+
return this.#logs;
|
|
30
|
+
}
|
|
31
|
+
/** Whether any errors have been recorded in the build iteration. */
|
|
32
|
+
get hasErrors() {
|
|
33
|
+
return this.#errors.length > 0;
|
|
34
|
+
}
|
|
35
|
+
/** Architect builder output status for the build iteration. */
|
|
36
|
+
get output() {
|
|
37
|
+
return {
|
|
38
|
+
success: !this.hasErrors,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** Records an informational log message. */
|
|
42
|
+
addLog(value) {
|
|
43
|
+
this.#logs.push(value);
|
|
44
|
+
}
|
|
45
|
+
/** Records a formatted error message. */
|
|
46
|
+
addError(error) {
|
|
47
|
+
this.#errors.push(error);
|
|
48
|
+
}
|
|
49
|
+
/** Records multiple formatted error messages. */
|
|
50
|
+
addErrors(errors) {
|
|
51
|
+
for (const error of errors) {
|
|
52
|
+
this.#errors.push(error);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/** Records a formatted warning message. */
|
|
56
|
+
addWarning(warning) {
|
|
57
|
+
this.#warnings.push(warning);
|
|
58
|
+
}
|
|
59
|
+
/** Records multiple formatted warning messages. */
|
|
60
|
+
addWarnings(warnings) {
|
|
61
|
+
for (const warning of warnings) {
|
|
62
|
+
this.#warnings.push(warning);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.ExecutionResult = ExecutionResult;
|
|
67
|
+
//# sourceMappingURL=execution-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-result.js","sourceRoot":"","sources":["execution-result.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIH;;;GAGG;AACH,MAAa,eAAe;IACjB,OAAO,GAAa,EAAE,CAAC;IACvB,SAAS,GAAa,EAAE,CAAC;IACzB,KAAK,GAAa,EAAE,CAAC;IAE9B,oEAAoE;IACpE,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,sEAAsE;IACtE,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,sEAAsE;IACtE,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,oEAAoE;IACpE,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,+DAA+D;IAC/D,IAAI,MAAM;QACR,OAAO;YACL,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS;SACzB,CAAC;IACJ,CAAC;IAED,4CAA4C;IAC5C,MAAM,CAAC,KAAa;QAClB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAED,yCAAyC;IACzC,QAAQ,CAAC,KAAa;QACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAED,iDAAiD;IACjD,SAAS,CAAC,MAAwB;QAChC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,2CAA2C;IAC3C,UAAU,CAAC,OAAe;QACxB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,mDAAmD;IACnD,WAAW,CAAC,QAA0B;QACpC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;CACF;AA5DD,0CA4DC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
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.dev/license
|
|
7
7
|
*/
|
|
8
|
-
import { Builder } from '@angular-devkit/architect';
|
|
8
|
+
import { type Builder } from '@angular-devkit/architect';
|
|
9
9
|
import { executeLibraryBuilder } from './builder';
|
|
10
10
|
import type { Schema as LibraryBuilderOptions } from './schema';
|
|
11
11
|
export { type LibraryBuilderOptions, executeLibraryBuilder, executeLibraryBuilder as execute };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,yDAAwE;AACxE,uCAAkD;AAGb,sGAH5B,+BAAqB,OAG4B;AAA2B,wFAH5E,+BAAqB,OAG8D;AAE5F,MAAM,OAAO,GAAmC,IAAA,yBAAa,EAAC,+BAAqB,CAAC,CAAC;AAErF,kBAAe,OAAO,CAAC"}
|
|
@@ -8,4 +8,13 @@
|
|
|
8
8
|
import type { BuilderContext } from '@angular-devkit/architect';
|
|
9
9
|
import type { Schema as LibraryBuilderOptions } from './schema';
|
|
10
10
|
import type { NormalizedLibraryOptions } from './types';
|
|
11
|
+
/**
|
|
12
|
+
* Normalizes raw library builder options into {@link NormalizedLibraryOptions} with all
|
|
13
|
+
* file and directory paths normalized to POSIX format.
|
|
14
|
+
*
|
|
15
|
+
* @param context The Architect builder context.
|
|
16
|
+
* @param projectName The name of the library project.
|
|
17
|
+
* @param options The raw library builder schema options.
|
|
18
|
+
* @returns A promise resolving to the normalized library options.
|
|
19
|
+
*/
|
|
11
20
|
export declare function normalizeLibraryOptions(context: BuilderContext, projectName: string, options: LibraryBuilderOptions): Promise<NormalizedLibraryOptions>;
|
|
@@ -11,26 +11,37 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.normalizeLibraryOptions = normalizeLibraryOptions;
|
|
14
|
-
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
15
14
|
const node_path_1 = __importDefault(require("node:path"));
|
|
16
|
-
const utils_1 = require("../../utils");
|
|
17
15
|
const color_1 = require("../../utils/color");
|
|
18
16
|
const error_1 = require("../../utils/error");
|
|
17
|
+
const normalize_asset_patterns_1 = require("../../utils/normalize-asset-patterns");
|
|
19
18
|
const normalize_cache_1 = require("../../utils/normalize-cache");
|
|
19
|
+
const path_1 = require("../../utils/path");
|
|
20
20
|
const postcss_configuration_1 = require("../../utils/postcss-configuration");
|
|
21
21
|
const project_metadata_1 = require("../../utils/project-metadata");
|
|
22
22
|
const entry_points_1 = require("./pipeline/entry-points");
|
|
23
|
+
const utils_1 = require("./pipeline/utils");
|
|
24
|
+
/**
|
|
25
|
+
* Normalizes raw library builder options into {@link NormalizedLibraryOptions} with all
|
|
26
|
+
* file and directory paths normalized to POSIX format.
|
|
27
|
+
*
|
|
28
|
+
* @param context The Architect builder context.
|
|
29
|
+
* @param projectName The name of the library project.
|
|
30
|
+
* @param options The raw library builder schema options.
|
|
31
|
+
* @returns A promise resolving to the normalized library options.
|
|
32
|
+
*/
|
|
23
33
|
async function normalizeLibraryOptions(context, projectName, options) {
|
|
24
|
-
const
|
|
34
|
+
const workspaceRoot = (0, path_1.toPosixPath)(context.workspaceRoot);
|
|
25
35
|
const projectMetadata = await context.getProjectMetadata(projectName);
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
36
|
+
const projectRootPaths = (0, project_metadata_1.getProjectRootPaths)(workspaceRoot, projectMetadata);
|
|
37
|
+
const projectRoot = (0, path_1.toPosixPath)(projectRootPaths.projectRoot);
|
|
38
|
+
const projectSourceRoot = (0, path_1.toPosixPath)(projectRootPaths.projectSourceRoot);
|
|
39
|
+
const { tsConfig, assets: rawAssets, stylePreprocessorOptions, inlineStyleLanguage = 'css', compilationMode, declarationMap, allowedNonPeerDependencies: rawAllowedNonPeerDependencies = [], keepLifecycleScripts = false, watch = false, poll, preserveSymlinks = process.execArgv.includes('--preserve-symlinks'), deleteOutputPath = true, progress = true, clearScreen, } = options;
|
|
40
|
+
const resolvedTsConfigPath = (0, path_1.toPosixPath)(node_path_1.default.resolve(workspaceRoot, tsConfig));
|
|
41
|
+
const packageJsonPath = node_path_1.default.posix.join(projectRoot, 'package.json');
|
|
30
42
|
let packageJson;
|
|
31
43
|
try {
|
|
32
|
-
|
|
33
|
-
packageJson = JSON.parse(packageJsonContent);
|
|
44
|
+
packageJson = await (0, utils_1.loadPackageJson)(packageJsonPath);
|
|
34
45
|
}
|
|
35
46
|
catch (error) {
|
|
36
47
|
(0, error_1.assertIsError)(error);
|
|
@@ -63,24 +74,28 @@ async function normalizeLibraryOptions(context, projectName, options) {
|
|
|
63
74
|
}
|
|
64
75
|
defaultAssets.push({
|
|
65
76
|
glob: 'README.md',
|
|
66
|
-
input: node_path_1.default.dirname(entryPoint.entryFilePath),
|
|
77
|
+
input: node_path_1.default.posix.dirname(entryPoint.entryFilePath),
|
|
67
78
|
output: entryPoint.name,
|
|
68
79
|
});
|
|
69
80
|
}
|
|
70
|
-
const assets = (0,
|
|
81
|
+
const assets = (0, normalize_asset_patterns_1.normalizeAssetPatterns)([...defaultAssets, ...(rawAssets ?? [])], workspaceRoot, projectRoot, projectSourceRoot).map((asset) => ({
|
|
82
|
+
...asset,
|
|
83
|
+
input: (0, path_1.toPosixPath)(node_path_1.default.resolve(workspaceRoot, asset.input)),
|
|
84
|
+
output: (0, path_1.toPosixPath)(asset.output),
|
|
85
|
+
}));
|
|
71
86
|
const cacheOptions = (0, normalize_cache_1.normalizeCacheOptions)(projectMetadata, workspaceRoot, projectName, context.builder.builderName);
|
|
72
|
-
const styleIncludePaths = (stylePreprocessorOptions?.includePaths ?? []).map((p) => node_path_1.default.resolve(workspaceRoot, p));
|
|
87
|
+
const styleIncludePaths = (stylePreprocessorOptions?.includePaths ?? []).map((p) => (0, path_1.toPosixPath)(node_path_1.default.resolve(workspaceRoot, p)));
|
|
73
88
|
const searchDirectories = await (0, postcss_configuration_1.generateSearchDirectories)([projectRoot, workspaceRoot]);
|
|
74
89
|
const postcssConfiguration = await (0, postcss_configuration_1.loadPostcssConfiguration)(searchDirectories);
|
|
75
90
|
const tailwindConfiguration = postcssConfiguration
|
|
76
91
|
? undefined
|
|
77
|
-
:
|
|
92
|
+
: (0, postcss_configuration_1.getTailwindConfig)(searchDirectories, workspaceRoot, context.logger);
|
|
78
93
|
return {
|
|
79
94
|
workspaceRoot,
|
|
80
95
|
projectRoot,
|
|
81
96
|
packageName,
|
|
82
97
|
packageJson,
|
|
83
|
-
outputPath: node_path_1.default.resolve(workspaceRoot, options.outputPath ?? node_path_1.default.join('dist', projectName)),
|
|
98
|
+
outputPath: (0, path_1.toPosixPath)(node_path_1.default.resolve(workspaceRoot, options.outputPath ?? node_path_1.default.posix.join('dist', projectName))),
|
|
84
99
|
deleteOutputPath,
|
|
85
100
|
packageJsonPath,
|
|
86
101
|
tsConfigPath: resolvedTsConfigPath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["options.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["options.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AA8BH,0DA4IC;AAvKD,0DAA6B;AAE7B,6CAAiD;AACjD,6CAAkD;AAClD,mFAA8E;AAC9E,iEAAoE;AACpE,2CAA+C;AAC/C,6EAI2C;AAC3C,mEAAmE;AACnE,0DAA+D;AAC/D,4CAAmD;AAInD;;;;;;;;GAQG;AACI,KAAK,UAAU,uBAAuB,CAC3C,OAAuB,EACvB,WAAmB,EACnB,OAA8B;IAE9B,MAAM,aAAa,GAAG,IAAA,kBAAW,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACzD,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;IACtE,MAAM,gBAAgB,GAAG,IAAA,sCAAmB,EAAC,aAAa,EAAE,eAAe,CAAC,CAAC;IAC7E,MAAM,WAAW,GAAG,IAAA,kBAAW,EAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC9D,MAAM,iBAAiB,GAAG,IAAA,kBAAW,EAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IAE1E,MAAM,EACJ,QAAQ,EACR,MAAM,EAAE,SAAS,EACjB,wBAAwB,EACxB,mBAAmB,GAAG,KAAK,EAC3B,eAAe,EACf,cAAc,EACd,0BAA0B,EAAE,6BAA6B,GAAG,EAAE,EAC9D,oBAAoB,GAAG,KAAK,EAC5B,KAAK,GAAG,KAAK,EACb,IAAI,EACJ,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EACnE,gBAAgB,GAAG,IAAI,EACvB,QAAQ,GAAG,IAAI,EACf,WAAW,GACZ,GAAG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,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAC5C,CAAC;IAEF,MAAM,iBAAiB,GAAG,MAAM,IAAA,iDAAyB,EAAC,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC;IACxF,MAAM,oBAAoB,GAAG,MAAM,IAAA,gDAAwB,EAAC,iBAAiB,CAAC,CAAC;IAC/E,MAAM,qBAAqB,GAAG,oBAAoB;QAChD,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,IAAA,yCAAiB,EAAC,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAExE,OAAO;QACL,aAAa;QACb,WAAW;QACX,WAAW;QACX,WAAW;QACX,UAAU,EAAE,IAAA,kBAAW,EACrB,mBAAI,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,UAAU,IAAI,mBAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CACxF;QACD,gBAAgB;QAChB,eAAe;QACf,YAAY,EAAE,oBAAoB;QAClC,WAAW;QACX,mBAAmB;QACnB,iBAAiB;QACjB,IAAI,EAAE,wBAAwB,EAAE,IAAmD;QACnF,MAAM;QACN,eAAe;QACf,cAAc;QACd,0BAA0B;QAC1B,oBAAoB;QACpB,KAAK;QACL,IAAI;QACJ,gBAAgB;QAChB,QAAQ;QACR,WAAW;QACX,YAAY;QACZ,MAAM,EAAE,IAAA,oBAAY,GAAE;QACtB,oBAAoB;QACpB,qBAAqB;KACtB,CAAC;AACJ,CAAC"}
|
|
@@ -10,9 +10,9 @@ import { type DiskOutputFile } from './utils';
|
|
|
10
10
|
/**
|
|
11
11
|
* Resolves and collects configured library assets to be emitted to disk.
|
|
12
12
|
*
|
|
13
|
-
* @param assets The normalized asset patterns.
|
|
14
|
-
* @param workspaceRoot The workspace root directory path.
|
|
15
|
-
* @param modifiedFiles Optional set of modified file paths for incremental copying in watch mode.
|
|
13
|
+
* @param assets The normalized asset patterns with POSIX paths.
|
|
14
|
+
* @param workspaceRoot The normalized POSIX workspace root directory path.
|
|
15
|
+
* @param modifiedFiles Optional set of modified POSIX file paths for incremental copying in watch mode.
|
|
16
16
|
* @returns An array of disk file emission descriptors.
|
|
17
17
|
*/
|
|
18
18
|
export declare function collectAssetsToEmit(assets: NormalizedLibraryOptions['assets'], workspaceRoot: string, modifiedFiles?: ReadonlySet<string>): Promise<DiskOutputFile[]>;
|
|
@@ -14,15 +14,14 @@ exports.collectAssetsToEmit = collectAssetsToEmit;
|
|
|
14
14
|
const node_fs_1 = require("node:fs");
|
|
15
15
|
const node_path_1 = __importDefault(require("node:path"));
|
|
16
16
|
const picomatch_1 = __importDefault(require("picomatch"));
|
|
17
|
-
const path_1 = require("../../../utils/path");
|
|
18
17
|
const resolve_assets_1 = require("../../../utils/resolve-assets");
|
|
19
18
|
const utils_1 = require("./utils");
|
|
20
19
|
/**
|
|
21
20
|
* Resolves and collects configured library assets to be emitted to disk.
|
|
22
21
|
*
|
|
23
|
-
* @param assets The normalized asset patterns.
|
|
24
|
-
* @param workspaceRoot The workspace root directory path.
|
|
25
|
-
* @param modifiedFiles Optional set of modified file paths for incremental copying in watch mode.
|
|
22
|
+
* @param assets The normalized asset patterns with POSIX paths.
|
|
23
|
+
* @param workspaceRoot The normalized POSIX workspace root directory path.
|
|
24
|
+
* @param modifiedFiles Optional set of modified POSIX file paths for incremental copying in watch mode.
|
|
26
25
|
* @returns An array of disk file emission descriptors.
|
|
27
26
|
*/
|
|
28
27
|
async function collectAssetsToEmit(assets, workspaceRoot, modifiedFiles) {
|
|
@@ -30,21 +29,19 @@ async function collectAssetsToEmit(assets, workspaceRoot, modifiedFiles) {
|
|
|
30
29
|
return [];
|
|
31
30
|
}
|
|
32
31
|
if (modifiedFiles) {
|
|
33
|
-
const matchers = createAssetMatchers(assets
|
|
32
|
+
const matchers = createAssetMatchers(assets);
|
|
34
33
|
const filesToEmit = [];
|
|
35
34
|
for (const file of modifiedFiles) {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
for (const { asset, posixInputPrefix, isMatch } of matchers) {
|
|
39
|
-
if (!posixFile.startsWith(posixInputPrefix)) {
|
|
35
|
+
for (const { asset, prefix, isMatch } of matchers) {
|
|
36
|
+
if (!file.startsWith(prefix)) {
|
|
40
37
|
continue;
|
|
41
38
|
}
|
|
42
|
-
const relative =
|
|
39
|
+
const relative = file.slice(prefix.length);
|
|
43
40
|
if (!isMatch(relative)) {
|
|
44
41
|
continue;
|
|
45
42
|
}
|
|
46
|
-
if ((0, node_fs_1.statSync)(
|
|
47
|
-
filesToEmit.push((0, utils_1.createDiskOutputFile)(
|
|
43
|
+
if ((0, node_fs_1.statSync)(file, { throwIfNoEntry: false })?.isFile()) {
|
|
44
|
+
filesToEmit.push((0, utils_1.createDiskOutputFile)(file, node_path_1.default.posix.join(asset.output, relative)));
|
|
48
45
|
}
|
|
49
46
|
}
|
|
50
47
|
}
|
|
@@ -53,15 +50,14 @@ async function collectAssetsToEmit(assets, workspaceRoot, modifiedFiles) {
|
|
|
53
50
|
const resolvedAssets = await (0, resolve_assets_1.resolveAssets)(assets, workspaceRoot);
|
|
54
51
|
return resolvedAssets.map(({ source, destination }) => (0, utils_1.createDiskOutputFile)(source, destination));
|
|
55
52
|
}
|
|
56
|
-
function createAssetMatchers(assets
|
|
53
|
+
function createAssetMatchers(assets) {
|
|
57
54
|
return assets.map((asset) => {
|
|
58
|
-
const absInput = node_path_1.default.resolve(workspaceRoot, asset.input);
|
|
59
|
-
const posixInput = (0, path_1.toPosixPath)(absInput).replace(/\/+$/, '');
|
|
60
55
|
const isMatch = (0, picomatch_1.default)(asset.glob, {
|
|
61
56
|
dot: true,
|
|
62
57
|
ignore: [...resolve_assets_1.DEFAULT_ASSET_IGNORE, ...(asset.ignore ?? [])],
|
|
63
58
|
});
|
|
64
|
-
|
|
59
|
+
const prefix = asset.input.endsWith('/') ? asset.input : `${asset.input}/`;
|
|
60
|
+
return { asset, prefix, isMatch };
|
|
65
61
|
});
|
|
66
62
|
}
|
|
67
63
|
//# sourceMappingURL=assets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.js","sourceRoot":"","sources":["assets.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["assets.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AAiBH,kDAoCC;AAnDD,qCAAmC;AACnC,0DAA6B;AAC7B,0DAAkC;AAClC,kEAAoF;AAEpF,mCAAoE;AAEpE;;;;;;;GAOG;AACI,KAAK,UAAU,mBAAmB,CACvC,MAA0C,EAC1C,aAAqB,EACrB,aAAmC;IAEnC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,aAAa,EAAE,IAAI,KAAK,CAAC,EAAE,CAAC;QACrD,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,QAAQ,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,WAAW,GAAqB,EAAE,CAAC;QAEzC,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;YACjC,KAAK,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,QAAQ,EAAE,CAAC;gBAClD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;oBAC7B,SAAS;gBACX,CAAC;gBAED,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAC3C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;oBACvB,SAAS;gBACX,CAAC;gBAED,IAAI,IAAA,kBAAQ,EAAC,IAAI,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;oBACxD,WAAW,CAAC,IAAI,CAAC,IAAA,4BAAoB,EAAC,IAAI,EAAE,mBAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACxF,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,MAAM,cAAc,GAAG,MAAM,IAAA,8BAAa,EAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAElE,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,IAAA,4BAAoB,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AACpG,CAAC;AAED,SAAS,mBAAmB,CAAC,MAA0C;IACrE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC1B,MAAM,OAAO,GAAG,IAAA,mBAAS,EAAC,KAAK,CAAC,IAAI,EAAE;YACpC,GAAG,EAAE,IAAI;YACT,MAAM,EAAE,CAAC,GAAG,qCAAoB,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;SAC3D,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC;QAE3E,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -5,43 +5,30 @@
|
|
|
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.dev/license
|
|
7
7
|
*/
|
|
8
|
-
import type { BuilderContext } from '@angular-devkit/architect';
|
|
9
8
|
import type { ComponentStylesheetBundler } from '../../../tools/esbuild/angular/component-stylesheets';
|
|
10
|
-
import type {
|
|
9
|
+
import type { BuilderState } from '../builder-state';
|
|
10
|
+
import type { ExecutionResult } from '../execution-result';
|
|
11
|
+
import type { NormalizedLibraryOptions } from '../types';
|
|
11
12
|
import type { DiskOutputFile } from './utils';
|
|
12
|
-
/**
|
|
13
|
-
* Creates a fresh {@link SingleBuildState} instance.
|
|
14
|
-
*/
|
|
15
|
-
export declare function createSingleBuildState(): SingleBuildState;
|
|
16
13
|
/**
|
|
17
14
|
* Context required to execute a single library build iteration.
|
|
18
15
|
*/
|
|
19
16
|
export interface BuildActionContext {
|
|
20
|
-
/** Normalized options for the library build. */
|
|
17
|
+
/** Normalized options for the library build with POSIX paths. */
|
|
21
18
|
options: NormalizedLibraryOptions;
|
|
22
|
-
/** The Architect builder context. */
|
|
23
|
-
context: BuilderContext;
|
|
24
19
|
/** Bundler instance used to process component stylesheets. */
|
|
25
20
|
stylesheetBundler: ComponentStylesheetBundler;
|
|
26
21
|
/** Whether the builder is running in watch mode. */
|
|
27
22
|
isWatchMode: boolean;
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
* template, and stylesheet files). Updated during compilation and used to determine
|
|
32
|
-
* whether file changes require recompiling entry points, excluding asset files so
|
|
33
|
-
* asset-only changes do not trigger code compilation.
|
|
34
|
-
*/
|
|
35
|
-
watchedCompilationFiles: Set<string>;
|
|
36
|
-
/** State preserved across incremental builds in watch mode. */
|
|
37
|
-
buildState: SingleBuildState;
|
|
38
|
-
/** Set of file paths modified since the last build iteration. */
|
|
23
|
+
/** Build state tracking compilation caches and emitted outputs. */
|
|
24
|
+
buildState: BuilderState;
|
|
25
|
+
/** Set of POSIX file paths modified since the last build iteration. */
|
|
39
26
|
modifiedFiles?: Set<string>;
|
|
40
27
|
/**
|
|
41
|
-
* Asset files to emit
|
|
28
|
+
* Asset files to emit for the current build iteration.
|
|
42
29
|
* Pre-collected in the watch loop to avoid redundant asset matching, or resolved and
|
|
43
30
|
* populated by `buildAction` when omitted (such as during the initial build) so the
|
|
44
|
-
* caller can register their source paths with the file watcher.
|
|
31
|
+
* caller can register their POSIX source paths with the file watcher.
|
|
45
32
|
*/
|
|
46
33
|
assetsToEmit?: DiskOutputFile[];
|
|
47
34
|
}
|
|
@@ -51,6 +38,6 @@ export interface BuildActionContext {
|
|
|
51
38
|
* manifest generation, and asset copying.
|
|
52
39
|
*
|
|
53
40
|
* @param actionContext The build action state and configuration.
|
|
41
|
+
* @returns A promise resolving to the build iteration's `ExecutionResult`.
|
|
54
42
|
*/
|
|
55
|
-
export declare function buildAction(actionContext: BuildActionContext): Promise<
|
|
56
|
-
export declare function hasModifiedWatchedFile(modifiedFiles: ReadonlySet<string>, watchedCompilationFiles: ReadonlySet<string>, posixPackageJsonPath: string): boolean;
|
|
43
|
+
export declare function buildAction(actionContext: BuildActionContext): Promise<ExecutionResult>;
|