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D,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,MAAM,EAAE;QACjD,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;KACnC;AACH,CAAC","sourcesContent":["import { ServiceType } from \"@excitare/cli-types\";\r\nimport chalk from \"chalk\";\r\nimport { dirname, join, relative, resolve } from \"path\";\r\n\r\nimport { IConfiguration } from \".\";\r\nimport { ModulePaths } from \"./modulePaths\";\r\n\r\nexport function logDebugOutput(\r\n modulePaths: ModulePaths,\r\n type: ServiceType,\r\n configuration: IConfiguration,\r\n alias: {\r\n [key: string]: string | undefined;\r\n },\r\n showOutput: boolean\r\n) {\r\n if (showOutput) {\r\n console.log(\" Build configuration\");\r\n console.log(\" - entry:\");\r\n for (const e of modulePaths.entry) {\r\n console.log(\" %s\", chalk.greenBright(relative(process.cwd(), e)));\r\n }\r\n console.log(\" - type: %s\", type);\r\n console.log(\" - outDir: %s\", chalk.gray(configuration.outputDir));\r\n console.log(\" - outName: %s\", chalk.gray(configuration.outputName));\r\n console.log(\" - ctx: %s\", chalk.gray(configuration.context));\r\n console.log(\" - cache-loader cache: %s\", chalk.gray(JSON.parse(process.env.cacheLoaderDir!)));\r\n console.log(\" - terser cache: %s\", chalk.gray(JSON.parse(process.env.terserDir!)));\r\n console.log(\r\n \" - tsconfig: %s\",\r\n chalk.gray(resolve(configuration.context, join(modulePaths.cliPath, \"./tsconfig.cli.json\")))\r\n );\r\n console.log(\" - aliases:\");\r\n const unchanged: string[] = [];\r\n for (const key of Object.keys(alias)) {\r\n if (alias[key] == null) {\r\n continue;\r\n }\r\n\r\n try {\r\n const resolved = dirname(\r\n require.resolve(key + \"/package.json\", { paths: [configuration.entry] })\r\n );\r\n const cwdRelative = relative(process.cwd(), alias[key]!);\r\n if (relative(process.cwd(), resolved) === cwdRelative) {\r\n unchanged.push(key);\r\n } else {\r\n console.log(\" %s -> %s\", chalk.greenBright(key), chalk.cyan(cwdRelative));\r\n }\r\n } catch (err) {}\r\n }\r\n if (unchanged.length > 0) {\r\n console.log(\" - aliases resolving to default paths:\");\r\n console.log(\" \" + unchanged.join(\", \"));\r\n }\r\n\r\n if (\r\n configuration.bundleOptions.momentLocales &&\r\n configuration.bundleOptions.momentLocales.length > 0\r\n ) {\r\n console.log(\" - moment locales:\");\r\n for (const locale of configuration.bundleOptions.momentLocales) {\r\n console.log(\" %s\", chalk.greenBright(locale));\r\n }\r\n }\r\n\r\n if (configuration.bundleOptions.momentTimezones) {\r\n const years = `${configuration.bundleOptions.momentTimezones.startYear || \"\"}-${configuration\r\n .bundleOptions.momentTimezones.endYear || \"\"}`;\r\n console.log(\r\n \" - moment timezones: %s%s\",\r\n years.length === 1 ? \"\" : years,\r\n configuration.bundleOptions.momentTimezones.matchZones ? \", matching zones\" : \"\"\r\n );\r\n }\r\n\r\n console.log(\" - aliases:\");\r\n for (const key in alias) {\r\n if (alias[key] != null) {\r\n console.log(\" %s -> %s\", key, relative(process.cwd(), alias[key]!));\r\n }\r\n }\r\n }\r\n\r\n if (process.env.WEBPACK_PROFILE === \"true\") {\r\n console.log(\" profiling build!\");\r\n }\r\n if (process.env.WEBPACK_BUNDLE_ANALYZE === \"true\") {\r\n console.log(\" analyzing build!\");\r\n }\r\n}\r\n"]}
\No newline at end of file