@angular/compiler-cli 5.2.4 → 5.2.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler-cli",
3
- "version": "5.2.4",
3
+ "version": "5.2.5",
4
4
  "description": "Angular - the compiler CLI for Node.js",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "peerDependencies": {
18
18
  "typescript": ">=2.4.2 <2.7",
19
- "@angular/compiler": "5.2.4"
19
+ "@angular/compiler": "5.2.5"
20
20
  },
21
21
  "repository": {
22
22
  "type": "git",
@@ -199,7 +199,12 @@ var TsCompilerAotCompilerTypeCheckHostAdapter = /** @class */ (function () {
199
199
  resourceName = "./" + resourceName;
200
200
  }
201
201
  var filePathWithNgResource = this.moduleNameToFileName(addNgResourceSuffix(resourceName), containingFile);
202
- return filePathWithNgResource ? stripNgResourceSuffix(filePathWithNgResource) : null;
202
+ var result = filePathWithNgResource ? stripNgResourceSuffix(filePathWithNgResource) : null;
203
+ // Used under Bazel to report more specific error with remediation advice
204
+ if (!result && this.context.reportMissingResource) {
205
+ this.context.reportMissingResource(resourceName);
206
+ }
207
+ return result;
203
208
  };
204
209
  TsCompilerAotCompilerTypeCheckHostAdapter.prototype.toSummaryFileName = function (fileName, referringSrcFileName) {
205
210
  return this.fileNameToModuleName(fileName, referringSrcFileName);
@@ -1 +1 @@
1
- {"version":3,"file":"compiler_host.js","sourceRoot":"","sources":["../../../../../packages/compiler-cli/src/transformers/compiler_host.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,8CAAuL;AACvL,2BAA6B;AAC7B,+BAAiC;AAMjC,qDAA8F;AAC9F,+BAA6E;AAE7E,IAAM,yBAAyB,GAAG,6CAA6C,CAAC;AAChF,IAAM,GAAG,GAAG,kCAAkC,CAAC;AAE/C,4BACI,EACwD;QADvD,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by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AotCompilerHost, EmitterVisitorContext, ExternalReference, GeneratedFile, ParseSourceSpan, TypeScriptEmitter, collectExternalReferences, syntaxError} from '@angular/compiler';\nimport * as path from 'path';\nimport * as ts from 'typescript';\n\nimport {TypeCheckHost} from '../diagnostics/translate_diagnostics';\nimport {METADATA_VERSION, ModuleMetadata} from '../metadata/index';\n\nimport {CompilerHost, CompilerOptions, LibrarySummary} from './api';\nimport {MetadataReaderHost, createMetadataReaderCache, readMetadata} from './metadata_reader';\nimport {DTS, GENERATED_FILES, isInRootDir, relativeToRootDirs} from './util';\n\nconst NODE_MODULES_PACKAGE_NAME = /node_modules\\/((\\w|-)+|(@(\\w|-)+\\/(\\w|-)+))/;\nconst EXT = /(\\.ts|\\.d\\.ts|\\.js|\\.jsx|\\.tsx)$/;\n\nexport function createCompilerHost(\n {options, tsHost = ts.createCompilerHost(options, true)}:\n {options: CompilerOptions, tsHost?: ts.CompilerHost}): CompilerHost {\n return tsHost;\n}\n\nexport interface MetadataProvider {\n getMetadata(sourceFile: ts.SourceFile): ModuleMetadata|undefined;\n}\n\ninterface GenSourceFile {\n externalReferences: Set<string>;\n sourceFile: ts.SourceFile;\n emitCtx: EmitterVisitorContext;\n}\n\nexport interface CodeGenerator {\n generateFile(genFileName: string, baseFileName?: string): GeneratedFile;\n findGeneratedFileNames(fileName: string): string[];\n}\n\nfunction assert<T>(condition: T | null | undefined) {\n if (!condition) {\n // TODO(chuckjaz): do the right thing\n }\n return condition !;\n}\n\n/**\n * Implements the following hosts based on an api.CompilerHost:\n * - ts.CompilerHost to be consumed by a ts.Program\n * - AotCompilerHost for @angular/compiler\n * - TypeCheckHost for mapping ts errors to ng errors (via translateDiagnostics)\n */\nexport class TsCompilerAotCompilerTypeCheckHostAdapter implements ts.CompilerHost, AotCompilerHost,\n TypeCheckHost {\n private metadataReaderCache = createMetadataReaderCache();\n private flatModuleIndexCache = new Map<string, boolean>();\n private flatModuleIndexNames = new Set<string>();\n private flatModuleIndexRedirectNames = new Set<string>();\n private rootDirs: string[];\n private moduleResolutionCache: ts.ModuleResolutionCache;\n private originalSourceFiles = new Map<string, ts.SourceFile|null>();\n private originalFileExistsCache = new Map<string, boolean>();\n private generatedSourceFiles = new Map<string, GenSourceFile>();\n private generatedCodeFor = new Map<string, string[]>();\n private emitter = new TypeScriptEmitter();\n private metadataReaderHost: MetadataReaderHost;\n\n getCancellationToken: () => ts.CancellationToken;\n getDefaultLibLocation: () => string;\n trace: (s: string) => void;\n getDirectories: (path: string) => string[];\n directoryExists?: (directoryName: string) => boolean;\n\n constructor(\n private rootFiles: ReadonlyArray<string>, private options: CompilerOptions,\n private context: CompilerHost, private metadataProvider: MetadataProvider,\n private codeGenerator: CodeGenerator,\n private librarySummaries = new Map<string, LibrarySummary>()) {\n this.moduleResolutionCache = ts.createModuleResolutionCache(\n this.context.getCurrentDirectory !(), this.context.getCanonicalFileName.bind(this.context));\n const basePath = this.options.basePath !;\n this.rootDirs =\n (this.options.rootDirs || [this.options.basePath !]).map(p => path.resolve(basePath, p));\n if (context.getDirectories) {\n this.getDirectories = path => context.getDirectories !(path);\n }\n if (context.directoryExists) {\n this.directoryExists = directoryName => context.directoryExists !(directoryName);\n }\n if (context.getCancellationToken) {\n this.getCancellationToken = () => context.getCancellationToken !();\n }\n if (context.getDefaultLibLocation) {\n this.getDefaultLibLocation = () => context.getDefaultLibLocation !();\n }\n if (context.trace) {\n this.trace = s => context.trace !(s);\n }\n if (context.fileNameToModuleName) {\n this.fileNameToModuleName = context.fileNameToModuleName.bind(context);\n }\n // Note: don't copy over context.moduleNameToFileName as we first\n // normalize undefined containingFile to a filled containingFile.\n if (context.resourceNameToFileName) {\n this.resourceNameToFileName = context.resourceNameToFileName.bind(context);\n }\n if (context.toSummaryFileName) {\n this.toSummaryFileName = context.toSummaryFileName.bind(context);\n }\n if (context.fromSummaryFileName) {\n this.fromSummaryFileName = context.fromSummaryFileName.bind(context);\n }\n this.metadataReaderHost = {\n cacheMetadata: () => true,\n getSourceFileMetadata: (filePath) => {\n const sf = this.getOriginalSourceFile(filePath);\n return sf ? this.metadataProvider.getMetadata(sf) : undefined;\n },\n fileExists: (filePath) => this.originalFileExists(filePath),\n readFile: (filePath) => assert(this.context.readFile(filePath)),\n };\n }\n\n private resolveModuleName(moduleName: string, containingFile: string): ts.ResolvedModule\n |undefined {\n const rm = ts.resolveModuleName(\n moduleName, containingFile.replace(/\\\\/g, '/'), this.options, this,\n this.moduleResolutionCache)\n .resolvedModule;\n if (rm && this.isSourceFile(rm.resolvedFileName) && DTS.test(rm.resolvedFileName)) {\n // Case: generateCodeForLibraries = true and moduleName is\n // a .d.ts file in a node_modules folder.\n // Need to set isExternalLibraryImport to false so that generated files for that file\n // are emitted.\n rm.isExternalLibraryImport = false;\n }\n return rm;\n }\n\n // Note: We implement this method so that TypeScript and Angular share the same\n // ts.ModuleResolutionCache\n // and that we can tell ts.Program about our different opinion about\n // ResolvedModule.isExternalLibraryImport\n // (see our isSourceFile method).\n resolveModuleNames(moduleNames: string[], containingFile: string): ts.ResolvedModule[] {\n // TODO(tbosch): this seems to be a typing error in TypeScript,\n // as it contains assertions that the result contains the same number of entries\n // as the given module names.\n return <ts.ResolvedModule[]>moduleNames.map(\n moduleName => this.resolveModuleName(moduleName, containingFile));\n }\n\n moduleNameToFileName(m: string, containingFile?: string): string|null {\n if (!containingFile) {\n if (m.indexOf('.') === 0) {\n throw new Error('Resolution of relative paths requires a containing file.');\n }\n // Any containing file gives the same result for absolute imports\n containingFile = this.rootFiles[0];\n }\n if (this.context.moduleNameToFileName) {\n return this.context.moduleNameToFileName(m, containingFile);\n }\n const resolved = this.resolveModuleName(m, containingFile);\n return resolved ? resolved.resolvedFileName : null;\n }\n\n /**\n * We want a moduleId that will appear in import statements in the generated code\n * which will be written to `containingFile`.\n *\n * Note that we also generate files for files in node_modules, as libraries\n * only ship .metadata.json files but not the generated code.\n *\n * Logic:\n * 1. if the importedFile and the containingFile are from the project sources\n * or from the same node_modules package, use a relative path\n * 2. if the importedFile is in a node_modules package,\n * use a path that starts with the package name.\n * 3. Error if the containingFile is in the node_modules package\n * and the importedFile is in the project soures,\n * as that is a violation of the principle that node_modules packages cannot\n * import project sources.\n */\n fileNameToModuleName(importedFile: string, containingFile: string): string {\n const originalImportedFile = importedFile;\n if (this.options.traceResolution) {\n console.error(\n 'fileNameToModuleName from containingFile', containingFile, 'to importedFile',\n importedFile);\n }\n\n // drop extension\n importedFile = importedFile.replace(EXT, '');\n const importedFilePackagName = getPackageName(importedFile);\n const containingFilePackageName = getPackageName(containingFile);\n\n let moduleName: string;\n if (importedFilePackagName === containingFilePackageName ||\n GENERATED_FILES.test(originalImportedFile)) {\n const rootedContainingFile = relativeToRootDirs(containingFile, this.rootDirs);\n const rootedImportedFile = relativeToRootDirs(importedFile, this.rootDirs);\n\n if (rootedContainingFile !== containingFile && rootedImportedFile !== importedFile) {\n // if both files are contained in the `rootDirs`, then strip the rootDirs\n containingFile = rootedContainingFile;\n importedFile = rootedImportedFile;\n }\n moduleName = dotRelative(path.dirname(containingFile), importedFile);\n } else if (importedFilePackagName) {\n moduleName = stripNodeModulesPrefix(importedFile);\n } else {\n throw new Error(\n `Trying to import a source file from a node_modules package: import ${originalImportedFile} from ${containingFile}`);\n }\n return moduleName;\n }\n\n resourceNameToFileName(resourceName: string, containingFile: string): string|null {\n // Note: we convert package paths into relative paths to be compatible with the the\n // previous implementation of UrlResolver.\n const firstChar = resourceName[0];\n if (firstChar === '/') {\n resourceName = resourceName.slice(1);\n } else if (firstChar !== '.') {\n resourceName = `./${resourceName}`;\n }\n const filePathWithNgResource =\n this.moduleNameToFileName(addNgResourceSuffix(resourceName), containingFile);\n return filePathWithNgResource ? stripNgResourceSuffix(filePathWithNgResource) : null;\n }\n\n toSummaryFileName(fileName: string, referringSrcFileName: string): string {\n return this.fileNameToModuleName(fileName, referringSrcFileName);\n }\n\n fromSummaryFileName(fileName: string, referringLibFileName: string): string {\n const resolved = this.moduleNameToFileName(fileName, referringLibFileName);\n if (!resolved) {\n throw new Error(`Could not resolve ${fileName} from ${referringLibFileName}`);\n }\n return resolved;\n }\n\n parseSourceSpanOf(fileName: string, line: number, character: number): ParseSourceSpan|null {\n const data = this.generatedSourceFiles.get(fileName);\n if (data && data.emitCtx) {\n return data.emitCtx.spanOf(line, character);\n }\n return null;\n }\n\n private getOriginalSourceFile(\n filePath: string, languageVersion?: ts.ScriptTarget,\n onError?: ((message: string) => void)|undefined): ts.SourceFile|null {\n // Note: we need the explicit check via `has` as we also cache results\n // that were null / undefined.\n if (this.originalSourceFiles.has(filePath)) {\n return this.originalSourceFiles.get(filePath) !;\n }\n if (!languageVersion) {\n languageVersion = this.options.target || ts.ScriptTarget.Latest;\n }\n // Note: This can also return undefined,\n // as the TS typings are not correct!\n const sf = this.context.getSourceFile(filePath, languageVersion, onError) || null;\n this.originalSourceFiles.set(filePath, sf);\n return sf;\n }\n\n updateGeneratedFile(genFile: GeneratedFile): ts.SourceFile {\n if (!genFile.stmts) {\n throw new Error(\n `Invalid Argument: Expected a GenerateFile with statements. ${genFile.genFileUrl}`);\n }\n const oldGenFile = this.generatedSourceFiles.get(genFile.genFileUrl);\n if (!oldGenFile) {\n throw new Error(`Illegal State: previous GeneratedFile not found for ${genFile.genFileUrl}.`);\n }\n const newRefs = genFileExternalReferences(genFile);\n const oldRefs = oldGenFile.externalReferences;\n let refsAreEqual = oldRefs.size === newRefs.size;\n if (refsAreEqual) {\n newRefs.forEach(r => refsAreEqual = refsAreEqual && oldRefs.has(r));\n }\n if (!refsAreEqual) {\n throw new Error(\n `Illegal State: external references changed in ${genFile.genFileUrl}.\\nOld: ${Array.from(oldRefs)}.\\nNew: ${Array.from(newRefs)}`);\n }\n return this.addGeneratedFile(genFile, newRefs);\n }\n\n private addGeneratedFile(genFile: GeneratedFile, externalReferences: Set<string>): ts.SourceFile {\n if (!genFile.stmts) {\n throw new Error(\n `Invalid Argument: Expected a GenerateFile with statements. ${genFile.genFileUrl}`);\n }\n const {sourceText, context} = this.emitter.emitStatementsAndContext(\n genFile.genFileUrl, genFile.stmts, /* preamble */ '',\n /* emitSourceMaps */ false);\n const sf = ts.createSourceFile(\n genFile.genFileUrl, sourceText, this.options.target || ts.ScriptTarget.Latest);\n if ((this.options.module === ts.ModuleKind.AMD || this.options.module === ts.ModuleKind.UMD) &&\n this.context.amdModuleName) {\n const moduleName = this.context.amdModuleName(sf);\n if (moduleName) sf.moduleName = moduleName;\n }\n this.generatedSourceFiles.set(genFile.genFileUrl, {\n sourceFile: sf,\n emitCtx: context, externalReferences,\n });\n return sf;\n }\n\n shouldGenerateFile(fileName: string): {generate: boolean, baseFileName?: string} {\n // TODO(tbosch): allow generating files that are not in the rootDir\n // See https://github.com/angular/angular/issues/19337\n if (!isInRootDir(fileName, this.options)) {\n return {generate: false};\n }\n const genMatch = GENERATED_FILES.exec(fileName);\n if (!genMatch) {\n return {generate: false};\n }\n const [, base, genSuffix, suffix] = genMatch;\n if (suffix !== 'ts' && suffix !== 'tsx') {\n return {generate: false};\n }\n let baseFileName: string|undefined;\n if (genSuffix.indexOf('ngstyle') >= 0) {\n // Note: ngstyle files have names like `afile.css.ngstyle.ts`\n if (!this.originalFileExists(base)) {\n return {generate: false};\n }\n } else {\n // Note: on-the-fly generated files always have a `.ts` suffix,\n // but the file from which we generated it can be a `.ts`/ `.tsx`/ `.d.ts`\n // (see options.generateCodeForLibraries).\n baseFileName = [`${base}.ts`, `${base}.tsx`, `${base}.d.ts`].find(\n baseFileName => this.isSourceFile(baseFileName) && this.originalFileExists(baseFileName));\n if (!baseFileName) {\n return {generate: false};\n }\n }\n return {generate: true, baseFileName};\n }\n\n shouldGenerateFilesFor(fileName: string) {\n // TODO(tbosch): allow generating files that are not in the rootDir\n // See https://github.com/angular/angular/issues/19337\n return !GENERATED_FILES.test(fileName) && this.isSourceFile(fileName) &&\n isInRootDir(fileName, this.options);\n }\n\n getSourceFile(\n fileName: string, languageVersion: ts.ScriptTarget,\n onError?: ((message: string) => void)|undefined): ts.SourceFile {\n // Note: Don't exit early in this method to make sure\n // we always have up to date references on the file!\n let genFileNames: string[] = [];\n let sf = this.getGeneratedFile(fileName);\n if (!sf) {\n const summary = this.librarySummaries.get(fileName);\n if (summary) {\n if (!summary.sourceFile) {\n summary.sourceFile = ts.createSourceFile(\n fileName, summary.text, this.options.target || ts.ScriptTarget.Latest);\n }\n sf = summary.sourceFile;\n genFileNames = [];\n }\n }\n if (!sf) {\n sf = this.getOriginalSourceFile(fileName);\n const cachedGenFiles = this.generatedCodeFor.get(fileName);\n if (cachedGenFiles) {\n genFileNames = cachedGenFiles;\n } else {\n if (!this.options.noResolve && this.shouldGenerateFilesFor(fileName)) {\n genFileNames = this.codeGenerator.findGeneratedFileNames(fileName).filter(\n fileName => this.shouldGenerateFile(fileName).generate);\n }\n this.generatedCodeFor.set(fileName, genFileNames);\n }\n }\n if (sf) {\n addReferencesToSourceFile(sf, genFileNames);\n }\n // TODO(tbosch): TypeScript's typings for getSourceFile are incorrect,\n // as it can very well return undefined.\n return sf !;\n }\n\n private getGeneratedFile(fileName: string): ts.SourceFile|null {\n const genSrcFile = this.generatedSourceFiles.get(fileName);\n if (genSrcFile) {\n return genSrcFile.sourceFile;\n }\n const {generate, baseFileName} = this.shouldGenerateFile(fileName);\n if (generate) {\n const genFile = this.codeGenerator.generateFile(fileName, baseFileName);\n return this.addGeneratedFile(genFile, genFileExternalReferences(genFile));\n }\n return null;\n }\n\n private originalFileExists(fileName: string): boolean {\n let fileExists = this.originalFileExistsCache.get(fileName);\n if (fileExists == null) {\n fileExists = this.context.fileExists(fileName);\n this.originalFileExistsCache.set(fileName, fileExists);\n }\n return fileExists;\n }\n\n fileExists(fileName: string): boolean {\n fileName = stripNgResourceSuffix(fileName);\n if (this.librarySummaries.has(fileName) || this.generatedSourceFiles.has(fileName)) {\n return true;\n }\n if (this.shouldGenerateFile(fileName).generate) {\n return true;\n }\n return this.originalFileExists(fileName);\n }\n\n loadSummary(filePath: string): string|null {\n const summary = this.librarySummaries.get(filePath);\n if (summary) {\n return summary.text;\n }\n if (this.originalFileExists(filePath)) {\n return assert(this.context.readFile(filePath));\n }\n return null;\n }\n\n isSourceFile(filePath: string): boolean {\n // Don't generate any files nor typecheck them\n // if skipTemplateCodegen is set and fullTemplateTypeCheck is not yet set,\n // for backwards compatibility.\n if (this.options.skipTemplateCodegen && !this.options.fullTemplateTypeCheck) {\n return false;\n }\n // If we have a summary from a previous compilation,\n // treat the file never as a source file.\n if (this.librarySummaries.has(filePath)) {\n return false;\n }\n if (GENERATED_FILES.test(filePath)) {\n return false;\n }\n if (this.options.generateCodeForLibraries === false && DTS.test(filePath)) {\n return false;\n }\n if (DTS.test(filePath)) {\n // Check for a bundle index.\n if (this.hasBundleIndex(filePath)) {\n const normalFilePath = path.normalize(filePath);\n return this.flatModuleIndexNames.has(normalFilePath) ||\n this.flatModuleIndexRedirectNames.has(normalFilePath);\n }\n }\n return true;\n }\n\n readFile(fileName: string) {\n const summary = this.librarySummaries.get(fileName);\n if (summary) {\n return summary.text;\n }\n return this.context.readFile(fileName);\n }\n\n getMetadataFor(filePath: string): ModuleMetadata[]|undefined {\n return readMetadata(filePath, this.metadataReaderHost, this.metadataReaderCache);\n }\n\n loadResource(filePath: string): Promise<string>|string {\n if (this.context.readResource) return this.context.readResource(filePath);\n if (!this.originalFileExists(filePath)) {\n throw syntaxError(`Error: Resource file not found: ${filePath}`);\n }\n return assert(this.context.readFile(filePath));\n }\n\n getOutputName(filePath: string): string {\n return path.relative(this.getCurrentDirectory(), filePath);\n }\n\n private hasBundleIndex(filePath: string): boolean {\n const checkBundleIndex = (directory: string): boolean => {\n let result = this.flatModuleIndexCache.get(directory);\n if (result == null) {\n if (path.basename(directory) == 'node_module') {\n // Don't look outside the node_modules this package is installed in.\n result = false;\n } else {\n // A bundle index exists if the typings .d.ts file has a metadata.json that has an\n // importAs.\n try {\n const packageFile = path.join(directory, 'package.json');\n if (this.originalFileExists(packageFile)) {\n // Once we see a package.json file, assume false until it we find the bundle index.\n result = false;\n const packageContent: any = JSON.parse(assert(this.context.readFile(packageFile)));\n if (packageContent.typings) {\n const typings = path.normalize(path.join(directory, packageContent.typings));\n if (DTS.test(typings)) {\n const metadataFile = typings.replace(DTS, '.metadata.json');\n if (this.originalFileExists(metadataFile)) {\n const metadata = JSON.parse(assert(this.context.readFile(metadataFile)));\n if (metadata.flatModuleIndexRedirect) {\n this.flatModuleIndexRedirectNames.add(typings);\n // Note: don't set result = true,\n // as this would mark this folder\n // as having a bundleIndex too early without\n // filling the bundleIndexNames.\n } else if (metadata.importAs) {\n this.flatModuleIndexNames.add(typings);\n result = true;\n }\n }\n }\n }\n } else {\n const parent = path.dirname(directory);\n if (parent != directory) {\n // Try the parent directory.\n result = checkBundleIndex(parent);\n } else {\n result = false;\n }\n }\n } catch (e) {\n // If we encounter any errors assume we this isn't a bundle index.\n result = false;\n }\n }\n this.flatModuleIndexCache.set(directory, result);\n }\n return result;\n };\n\n return checkBundleIndex(path.dirname(filePath));\n }\n\n getDefaultLibFileName = (options: ts.CompilerOptions) =>\n this.context.getDefaultLibFileName(options)\n getCurrentDirectory = () => this.context.getCurrentDirectory();\n getCanonicalFileName = (fileName: string) => this.context.getCanonicalFileName(fileName);\n useCaseSensitiveFileNames = () => this.context.useCaseSensitiveFileNames();\n getNewLine = () => this.context.getNewLine();\n // Make sure we do not `host.realpath()` from TS as we do not want to resolve symlinks.\n // https://github.com/Microsoft/TypeScript/issues/9552\n realPath = (p: string) => p;\n writeFile = this.context.writeFile.bind(this.context);\n}\n\nfunction genFileExternalReferences(genFile: GeneratedFile): Set<string> {\n return new Set(collectExternalReferences(genFile.stmts !).map(er => er.moduleName !));\n}\n\nfunction addReferencesToSourceFile(sf: ts.SourceFile, genFileNames: string[]) {\n // Note: as we modify ts.SourceFiles we need to keep the original\n // value for `referencedFiles` around in cache the original host is caching ts.SourceFiles.\n // Note: cloning the ts.SourceFile is expensive as the nodes in have parent pointers,\n // i.e. we would also need to clone and adjust all nodes.\n let originalReferencedFiles: ReadonlyArray<ts.FileReference> =\n (sf as any).originalReferencedFiles;\n if (!originalReferencedFiles) {\n originalReferencedFiles = sf.referencedFiles;\n (sf as any).originalReferencedFiles = originalReferencedFiles;\n }\n const newReferencedFiles = [...originalReferencedFiles];\n genFileNames.forEach(gf => newReferencedFiles.push({fileName: gf, pos: 0, end: 0}));\n sf.referencedFiles = newReferencedFiles;\n}\n\nexport function getOriginalReferences(sourceFile: ts.SourceFile): ts.FileReference[]|undefined {\n return sourceFile && (sourceFile as any).originalReferencedFiles;\n}\n\nfunction dotRelative(from: string, to: string): string {\n const rPath: string = path.relative(from, to).replace(/\\\\/g, '/');\n return rPath.startsWith('.') ? rPath : './' + rPath;\n}\n\n/**\n * Moves the path into `genDir` folder while preserving the `node_modules` directory.\n */\nfunction getPackageName(filePath: string): string|null {\n const match = NODE_MODULES_PACKAGE_NAME.exec(filePath);\n return match ? match[1] : null;\n}\n\nfunction stripNodeModulesPrefix(filePath: string): string {\n return filePath.replace(/.*node_modules\\//, '');\n}\n\nfunction getNodeModulesPrefix(filePath: string): string|null {\n const match = /.*node_modules\\//.exec(filePath);\n return match ? match[1] : null;\n}\n\nfunction stripNgResourceSuffix(fileName: string): string {\n return fileName.replace(/\\.\\$ngresource\\$.*/, '');\n}\n\nfunction addNgResourceSuffix(fileName: string): string {\n return `${fileName}.$ngresource$`;\n}\n"]}
1
+ {"version":3,"file":"compiler_host.js","sourceRoot":"","sources":["../../../../../packages/compiler-cli/src/transformers/compiler_host.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,8CAAuL;AACvL,2BAA6B;AAC7B,+BAAiC;AAMjC,qDAA8F;AAC9F,+BAA6E;AAE7E,IAAM,yBAAyB,GAAG,6CAA6C,CAAC;AAChF,IAAM,GAAG,GAAG,kCAAkC,CAAC;AAE/C,4BACI,EACwD;QADvD,oBAAO,EAAE,cAA6C,EAA7C,kEAA6C;IAEzD,MAAM,CAAC,MAA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E,CAAC,CAAC;AACpD,CAAC;AAED,6BAA6B,QAAgB;IAC3C,MAAM,CAAI,QAAQ,kBAAe,CAAC;AACpC,CAAC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AotCompilerHost, EmitterVisitorContext, ExternalReference, GeneratedFile, ParseSourceSpan, TypeScriptEmitter, collectExternalReferences, syntaxError} from '@angular/compiler';\nimport * as path from 'path';\nimport * as ts from 'typescript';\n\nimport {TypeCheckHost} from '../diagnostics/translate_diagnostics';\nimport {METADATA_VERSION, ModuleMetadata} from '../metadata/index';\n\nimport {CompilerHost, CompilerOptions, LibrarySummary} from './api';\nimport {MetadataReaderHost, createMetadataReaderCache, readMetadata} from './metadata_reader';\nimport {DTS, GENERATED_FILES, isInRootDir, relativeToRootDirs} from './util';\n\nconst NODE_MODULES_PACKAGE_NAME = /node_modules\\/((\\w|-)+|(@(\\w|-)+\\/(\\w|-)+))/;\nconst EXT = /(\\.ts|\\.d\\.ts|\\.js|\\.jsx|\\.tsx)$/;\n\nexport function createCompilerHost(\n {options, tsHost = ts.createCompilerHost(options, true)}:\n {options: CompilerOptions, tsHost?: ts.CompilerHost}): CompilerHost {\n return tsHost;\n}\n\nexport interface MetadataProvider {\n getMetadata(sourceFile: ts.SourceFile): ModuleMetadata|undefined;\n}\n\ninterface GenSourceFile {\n externalReferences: Set<string>;\n sourceFile: ts.SourceFile;\n emitCtx: EmitterVisitorContext;\n}\n\nexport interface CodeGenerator {\n generateFile(genFileName: string, baseFileName?: string): GeneratedFile;\n findGeneratedFileNames(fileName: string): string[];\n}\n\nfunction assert<T>(condition: T | null | undefined) {\n if (!condition) {\n // TODO(chuckjaz): do the right thing\n }\n return condition !;\n}\n\n/**\n * Implements the following hosts based on an api.CompilerHost:\n * - ts.CompilerHost to be consumed by a ts.Program\n * - AotCompilerHost for @angular/compiler\n * - TypeCheckHost for mapping ts errors to ng errors (via translateDiagnostics)\n */\nexport class TsCompilerAotCompilerTypeCheckHostAdapter implements ts.CompilerHost, AotCompilerHost,\n TypeCheckHost {\n private metadataReaderCache = createMetadataReaderCache();\n private flatModuleIndexCache = new Map<string, boolean>();\n private flatModuleIndexNames = new Set<string>();\n private flatModuleIndexRedirectNames = new Set<string>();\n private rootDirs: string[];\n private moduleResolutionCache: ts.ModuleResolutionCache;\n private originalSourceFiles = new Map<string, ts.SourceFile|null>();\n private originalFileExistsCache = new Map<string, boolean>();\n private generatedSourceFiles = new Map<string, GenSourceFile>();\n private generatedCodeFor = new Map<string, string[]>();\n private emitter = new TypeScriptEmitter();\n private metadataReaderHost: MetadataReaderHost;\n\n getCancellationToken: () => ts.CancellationToken;\n getDefaultLibLocation: () => string;\n trace: (s: string) => void;\n getDirectories: (path: string) => string[];\n directoryExists?: (directoryName: string) => boolean;\n\n constructor(\n private rootFiles: ReadonlyArray<string>, private options: CompilerOptions,\n private context: CompilerHost, private metadataProvider: MetadataProvider,\n private codeGenerator: CodeGenerator,\n private librarySummaries = new Map<string, LibrarySummary>()) {\n this.moduleResolutionCache = ts.createModuleResolutionCache(\n this.context.getCurrentDirectory !(), this.context.getCanonicalFileName.bind(this.context));\n const basePath = this.options.basePath !;\n this.rootDirs =\n (this.options.rootDirs || [this.options.basePath !]).map(p => path.resolve(basePath, p));\n if (context.getDirectories) {\n this.getDirectories = path => context.getDirectories !(path);\n }\n if (context.directoryExists) {\n this.directoryExists = directoryName => context.directoryExists !(directoryName);\n }\n if (context.getCancellationToken) {\n this.getCancellationToken = () => context.getCancellationToken !();\n }\n if (context.getDefaultLibLocation) {\n this.getDefaultLibLocation = () => context.getDefaultLibLocation !();\n }\n if (context.trace) {\n this.trace = s => context.trace !(s);\n }\n if (context.fileNameToModuleName) {\n this.fileNameToModuleName = context.fileNameToModuleName.bind(context);\n }\n // Note: don't copy over context.moduleNameToFileName as we first\n // normalize undefined containingFile to a filled containingFile.\n if (context.resourceNameToFileName) {\n this.resourceNameToFileName = context.resourceNameToFileName.bind(context);\n }\n if (context.toSummaryFileName) {\n this.toSummaryFileName = context.toSummaryFileName.bind(context);\n }\n if (context.fromSummaryFileName) {\n this.fromSummaryFileName = context.fromSummaryFileName.bind(context);\n }\n this.metadataReaderHost = {\n cacheMetadata: () => true,\n getSourceFileMetadata: (filePath) => {\n const sf = this.getOriginalSourceFile(filePath);\n return sf ? this.metadataProvider.getMetadata(sf) : undefined;\n },\n fileExists: (filePath) => this.originalFileExists(filePath),\n readFile: (filePath) => assert(this.context.readFile(filePath)),\n };\n }\n\n private resolveModuleName(moduleName: string, containingFile: string): ts.ResolvedModule\n |undefined {\n const rm = ts.resolveModuleName(\n moduleName, containingFile.replace(/\\\\/g, '/'), this.options, this,\n this.moduleResolutionCache)\n .resolvedModule;\n if (rm && this.isSourceFile(rm.resolvedFileName) && DTS.test(rm.resolvedFileName)) {\n // Case: generateCodeForLibraries = true and moduleName is\n // a .d.ts file in a node_modules folder.\n // Need to set isExternalLibraryImport to false so that generated files for that file\n // are emitted.\n rm.isExternalLibraryImport = false;\n }\n return rm;\n }\n\n // Note: We implement this method so that TypeScript and Angular share the same\n // ts.ModuleResolutionCache\n // and that we can tell ts.Program about our different opinion about\n // ResolvedModule.isExternalLibraryImport\n // (see our isSourceFile method).\n resolveModuleNames(moduleNames: string[], containingFile: string): ts.ResolvedModule[] {\n // TODO(tbosch): this seems to be a typing error in TypeScript,\n // as it contains assertions that the result contains the same number of entries\n // as the given module names.\n return <ts.ResolvedModule[]>moduleNames.map(\n moduleName => this.resolveModuleName(moduleName, containingFile));\n }\n\n moduleNameToFileName(m: string, containingFile?: string): string|null {\n if (!containingFile) {\n if (m.indexOf('.') === 0) {\n throw new Error('Resolution of relative paths requires a containing file.');\n }\n // Any containing file gives the same result for absolute imports\n containingFile = this.rootFiles[0];\n }\n if (this.context.moduleNameToFileName) {\n return this.context.moduleNameToFileName(m, containingFile);\n }\n const resolved = this.resolveModuleName(m, containingFile);\n return resolved ? resolved.resolvedFileName : null;\n }\n\n /**\n * We want a moduleId that will appear in import statements in the generated code\n * which will be written to `containingFile`.\n *\n * Note that we also generate files for files in node_modules, as libraries\n * only ship .metadata.json files but not the generated code.\n *\n * Logic:\n * 1. if the importedFile and the containingFile are from the project sources\n * or from the same node_modules package, use a relative path\n * 2. if the importedFile is in a node_modules package,\n * use a path that starts with the package name.\n * 3. Error if the containingFile is in the node_modules package\n * and the importedFile is in the project soures,\n * as that is a violation of the principle that node_modules packages cannot\n * import project sources.\n */\n fileNameToModuleName(importedFile: string, containingFile: string): string {\n const originalImportedFile = importedFile;\n if (this.options.traceResolution) {\n console.error(\n 'fileNameToModuleName from containingFile', containingFile, 'to importedFile',\n importedFile);\n }\n\n // drop extension\n importedFile = importedFile.replace(EXT, '');\n const importedFilePackagName = getPackageName(importedFile);\n const containingFilePackageName = getPackageName(containingFile);\n\n let moduleName: string;\n if (importedFilePackagName === containingFilePackageName ||\n GENERATED_FILES.test(originalImportedFile)) {\n const rootedContainingFile = relativeToRootDirs(containingFile, this.rootDirs);\n const rootedImportedFile = relativeToRootDirs(importedFile, this.rootDirs);\n\n if (rootedContainingFile !== containingFile && rootedImportedFile !== importedFile) {\n // if both files are contained in the `rootDirs`, then strip the rootDirs\n containingFile = rootedContainingFile;\n importedFile = rootedImportedFile;\n }\n moduleName = dotRelative(path.dirname(containingFile), importedFile);\n } else if (importedFilePackagName) {\n moduleName = stripNodeModulesPrefix(importedFile);\n } else {\n throw new Error(\n `Trying to import a source file from a node_modules package: import ${originalImportedFile} from ${containingFile}`);\n }\n return moduleName;\n }\n\n resourceNameToFileName(resourceName: string, containingFile: string): string|null {\n // Note: we convert package paths into relative paths to be compatible with the the\n // previous implementation of UrlResolver.\n const firstChar = resourceName[0];\n if (firstChar === '/') {\n resourceName = resourceName.slice(1);\n } else if (firstChar !== '.') {\n resourceName = `./${resourceName}`;\n }\n const filePathWithNgResource =\n this.moduleNameToFileName(addNgResourceSuffix(resourceName), containingFile);\n const result = filePathWithNgResource ? stripNgResourceSuffix(filePathWithNgResource) : null;\n // Used under Bazel to report more specific error with remediation advice\n if (!result && (this.context as any).reportMissingResource) {\n (this.context as any).reportMissingResource(resourceName);\n }\n return result;\n }\n\n toSummaryFileName(fileName: string, referringSrcFileName: string): string {\n return this.fileNameToModuleName(fileName, referringSrcFileName);\n }\n\n fromSummaryFileName(fileName: string, referringLibFileName: string): string {\n const resolved = this.moduleNameToFileName(fileName, referringLibFileName);\n if (!resolved) {\n throw new Error(`Could not resolve ${fileName} from ${referringLibFileName}`);\n }\n return resolved;\n }\n\n parseSourceSpanOf(fileName: string, line: number, character: number): ParseSourceSpan|null {\n const data = this.generatedSourceFiles.get(fileName);\n if (data && data.emitCtx) {\n return data.emitCtx.spanOf(line, character);\n }\n return null;\n }\n\n private getOriginalSourceFile(\n filePath: string, languageVersion?: ts.ScriptTarget,\n onError?: ((message: string) => void)|undefined): ts.SourceFile|null {\n // Note: we need the explicit check via `has` as we also cache results\n // that were null / undefined.\n if (this.originalSourceFiles.has(filePath)) {\n return this.originalSourceFiles.get(filePath) !;\n }\n if (!languageVersion) {\n languageVersion = this.options.target || ts.ScriptTarget.Latest;\n }\n // Note: This can also return undefined,\n // as the TS typings are not correct!\n const sf = this.context.getSourceFile(filePath, languageVersion, onError) || null;\n this.originalSourceFiles.set(filePath, sf);\n return sf;\n }\n\n updateGeneratedFile(genFile: GeneratedFile): ts.SourceFile {\n if (!genFile.stmts) {\n throw new Error(\n `Invalid Argument: Expected a GenerateFile with statements. ${genFile.genFileUrl}`);\n }\n const oldGenFile = this.generatedSourceFiles.get(genFile.genFileUrl);\n if (!oldGenFile) {\n throw new Error(`Illegal State: previous GeneratedFile not found for ${genFile.genFileUrl}.`);\n }\n const newRefs = genFileExternalReferences(genFile);\n const oldRefs = oldGenFile.externalReferences;\n let refsAreEqual = oldRefs.size === newRefs.size;\n if (refsAreEqual) {\n newRefs.forEach(r => refsAreEqual = refsAreEqual && oldRefs.has(r));\n }\n if (!refsAreEqual) {\n throw new Error(\n `Illegal State: external references changed in ${genFile.genFileUrl}.\\nOld: ${Array.from(oldRefs)}.\\nNew: ${Array.from(newRefs)}`);\n }\n return this.addGeneratedFile(genFile, newRefs);\n }\n\n private addGeneratedFile(genFile: GeneratedFile, externalReferences: Set<string>): ts.SourceFile {\n if (!genFile.stmts) {\n throw new Error(\n `Invalid Argument: Expected a GenerateFile with statements. ${genFile.genFileUrl}`);\n }\n const {sourceText, context} = this.emitter.emitStatementsAndContext(\n genFile.genFileUrl, genFile.stmts, /* preamble */ '',\n /* emitSourceMaps */ false);\n const sf = ts.createSourceFile(\n genFile.genFileUrl, sourceText, this.options.target || ts.ScriptTarget.Latest);\n if ((this.options.module === ts.ModuleKind.AMD || this.options.module === ts.ModuleKind.UMD) &&\n this.context.amdModuleName) {\n const moduleName = this.context.amdModuleName(sf);\n if (moduleName) sf.moduleName = moduleName;\n }\n this.generatedSourceFiles.set(genFile.genFileUrl, {\n sourceFile: sf,\n emitCtx: context, externalReferences,\n });\n return sf;\n }\n\n shouldGenerateFile(fileName: string): {generate: boolean, baseFileName?: string} {\n // TODO(tbosch): allow generating files that are not in the rootDir\n // See https://github.com/angular/angular/issues/19337\n if (!isInRootDir(fileName, this.options)) {\n return {generate: false};\n }\n const genMatch = GENERATED_FILES.exec(fileName);\n if (!genMatch) {\n return {generate: false};\n }\n const [, base, genSuffix, suffix] = genMatch;\n if (suffix !== 'ts' && suffix !== 'tsx') {\n return {generate: false};\n }\n let baseFileName: string|undefined;\n if (genSuffix.indexOf('ngstyle') >= 0) {\n // Note: ngstyle files have names like `afile.css.ngstyle.ts`\n if (!this.originalFileExists(base)) {\n return {generate: false};\n }\n } else {\n // Note: on-the-fly generated files always have a `.ts` suffix,\n // but the file from which we generated it can be a `.ts`/ `.tsx`/ `.d.ts`\n // (see options.generateCodeForLibraries).\n baseFileName = [`${base}.ts`, `${base}.tsx`, `${base}.d.ts`].find(\n baseFileName => this.isSourceFile(baseFileName) && this.originalFileExists(baseFileName));\n if (!baseFileName) {\n return {generate: false};\n }\n }\n return {generate: true, baseFileName};\n }\n\n shouldGenerateFilesFor(fileName: string) {\n // TODO(tbosch): allow generating files that are not in the rootDir\n // See https://github.com/angular/angular/issues/19337\n return !GENERATED_FILES.test(fileName) && this.isSourceFile(fileName) &&\n isInRootDir(fileName, this.options);\n }\n\n getSourceFile(\n fileName: string, languageVersion: ts.ScriptTarget,\n onError?: ((message: string) => void)|undefined): ts.SourceFile {\n // Note: Don't exit early in this method to make sure\n // we always have up to date references on the file!\n let genFileNames: string[] = [];\n let sf = this.getGeneratedFile(fileName);\n if (!sf) {\n const summary = this.librarySummaries.get(fileName);\n if (summary) {\n if (!summary.sourceFile) {\n summary.sourceFile = ts.createSourceFile(\n fileName, summary.text, this.options.target || ts.ScriptTarget.Latest);\n }\n sf = summary.sourceFile;\n genFileNames = [];\n }\n }\n if (!sf) {\n sf = this.getOriginalSourceFile(fileName);\n const cachedGenFiles = this.generatedCodeFor.get(fileName);\n if (cachedGenFiles) {\n genFileNames = cachedGenFiles;\n } else {\n if (!this.options.noResolve && this.shouldGenerateFilesFor(fileName)) {\n genFileNames = this.codeGenerator.findGeneratedFileNames(fileName).filter(\n fileName => this.shouldGenerateFile(fileName).generate);\n }\n this.generatedCodeFor.set(fileName, genFileNames);\n }\n }\n if (sf) {\n addReferencesToSourceFile(sf, genFileNames);\n }\n // TODO(tbosch): TypeScript's typings for getSourceFile are incorrect,\n // as it can very well return undefined.\n return sf !;\n }\n\n private getGeneratedFile(fileName: string): ts.SourceFile|null {\n const genSrcFile = this.generatedSourceFiles.get(fileName);\n if (genSrcFile) {\n return genSrcFile.sourceFile;\n }\n const {generate, baseFileName} = this.shouldGenerateFile(fileName);\n if (generate) {\n const genFile = this.codeGenerator.generateFile(fileName, baseFileName);\n return this.addGeneratedFile(genFile, genFileExternalReferences(genFile));\n }\n return null;\n }\n\n private originalFileExists(fileName: string): boolean {\n let fileExists = this.originalFileExistsCache.get(fileName);\n if (fileExists == null) {\n fileExists = this.context.fileExists(fileName);\n this.originalFileExistsCache.set(fileName, fileExists);\n }\n return fileExists;\n }\n\n fileExists(fileName: string): boolean {\n fileName = stripNgResourceSuffix(fileName);\n if (this.librarySummaries.has(fileName) || this.generatedSourceFiles.has(fileName)) {\n return true;\n }\n if (this.shouldGenerateFile(fileName).generate) {\n return true;\n }\n return this.originalFileExists(fileName);\n }\n\n loadSummary(filePath: string): string|null {\n const summary = this.librarySummaries.get(filePath);\n if (summary) {\n return summary.text;\n }\n if (this.originalFileExists(filePath)) {\n return assert(this.context.readFile(filePath));\n }\n return null;\n }\n\n isSourceFile(filePath: string): boolean {\n // Don't generate any files nor typecheck them\n // if skipTemplateCodegen is set and fullTemplateTypeCheck is not yet set,\n // for backwards compatibility.\n if (this.options.skipTemplateCodegen && !this.options.fullTemplateTypeCheck) {\n return false;\n }\n // If we have a summary from a previous compilation,\n // treat the file never as a source file.\n if (this.librarySummaries.has(filePath)) {\n return false;\n }\n if (GENERATED_FILES.test(filePath)) {\n return false;\n }\n if (this.options.generateCodeForLibraries === false && DTS.test(filePath)) {\n return false;\n }\n if (DTS.test(filePath)) {\n // Check for a bundle index.\n if (this.hasBundleIndex(filePath)) {\n const normalFilePath = path.normalize(filePath);\n return this.flatModuleIndexNames.has(normalFilePath) ||\n this.flatModuleIndexRedirectNames.has(normalFilePath);\n }\n }\n return true;\n }\n\n readFile(fileName: string) {\n const summary = this.librarySummaries.get(fileName);\n if (summary) {\n return summary.text;\n }\n return this.context.readFile(fileName);\n }\n\n getMetadataFor(filePath: string): ModuleMetadata[]|undefined {\n return readMetadata(filePath, this.metadataReaderHost, this.metadataReaderCache);\n }\n\n loadResource(filePath: string): Promise<string>|string {\n if (this.context.readResource) return this.context.readResource(filePath);\n if (!this.originalFileExists(filePath)) {\n throw syntaxError(`Error: Resource file not found: ${filePath}`);\n }\n return assert(this.context.readFile(filePath));\n }\n\n getOutputName(filePath: string): string {\n return path.relative(this.getCurrentDirectory(), filePath);\n }\n\n private hasBundleIndex(filePath: string): boolean {\n const checkBundleIndex = (directory: string): boolean => {\n let result = this.flatModuleIndexCache.get(directory);\n if (result == null) {\n if (path.basename(directory) == 'node_module') {\n // Don't look outside the node_modules this package is installed in.\n result = false;\n } else {\n // A bundle index exists if the typings .d.ts file has a metadata.json that has an\n // importAs.\n try {\n const packageFile = path.join(directory, 'package.json');\n if (this.originalFileExists(packageFile)) {\n // Once we see a package.json file, assume false until it we find the bundle index.\n result = false;\n const packageContent: any = JSON.parse(assert(this.context.readFile(packageFile)));\n if (packageContent.typings) {\n const typings = path.normalize(path.join(directory, packageContent.typings));\n if (DTS.test(typings)) {\n const metadataFile = typings.replace(DTS, '.metadata.json');\n if (this.originalFileExists(metadataFile)) {\n const metadata = JSON.parse(assert(this.context.readFile(metadataFile)));\n if (metadata.flatModuleIndexRedirect) {\n this.flatModuleIndexRedirectNames.add(typings);\n // Note: don't set result = true,\n // as this would mark this folder\n // as having a bundleIndex too early without\n // filling the bundleIndexNames.\n } else if (metadata.importAs) {\n this.flatModuleIndexNames.add(typings);\n result = true;\n }\n }\n }\n }\n } else {\n const parent = path.dirname(directory);\n if (parent != directory) {\n // Try the parent directory.\n result = checkBundleIndex(parent);\n } else {\n result = false;\n }\n }\n } catch (e) {\n // If we encounter any errors assume we this isn't a bundle index.\n result = false;\n }\n }\n this.flatModuleIndexCache.set(directory, result);\n }\n return result;\n };\n\n return checkBundleIndex(path.dirname(filePath));\n }\n\n getDefaultLibFileName = (options: ts.CompilerOptions) =>\n this.context.getDefaultLibFileName(options)\n getCurrentDirectory = () => this.context.getCurrentDirectory();\n getCanonicalFileName = (fileName: string) => this.context.getCanonicalFileName(fileName);\n useCaseSensitiveFileNames = () => this.context.useCaseSensitiveFileNames();\n getNewLine = () => this.context.getNewLine();\n // Make sure we do not `host.realpath()` from TS as we do not want to resolve symlinks.\n // https://github.com/Microsoft/TypeScript/issues/9552\n realPath = (p: string) => p;\n writeFile = this.context.writeFile.bind(this.context);\n}\n\nfunction genFileExternalReferences(genFile: GeneratedFile): Set<string> {\n return new Set(collectExternalReferences(genFile.stmts !).map(er => er.moduleName !));\n}\n\nfunction addReferencesToSourceFile(sf: ts.SourceFile, genFileNames: string[]) {\n // Note: as we modify ts.SourceFiles we need to keep the original\n // value for `referencedFiles` around in cache the original host is caching ts.SourceFiles.\n // Note: cloning the ts.SourceFile is expensive as the nodes in have parent pointers,\n // i.e. we would also need to clone and adjust all nodes.\n let originalReferencedFiles: ReadonlyArray<ts.FileReference> =\n (sf as any).originalReferencedFiles;\n if (!originalReferencedFiles) {\n originalReferencedFiles = sf.referencedFiles;\n (sf as any).originalReferencedFiles = originalReferencedFiles;\n }\n const newReferencedFiles = [...originalReferencedFiles];\n genFileNames.forEach(gf => newReferencedFiles.push({fileName: gf, pos: 0, end: 0}));\n sf.referencedFiles = newReferencedFiles;\n}\n\nexport function getOriginalReferences(sourceFile: ts.SourceFile): ts.FileReference[]|undefined {\n return sourceFile && (sourceFile as any).originalReferencedFiles;\n}\n\nfunction dotRelative(from: string, to: string): string {\n const rPath: string = path.relative(from, to).replace(/\\\\/g, '/');\n return rPath.startsWith('.') ? rPath : './' + rPath;\n}\n\n/**\n * Moves the path into `genDir` folder while preserving the `node_modules` directory.\n */\nfunction getPackageName(filePath: string): string|null {\n const match = NODE_MODULES_PACKAGE_NAME.exec(filePath);\n return match ? match[1] : null;\n}\n\nfunction stripNodeModulesPrefix(filePath: string): string {\n return filePath.replace(/.*node_modules\\//, '');\n}\n\nfunction getNodeModulesPrefix(filePath: string): string|null {\n const match = /.*node_modules\\//.exec(filePath);\n return match ? match[1] : null;\n}\n\nfunction stripNgResourceSuffix(fileName: string): string {\n return fileName.replace(/\\.\\$ngresource\\$.*/, '');\n}\n\nfunction addNgResourceSuffix(fileName: string): string {\n return `${fileName}.$ngresource$`;\n}\n"]}
package/src/version.js CHANGED
@@ -16,5 +16,5 @@ var compiler_1 = require("@angular/compiler");
16
16
  /**
17
17
  * @stable
18
18
  */
19
- exports.VERSION = new compiler_1.Version('5.2.4');
19
+ exports.VERSION = new compiler_1.Version('5.2.5');
20
20
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../packages/compiler-cli/src/version.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH;;;;GAIG;AAEH,8CAA0C;AAC1C;;GAEG;AACU,QAAA,OAAO,GAAG,IAAI,kBAAO,CAAC,mBAAmB,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/compiler';\n/**\n * @stable\n */\nexport const VERSION = new Version('5.2.4');\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../packages/compiler-cli/src/version.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH;;;;GAIG;AAEH,8CAA0C;AAC1C;;GAEG;AACU,QAAA,OAAO,GAAG,IAAI,kBAAO,CAAC,mBAAmB,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/compiler';\n/**\n * @stable\n */\nexport const VERSION = new Version('5.2.5');\n"]}