From e28ae75faa773953a12b3870a767e7788cf8e4da Mon Sep 17 00:00:00 2001 From: Saiichi Hashimoto Date: Tue, 16 Jan 2024 14:28:39 -0600 Subject: [PATCH] fix(output): change CRON to cron/Cron --- .github/settings.yml | 1 + README.md | 2 ++ package.json | 1 + src/index.test.ts | 12 ++++++------ src/index.ts | 6 +++--- src/vercel-cron.test.ts | 6 +++--- src/vercel-cron.ts | 2 +- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index c5fd47d..b79f94d 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -2,6 +2,7 @@ _extends: .github repository: name: vercel-cron + description: TODO private: false branches: - name: main diff --git a/README.md b/README.md index 5266f4b..d51e79f 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,5 @@ [![License](https://img.shields.io/github/license/saiichihashimoto/vercel-cron?style=flat)](LICENSE) [![GitHub Sponsors](https://img.shields.io/github/sponsors/saiichihashimoto?style=flat)](https://github.com/sponsors/saiichihashimoto) + +TODO diff --git a/package.json b/package.json index 0f3927f..dabbf12 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "$schema": "https://json.schemastore.org/package.json", "name": "vercel-cron", "version": "0.0.0-development", + "description": "TODO", "funding": { "type": "individual", "url": "https://github.com/sponsors/saiichihashimoto" diff --git a/src/index.test.ts b/src/index.test.ts index 9c80175..cdc55cf 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -122,7 +122,7 @@ describe("main", () => { time: 1696486441293, msg: "Watching Config", }, - { level: 40, time: 1696486441293, msg: "No CRONs Scheduled" }, + { level: 40, time: 1696486441293, msg: "No Crons Scheduled" }, ]); }); @@ -152,11 +152,11 @@ describe("main", () => { time: 1696486441293, msg: "Watching Config", }, - { level: 40, time: 1696486441293, msg: "No CRONs Scheduled" }, + { level: 40, time: 1696486441293, msg: "No Crons Scheduled" }, ]); }); - it("executes CRON when schedule passes", async () => { + it("executes cron when schedule passes", async () => { const { fs } = memfs( { "./vercel.json": JSON.stringify({ @@ -349,7 +349,7 @@ describe("main", () => { destination.clear(); }); - it("reschedules CRONs on file change", async () => { + it("reschedules crons on file change", async () => { const { fs, vol } = memfs( { "./vercel.json": JSON.stringify({ @@ -389,7 +389,7 @@ describe("main", () => { msg: "Config Changed", time: 1696486441293, }, - { level: 40, msg: "No CRONs Scheduled", time: 1696486441293 }, + { level: 40, msg: "No Crons Scheduled", time: 1696486441293 }, ]); destination.clear(); @@ -419,7 +419,7 @@ describe("main", () => { }, { level: 60, - msg: "Failed to Schedule CRONs", + msg: "Failed to Schedule Crons", time: 1696486441293, error: { type: "ZodError", diff --git a/src/index.ts b/src/index.ts index 6930c2d..df54c8c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -98,7 +98,7 @@ export const main = async ({ if (logger.isLevelEnabled("info") && pretty) { /* eslint-disable no-console -- boxen! */ console.log( - boxen("▲ Vercel CRON ▲", { + boxen("▲ Vercel Cron ▲", { borderColor: color ? "magenta" : undefined, borderStyle: "round", padding: 1, @@ -177,7 +177,7 @@ export const main = async ({ }); if (!crons.length) { - logger.warn("No CRONs Scheduled"); + logger.warn("No Crons Scheduled"); } return controller.abort.bind(controller); @@ -199,7 +199,7 @@ export const main = async ({ // eslint-disable-next-line require-atomic-updates -- HACK abortPrevious = await scheduleCrons(); } catch (error) { - logger.fatal({ error }, "Failed to Schedule CRONs"); + logger.fatal({ error }, "Failed to Schedule Crons"); abortPrevious = () => {}; } }) satisfies Parameters[1]); diff --git a/src/vercel-cron.test.ts b/src/vercel-cron.test.ts index c7fbef8..19c9277 100644 --- a/src/vercel-cron.test.ts +++ b/src/vercel-cron.test.ts @@ -53,7 +53,7 @@ Options: -u --url Base URL (default: "http://localhost:3000") -p --config Vercel Config (default: "./vercel.json") -s --secret Cron Secret (default: \`process.env.CRON_SECRET\`) - --dry Shows scheduled CRONs and quit + --dry Shows scheduled Crons and quit --color Show terminal colors (default: \`chalk.supportsColor\`) --no-pretty No pretty printing, just a JSON stream of logs -l --level Logging Level (choices: "trace", "debug", "info", @@ -90,11 +90,11 @@ Options: expect(stdout).toBe( `${chalk.magenta("╭─────────────────────────╮")} ${chalk.magenta("│")} ${chalk.magenta("│")} -${chalk.magenta("│")} ▲ Vercel CRON ▲ ${chalk.magenta("│")} +${chalk.magenta("│")} ▲ Vercel Cron ▲ ${chalk.magenta("│")} ${chalk.magenta("│")} ${chalk.magenta("│")} ${chalk.magenta("╰─────────────────────────╯")} -${chalk.yellow("WARN")}: ${chalk.cyan(`No CRONs Scheduled`)} +${chalk.yellow("WARN")}: ${chalk.cyan(`No Crons Scheduled`)} ` ); }); diff --git a/src/vercel-cron.ts b/src/vercel-cron.ts index 678ad6b..a2274dd 100644 --- a/src/vercel-cron.ts +++ b/src/vercel-cron.ts @@ -21,7 +21,7 @@ import pkg from "../package.json"; "`process.env.CRON_SECRET`" ) ) - .option("--dry", "Shows scheduled CRONs and quit") + .option("--dry", "Shows scheduled Crons and quit") .addOption( new Option("--color", "Show terminal colors").default( Boolean(chalk.supportsColor),