Browse Source

version from package.json

pull/8/head
rozetko 2 years ago
parent
commit
864537766d
  1. 4
      src/tsdb-kit/index.ts

4
src/tsdb-kit/index.ts

@ -2,13 +2,13 @@ import { queryByConfig, QueryConfig } from '..';
import { DatasourceType, QueryType } from '../connectors';
const { version } = require('../../package.json')
import { ArgumentParser } from 'argparse';
import * as _ from 'lodash';
const parser = new ArgumentParser();
// TODO: parse version from package.json
parser.add_argument('-v', '--version', { action: 'version', version: '0.1.1' });
parser.add_argument('-v', '--version', { action: 'version', version });
parser.add_argument('-u', '--url', { help: 'Datasource URL', required: true });
parser.add_argument('-q', '--query', { help: 'Query Template', required: true });
parser.add_argument('-f', '--from', { help: 'From timestamp (ms), e.g. 1660670020000. If not specified, `now-5m` is used' });

Loading…
Cancel
Save