@angular/build 19.2.0-next.2 → 19.2.0

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.
Files changed (36) hide show
  1. package/builders.json +5 -0
  2. package/package.json +14 -9
  3. package/src/builders/application/execute-build.js +0 -4
  4. package/src/builders/application/options.d.ts +5 -1
  5. package/src/builders/application/options.js +9 -1
  6. package/src/builders/dev-server/vite-server.js +11 -0
  7. package/src/builders/karma/application_builder.d.ts +15 -0
  8. package/src/builders/karma/application_builder.js +490 -0
  9. package/src/builders/karma/find-tests.d.ts +15 -0
  10. package/src/builders/karma/find-tests.js +144 -0
  11. package/src/builders/karma/index.d.ts +23 -0
  12. package/src/builders/karma/index.js +135 -0
  13. package/src/builders/karma/polyfills/init_sourcemaps.js +10 -0
  14. package/src/builders/karma/polyfills/init_test_bed.js +19 -0
  15. package/src/builders/karma/polyfills/jasmine_global.js +18 -0
  16. package/src/builders/karma/polyfills/jasmine_global_cleanup.js +14 -0
  17. package/src/builders/karma/schema.d.ts +248 -0
  18. package/src/builders/karma/schema.js +15 -0
  19. package/src/builders/karma/schema.json +347 -0
  20. package/src/private.d.ts +2 -0
  21. package/src/private.js +6 -1
  22. package/src/tools/esbuild/angular/compiler-plugin.js +1 -1
  23. package/src/tools/esbuild/index-html-generator.js +1 -8
  24. package/src/tools/vite/middlewares/html-fallback-middleware.js +2 -1
  25. package/src/utils/error.js +2 -2
  26. package/src/utils/index-file/auto-csp.js +1 -1
  27. package/src/utils/index-file/index-html-generator.js +3 -2
  28. package/src/utils/index-file/inline-critical-css.d.ts +1 -0
  29. package/src/utils/index-file/inline-critical-css.js +11 -7
  30. package/src/utils/load-translations.js +3 -3
  31. package/src/utils/normalize-asset-patterns.js +3 -3
  32. package/src/utils/normalize-cache.js +1 -1
  33. package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.js +1 -2
  34. package/src/utils/server-rendering/render-worker.js +2 -2
  35. package/src/utils/server-rendering/routes-extractor-worker.js +2 -2
  36. package/src/utils/service-worker.js +2 -2
