sushiswap-watcher-ts/packages/route-processor-watcher/src/cli/checkpoint.ts
Prathamesh Musale ffc637f7a4 Generate watcher for sushiswap route-processor subgraph (#5)
Part of [Generate watchers for sushiswap subgraphs deployed in graph-node
](https://www.notion.so/Generate-watchers-for-sushiswap-subgraphs-deployed-in-graph-node-b3f2e475373d4ab1887d9f8720bd5ae6)

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
Reviewed-on: cerc-io/sushiswap-watcher-ts#5
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-06-12 13:10:43 +00:00

40 lines
850 B
TypeScript

//
// Copyright 2021 Vulcanize, Inc.
//
import yargs from 'yargs';
import 'reflect-metadata';
import debug from 'debug';
import { DEFAULT_CONFIG_PATH } from '@cerc-io/util';
import { hideBin } from 'yargs/helpers';
const log = debug('vulcanize:checkpoint');
const main = async () => {
return yargs(hideBin(process.argv))
.parserConfiguration({
'parse-numbers': false
}).options({
configFile: {
alias: 'f',
type: 'string',
require: true,
demandOption: true,
describe: 'configuration file path (toml)',
default: DEFAULT_CONFIG_PATH
}
})
.commandDir('checkpoint-cmds', { extensions: ['ts', 'js'], exclude: /([a-zA-Z0-9\s_\\.\-:])+(.d.ts)$/ })
.demandCommand(1)
.help()
.argv;
};
main().then(() => {
process.exit();
}).catch(err => {
log(err);
});