alex-c-line 1.29.0 → 1.30.0

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.
package/dist/index.cjs CHANGED
@@ -28,14 +28,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  //#endregion
29
29
  let _alextheman_utility = require("@alextheman/utility");
30
30
  let commander = require("commander");
31
+ let chalk = require("chalk");
32
+ chalk = __toESM(chalk);
31
33
  let canvas = require("canvas");
32
34
  let node_fs_promises = require("node:fs/promises");
33
35
  let node_path = require("node:path");
34
36
  node_path = __toESM(node_path);
35
37
  let boxen = require("boxen");
36
38
  boxen = __toESM(boxen);
37
- let chalk = require("chalk");
38
- chalk = __toESM(chalk);
39
39
  let figlet = require("figlet");
40
40
  figlet = __toESM(figlet);
41
41
  let env_paths = require("env-paths");
@@ -120,8 +120,17 @@ async function createAlexCLineArtwork(options) {
120
120
  //#endregion
121
121
  //#region src/commands/artwork.ts
122
122
  function artwork(program) {
123
- program.command("artwork").description("Create the artwork for alex-c-line").option("--save-png [fileName]", "Save the artwork as a PNG file, optionally specifying the path").action(async ({ savePng: fileName }) => {
124
- console.info(await createAlexCLineArtwork({ includeColors: true }));
123
+ program.command("artwork").description("Create the artwork for alex-c-line").option("--subtitle-text <subtitleText>", "Customise the subtitle text").option("--subtitle-color <subtitleColor>", "Customise the subtitle color", (subtitleColor) => {
124
+ return {
125
+ green: chalk.default.green,
126
+ white: chalk.default.white
127
+ }[subtitleColor];
128
+ }).option("--save-png [fileName]", "Save the artwork as a PNG file, optionally specifying the path").action(async ({ savePng: fileName, subtitleText, subtitleColor }) => {
129
+ console.info(await createAlexCLineArtwork({
130
+ includeColors: true,
131
+ subtitleText,
132
+ subtitleColor
133
+ }));
125
134
  if (fileName) await asciiToPng(await createAlexCLineArtwork({ includeColors: false }), {
126
135
  fileName: typeof fileName === "string" ? fileName : void 0,
127
136
  fontSize: 90
@@ -1295,7 +1304,7 @@ function parseZodSchemaForProgram(programError, schema, data) {
1295
1304
  //#endregion
1296
1305
  //#region package.json
1297
1306
  var name = "alex-c-line";
1298
- var version = "1.29.0";
1307
+ var version = "1.30.0";
1299
1308
  var description = "Command-line tool with commands to streamline the developer workflow.";
1300
1309
 
1301
1310
  //#endregion
package/dist/index.js CHANGED
@@ -2,11 +2,11 @@
2
2
  import { createRequire } from "node:module";
3
3
  import { DataError, ONE_DAY_IN_MILLISECONDS, VersionNumber, VersionType, encryptWithKey, fillArray, getStringsAndInterpolations, interpolate, isTemplateStringsArray, kebabToCamel, normaliseIndents, omitProperties, parseBoolean, parseVersionType, parseZodSchema, parseZodSchemaAsync, removeDuplicates, removeUndefinedFromObject, stringifyDotenv } from "@alextheman/utility";
4
4
  import { Command } from "commander";
5
+ import chalk from "chalk";
5
6
  import { createCanvas } from "canvas";
6
7
  import { access, mkdir, readFile, readdir, rename, rm, rmdir, writeFile } from "node:fs/promises";
7
8
  import path from "node:path";
8
9
  import boxen from "boxen";
9
- import chalk from "chalk";
10
10
  import figlet from "figlet";
11
11
  import envPaths from "env-paths";
12
12
  import { ExecaError, execa } from "execa";
@@ -82,8 +82,17 @@ async function createAlexCLineArtwork(options) {
82
82
  //#endregion
83
83
  //#region src/commands/artwork.ts
84
84
  function artwork(program) {
85
- program.command("artwork").description("Create the artwork for alex-c-line").option("--save-png [fileName]", "Save the artwork as a PNG file, optionally specifying the path").action(async ({ savePng: fileName }) => {
86
- console.info(await createAlexCLineArtwork({ includeColors: true }));
85
+ program.command("artwork").description("Create the artwork for alex-c-line").option("--subtitle-text <subtitleText>", "Customise the subtitle text").option("--subtitle-color <subtitleColor>", "Customise the subtitle color", (subtitleColor) => {
86
+ return {
87
+ green: chalk.green,
88
+ white: chalk.white
89
+ }[subtitleColor];
90
+ }).option("--save-png [fileName]", "Save the artwork as a PNG file, optionally specifying the path").action(async ({ savePng: fileName, subtitleText, subtitleColor }) => {
91
+ console.info(await createAlexCLineArtwork({
92
+ includeColors: true,
93
+ subtitleText,
94
+ subtitleColor
95
+ }));
87
96
  if (fileName) await asciiToPng(await createAlexCLineArtwork({ includeColors: false }), {
88
97
  fileName: typeof fileName === "string" ? fileName : void 0,
89
98
  fontSize: 90
@@ -1257,7 +1266,7 @@ function parseZodSchemaForProgram(programError, schema, data) {
1257
1266
  //#endregion
1258
1267
  //#region package.json
1259
1268
  var name = "alex-c-line";
1260
- var version = "1.29.0";
1269
+ var version = "1.30.0";
1261
1270
  var description = "Command-line tool with commands to streamline the developer workflow.";
1262
1271
 
1263
1272
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alex-c-line",
3
- "version": "1.29.0",
3
+ "version": "1.30.0",
4
4
  "description": "Command-line tool with commands to streamline the developer workflow.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -73,7 +73,7 @@
73
73
  },
74
74
  "scripts": {
75
75
  "build": "tsdown",
76
- "command": "bash -c 'pnpm run build && echo && echo \"Command output:\" && node dist/index.js $@' --",
76
+ "command": "bash -c 'pnpm run build && echo && echo \"Command output:\" && node dist/index.js \"$@\"' --",
77
77
  "create-local-package": "pnpm run build && rm -f alex-c-line-*.tgz && pnpm pack",
78
78
  "create-release-note": "bash -c 'git pull origin main && pnpm run command create-release-note-2 $@' --",
79
79
  "format": "pnpm run format-prettier && pnpm run format-eslint",