@nx/angular-rspack 0.0.0-pr-32422-a3285be
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/LICENSE +22 -0
- package/README.md +98 -0
- package/README.md__tpl__ +48 -0
- package/dist/lib/config/config-utils/browser-config.d.ts +4 -0
- package/dist/lib/config/config-utils/browser-config.d.ts.map +1 -0
- package/dist/lib/config/config-utils/browser-config.js +83 -0
- package/dist/lib/config/config-utils/common-config.d.ts +3 -0
- package/dist/lib/config/config-utils/common-config.d.ts.map +1 -0
- package/dist/lib/config/config-utils/common-config.js +144 -0
- package/dist/lib/config/config-utils/dev-server-config-utils.d.ts +4 -0
- package/dist/lib/config/config-utils/dev-server-config-utils.d.ts.map +1 -0
- package/dist/lib/config/config-utils/dev-server-config-utils.js +258 -0
- package/dist/lib/config/config-utils/entry-points.d.ts +9 -0
- package/dist/lib/config/config-utils/entry-points.d.ts.map +1 -0
- package/dist/lib/config/config-utils/entry-points.js +36 -0
- package/dist/lib/config/config-utils/get-stats-options.d.ts +3 -0
- package/dist/lib/config/config-utils/get-stats-options.d.ts.map +1 -0
- package/dist/lib/config/config-utils/get-stats-options.js +39 -0
- package/dist/lib/config/config-utils/helpers.d.ts +13 -0
- package/dist/lib/config/config-utils/helpers.d.ts.map +1 -0
- package/dist/lib/config/config-utils/helpers.js +106 -0
- package/dist/lib/config/config-utils/optimization-config.d.ts +5 -0
- package/dist/lib/config/config-utils/optimization-config.d.ts.map +1 -0
- package/dist/lib/config/config-utils/optimization-config.js +69 -0
- package/dist/lib/config/config-utils/server-config.d.ts +4 -0
- package/dist/lib/config/config-utils/server-config.d.ts.map +1 -0
- package/dist/lib/config/config-utils/server-config.js +92 -0
- package/dist/lib/config/config-utils/sourcemap-utils.d.ts +7 -0
- package/dist/lib/config/config-utils/sourcemap-utils.d.ts.map +1 -0
- package/dist/lib/config/config-utils/sourcemap-utils.js +48 -0
- package/dist/lib/config/config-utils/style-config-utils.d.ts +7 -0
- package/dist/lib/config/config-utils/style-config-utils.d.ts.map +1 -0
- package/dist/lib/config/config-utils/style-config-utils.js +353 -0
- package/dist/lib/config/config-utils/user-defined-config-helpers.d.ts +73 -0
- package/dist/lib/config/config-utils/user-defined-config-helpers.d.ts.map +1 -0
- package/dist/lib/config/config-utils/user-defined-config-helpers.js +23 -0
- package/dist/lib/config/create-config.d.ts +11 -0
- package/dist/lib/config/create-config.d.ts.map +1 -0
- package/dist/lib/config/create-config.js +35 -0
- package/dist/lib/config/i18n/create-i18n-options.d.ts +6 -0
- package/dist/lib/config/i18n/create-i18n-options.d.ts.map +1 -0
- package/dist/lib/config/i18n/create-i18n-options.js +124 -0
- package/dist/lib/index.d.ts +7 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +14 -0
- package/dist/lib/models/angular-rspack-plugin-options.d.ts +344 -0
- package/dist/lib/models/angular-rspack-plugin-options.d.ts.map +1 -0
- package/dist/lib/models/angular-rspack-plugin-options.js +2 -0
- package/dist/lib/models/augmented-compilation.d.ts +13 -0
- package/dist/lib/models/augmented-compilation.d.ts.map +1 -0
- package/dist/lib/models/augmented-compilation.js +4 -0
- package/dist/lib/models/i18n.d.ts +33 -0
- package/dist/lib/models/i18n.d.ts.map +1 -0
- package/dist/lib/models/i18n.js +41 -0
- package/dist/lib/models/index.d.ts +5 -0
- package/dist/lib/models/index.d.ts.map +1 -0
- package/dist/lib/models/index.js +7 -0
- package/dist/lib/models/normalize-options.d.ts +16 -0
- package/dist/lib/models/normalize-options.d.ts.map +1 -0
- package/dist/lib/models/normalize-options.js +424 -0
- package/dist/lib/plugins/angular-rspack-plugin.d.ts +9 -0
- package/dist/lib/plugins/angular-rspack-plugin.d.ts.map +1 -0
- package/dist/lib/plugins/angular-rspack-plugin.js +234 -0
- package/dist/lib/plugins/angular-ssr-dev-server.d.ts +8 -0
- package/dist/lib/plugins/angular-ssr-dev-server.d.ts.map +1 -0
- package/dist/lib/plugins/angular-ssr-dev-server.js +62 -0
- package/dist/lib/plugins/any-component-style-budget-checker-plugin.d.ts +19 -0
- package/dist/lib/plugins/any-component-style-budget-checker-plugin.d.ts.map +1 -0
- package/dist/lib/plugins/any-component-style-budget-checker-plugin.js +64 -0
- package/dist/lib/plugins/client/ssr-reload-client.d.ts +2 -0
- package/dist/lib/plugins/client/ssr-reload-client.d.ts.map +1 -0
- package/dist/lib/plugins/client/ssr-reload-client.js +15 -0
- package/dist/lib/plugins/i18n-inline-plugin.d.ts +8 -0
- package/dist/lib/plugins/i18n-inline-plugin.d.ts.map +1 -0
- package/dist/lib/plugins/i18n-inline-plugin.js +201 -0
- package/dist/lib/plugins/index-html-plugin.d.ts +21 -0
- package/dist/lib/plugins/index-html-plugin.d.ts.map +1 -0
- package/dist/lib/plugins/index-html-plugin.js +107 -0
- package/dist/lib/plugins/loaders/angular-partial-transform.loader.d.ts +3 -0
- package/dist/lib/plugins/loaders/angular-partial-transform.loader.d.ts.map +1 -0
- package/dist/lib/plugins/loaders/angular-partial-transform.loader.js +39 -0
- package/dist/lib/plugins/loaders/angular-transform.loader.d.ts +7 -0
- package/dist/lib/plugins/loaders/angular-transform.loader.d.ts.map +1 -0
- package/dist/lib/plugins/loaders/angular-transform.loader.js +40 -0
- package/dist/lib/plugins/loaders/hmr-accept-loader.d.ts +11 -0
- package/dist/lib/plugins/loaders/hmr-accept-loader.d.ts.map +1 -0
- package/dist/lib/plugins/loaders/hmr-accept-loader.js +24 -0
- package/dist/lib/plugins/loaders/hmr-accept.d.ts +9 -0
- package/dist/lib/plugins/loaders/hmr-accept.d.ts.map +1 -0
- package/dist/lib/plugins/loaders/hmr-accept.js +183 -0
- package/dist/lib/plugins/loaders/platform-server-exports.loader.d.ts +5 -0
- package/dist/lib/plugins/loaders/platform-server-exports.loader.d.ts.map +1 -0
- package/dist/lib/plugins/loaders/platform-server-exports.loader.js +18 -0
- package/dist/lib/plugins/ng-rspack.d.ts +13 -0
- package/dist/lib/plugins/ng-rspack.d.ts.map +1 -0
- package/dist/lib/plugins/ng-rspack.js +134 -0
- package/dist/lib/plugins/prerender-plugin.d.ts +8 -0
- package/dist/lib/plugins/prerender-plugin.d.ts.map +1 -0
- package/dist/lib/plugins/prerender-plugin.js +216 -0
- package/dist/lib/plugins/progress-plugin.d.ts +12 -0
- package/dist/lib/plugins/progress-plugin.d.ts.map +1 -0
- package/dist/lib/plugins/progress-plugin.js +36 -0
- package/dist/lib/plugins/rxjs-esm-resolution.d.ts +5 -0
- package/dist/lib/plugins/rxjs-esm-resolution.d.ts.map +1 -0
- package/dist/lib/plugins/rxjs-esm-resolution.js +15 -0
- package/dist/lib/plugins/server/ssr-reload-server.d.ts +6 -0
- package/dist/lib/plugins/server/ssr-reload-server.d.ts.map +1 -0
- package/dist/lib/plugins/server/ssr-reload-server.js +21 -0
- package/dist/lib/plugins/stats-json-plugin.d.ts +14 -0
- package/dist/lib/plugins/stats-json-plugin.d.ts.map +1 -0
- package/dist/lib/plugins/stats-json-plugin.js +69 -0
- package/dist/lib/plugins/suppress-js-for-css-chunks-plugin.d.ts +5 -0
- package/dist/lib/plugins/suppress-js-for-css-chunks-plugin.d.ts.map +1 -0
- package/dist/lib/plugins/suppress-js-for-css-chunks-plugin.js +34 -0
- package/dist/lib/plugins/tools/dev-tools-ignore-plugin.d.ts +17 -0
- package/dist/lib/plugins/tools/dev-tools-ignore-plugin.d.ts.map +1 -0
- package/dist/lib/plugins/tools/dev-tools-ignore-plugin.js +57 -0
- package/dist/lib/plugins/tools/render-worker.d.ts +31 -0
- package/dist/lib/plugins/tools/render-worker.d.ts.map +1 -0
- package/dist/lib/plugins/tools/render-worker.js +105 -0
- package/dist/lib/plugins/tools/routes-extractor-worker.d.ts +21 -0
- package/dist/lib/plugins/tools/routes-extractor-worker.d.ts.map +1 -0
- package/dist/lib/plugins/tools/routes-extractor-worker.js +48 -0
- package/dist/lib/plugins/tools/worker-pool.d.ts +13 -0
- package/dist/lib/plugins/tools/worker-pool.d.ts.map +1 -0
- package/dist/lib/plugins/tools/worker-pool.js +23 -0
- package/dist/lib/plugins/transfer-size-plugin.d.ts +12 -0
- package/dist/lib/plugins/transfer-size-plugin.d.ts.map +1 -0
- package/dist/lib/plugins/transfer-size-plugin.js +49 -0
- package/dist/lib/plugins/watch-file-logs-plugin.d.ts +12 -0
- package/dist/lib/plugins/watch-file-logs-plugin.d.ts.map +1 -0
- package/dist/lib/plugins/watch-file-logs-plugin.js +27 -0
- package/dist/lib/utils/async-chunks.d.ts +17 -0
- package/dist/lib/utils/async-chunks.d.ts.map +1 -0
- package/dist/lib/utils/async-chunks.js +44 -0
- package/dist/lib/utils/color.d.ts +11 -0
- package/dist/lib/utils/color.d.ts.map +1 -0
- package/dist/lib/utils/color.js +41 -0
- package/dist/lib/utils/find-project-for-path.d.ts +16 -0
- package/dist/lib/utils/find-project-for-path.d.ts.map +1 -0
- package/dist/lib/utils/find-project-for-path.js +42 -0
- package/dist/lib/utils/get-locale-base-href.d.ts +3 -0
- package/dist/lib/utils/get-locale-base-href.d.ts.map +1 -0
- package/dist/lib/utils/get-locale-base-href.js +17 -0
- package/dist/lib/utils/graph.d.ts +3 -0
- package/dist/lib/utils/graph.d.ts.map +1 -0
- package/dist/lib/utils/graph.js +25 -0
- package/dist/lib/utils/i18n.d.ts +4 -0
- package/dist/lib/utils/i18n.d.ts.map +1 -0
- package/dist/lib/utils/i18n.js +25 -0
- package/dist/lib/utils/index-file/add-body-script.d.ts +2 -0
- package/dist/lib/utils/index-file/add-body-script.d.ts.map +1 -0
- package/dist/lib/utils/index-file/add-body-script.js +15 -0
- package/dist/lib/utils/index-file/add-event-dispatch-contract.d.ts +9 -0
- package/dist/lib/utils/index-file/add-event-dispatch-contract.d.ts.map +1 -0
- package/dist/lib/utils/index-file/add-event-dispatch-contract.js +27 -0
- package/dist/lib/utils/index-file/get-index-input-file.d.ts +3 -0
- package/dist/lib/utils/index-file/get-index-input-file.d.ts.map +1 -0
- package/dist/lib/utils/index-file/get-index-input-file.js +9 -0
- package/dist/lib/utils/index-file/get-index-output-file.d.ts +3 -0
- package/dist/lib/utils/index-file/get-index-output-file.d.ts.map +1 -0
- package/dist/lib/utils/index-file/get-index-output-file.js +10 -0
- package/dist/lib/utils/index-file/html-rewriting-stream.d.ts +16 -0
- package/dist/lib/utils/index-file/html-rewriting-stream.d.ts.map +1 -0
- package/dist/lib/utils/index-file/html-rewriting-stream.js +27 -0
- package/dist/lib/utils/max-workers.d.ts +2 -0
- package/dist/lib/utils/max-workers.d.ts.map +1 -0
- package/dist/lib/utils/max-workers.js +21 -0
- package/dist/lib/utils/misc-helpers.d.ts +7 -0
- package/dist/lib/utils/misc-helpers.d.ts.map +1 -0
- package/dist/lib/utils/misc-helpers.js +34 -0
- package/dist/lib/utils/postcss-cli-resources.d.ts +22 -0
- package/dist/lib/utils/postcss-cli-resources.d.ts.map +1 -0
- package/dist/lib/utils/postcss-cli-resources.js +159 -0
- package/dist/lib/utils/postcss-configuration.d.ts +18 -0
- package/dist/lib/utils/postcss-configuration.d.ts.map +1 -0
- package/dist/lib/utils/postcss-configuration.js +92 -0
- package/dist/lib/utils/rspack-diagnostics.d.ts +4 -0
- package/dist/lib/utils/rspack-diagnostics.d.ts.map +1 -0
- package/dist/lib/utils/rspack-diagnostics.js +22 -0
- package/dist/lib/utils/spinner.d.ts +21 -0
- package/dist/lib/utils/spinner.d.ts.map +1 -0
- package/dist/lib/utils/spinner.js +54 -0
- package/dist/lib/utils/stats.d.ts +35 -0
- package/dist/lib/utils/stats.d.ts.map +1 -0
- package/dist/lib/utils/stats.js +313 -0
- package/dist/lib/utils/tty.d.ts +9 -0
- package/dist/lib/utils/tty.d.ts.map +1 -0
- package/dist/lib/utils/tty.js +22 -0
- package/dist/lib/utils/url-join.d.ts +9 -0
- package/dist/lib/utils/url-join.d.ts.map +1 -0
- package/dist/lib/utils/url-join.js +17 -0
- package/package.json +150 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configureI18n = configureI18n;
|
|
4
|
+
const private_1 = require("@angular/build/private");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const node_module_1 = require("node:module");
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const find_project_for_path_1 = require("../../utils/find-project-for-path");
|
|
9
|
+
const graph_1 = require("../../utils/graph");
|
|
10
|
+
/**
|
|
11
|
+
* The base module location used to search for locale specific data.
|
|
12
|
+
*/
|
|
13
|
+
const LOCALE_DATA_BASE_MODULE = '@angular/common/locales/global';
|
|
14
|
+
function findLocaleDataPath(locale, resolver) {
|
|
15
|
+
// Remove private use subtags
|
|
16
|
+
const scrubbedLocale = locale.replace(/-x(-[a-zA-Z0-9]{1,8})+$/, '');
|
|
17
|
+
try {
|
|
18
|
+
return resolver(scrubbedLocale);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
// fallback to known existing en-US locale data as of 14.0
|
|
22
|
+
return scrubbedLocale === 'en-US'
|
|
23
|
+
? findLocaleDataPath('en', resolver)
|
|
24
|
+
: null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async function getI18nMetadata(projectRoot, i18nMetadata) {
|
|
28
|
+
if (i18nMetadata === undefined) {
|
|
29
|
+
return await tryGetI18nMetadataFromProject(projectRoot);
|
|
30
|
+
}
|
|
31
|
+
return i18nMetadata;
|
|
32
|
+
}
|
|
33
|
+
async function tryGetI18nMetadataFromProject(projectRoot) {
|
|
34
|
+
try {
|
|
35
|
+
const graph = await (0, graph_1.retrieveOrCreateProjectGraph)();
|
|
36
|
+
if (!graph) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
const projectRootMappings = (0, find_project_for_path_1.createProjectRootMappings)(graph.nodes);
|
|
40
|
+
const root = projectRoot.startsWith(devkit_1.workspaceRoot)
|
|
41
|
+
? (0, node_path_1.relative)(devkit_1.workspaceRoot, projectRoot)
|
|
42
|
+
: projectRoot;
|
|
43
|
+
const projectName = (0, find_project_for_path_1.findProjectForPath)(root, projectRootMappings);
|
|
44
|
+
if (!projectName) {
|
|
45
|
+
// Could not find a project the given root
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
const project = graph.nodes[projectName];
|
|
49
|
+
// Need to cast to any as Nx is not aware of the i18n metadata that exists in angular projects
|
|
50
|
+
const projectData = project.data;
|
|
51
|
+
if (projectData.i18n && typeof projectData.i18n === 'object') {
|
|
52
|
+
return projectData.i18n;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
// Issue attempting to use the Nx project graph to determine the project to get the i18n metadata.
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async function createI18nOptions(projectRoot, options, inline, ssrEnabled) {
|
|
61
|
+
const i18nMetadata = await getI18nMetadata(projectRoot, options.i18nMetadata);
|
|
62
|
+
return (0, private_1.createI18nOptions)({ i18n: i18nMetadata }, inline, devkit_1.logger, ssrEnabled);
|
|
63
|
+
}
|
|
64
|
+
async function configureI18n(projectRoot, options) {
|
|
65
|
+
if (global.NX_GRAPH_CREATION) {
|
|
66
|
+
return {
|
|
67
|
+
options,
|
|
68
|
+
i18n: {
|
|
69
|
+
inlineLocales: new Set(),
|
|
70
|
+
// en-US is the default locale added to Angular applications (https://angular.dev/guide/i18n/format-data-locale)
|
|
71
|
+
sourceLocale: 'en-US',
|
|
72
|
+
locales: {},
|
|
73
|
+
get shouldInline() {
|
|
74
|
+
return this.inlineLocales.size > 0;
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
const i18n = await createI18nOptions(projectRoot, options, options.localize);
|
|
80
|
+
// No additional processing needed if no inlining requested and no source locale defined.
|
|
81
|
+
if (!i18n.shouldInline && !i18n.hasDefinedSourceLocale) {
|
|
82
|
+
return { options, i18n };
|
|
83
|
+
}
|
|
84
|
+
// The trailing slash is required to signal that the path is a directory and not a file.
|
|
85
|
+
const projectRequire = (0, node_module_1.createRequire)(projectRoot + '/');
|
|
86
|
+
const localeResolver = (locale) => projectRequire.resolve((0, node_path_1.join)(LOCALE_DATA_BASE_MODULE, locale));
|
|
87
|
+
// Load locale data and translations (if present)
|
|
88
|
+
let loader;
|
|
89
|
+
const usedFormats = new Set();
|
|
90
|
+
for (const [locale, desc] of Object.entries(i18n.locales)) {
|
|
91
|
+
if (!i18n.inlineLocales.has(locale) && locale !== i18n.sourceLocale) {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
let localeDataPath = findLocaleDataPath(locale, localeResolver);
|
|
95
|
+
if (!localeDataPath) {
|
|
96
|
+
const [first] = locale.split('-');
|
|
97
|
+
if (first) {
|
|
98
|
+
localeDataPath = findLocaleDataPath(first.toLowerCase(), localeResolver);
|
|
99
|
+
if (localeDataPath) {
|
|
100
|
+
devkit_1.logger.warn(`Locale data for '${locale}' cannot be found. Using locale data for '${first}'.`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (!localeDataPath) {
|
|
105
|
+
devkit_1.logger.warn(`Locale data for '${locale}' cannot be found. No locale data will be included for this locale.`);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
desc.dataPath = localeDataPath;
|
|
109
|
+
}
|
|
110
|
+
if (!desc.files.length) {
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
loader ??= await (0, private_1.createTranslationLoader)();
|
|
114
|
+
(0, private_1.loadTranslations)(locale, desc, devkit_1.workspaceRoot, loader, {
|
|
115
|
+
warn(message) {
|
|
116
|
+
devkit_1.logger.warn(message);
|
|
117
|
+
},
|
|
118
|
+
error(message) {
|
|
119
|
+
throw new Error(message);
|
|
120
|
+
},
|
|
121
|
+
}, usedFormats, options.i18nDuplicateTranslation);
|
|
122
|
+
}
|
|
123
|
+
return { options, i18n };
|
|
124
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './config/create-config';
|
|
2
|
+
export * from './plugins/ng-rspack';
|
|
3
|
+
export { configureSourceMap } from './config/config-utils/sourcemap-utils';
|
|
4
|
+
export { getCrossOriginLoading } from './config/config-utils/helpers';
|
|
5
|
+
export { getOptimization } from './config/config-utils/optimization-config';
|
|
6
|
+
export { VENDORS_TEST } from './config/config-utils/optimization-config';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VENDORS_TEST = exports.getOptimization = exports.getCrossOriginLoading = exports.configureSourceMap = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("./config/create-config"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./plugins/ng-rspack"), exports);
|
|
7
|
+
var sourcemap_utils_1 = require("./config/config-utils/sourcemap-utils");
|
|
8
|
+
Object.defineProperty(exports, "configureSourceMap", { enumerable: true, get: function () { return sourcemap_utils_1.configureSourceMap; } });
|
|
9
|
+
var helpers_1 = require("./config/config-utils/helpers");
|
|
10
|
+
Object.defineProperty(exports, "getCrossOriginLoading", { enumerable: true, get: function () { return helpers_1.getCrossOriginLoading; } });
|
|
11
|
+
var optimization_config_1 = require("./config/config-utils/optimization-config");
|
|
12
|
+
Object.defineProperty(exports, "getOptimization", { enumerable: true, get: function () { return optimization_config_1.getOptimization; } });
|
|
13
|
+
var optimization_config_2 = require("./config/config-utils/optimization-config");
|
|
14
|
+
Object.defineProperty(exports, "VENDORS_TEST", { enumerable: true, get: function () { return optimization_config_2.VENDORS_TEST; } });
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import type { FileReplacement, InlineStyleLanguage, StylePreprocessorOptions } from '@nx/angular-rspack-compiler';
|
|
2
|
+
import type { BudgetEntry } from '@angular/build/private';
|
|
3
|
+
import { I18nProjectMetadata } from './i18n';
|
|
4
|
+
export interface DevServerOptions {
|
|
5
|
+
/**
|
|
6
|
+
* The hosts that the development server will respond to.
|
|
7
|
+
*/
|
|
8
|
+
allowedHosts?: string[] | boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Don't verify connected clients are part of allowed hosts.
|
|
11
|
+
*/
|
|
12
|
+
disableHostCheck?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Custom HTTP headers to be added to all responses.
|
|
15
|
+
*/
|
|
16
|
+
headers?: Record<string, string>;
|
|
17
|
+
/**
|
|
18
|
+
* Enable hot module replacement.
|
|
19
|
+
*/
|
|
20
|
+
hmr?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Host to listen on.
|
|
23
|
+
*/
|
|
24
|
+
host?: string;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated This is a no-op and can be safely removed.
|
|
27
|
+
* The `inspect` option is no longer supported.
|
|
28
|
+
*/
|
|
29
|
+
inspect?: string | boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Whether to reload the page on change, using live-reload.
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
liveReload?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Opens the url in default browser.
|
|
37
|
+
*/
|
|
38
|
+
open?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Port to listen on.
|
|
41
|
+
*/
|
|
42
|
+
port?: number;
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated This is a no-op and can be safely removed.
|
|
45
|
+
* The `prebundle` option is no longer supported.
|
|
46
|
+
*/
|
|
47
|
+
prebundle?: boolean | {
|
|
48
|
+
exclude: string[];
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Proxy configuration file. For more information, see https://angular.dev/tools/cli/serve#proxying-to-a-backend-server.
|
|
52
|
+
*/
|
|
53
|
+
proxyConfig?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The URL that the browser client (or live-reload client, if enabled) should
|
|
56
|
+
* use to connect to the development server. Use for a complex dev server setup,
|
|
57
|
+
* such as one with reverse proxies.
|
|
58
|
+
*/
|
|
59
|
+
publicHost?: string;
|
|
60
|
+
/**
|
|
61
|
+
* The pathname where the application will be served.
|
|
62
|
+
*/
|
|
63
|
+
servePath?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Serve using HTTPS.
|
|
66
|
+
*/
|
|
67
|
+
ssl?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* SSL certificate to use for serving HTTPS.
|
|
70
|
+
*/
|
|
71
|
+
sslCert?: string;
|
|
72
|
+
/**
|
|
73
|
+
* SSL key to use for serving HTTPS.
|
|
74
|
+
*/
|
|
75
|
+
sslKey?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface NormalizedDevServerOptions extends DevServerOptions {
|
|
78
|
+
allowedHosts: string[] | boolean;
|
|
79
|
+
host: string;
|
|
80
|
+
liveReload: boolean;
|
|
81
|
+
port: number;
|
|
82
|
+
open: boolean;
|
|
83
|
+
}
|
|
84
|
+
export interface OptimizationOptions {
|
|
85
|
+
fonts?: boolean | {
|
|
86
|
+
inline?: boolean;
|
|
87
|
+
};
|
|
88
|
+
scripts?: boolean;
|
|
89
|
+
styles?: boolean | {
|
|
90
|
+
minify?: boolean;
|
|
91
|
+
inlineCritical?: boolean;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export interface NormalizedOptimizationOptions {
|
|
95
|
+
fonts: {
|
|
96
|
+
inline: boolean;
|
|
97
|
+
};
|
|
98
|
+
scripts: boolean;
|
|
99
|
+
styles: {
|
|
100
|
+
minify: boolean;
|
|
101
|
+
inlineCritical: boolean;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export type OutputHashing = 'none' | 'all' | 'media' | 'bundles';
|
|
105
|
+
export type HashFormat = {
|
|
106
|
+
chunk: string;
|
|
107
|
+
extract: string;
|
|
108
|
+
file: string;
|
|
109
|
+
script: string;
|
|
110
|
+
};
|
|
111
|
+
export interface OutputPath {
|
|
112
|
+
base: string;
|
|
113
|
+
browser: string;
|
|
114
|
+
media: string;
|
|
115
|
+
server: string;
|
|
116
|
+
}
|
|
117
|
+
export type AssetExpandedDefinition = {
|
|
118
|
+
glob: string;
|
|
119
|
+
input: string;
|
|
120
|
+
ignore?: string[];
|
|
121
|
+
output?: string;
|
|
122
|
+
};
|
|
123
|
+
export type AssetElement = AssetExpandedDefinition | string;
|
|
124
|
+
export type NormalizedAssetElement = AssetExpandedDefinition & {
|
|
125
|
+
output: string;
|
|
126
|
+
};
|
|
127
|
+
export type ScriptOrStyleEntry = string | {
|
|
128
|
+
input: string;
|
|
129
|
+
bundleName?: string;
|
|
130
|
+
inject?: boolean;
|
|
131
|
+
};
|
|
132
|
+
export type GlobalEntry = {
|
|
133
|
+
files: string[];
|
|
134
|
+
initial: boolean;
|
|
135
|
+
name: string;
|
|
136
|
+
};
|
|
137
|
+
export type IndexExpandedDefinition = {
|
|
138
|
+
input: string;
|
|
139
|
+
output?: string;
|
|
140
|
+
preloadInitial?: boolean;
|
|
141
|
+
transformer?: IndexHtmlTransform;
|
|
142
|
+
};
|
|
143
|
+
export type IndexElement = IndexExpandedDefinition | string | false;
|
|
144
|
+
export type IndexHtmlTransform = (content: string) => Promise<string>;
|
|
145
|
+
export type NormalizedIndexElement = IndexExpandedDefinition;
|
|
146
|
+
export type NormalizedEntryPoint = Required<Exclude<ScriptOrStyleEntry, string>>;
|
|
147
|
+
export interface SourceMap {
|
|
148
|
+
scripts: boolean;
|
|
149
|
+
styles: boolean;
|
|
150
|
+
hidden: boolean;
|
|
151
|
+
vendor: boolean;
|
|
152
|
+
}
|
|
153
|
+
type PatchedBudgetType = 'all' | 'allScript' | 'any' | 'anyScript' | 'anyComponentStyle' | 'bundle' | 'initial';
|
|
154
|
+
type PatchedBudgetEntry = Omit<BudgetEntry, 'type'> & {
|
|
155
|
+
type: PatchedBudgetType;
|
|
156
|
+
};
|
|
157
|
+
export interface AngularRspackPluginOptions {
|
|
158
|
+
/**
|
|
159
|
+
* @deprecated This is a no-op and can be safely removed.
|
|
160
|
+
* A list of CommonJS or AMD packages that are allowed to be used without a build time warning. Use `'*'` to allow all.
|
|
161
|
+
*/
|
|
162
|
+
allowedCommonJsDependencies?: string[];
|
|
163
|
+
/**
|
|
164
|
+
*
|
|
165
|
+
*/
|
|
166
|
+
appShell?: boolean;
|
|
167
|
+
aot?: boolean;
|
|
168
|
+
assets?: AssetElement[];
|
|
169
|
+
/**
|
|
170
|
+
* Base url for the application being built.
|
|
171
|
+
*/
|
|
172
|
+
baseHref?: string;
|
|
173
|
+
browser?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Budget thresholds to ensure parts of your application stay within boundaries which you set.
|
|
176
|
+
*/
|
|
177
|
+
budgets?: PatchedBudgetEntry[];
|
|
178
|
+
commonChunk?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Define the `crossorigin` attribute setting of elements that provide CORS
|
|
181
|
+
* support.
|
|
182
|
+
* @default 'none'
|
|
183
|
+
*/
|
|
184
|
+
crossOrigin?: 'none' | 'anonymous' | 'use-credentials';
|
|
185
|
+
/**
|
|
186
|
+
* Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries.
|
|
187
|
+
* The value will be used directly.
|
|
188
|
+
* String values must be put in quotes.
|
|
189
|
+
*/
|
|
190
|
+
define?: Record<string, string>;
|
|
191
|
+
/**
|
|
192
|
+
* Delete the output path before building.
|
|
193
|
+
*/
|
|
194
|
+
deleteOutputPath?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Customize the base path for the URLs of resources in 'index.html' and
|
|
197
|
+
* component stylesheets. This option is only necessary for specific
|
|
198
|
+
* deployment scenarios, such as with Angular Elements or when utilizing
|
|
199
|
+
* different CDN locations.
|
|
200
|
+
*/
|
|
201
|
+
deployUrl?: string;
|
|
202
|
+
devServer?: DevServerOptions;
|
|
203
|
+
/**
|
|
204
|
+
* Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime.
|
|
205
|
+
*/
|
|
206
|
+
externalDependencies?: string[];
|
|
207
|
+
extractLicenses?: boolean;
|
|
208
|
+
fileReplacements?: FileReplacement[];
|
|
209
|
+
index?: IndexElement;
|
|
210
|
+
inlineStyleLanguage?: InlineStyleLanguage;
|
|
211
|
+
/**
|
|
212
|
+
* Project metadata for i18n.
|
|
213
|
+
*/
|
|
214
|
+
i18nMetadata?: I18nProjectMetadata;
|
|
215
|
+
/**
|
|
216
|
+
* How to handle missing translations for i18n.
|
|
217
|
+
*/
|
|
218
|
+
i18nMissingTranslation?: 'warning' | 'error' | 'ignore';
|
|
219
|
+
/**
|
|
220
|
+
* How to handle duplicate translations for i18n.
|
|
221
|
+
*/
|
|
222
|
+
i18nDuplicateTranslation?: 'warning' | 'error' | 'ignore';
|
|
223
|
+
/**
|
|
224
|
+
* Translate the bundles in one or more locales.
|
|
225
|
+
*/
|
|
226
|
+
localize?: boolean | string[];
|
|
227
|
+
namedChunks?: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Path to ngsw-config.json.
|
|
230
|
+
*/
|
|
231
|
+
ngswConfigPath?: string;
|
|
232
|
+
optimization?: boolean | OptimizationOptions;
|
|
233
|
+
outputHashing?: OutputHashing;
|
|
234
|
+
outputPath?: string | (Required<Pick<OutputPath, 'base'>> & Partial<OutputPath>);
|
|
235
|
+
/**
|
|
236
|
+
* Enable and define the file watching poll time period in milliseconds.
|
|
237
|
+
*/
|
|
238
|
+
poll?: number;
|
|
239
|
+
polyfills?: string[];
|
|
240
|
+
/**
|
|
241
|
+
* Prerender (SSG) pages of your application during build time.
|
|
242
|
+
*/
|
|
243
|
+
prerender?: boolean | {
|
|
244
|
+
/**
|
|
245
|
+
* The routes to render.
|
|
246
|
+
*/
|
|
247
|
+
routes?: string[];
|
|
248
|
+
/**
|
|
249
|
+
* The path to a file that contains a list of all routes to prerender, separated by newlines. This option is useful if you want to prerender routes with parameterized URLs.
|
|
250
|
+
*/
|
|
251
|
+
routesFile?: string;
|
|
252
|
+
/**
|
|
253
|
+
* Whether the builder should process the Angular Router configuration to find all unparameterized routes and prerender them.
|
|
254
|
+
*/
|
|
255
|
+
discoverRoutes?: boolean;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set.
|
|
259
|
+
*/
|
|
260
|
+
preserveSymlinks?: boolean;
|
|
261
|
+
/**
|
|
262
|
+
* Log progress to the console while building.
|
|
263
|
+
*/
|
|
264
|
+
progress?: boolean;
|
|
265
|
+
root?: string;
|
|
266
|
+
scripts?: ScriptOrStyleEntry[];
|
|
267
|
+
server?: string;
|
|
268
|
+
/**
|
|
269
|
+
* Generates a service worker config for production builds.
|
|
270
|
+
*/
|
|
271
|
+
serviceWorker?: boolean;
|
|
272
|
+
skipTypeChecking?: boolean;
|
|
273
|
+
sourceMap?: boolean | Partial<SourceMap>;
|
|
274
|
+
ssr?: boolean | {
|
|
275
|
+
entry: string;
|
|
276
|
+
experimentalPlatform?: 'node' | 'neutral';
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.
|
|
280
|
+
*/
|
|
281
|
+
statsJson?: boolean;
|
|
282
|
+
stylePreprocessorOptions?: StylePreprocessorOptions;
|
|
283
|
+
styles?: ScriptOrStyleEntry[];
|
|
284
|
+
/**
|
|
285
|
+
* Enables the use of subresource integrity validation.
|
|
286
|
+
* @default false
|
|
287
|
+
*/
|
|
288
|
+
subresourceIntegrity?: boolean;
|
|
289
|
+
tsConfig?: string;
|
|
290
|
+
useTsProjectReferences?: boolean;
|
|
291
|
+
vendorChunk?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Adds more details to output logging.
|
|
294
|
+
*/
|
|
295
|
+
verbose?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Run build when files change.
|
|
298
|
+
*/
|
|
299
|
+
watch?: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* @deprecated This is a no-op and can be safely removed.
|
|
302
|
+
* The tsconfig file for web workers.
|
|
303
|
+
*/
|
|
304
|
+
webWorkerTsConfig?: string;
|
|
305
|
+
}
|
|
306
|
+
export interface NormalizedAngularRspackPluginOptions extends Omit<AngularRspackPluginOptions, 'index' | 'scripts' | 'styles'> {
|
|
307
|
+
appShell: boolean;
|
|
308
|
+
advancedOptimizations: boolean;
|
|
309
|
+
aot: boolean;
|
|
310
|
+
assets: NormalizedAssetElement[];
|
|
311
|
+
browser: string;
|
|
312
|
+
budgets: BudgetEntry[];
|
|
313
|
+
commonChunk: boolean;
|
|
314
|
+
crossOrigin: 'none' | 'anonymous' | 'use-credentials';
|
|
315
|
+
deleteOutputPath: boolean;
|
|
316
|
+
devServer: NormalizedDevServerOptions;
|
|
317
|
+
externalDependencies: string[];
|
|
318
|
+
extractLicenses: boolean;
|
|
319
|
+
fileReplacements: FileReplacement[];
|
|
320
|
+
globalScripts: GlobalEntry[];
|
|
321
|
+
globalStyles: GlobalEntry[];
|
|
322
|
+
hasServer: boolean;
|
|
323
|
+
index: NormalizedIndexElement;
|
|
324
|
+
inlineStyleLanguage: InlineStyleLanguage;
|
|
325
|
+
namedChunks: boolean;
|
|
326
|
+
optimization: NormalizedOptimizationOptions;
|
|
327
|
+
outputHashing: OutputHashing;
|
|
328
|
+
outputPath: OutputPath;
|
|
329
|
+
polyfills: string[];
|
|
330
|
+
projectName: string | undefined;
|
|
331
|
+
progress: boolean;
|
|
332
|
+
root: string;
|
|
333
|
+
scripts: ScriptOrStyleEntry[];
|
|
334
|
+
styles: ScriptOrStyleEntry[];
|
|
335
|
+
sourceMap: SourceMap;
|
|
336
|
+
subresourceIntegrity: boolean;
|
|
337
|
+
supportedBrowsers: string[];
|
|
338
|
+
tsConfig: string;
|
|
339
|
+
vendorChunk: boolean;
|
|
340
|
+
watch: boolean;
|
|
341
|
+
zoneless: boolean;
|
|
342
|
+
}
|
|
343
|
+
export {};
|
|
344
|
+
//# sourceMappingURL=angular-rspack-plugin-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-rspack-plugin-options.d.ts","sourceRoot":"","sources":["../../../src/lib/models/angular-rspack-plugin-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAClC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS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IACzB,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,sBAAsB,CAAC;IAC9B,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,6BAA6B,CAAC;IAC5C,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,SAAS,EAAE,SAAS,CAAC;IACrB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Compilation } from '@rspack/core';
|
|
2
|
+
import type { JavaScriptTransformer, SourceFileCache } from '@nx/angular-rspack-compiler';
|
|
3
|
+
import { I18nOptions } from './i18n';
|
|
4
|
+
export declare const NG_RSPACK_SYMBOL_NAME = "NG_RSPACK_BUILD";
|
|
5
|
+
export type NG_RSPACK_COMPILATION_STATE = {
|
|
6
|
+
javascriptTransformer: JavaScriptTransformer;
|
|
7
|
+
typescriptFileCache: SourceFileCache['typeScriptFileCache'];
|
|
8
|
+
i18n?: I18nOptions;
|
|
9
|
+
};
|
|
10
|
+
export type NgRspackCompilation = Compilation & {
|
|
11
|
+
[NG_RSPACK_SYMBOL_NAME]: () => NG_RSPACK_COMPILATION_STATE;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=augmented-compilation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"augmented-compilation.d.ts","sourceRoot":"","sources":["../../../src/lib/models/augmented-compilation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EAChB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAEvD,MAAM,MAAM,2BAA2B,GAAG;IACxC,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,mBAAmB,EAAE,eAAe,CAAC,qBAAqB,CAAC,CAAC;IAC5D,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG;IAC9C,CAAC,qBAAqB,CAAC,EAAE,MAAM,2BAA2B,CAAC;CAC5D,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { I18nOptions as _I18nOptions } from '@angular/build/private';
|
|
2
|
+
export type I18nOptions = _I18nOptions;
|
|
3
|
+
export interface SourceLocale {
|
|
4
|
+
code?: string;
|
|
5
|
+
baseHref?: string;
|
|
6
|
+
subPath?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface LocaleMetadata {
|
|
9
|
+
translation?: string | string[];
|
|
10
|
+
baseHref?: string;
|
|
11
|
+
subPath?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface I18nProjectMetadata {
|
|
14
|
+
sourceLocale?: string | SourceLocale;
|
|
15
|
+
locales?: Record<string, string | string[] | LocaleMetadata>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* How to handle potential diagnostics.
|
|
19
|
+
*/
|
|
20
|
+
export type DiagnosticHandlingStrategy = 'error' | 'warning' | 'ignore';
|
|
21
|
+
export declare class Diagnostics {
|
|
22
|
+
readonly messages: {
|
|
23
|
+
type: 'warning' | 'error';
|
|
24
|
+
message: string;
|
|
25
|
+
}[];
|
|
26
|
+
get hasErrors(): boolean;
|
|
27
|
+
add(type: DiagnosticHandlingStrategy, message: string): void;
|
|
28
|
+
warn(message: string): void;
|
|
29
|
+
error(message: string): void;
|
|
30
|
+
merge(other: Diagnostics): void;
|
|
31
|
+
formatDiagnostics(message: string): string;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/lib/models/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC;AAEvC,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,cAAc,CAAC,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAExE,qBAAa,WAAW;IACtB,QAAQ,CAAC,QAAQ,EAAE;QAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAM;IACzE,IAAI,SAAS,YAEZ;IACD,GAAG,CAAC,IAAI,EAAE,0BAA0B,EAAE,OAAO,EAAE,MAAM;IAKrD,IAAI,CAAC,OAAO,EAAE,MAAM;IAGpB,KAAK,CAAC,OAAO,EAAE,MAAM;IAGrB,KAAK,CAAC,KAAK,EAAE,WAAW;IAGxB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;CAe3C"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Diagnostics = void 0;
|
|
4
|
+
class Diagnostics {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.messages = [];
|
|
7
|
+
}
|
|
8
|
+
get hasErrors() {
|
|
9
|
+
return this.messages.some((m) => m.type === 'error');
|
|
10
|
+
}
|
|
11
|
+
add(type, message) {
|
|
12
|
+
if (type !== 'ignore') {
|
|
13
|
+
this.messages.push({ type, message });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
warn(message) {
|
|
17
|
+
this.messages.push({ type: 'warning', message });
|
|
18
|
+
}
|
|
19
|
+
error(message) {
|
|
20
|
+
this.messages.push({ type: 'error', message });
|
|
21
|
+
}
|
|
22
|
+
merge(other) {
|
|
23
|
+
this.messages.push(...other.messages);
|
|
24
|
+
}
|
|
25
|
+
formatDiagnostics(message) {
|
|
26
|
+
const errors = this.messages
|
|
27
|
+
.filter((d) => d.type === 'error')
|
|
28
|
+
.map((d) => ' - ' + d.message);
|
|
29
|
+
const warnings = this.messages
|
|
30
|
+
.filter((d) => d.type === 'warning')
|
|
31
|
+
.map((d) => ' - ' + d.message);
|
|
32
|
+
if (errors.length) {
|
|
33
|
+
message += '\nERRORS:\n' + errors.join('\n');
|
|
34
|
+
}
|
|
35
|
+
if (warnings.length) {
|
|
36
|
+
message += '\nWARNINGS:\n' + warnings.join('\n');
|
|
37
|
+
}
|
|
38
|
+
return message;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.Diagnostics = Diagnostics;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./angular-rspack-plugin-options"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./augmented-compilation"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./i18n"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./normalize-options"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FileReplacement } from '@nx/angular-rspack-compiler';
|
|
2
|
+
import type { AngularRspackPluginOptions, NormalizedAngularRspackPluginOptions, NormalizedOptimizationOptions } from './angular-rspack-plugin-options';
|
|
3
|
+
export declare const INDEX_HTML_CSR = "index.csr.html";
|
|
4
|
+
/**
|
|
5
|
+
* Resolves file replacement paths to absolute paths based on the provided root directory.
|
|
6
|
+
*
|
|
7
|
+
* @param fileReplacements - Array of file replacements with relative paths.
|
|
8
|
+
* @param root - The root directory to resolve the paths against.
|
|
9
|
+
* @returns Array of file replacements resolved against the root.
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveFileReplacements(fileReplacements: FileReplacement[], root: string): FileReplacement[];
|
|
12
|
+
export declare function getHasServer(root: string, server: string | undefined, ssr: AngularRspackPluginOptions['ssr']): boolean;
|
|
13
|
+
export declare function validateSsr(ssr: AngularRspackPluginOptions['ssr']): void;
|
|
14
|
+
export declare function normalizeOptions(options: AngularRspackPluginOptions): Promise<NormalizedAngularRspackPluginOptions>;
|
|
15
|
+
export declare function normalizeOptimization(optimization: AngularRspackPluginOptions['optimization']): NormalizedOptimizationOptions;
|
|
16
|
+
//# sourceMappingURL=normalize-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../src/lib/models/normalize-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAmBnE,OAAO,KAAK,EACV,0BAA0B,EAI1B,oCAAoC,EAIpC,6BAA6B,EAI9B,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,gBAAgB,EAAE,eAAe,EAAE,EACnC,IAAI,EAAE,MAAM,GACX,eAAe,EAAE,CAKnB;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,GAAG,EAAE,0BAA0B,CAAC,KAAK,CAAC,GACrC,OAAO,CAQT;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,0BAA0B,CAAC,KAAK,CAAC,QAmBjE;AAED,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,oCAAoC,CAAC,CA8L/C;AAED,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,0BAA0B,CAAC,cAAc,CAAC,GACvD,6BAA6B,CAiD/B"}
|