@angular/build 18.1.0-next.0 → 18.1.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +23 -14
- package/src/builders/application/build-action.d.ts +1 -1
- package/src/builders/application/build-action.js +2 -3
- package/src/builders/application/execute-build.d.ts +1 -1
- package/src/builders/application/execute-build.js +2 -3
- package/src/builders/application/execute-post-bundle.d.ts +1 -1
- package/src/builders/application/execute-post-bundle.js +2 -3
- package/src/builders/application/i18n.d.ts +1 -1
- package/src/builders/application/i18n.js +3 -4
- package/src/builders/application/index.d.ts +1 -1
- package/src/builders/application/index.js +3 -4
- package/src/builders/application/options.d.ts +3 -3
- package/src/builders/application/options.js +2 -3
- package/src/builders/application/setup-bundling.d.ts +1 -1
- package/src/builders/application/setup-bundling.js +3 -9
- package/src/builders/dev-server/builder.d.ts +1 -2
- package/src/builders/dev-server/builder.js +2 -3
- package/src/builders/dev-server/index.d.ts +1 -1
- package/src/builders/dev-server/index.js +1 -1
- package/src/builders/dev-server/internal.d.ts +1 -1
- package/src/builders/dev-server/internal.js +1 -1
- package/src/builders/dev-server/options.d.ts +5 -1
- package/src/builders/dev-server/options.js +27 -3
- package/src/builders/dev-server/output.d.ts +1 -1
- package/src/builders/dev-server/output.js +1 -1
- package/src/builders/dev-server/schema.d.ts +10 -0
- package/src/builders/dev-server/schema.json +11 -0
- package/src/builders/dev-server/vite-server.d.ts +1 -1
- package/src/builders/dev-server/vite-server.js +43 -35
- package/src/builders/extract-i18n/application-extraction.d.ts +1 -1
- package/src/builders/extract-i18n/application-extraction.js +2 -3
- package/src/builders/extract-i18n/builder.d.ts +1 -1
- package/src/builders/extract-i18n/builder.js +2 -3
- package/src/builders/extract-i18n/index.d.ts +1 -1
- package/src/builders/extract-i18n/index.js +1 -1
- package/src/builders/extract-i18n/options.d.ts +1 -1
- package/src/builders/extract-i18n/options.js +2 -3
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/private.d.ts +1 -1
- package/src/private.js +1 -1
- package/src/tools/babel/plugins/adjust-static-class-members.d.ts +1 -2
- package/src/tools/babel/plugins/adjust-static-class-members.js +3 -4
- package/src/tools/babel/plugins/adjust-typescript-enums.d.ts +1 -2
- package/src/tools/babel/plugins/adjust-typescript-enums.js +3 -4
- package/src/tools/babel/plugins/elide-angular-metadata.d.ts +1 -2
- package/src/tools/babel/plugins/elide-angular-metadata.js +3 -4
- package/src/tools/babel/plugins/index.d.ts +1 -1
- package/src/tools/babel/plugins/index.js +1 -1
- package/src/tools/babel/plugins/pure-toplevel-functions.d.ts +1 -2
- package/src/tools/babel/plugins/pure-toplevel-functions.js +2 -2
- package/src/tools/babel/typings.d.ts +1 -1
- package/src/tools/esbuild/angular/angular-host.d.ts +1 -1
- package/src/tools/esbuild/angular/angular-host.js +3 -4
- package/src/tools/esbuild/angular/compilation/angular-compilation.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/angular-compilation.js +1 -1
- package/src/tools/esbuild/angular/compilation/aot-compilation.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/aot-compilation.js +43 -8
- package/src/tools/esbuild/angular/compilation/factory.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/factory.js +2 -3
- package/src/tools/esbuild/angular/compilation/index.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/index.js +1 -1
- package/src/tools/esbuild/angular/compilation/jit-bootstrap-transformer.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/jit-bootstrap-transformer.js +3 -4
- package/src/tools/esbuild/angular/compilation/jit-compilation.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/jit-compilation.js +1 -1
- package/src/tools/esbuild/angular/compilation/noop-compilation.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/noop-compilation.js +1 -1
- package/src/tools/esbuild/angular/compilation/parallel-compilation.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation/parallel-compilation.js +1 -1
- package/src/tools/esbuild/angular/compilation/parallel-worker.d.ts +3 -2
- package/src/tools/esbuild/angular/compilation/parallel-worker.js +11 -8
- package/src/tools/esbuild/angular/compilation-state.d.ts +1 -1
- package/src/tools/esbuild/angular/compilation-state.js +3 -3
- package/src/tools/esbuild/angular/compiler-plugin.d.ts +2 -2
- package/src/tools/esbuild/angular/compiler-plugin.js +27 -13
- package/src/tools/esbuild/angular/component-stylesheets.d.ts +1 -1
- package/src/tools/esbuild/angular/component-stylesheets.js +1 -1
- package/src/tools/esbuild/angular/diagnostics.d.ts +1 -1
- package/src/tools/esbuild/angular/diagnostics.js +2 -3
- package/src/tools/esbuild/angular/file-reference-tracker.d.ts +1 -1
- package/src/tools/esbuild/angular/file-reference-tracker.js +1 -1
- package/src/tools/esbuild/angular/jit-plugin-callbacks.d.ts +1 -1
- package/src/tools/esbuild/angular/jit-plugin-callbacks.js +2 -3
- package/src/tools/esbuild/angular/jit-resource-transformer.d.ts +1 -1
- package/src/tools/esbuild/angular/jit-resource-transformer.js +2 -3
- package/src/tools/esbuild/angular/source-file-cache.d.ts +1 -1
- package/src/tools/esbuild/angular/source-file-cache.js +1 -1
- package/src/tools/esbuild/angular/uri.d.ts +1 -1
- package/src/tools/esbuild/angular/uri.js +5 -5
- package/src/tools/esbuild/angular/web-worker-transformer.d.ts +1 -1
- package/src/tools/esbuild/angular/web-worker-transformer.js +2 -3
- package/src/tools/esbuild/application-code-bundle.d.ts +1 -1
- package/src/tools/esbuild/application-code-bundle.js +21 -7
- package/src/tools/esbuild/budget-stats.d.ts +1 -1
- package/src/tools/esbuild/budget-stats.js +2 -3
- package/src/tools/esbuild/bundler-context.d.ts +1 -1
- package/src/tools/esbuild/bundler-context.js +1 -1
- package/src/tools/esbuild/bundler-execution-result.d.ts +1 -1
- package/src/tools/esbuild/bundler-execution-result.js +1 -1
- package/src/tools/esbuild/cache.d.ts +1 -1
- package/src/tools/esbuild/cache.js +1 -1
- package/src/tools/esbuild/commonjs-checker.d.ts +1 -1
- package/src/tools/esbuild/commonjs-checker.js +2 -3
- package/src/tools/esbuild/compiler-plugin-options.d.ts +1 -1
- package/src/tools/esbuild/compiler-plugin-options.js +3 -4
- package/src/tools/esbuild/external-packages-plugin.d.ts +1 -1
- package/src/tools/esbuild/external-packages-plugin.js +2 -3
- package/src/tools/esbuild/global-scripts.d.ts +1 -1
- package/src/tools/esbuild/global-scripts.js +2 -3
- package/src/tools/esbuild/global-styles.d.ts +1 -1
- package/src/tools/esbuild/global-styles.js +3 -4
- package/src/tools/esbuild/i18n-inliner-worker.d.ts +2 -2
- package/src/tools/esbuild/i18n-inliner-worker.js +2 -2
- package/src/tools/esbuild/i18n-inliner.d.ts +1 -1
- package/src/tools/esbuild/i18n-inliner.js +1 -1
- package/src/tools/esbuild/i18n-locale-plugin.d.ts +1 -1
- package/src/tools/esbuild/i18n-locale-plugin.js +3 -3
- package/src/tools/esbuild/index-html-generator.d.ts +1 -1
- package/src/tools/esbuild/index-html-generator.js +9 -12
- package/src/tools/esbuild/javascript-transformer-worker.d.ts +1 -1
- package/src/tools/esbuild/javascript-transformer-worker.js +2 -2
- package/src/tools/esbuild/javascript-transformer.d.ts +2 -2
- package/src/tools/esbuild/javascript-transformer.js +1 -1
- package/src/tools/esbuild/license-extractor.d.ts +1 -1
- package/src/tools/esbuild/license-extractor.js +2 -3
- package/src/tools/esbuild/lmdb-cache-store.d.ts +1 -1
- package/src/tools/esbuild/lmdb-cache-store.js +1 -1
- package/src/tools/esbuild/load-result-cache.d.ts +1 -1
- package/src/tools/esbuild/load-result-cache.js +3 -3
- package/src/tools/esbuild/profiling.d.ts +1 -1
- package/src/tools/esbuild/profiling.js +5 -6
- package/src/tools/esbuild/rxjs-esm-resolution-plugin.d.ts +1 -1
- package/src/tools/esbuild/rxjs-esm-resolution-plugin.js +2 -3
- package/src/tools/esbuild/sourcemap-ignorelist-plugin.d.ts +1 -1
- package/src/tools/esbuild/sourcemap-ignorelist-plugin.js +2 -3
- package/src/tools/esbuild/stylesheets/bundle-options.d.ts +1 -1
- package/src/tools/esbuild/stylesheets/bundle-options.js +2 -3
- package/src/tools/esbuild/stylesheets/css-inline-fonts-plugin.d.ts +1 -1
- package/src/tools/esbuild/stylesheets/css-inline-fonts-plugin.js +2 -3
- package/src/tools/esbuild/stylesheets/css-language.d.ts +1 -1
- package/src/tools/esbuild/stylesheets/css-language.js +1 -1
- package/src/tools/esbuild/stylesheets/css-resource-plugin.d.ts +1 -1
- package/src/tools/esbuild/stylesheets/css-resource-plugin.js +2 -3
- package/src/tools/esbuild/stylesheets/less-language.d.ts +1 -1
- package/src/tools/esbuild/stylesheets/less-language.js +1 -1
- package/src/tools/esbuild/stylesheets/sass-language.d.ts +1 -1
- package/src/tools/esbuild/stylesheets/sass-language.js +30 -4
- package/src/tools/esbuild/stylesheets/stylesheet-plugin-factory.d.ts +9 -2
- package/src/tools/esbuild/stylesheets/stylesheet-plugin-factory.js +46 -41
- package/src/tools/esbuild/utils.d.ts +1 -1
- package/src/tools/esbuild/utils.js +16 -17
- package/src/tools/esbuild/virtual-module-plugin.d.ts +1 -1
- package/src/tools/esbuild/virtual-module-plugin.js +2 -3
- package/src/tools/esbuild/watcher.d.ts +1 -1
- package/src/tools/esbuild/watcher.js +3 -3
- package/src/tools/sass/lexer.d.ts +1 -1
- package/src/tools/sass/lexer.js +2 -3
- package/src/tools/sass/rebasing-importer.d.ts +1 -1
- package/src/tools/sass/rebasing-importer.js +3 -3
- package/src/tools/sass/sass-service.d.ts +1 -1
- package/src/tools/sass/sass-service.js +4 -2
- package/src/tools/sass/worker.d.ts +3 -5
- package/src/tools/sass/worker.js +2 -2
- package/src/tools/vite/angular-memory-plugin.d.ts +1 -1
- package/src/tools/vite/angular-memory-plugin.js +2 -3
- package/src/tools/vite/i18n-locale-plugin.d.ts +1 -1
- package/src/tools/vite/i18n-locale-plugin.js +3 -3
- package/src/utils/bundle-calculator.d.ts +1 -1
- package/src/utils/bundle-calculator.js +5 -5
- package/src/utils/check-port.d.ts +1 -1
- package/src/utils/check-port.js +28 -9
- package/src/utils/color.d.ts +1 -1
- package/src/utils/color.js +1 -1
- package/src/utils/delete-output-dir.d.ts +1 -1
- package/src/utils/delete-output-dir.js +2 -3
- package/src/utils/environment-options.d.ts +1 -1
- package/src/utils/environment-options.js +1 -1
- package/src/utils/error.d.ts +1 -1
- package/src/utils/error.js +2 -3
- package/src/utils/format-bytes.d.ts +1 -1
- package/src/utils/format-bytes.js +2 -3
- package/src/utils/i18n-options.d.ts +1 -1
- package/src/utils/i18n-options.js +3 -4
- package/src/utils/index-file/add-event-dispatch-contract.d.ts +1 -1
- package/src/utils/index-file/add-event-dispatch-contract.js +2 -3
- package/src/utils/index-file/augment-index-html.d.ts +1 -1
- package/src/utils/index-file/augment-index-html.js +22 -10
- package/src/utils/index-file/html-rewriting-stream.d.ts +1 -1
- package/src/utils/index-file/html-rewriting-stream.js +2 -3
- package/src/utils/index-file/index-html-generator.d.ts +1 -1
- package/src/utils/index-file/index-html-generator.js +1 -1
- package/src/utils/index-file/inline-critical-css.d.ts +1 -1
- package/src/utils/index-file/inline-critical-css.js +1 -1
- package/src/utils/index-file/inline-fonts.d.ts +1 -1
- package/src/utils/index-file/inline-fonts.js +1 -1
- package/src/utils/index-file/nonce.d.ts +1 -1
- package/src/utils/index-file/nonce.js +2 -3
- package/src/utils/index-file/valid-self-closing-tags.d.ts +1 -1
- package/src/utils/index-file/valid-self-closing-tags.js +1 -1
- package/src/utils/index.d.ts +1 -1
- package/src/utils/index.js +1 -1
- package/src/utils/load-esm.d.ts +1 -1
- package/src/utils/load-esm.js +2 -3
- package/src/utils/load-proxy-config.d.ts +1 -1
- package/src/utils/load-proxy-config.js +2 -3
- package/src/utils/load-translations.d.ts +1 -1
- package/src/utils/load-translations.js +2 -3
- package/src/utils/normalize-asset-patterns.d.ts +1 -1
- package/src/utils/normalize-asset-patterns.js +3 -3
- package/src/utils/normalize-cache.d.ts +1 -1
- package/src/utils/normalize-cache.js +3 -4
- package/src/utils/normalize-optimization.d.ts +1 -1
- package/src/utils/normalize-optimization.js +2 -3
- package/src/utils/normalize-source-maps.d.ts +1 -1
- package/src/utils/normalize-source-maps.js +2 -3
- package/src/utils/postcss-configuration.d.ts +1 -1
- package/src/utils/postcss-configuration.js +4 -5
- package/src/utils/purge-cache.d.ts +1 -1
- package/src/utils/purge-cache.js +2 -3
- package/src/utils/resolve-assets.d.ts +1 -1
- package/src/utils/resolve-assets.js +2 -3
- package/src/utils/routes-extractor/extractor.d.ts +1 -1
- package/src/utils/routes-extractor/extractor.js +1 -1
- package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.d.ts +1 -1
- package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.js +4 -5
- package/src/utils/server-rendering/esm-in-memory-loader/register-hooks.d.ts +1 -1
- package/src/utils/server-rendering/esm-in-memory-loader/register-hooks.js +1 -1
- package/src/utils/server-rendering/fetch-patch.d.ts +1 -1
- package/src/utils/server-rendering/fetch-patch.js +2 -3
- package/src/utils/server-rendering/load-esm-from-memory.d.ts +1 -1
- package/src/utils/server-rendering/load-esm-from-memory.js +2 -3
- package/src/utils/server-rendering/main-bundle-exports.d.ts +1 -1
- package/src/utils/server-rendering/main-bundle-exports.js +1 -1
- package/src/utils/server-rendering/prerender.d.ts +1 -1
- package/src/utils/server-rendering/prerender.js +2 -3
- package/src/utils/server-rendering/render-page.d.ts +1 -1
- package/src/utils/server-rendering/render-page.js +2 -3
- package/src/utils/server-rendering/render-worker.d.ts +1 -1
- package/src/utils/server-rendering/render-worker.js +1 -1
- package/src/utils/server-rendering/routes-extractor-worker.d.ts +1 -1
- package/src/utils/server-rendering/routes-extractor-worker.js +1 -1
- package/src/utils/service-worker.d.ts +1 -3
- package/src/utils/service-worker.js +4 -5
- package/src/utils/spinner.d.ts +1 -1
- package/src/utils/spinner.js +1 -1
- package/src/utils/stats-table.d.ts +1 -1
- package/src/utils/stats-table.js +3 -4
- package/src/utils/supported-browsers.d.ts +1 -1
- package/src/utils/supported-browsers.js +2 -3
- package/src/utils/tty.d.ts +1 -1
- package/src/utils/tty.js +2 -3
- package/src/utils/url.d.ts +1 -1
- package/src/utils/url.js +2 -3
- package/src/utils/version.d.ts +1 -1
- package/src/utils/version.js +2 -3
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -33,9 +33,12 @@ 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.serveWithVite = serveWithVite;
|
|
37
|
+
exports.setupServer = setupServer;
|
|
37
38
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
38
39
|
const promises_1 = require("node:fs/promises");
|
|
40
|
+
const node_inspector_1 = __importDefault(require("node:inspector"));
|
|
41
|
+
const node_module_1 = require("node:module");
|
|
39
42
|
const node_path_1 = require("node:path");
|
|
40
43
|
const angular_memory_plugin_1 = require("../../tools/vite/angular-memory-plugin");
|
|
41
44
|
const i18n_locale_plugin_1 = require("../../tools/vite/i18n-locale-plugin");
|
|
@@ -161,16 +164,24 @@ async function* serveWithVite(serverOptions, builderName, builderAction, context
|
|
|
161
164
|
}
|
|
162
165
|
}
|
|
163
166
|
// To avoid disconnecting the array objects from the option, these arrays need to be mutated instead of replaced.
|
|
167
|
+
let requiresServerRestart = false;
|
|
164
168
|
if (result.externalMetadata) {
|
|
165
169
|
const { implicitBrowser, implicitServer, explicit } = result.externalMetadata;
|
|
170
|
+
const implicitServerFiltered = implicitServer.filter((m) => removeNodeJsBuiltinModules(m) && removeAbsoluteUrls(m));
|
|
171
|
+
const implicitBrowserFiltered = implicitBrowser.filter(removeAbsoluteUrls);
|
|
172
|
+
if (browserOptions.ssr && serverOptions.prebundle !== false) {
|
|
173
|
+
const previousImplicitServer = new Set(externalMetadata.implicitServer);
|
|
174
|
+
// Restart the server to force SSR dep re-optimization when a dependency has been added.
|
|
175
|
+
// This is a workaround for: https://github.com/vitejs/vite/issues/14896
|
|
176
|
+
requiresServerRestart = implicitServerFiltered.some((dep) => !previousImplicitServer.has(dep));
|
|
177
|
+
}
|
|
166
178
|
// Empty Arrays to avoid growing unlimited with every re-build.
|
|
167
179
|
externalMetadata.explicit.length = 0;
|
|
168
180
|
externalMetadata.implicitServer.length = 0;
|
|
169
181
|
externalMetadata.implicitBrowser.length = 0;
|
|
170
182
|
externalMetadata.explicit.push(...explicit);
|
|
171
|
-
|
|
172
|
-
externalMetadata.
|
|
173
|
-
externalMetadata.implicitBrowser.push(...implicitBrowser.filter((value) => !/^(?:https?:)?\/\//.test(value)));
|
|
183
|
+
externalMetadata.implicitServer.push(...implicitServerFiltered);
|
|
184
|
+
externalMetadata.implicitBrowser.push(...implicitBrowserFiltered);
|
|
174
185
|
// The below needs to be sorted as Vite uses these options are part of the hashing invalidation algorithm.
|
|
175
186
|
// See: https://github.com/vitejs/vite/blob/0873bae0cfe0f0718ad2f5743dd34a17e4ab563d/packages/vite/src/node/optimizer/index.ts#L1203-L1239
|
|
176
187
|
externalMetadata.explicit.sort();
|
|
@@ -182,7 +193,12 @@ async function* serveWithVite(serverOptions, builderName, builderAction, context
|
|
|
182
193
|
server.config.server.fs.allow = [
|
|
183
194
|
...new Set([...server.config.server.fs.allow, ...assetFiles.values()]),
|
|
184
195
|
];
|
|
185
|
-
handleUpdate(normalizePath, generatedFiles, server, serverOptions, context.logger);
|
|
196
|
+
await handleUpdate(normalizePath, generatedFiles, server, serverOptions, context.logger);
|
|
197
|
+
if (requiresServerRestart) {
|
|
198
|
+
// Restart the server to force SSR dep re-optimization when a dependency has been added.
|
|
199
|
+
// This is a workaround for: https://github.com/vitejs/vite/issues/14896
|
|
200
|
+
await server.restart();
|
|
201
|
+
}
|
|
186
202
|
}
|
|
187
203
|
else {
|
|
188
204
|
const projectName = context.target?.project;
|
|
@@ -190,6 +206,11 @@ async function* serveWithVite(serverOptions, builderName, builderAction, context
|
|
|
190
206
|
throw new Error('The builder requires a target.');
|
|
191
207
|
}
|
|
192
208
|
context.logger.info('NOTE: Raw file sizes do not reflect development server per-request transformations.');
|
|
209
|
+
if (browserOptions.ssr && serverOptions.inspect) {
|
|
210
|
+
const { host, port } = serverOptions.inspect;
|
|
211
|
+
node_inspector_1.default.open(port, host, true);
|
|
212
|
+
context.addTeardown(() => node_inspector_1.default.close());
|
|
213
|
+
}
|
|
193
214
|
const { root = '' } = await context.getProjectMetadata(projectName);
|
|
194
215
|
const projectRoot = (0, node_path_1.join)(context.workspaceRoot, root);
|
|
195
216
|
const browsers = (0, internal_1.getSupportedBrowsers)(projectRoot, context.logger);
|
|
@@ -202,16 +223,10 @@ async function* serveWithVite(serverOptions, builderName, builderAction, context
|
|
|
202
223
|
const serverConfiguration = await setupServer(serverOptions, generatedFiles, assetFiles, browserOptions.preserveSymlinks, externalMetadata, !!browserOptions.ssr, prebundleTransformer, target, (0, internal_1.isZonelessApp)(polyfills), browserOptions.loader, extensions?.middleware, transformers?.indexHtml, thirdPartySourcemaps);
|
|
203
224
|
server = await createServer(serverConfiguration);
|
|
204
225
|
await server.listen();
|
|
205
|
-
if (
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
* initiate this process before the first request.
|
|
210
|
-
*
|
|
211
|
-
* NOTE: This will intentionally fail from the unknown module, but currently there is no other way
|
|
212
|
-
* to initiate the SSR dep optimizer.
|
|
213
|
-
*/
|
|
214
|
-
void server.ssrLoadModule('<deps-caller>').catch(() => { });
|
|
226
|
+
if (browserOptions.ssr && serverOptions.prebundle !== false) {
|
|
227
|
+
// Warm up the SSR request and begin optimizing dependencies.
|
|
228
|
+
// Without this, Vite will only start optimizing SSR modules when the first request is made.
|
|
229
|
+
void server.warmupRequest('./main.server.mjs', { ssr: true });
|
|
215
230
|
}
|
|
216
231
|
const urls = server.resolvedUrls;
|
|
217
232
|
if (urls && (urls.local.length || urls.network.length)) {
|
|
@@ -244,7 +259,6 @@ async function* serveWithVite(serverOptions, builderName, builderAction, context
|
|
|
244
259
|
}
|
|
245
260
|
await new Promise((resolve) => (deferred = resolve));
|
|
246
261
|
}
|
|
247
|
-
exports.serveWithVite = serveWithVite;
|
|
248
262
|
function handleUpdate(normalizePath, generatedFiles, server, serverOptions, logger) {
|
|
249
263
|
const updatedFiles = [];
|
|
250
264
|
// Invalidate any updated files
|
|
@@ -338,10 +352,6 @@ async function setupServer(serverOptions, outputFiles, assets, preserveSymlinks,
|
|
|
338
352
|
const { normalizePath } = await (0, load_esm_1.loadEsmModule)('vite');
|
|
339
353
|
// Path will not exist on disk and only used to provide separate path for Vite requests
|
|
340
354
|
const virtualProjectRoot = normalizePath((0, node_path_1.join)(serverOptions.workspaceRoot, `.angular/vite-root`, serverOptions.buildTarget.project));
|
|
341
|
-
const serverExplicitExternal = [
|
|
342
|
-
...(await Promise.resolve().then(() => __importStar(require('node:module')))).builtinModules,
|
|
343
|
-
...externalMetadata.explicit,
|
|
344
|
-
];
|
|
345
355
|
const cacheDir = (0, node_path_1.join)(serverOptions.cacheOptions.path, 'vite');
|
|
346
356
|
const configuration = {
|
|
347
357
|
configFile: false,
|
|
@@ -402,22 +412,12 @@ async function setupServer(serverOptions, outputFiles, assets, preserveSymlinks,
|
|
|
402
412
|
// Note: `true` and `/.*/` have different sematics. When true, the `external` option is ignored.
|
|
403
413
|
noExternal: /.*/,
|
|
404
414
|
// Exclude any Node.js built in module and provided dependencies (currently build defined externals)
|
|
405
|
-
external:
|
|
415
|
+
external: externalMetadata.explicit,
|
|
406
416
|
optimizeDeps: getDepOptimizationConfig({
|
|
407
|
-
/**
|
|
408
|
-
* *********************************************
|
|
409
|
-
* NOTE: Temporary disable 'optimizeDeps' for SSR.
|
|
410
|
-
* *********************************************
|
|
411
|
-
*
|
|
412
|
-
* Currently this causes a number of issues.
|
|
413
|
-
* - Deps are re-optimized everytime the server is started.
|
|
414
|
-
* - Added deps after a rebuild are not optimized.
|
|
415
|
-
* - Breaks RxJs (Unless it is added as external). See: https://github.com/angular/angular-cli/issues/26235
|
|
416
|
-
*/
|
|
417
417
|
// Only enable with caching since it causes prebundle dependencies to be cached
|
|
418
|
-
disabled:
|
|
418
|
+
disabled: serverOptions.prebundle === false,
|
|
419
419
|
// Exclude any explicitly defined dependencies (currently build defined externals and node.js built-ins)
|
|
420
|
-
exclude:
|
|
420
|
+
exclude: externalMetadata.explicit,
|
|
421
421
|
// Include all implict dependencies from the external packages internal option
|
|
422
422
|
include: externalMetadata.implicitServer,
|
|
423
423
|
ssr: true,
|
|
@@ -477,7 +477,6 @@ async function setupServer(serverOptions, outputFiles, assets, preserveSymlinks,
|
|
|
477
477
|
}
|
|
478
478
|
return configuration;
|
|
479
479
|
}
|
|
480
|
-
exports.setupServer = setupServer;
|
|
481
480
|
function getDepOptimizationConfig({ disabled, exclude, include, target, zoneless, prebundleTransformer, ssr, loader, thirdPartySourcemaps, }) {
|
|
482
481
|
const plugins = [
|
|
483
482
|
{
|
|
@@ -512,3 +511,12 @@ function getDepOptimizationConfig({ disabled, exclude, include, target, zoneless
|
|
|
512
511
|
},
|
|
513
512
|
};
|
|
514
513
|
}
|
|
514
|
+
const nodeJsBuiltinModules = new Set(node_module_1.builtinModules);
|
|
515
|
+
/** Remove any Node.js builtin modules to avoid Vite's prebundling from processing them as files. */
|
|
516
|
+
function removeNodeJsBuiltinModules(value) {
|
|
517
|
+
return !nodeJsBuiltinModules.has(value);
|
|
518
|
+
}
|
|
519
|
+
/** Remove any absolute URLs (http://, https://, //) to avoid Vite's prebundling from processing them as files. */
|
|
520
|
+
function removeAbsoluteUrls(value) {
|
|
521
|
+
return !/^(?:https?:)?\/\//.test(value);
|
|
522
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import type { ɵParsedMessage as LocalizeMessage } from '@angular/localize';
|
|
9
9
|
import type { MessageExtractor } from '@angular/localize/tools';
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
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.extractMessages =
|
|
13
|
+
exports.extractMessages = extractMessages;
|
|
14
14
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
15
15
|
const node_path_1 = __importDefault(require("node:path"));
|
|
16
16
|
const application_1 = require("../application");
|
|
@@ -74,7 +74,6 @@ async function extractMessages(options, builderName, context, extractorConstruct
|
|
|
74
74
|
useLegacyIds: false,
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
exports.extractMessages = extractMessages;
|
|
78
77
|
function setupLocalizeExtractor(extractorConstructor, files, context) {
|
|
79
78
|
// Setup a virtual file system instance for the extractor
|
|
80
79
|
// * MessageExtractor itself uses readFile, relative and resolve
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import type { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
9
|
import type { ApplicationBuilderExtensions } from '../application/options';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -33,7 +33,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.execute =
|
|
36
|
+
exports.execute = execute;
|
|
37
37
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
38
38
|
const node_path_1 = __importDefault(require("node:path"));
|
|
39
39
|
const load_esm_1 = require("../../utils/load-esm");
|
|
@@ -108,7 +108,6 @@ async function execute(options, context, extensions) {
|
|
|
108
108
|
}
|
|
109
109
|
return { success: true, outputPath: normalizedOptions.outFile };
|
|
110
110
|
}
|
|
111
|
-
exports.execute = execute;
|
|
112
111
|
async function createSerializer(localizeToolsModule, format, sourceLocale, basePath, useLegacyIds, diagnostics) {
|
|
113
112
|
const { XmbTranslationSerializer, LegacyMessageIdMigrationSerializer, ArbTranslationSerializer, Xliff1TranslationSerializer, Xliff2TranslationSerializer, SimpleJsonTranslationSerializer, } = localizeToolsModule;
|
|
114
113
|
switch (format) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { execute } from './builder';
|
|
9
9
|
import type { Schema as ExtractI18nBuilderOptions } from './schema';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.execute = void 0;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext } from '@angular-devkit/architect';
|
|
9
9
|
import { Schema as ExtractI18nOptions, Format } from './schema';
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
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.normalizeOptions =
|
|
13
|
+
exports.normalizeOptions = normalizeOptions;
|
|
14
14
|
const architect_1 = require("@angular-devkit/architect");
|
|
15
15
|
const node_assert_1 = require("node:assert");
|
|
16
16
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -64,7 +64,6 @@ async function normalizeOptions(context, projectName, options) {
|
|
|
64
64
|
progress: options.progress ?? true,
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
exports.normalizeOptions = normalizeOptions;
|
|
68
67
|
function getDefaultOutFile(format) {
|
|
69
68
|
switch (format) {
|
|
70
69
|
case schema_1.Format.Xmb:
|
package/src/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export { buildApplication, type ApplicationBuilderOptions, type ApplicationBuilderOutput, } from './builders/application';
|
|
9
9
|
export { type BuildOutputFile, BuildOutputFileType } from './tools/esbuild/bundler-context';
|
package/src/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.executeExtractI18nBuilder = exports.executeDevServerBuilder = exports.BuildOutputFileType = exports.buildApplication = void 0;
|
package/src/private.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* @fileoverview
|
package/src/private.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="@angular/compiler-cli/private/babel" />
|
|
9
8
|
import { PluginObj } from '@babel/core';
|
|
10
9
|
/**
|
|
11
10
|
* Provides one or more keywords that if found within the content of a source file indicate
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.getKeywords =
|
|
13
|
+
exports.getKeywords = getKeywords;
|
|
14
|
+
exports.default = default_1;
|
|
14
15
|
const core_1 = require("@babel/core");
|
|
15
16
|
const helper_annotate_as_pure_1 = __importDefault(require("@babel/helper-annotate-as-pure"));
|
|
16
17
|
const helper_split_export_declaration_1 = __importDefault(require("@babel/helper-split-export-declaration"));
|
|
@@ -57,7 +58,6 @@ const angularStaticsToElide = {
|
|
|
57
58
|
function getKeywords() {
|
|
58
59
|
return ['class'];
|
|
59
60
|
}
|
|
60
|
-
exports.getKeywords = getKeywords;
|
|
61
61
|
/**
|
|
62
62
|
* Determines whether a property and its initializer value can be safely wrapped in a pure
|
|
63
63
|
* annotated IIFE. Values that may cause side effects are not considered safe to wrap.
|
|
@@ -281,7 +281,6 @@ function default_1() {
|
|
|
281
281
|
},
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
|
-
exports.default = default_1;
|
|
285
284
|
/**
|
|
286
285
|
* Static class properties may be downleveled at later stages in the build pipeline
|
|
287
286
|
* which results in additional function calls outside the class body. These calls
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="@angular/compiler-cli/private/babel" />
|
|
9
8
|
import { PluginObj } from '@babel/core';
|
|
10
9
|
/**
|
|
11
10
|
* Provides one or more keywords that if found within the content of a source file indicate
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.getKeywords =
|
|
13
|
+
exports.getKeywords = getKeywords;
|
|
14
|
+
exports.default = default_1;
|
|
14
15
|
const core_1 = require("@babel/core");
|
|
15
16
|
const helper_annotate_as_pure_1 = __importDefault(require("@babel/helper-annotate-as-pure"));
|
|
16
17
|
/**
|
|
@@ -22,7 +23,6 @@ const helper_annotate_as_pure_1 = __importDefault(require("@babel/helper-annotat
|
|
|
22
23
|
function getKeywords() {
|
|
23
24
|
return ['var'];
|
|
24
25
|
}
|
|
25
|
-
exports.getKeywords = getKeywords;
|
|
26
26
|
/**
|
|
27
27
|
* A babel plugin factory function for adjusting TypeScript emitted enums.
|
|
28
28
|
*
|
|
@@ -110,4 +110,3 @@ function default_1() {
|
|
|
110
110
|
},
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
exports.default = default_1;
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="@angular/compiler-cli/private/babel" />
|
|
9
8
|
import type { PluginObj } from '@babel/core';
|
|
10
9
|
/**
|
|
11
10
|
* Provides one or more keywords that if found within the content of a source file indicate
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.getKeywords =
|
|
10
|
+
exports.getKeywords = getKeywords;
|
|
11
|
+
exports.default = default_1;
|
|
11
12
|
/**
|
|
12
13
|
* The name of the Angular class metadata function created by the Angular compiler.
|
|
13
14
|
*/
|
|
@@ -29,7 +30,6 @@ const SET_CLASS_DEBUG_INFO_NAME = 'ɵsetClassDebugInfo';
|
|
|
29
30
|
function getKeywords() {
|
|
30
31
|
return Object.keys(angularMetadataFunctions);
|
|
31
32
|
}
|
|
32
|
-
exports.getKeywords = getKeywords;
|
|
33
33
|
/**
|
|
34
34
|
* An object map of function names and related value checks for discovery of Angular generated
|
|
35
35
|
* metadata calls.
|
|
@@ -77,7 +77,6 @@ function default_1() {
|
|
|
77
77
|
},
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
exports.default = default_1;
|
|
81
80
|
/** Determines if a function call is a call to `setClassMetadata`. */
|
|
82
81
|
function isSetClassMetadataCall(callArguments) {
|
|
83
82
|
// `setClassMetadata` calls have to meet the following criteria:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export { default as adjustStaticMembers } from './adjust-static-class-members';
|
|
9
9
|
export { default as adjustTypeScriptEnums } from './adjust-typescript-enums';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="@angular/compiler-cli/private/babel" />
|
|
9
8
|
import type { PluginObj } from '@babel/core';
|
|
10
9
|
/**
|
|
11
10
|
* A babel plugin factory function for adding the PURE annotation to top-level new and call expressions.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -33,6 +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.default = default_1;
|
|
36
37
|
const helper_annotate_as_pure_1 = __importDefault(require("@babel/helper-annotate-as-pure"));
|
|
37
38
|
const tslib = __importStar(require("tslib"));
|
|
38
39
|
/**
|
|
@@ -87,4 +88,3 @@ function default_1() {
|
|
|
87
88
|
},
|
|
88
89
|
};
|
|
89
90
|
}
|
|
90
|
-
exports.default = default_1;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
declare module '@babel/helper-annotate-as-pure' {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import type ng from '@angular/compiler-cli';
|
|
9
9
|
import type ts from 'typescript';
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.
|
|
13
|
+
exports.ensureSourceFileVersions = ensureSourceFileVersions;
|
|
14
|
+
exports.createAngularCompilerHost = createAngularCompilerHost;
|
|
14
15
|
const node_crypto_1 = require("node:crypto");
|
|
15
16
|
const node_path_1 = __importDefault(require("node:path"));
|
|
16
17
|
/**
|
|
@@ -32,7 +33,6 @@ function ensureSourceFileVersions(program) {
|
|
|
32
33
|
return files;
|
|
33
34
|
};
|
|
34
35
|
}
|
|
35
|
-
exports.ensureSourceFileVersions = ensureSourceFileVersions;
|
|
36
36
|
function augmentHostWithCaching(host, cache) {
|
|
37
37
|
const baseGetSourceFile = host.getSourceFile;
|
|
38
38
|
host.getSourceFile = function (fileName, languageVersion, onError, shouldCreateNewSourceFile, ...parameters) {
|
|
@@ -131,4 +131,3 @@ function createAngularCompilerHost(typescript, compilerOptions, hostOptions) {
|
|
|
131
131
|
}
|
|
132
132
|
return host;
|
|
133
133
|
}
|
|
134
|
-
exports.createAngularCompilerHost = createAngularCompilerHost;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import type ng from '@angular/compiler-cli';
|
|
9
9
|
import type { PartialMessage } from 'esbuild';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import type ng from '@angular/compiler-cli';
|
|
9
9
|
import ts from 'typescript';
|