@angular/build 18.0.3 → 18.1.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +17 -17
- package/src/builders/application/build-action.js +1 -2
- package/src/builders/application/execute-build.js +1 -2
- package/src/builders/application/execute-post-bundle.js +1 -2
- package/src/builders/application/i18n.js +2 -3
- package/src/builders/application/index.js +2 -3
- package/src/builders/application/options.d.ts +2 -2
- package/src/builders/application/options.js +1 -2
- package/src/builders/application/setup-bundling.js +2 -8
- package/src/builders/dev-server/builder.d.ts +0 -1
- package/src/builders/dev-server/builder.js +1 -2
- package/src/builders/dev-server/options.d.ts +4 -0
- package/src/builders/dev-server/options.js +26 -2
- package/src/builders/dev-server/schema.d.ts +10 -0
- package/src/builders/dev-server/schema.json +11 -0
- package/src/builders/dev-server/vite-server.js +42 -34
- package/src/builders/extract-i18n/application-extraction.js +1 -2
- package/src/builders/extract-i18n/builder.js +1 -2
- package/src/builders/extract-i18n/options.js +1 -2
- package/src/tools/babel/plugins/adjust-static-class-members.d.ts +0 -1
- package/src/tools/babel/plugins/adjust-static-class-members.js +2 -3
- package/src/tools/babel/plugins/adjust-typescript-enums.d.ts +0 -1
- package/src/tools/babel/plugins/adjust-typescript-enums.js +2 -3
- package/src/tools/babel/plugins/elide-angular-metadata.d.ts +0 -1
- package/src/tools/babel/plugins/elide-angular-metadata.js +2 -3
- package/src/tools/babel/plugins/pure-toplevel-functions.d.ts +0 -1
- package/src/tools/babel/plugins/pure-toplevel-functions.js +1 -1
- package/src/tools/esbuild/angular/angular-host.js +2 -3
- package/src/tools/esbuild/angular/compilation/aot-compilation.js +42 -7
- package/src/tools/esbuild/angular/compilation/factory.js +1 -2
- package/src/tools/esbuild/angular/compilation/jit-bootstrap-transformer.js +2 -3
- package/src/tools/esbuild/angular/compilation/parallel-worker.d.ts +2 -1
- package/src/tools/esbuild/angular/compilation/parallel-worker.js +10 -7
- package/src/tools/esbuild/angular/compilation-state.js +2 -2
- package/src/tools/esbuild/angular/compiler-plugin.js +15 -7
- package/src/tools/esbuild/angular/diagnostics.js +1 -2
- package/src/tools/esbuild/angular/jit-plugin-callbacks.js +1 -2
- package/src/tools/esbuild/angular/jit-resource-transformer.js +1 -2
- package/src/tools/esbuild/angular/uri.js +4 -4
- package/src/tools/esbuild/angular/web-worker-transformer.js +1 -2
- package/src/tools/esbuild/application-code-bundle.js +4 -5
- package/src/tools/esbuild/budget-stats.js +1 -2
- package/src/tools/esbuild/commonjs-checker.js +1 -2
- package/src/tools/esbuild/compiler-plugin-options.js +1 -2
- package/src/tools/esbuild/external-packages-plugin.js +1 -2
- package/src/tools/esbuild/global-scripts.js +1 -2
- package/src/tools/esbuild/global-styles.js +1 -2
- package/src/tools/esbuild/i18n-inliner-worker.d.ts +1 -1
- package/src/tools/esbuild/i18n-inliner-worker.js +1 -1
- package/src/tools/esbuild/i18n-locale-plugin.js +2 -2
- package/src/tools/esbuild/index-html-generator.js +1 -2
- package/src/tools/esbuild/javascript-transformer-worker.js +1 -1
- package/src/tools/esbuild/javascript-transformer.d.ts +1 -1
- package/src/tools/esbuild/license-extractor.js +1 -2
- package/src/tools/esbuild/load-result-cache.js +2 -2
- package/src/tools/esbuild/profiling.js +4 -5
- package/src/tools/esbuild/rxjs-esm-resolution-plugin.js +1 -2
- package/src/tools/esbuild/sourcemap-ignorelist-plugin.js +1 -2
- package/src/tools/esbuild/stylesheets/bundle-options.js +1 -2
- package/src/tools/esbuild/stylesheets/css-inline-fonts-plugin.js +1 -2
- package/src/tools/esbuild/stylesheets/css-resource-plugin.js +1 -2
- package/src/tools/esbuild/stylesheets/sass-language.js +2 -2
- package/src/tools/esbuild/utils.js +15 -16
- package/src/tools/esbuild/virtual-module-plugin.js +1 -2
- package/src/tools/esbuild/watcher.js +2 -2
- package/src/tools/sass/lexer.js +1 -2
- package/src/tools/sass/rebasing-importer.js +2 -2
- package/src/tools/sass/sass-service.js +3 -1
- package/src/tools/sass/worker.d.ts +2 -4
- package/src/tools/sass/worker.js +1 -1
- package/src/tools/vite/angular-memory-plugin.js +1 -2
- package/src/tools/vite/i18n-locale-plugin.js +2 -2
- package/src/utils/bundle-calculator.js +4 -4
- package/src/utils/check-port.js +1 -2
- package/src/utils/delete-output-dir.js +1 -2
- package/src/utils/error.js +1 -2
- package/src/utils/format-bytes.js +1 -2
- package/src/utils/i18n-options.js +2 -3
- package/src/utils/index-file/add-event-dispatch-contract.js +1 -2
- package/src/utils/index-file/augment-index-html.js +1 -2
- package/src/utils/index-file/html-rewriting-stream.js +1 -2
- package/src/utils/index-file/nonce.js +1 -2
- package/src/utils/load-esm.js +1 -2
- package/src/utils/load-proxy-config.js +1 -2
- package/src/utils/load-translations.js +1 -2
- package/src/utils/normalize-asset-patterns.js +2 -2
- package/src/utils/normalize-cache.js +2 -3
- package/src/utils/normalize-optimization.js +1 -2
- package/src/utils/normalize-source-maps.js +1 -2
- package/src/utils/postcss-configuration.js +3 -4
- package/src/utils/purge-cache.js +1 -2
- package/src/utils/resolve-assets.js +1 -2
- package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.js +3 -4
- package/src/utils/server-rendering/fetch-patch.js +1 -2
- package/src/utils/server-rendering/load-esm-from-memory.js +1 -2
- package/src/utils/server-rendering/prerender.js +1 -2
- package/src/utils/server-rendering/render-page.js +1 -2
- package/src/utils/service-worker.d.ts +0 -2
- package/src/utils/service-worker.js +3 -4
- package/src/utils/stats-table.js +2 -3
- package/src/utils/supported-browsers.js +1 -2
- package/src/utils/tty.js +1 -2
- package/src/utils/url.js +1 -2
- package/src/utils/version.js +1 -2
|
@@ -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.
|
|
@@ -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.
|
|
@@ -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;
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.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.0.
|
|
13
|
+
const VERSION = '18.1.0-next.1';
|
|
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;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.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;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.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;
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.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;
|
package/src/utils/purge-cache.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.purgeStaleBuildCache =
|
|
10
|
+
exports.purgeStaleBuildCache = purgeStaleBuildCache;
|
|
11
11
|
const promises_1 = require("node:fs/promises");
|
|
12
12
|
const node_path_1 = require("node:path");
|
|
13
13
|
const normalize_cache_1 = require("./normalize-cache");
|
|
@@ -37,4 +37,3 @@ async function purgeStaleBuildCache(context) {
|
|
|
37
37
|
.map((stalePath) => (0, promises_1.rm)(stalePath, { force: true, recursive: true, maxRetries: 3 }));
|
|
38
38
|
await Promise.allSettled(entriesToDelete);
|
|
39
39
|
}
|
|
40
|
-
exports.purgeStaleBuildCache = purgeStaleBuildCache;
|
|
@@ -10,7 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.resolveAssets =
|
|
13
|
+
exports.resolveAssets = resolveAssets;
|
|
14
14
|
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
15
15
|
const node_path_1 = __importDefault(require("node:path"));
|
|
16
16
|
async function resolveAssets(entries, root) {
|
|
@@ -32,4 +32,3 @@ async function resolveAssets(entries, root) {
|
|
|
32
32
|
}
|
|
33
33
|
return outputFiles;
|
|
34
34
|
}
|
|
35
|
-
exports.resolveAssets = resolveAssets;
|
|
@@ -10,7 +10,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.initialize = initialize;
|
|
14
|
+
exports.resolve = resolve;
|
|
15
|
+
exports.load = load;
|
|
14
16
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
15
17
|
const node_crypto_1 = require("node:crypto");
|
|
16
18
|
const node_path_1 = require("node:path");
|
|
@@ -38,7 +40,6 @@ function initialize(data) {
|
|
|
38
40
|
memoryVirtualRootUrl = (0, node_url_1.pathToFileURL)((0, node_path_1.join)(data.workspaceRoot, `.angular/prerender-root/${(0, node_crypto_1.randomUUID)()}/`)).href;
|
|
39
41
|
outputFiles = data.outputFiles;
|
|
40
42
|
}
|
|
41
|
-
exports.initialize = initialize;
|
|
42
43
|
function resolve(specifier, context, nextResolve) {
|
|
43
44
|
// In-memory files loaded from external code will contain a memory scheme
|
|
44
45
|
if (specifier.startsWith(MEMORY_URL_SCHEME)) {
|
|
@@ -89,7 +90,6 @@ function resolve(specifier, context, nextResolve) {
|
|
|
89
90
|
parentURL: new URL('index.js', memoryVirtualRootUrl).href,
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
|
-
exports.resolve = resolve;
|
|
93
93
|
async function load(url, context, nextLoad) {
|
|
94
94
|
const { format } = context;
|
|
95
95
|
// Load the file from memory if the URL is based in the virtual root
|
|
@@ -117,7 +117,6 @@ async function load(url, context, nextLoad) {
|
|
|
117
117
|
// Let Node.js handle all other URLs.
|
|
118
118
|
return nextLoad(url);
|
|
119
119
|
}
|
|
120
|
-
exports.load = load;
|
|
121
120
|
function isFileProtocol(url) {
|
|
122
121
|
return url.startsWith('file://');
|
|
123
122
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.patchFetchToLoadInMemoryAssets =
|
|
10
|
+
exports.patchFetchToLoadInMemoryAssets = patchFetchToLoadInMemoryAssets;
|
|
11
11
|
const mrmime_1 = require("mrmime");
|
|
12
12
|
const promises_1 = require("node:fs/promises");
|
|
13
13
|
const node_path_1 = require("node:path");
|
|
@@ -64,4 +64,3 @@ function patchFetchToLoadInMemoryAssets() {
|
|
|
64
64
|
};
|
|
65
65
|
global.fetch = patchedFetch;
|
|
66
66
|
}
|
|
67
|
-
exports.patchFetchToLoadInMemoryAssets = patchFetchToLoadInMemoryAssets;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.loadEsmModuleFromMemory =
|
|
10
|
+
exports.loadEsmModuleFromMemory = loadEsmModuleFromMemory;
|
|
11
11
|
const error_1 = require("../error");
|
|
12
12
|
const load_esm_1 = require("../load-esm");
|
|
13
13
|
function loadEsmModuleFromMemory(path) {
|
|
@@ -23,4 +23,3 @@ function loadEsmModuleFromMemory(path) {
|
|
|
23
23
|
throw error;
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
exports.loadEsmModuleFromMemory = loadEsmModuleFromMemory;
|
|
@@ -10,7 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.prerenderPages =
|
|
13
|
+
exports.prerenderPages = prerenderPages;
|
|
14
14
|
const promises_1 = require("node:fs/promises");
|
|
15
15
|
const node_path_1 = require("node:path");
|
|
16
16
|
const node_url_1 = require("node:url");
|
|
@@ -72,7 +72,6 @@ async function prerenderPages(workspaceRoot, appShellOptions = {}, prerenderOpti
|
|
|
72
72
|
prerenderedRoutes: allRoutes,
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
exports.prerenderPages = prerenderPages;
|
|
76
75
|
class RoutesSet extends Set {
|
|
77
76
|
add(value) {
|
|
78
77
|
return super.add(addLeadingSlash(value));
|
|
@@ -33,7 +33,7 @@ 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.renderPage =
|
|
36
|
+
exports.renderPage = renderPage;
|
|
37
37
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
38
38
|
const node_path_1 = require("node:path");
|
|
39
39
|
const load_esm_from_memory_1 = require("./load-esm-from-memory");
|
|
@@ -108,7 +108,6 @@ async function renderPage({ route, serverContext, document, inlineCriticalCss, o
|
|
|
108
108
|
content: html,
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
exports.renderPage = renderPage;
|
|
112
111
|
function isBootstrapFn(value) {
|
|
113
112
|
// We can differentiate between a module and a bootstrap function by reading compiler-generated `ɵmod` static property:
|
|
114
113
|
return typeof value === 'function' && !('ɵmod' in value);
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="node" />
|
|
9
|
-
/// <reference types="node" />
|
|
10
8
|
import type { Config, Filesystem } from '@angular/service-worker/config';
|
|
11
9
|
import { promises as fsPromises } from 'node:fs';
|
|
12
10
|
import { BuildOutputFile } from '../tools/esbuild/bundler-context';
|
|
@@ -30,7 +30,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.
|
|
33
|
+
exports.augmentAppWithServiceWorker = augmentAppWithServiceWorker;
|
|
34
|
+
exports.augmentAppWithServiceWorkerEsbuild = augmentAppWithServiceWorkerEsbuild;
|
|
35
|
+
exports.augmentAppWithServiceWorkerCore = augmentAppWithServiceWorkerCore;
|
|
34
36
|
const crypto = __importStar(require("crypto"));
|
|
35
37
|
const node_fs_1 = require("node:fs");
|
|
36
38
|
const path = __importStar(require("path"));
|
|
@@ -157,7 +159,6 @@ async function augmentAppWithServiceWorker(appRoot, workspaceRoot, outputPath, b
|
|
|
157
159
|
await copy(source, destination);
|
|
158
160
|
}
|
|
159
161
|
}
|
|
160
|
-
exports.augmentAppWithServiceWorker = augmentAppWithServiceWorker;
|
|
161
162
|
// This is currently used by the esbuild-based builder
|
|
162
163
|
async function augmentAppWithServiceWorkerEsbuild(workspaceRoot, configPath, baseHref, indexHtml, outputFiles, assetFiles) {
|
|
163
164
|
// Read the configuration file
|
|
@@ -182,7 +183,6 @@ async function augmentAppWithServiceWorkerEsbuild(workspaceRoot, configPath, bas
|
|
|
182
183
|
}
|
|
183
184
|
return augmentAppWithServiceWorkerCore(config, new ResultFilesystem(outputFiles, assetFiles), baseHref);
|
|
184
185
|
}
|
|
185
|
-
exports.augmentAppWithServiceWorkerEsbuild = augmentAppWithServiceWorkerEsbuild;
|
|
186
186
|
async function augmentAppWithServiceWorkerCore(config, serviceWorkerFilesystem, baseHref) {
|
|
187
187
|
// Load ESM `@angular/service-worker/config` using the TypeScript dynamic import workaround.
|
|
188
188
|
// Once TypeScript provides support for keeping the dynamic import this workaround can be
|
|
@@ -208,4 +208,3 @@ async function augmentAppWithServiceWorkerCore(config, serviceWorkerFilesystem,
|
|
|
208
208
|
}
|
|
209
209
|
return result;
|
|
210
210
|
}
|
|
211
|
-
exports.augmentAppWithServiceWorkerCore = augmentAppWithServiceWorkerCore;
|
package/src/utils/stats-table.js
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.generateEsbuildBuildStatsTable = generateEsbuildBuildStatsTable;
|
|
11
|
+
exports.generateBuildStatsTable = generateBuildStatsTable;
|
|
11
12
|
const node_util_1 = require("node:util");
|
|
12
13
|
const color_1 = require("./color");
|
|
13
14
|
const format_bytes_1 = require("./format-bytes");
|
|
@@ -24,12 +25,10 @@ function generateEsbuildBuildStatsTable([browserStats, serverStats], colors, sho
|
|
|
24
25
|
}
|
|
25
26
|
return generateTableText(bundleInfo, colors);
|
|
26
27
|
}
|
|
27
|
-
exports.generateEsbuildBuildStatsTable = generateEsbuildBuildStatsTable;
|
|
28
28
|
function generateBuildStatsTable(data, colors, showTotalSize, showEstimatedTransferSize, budgetFailures) {
|
|
29
29
|
const bundleInfo = generateBuildStatsData(data, colors, showTotalSize, showEstimatedTransferSize, budgetFailures, true);
|
|
30
30
|
return generateTableText(bundleInfo, colors);
|
|
31
31
|
}
|
|
32
|
-
exports.generateBuildStatsTable = generateBuildStatsTable;
|
|
33
32
|
function generateBuildStatsData(data, colors, showTotalSize, showEstimatedTransferSize, budgetFailures, verbose) {
|
|
34
33
|
if (data.length === 0) {
|
|
35
34
|
return [];
|
|
@@ -10,7 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.getSupportedBrowsers =
|
|
13
|
+
exports.getSupportedBrowsers = getSupportedBrowsers;
|
|
14
14
|
const browserslist_1 = __importDefault(require("browserslist"));
|
|
15
15
|
function getSupportedBrowsers(projectRoot, logger) {
|
|
16
16
|
browserslist_1.default.defaults = [
|
|
@@ -39,4 +39,3 @@ function getSupportedBrowsers(projectRoot, logger) {
|
|
|
39
39
|
}
|
|
40
40
|
return Array.from(browsersFromConfigOrDefault);
|
|
41
41
|
}
|
|
42
|
-
exports.getSupportedBrowsers = getSupportedBrowsers;
|
package/src/utils/tty.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.isTTY =
|
|
10
|
+
exports.isTTY = isTTY;
|
|
11
11
|
function _isTruthy(value) {
|
|
12
12
|
// Returns true if value is a string that is anything but 0 or false.
|
|
13
13
|
return value !== undefined && value !== '0' && value.toUpperCase() !== 'FALSE';
|
|
@@ -20,4 +20,3 @@ function isTTY() {
|
|
|
20
20
|
}
|
|
21
21
|
return !!process.stdout.isTTY && !_isTruthy(process.env['CI']);
|
|
22
22
|
}
|
|
23
|
-
exports.isTTY = isTTY;
|
package/src/utils/url.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.urlJoin =
|
|
10
|
+
exports.urlJoin = urlJoin;
|
|
11
11
|
function urlJoin(...parts) {
|
|
12
12
|
const [p, ...rest] = parts;
|
|
13
13
|
// Remove trailing slash from first part
|
|
@@ -15,4 +15,3 @@ function urlJoin(...parts) {
|
|
|
15
15
|
// Dedupe double slashes from path names
|
|
16
16
|
return p.replace(/\/$/, '') + ('/' + rest.join('/')).replace(/\/\/+/g, '/');
|
|
17
17
|
}
|
|
18
|
-
exports.urlJoin = urlJoin;
|
package/src/utils/version.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.assertCompatibleAngularVersion =
|
|
10
|
+
exports.assertCompatibleAngularVersion = assertCompatibleAngularVersion;
|
|
11
11
|
/* eslint-disable no-console */
|
|
12
12
|
const node_module_1 = require("node:module");
|
|
13
13
|
const semver_1 = require("semver");
|
|
@@ -62,4 +62,3 @@ function assertCompatibleAngularVersion(projectRoot) {
|
|
|
62
62
|
process.exit(3);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
exports.assertCompatibleAngularVersion = assertCompatibleAngularVersion;
|