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C,CAAC,EAAE,CAAC,eAAe,CAAC,GAAG,gBAAgB,CAAA;AACjE,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAE,aAAqB,EAAE,QAAgB;IAC/D,IAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;IAC3C,SAAS,CAAC,IAAI,GAAG,QAAQ,CAAA;IACzB,SAAS,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAA;IAC9B,OAAO,SAAS,CAAC,UAAU,CAAA;IAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;AAClC,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAE,WAA6B,EAAE,MAAgB;IACzE,OAAO,WAAW,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAA7B,CAA6B,CAAC,CAAA;AAC/D,CAAC","sourcesContent":["import { relative, basename, extname, resolve, dirname, join } from 'path'\nimport { EOL } from 'os'\nimport sourceMapSupport = require('source-map-support')\nimport yn = require('yn')\nimport arrify = require('arrify')\nimport { BaseError } from 'make-error'\nimport * as util from 'util'\nimport * as _ts from 'typescript'\n\n/**\n * @internal\n */\nexport const INSPECT_CUSTOM = util.inspect.custom || 'inspect'\n\n/**\n * Debugging `ts-node`.\n */\nconst shouldDebug = yn(process.env.TS_NODE_DEBUG)\nconst debug = shouldDebug ? console.log.bind(console, 'ts-node') : () => undefined\nconst debugFn = shouldDebug ?\n <T, U> (key: string, fn: (arg: T) => U) => {\n return (x: T) => {\n debug(key, x)\n return fn(x)\n }\n } :\n <T, U> (_: string, fn: (arg: T) => U) => fn\n\n/**\n * Common TypeScript interfaces between versions.\n */\nexport interface TSCommon {\n version: typeof _ts.version\n sys: typeof _ts.sys\n ScriptSnapshot: typeof _ts.ScriptSnapshot\n displayPartsToString: typeof _ts.displayPartsToString\n createLanguageService: typeof _ts.createLanguageService\n getDefaultLibFilePath: typeof _ts.getDefaultLibFilePath\n getPreEmitDiagnostics: typeof _ts.getPreEmitDiagnostics\n flattenDiagnosticMessageText: typeof _ts.flattenDiagnosticMessageText\n transpileModule: typeof _ts.transpileModule\n ModuleKind: typeof _ts.ModuleKind\n ScriptTarget: typeof _ts.ScriptTarget\n findConfigFile: typeof _ts.findConfigFile\n readConfigFile: typeof _ts.readConfigFile\n parseJsonConfigFileContent: typeof _ts.parseJsonConfigFileContent\n formatDiagnostics: typeof _ts.formatDiagnostics\n formatDiagnosticsWithColorAndContext: typeof _ts.formatDiagnosticsWithColorAndContext\n}\n\n/**\n * Export the current version.\n */\nexport const VERSION = require('../package.json').version\n\n/**\n * Registration options.\n */\nexport interface Options {\n pretty?: boolean | null\n typeCheck?: boolean | null\n transpileOnly?: boolean | null\n files?: boolean | null\n compiler?: string\n ignore?: string[]\n project?: string\n skipIgnore?: boolean | null\n skipProject?: boolean | null\n compilerOptions?: object\n ignoreDiagnostics?: Array<number | string>\n readFile?: (path: string) => string | undefined\n fileExists?: (path: string) => boolean\n transformers?: _ts.CustomTransformers\n}\n\n/**\n * Track the project information.\n */\ninterface MemoryCache {\n contents: { [path: string]: string | undefined }\n versions: { [path: string]: number | undefined }\n outputs: { [path: string]: string }\n}\n\n/**\n * Information retrieved from type info check.\n */\nexport interface TypeInfo {\n name: string\n comment: string\n}\n\n/**\n * Default register options.\n */\nexport const DEFAULTS: Options = {\n files: yn(process.env['TS_NODE_FILES']),\n pretty: yn(process.env['TS_NODE_PRETTY']),\n compiler: process.env['TS_NODE_COMPILER'],\n compilerOptions: parse(process.env['TS_NODE_COMPILER_OPTIONS']),\n ignore: split(process.env['TS_NODE_IGNORE']),\n project: process.env['TS_NODE_PROJECT'],\n skipIgnore: yn(process.env['TS_NODE_SKIP_IGNORE']),\n skipProject: yn(process.env['TS_NODE_SKIP_PROJECT']),\n ignoreDiagnostics: split(process.env['TS_NODE_IGNORE_DIAGNOSTICS']),\n typeCheck: yn(process.env['TS_NODE_TYPE_CHECK']),\n transpileOnly: yn(process.env['TS_NODE_TRANSPILE_ONLY'])\n}\n\n/**\n * Default TypeScript compiler options required by `ts-node`.\n */\nconst TS_NODE_COMPILER_OPTIONS = {\n sourceMap: true,\n inlineSourceMap: false,\n inlineSources: true,\n declaration: false,\n noEmit: false,\n outDir: '$$ts-node$$'\n}\n\n/**\n * Split a string array of values.\n */\nexport function split (value: string | undefined) {\n return typeof value === 'string' ? value.split(/ *, */g) : undefined\n}\n\n/**\n * Parse a string as JSON.\n */\nexport function parse (value: string | undefined): object | undefined {\n return typeof value === 'string' ? JSON.parse(value) : undefined\n}\n\n/**\n * Replace backslashes with forward slashes.\n */\nexport function normalizeSlashes (value: string): string {\n return value.replace(/\\\\/g, '/')\n}\n\n/**\n * TypeScript diagnostics error.\n */\nexport class TSError extends BaseError {\n name = 'TSError'\n\n constructor (public diagnosticText: string, public diagnosticCodes: number[]) {\n super(`⨯ Unable to compile TypeScript:\\n${diagnosticText}`)\n }\n\n /**\n * @internal\n */\n [INSPECT_CUSTOM] () {\n return this.diagnosticText\n }\n}\n\n/**\n * Return type for registering `ts-node`.\n */\nexport interface Register {\n cwd: string\n extensions: string[]\n ts: TSCommon\n compile (code: string, fileName: string, lineOffset?: number): string\n getTypeInfo (code: string, fileName: string, position: number): TypeInfo\n}\n\n/**\n * Register TypeScript compiler.\n */\nexport function register (opts: Options = {}): Register {\n const options = Object.assign({}, DEFAULTS, opts)\n const originalJsHandler = require.extensions['.js']\n\n const ignoreDiagnostics = [\n 6059, // \"'rootDir' is expected to contain all source files.\"\n 18002, // \"The 'files' list in config file is empty.\"\n 18003, // \"No inputs were found in config file.\"\n ...(options.ignoreDiagnostics || [])\n ].map(Number)\n\n const memoryCache: MemoryCache = {\n contents: Object.create(null),\n versions: Object.create(null),\n outputs: Object.create(null)\n }\n\n const ignore = options.skipIgnore ? [] : arrify(\n options.ignore || '/node_modules/'\n ).map(str => new RegExp(str))\n\n // Install source map support and read from memory cache.\n sourceMapSupport.install({\n environment: 'node',\n retrieveFile (path: string) {\n return memoryCache.outputs[path]\n }\n })\n\n // Require the TypeScript compiler and configuration.\n const cwd = process.cwd()\n const { compilerOptions, project, skipProject, files } = options\n const typeCheck = options.typeCheck === true || options.transpileOnly !== true\n const compiler = require.resolve(options.compiler || 'typescript', { paths: [cwd] })\n const ts: typeof _ts = require(compiler)\n const transformers = options.transformers || undefined\n const readFile = options.readFile || ts.sys.readFile\n const fileExists = options.fileExists || ts.sys.fileExists\n const config = readConfig(cwd, ts, fileExists, readFile, compilerOptions, project, skipProject, files)\n const configDiagnosticList = filterDiagnostics(config.errors, ignoreDiagnostics)\n const extensions = ['.ts', '.tsx']\n\n const diagnosticHost: _ts.FormatDiagnosticsHost = {\n getNewLine: () => EOL,\n getCurrentDirectory: () => cwd,\n getCanonicalFileName: (path) => path\n }\n\n const formatDiagnostics = options.pretty\n ? ts.formatDiagnosticsWithColorAndContext\n : ts.formatDiagnostics\n\n function createTSError (diagnostics: ReadonlyArray<_ts.Diagnostic>) {\n const diagnosticText = formatDiagnostics(diagnostics, diagnosticHost)\n const diagnosticCodes = diagnostics.map(x => x.code)\n return new TSError(diagnosticText, diagnosticCodes)\n }\n\n // Render the configuration errors and exit the script.\n if (configDiagnosticList.length) throw createTSError(configDiagnosticList)\n\n // Enable `allowJs` when flag is set.\n if (config.options.allowJs) {\n extensions.push('.js')\n extensions.push('.jsx')\n }\n\n // Initialize files from TypeScript into project.\n for (const path of config.fileNames) memoryCache.versions[path] = 1\n\n /**\n * Get the extension for a transpiled file.\n */\n const getExtension = config.options.jsx === ts.JsxEmit.Preserve ?\n ((path: string) => /\\.[tj]sx$/.test(path) ? '.jsx' : '.js') :\n ((_: string) => '.js')\n\n /**\n * Create the basic required function using transpile mode.\n */\n let getOutput = function (code: string, fileName: string, lineOffset = 0): SourceOutput {\n const result = ts.transpileModule(code, {\n fileName,\n transformers,\n compilerOptions: config.options,\n reportDiagnostics: true\n })\n\n const diagnosticList = result.diagnostics ?\n filterDiagnostics(result.diagnostics, ignoreDiagnostics) :\n []\n\n if (diagnosticList.length) throw createTSError(diagnosticList)\n\n return [result.outputText, result.sourceMapText as string]\n }\n\n let getTypeInfo = function (_code: string, _fileName: string, _position: number): TypeInfo {\n throw new TypeError(`Type information is unavailable without \"--type-check\"`)\n }\n\n // Use full language services when the fast option is disabled.\n if (typeCheck) {\n // Set the file contents into cache.\n const updateMemoryCache = function (code: string, fileName: string) {\n if (memoryCache.contents[fileName] !== code) {\n memoryCache.contents[fileName] = code\n memoryCache.versions[fileName] = (memoryCache.versions[fileName] || 0) + 1\n }\n }\n\n // Create the compiler host for type checking.\n const serviceHost = {\n getScriptFileNames: () => Object.keys(memoryCache.versions),\n getScriptVersion: (fileName: string) => {\n const version = memoryCache.versions[fileName]\n\n // We need to return `undefined` and not a string here because TypeScript will use\n // `getScriptVersion` and compare against their own version - which can be `undefined`.\n // If we don't return `undefined` it results in `undefined === \"undefined\"` and run\n // `createProgram` again (which is very slow). Using a `string` assertion here to avoid\n // TypeScript errors from the function signature (expects `(x: string) => string`).\n return version === undefined ? undefined as any as string : String(version)\n },\n getScriptSnapshot (fileName: string) {\n // Read contents into TypeScript memory cache.\n if (!Object.prototype.hasOwnProperty.call(memoryCache.contents, fileName)) {\n memoryCache.contents[fileName] = readFile(fileName)\n }\n\n const contents = memoryCache.contents[fileName]\n if (contents === undefined) return\n return ts.ScriptSnapshot.fromString(contents)\n },\n fileExists: debugFn('fileExists', fileExists),\n readFile: debugFn('readFile', readFile),\n readDirectory: debugFn('readDirectory', ts.sys.readDirectory),\n getDirectories: debugFn('getDirectories', ts.sys.getDirectories),\n directoryExists: debugFn('directoryExists', ts.sys.directoryExists),\n getNewLine: () => EOL,\n getCurrentDirectory: () => cwd,\n getCompilationSettings: () => config.options,\n getDefaultLibFileName: () => ts.getDefaultLibFilePath(config.options),\n getCustomTransformers: () => transformers\n }\n\n const service = ts.createLanguageService(serviceHost)\n\n getOutput = function (code: string, fileName: string, lineOffset: number = 0) {\n // Must set memory cache before attempting to read file.\n updateMemoryCache(code, fileName)\n\n const output = service.getEmitOutput(fileName)\n\n // Get the relevant diagnostics - this is 3x faster than `getPreEmitDiagnostics`.\n const diagnostics = service.getCompilerOptionsDiagnostics()\n .concat(service.getSyntacticDiagnostics(fileName))\n .concat(service.getSemanticDiagnostics(fileName))\n\n const diagnosticList = filterDiagnostics(diagnostics, ignoreDiagnostics)\n\n if (diagnosticList.length) throw createTSError(diagnosticList)\n\n if (output.emitSkipped) {\n throw new TypeError(`${relative(cwd, fileName)}: Emit skipped`)\n }\n\n // Throw an error when requiring `.d.ts` files.\n if (output.outputFiles.length === 0) {\n throw new TypeError(\n 'Unable to require `.d.ts` file.\\n' +\n 'This is usually the result of a faulty configuration or import. ' +\n 'Make sure there is a `.js`, `.json` or another executable extension and ' +\n 'loader (attached before `ts-node`) available alongside ' +\n `\\`${basename(fileName)}\\`.`\n )\n }\n\n return [output.outputFiles[1].text, output.outputFiles[0].text]\n }\n\n getTypeInfo = function (code: string, fileName: string, position: number) {\n updateMemoryCache(code, fileName)\n\n const info = service.getQuickInfoAtPosition(fileName, position)\n const name = ts.displayPartsToString(info ? info.displayParts : [])\n const comment = ts.displayPartsToString(info ? info.documentation : [])\n\n return { name, comment }\n }\n }\n\n // Create a simple TypeScript compiler proxy.\n function compile (code: string, fileName: string, lineOffset?: number) {\n const [value, sourceMap] = getOutput(code, fileName, lineOffset)\n const output = updateOutput(value, fileName, sourceMap, getExtension)\n memoryCache.outputs[fileName] = output\n return output\n }\n\n const register: Register = { cwd, compile, getTypeInfo, extensions, ts }\n\n // Register the extensions.\n extensions.forEach(extension => {\n registerExtension(extension, ignore, register, originalJsHandler)\n })\n\n return register\n}\n\n/**\n * Check if the filename should be ignored.\n */\nfunction shouldIgnore (filename: string, ignore: RegExp[]) {\n const relname = normalizeSlashes(filename)\n\n return ignore.some(x => x.test(relname))\n}\n\n/**\n * Register the extension for node.\n */\nfunction registerExtension (\n ext: string,\n ignore: RegExp[],\n register: Register,\n originalHandler: (m: NodeModule, filename: string) => any\n) {\n const old = require.extensions[ext] || originalHandler\n\n require.extensions[ext] = function (m: any, filename) {\n if (shouldIgnore(filename, ignore)) {\n return old(m, filename)\n }\n\n const _compile = m._compile\n\n m._compile = function (code: string, fileName: string) {\n debug('module._compile', fileName)\n\n return _compile.call(this, register.compile(code, fileName), fileName)\n }\n\n return old(m, filename)\n }\n}\n\n/**\n * Do post-processing on config options to support `ts-node`.\n */\nfunction fixConfig (ts: TSCommon, config: _ts.ParsedCommandLine) {\n // Delete options that *should not* be passed through.\n delete config.options.out\n delete config.options.outFile\n delete config.options.composite\n delete config.options.declarationDir\n delete config.options.declarationMap\n delete config.options.emitDeclarationOnly\n\n // Target ES5 output by default (instead of ES3).\n if (config.options.target === undefined) {\n config.options.target = ts.ScriptTarget.ES5\n }\n\n // Target CommonJS modules by default (instead of magically switching to ES6 when the target is ES6).\n if (config.options.module === undefined) {\n config.options.module = ts.ModuleKind.CommonJS\n }\n\n return config\n}\n\n/**\n * Load TypeScript configuration.\n */\nfunction readConfig (\n cwd: string,\n ts: TSCommon,\n fileExists: (path: string) => boolean,\n readFile: (path: string) => string | undefined,\n compilerOptions?: object,\n project?: string,\n skipProject?: boolean | null,\n includeFiles?: boolean | null\n): _ts.ParsedCommandLine {\n let config: any = { compilerOptions: {} }\n let basePath = normalizeSlashes(cwd)\n let configFileName: string | undefined = undefined\n\n // Read project configuration when available.\n if (!skipProject) {\n configFileName = project\n ? normalizeSlashes(resolve(cwd, project))\n : ts.findConfigFile(normalizeSlashes(cwd), fileExists)\n\n if (configFileName) {\n const result = ts.readConfigFile(configFileName, readFile)\n\n // Return diagnostics.\n if (result.error) {\n return { errors: [result.error], fileNames: [], options: {} }\n }\n\n config = result.config\n basePath = normalizeSlashes(dirname(configFileName))\n }\n }\n\n // Remove resolution of \"files\".\n if (!includeFiles) {\n config.files = []\n config.includes = []\n }\n\n // Override default configuration options `ts-node` requires.\n config.compilerOptions = Object.assign({}, config.compilerOptions, compilerOptions, TS_NODE_COMPILER_OPTIONS)\n\n return fixConfig(ts, ts.parseJsonConfigFileContent(config, ts.sys, basePath, undefined, configFileName))\n}\n\n/**\n * Internal source output.\n */\ntype SourceOutput = [string, string]\n\n/**\n * Update the output remapping the source map.\n */\nfunction updateOutput (outputText: string, fileName: string, sourceMap: string, getExtension: (fileName: string) => string) {\n const base64Map = Buffer.from(updateSourceMap(sourceMap, fileName), 'utf8').toString('base64')\n const sourceMapContent = `data:application/json;charset=utf-8;base64,${base64Map}`\n const sourceMapLength = `${basename(fileName)}.map`.length + (getExtension(fileName).length - extname(fileName).length)\n\n return outputText.slice(0, -sourceMapLength) + sourceMapContent\n}\n\n/**\n * Update the source map contents for improved output.\n */\nfunction updateSourceMap (sourceMapText: string, fileName: string) {\n const sourceMap = JSON.parse(sourceMapText)\n sourceMap.file = fileName\n sourceMap.sources = [fileName]\n delete sourceMap.sourceRoot\n return JSON.stringify(sourceMap)\n}\n\n/**\n * Filter diagnostics.\n */\nfunction filterDiagnostics (diagnostics: _ts.Diagnostic[], ignore: number[]) {\n return diagnostics.filter(x => ignore.indexOf(x.code) === -1)\n}\n"]}
\No newline at end of file