"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generate_1 = require("./generate");
// const shell = require('shelljs');
// const path = require('path');
const basePath = process.cwd();
const param = JSON.parse(process.argv[2]);
process.chdir(`${param.basePath}/generatedCode/frontend`);
// const fishxPath = ['node_modules', '.bin', 'fishx'].join(path.sep);
console.log('Fishx generate page:', param.pageName, param.pagePath, param.urlParams);
// let command = `${fishxPath} generate --force --page ${param.pageName} --path ${param.pagePath}`;
const generateParams = { force: true, page: param.pageName, component: null, param: null, path: param.pagePath };
if (param.urlParams) {
    generateParams.param = param.urlParams;
}
(0, generate_1.default)(generateParams);
// shell.exec(command);
process.chdir(basePath);
