Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(function() {
var fs = require("fs");
var path = require("path");
var GithubAPI = require("github");
var splunkjs = require("splunk-sdk");
var Async = splunkjs.Async;
var ModularInputs = splunkjs.ModularInputs;
var Logger = ModularInputs.Logger;
var Event = ModularInputs.Event;
var Scheme = ModularInputs.Scheme;
var Argument = ModularInputs.Argument;
var utils = ModularInputs.utils;
// The version number should be updated every time a new version of the JavaScript SDK is released.
var SDK_UA_STRING = "splunk-sdk-javascript/1.9.0";
// Create easy to read date format.
function getDisplayDate(date) {
var monthStrings = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
date = new Date(date);
var repl = require("repl")
, path = require('path')
, fs = require('fs')
, splunk = require('splunk-sdk')
, prettyjson = require('prettyjson')
, url = require('url')
, open = require('open')
, Async = splunk.Async
, colors = require('colors')
, Table = require('cli-table')
, nconf = require('nconf');
var self = this;
var argv = require('minimist')(process.argv.slice(2));
var query = argv.query;
var verbose = argv.verbose;
var hosted = argv.hosted;
var useJson = argv.json;
function checkArgs() {
var firstParam = process.argv[2];
if (firstParam == "?" || firstParam == "help" || firstParam=="--help") {
console.log("\r\nusage:".white);
console.log("\t--host - Splunk's host".white.bold)