"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.exit = exit;
exports.runtime = runtime;
var logger = _interopRequireWildcard(require("./logger"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
// TODO: 先注释，因为这里要考虑比如 @alipay/bigfish 不应该走这个提示
// const FEEDBACK_MESSAGE = '如果你需要进交流群，请访问 https://fb.umijs.org';

function exit() {
  const loggerPath = logger.getLatestLogFilePath();
  if (loggerPath) {
    logger.fatal('A complete log of this run can be found in:');
    logger.fatal(loggerPath);
  }
  logger.fatal('Consider reporting a GitHub issue on https://github.com/YeWills/psky/issues');
  // logger.fatal(FEEDBACK_MESSAGE);
}

function runtime(e) {
  logger.error(e);
  // logger.fatal(FEEDBACK_MESSAGE);
}