@@ -0,0 +1,144 @@
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
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || (function () {
26
+ var ownKeys = function(o) {
27
+ ownKeys = Object.getOwnPropertyNames || function (o) {
28
+ var ar = [];
29
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
+ return ar;
31
+ };
32
+ return ownKeys(o);
33
+ };
34
+ return function (mod) {
35
+ if (mod && mod.__esModule) return mod;
36
+ var result = {};
37
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
+ __setModuleDefault(result, mod);
39
+ return result;
40
+ };
41
+ })();
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.findTests = findTests;
44
+ exports.getTestEntrypoints = getTestEntrypoints;
45
+ const fast_glob_1 = __importStar(require("fast-glob"));
46
+ const node_fs_1 = require("node:fs");
47
+ const node_path_1 = require("node:path");
48
+ /* Go through all patterns and find unique list of files */
49
+ async function findTests(include, exclude, workspaceRoot, projectSourceRoot) {
50
+ const matchingTestsPromises = include.map((pattern) => findMatchingTests(pattern, exclude, workspaceRoot, projectSourceRoot));
51
+ const files = await Promise.all(matchingTestsPromises);
52
+ // Unique file names
53
+ return [...new Set(files.flat())];
54
+ }
55
+ /** Generate unique bundle names for a set of test files. */
56
+ function getTestEntrypoints(testFiles, { projectSourceRoot, workspaceRoot }) {
57
+ const seen = new Set();
58
+ return new Map(Array.from(testFiles, (testFile) => {
59
+ const relativePath = removeRoots(testFile, [projectSourceRoot, workspaceRoot])
60
+ // Strip leading dots and path separators.
61
+ .replace(/^[./\\]+/, '')
62
+ // Replace any path separators with dashes.
63
+ .replace(/[/\\]/g, '-');
64
+ const baseName = `spec-${(0, node_path_1.basename)(relativePath, (0, node_path_1.extname)(relativePath))}`;
65
+ let uniqueName = baseName;
66
+ let suffix = 2;
67
+ while (seen.has(uniqueName)) {
68
+ uniqueName = `${baseName}-${suffix}`.replace(/([^\w](?:spec|test))-([\d]+)$/, '-$2$1');
69
+ ++suffix;
70
+ }
71
+ seen.add(uniqueName);
72
+ return [uniqueName, testFile];
73
+ }));
74
+ }
75
+ const normalizePath = (path) => path.replace(/\\/g, '/');
76
+ const removeLeadingSlash = (pattern) => {
77
+ if (pattern.charAt(0) === '/') {
78
+ return pattern.substring(1);
79
+ }
80
+ return pattern;
81
+ };
82
+ const removeRelativeRoot = (path, root) => {
83
+ if (path.startsWith(root)) {
84
+ return path.substring(root.length);
85
+ }
86
+ return path;
87
+ };
88
+ function removeRoots(path, roots) {
89
+ for (const root of roots) {
90
+ if (path.startsWith(root)) {
91
+ return path.substring(root.length);
92
+ }
93
+ }
94
+ return (0, node_path_1.basename)(path);
95
+ }
96
+ async function findMatchingTests(pattern, ignore, workspaceRoot, projectSourceRoot) {
97
+ // normalize pattern, glob lib only accepts forward slashes
98
+ let normalizedPattern = normalizePath(pattern);
99
+ normalizedPattern = removeLeadingSlash(normalizedPattern);
100
+ const relativeProjectRoot = normalizePath((0, node_path_1.relative)(workspaceRoot, projectSourceRoot) + '/');
101
+ // remove relativeProjectRoot to support relative paths from root
102
+ // such paths are easy to get when running scripts via IDEs
103
+ normalizedPattern = removeRelativeRoot(normalizedPattern, relativeProjectRoot);
104
+ // special logic when pattern does not look like a glob
105
+ if (!(0, fast_glob_1.isDynamicPattern)(normalizedPattern)) {
106
+ if (await isDirectory((0, node_path_1.join)(projectSourceRoot, normalizedPattern))) {
107
+ normalizedPattern = `${normalizedPattern}/**/*.spec.@(ts|tsx)`;
108
+ }
109
+ else {
110
+ // see if matching spec file exists
111
+ const fileExt = (0, node_path_1.extname)(normalizedPattern);
112
+ // Replace extension to `.spec.ext`. Example: `src/app/app.component.ts`-> `src/app/app.component.spec.ts`
113
+ const potentialSpec = (0, node_path_1.join)(projectSourceRoot, (0, node_path_1.dirname)(normalizedPattern), `${(0, node_path_1.basename)(normalizedPattern, fileExt)}.spec${fileExt}`);
114
+ if (await exists(potentialSpec)) {
115
+ return [potentialSpec];
116
+ }
117
+ }
118
+ }
119
+ // normalize the patterns in the ignore list
120
+ const normalizedIgnorePatternList = ignore.map((pattern) => removeRelativeRoot(removeLeadingSlash(normalizePath(pattern)), relativeProjectRoot));
121
+ return (0, fast_glob_1.default)(normalizedPattern, {
122
+ cwd: projectSourceRoot,
123
+ absolute: true,
124
+ ignore: ['**/node_modules/**', ...normalizedIgnorePatternList],
125
+ });
126
+ }
127
+ async function isDirectory(path) {
128
+ try {
129
+ const stats = await node_fs_1.promises.stat(path);
130
+ return stats.isDirectory();
131
+ }
132
+ catch {
133
+ return false;
134
+ }
135
+ }
136
+ async function exists(path) {
137
+ try {
138
+ await node_fs_1.promises.access(path, node_fs_1.constants.F_OK);
139
+ return true;
140
+ }
141
+ catch {
142
+ return false;
143
+ }
144
+ }
@@ -0,0 +1,23 @@
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 Builder, type BuilderContext, type BuilderOutput } from '@angular-devkit/architect';
9
+ import type { ConfigOptions } from 'karma';
10
+ import type { Schema as KarmaBuilderOptions } from './schema';
11
+ export type KarmaConfigOptions = ConfigOptions & {
12
+ buildWebpack?: unknown;
13
+ configFile?: string;
14
+ };
15
+ /**
16
+ * @experimental Direct usage of this function is considered experimental.
17
+ */
18
+ export declare function execute(options: KarmaBuilderOptions, context: BuilderContext, transforms?: {
19
+ karmaOptions?: (options: KarmaConfigOptions) => KarmaConfigOptions;
20
+ }): AsyncIterable<BuilderOutput>;
21
+ export type { KarmaBuilderOptions };
22
+ declare const builder: Builder<KarmaBuilderOptions>;
23
+ export default builder;
@@ -0,0 +1,135 @@
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
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || (function () {
26
+ var ownKeys = function(o) {
27
+ ownKeys = Object.getOwnPropertyNames || function (o) {
28
+ var ar = [];
29
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
+ return ar;
31
+ };
32
+ return ownKeys(o);
33
+ };
34
+ return function (mod) {
35
+ if (mod && mod.__esModule) return mod;
36
+ var result = {};
37
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
+ __setModuleDefault(result, mod);
39
+ return result;
40
+ };
41
+ })();
42
+ var __importDefault = (this && this.__importDefault) || function (mod) {
43
+ return (mod && mod.__esModule) ? mod : { "default": mod };
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.execute = execute;
47
+ const architect_1 = require("@angular-devkit/architect");
48
+ const node_module_1 = require("node:module");
49
+ const node_path_1 = __importDefault(require("node:path"));
50
+ /**
51
+ * @experimental Direct usage of this function is considered experimental.
52
+ */
53
+ async function* execute(options, context, transforms = {}) {
54
+ const { execute } = await Promise.resolve().then(() => __importStar(require('./application_builder')));
55
+ const karmaOptions = getBaseKarmaOptions(options, context);
56
+ yield* execute(options, context, karmaOptions, transforms);
57
+ }
58
+ function getBaseKarmaOptions(options, context) {
59
+ let singleRun;
60
+ if (options.watch !== undefined) {
61
+ singleRun = !options.watch;
62
+ }
63
+ // Determine project name from builder context target
64
+ const projectName = context.target?.project;
65
+ if (!projectName) {
66
+ throw new Error(`The 'karma' builder requires a target to be specified.`);
67
+ }
68
+ const karmaOptions = options.karmaConfig
69
+ ? {}
70
+ : getBuiltInKarmaConfig(context.workspaceRoot, projectName);
71
+ karmaOptions.singleRun = singleRun;
72
+ // Workaround https://github.com/angular/angular-cli/issues/28271, by clearing context by default
73
+ // for single run executions. Not clearing context for multi-run (watched) builds allows the
74
+ // Jasmine Spec Runner to be visible in the browser after test execution.
75
+ karmaOptions.client ??= {};
76
+ karmaOptions.client.clearContext ??= singleRun ?? false; // `singleRun` defaults to `false` per Karma docs.
77
+ // Convert browsers from a string to an array
78
+ if (typeof options.browsers === 'string' && options.browsers) {
79
+ karmaOptions.browsers = options.browsers.split(',');
80
+ }
81
+ else if (options.browsers === false) {
82
+ karmaOptions.browsers = [];
83
+ }
84
+ if (options.reporters) {
85
+ // Split along commas to make it more natural, and remove empty strings.
86
+ const reporters = options.reporters
87
+ .reduce((acc, curr) => acc.concat(curr.split(',')), [])
88
+ .filter((x) => !!x);
89
+ if (reporters.length > 0) {
90
+ karmaOptions.reporters = reporters;
91
+ }
92
+ }
93
+ return karmaOptions;
94
+ }
95
+ function getBuiltInKarmaConfig(workspaceRoot, projectName) {
96
+ let coverageFolderName = projectName.charAt(0) === '@' ? projectName.slice(1) : projectName;
97
+ coverageFolderName = coverageFolderName.toLowerCase();
98
+ const workspaceRootRequire = (0, node_module_1.createRequire)(workspaceRoot + '/');
99
+ // Any changes to the config here need to be synced to: packages/schematics/angular/config/files/karma.conf.js.template
100
+ return {
101
+ basePath: '',
102
+ frameworks: ['jasmine'],
103
+ plugins: [
104
+ 'karma-jasmine',
105
+ 'karma-chrome-launcher',
106
+ 'karma-jasmine-html-reporter',
107
+ 'karma-coverage',
108
+ ].map((p) => workspaceRootRequire(p)),
109
+ jasmineHtmlReporter: {
110
+ suppressAll: true, // removes the duplicated traces
111
+ },
112
+ coverageReporter: {
113
+ dir: node_path_1.default.join(workspaceRoot, 'coverage', coverageFolderName),
114
+ subdir: '.',
115
+ reporters: [{ type: 'html' }, { type: 'text-summary' }],
116
+ },
117
+ reporters: ['progress', 'kjhtml'],
118
+ browsers: ['Chrome'],
119
+ customLaunchers: {
120
+ // Chrome configured to run in a bazel sandbox.
121
+ // Disable the use of the gpu and `/dev/shm` because it causes Chrome to
122
+ // crash on some environments.
123
+ // See:
124
+ // https://github.com/puppeteer/puppeteer/blob/v1.0.0/docs/troubleshooting.md#tips
125
+ // https://stackoverflow.com/questions/50642308/webdriverexception-unknown-error-devtoolsactiveport-file-doesnt-exist-while-t
126
+ ChromeHeadlessNoSandbox: {
127
+ base: 'ChromeHeadless',
128
+ flags: ['--no-sandbox', '--headless', '--disable-gpu', '--disable-dev-shm-usage'],
129
+ },
130
+ },
131
+ restartOnFileChange: true,
132
+ };
133
+ }
134
+ const builder = (0, architect_1.createBuilder)(execute);
135
+ exports.default = builder;
@@ -0,0 +1,10 @@
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
+
9
+ // eslint-disable-next-line no-undef
10
+ globalThis.sourceMapSupport?.install();
@@ -0,0 +1,19 @@
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
+
9
+ import { getTestBed } from '@angular/core/testing';
10
+ import {
11
+ BrowserDynamicTestingModule,
12
+ platformBrowserDynamicTesting,
13
+ } from '@angular/platform-browser-dynamic/testing';
14
+
15
+ // Initialize the Angular testing environment.
16
+ getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
17
+ errorOnUnknownElements: true,
18
+ errorOnUnknownProperties: true,
19
+ });
@@ -0,0 +1,18 @@
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
+
9
+ // See: https://github.com/jasmine/jasmine/issues/2015
10
+ (function () {
11
+ 'use strict';
12
+
13
+ // jasmine will ignore `window` unless it returns this specific (but uncommon)
14
+ // value from toString().
15
+ window.toString = function () {
16
+ return '[object GjsGlobal]';
17
+ };
18
+ })();
@@ -0,0 +1,14 @@
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
+
9
+ // See: https://github.com/jasmine/jasmine/issues/2015
10
+ (function () {
11
+ 'use strict';
12
+
13
+ delete window.toString;
14
+ })();
@@ -0,0 +1,248 @@
1
+ /**
2
+ * Karma target options for Build Facade.
3
+ */
4
+ export type Schema = {
5
+ /**
6
+ * Run tests using Ahead of Time compilation.
7
+ */
8
+ aot?: boolean;
9
+ /**
10
+ * List of static application assets.
11
+ */
12
+ assets?: AssetPattern[];
13
+ /**
14
+ * Override which browsers tests are run against. Set to `false` to not use any browser.
15
+ */
16
+ browsers?: Browsers;
17
+ /**
18
+ * Output a code coverage report.
19
+ */
20
+ codeCoverage?: boolean;
21
+ /**
22
+ * Globs to exclude from code coverage.
23
+ */
24
+ codeCoverageExclude?: string[];
25
+ /**
26
+ * Defines global identifiers that will be replaced with a specified constant value when
27
+ * found in any JavaScript or TypeScript code including libraries. The value will be used
28
+ * directly. String values must be put in quotes. Identifiers within Angular metadata such
29
+ * as Component Decorators will not be replaced.
30
+ */
31
+ define?: {
32
+ [key: string]: string;
33
+ };
34
+ /**
35
+ * Globs of files to exclude, relative to the project root.
36
+ */
37
+ exclude?: string[];
38
+ /**
39
+ * Exclude the listed external dependencies from being bundled into the bundle. Instead, the
40
+ * created bundle relies on these dependencies to be available during runtime.
41
+ */
42
+ externalDependencies?: string[];
43
+ /**
44
+ * Replace compilation source files with other compilation source files in the build.
45
+ */
46
+ fileReplacements?: FileReplacement[];
47
+ /**
48
+ * Globs of files to include, relative to project root.
49
+ * There are 2 special cases:
50
+ * - when a path to directory is provided, all spec files ending ".spec.@(ts|tsx)" will be
51
+ * included
52
+ * - when a path to a file is provided, and a matching spec file exists it will be included
53
+ * instead.
54
+ */
55
+ include?: string[];
56
+ /**
57
+ * The stylesheet language to use for the application's inline component styles.
58
+ */
59
+ inlineStyleLanguage?: InlineStyleLanguage;
60
+ /**
61
+ * The name of the Karma configuration file.
62
+ */
63
+ karmaConfig?: string;
64
+ /**
65
+ * Defines the type of loader to use with a specified file extension when used with a
66
+ * JavaScript `import`. `text` inlines the content as a string; `binary` inlines the content
67
+ * as a Uint8Array; `file` emits the file and provides the runtime location of the file;
68
+ * `empty` considers the content to be empty and not include it in bundles.
69
+ */
70
+ loader?: {
71
+ [key: string]: any;
72
+ };
73
+ /**
74
+ * The name of the main entry-point file.
75
+ */
76
+ main?: string;
77
+ /**
78
+ * Enable and define the file watching poll time period in milliseconds.
79
+ */
80
+ poll?: number;
81
+ /**
82
+ * A list of polyfills to include in the build. Can be a full path for a file, relative to
83
+ * the current workspace or module specifier. Example: 'zone.js'.
84
+ */
85
+ polyfills?: string[];
86
+ /**
87
+ * Do not use the real path when resolving modules. If unset then will default to `true` if
88
+ * NodeJS option --preserve-symlinks is set.
89
+ */
90
+ preserveSymlinks?: boolean;
91
+ /**
92
+ * Log progress to the console while building.
93
+ */
94
+ progress?: boolean;
95
+ /**
96
+ * Karma reporters to use. Directly passed to the karma runner.
97
+ */
98
+ reporters?: string[];
99
+ /**
100
+ * Global scripts to be included in the build.
101
+ */
102
+ scripts?: ScriptElement[];
103
+ /**
104
+ * Output source maps for scripts and styles. For more information, see
105
+ * https://angular.dev/reference/configs/workspace-config#source-map-configuration.
106
+ */
107
+ sourceMap?: SourceMapUnion;
108
+ /**
109
+ * Options to pass to style preprocessors.
110
+ */
111
+ stylePreprocessorOptions?: StylePreprocessorOptions;
112
+ /**
113
+ * Global styles to be included in the build.
114
+ */
115
+ styles?: StyleElement[];
116
+ /**
117
+ * The name of the TypeScript configuration file.
118
+ */
119
+ tsConfig: string;
120
+ /**
121
+ * Run build when files change.
122
+ */
123
+ watch?: boolean;
124
+ /**
125
+ * TypeScript configuration for Web Worker modules.
126
+ */
127
+ webWorkerTsConfig?: string;
128
+ };
129
+ export type AssetPattern = AssetPatternClass | string;
130
+ export type AssetPatternClass = {
131
+ /**
132
+ * The pattern to match.
133
+ */
134
+ glob: string;
135
+ /**
136
+ * An array of globs to ignore.
137
+ */
138
+ ignore?: string[];
139
+ /**
140
+ * The input directory path in which to apply 'glob'. Defaults to the project root.
141
+ */
142
+ input: string;
143
+ /**
144
+ * Absolute path within the output.
145
+ */
146
+ output?: string;
147
+ };
148
+ /**
149
+ * Override which browsers tests are run against. Set to `false` to not use any browser.
150
+ */
151
+ export type Browsers = boolean | string;
152
+ export type FileReplacement = {
153
+ replace: string;
154
+ with: string;
155
+ };
156
+ /**
157
+ * The stylesheet language to use for the application's inline component styles.
158
+ */
159
+ export declare enum InlineStyleLanguage {
160
+ Css = "css",
161
+ Less = "less",
162
+ Sass = "sass",
163
+ Scss = "scss"
164
+ }
165
+ export type ScriptElement = ScriptClass | string;
166
+ export type ScriptClass = {
167
+ /**
168
+ * The bundle name for this extra entry point.
169
+ */
170
+ bundleName?: string;
171
+ /**
172
+ * If the bundle will be referenced in the HTML file.
173
+ */
174
+ inject?: boolean;
175
+ /**
176
+ * The file to include.
177
+ */
178
+ input: string;
179
+ };
180
+ /**
181
+ * Output source maps for scripts and styles. For more information, see
182
+ * https://angular.dev/reference/configs/workspace-config#source-map-configuration.
183
+ */
184
+ export type SourceMapUnion = boolean | SourceMapClass;
185
+ export type SourceMapClass = {
186
+ /**
187
+ * Output source maps for all scripts.
188
+ */
189
+ scripts?: boolean;
190
+ /**
191
+ * Output source maps for all styles.
192
+ */
193
+ styles?: boolean;
194
+ /**
195
+ * Resolve vendor packages source maps.
196
+ */
197
+ vendor?: boolean;
198
+ };
199
+ /**
200
+ * Options to pass to style preprocessors.
201
+ */
202
+ export type StylePreprocessorOptions = {
203
+ /**
204
+ * Paths to include. Paths will be resolved to workspace root.
205
+ */
206
+ includePaths?: string[];
207
+ /**
208
+ * Options to pass to the sass preprocessor.
209
+ */
210
+ sass?: Sass;
211
+ };
212
+ /**
213
+ * Options to pass to the sass preprocessor.
214
+ */
215
+ export type Sass = {
216
+ /**
217
+ * A set of deprecations to treat as fatal. If a deprecation warning of any provided type is
218
+ * encountered during compilation, the compiler will error instead. If a Version is
219
+ * provided, then all deprecations that were active in that compiler version will be treated
220
+ * as fatal.
221
+ */
222
+ fatalDeprecations?: string[];
223
+ /**
224
+ * A set of future deprecations to opt into early. Future deprecations passed here will be
225
+ * treated as active by the compiler, emitting warnings as necessary.
226
+ */
227
+ futureDeprecations?: string[];
228
+ /**
229
+ * A set of active deprecations to ignore. If a deprecation warning of any provided type is
230
+ * encountered during compilation, the compiler will ignore it instead.
231
+ */
232
+ silenceDeprecations?: string[];
233
+ };
234
+ export type StyleElement = StyleClass | string;
235
+ export type StyleClass = {
236
+ /**
237
+ * The bundle name for this extra entry point.
238
+ */
239
+ bundleName?: string;
240
+ /**
241
+ * If the bundle will be referenced in the HTML file.
242
+ */
243
+ inject?: boolean;
244
+ /**
245
+ * The file to include.
246
+ */
247
+ input: string;
248
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ // THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
3
+ // CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.InlineStyleLanguage = void 0;
6
+ /**
7
+ * The stylesheet language to use for the application's inline component styles.
8
+ */
9
+ var InlineStyleLanguage;
10
+ (function (InlineStyleLanguage) {
11
+ InlineStyleLanguage["Css"] = "css";
12
+ InlineStyleLanguage["Less"] = "less";
13
+ InlineStyleLanguage["Sass"] = "sass";
14
+ InlineStyleLanguage["Scss"] = "scss";
15
+ })(InlineStyleLanguage || (exports.InlineStyleLanguage = InlineStyleLanguage = {}));