'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = isFileAutoGenerated;

var _fs;

function _load_fs() {
  return _fs = _interopRequireDefault(require('fs'));
}

var _constants;

function _load_constants() {
  return _constants = require('../constants');
}

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * check if file was auto generated by bit
 *
 * @param {PathOsBased} filePath - consumer path
 * @returns {boolean}
 */
function isFileAutoGenerated(filePath) {
  var fileContent = (_fs || _load_fs()).default.readFileSync(filePath).toString();
  return fileContent.includes((_constants || _load_constants()).AUTO_GENERATED_STAMP);
}