@angular/compiler-cli
Advanced tools
| import 'reflect-metadata'; | ||
| export declare function main(args: string[], consoleError?: (s: string) => void): number; |
| #!/usr/bin/env node | ||
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| require("reflect-metadata"); | ||
| var ts = require("typescript"); | ||
| var main_1 = require("../main"); | ||
| var bundle_index_host_1 = require("./bundle_index_host"); | ||
| var ng = require("../transformers/entry_points"); | ||
| function main(args, consoleError) { | ||
| if (consoleError === void 0) { consoleError = console.error; } | ||
| var _a = main_1.readCommandLineAndConfiguration(args), options = _a.options, rootNames = _a.rootNames; | ||
| var host = ng.createCompilerHost({ options: options }); | ||
| var _b = bundle_index_host_1.createBundleIndexHost(options, rootNames, host), bundleHost = _b.host, indexName = _b.indexName, errors = _b.errors; | ||
| if (!indexName) { | ||
| console.error('Did not find an index.ts in the top-level of the package.'); | ||
| return 1; | ||
| } | ||
| // The index file is synthetic, so we have to add it to the program after parsing the tsconfig | ||
| rootNames.push(indexName); | ||
| var program = ts.createProgram(rootNames, options, bundleHost); | ||
| var indexSourceFile = program.getSourceFile(indexName); | ||
| if (!indexSourceFile) { | ||
| console.error(indexSourceFile + " is not in the program. Please file a bug."); | ||
| return 1; | ||
| } | ||
| program.emit(indexSourceFile); | ||
| return 0; | ||
| } | ||
| exports.main = main; | ||
| // CLI entry point | ||
| if (require.main === module) { | ||
| var args = process.argv.slice(2); | ||
| process.exitCode = main(args); | ||
| } | ||
| //# sourceMappingURL=bundle_index_main.js.map |
| {"version":3,"file":"bundle_index_main.js","sourceRoot":"","sources":["../../../../../packages/compiler-cli/src/metadata/bundle_index_main.ts"],"names":[],"mappings":";;;AAUA,4BAA0B;AAE1B,+BAAiC;AAEjC,gCAAwD;AACxD,yDAA0D;AAC1D,iDAAmD;AAEnD,cAAqB,IAAc,EAAE,YAAiD;IAAjD,6BAAA,EAAA,eAAoC,OAAO,CAAC,KAAK;IAC9E,IAAA,iDAA4D,EAA3D,oBAAO,EAAE,wBAAS,CAA0C;IACnE,IAAM,IAAI,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAC,OAAO,SAAA,EAAC,CAAC,CAAC;IACxC,IAAA,wEAAuF,EAAtF,oBAAgB,EAAE,wBAAS,EAAE,kBAAM,CAAoD;IAC9F,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;QAC3E,MAAM,CAAC,CAAC,CAAC;IACX,CAAC;IACD,8FAA8F;IAC9F,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1B,IAAM,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IACjE,IAAM,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACzD,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;QACrB,OAAO,CAAC,KAAK,CAAI,eAAe,+CAA4C,CAAC,CAAC;QAC9E,MAAM,CAAC,CAAC,CAAC;IACX,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC9B,MAAM,CAAC,CAAC,CAAC;AACX,CAAC;AAlBD,oBAkBC;AAED,kBAAkB;AAClB,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC;IAC5B,IAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC","sourcesContent":["#!/usr/bin/env node\n/**\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// Must be imported first, because Angular decorators throw on load.\nimport 'reflect-metadata';\n\nimport * as ts from 'typescript';\nimport * as path from 'path';\nimport {readCommandLineAndConfiguration} from '../main';\nimport {createBundleIndexHost} from './bundle_index_host';\nimport * as ng from '../transformers/entry_points';\n\nexport function main(args: string[], consoleError: (s: string) => void = console.error): number {\n const {options, rootNames} = readCommandLineAndConfiguration(args);\n const host = ng.createCompilerHost({options});\n const {host: bundleHost, indexName, errors} = createBundleIndexHost(options, rootNames, host);\n if (!indexName) {\n console.error('Did not find an index.ts in the top-level of the package.');\n return 1;\n }\n // The index file is synthetic, so we have to add it to the program after parsing the tsconfig\n rootNames.push(indexName);\n const program = ts.createProgram(rootNames, options, bundleHost);\n const indexSourceFile = program.getSourceFile(indexName);\n if (!indexSourceFile) {\n console.error(`${indexSourceFile} is not in the program. Please file a bug.`);\n return 1;\n }\n program.emit(indexSourceFile);\n return 0;\n}\n\n// CLI entry point\nif (require.main === module) {\n const args = process.argv.slice(2);\n process.exitCode = main(args);\n}\n"]} |
+3
-3
| { | ||
| "name": "@angular/compiler-cli", | ||
| "version": "5.2.5", | ||
| "version": "5.2.6", | ||
| "description": "Angular - the compiler CLI for Node.js", | ||
@@ -14,3 +14,3 @@ "main": "index.js", | ||
| "minimist": "^1.2.0", | ||
| "tsickle": "^0.26.0", | ||
| "tsickle": "^0.27.2", | ||
| "chokidar": "^1.4.2" | ||
@@ -20,3 +20,3 @@ }, | ||
| "typescript": ">=2.4.2 <2.7", | ||
| "@angular/compiler": "5.2.5" | ||
| "@angular/compiler": "5.2.6" | ||
| }, | ||
@@ -23,0 +23,0 @@ "repository": { |
@@ -500,2 +500,4 @@ "use strict"; | ||
| CompilerHostAdapter.prototype.getMetadataFor = function (fileName) { | ||
| if (!this.host.fileExists(fileName + '.ts')) | ||
| return undefined; | ||
| var sourceFile = this.host.getSourceFile(fileName + '.ts', ts.ScriptTarget.Latest); | ||
@@ -502,0 +504,0 @@ return sourceFile && this.collector.getMetadata(sourceFile); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"bundler.js","sourceRoot":"","sources":["../../../../../packages/compiler-cli/src/metadata/bund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IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACxD,4EAA4E;YAC5E,UAAU,GAAG,MAAI,IAAI,CAAC,GAAG,GAAG,UAAY,CAAC;QAC3C,CAAC;QACD,oFAAoF;QACpF,kDAAkD;QAClD,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;IACD,MAAM,CAAC,UAAU,CAAC;AACpB,CAAC;AAED,qBAAqB,CAAM;IACzB,MAAM,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,UAAU,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC;AAC1E,CAAC;AAED,uBAAuB,MAAc;IACnC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAC3E,CAAC;AAED,8BAA8B,MAAc;IAC1C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACxE,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 */\nimport * as path from 'path';\nimport * as ts from 'typescript';\n\nimport {MetadataCollector} from '../metadata/collector';\nimport {ClassMetadata, ConstructorMetadata, FunctionMetadata, METADATA_VERSION, MemberMetadata, MetadataEntry, MetadataError, MetadataImportedSymbolReferenceExpression, MetadataMap, MetadataObject, MetadataSymbolicExpression, MetadataSymbolicReferenceExpression, MetadataValue, MethodMetadata, ModuleExportMetadata, ModuleMetadata, isClassMetadata, isConstructorMetadata, isFunctionMetadata, isInterfaceMetadata, isMetadataError, isMetadataGlobalReferenceExpression, isMetadataImportedSymbolReferenceExpression, isMetadataModuleReferenceExpression, isMetadataSymbolicExpression, isMethodMetadata} from '../metadata/schema';\n\n\n\n// The character set used to produce private names.\nconst PRIVATE_NAME_CHARS = 'abcdefghijklmnopqrstuvwxyz';\n\ninterface Symbol {\n module: string;\n name: string;\n\n // Produced by indirectly by exportAll() for symbols re-export another symbol.\n exports?: Symbol;\n\n // Produced by indirectly by exportAll() for symbols are re-exported by another symbol.\n reexportedAs?: Symbol;\n\n // Produced by canonicalizeSymbols() for all symbols. A symbol is private if it is not\n // exported by the index.\n isPrivate?: boolean;\n\n // Produced by canonicalizeSymbols() for all symbols. This is the one symbol that\n // respresents all other symbols and is the only symbol that, among all the re-exported\n // aliases, whose fields can be trusted to contain the correct information.\n // For private symbols this is the declaration symbol. For public symbols this is the\n // symbol that is exported.\n canonicalSymbol?: Symbol;\n\n // Produced by canonicalizeSymbols() for all symbols. This the symbol that originally\n // declared the value and should be used to fetch the value.\n declaration?: Symbol;\n\n // A symbol is referenced if it is exported from index or referenced by the value of\n // a referenced symbol's value.\n referenced?: boolean;\n\n // A symbol is marked as a re-export the symbol was rexported from a module that is\n // not part of the flat module bundle.\n reexport?: boolean;\n\n // Only valid for referenced canonical symbols. Produces by convertSymbols().\n value?: MetadataEntry;\n\n // Only valid for referenced private symbols. It is the name to use to import the symbol from\n // the bundle index. Produce by assignPrivateNames();\n privateName?: string;\n}\n\nexport interface BundleEntries { [name: string]: MetadataEntry; }\n\nexport interface BundlePrivateEntry {\n privateName: string;\n name: string;\n module: string;\n}\n\nexport interface BundledModule {\n metadata: ModuleMetadata;\n privates: BundlePrivateEntry[];\n}\n\nexport interface MetadataBundlerHost {\n getMetadataFor(moduleName: string): ModuleMetadata|undefined;\n}\n\ntype StaticsMetadata = {\n [name: string]: MetadataValue | FunctionMetadata;\n};\n\nexport class MetadataBundler {\n private symbolMap = new Map<string, Symbol>();\n private metadataCache = new Map<string, ModuleMetadata|undefined>();\n private exports = new Map<string, Symbol[]>();\n private rootModule: string;\n private exported: Set<Symbol>;\n\n constructor(\n private root: string, private importAs: string|undefined, private host: MetadataBundlerHost) {\n this.rootModule = `./${path.basename(root)}`;\n }\n\n getMetadataBundle(): BundledModule {\n // Export the root module. This also collects the transitive closure of all values referenced by\n // the exports.\n const exportedSymbols = this.exportAll(this.rootModule);\n this.canonicalizeSymbols(exportedSymbols);\n // TODO: exports? e.g. a module re-exports a symbol from another bundle\n const metadata = this.getEntries(exportedSymbols);\n const privates = Array.from(this.symbolMap.values())\n .filter(s => s.referenced && s.isPrivate)\n .map(s => ({\n privateName: s.privateName !,\n name: s.declaration !.name,\n module: s.declaration !.module\n }));\n const origins = Array.from(this.symbolMap.values())\n .filter(s => s.referenced && !s.reexport)\n .reduce<{[name: string]: string}>((p, s) => {\n p[s.isPrivate ? s.privateName ! : s.name] = s.declaration !.module;\n return p;\n }, {});\n const exports = this.getReExports(exportedSymbols);\n return {\n metadata: {\n __symbolic: 'module',\n version: METADATA_VERSION,\n exports: exports.length ? exports : undefined, metadata, origins,\n importAs: this.importAs !\n },\n privates\n };\n }\n\n static resolveModule(importName: string, from: string): string {\n return resolveModule(importName, from);\n }\n\n private getMetadata(moduleName: string): ModuleMetadata|undefined {\n let result = this.metadataCache.get(moduleName);\n if (!result) {\n if (moduleName.startsWith('.')) {\n const fullModuleName = resolveModule(moduleName, this.root);\n result = this.host.getMetadataFor(fullModuleName);\n }\n this.metadataCache.set(moduleName, result);\n }\n return result;\n }\n\n private exportAll(moduleName: string): Symbol[] {\n const module = this.getMetadata(moduleName);\n let result = this.exports.get(moduleName);\n\n if (result) {\n return result;\n }\n\n result = [];\n\n const exportSymbol = (exportedSymbol: Symbol, exportAs: string) => {\n const symbol = this.symbolOf(moduleName, exportAs);\n result !.push(symbol);\n exportedSymbol.reexportedAs = symbol;\n symbol.exports = exportedSymbol;\n };\n\n // Export all the symbols defined in this module.\n if (module && module.metadata) {\n for (let key in module.metadata) {\n const data = module.metadata[key];\n if (isMetadataImportedSymbolReferenceExpression(data)) {\n // This is a re-export of an imported symbol. Record this as a re-export.\n const exportFrom = resolveModule(data.module, moduleName);\n this.exportAll(exportFrom);\n const symbol = this.symbolOf(exportFrom, data.name);\n exportSymbol(symbol, key);\n } else {\n // Record that this symbol is exported by this module.\n result.push(this.symbolOf(moduleName, key));\n }\n }\n }\n\n // Export all the re-exports from this module\n if (module && module.exports) {\n for (const exportDeclaration of module.exports) {\n const exportFrom = resolveModule(exportDeclaration.from, moduleName);\n // Record all the exports from the module even if we don't use it directly.\n const exportedSymbols = this.exportAll(exportFrom);\n if (exportDeclaration.export) {\n // Re-export all the named exports from a module.\n for (const exportItem of exportDeclaration.export) {\n const name = typeof exportItem == 'string' ? exportItem : exportItem.name;\n const exportAs = typeof exportItem == 'string' ? exportItem : exportItem.as;\n const symbol = this.symbolOf(exportFrom, name);\n if (exportedSymbols && exportedSymbols.length == 1 && exportedSymbols[0].reexport &&\n exportedSymbols[0].name == '*') {\n // This is a named export from a module we have no metadata about. Record the named\n // export as a re-export.\n symbol.reexport = true;\n }\n exportSymbol(this.symbolOf(exportFrom, name), exportAs);\n }\n } else {\n // Re-export all the symbols from the module\n const exportedSymbols = this.exportAll(exportFrom);\n for (const exportedSymbol of exportedSymbols) {\n const name = exportedSymbol.name;\n exportSymbol(exportedSymbol, name);\n }\n }\n }\n }\n\n if (!module) {\n // If no metadata is found for this import then it is considered external to the\n // library and should be recorded as a re-export in the final metadata if it is\n // eventually re-exported.\n const symbol = this.symbolOf(moduleName, '*');\n symbol.reexport = true;\n result.push(symbol);\n }\n this.exports.set(moduleName, result);\n\n return result;\n }\n\n /**\n * Fill in the canonicalSymbol which is the symbol that should be imported by factories.\n * The canonical symbol is the one exported by the index file for the bundle or definition\n * symbol for private symbols that are not exported by bundle index.\n */\n private canonicalizeSymbols(exportedSymbols: Symbol[]) {\n const symbols = Array.from(this.symbolMap.values());\n this.exported = new Set(exportedSymbols);\n symbols.forEach(this.canonicalizeSymbol, this);\n }\n\n private canonicalizeSymbol(symbol: Symbol) {\n const rootExport = getRootExport(symbol);\n const declaration = getSymbolDeclaration(symbol);\n const isPrivate = !this.exported.has(rootExport);\n const canonicalSymbol = isPrivate ? declaration : rootExport;\n symbol.isPrivate = isPrivate;\n symbol.declaration = declaration;\n symbol.canonicalSymbol = canonicalSymbol;\n symbol.reexport = declaration.reexport;\n }\n\n private getEntries(exportedSymbols: Symbol[]): BundleEntries {\n const result: BundleEntries = {};\n\n const exportedNames = new Set(exportedSymbols.map(s => s.name));\n let privateName = 0;\n\n function newPrivateName(): string {\n while (true) {\n let digits: string[] = [];\n let index = privateName++;\n let base = PRIVATE_NAME_CHARS;\n while (!digits.length || index > 0) {\n digits.unshift(base[index % base.length]);\n index = Math.floor(index / base.length);\n }\n digits.unshift('\\u0275');\n const result = digits.join('');\n if (!exportedNames.has(result)) return result;\n }\n }\n\n exportedSymbols.forEach(symbol => this.convertSymbol(symbol));\n\n const symbolsMap = new Map<string, string[]>();\n Array.from(this.symbolMap.values()).forEach(symbol => {\n if (symbol.referenced && !symbol.reexport) {\n let name = symbol.name;\n const identifier = `${symbol.declaration!.module}:${symbol.declaration !.name}`;\n if (symbol.isPrivate && !symbol.privateName) {\n name = newPrivateName();\n symbol.privateName = name;\n }\n if (symbolsMap.has(identifier)) {\n const names = symbolsMap.get(identifier);\n names !.push(name);\n } else {\n symbolsMap.set(identifier, [name]);\n }\n result[name] = symbol.value !;\n }\n });\n\n // check for duplicated entries\n symbolsMap.forEach((names: string[], identifier: string) => {\n if (names.length > 1) {\n const [module, declaredName] = identifier.split(':');\n // prefer the export that uses the declared name (if any)\n let reference = names.indexOf(declaredName);\n if (reference === -1) {\n reference = 0;\n }\n\n // keep one entry and replace the others by references\n names.forEach((name: string, i: number) => {\n if (i !== reference) {\n result[name] = {__symbolic: 'reference', name: names[reference]};\n }\n });\n }\n });\n\n return result;\n }\n\n private getReExports(exportedSymbols: Symbol[]): ModuleExportMetadata[] {\n type ExportClause = {name: string, as: string}[];\n const modules = new Map<string, ExportClause>();\n const exportAlls = new Set<string>();\n for (const symbol of exportedSymbols) {\n if (symbol.reexport) {\n // symbol.declaration is guarenteed to be defined during the phase this method is called.\n const declaration = symbol.declaration !;\n const module = declaration.module;\n if (declaration !.name == '*') {\n // Reexport all the symbols.\n exportAlls.add(declaration.module);\n } else {\n // Re-export the symbol as the exported name.\n let entry = modules.get(module);\n if (!entry) {\n entry = [];\n modules.set(module, entry);\n }\n const as = symbol.name;\n const name = declaration.name;\n entry.push({name, as});\n }\n }\n }\n return [\n ...Array.from(exportAlls.values()).map(from => ({from})),\n ...Array.from(modules.entries()).map(([from, exports]) => ({export: exports, from}))\n ];\n }\n\n private convertSymbol(symbol: Symbol) {\n // canonicalSymbol is ensured to be defined before this is called.\n const canonicalSymbol = symbol.canonicalSymbol !;\n\n if (!canonicalSymbol.referenced) {\n canonicalSymbol.referenced = true;\n // declaration is ensured to be definded before this method is called.\n const declaration = canonicalSymbol.declaration !;\n const module = this.getMetadata(declaration.module);\n if (module) {\n const value = module.metadata[declaration.name];\n if (value && !declaration.name.startsWith('___')) {\n canonicalSymbol.value = this.convertEntry(declaration.module, value);\n }\n }\n }\n }\n\n private convertEntry(moduleName: string, value: MetadataEntry): MetadataEntry {\n if (isClassMetadata(value)) {\n return this.convertClass(moduleName, value);\n }\n if (isFunctionMetadata(value)) {\n return this.convertFunction(moduleName, value);\n }\n if (isInterfaceMetadata(value)) {\n return value;\n }\n return this.convertValue(moduleName, value);\n }\n\n private convertClass(moduleName: string, value: ClassMetadata): ClassMetadata {\n return {\n __symbolic: 'class',\n arity: value.arity,\n extends: this.convertExpression(moduleName, value.extends) !,\n decorators:\n value.decorators && value.decorators.map(d => this.convertExpression(moduleName, d) !),\n members: this.convertMembers(moduleName, value.members !),\n statics: value.statics && this.convertStatics(moduleName, value.statics)\n };\n }\n\n private convertMembers(moduleName: string, members: MetadataMap): MetadataMap {\n const result: MetadataMap = {};\n for (const name in members) {\n const value = members[name];\n result[name] = value.map(v => this.convertMember(moduleName, v));\n }\n return result;\n }\n\n private convertMember(moduleName: string, member: MemberMetadata) {\n const result: MemberMetadata = {__symbolic: member.__symbolic};\n result.decorators =\n member.decorators && member.decorators.map(d => this.convertExpression(moduleName, d) !);\n if (isMethodMetadata(member)) {\n (result as MethodMetadata).parameterDecorators = member.parameterDecorators &&\n member.parameterDecorators.map(\n d => d && d.map(p => this.convertExpression(moduleName, p) !));\n if (isConstructorMetadata(member)) {\n if (member.parameters) {\n (result as ConstructorMetadata).parameters =\n member.parameters.map(p => this.convertExpression(moduleName, p));\n }\n }\n }\n return result;\n }\n\n private convertStatics(moduleName: string, statics: StaticsMetadata): StaticsMetadata {\n let result: StaticsMetadata = {};\n for (const key in statics) {\n const value = statics[key];\n result[key] = isFunctionMetadata(value) ? this.convertFunction(moduleName, value) : value;\n }\n return result;\n }\n\n private convertFunction(moduleName: string, value: FunctionMetadata): FunctionMetadata {\n return {\n __symbolic: 'function',\n parameters: value.parameters,\n defaults: value.defaults && value.defaults.map(v => this.convertValue(moduleName, v)),\n value: this.convertValue(moduleName, value.value)\n };\n }\n\n private convertValue(moduleName: string, value: MetadataValue): MetadataValue {\n if (isPrimitive(value)) {\n return value;\n }\n if (isMetadataError(value)) {\n return this.convertError(moduleName, value);\n }\n if (isMetadataSymbolicExpression(value)) {\n return this.convertExpression(moduleName, value) !;\n }\n if (Array.isArray(value)) {\n return value.map(v => this.convertValue(moduleName, v));\n }\n\n // Otherwise it is a metadata object.\n const object = value as MetadataObject;\n const result: MetadataObject = {};\n for (const key in object) {\n result[key] = this.convertValue(moduleName, object[key]);\n }\n return result;\n }\n\n private convertExpression(\n moduleName: string, value: MetadataSymbolicExpression|MetadataError|null|\n undefined): MetadataSymbolicExpression|MetadataError|undefined|null {\n if (value) {\n switch (value.__symbolic) {\n case 'error':\n return this.convertError(moduleName, value as MetadataError);\n case 'reference':\n return this.convertReference(moduleName, value as MetadataSymbolicReferenceExpression);\n default:\n return this.convertExpressionNode(moduleName, value);\n }\n }\n return value;\n }\n\n private convertError(module: string, value: MetadataError): MetadataError {\n return {\n __symbolic: 'error',\n message: value.message,\n line: value.line,\n character: value.character,\n context: value.context, module\n };\n }\n\n private convertReference(moduleName: string, value: MetadataSymbolicReferenceExpression):\n MetadataSymbolicReferenceExpression|MetadataError|undefined {\n const createReference = (symbol: Symbol): MetadataSymbolicReferenceExpression => {\n const declaration = symbol.declaration !;\n if (declaration.module.startsWith('.')) {\n // Reference to a symbol defined in the module. Ensure it is converted then return a\n // references to the final symbol.\n this.convertSymbol(symbol);\n return {\n __symbolic: 'reference',\n get name() {\n // Resolved lazily because private names are assigned late.\n const canonicalSymbol = symbol.canonicalSymbol !;\n if (canonicalSymbol.isPrivate == null) {\n throw Error('Invalid state: isPrivate was not initialized');\n }\n return canonicalSymbol.isPrivate ? canonicalSymbol.privateName ! : canonicalSymbol.name;\n }\n };\n } else {\n // The symbol was a re-exported symbol from another module. Return a reference to the\n // original imported symbol.\n return {__symbolic: 'reference', name: declaration.name, module: declaration.module};\n }\n };\n\n if (isMetadataGlobalReferenceExpression(value)) {\n const metadata = this.getMetadata(moduleName);\n if (metadata && metadata.metadata && metadata.metadata[value.name]) {\n // Reference to a symbol defined in the module\n return createReference(this.canonicalSymbolOf(moduleName, value.name));\n }\n\n // If a reference has arguments, the arguments need to be converted.\n if (value.arguments) {\n return {\n __symbolic: 'reference',\n name: value.name,\n arguments: value.arguments.map(a => this.convertValue(moduleName, a))\n };\n }\n\n // Global references without arguments (such as to Math or JSON) are unmodified.\n return value;\n }\n\n if (isMetadataImportedSymbolReferenceExpression(value)) {\n // References to imported symbols are separated into two, references to bundled modules and\n // references to modules external to the bundle. If the module reference is relative it is\n // assumed to be in the bundle. If it is Global it is assumed to be outside the bundle.\n // References to symbols outside the bundle are left unmodified. References to symbol inside\n // the bundle need to be converted to a bundle import reference reachable from the bundle\n // index.\n\n if (value.module.startsWith('.')) {\n // Reference is to a symbol defined inside the module. Convert the reference to a reference\n // to the canonical symbol.\n const referencedModule = resolveModule(value.module, moduleName);\n const referencedName = value.name;\n return createReference(this.canonicalSymbolOf(referencedModule, referencedName));\n }\n\n // Value is a reference to a symbol defined outside the module.\n if (value.arguments) {\n // If a reference has arguments the arguments need to be converted.\n return {\n __symbolic: 'reference',\n name: value.name,\n module: value.module,\n arguments: value.arguments.map(a => this.convertValue(moduleName, a))\n };\n }\n return value;\n }\n\n if (isMetadataModuleReferenceExpression(value)) {\n // Cannot support references to bundled modules as the internal modules of a bundle are erased\n // by the bundler.\n if (value.module.startsWith('.')) {\n return {\n __symbolic: 'error',\n message: 'Unsupported bundled module reference',\n context: {module: value.module}\n };\n }\n\n // References to unbundled modules are unmodified.\n return value;\n }\n }\n\n private convertExpressionNode(moduleName: string, value: MetadataSymbolicExpression):\n MetadataSymbolicExpression {\n const result: MetadataSymbolicExpression = { __symbolic: value.__symbolic } as any;\n for (const key in value) {\n (result as any)[key] = this.convertValue(moduleName, (value as any)[key]);\n }\n return result;\n }\n\n private symbolOf(module: string, name: string): Symbol {\n const symbolKey = `${module}:${name}`;\n let symbol = this.symbolMap.get(symbolKey);\n if (!symbol) {\n symbol = {module, name};\n this.symbolMap.set(symbolKey, symbol);\n }\n return symbol;\n }\n\n private canonicalSymbolOf(module: string, name: string): Symbol {\n // Ensure the module has been seen.\n this.exportAll(module);\n const symbol = this.symbolOf(module, name);\n if (!symbol.canonicalSymbol) {\n this.canonicalizeSymbol(symbol);\n }\n return symbol;\n }\n}\n\nexport class CompilerHostAdapter implements MetadataBundlerHost {\n private collector = new MetadataCollector();\n\n constructor(private host: ts.CompilerHost) {}\n\n getMetadataFor(fileName: string): ModuleMetadata|undefined {\n const sourceFile = this.host.getSourceFile(fileName + '.ts', ts.ScriptTarget.Latest);\n return sourceFile && this.collector.getMetadata(sourceFile);\n }\n}\n\nfunction resolveModule(importName: string, from: string): string {\n if (importName.startsWith('.') && from) {\n let normalPath = path.normalize(path.join(path.dirname(from), importName));\n if (!normalPath.startsWith('.') && from.startsWith('.')) {\n // path.normalize() preserves leading '../' but not './'. This adds it back.\n normalPath = `.${path.sep}${normalPath}`;\n }\n // Replace windows path delimiters with forward-slashes. Otherwise the paths are not\n // TypeScript compatible when building the bundle.\n return normalPath.replace(/\\\\/g, '/');\n }\n return importName;\n}\n\nfunction isPrimitive(o: any): o is boolean|string|number {\n return o === null || (typeof o !== 'function' && typeof o !== 'object');\n}\n\nfunction getRootExport(symbol: Symbol): Symbol {\n return symbol.reexportedAs ? getRootExport(symbol.reexportedAs) : symbol;\n}\n\nfunction getSymbolDeclaration(symbol: Symbol): Symbol {\n return symbol.exports ? getSymbolDeclaration(symbol.exports) : symbol;\n}\n"]} | ||
| {"version":3,"file":"bundler.js","sourceRoot":"","sources":["../../../../../packages/compiler-cli/src/metadata/bundler.ts"],"names":[],"mappings":";;AAAA;;;;;;GAMG;AACH,2BAA6B;AAC7B,+BAAiC;AAEjC,mDAAwD;AACxD,6CAA+mB;AAI/mB,mDAAmD;AACnD,IAAM,kBAAkB,GAAG,4BAA4B,CAAC;AAgExD;IAOE,yBACY,IAAY,EAAU,QAA0B,EAAU,IAAyB;QAAnF,SAAI,GAAJ,IAAI,CAAQ;QAAU,aAAQ,GAAR,QAAQ,CAAkB;QAAU,SAAI,GAAJ,IAAI,CAAqB;QAPvF,cAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;QACtC,kBAAa,GAAG,IAAI,GAAG,EAAoC,CAAC;QAC5D,YAAO,GAAG,IAAI,GAAG,EAAoB,CAAC;QAM5C,IAAI,CAAC,UAAU,GAAG,OAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAG,CAAC;IAC/C,CAAC;IAED,2CAAiB,GAAjB;QACE,gGAAgG;QAChG,eAAe;QACf,IAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxD,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;QAC1C,uEAAuE;QACvE,IAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;QAClD,IAAM,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AAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACxE,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 */\nimport * as path from 'path';\nimport * as ts from 'typescript';\n\nimport {MetadataCollector} from '../metadata/collector';\nimport {ClassMetadata, ConstructorMetadata, FunctionMetadata, METADATA_VERSION, MemberMetadata, MetadataEntry, MetadataError, MetadataImportedSymbolReferenceExpression, MetadataMap, MetadataObject, MetadataSymbolicExpression, MetadataSymbolicReferenceExpression, MetadataValue, MethodMetadata, ModuleExportMetadata, ModuleMetadata, isClassMetadata, isConstructorMetadata, isFunctionMetadata, isInterfaceMetadata, isMetadataError, isMetadataGlobalReferenceExpression, isMetadataImportedSymbolReferenceExpression, isMetadataModuleReferenceExpression, isMetadataSymbolicExpression, isMethodMetadata} from '../metadata/schema';\n\n\n\n// The character set used to produce private names.\nconst PRIVATE_NAME_CHARS = 'abcdefghijklmnopqrstuvwxyz';\n\ninterface Symbol {\n module: string;\n name: string;\n\n // Produced by indirectly by exportAll() for symbols re-export another symbol.\n exports?: Symbol;\n\n // Produced by indirectly by exportAll() for symbols are re-exported by another symbol.\n reexportedAs?: Symbol;\n\n // Produced by canonicalizeSymbols() for all symbols. A symbol is private if it is not\n // exported by the index.\n isPrivate?: boolean;\n\n // Produced by canonicalizeSymbols() for all symbols. This is the one symbol that\n // respresents all other symbols and is the only symbol that, among all the re-exported\n // aliases, whose fields can be trusted to contain the correct information.\n // For private symbols this is the declaration symbol. For public symbols this is the\n // symbol that is exported.\n canonicalSymbol?: Symbol;\n\n // Produced by canonicalizeSymbols() for all symbols. This the symbol that originally\n // declared the value and should be used to fetch the value.\n declaration?: Symbol;\n\n // A symbol is referenced if it is exported from index or referenced by the value of\n // a referenced symbol's value.\n referenced?: boolean;\n\n // A symbol is marked as a re-export the symbol was rexported from a module that is\n // not part of the flat module bundle.\n reexport?: boolean;\n\n // Only valid for referenced canonical symbols. Produces by convertSymbols().\n value?: MetadataEntry;\n\n // Only valid for referenced private symbols. It is the name to use to import the symbol from\n // the bundle index. Produce by assignPrivateNames();\n privateName?: string;\n}\n\nexport interface BundleEntries { [name: string]: MetadataEntry; }\n\nexport interface BundlePrivateEntry {\n privateName: string;\n name: string;\n module: string;\n}\n\nexport interface BundledModule {\n metadata: ModuleMetadata;\n privates: BundlePrivateEntry[];\n}\n\nexport interface MetadataBundlerHost {\n getMetadataFor(moduleName: string): ModuleMetadata|undefined;\n}\n\ntype StaticsMetadata = {\n [name: string]: MetadataValue | FunctionMetadata;\n};\n\nexport class MetadataBundler {\n private symbolMap = new Map<string, Symbol>();\n private metadataCache = new Map<string, ModuleMetadata|undefined>();\n private exports = new Map<string, Symbol[]>();\n private rootModule: string;\n private exported: Set<Symbol>;\n\n constructor(\n private root: string, private importAs: string|undefined, private host: MetadataBundlerHost) {\n this.rootModule = `./${path.basename(root)}`;\n }\n\n getMetadataBundle(): BundledModule {\n // Export the root module. This also collects the transitive closure of all values referenced by\n // the exports.\n const exportedSymbols = this.exportAll(this.rootModule);\n this.canonicalizeSymbols(exportedSymbols);\n // TODO: exports? e.g. a module re-exports a symbol from another bundle\n const metadata = this.getEntries(exportedSymbols);\n const privates = Array.from(this.symbolMap.values())\n .filter(s => s.referenced && s.isPrivate)\n .map(s => ({\n privateName: s.privateName !,\n name: s.declaration !.name,\n module: s.declaration !.module\n }));\n const origins = Array.from(this.symbolMap.values())\n .filter(s => s.referenced && !s.reexport)\n .reduce<{[name: string]: string}>((p, s) => {\n p[s.isPrivate ? s.privateName ! : s.name] = s.declaration !.module;\n return p;\n }, {});\n const exports = this.getReExports(exportedSymbols);\n return {\n metadata: {\n __symbolic: 'module',\n version: METADATA_VERSION,\n exports: exports.length ? exports : undefined, metadata, origins,\n importAs: this.importAs !\n },\n privates\n };\n }\n\n static resolveModule(importName: string, from: string): string {\n return resolveModule(importName, from);\n }\n\n private getMetadata(moduleName: string): ModuleMetadata|undefined {\n let result = this.metadataCache.get(moduleName);\n if (!result) {\n if (moduleName.startsWith('.')) {\n const fullModuleName = resolveModule(moduleName, this.root);\n result = this.host.getMetadataFor(fullModuleName);\n }\n this.metadataCache.set(moduleName, result);\n }\n return result;\n }\n\n private exportAll(moduleName: string): Symbol[] {\n const module = this.getMetadata(moduleName);\n let result = this.exports.get(moduleName);\n\n if (result) {\n return result;\n }\n\n result = [];\n\n const exportSymbol = (exportedSymbol: Symbol, exportAs: string) => {\n const symbol = this.symbolOf(moduleName, exportAs);\n result !.push(symbol);\n exportedSymbol.reexportedAs = symbol;\n symbol.exports = exportedSymbol;\n };\n\n // Export all the symbols defined in this module.\n if (module && module.metadata) {\n for (let key in module.metadata) {\n const data = module.metadata[key];\n if (isMetadataImportedSymbolReferenceExpression(data)) {\n // This is a re-export of an imported symbol. Record this as a re-export.\n const exportFrom = resolveModule(data.module, moduleName);\n this.exportAll(exportFrom);\n const symbol = this.symbolOf(exportFrom, data.name);\n exportSymbol(symbol, key);\n } else {\n // Record that this symbol is exported by this module.\n result.push(this.symbolOf(moduleName, key));\n }\n }\n }\n\n // Export all the re-exports from this module\n if (module && module.exports) {\n for (const exportDeclaration of module.exports) {\n const exportFrom = resolveModule(exportDeclaration.from, moduleName);\n // Record all the exports from the module even if we don't use it directly.\n const exportedSymbols = this.exportAll(exportFrom);\n if (exportDeclaration.export) {\n // Re-export all the named exports from a module.\n for (const exportItem of exportDeclaration.export) {\n const name = typeof exportItem == 'string' ? exportItem : exportItem.name;\n const exportAs = typeof exportItem == 'string' ? exportItem : exportItem.as;\n const symbol = this.symbolOf(exportFrom, name);\n if (exportedSymbols && exportedSymbols.length == 1 && exportedSymbols[0].reexport &&\n exportedSymbols[0].name == '*') {\n // This is a named export from a module we have no metadata about. Record the named\n // export as a re-export.\n symbol.reexport = true;\n }\n exportSymbol(this.symbolOf(exportFrom, name), exportAs);\n }\n } else {\n // Re-export all the symbols from the module\n const exportedSymbols = this.exportAll(exportFrom);\n for (const exportedSymbol of exportedSymbols) {\n const name = exportedSymbol.name;\n exportSymbol(exportedSymbol, name);\n }\n }\n }\n }\n\n if (!module) {\n // If no metadata is found for this import then it is considered external to the\n // library and should be recorded as a re-export in the final metadata if it is\n // eventually re-exported.\n const symbol = this.symbolOf(moduleName, '*');\n symbol.reexport = true;\n result.push(symbol);\n }\n this.exports.set(moduleName, result);\n\n return result;\n }\n\n /**\n * Fill in the canonicalSymbol which is the symbol that should be imported by factories.\n * The canonical symbol is the one exported by the index file for the bundle or definition\n * symbol for private symbols that are not exported by bundle index.\n */\n private canonicalizeSymbols(exportedSymbols: Symbol[]) {\n const symbols = Array.from(this.symbolMap.values());\n this.exported = new Set(exportedSymbols);\n symbols.forEach(this.canonicalizeSymbol, this);\n }\n\n private canonicalizeSymbol(symbol: Symbol) {\n const rootExport = getRootExport(symbol);\n const declaration = getSymbolDeclaration(symbol);\n const isPrivate = !this.exported.has(rootExport);\n const canonicalSymbol = isPrivate ? declaration : rootExport;\n symbol.isPrivate = isPrivate;\n symbol.declaration = declaration;\n symbol.canonicalSymbol = canonicalSymbol;\n symbol.reexport = declaration.reexport;\n }\n\n private getEntries(exportedSymbols: Symbol[]): BundleEntries {\n const result: BundleEntries = {};\n\n const exportedNames = new Set(exportedSymbols.map(s => s.name));\n let privateName = 0;\n\n function newPrivateName(): string {\n while (true) {\n let digits: string[] = [];\n let index = privateName++;\n let base = PRIVATE_NAME_CHARS;\n while (!digits.length || index > 0) {\n digits.unshift(base[index % base.length]);\n index = Math.floor(index / base.length);\n }\n digits.unshift('\\u0275');\n const result = digits.join('');\n if (!exportedNames.has(result)) return result;\n }\n }\n\n exportedSymbols.forEach(symbol => this.convertSymbol(symbol));\n\n const symbolsMap = new Map<string, string[]>();\n Array.from(this.symbolMap.values()).forEach(symbol => {\n if (symbol.referenced && !symbol.reexport) {\n let name = symbol.name;\n const identifier = `${symbol.declaration!.module}:${symbol.declaration !.name}`;\n if (symbol.isPrivate && !symbol.privateName) {\n name = newPrivateName();\n symbol.privateName = name;\n }\n if (symbolsMap.has(identifier)) {\n const names = symbolsMap.get(identifier);\n names !.push(name);\n } else {\n symbolsMap.set(identifier, [name]);\n }\n result[name] = symbol.value !;\n }\n });\n\n // check for duplicated entries\n symbolsMap.forEach((names: string[], identifier: string) => {\n if (names.length > 1) {\n const [module, declaredName] = identifier.split(':');\n // prefer the export that uses the declared name (if any)\n let reference = names.indexOf(declaredName);\n if (reference === -1) {\n reference = 0;\n }\n\n // keep one entry and replace the others by references\n names.forEach((name: string, i: number) => {\n if (i !== reference) {\n result[name] = {__symbolic: 'reference', name: names[reference]};\n }\n });\n }\n });\n\n return result;\n }\n\n private getReExports(exportedSymbols: Symbol[]): ModuleExportMetadata[] {\n type ExportClause = {name: string, as: string}[];\n const modules = new Map<string, ExportClause>();\n const exportAlls = new Set<string>();\n for (const symbol of exportedSymbols) {\n if (symbol.reexport) {\n // symbol.declaration is guarenteed to be defined during the phase this method is called.\n const declaration = symbol.declaration !;\n const module = declaration.module;\n if (declaration !.name == '*') {\n // Reexport all the symbols.\n exportAlls.add(declaration.module);\n } else {\n // Re-export the symbol as the exported name.\n let entry = modules.get(module);\n if (!entry) {\n entry = [];\n modules.set(module, entry);\n }\n const as = symbol.name;\n const name = declaration.name;\n entry.push({name, as});\n }\n }\n }\n return [\n ...Array.from(exportAlls.values()).map(from => ({from})),\n ...Array.from(modules.entries()).map(([from, exports]) => ({export: exports, from}))\n ];\n }\n\n private convertSymbol(symbol: Symbol) {\n // canonicalSymbol is ensured to be defined before this is called.\n const canonicalSymbol = symbol.canonicalSymbol !;\n\n if (!canonicalSymbol.referenced) {\n canonicalSymbol.referenced = true;\n // declaration is ensured to be definded before this method is called.\n const declaration = canonicalSymbol.declaration !;\n const module = this.getMetadata(declaration.module);\n if (module) {\n const value = module.metadata[declaration.name];\n if (value && !declaration.name.startsWith('___')) {\n canonicalSymbol.value = this.convertEntry(declaration.module, value);\n }\n }\n }\n }\n\n private convertEntry(moduleName: string, value: MetadataEntry): MetadataEntry {\n if (isClassMetadata(value)) {\n return this.convertClass(moduleName, value);\n }\n if (isFunctionMetadata(value)) {\n return this.convertFunction(moduleName, value);\n }\n if (isInterfaceMetadata(value)) {\n return value;\n }\n return this.convertValue(moduleName, value);\n }\n\n private convertClass(moduleName: string, value: ClassMetadata): ClassMetadata {\n return {\n __symbolic: 'class',\n arity: value.arity,\n extends: this.convertExpression(moduleName, value.extends) !,\n decorators:\n value.decorators && value.decorators.map(d => this.convertExpression(moduleName, d) !),\n members: this.convertMembers(moduleName, value.members !),\n statics: value.statics && this.convertStatics(moduleName, value.statics)\n };\n }\n\n private convertMembers(moduleName: string, members: MetadataMap): MetadataMap {\n const result: MetadataMap = {};\n for (const name in members) {\n const value = members[name];\n result[name] = value.map(v => this.convertMember(moduleName, v));\n }\n return result;\n }\n\n private convertMember(moduleName: string, member: MemberMetadata) {\n const result: MemberMetadata = {__symbolic: member.__symbolic};\n result.decorators =\n member.decorators && member.decorators.map(d => this.convertExpression(moduleName, d) !);\n if (isMethodMetadata(member)) {\n (result as MethodMetadata).parameterDecorators = member.parameterDecorators &&\n member.parameterDecorators.map(\n d => d && d.map(p => this.convertExpression(moduleName, p) !));\n if (isConstructorMetadata(member)) {\n if (member.parameters) {\n (result as ConstructorMetadata).parameters =\n member.parameters.map(p => this.convertExpression(moduleName, p));\n }\n }\n }\n return result;\n }\n\n private convertStatics(moduleName: string, statics: StaticsMetadata): StaticsMetadata {\n let result: StaticsMetadata = {};\n for (const key in statics) {\n const value = statics[key];\n result[key] = isFunctionMetadata(value) ? this.convertFunction(moduleName, value) : value;\n }\n return result;\n }\n\n private convertFunction(moduleName: string, value: FunctionMetadata): FunctionMetadata {\n return {\n __symbolic: 'function',\n parameters: value.parameters,\n defaults: value.defaults && value.defaults.map(v => this.convertValue(moduleName, v)),\n value: this.convertValue(moduleName, value.value)\n };\n }\n\n private convertValue(moduleName: string, value: MetadataValue): MetadataValue {\n if (isPrimitive(value)) {\n return value;\n }\n if (isMetadataError(value)) {\n return this.convertError(moduleName, value);\n }\n if (isMetadataSymbolicExpression(value)) {\n return this.convertExpression(moduleName, value) !;\n }\n if (Array.isArray(value)) {\n return value.map(v => this.convertValue(moduleName, v));\n }\n\n // Otherwise it is a metadata object.\n const object = value as MetadataObject;\n const result: MetadataObject = {};\n for (const key in object) {\n result[key] = this.convertValue(moduleName, object[key]);\n }\n return result;\n }\n\n private convertExpression(\n moduleName: string, value: MetadataSymbolicExpression|MetadataError|null|\n undefined): MetadataSymbolicExpression|MetadataError|undefined|null {\n if (value) {\n switch (value.__symbolic) {\n case 'error':\n return this.convertError(moduleName, value as MetadataError);\n case 'reference':\n return this.convertReference(moduleName, value as MetadataSymbolicReferenceExpression);\n default:\n return this.convertExpressionNode(moduleName, value);\n }\n }\n return value;\n }\n\n private convertError(module: string, value: MetadataError): MetadataError {\n return {\n __symbolic: 'error',\n message: value.message,\n line: value.line,\n character: value.character,\n context: value.context, module\n };\n }\n\n private convertReference(moduleName: string, value: MetadataSymbolicReferenceExpression):\n MetadataSymbolicReferenceExpression|MetadataError|undefined {\n const createReference = (symbol: Symbol): MetadataSymbolicReferenceExpression => {\n const declaration = symbol.declaration !;\n if (declaration.module.startsWith('.')) {\n // Reference to a symbol defined in the module. Ensure it is converted then return a\n // references to the final symbol.\n this.convertSymbol(symbol);\n return {\n __symbolic: 'reference',\n get name() {\n // Resolved lazily because private names are assigned late.\n const canonicalSymbol = symbol.canonicalSymbol !;\n if (canonicalSymbol.isPrivate == null) {\n throw Error('Invalid state: isPrivate was not initialized');\n }\n return canonicalSymbol.isPrivate ? canonicalSymbol.privateName ! : canonicalSymbol.name;\n }\n };\n } else {\n // The symbol was a re-exported symbol from another module. Return a reference to the\n // original imported symbol.\n return {__symbolic: 'reference', name: declaration.name, module: declaration.module};\n }\n };\n\n if (isMetadataGlobalReferenceExpression(value)) {\n const metadata = this.getMetadata(moduleName);\n if (metadata && metadata.metadata && metadata.metadata[value.name]) {\n // Reference to a symbol defined in the module\n return createReference(this.canonicalSymbolOf(moduleName, value.name));\n }\n\n // If a reference has arguments, the arguments need to be converted.\n if (value.arguments) {\n return {\n __symbolic: 'reference',\n name: value.name,\n arguments: value.arguments.map(a => this.convertValue(moduleName, a))\n };\n }\n\n // Global references without arguments (such as to Math or JSON) are unmodified.\n return value;\n }\n\n if (isMetadataImportedSymbolReferenceExpression(value)) {\n // References to imported symbols are separated into two, references to bundled modules and\n // references to modules external to the bundle. If the module reference is relative it is\n // assumed to be in the bundle. If it is Global it is assumed to be outside the bundle.\n // References to symbols outside the bundle are left unmodified. References to symbol inside\n // the bundle need to be converted to a bundle import reference reachable from the bundle\n // index.\n\n if (value.module.startsWith('.')) {\n // Reference is to a symbol defined inside the module. Convert the reference to a reference\n // to the canonical symbol.\n const referencedModule = resolveModule(value.module, moduleName);\n const referencedName = value.name;\n return createReference(this.canonicalSymbolOf(referencedModule, referencedName));\n }\n\n // Value is a reference to a symbol defined outside the module.\n if (value.arguments) {\n // If a reference has arguments the arguments need to be converted.\n return {\n __symbolic: 'reference',\n name: value.name,\n module: value.module,\n arguments: value.arguments.map(a => this.convertValue(moduleName, a))\n };\n }\n return value;\n }\n\n if (isMetadataModuleReferenceExpression(value)) {\n // Cannot support references to bundled modules as the internal modules of a bundle are erased\n // by the bundler.\n if (value.module.startsWith('.')) {\n return {\n __symbolic: 'error',\n message: 'Unsupported bundled module reference',\n context: {module: value.module}\n };\n }\n\n // References to unbundled modules are unmodified.\n return value;\n }\n }\n\n private convertExpressionNode(moduleName: string, value: MetadataSymbolicExpression):\n MetadataSymbolicExpression {\n const result: MetadataSymbolicExpression = { __symbolic: value.__symbolic } as any;\n for (const key in value) {\n (result as any)[key] = this.convertValue(moduleName, (value as any)[key]);\n }\n return result;\n }\n\n private symbolOf(module: string, name: string): Symbol {\n const symbolKey = `${module}:${name}`;\n let symbol = this.symbolMap.get(symbolKey);\n if (!symbol) {\n symbol = {module, name};\n this.symbolMap.set(symbolKey, symbol);\n }\n return symbol;\n }\n\n private canonicalSymbolOf(module: string, name: string): Symbol {\n // Ensure the module has been seen.\n this.exportAll(module);\n const symbol = this.symbolOf(module, name);\n if (!symbol.canonicalSymbol) {\n this.canonicalizeSymbol(symbol);\n }\n return symbol;\n }\n}\n\nexport class CompilerHostAdapter implements MetadataBundlerHost {\n private collector = new MetadataCollector();\n\n constructor(private host: ts.CompilerHost) {}\n\n getMetadataFor(fileName: string): ModuleMetadata|undefined {\n if (!this.host.fileExists(fileName + '.ts')) return undefined;\n const sourceFile = this.host.getSourceFile(fileName + '.ts', ts.ScriptTarget.Latest);\n return sourceFile && this.collector.getMetadata(sourceFile);\n }\n}\n\nfunction resolveModule(importName: string, from: string): string {\n if (importName.startsWith('.') && from) {\n let normalPath = path.normalize(path.join(path.dirname(from), importName));\n if (!normalPath.startsWith('.') && from.startsWith('.')) {\n // path.normalize() preserves leading '../' but not './'. This adds it back.\n normalPath = `.${path.sep}${normalPath}`;\n }\n // Replace windows path delimiters with forward-slashes. Otherwise the paths are not\n // TypeScript compatible when building the bundle.\n return normalPath.replace(/\\\\/g, '/');\n }\n return importName;\n}\n\nfunction isPrimitive(o: any): o is boolean|string|number {\n return o === null || (typeof o !== 'function' && typeof o !== 'object');\n}\n\nfunction getRootExport(symbol: Symbol): Symbol {\n return symbol.reexportedAs ? getRootExport(symbol.reexportedAs) : symbol;\n}\n\nfunction getSymbolDeclaration(symbol: Symbol): Symbol {\n return symbol.exports ? getSymbolDeclaration(symbol.exports) : symbol;\n}\n"]} |
+1
-1
@@ -19,3 +19,3 @@ "use strict"; | ||
| */ | ||
| exports.VERSION = new compiler_1.Version('5.2.5'); | ||
| exports.VERSION = new compiler_1.Version('5.2.6'); | ||
| //# sourceMappingURL=version.js.map |
@@ -1,1 +0,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"]} | ||
| {"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.6');\n"]} |
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1015038
0.46%101
3.06%8935
0.43%+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated