"use strict";
var _this = this;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var immutable_1 = require("immutable");
var path_1 = require("path");
exports.default = function (options) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
    var src, dest, editor, eslintConfig, migratorConfig;
    return tslib_1.__generator(this, function (_a) {
        src = options.get("src");
        dest = options.get("dest");
        editor = options.get("editor");
        // Copy files from app scaffold as basis for migrated app source
        editor.copy(path_1.join(process.cwd(), "node_modules/app_scaffold/**"), dest, {
            globOptions: { dot: true }
        });
        eslintConfig = immutable_1.Map(editor.readJSON(dest + "/.eslintrc"));
        migratorConfig = eslintConfig.merge({
            root: true,
            globals: {
                helpers: true,
                Base64: true
            },
            rules: {
                "no-unused-vars": 0,
                "no-undef": 0,
                "no-console": 0
            }
        });
        editor.writeJSON(dest + "/.eslintrc", migratorConfig);
        return [2 /*return*/];
    });
}); };
