@catladder/cli
Version:
Panter cli tool for cloud CI/CD and DevOps
19 lines (17 loc) • 470 B
text/typescript
import fetch from "node-fetch";
import { defineCommand } from "../../core/defineCommand";
export const commandDadjoke = defineCommand({
name: "fun dadjoke",
description: "something for jonas.",
group: "fun",
inputs: {},
execute: async (ctx) => {
const result = await fetch("https://icanhazdadjoke.com/", {
headers: { Accept: "text/plain" },
});
const text = await result.text();
ctx.log("");
ctx.log(text);
ctx.log("");
},
});