onlineornot 0.0.0-91c0121 → 0.0.0-9779fde

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24051,7 +24051,7 @@ var Yargs = YargsFactory(esm_default);
24051
24051
  var yargs_default = Yargs;
24052
24052
 
24053
24053
  // package.json
24054
- var version = "0.0.0-91c0121";
24054
+ var version = "0.0.0-9779fde";
24055
24055
  var package_default = {
24056
24056
  name: "onlineornot",
24057
24057
  version,
@@ -25036,6 +25036,36 @@ async function checksHandler(args) {
25036
25036
  }
25037
25037
  }
25038
25038
 
25039
+ // src/checks/individualCheck.ts
25040
+ function checkOptions(yargs) {
25041
+ return yargs.positional("id", {
25042
+ describe: "The ID of the check you wish to fetch",
25043
+ type: "string",
25044
+ demandOption: true
25045
+ }).option("json", {
25046
+ describe: "Return output as JSON",
25047
+ type: "boolean",
25048
+ default: false
25049
+ });
25050
+ }
25051
+ async function checkHandler(args) {
25052
+ const result = await fetchResult(`/checks/${args.id}`);
25053
+ if (args.json) {
25054
+ logger.log(JSON.stringify(result, null, " "));
25055
+ } else {
25056
+ await printBanner();
25057
+ logger.table([
25058
+ {
25059
+ "Check ID": result.id,
25060
+ Name: result.name,
25061
+ URL: result.url,
25062
+ Status: result.status,
25063
+ "Last queued": result.lastQueued
25064
+ }
25065
+ ]);
25066
+ }
25067
+ }
25068
+
25039
25069
  // src/whoami.ts
25040
25070
  async function whoami() {
25041
25071
  logger.log("Getting User settings...");
@@ -25107,6 +25137,12 @@ function createCLIParser(argv) {
25107
25137
  checksOptions,
25108
25138
  checksHandler
25109
25139
  );
25140
+ onlineornot.command(
25141
+ "check <id>",
25142
+ "\u{1F5D2}\uFE0F Review a specific uptime check",
25143
+ checkOptions,
25144
+ checkHandler
25145
+ );
25110
25146
  onlineornot.command(
25111
25147
  "whoami",
25112
25148
  "\u{1F575}\uFE0F Retrieve your user info and test your auth config",