UNPKG

evmtools-node

Version:

このライブラリは、プライムブレインズ社で利用している「進捗管理ツール(Excel)」ファイルを読み込み、 プロジェクトの進捗状況や要員別の作業量を可視化するためのライブラリです。

54 lines 2.07 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const yargs_1 = __importDefault(require("yargs")); const helpers_1 = require("yargs/helpers"); const infrastructure_1 = require("../infrastructure"); const pbevm_show_pv_usercase_1 = require("../usercase/pbevm-show-pv-usercase"); const common_1 = require("../common"); const logger_1 = require("../logger"); const logger = (0, logger_1.getLogger)('main'); const main = () => { const { path, fromDate, toDate, assignee } = createArgs(); const fromDateD = new Date(`${fromDate}T00:00:00+0900`); const toDateD = toDate ? new Date(`${toDate}T00:00:00+0900`) : fromDateD; logger.info(`path: ${path}`); logger.info(`from: ${(0, common_1.dateStr)(fromDateD)}`); logger.info(`to: ${(0, common_1.dateStr)(toDateD)}`); logger.info(`assignee: ${assignee}`); const creator = new infrastructure_1.ExcelProjectCreator(path); new pbevm_show_pv_usercase_1.PbevmShowPvUsecase(creator) .execute(fromDateD, toDateD, assignee) .catch((error) => console.error(error)); }; const createArgs = () => { const argv = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv)) .usage('Usage: npx pbevm-show-pv [options]') .example(`npx pbevm-show-pv --path now.xlsm --fromDate 2025-07-07 --toDate 2025-07-11 \ --assignee '要員A'`, '') .option('path', { type: 'string', description: 'Excel file Path', default: './now.xlsm', }) .option('fromDate', { type: 'string', description: 'From Date', default: '2025-07-01', }) .option('toDate', { type: 'string', description: 'To Date', }) .option('assignee', { type: 'string', description: 'Assignee', }) .help() .parseSync(); // 型付きで取得 return argv; }; main(); //# sourceMappingURL=cli-pbevm-show-pv.js.map