source: trip-planner-front/node_modules/@angular/compiler/src/aot/compiler.js@ 59329aa

Last change on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 140.7 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8(function (factory) {
9 if (typeof module === "object" && typeof module.exports === "object") {
10 var v = factory(require, exports);
11 if (v !== undefined) module.exports = v;
12 }
13 else if (typeof define === "function" && define.amd) {
14 define("@angular/compiler/src/aot/compiler", ["require", "exports", "tslib", "@angular/compiler/src/compile_metadata", "@angular/compiler/src/constant_pool", "@angular/compiler/src/core", "@angular/compiler/src/i18n/message_bundle", "@angular/compiler/src/identifiers", "@angular/compiler/src/ml_parser/html_parser", "@angular/compiler/src/ml_parser/interpolation_config", "@angular/compiler/src/output/output_ast", "@angular/compiler/src/parse_util", "@angular/compiler/src/util", "@angular/compiler/src/aot/generated_file", "@angular/compiler/src/aot/lazy_routes", "@angular/compiler/src/aot/static_symbol", "@angular/compiler/src/aot/summary_serializer", "@angular/compiler/src/aot/util"], factory);
15 }
16})(function (require, exports) {
17 "use strict";
18 Object.defineProperty(exports, "__esModule", { value: true });
19 exports.mergeAnalyzedFiles = exports.analyzeFileForInjectables = exports.analyzeFile = exports.analyzeAndValidateNgModules = exports.analyzeNgModules = exports.AotCompiler = void 0;
20 var tslib_1 = require("tslib");
21 var compile_metadata_1 = require("@angular/compiler/src/compile_metadata");
22 var constant_pool_1 = require("@angular/compiler/src/constant_pool");
23 var core_1 = require("@angular/compiler/src/core");
24 var message_bundle_1 = require("@angular/compiler/src/i18n/message_bundle");
25 var identifiers_1 = require("@angular/compiler/src/identifiers");
26 var html_parser_1 = require("@angular/compiler/src/ml_parser/html_parser");
27 var interpolation_config_1 = require("@angular/compiler/src/ml_parser/interpolation_config");
28 var o = require("@angular/compiler/src/output/output_ast");
29 var parse_util_1 = require("@angular/compiler/src/parse_util");
30 var util_1 = require("@angular/compiler/src/util");
31 var generated_file_1 = require("@angular/compiler/src/aot/generated_file");
32 var lazy_routes_1 = require("@angular/compiler/src/aot/lazy_routes");
33 var static_symbol_1 = require("@angular/compiler/src/aot/static_symbol");
34 var summary_serializer_1 = require("@angular/compiler/src/aot/summary_serializer");
35 var util_2 = require("@angular/compiler/src/aot/util");
36 var AotCompiler = /** @class */ (function () {
37 function AotCompiler(_config, _options, _host, reflector, _metadataResolver, _templateParser, _styleCompiler, _viewCompiler, _typeCheckCompiler, _ngModuleCompiler, _injectableCompiler, _outputEmitter, _summaryResolver, _symbolResolver) {
38 this._config = _config;
39 this._options = _options;
40 this._host = _host;
41 this.reflector = reflector;
42 this._metadataResolver = _metadataResolver;
43 this._templateParser = _templateParser;
44 this._styleCompiler = _styleCompiler;
45 this._viewCompiler = _viewCompiler;
46 this._typeCheckCompiler = _typeCheckCompiler;
47 this._ngModuleCompiler = _ngModuleCompiler;
48 this._injectableCompiler = _injectableCompiler;
49 this._outputEmitter = _outputEmitter;
50 this._summaryResolver = _summaryResolver;
51 this._symbolResolver = _symbolResolver;
52 this._templateAstCache = new Map();
53 this._analyzedFiles = new Map();
54 this._analyzedFilesForInjectables = new Map();
55 }
56 AotCompiler.prototype.clearCache = function () {
57 this._metadataResolver.clearCache();
58 };
59 AotCompiler.prototype.analyzeModulesSync = function (rootFiles) {
60 var _this = this;
61 var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);
62 analyzeResult.ngModules.forEach(function (ngModule) { return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true); });
63 return analyzeResult;
64 };
65 AotCompiler.prototype.analyzeModulesAsync = function (rootFiles) {
66 var _this = this;
67 var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);
68 return Promise
69 .all(analyzeResult.ngModules.map(function (ngModule) { return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false); }))
70 .then(function () { return analyzeResult; });
71 };
72 AotCompiler.prototype._analyzeFile = function (fileName) {
73 var analyzedFile = this._analyzedFiles.get(fileName);
74 if (!analyzedFile) {
75 analyzedFile =
76 analyzeFile(this._host, this._symbolResolver, this._metadataResolver, fileName);
77 this._analyzedFiles.set(fileName, analyzedFile);
78 }
79 return analyzedFile;
80 };
81 AotCompiler.prototype._analyzeFileForInjectables = function (fileName) {
82 var analyzedFile = this._analyzedFilesForInjectables.get(fileName);
83 if (!analyzedFile) {
84 analyzedFile = analyzeFileForInjectables(this._host, this._symbolResolver, this._metadataResolver, fileName);
85 this._analyzedFilesForInjectables.set(fileName, analyzedFile);
86 }
87 return analyzedFile;
88 };
89 AotCompiler.prototype.findGeneratedFileNames = function (fileName) {
90 var _this = this;
91 var genFileNames = [];
92 var file = this._analyzeFile(fileName);
93 // Make sure we create a .ngfactory if we have a injectable/directive/pipe/NgModule
94 // or a reference to a non source file.
95 // Note: This is overestimating the required .ngfactory files as the real calculation is harder.
96 // Only do this for StubEmitFlags.Basic, as adding a type check block
97 // does not change this file (as we generate type check blocks based on NgModules).
98 if (this._options.allowEmptyCodegenFiles || file.directives.length || file.pipes.length ||
99 file.injectables.length || file.ngModules.length || file.exportsNonSourceFiles) {
100 genFileNames.push(util_2.ngfactoryFilePath(file.fileName, true));
101 if (this._options.enableSummariesForJit) {
102 genFileNames.push(util_2.summaryForJitFileName(file.fileName, true));
103 }
104 }
105 var fileSuffix = util_2.normalizeGenFileSuffix(util_2.splitTypescriptSuffix(file.fileName, true)[1]);
106 file.directives.forEach(function (dirSymbol) {
107 var compMeta = _this._metadataResolver.getNonNormalizedDirectiveMetadata(dirSymbol).metadata;
108 if (!compMeta.isComponent) {
109 return;
110 }
111 // Note: compMeta is a component and therefore template is non null.
112 compMeta.template.styleUrls.forEach(function (styleUrl) {
113 var normalizedUrl = _this._host.resourceNameToFileName(styleUrl, file.fileName);
114 if (!normalizedUrl) {
115 throw parse_util_1.syntaxError("Couldn't resolve resource " + styleUrl + " relative to " + file.fileName);
116 }
117 var needsShim = (compMeta.template.encapsulation ||
118 _this._config.defaultEncapsulation) === core_1.ViewEncapsulation.Emulated;
119 genFileNames.push(_stylesModuleUrl(normalizedUrl, needsShim, fileSuffix));
120 if (_this._options.allowEmptyCodegenFiles) {
121 genFileNames.push(_stylesModuleUrl(normalizedUrl, !needsShim, fileSuffix));
122 }
123 });
124 });
125 return genFileNames;
126 };
127 AotCompiler.prototype.emitBasicStub = function (genFileName, originalFileName) {
128 var outputCtx = this._createOutputContext(genFileName);
129 if (genFileName.endsWith('.ngfactory.ts')) {
130 if (!originalFileName) {
131 throw new Error("Assertion error: require the original file for .ngfactory.ts stubs. File: " + genFileName);
132 }
133 var originalFile = this._analyzeFile(originalFileName);
134 this._createNgFactoryStub(outputCtx, originalFile, 1 /* Basic */);
135 }
136 else if (genFileName.endsWith('.ngsummary.ts')) {
137 if (this._options.enableSummariesForJit) {
138 if (!originalFileName) {
139 throw new Error("Assertion error: require the original file for .ngsummary.ts stubs. File: " + genFileName);
140 }
141 var originalFile = this._analyzeFile(originalFileName);
142 _createEmptyStub(outputCtx);
143 originalFile.ngModules.forEach(function (ngModule) {
144 // create exports that user code can reference
145 summary_serializer_1.createForJitStub(outputCtx, ngModule.type.reference);
146 });
147 }
148 }
149 else if (genFileName.endsWith('.ngstyle.ts')) {
150 _createEmptyStub(outputCtx);
151 }
152 // Note: for the stubs, we don't need a property srcFileUrl,
153 // as later on in emitAllImpls we will create the proper GeneratedFiles with the
154 // correct srcFileUrl.
155 // This is good as e.g. for .ngstyle.ts files we can't derive
156 // the url of components based on the genFileUrl.
157 return this._codegenSourceModule('unknown', outputCtx);
158 };
159 AotCompiler.prototype.emitTypeCheckStub = function (genFileName, originalFileName) {
160 var originalFile = this._analyzeFile(originalFileName);
161 var outputCtx = this._createOutputContext(genFileName);
162 if (genFileName.endsWith('.ngfactory.ts')) {
163 this._createNgFactoryStub(outputCtx, originalFile, 2 /* TypeCheck */);
164 }
165 return outputCtx.statements.length > 0 ?
166 this._codegenSourceModule(originalFile.fileName, outputCtx) :
167 null;
168 };
169 AotCompiler.prototype.loadFilesAsync = function (fileNames, tsFiles) {
170 var _this = this;
171 var files = fileNames.map(function (fileName) { return _this._analyzeFile(fileName); });
172 var loadingPromises = [];
173 files.forEach(function (file) { return file.ngModules.forEach(function (ngModule) {
174 return loadingPromises.push(_this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false));
175 }); });
176 var analyzedInjectables = tsFiles.map(function (tsFile) { return _this._analyzeFileForInjectables(tsFile); });
177 return Promise.all(loadingPromises).then(function (_) { return ({
178 analyzedModules: mergeAndValidateNgFiles(files),
179 analyzedInjectables: analyzedInjectables,
180 }); });
181 };
182 AotCompiler.prototype.loadFilesSync = function (fileNames, tsFiles) {
183 var _this = this;
184 var files = fileNames.map(function (fileName) { return _this._analyzeFile(fileName); });
185 files.forEach(function (file) { return file.ngModules.forEach(function (ngModule) { return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true); }); });
186 var analyzedInjectables = tsFiles.map(function (tsFile) { return _this._analyzeFileForInjectables(tsFile); });
187 return {
188 analyzedModules: mergeAndValidateNgFiles(files),
189 analyzedInjectables: analyzedInjectables,
190 };
191 };
192 AotCompiler.prototype._createNgFactoryStub = function (outputCtx, file, emitFlags) {
193 var _this = this;
194 var componentId = 0;
195 file.ngModules.forEach(function (ngModuleMeta, ngModuleIndex) {
196 // Note: the code below needs to executed for StubEmitFlags.Basic and StubEmitFlags.TypeCheck,
197 // so we don't change the .ngfactory file too much when adding the type-check block.
198 // create exports that user code can reference
199 _this._ngModuleCompiler.createStub(outputCtx, ngModuleMeta.type.reference);
200 // add references to the symbols from the metadata.
201 // These can be used by the type check block for components,
202 // and they also cause TypeScript to include these files into the program too,
203 // which will make them part of the analyzedFiles.
204 var externalReferences = tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(ngModuleMeta.transitiveModule.directives.map(function (d) { return d.reference; }))), tslib_1.__read(ngModuleMeta.transitiveModule.pipes.map(function (d) { return d.reference; }))), tslib_1.__read(ngModuleMeta.importedModules.map(function (m) { return m.type.reference; }))), tslib_1.__read(ngModuleMeta.exportedModules.map(function (m) { return m.type.reference; }))), tslib_1.__read(_this._externalIdentifierReferences([identifiers_1.Identifiers.TemplateRef, identifiers_1.Identifiers.ElementRef])));
205 var externalReferenceVars = new Map();
206 externalReferences.forEach(function (ref, typeIndex) {
207 externalReferenceVars.set(ref, "_decl" + ngModuleIndex + "_" + typeIndex);
208 });
209 externalReferenceVars.forEach(function (varName, reference) {
210 outputCtx.statements.push(o.variable(varName)
211 .set(o.NULL_EXPR.cast(o.DYNAMIC_TYPE))
212 .toDeclStmt(o.expressionType(outputCtx.importExpr(reference, /* typeParams */ null, /* useSummaries */ false))));
213 });
214 if (emitFlags & 2 /* TypeCheck */) {
215 // add the type-check block for all components of the NgModule
216 ngModuleMeta.declaredDirectives.forEach(function (dirId) {
217 var compMeta = _this._metadataResolver.getDirectiveMetadata(dirId.reference);
218 if (!compMeta.isComponent) {
219 return;
220 }
221 componentId++;
222 _this._createTypeCheckBlock(outputCtx, compMeta.type.reference.name + "_Host_" + componentId, ngModuleMeta, _this._metadataResolver.getHostComponentMetadata(compMeta), [compMeta.type], externalReferenceVars);
223 _this._createTypeCheckBlock(outputCtx, compMeta.type.reference.name + "_" + componentId, ngModuleMeta, compMeta, ngModuleMeta.transitiveModule.directives, externalReferenceVars);
224 });
225 }
226 });
227 if (outputCtx.statements.length === 0) {
228 _createEmptyStub(outputCtx);
229 }
230 };
231 AotCompiler.prototype._externalIdentifierReferences = function (references) {
232 var e_1, _a;
233 var result = [];
234 try {
235 for (var references_1 = tslib_1.__values(references), references_1_1 = references_1.next(); !references_1_1.done; references_1_1 = references_1.next()) {
236 var reference = references_1_1.value;
237 var token = identifiers_1.createTokenForExternalReference(this.reflector, reference);
238 if (token.identifier) {
239 result.push(token.identifier.reference);
240 }
241 }
242 }
243 catch (e_1_1) { e_1 = { error: e_1_1 }; }
244 finally {
245 try {
246 if (references_1_1 && !references_1_1.done && (_a = references_1.return)) _a.call(references_1);
247 }
248 finally { if (e_1) throw e_1.error; }
249 }
250 return result;
251 };
252 AotCompiler.prototype._createTypeCheckBlock = function (ctx, componentId, moduleMeta, compMeta, directives, externalReferenceVars) {
253 var _a;
254 var _b = this._parseTemplate(compMeta, moduleMeta, directives), parsedTemplate = _b.template, usedPipes = _b.pipes;
255 (_a = ctx.statements).push.apply(_a, tslib_1.__spreadArray([], tslib_1.__read(this._typeCheckCompiler.compileComponent(componentId, compMeta, parsedTemplate, usedPipes, externalReferenceVars, ctx))));
256 };
257 AotCompiler.prototype.emitMessageBundle = function (analyzeResult, locale) {
258 var _this = this;
259 var errors = [];
260 var htmlParser = new html_parser_1.HtmlParser();
261 // TODO(vicb): implicit tags & attributes
262 var messageBundle = new message_bundle_1.MessageBundle(htmlParser, [], {}, locale);
263 analyzeResult.files.forEach(function (file) {
264 var compMetas = [];
265 file.directives.forEach(function (directiveType) {
266 var dirMeta = _this._metadataResolver.getDirectiveMetadata(directiveType);
267 if (dirMeta && dirMeta.isComponent) {
268 compMetas.push(dirMeta);
269 }
270 });
271 compMetas.forEach(function (compMeta) {
272 var html = compMeta.template.template;
273 // Template URL points to either an HTML or TS file depending on whether
274 // the file is used with `templateUrl:` or `template:`, respectively.
275 var templateUrl = compMeta.template.templateUrl;
276 var interpolationConfig = interpolation_config_1.InterpolationConfig.fromArray(compMeta.template.interpolation);
277 errors.push.apply(errors, tslib_1.__spreadArray([], tslib_1.__read(messageBundle.updateFromTemplate(html, templateUrl, interpolationConfig))));
278 });
279 });
280 if (errors.length) {
281 throw new Error(errors.map(function (e) { return e.toString(); }).join('\n'));
282 }
283 return messageBundle;
284 };
285 AotCompiler.prototype.emitAllPartialModules2 = function (files) {
286 var _this = this;
287 // Using reduce like this is a select many pattern (where map is a select pattern)
288 return files.reduce(function (r, file) {
289 r.push.apply(r, tslib_1.__spreadArray([], tslib_1.__read(_this._emitPartialModule2(file.fileName, file.injectables))));
290 return r;
291 }, []);
292 };
293 AotCompiler.prototype._emitPartialModule2 = function (fileName, injectables) {
294 var _this = this;
295 var context = this._createOutputContext(fileName);
296 injectables.forEach(function (injectable) { return _this._injectableCompiler.compile(injectable, context); });
297 if (context.statements && context.statements.length > 0) {
298 return [{ fileName: fileName, statements: tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(context.constantPool.statements)), tslib_1.__read(context.statements)) }];
299 }
300 return [];
301 };
302 AotCompiler.prototype.emitAllImpls = function (analyzeResult) {
303 var _this = this;
304 var ngModuleByPipeOrDirective = analyzeResult.ngModuleByPipeOrDirective, files = analyzeResult.files;
305 var sourceModules = files.map(function (file) { return _this._compileImplFile(file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules, file.injectables); });
306 return compile_metadata_1.flatten(sourceModules);
307 };
308 AotCompiler.prototype._compileImplFile = function (srcFileUrl, ngModuleByPipeOrDirective, directives, pipes, ngModules, injectables) {
309 var _this = this;
310 var fileSuffix = util_2.normalizeGenFileSuffix(util_2.splitTypescriptSuffix(srcFileUrl, true)[1]);
311 var generatedFiles = [];
312 var outputCtx = this._createOutputContext(util_2.ngfactoryFilePath(srcFileUrl, true));
313 generatedFiles.push.apply(generatedFiles, tslib_1.__spreadArray([], tslib_1.__read(this._createSummary(srcFileUrl, directives, pipes, ngModules, injectables, outputCtx))));
314 // compile all ng modules
315 ngModules.forEach(function (ngModuleMeta) { return _this._compileModule(outputCtx, ngModuleMeta); });
316 // compile components
317 directives.forEach(function (dirType) {
318 var compMeta = _this._metadataResolver.getDirectiveMetadata(dirType);
319 if (!compMeta.isComponent) {
320 return;
321 }
322 var ngModule = ngModuleByPipeOrDirective.get(dirType);
323 if (!ngModule) {
324 throw new Error("Internal Error: cannot determine the module for component " + parse_util_1.identifierName(compMeta.type) + "!");
325 }
326 // compile styles
327 var componentStylesheet = _this._styleCompiler.compileComponent(outputCtx, compMeta);
328 // Note: compMeta is a component and therefore template is non null.
329 compMeta.template.externalStylesheets.forEach(function (stylesheetMeta) {
330 // Note: fill non shim and shim style files as they might
331 // be shared by component with and without ViewEncapsulation.
332 var shim = _this._styleCompiler.needsStyleShim(compMeta);
333 generatedFiles.push(_this._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, shim, fileSuffix));
334 if (_this._options.allowEmptyCodegenFiles) {
335 generatedFiles.push(_this._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, !shim, fileSuffix));
336 }
337 });
338 // compile components
339 var compViewVars = _this._compileComponent(outputCtx, compMeta, ngModule, ngModule.transitiveModule.directives, componentStylesheet, fileSuffix);
340 _this._compileComponentFactory(outputCtx, compMeta, ngModule, fileSuffix);
341 });
342 if (outputCtx.statements.length > 0 || this._options.allowEmptyCodegenFiles) {
343 var srcModule = this._codegenSourceModule(srcFileUrl, outputCtx);
344 generatedFiles.unshift(srcModule);
345 }
346 return generatedFiles;
347 };
348 AotCompiler.prototype._createSummary = function (srcFileName, directives, pipes, ngModules, injectables, ngFactoryCtx) {
349 var _this = this;
350 var symbolSummaries = this._symbolResolver.getSymbolsOf(srcFileName)
351 .map(function (symbol) { return _this._symbolResolver.resolveSymbol(symbol); });
352 var typeData = tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(ngModules.map(function (meta) { return ({
353 summary: _this._metadataResolver.getNgModuleSummary(meta.type.reference),
354 metadata: _this._metadataResolver.getNgModuleMetadata(meta.type.reference)
355 }); }))), tslib_1.__read(directives.map(function (ref) { return ({
356 summary: _this._metadataResolver.getDirectiveSummary(ref),
357 metadata: _this._metadataResolver.getDirectiveMetadata(ref)
358 }); }))), tslib_1.__read(pipes.map(function (ref) { return ({
359 summary: _this._metadataResolver.getPipeSummary(ref),
360 metadata: _this._metadataResolver.getPipeMetadata(ref)
361 }); }))), tslib_1.__read(injectables.map(function (ref) { return ({
362 summary: _this._metadataResolver.getInjectableSummary(ref.symbol),
363 metadata: _this._metadataResolver.getInjectableSummary(ref.symbol).type
364 }); })));
365 var forJitOutputCtx = this._options.enableSummariesForJit ?
366 this._createOutputContext(util_2.summaryForJitFileName(srcFileName, true)) :
367 null;
368 var _a = summary_serializer_1.serializeSummaries(srcFileName, forJitOutputCtx, this._summaryResolver, this._symbolResolver, symbolSummaries, typeData, this._options.createExternalSymbolFactoryReexports), json = _a.json, exportAs = _a.exportAs;
369 exportAs.forEach(function (entry) {
370 ngFactoryCtx.statements.push(o.variable(entry.exportAs).set(ngFactoryCtx.importExpr(entry.symbol)).toDeclStmt(null, [
371 o.StmtModifier.Exported
372 ]));
373 });
374 var summaryJson = new generated_file_1.GeneratedFile(srcFileName, util_2.summaryFileName(srcFileName), json);
375 var result = [summaryJson];
376 if (forJitOutputCtx) {
377 result.push(this._codegenSourceModule(srcFileName, forJitOutputCtx));
378 }
379 return result;
380 };
381 AotCompiler.prototype._compileModule = function (outputCtx, ngModule) {
382 var providers = [];
383 if (this._options.locale) {
384 var normalizedLocale = this._options.locale.replace(/_/g, '-');
385 providers.push({
386 token: identifiers_1.createTokenForExternalReference(this.reflector, identifiers_1.Identifiers.LOCALE_ID),
387 useValue: normalizedLocale,
388 });
389 }
390 if (this._options.i18nFormat) {
391 providers.push({
392 token: identifiers_1.createTokenForExternalReference(this.reflector, identifiers_1.Identifiers.TRANSLATIONS_FORMAT),
393 useValue: this._options.i18nFormat
394 });
395 }
396 this._ngModuleCompiler.compile(outputCtx, ngModule, providers);
397 };
398 AotCompiler.prototype._compileComponentFactory = function (outputCtx, compMeta, ngModule, fileSuffix) {
399 var hostMeta = this._metadataResolver.getHostComponentMetadata(compMeta);
400 var hostViewFactoryVar = this._compileComponent(outputCtx, hostMeta, ngModule, [compMeta.type], null, fileSuffix)
401 .viewClassVar;
402 var compFactoryVar = compile_metadata_1.componentFactoryName(compMeta.type.reference);
403 var inputsExprs = [];
404 for (var propName in compMeta.inputs) {
405 var templateName = compMeta.inputs[propName];
406 // Don't quote so that the key gets minified...
407 inputsExprs.push(new o.LiteralMapEntry(propName, o.literal(templateName), false));
408 }
409 var outputsExprs = [];
410 for (var propName in compMeta.outputs) {
411 var templateName = compMeta.outputs[propName];
412 // Don't quote so that the key gets minified...
413 outputsExprs.push(new o.LiteralMapEntry(propName, o.literal(templateName), false));
414 }
415 outputCtx.statements.push(o.variable(compFactoryVar)
416 .set(o.importExpr(identifiers_1.Identifiers.createComponentFactory).callFn([
417 o.literal(compMeta.selector), outputCtx.importExpr(compMeta.type.reference),
418 o.variable(hostViewFactoryVar), new o.LiteralMapExpr(inputsExprs),
419 new o.LiteralMapExpr(outputsExprs),
420 o.literalArr(compMeta.template.ngContentSelectors.map(function (selector) { return o.literal(selector); }))
421 ]))
422 .toDeclStmt(o.importType(identifiers_1.Identifiers.ComponentFactory, [o.expressionType(outputCtx.importExpr(compMeta.type.reference))], [o.TypeModifier.Const]), [o.StmtModifier.Final, o.StmtModifier.Exported]));
423 };
424 AotCompiler.prototype._compileComponent = function (outputCtx, compMeta, ngModule, directiveIdentifiers, componentStyles, fileSuffix) {
425 var _a = this._parseTemplate(compMeta, ngModule, directiveIdentifiers), parsedTemplate = _a.template, usedPipes = _a.pipes;
426 var stylesExpr = componentStyles ? o.variable(componentStyles.stylesVar) : o.literalArr([]);
427 var viewResult = this._viewCompiler.compileComponent(outputCtx, compMeta, parsedTemplate, stylesExpr, usedPipes);
428 if (componentStyles) {
429 _resolveStyleStatements(this._symbolResolver, componentStyles, this._styleCompiler.needsStyleShim(compMeta), fileSuffix);
430 }
431 return viewResult;
432 };
433 AotCompiler.prototype._parseTemplate = function (compMeta, ngModule, directiveIdentifiers) {
434 var _this = this;
435 if (this._templateAstCache.has(compMeta.type.reference)) {
436 return this._templateAstCache.get(compMeta.type.reference);
437 }
438 var preserveWhitespaces = compMeta.template.preserveWhitespaces;
439 var directives = directiveIdentifiers.map(function (dir) { return _this._metadataResolver.getDirectiveSummary(dir.reference); });
440 var pipes = ngModule.transitiveModule.pipes.map(function (pipe) { return _this._metadataResolver.getPipeSummary(pipe.reference); });
441 var result = this._templateParser.parse(compMeta, compMeta.template.htmlAst, directives, pipes, ngModule.schemas, compile_metadata_1.templateSourceUrl(ngModule.type, compMeta, compMeta.template), preserveWhitespaces);
442 this._templateAstCache.set(compMeta.type.reference, result);
443 return result;
444 };
445 AotCompiler.prototype._createOutputContext = function (genFilePath) {
446 var _this = this;
447 var importExpr = function (symbol, typeParams, useSummaries) {
448 if (typeParams === void 0) { typeParams = null; }
449 if (useSummaries === void 0) { useSummaries = true; }
450 if (!(symbol instanceof static_symbol_1.StaticSymbol)) {
451 throw new Error("Internal error: unknown identifier " + JSON.stringify(symbol));
452 }
453 var arity = _this._symbolResolver.getTypeArity(symbol) || 0;
454 var _a = _this._symbolResolver.getImportAs(symbol, useSummaries) || symbol, filePath = _a.filePath, name = _a.name, members = _a.members;
455 var importModule = _this._fileNameToModuleName(filePath, genFilePath);
456 // It should be good enough to compare filePath to genFilePath and if they are equal
457 // there is a self reference. However, ngfactory files generate to .ts but their
458 // symbols have .d.ts so a simple compare is insufficient. They should be canonical
459 // and is tracked by #17705.
460 var selfReference = _this._fileNameToModuleName(genFilePath, genFilePath);
461 var moduleName = importModule === selfReference ? null : importModule;
462 // If we are in a type expression that refers to a generic type then supply
463 // the required type parameters. If there were not enough type parameters
464 // supplied, supply any as the type. Outside a type expression the reference
465 // should not supply type parameters and be treated as a simple value reference
466 // to the constructor function itself.
467 var suppliedTypeParams = typeParams || [];
468 var missingTypeParamsCount = arity - suppliedTypeParams.length;
469 var allTypeParams = suppliedTypeParams.concat(util_1.newArray(missingTypeParamsCount, o.DYNAMIC_TYPE));
470 return members.reduce(function (expr, memberName) { return expr.prop(memberName); }, o.importExpr(new o.ExternalReference(moduleName, name, null), allTypeParams));
471 };
472 return { statements: [], genFilePath: genFilePath, importExpr: importExpr, constantPool: new constant_pool_1.ConstantPool() };
473 };
474 AotCompiler.prototype._fileNameToModuleName = function (importedFilePath, containingFilePath) {
475 return this._summaryResolver.getKnownModuleName(importedFilePath) ||
476 this._symbolResolver.getKnownModuleName(importedFilePath) ||
477 this._host.fileNameToModuleName(importedFilePath, containingFilePath);
478 };
479 AotCompiler.prototype._codegenStyles = function (srcFileUrl, compMeta, stylesheetMetadata, isShimmed, fileSuffix) {
480 var outputCtx = this._createOutputContext(_stylesModuleUrl(stylesheetMetadata.moduleUrl, isShimmed, fileSuffix));
481 var compiledStylesheet = this._styleCompiler.compileStyles(outputCtx, compMeta, stylesheetMetadata, isShimmed);
482 _resolveStyleStatements(this._symbolResolver, compiledStylesheet, isShimmed, fileSuffix);
483 return this._codegenSourceModule(srcFileUrl, outputCtx);
484 };
485 AotCompiler.prototype._codegenSourceModule = function (srcFileUrl, ctx) {
486 return new generated_file_1.GeneratedFile(srcFileUrl, ctx.genFilePath, ctx.statements);
487 };
488 AotCompiler.prototype.listLazyRoutes = function (entryRoute, analyzedModules) {
489 var e_2, _a, e_3, _b;
490 var self = this;
491 if (entryRoute) {
492 var symbol = lazy_routes_1.parseLazyRoute(entryRoute, this.reflector).referencedModule;
493 return visitLazyRoute(symbol);
494 }
495 else if (analyzedModules) {
496 var allLazyRoutes = [];
497 try {
498 for (var _c = tslib_1.__values(analyzedModules.ngModules), _d = _c.next(); !_d.done; _d = _c.next()) {
499 var ngModule = _d.value;
500 var lazyRoutes = lazy_routes_1.listLazyRoutes(ngModule, this.reflector);
501 try {
502 for (var lazyRoutes_1 = (e_3 = void 0, tslib_1.__values(lazyRoutes)), lazyRoutes_1_1 = lazyRoutes_1.next(); !lazyRoutes_1_1.done; lazyRoutes_1_1 = lazyRoutes_1.next()) {
503 var lazyRoute = lazyRoutes_1_1.value;
504 allLazyRoutes.push(lazyRoute);
505 }
506 }
507 catch (e_3_1) { e_3 = { error: e_3_1 }; }
508 finally {
509 try {
510 if (lazyRoutes_1_1 && !lazyRoutes_1_1.done && (_b = lazyRoutes_1.return)) _b.call(lazyRoutes_1);
511 }
512 finally { if (e_3) throw e_3.error; }
513 }
514 }
515 }
516 catch (e_2_1) { e_2 = { error: e_2_1 }; }
517 finally {
518 try {
519 if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
520 }
521 finally { if (e_2) throw e_2.error; }
522 }
523 return allLazyRoutes;
524 }
525 else {
526 throw new Error("Either route or analyzedModules has to be specified!");
527 }
528 function visitLazyRoute(symbol, seenRoutes, allLazyRoutes) {
529 var e_4, _a;
530 if (seenRoutes === void 0) { seenRoutes = new Set(); }
531 if (allLazyRoutes === void 0) { allLazyRoutes = []; }
532 // Support pointing to default exports, but stop recursing there,
533 // as the StaticReflector does not yet support default exports.
534 if (seenRoutes.has(symbol) || !symbol.name) {
535 return allLazyRoutes;
536 }
537 seenRoutes.add(symbol);
538 var lazyRoutes = lazy_routes_1.listLazyRoutes(self._metadataResolver.getNgModuleMetadata(symbol, true), self.reflector);
539 try {
540 for (var lazyRoutes_2 = tslib_1.__values(lazyRoutes), lazyRoutes_2_1 = lazyRoutes_2.next(); !lazyRoutes_2_1.done; lazyRoutes_2_1 = lazyRoutes_2.next()) {
541 var lazyRoute = lazyRoutes_2_1.value;
542 allLazyRoutes.push(lazyRoute);
543 visitLazyRoute(lazyRoute.referencedModule, seenRoutes, allLazyRoutes);
544 }
545 }
546 catch (e_4_1) { e_4 = { error: e_4_1 }; }
547 finally {
548 try {
549 if (lazyRoutes_2_1 && !lazyRoutes_2_1.done && (_a = lazyRoutes_2.return)) _a.call(lazyRoutes_2);
550 }
551 finally { if (e_4) throw e_4.error; }
552 }
553 return allLazyRoutes;
554 }
555 };
556 return AotCompiler;
557 }());
558 exports.AotCompiler = AotCompiler;
559 function _createEmptyStub(outputCtx) {
560 // Note: We need to produce at least one import statement so that
561 // TypeScript knows that the file is an es6 module. Otherwise our generated
562 // exports / imports won't be emitted properly by TypeScript.
563 outputCtx.statements.push(o.importExpr(identifiers_1.Identifiers.ComponentFactory).toStmt());
564 }
565 function _resolveStyleStatements(symbolResolver, compileResult, needsShim, fileSuffix) {
566 compileResult.dependencies.forEach(function (dep) {
567 dep.setValue(symbolResolver.getStaticSymbol(_stylesModuleUrl(dep.moduleUrl, needsShim, fileSuffix), dep.name));
568 });
569 }
570 function _stylesModuleUrl(stylesheetUrl, shim, suffix) {
571 return "" + stylesheetUrl + (shim ? '.shim' : '') + ".ngstyle" + suffix;
572 }
573 function analyzeNgModules(fileNames, host, staticSymbolResolver, metadataResolver) {
574 var files = _analyzeFilesIncludingNonProgramFiles(fileNames, host, staticSymbolResolver, metadataResolver);
575 return mergeAnalyzedFiles(files);
576 }
577 exports.analyzeNgModules = analyzeNgModules;
578 function analyzeAndValidateNgModules(fileNames, host, staticSymbolResolver, metadataResolver) {
579 return validateAnalyzedModules(analyzeNgModules(fileNames, host, staticSymbolResolver, metadataResolver));
580 }
581 exports.analyzeAndValidateNgModules = analyzeAndValidateNgModules;
582 function validateAnalyzedModules(analyzedModules) {
583 if (analyzedModules.symbolsMissingModule && analyzedModules.symbolsMissingModule.length) {
584 var messages = analyzedModules.symbolsMissingModule.map(function (s) { return "Cannot determine the module for class " + s.name + " in " + s.filePath + "! Add " + s.name + " to the NgModule to fix it."; });
585 throw parse_util_1.syntaxError(messages.join('\n'));
586 }
587 return analyzedModules;
588 }
589 // Analyzes all of the program files,
590 // including files that are not part of the program
591 // but are referenced by an NgModule.
592 function _analyzeFilesIncludingNonProgramFiles(fileNames, host, staticSymbolResolver, metadataResolver) {
593 var seenFiles = new Set();
594 var files = [];
595 var visitFile = function (fileName) {
596 if (seenFiles.has(fileName) || !host.isSourceFile(fileName)) {
597 return false;
598 }
599 seenFiles.add(fileName);
600 var analyzedFile = analyzeFile(host, staticSymbolResolver, metadataResolver, fileName);
601 files.push(analyzedFile);
602 analyzedFile.ngModules.forEach(function (ngModule) {
603 ngModule.transitiveModule.modules.forEach(function (modMeta) { return visitFile(modMeta.reference.filePath); });
604 });
605 };
606 fileNames.forEach(function (fileName) { return visitFile(fileName); });
607 return files;
608 }
609 function analyzeFile(host, staticSymbolResolver, metadataResolver, fileName) {
610 var abstractDirectives = [];
611 var directives = [];
612 var pipes = [];
613 var injectables = [];
614 var ngModules = [];
615 var hasDecorators = staticSymbolResolver.hasDecorators(fileName);
616 var exportsNonSourceFiles = false;
617 var isDeclarationFile = fileName.endsWith('.d.ts');
618 // Don't analyze .d.ts files that have no decorators as a shortcut
619 // to speed up the analysis. This prevents us from
620 // resolving the references in these files.
621 // Note: exportsNonSourceFiles is only needed when compiling with summaries,
622 // which is not the case when .d.ts files are treated as input files.
623 if (!isDeclarationFile || hasDecorators) {
624 staticSymbolResolver.getSymbolsOf(fileName).forEach(function (symbol) {
625 var resolvedSymbol = staticSymbolResolver.resolveSymbol(symbol);
626 var symbolMeta = resolvedSymbol.metadata;
627 if (!symbolMeta || symbolMeta.__symbolic === 'error') {
628 return;
629 }
630 var isNgSymbol = false;
631 if (symbolMeta.__symbolic === 'class') {
632 if (metadataResolver.isDirective(symbol)) {
633 isNgSymbol = true;
634 // This directive either has a selector or doesn't. Selector-less directives get tracked
635 // in abstractDirectives, not directives. The compiler doesn't deal with selector-less
636 // directives at all, really, other than to persist their metadata. This is done so that
637 // apps will have an easier time migrating to Ivy, which requires the selector-less
638 // annotations to be applied.
639 if (!metadataResolver.isAbstractDirective(symbol)) {
640 // The directive is an ordinary directive.
641 directives.push(symbol);
642 }
643 else {
644 // The directive has no selector and is an "abstract" directive, so track it
645 // accordingly.
646 abstractDirectives.push(symbol);
647 }
648 }
649 else if (metadataResolver.isPipe(symbol)) {
650 isNgSymbol = true;
651 pipes.push(symbol);
652 }
653 else if (metadataResolver.isNgModule(symbol)) {
654 var ngModule = metadataResolver.getNgModuleMetadata(symbol, false);
655 if (ngModule) {
656 isNgSymbol = true;
657 ngModules.push(ngModule);
658 }
659 }
660 else if (metadataResolver.isInjectable(symbol)) {
661 isNgSymbol = true;
662 var injectable = metadataResolver.getInjectableMetadata(symbol, null, false);
663 if (injectable) {
664 injectables.push(injectable);
665 }
666 }
667 }
668 if (!isNgSymbol) {
669 exportsNonSourceFiles =
670 exportsNonSourceFiles || isValueExportingNonSourceFile(host, symbolMeta);
671 }
672 });
673 }
674 return {
675 fileName: fileName,
676 directives: directives,
677 abstractDirectives: abstractDirectives,
678 pipes: pipes,
679 ngModules: ngModules,
680 injectables: injectables,
681 exportsNonSourceFiles: exportsNonSourceFiles,
682 };
683 }
684 exports.analyzeFile = analyzeFile;
685 function analyzeFileForInjectables(host, staticSymbolResolver, metadataResolver, fileName) {
686 var injectables = [];
687 var shallowModules = [];
688 if (staticSymbolResolver.hasDecorators(fileName)) {
689 staticSymbolResolver.getSymbolsOf(fileName).forEach(function (symbol) {
690 var resolvedSymbol = staticSymbolResolver.resolveSymbol(symbol);
691 var symbolMeta = resolvedSymbol.metadata;
692 if (!symbolMeta || symbolMeta.__symbolic === 'error') {
693 return;
694 }
695 if (symbolMeta.__symbolic === 'class') {
696 if (metadataResolver.isInjectable(symbol)) {
697 var injectable = metadataResolver.getInjectableMetadata(symbol, null, false);
698 if (injectable) {
699 injectables.push(injectable);
700 }
701 }
702 else if (metadataResolver.isNgModule(symbol)) {
703 var module = metadataResolver.getShallowModuleMetadata(symbol);
704 if (module) {
705 shallowModules.push(module);
706 }
707 }
708 }
709 });
710 }
711 return { fileName: fileName, injectables: injectables, shallowModules: shallowModules };
712 }
713 exports.analyzeFileForInjectables = analyzeFileForInjectables;
714 function isValueExportingNonSourceFile(host, metadata) {
715 var exportsNonSourceFiles = false;
716 var Visitor = /** @class */ (function () {
717 function Visitor() {
718 }
719 Visitor.prototype.visitArray = function (arr, context) {
720 var _this = this;
721 arr.forEach(function (v) { return util_1.visitValue(v, _this, context); });
722 };
723 Visitor.prototype.visitStringMap = function (map, context) {
724 var _this = this;
725 Object.keys(map).forEach(function (key) { return util_1.visitValue(map[key], _this, context); });
726 };
727 Visitor.prototype.visitPrimitive = function (value, context) { };
728 Visitor.prototype.visitOther = function (value, context) {
729 if (value instanceof static_symbol_1.StaticSymbol && !host.isSourceFile(value.filePath)) {
730 exportsNonSourceFiles = true;
731 }
732 };
733 return Visitor;
734 }());
735 util_1.visitValue(metadata, new Visitor(), null);
736 return exportsNonSourceFiles;
737 }
738 function mergeAnalyzedFiles(analyzedFiles) {
739 var allNgModules = [];
740 var ngModuleByPipeOrDirective = new Map();
741 var allPipesAndDirectives = new Set();
742 analyzedFiles.forEach(function (af) {
743 af.ngModules.forEach(function (ngModule) {
744 allNgModules.push(ngModule);
745 ngModule.declaredDirectives.forEach(function (d) { return ngModuleByPipeOrDirective.set(d.reference, ngModule); });
746 ngModule.declaredPipes.forEach(function (p) { return ngModuleByPipeOrDirective.set(p.reference, ngModule); });
747 });
748 af.directives.forEach(function (d) { return allPipesAndDirectives.add(d); });
749 af.pipes.forEach(function (p) { return allPipesAndDirectives.add(p); });
750 });
751 var symbolsMissingModule = [];
752 allPipesAndDirectives.forEach(function (ref) {
753 if (!ngModuleByPipeOrDirective.has(ref)) {
754 symbolsMissingModule.push(ref);
755 }
756 });
757 return {
758 ngModules: allNgModules,
759 ngModuleByPipeOrDirective: ngModuleByPipeOrDirective,
760 symbolsMissingModule: symbolsMissingModule,
761 files: analyzedFiles
762 };
763 }
764 exports.mergeAnalyzedFiles = mergeAnalyzedFiles;
765 function mergeAndValidateNgFiles(files) {
766 return validateAnalyzedModules(mergeAnalyzedFiles(files));
767 }
768});
769//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGlsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21waWxlci9zcmMvYW90L2NvbXBpbGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRzs7Ozs7Ozs7Ozs7Ozs7SUFFSCwyRUFBdVU7SUFFdlUscUVBQTZEO0l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