alex-c-line 2.12.3 → 2.13.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.
@@ -0,0 +1,32 @@
1
+ import { normaliseIndents } from "@alextheman/utility";
2
+ //#region src/cli/notifications/helpers/birthdays.ts
3
+ const birthdays = {
4
+ alex: {
5
+ date: Temporal.PlainDate.from({
6
+ day: 16,
7
+ month: 7,
8
+ year: 2003
9
+ }),
10
+ getMessage: (age) => {
11
+ return normaliseIndents`
12
+ Happy birthday to AlexMan123456, my creator! 🎉
13
+ He has turned ${age} years old today!
14
+ `;
15
+ }
16
+ },
17
+ "alex-c-line": {
18
+ date: Temporal.PlainDate.from({
19
+ day: 20,
20
+ month: 7,
21
+ year: 2025
22
+ }),
23
+ getMessage: (age) => {
24
+ return normaliseIndents`
25
+ Happy birthday to me, alex-c-line! 🎉
26
+ I have turned ${age} years old today!
27
+ `;
28
+ }
29
+ }
30
+ };
31
+ //#endregion
32
+ export { birthdays as default };
@@ -0,0 +1,32 @@
1
+ let _alextheman_utility = require("@alextheman/utility");
2
+ //#region src/cli/notifications/helpers/birthdays.ts
3
+ const birthdays = {
4
+ alex: {
5
+ date: Temporal.PlainDate.from({
6
+ day: 16,
7
+ month: 7,
8
+ year: 2003
9
+ }),
10
+ getMessage: (age) => {
11
+ return _alextheman_utility.normaliseIndents`
12
+ Happy birthday to AlexMan123456, my creator! 🎉
13
+ He has turned ${age} years old today!
14
+ `;
15
+ }
16
+ },
17
+ "alex-c-line": {
18
+ date: Temporal.PlainDate.from({
19
+ day: 20,
20
+ month: 7,
21
+ year: 2025
22
+ }),
23
+ getMessage: (age) => {
24
+ return _alextheman_utility.normaliseIndents`
25
+ Happy birthday to me, alex-c-line! 🎉
26
+ I have turned ${age} years old today!
27
+ `;
28
+ }
29
+ }
30
+ };
31
+ //#endregion
32
+ exports.default = birthdays;
@@ -1,7 +1,8 @@
1
1
  import { DependencyGroup, DependencyGroup as DependencyGroup$1, PackageManager } from "@alextheman/utility/internal";
2
+ import "commander";
2
3
  import { Options, Result, TemplateExpression } from "execa";
4
+ import "zod";
3
5
  import { CreateEnumType } from "@alextheman/utility";
4
-
5
6
  //#region src/cli/commands/root/pre-commit/createStepRunner.d.ts
6
7
  interface BaseOptions {
7
8
  stdio: "inherit";
@@ -55,7 +56,8 @@ type TemplatePullRequestConfig = TemplatePullRequestGeneralConfig | TemplatePull
55
56
  interface AlexCLineConfig<ScriptName extends string = string> {
56
57
  /** Configure settings related to the `alex-c-line` templates. */
57
58
  template?: {
58
- /** Configure settings related to the pull request templates. */pullRequest?: TemplatePullRequestConfig;
59
+ /** Configure settings related to the pull request templates. */
60
+ pullRequest?: TemplatePullRequestConfig;
59
61
  };
60
62
  /** Configure the behaviour of the pre-commit command. */
61
63
  preCommit?: PreCommitConfig<ScriptName>;
@@ -1,8 +1,8 @@
1
1
  import { CreateEnumType } from "@alextheman/utility";
2
2
  import z from "zod";
3
3
  import { DependencyGroup, DependencyGroup as DependencyGroup$1, PackageManager } from "@alextheman/utility/internal";
4
+ import "commander";
4
5
  import { Options, Result, TemplateExpression } from "execa";
5
-
6
6
  //#region src/cli/commands/root/pre-commit/createStepRunner.d.ts
7
7
  interface BaseOptions {
8
8
  stdio: "inherit";
@@ -56,7 +56,8 @@ type TemplatePullRequestConfig = TemplatePullRequestGeneralConfig | TemplatePull
56
56
  interface AlexCLineConfig<ScriptName extends string = string> {
57
57
  /** Configure settings related to the `alex-c-line` templates. */
58
58
  template?: {
59
- /** Configure settings related to the pull request templates. */pullRequest?: TemplatePullRequestConfig;
59
+ /** Configure settings related to the pull request templates. */
60
+ pullRequest?: TemplatePullRequestConfig;
60
61
  };
61
62
  /** Configure the behaviour of the pre-commit command. */
62
63
  preCommit?: PreCommitConfig<ScriptName>;
@@ -1,5 +1,7 @@
1
1
  import { PackageManager } from "@alextheman/utility/internal";
2
+ import "commander";
2
3
  import { Options, Result, TemplateExpression } from "execa";
4
+ import "@alextheman/utility";
3
5
  //#region src/cli/commands/root/pre-commit/createStepRunner.d.ts
4
6
  interface BaseOptions {
5
7
  stdio: "inherit";
@@ -53,7 +55,8 @@ type TemplatePullRequestConfig = TemplatePullRequestGeneralConfig | TemplatePull
53
55
  interface AlexCLineConfig<ScriptName extends string = string> {
54
56
  /** Configure settings related to the `alex-c-line` templates. */
55
57
  template?: {
56
- /** Configure settings related to the pull request templates. */pullRequest?: TemplatePullRequestConfig;
58
+ /** Configure settings related to the pull request templates. */
59
+ pullRequest?: TemplatePullRequestConfig;
57
60
  };
58
61
  /** Configure the behaviour of the pre-commit command. */
59
62
  preCommit?: PreCommitConfig<ScriptName>;
@@ -64,6 +67,7 @@ declare let scripts: {
64
67
  build: string;
65
68
  command: string;
66
69
  "create-local-package": string;
70
+ "create-release": string;
67
71
  "create-release-note": string;
68
72
  dev: string;
69
73
  format: string;
@@ -1,5 +1,7 @@
1
1
  import { PackageManager } from "@alextheman/utility/internal";
2
+ import "commander";
2
3
  import { Options, Result, TemplateExpression } from "execa";
4
+ import "@alextheman/utility";
3
5
  //#region src/cli/commands/root/pre-commit/createStepRunner.d.ts
4
6
  interface BaseOptions {
5
7
  stdio: "inherit";
@@ -53,7 +55,8 @@ type TemplatePullRequestConfig = TemplatePullRequestGeneralConfig | TemplatePull
53
55
  interface AlexCLineConfig<ScriptName extends string = string> {
54
56
  /** Configure settings related to the `alex-c-line` templates. */
55
57
  template?: {
56
- /** Configure settings related to the pull request templates. */pullRequest?: TemplatePullRequestConfig;
58
+ /** Configure settings related to the pull request templates. */
59
+ pullRequest?: TemplatePullRequestConfig;
57
60
  };
58
61
  /** Configure the behaviour of the pre-commit command. */
59
62
  preCommit?: PreCommitConfig<ScriptName>;
@@ -64,6 +67,7 @@ declare let scripts: {
64
67
  build: string;
65
68
  command: string;
66
69
  "create-local-package": string;
70
+ "create-release": string;
67
71
  "create-release-note": string;
68
72
  dev: string;
69
73
  format: string;
package/dist/index.cjs CHANGED
@@ -1400,7 +1400,7 @@ function templateReleaseNoteCreate(program) {
1400
1400
  if (_alextheman_utility_v6.DataError.check(error) && error.code === "INVALID_VERSION") return (0, _alextheman_utility.parseVersionType)(rawValue);
1401
1401
  throw error;
1402
1402
  }
1403
- }).option("--content <content>", "Set the content of the release note").description("Create release notes based on the current version in package.json.").action(async (target, { content }) => {
1403
+ }).option("--content <content>", "Set the content of the release note").option("--status <status>", "Set the initial release note status", parseReleaseStatus, ReleaseStatus.IN_PROGRESS).option("--update-version", "Update the version in package.json alongside creating the release note.", false).description("Create release notes based on the current version in package.json.").action(async (target, { content, status, updateVersion }) => {
1404
1404
  const packageInfo = await (0, _alextheman_utility_internal.getPackageJsonContents)(process.cwd());
1405
1405
  const { name, version: packageVersion } = _alextheman_utility.az.with(zod.default.object({
1406
1406
  name: zod.default.string(),
@@ -1409,12 +1409,13 @@ function templateReleaseNoteCreate(program) {
1409
1409
  const versionNumber = target instanceof _alextheman_utility.VersionNumber ? target : target ? new _alextheman_utility.VersionNumber(packageVersion).increment(target) : new _alextheman_utility.VersionNumber(packageVersion);
1410
1410
  const releaseNotePath = getReleaseNotePath(versionNumber);
1411
1411
  const releaseNoteTemplate = await createReleaseNoteFromTemplates(name, versionNumber, {
1412
- status: "In progress",
1412
+ status,
1413
1413
  editableSection: content
1414
1414
  });
1415
1415
  try {
1416
1416
  await (0, node_fs_promises.mkdir)(node_path.default.dirname(releaseNotePath), { recursive: true });
1417
1417
  await (0, node_fs_promises.writeFile)(releaseNotePath, releaseNoteTemplate, { flag: "wx" });
1418
+ console.info(`Release notes for ${versionNumber} have been created in ${node_path.default.relative(process.cwd(), releaseNotePath)}`);
1418
1419
  } catch (error) {
1419
1420
  if (error instanceof Error && "code" in error && error.code === "EEXIST") program.error(`${ERROR_PREFIX} Release notes already exist.`, {
1420
1421
  exitCode: 1,
@@ -1422,7 +1423,12 @@ function templateReleaseNoteCreate(program) {
1422
1423
  });
1423
1424
  else throw error;
1424
1425
  }
1425
- console.info(`Release notes for ${versionNumber} have been created in ${node_path.default.relative(process.cwd(), releaseNotePath)}`);
1426
+ if (updateVersion) {
1427
+ const newPackageInfo = { ...packageInfo };
1428
+ newPackageInfo.version = versionNumber.format({ omitPrefix: true });
1429
+ await (0, node_fs_promises.writeFile)(node_path.default.join(process.cwd(), "package.json"), `${JSON.stringify(newPackageInfo, null, 2)}\n`);
1430
+ console.info(`Updated the version in package.json to ${versionNumber}`);
1431
+ }
1426
1432
  });
1427
1433
  }
1428
1434
  //#endregion
@@ -1487,7 +1493,7 @@ function template(program) {
1487
1493
  //#endregion
1488
1494
  //#region package.json
1489
1495
  var name = "alex-c-line";
1490
- var version$1 = "2.12.3";
1496
+ var version$1 = "2.13.0";
1491
1497
  var description = "Command-line tool with commands to streamline the developer workflow.";
1492
1498
  //#endregion
1493
1499
  //#region src/cli/notifications/updates/checkUpdate.ts
@@ -1752,40 +1758,11 @@ async function sendBirthdayNotification(message) {
1752
1758
  console.info(messageWithArtwork);
1753
1759
  }
1754
1760
  //#endregion
1755
- //#region src/cli/notifications/helpers/birthdays.ts
1756
- const birthdays = {
1757
- alex: {
1758
- date: Temporal.PlainDate.from({
1759
- day: 16,
1760
- month: 7,
1761
- year: 2003
1762
- }),
1763
- getMessage: (age) => {
1764
- return _alextheman_utility.normaliseIndents`
1765
- Happy birthday to AlexMan123456, my creator! 🎉
1766
- He has turned ${age} years old today!
1767
- `;
1768
- }
1769
- },
1770
- "alex-c-line": {
1771
- date: Temporal.PlainDate.from({
1772
- day: 20,
1773
- month: 7,
1774
- year: 2025
1775
- }),
1776
- getMessage: (age) => {
1777
- return _alextheman_utility.normaliseIndents`
1778
- Happy birthday to me, alex-c-line! 🎉
1779
- I have turned ${age} years old today!
1780
- `;
1781
- }
1782
- }
1783
- };
1784
- //#endregion
1785
1761
  //#region src/cli/notifications/birthday/maybeSendBirthdayNotification.ts
1786
1762
  async function maybeSendBirthdayNotification() {
1787
1763
  try {
1788
1764
  if (typeof Temporal === "undefined") return;
1765
+ const { default: birthdays } = await Promise.resolve().then(() => require("./birthdays-C_y68wAl.cjs"));
1789
1766
  const currentDate = Temporal.Now.plainDateISO();
1790
1767
  const cacheData = await loadAlexCLineGlobalCache();
1791
1768
  for (const [birthdayId, birthdayData] of Object.entries(birthdays)) {
package/dist/index.js CHANGED
@@ -1369,7 +1369,7 @@ function templateReleaseNoteCreate(program) {
1369
1369
  if (DataError.check(error) && error.code === "INVALID_VERSION") return parseVersionType(rawValue);
1370
1370
  throw error;
1371
1371
  }
1372
- }).option("--content <content>", "Set the content of the release note").description("Create release notes based on the current version in package.json.").action(async (target, { content }) => {
1372
+ }).option("--content <content>", "Set the content of the release note").option("--status <status>", "Set the initial release note status", parseReleaseStatus, ReleaseStatus.IN_PROGRESS).option("--update-version", "Update the version in package.json alongside creating the release note.", false).description("Create release notes based on the current version in package.json.").action(async (target, { content, status, updateVersion }) => {
1373
1373
  const packageInfo = await getPackageJsonContents(process.cwd());
1374
1374
  const { name, version: packageVersion } = az.with(z.object({
1375
1375
  name: z.string(),
@@ -1378,12 +1378,13 @@ function templateReleaseNoteCreate(program) {
1378
1378
  const versionNumber = target instanceof VersionNumber ? target : target ? new VersionNumber(packageVersion).increment(target) : new VersionNumber(packageVersion);
1379
1379
  const releaseNotePath = getReleaseNotePath(versionNumber);
1380
1380
  const releaseNoteTemplate = await createReleaseNoteFromTemplates(name, versionNumber, {
1381
- status: "In progress",
1381
+ status,
1382
1382
  editableSection: content
1383
1383
  });
1384
1384
  try {
1385
1385
  await mkdir(path.dirname(releaseNotePath), { recursive: true });
1386
1386
  await writeFile(releaseNotePath, releaseNoteTemplate, { flag: "wx" });
1387
+ console.info(`Release notes for ${versionNumber} have been created in ${path.relative(process.cwd(), releaseNotePath)}`);
1387
1388
  } catch (error) {
1388
1389
  if (error instanceof Error && "code" in error && error.code === "EEXIST") program.error(`${ERROR_PREFIX} Release notes already exist.`, {
1389
1390
  exitCode: 1,
@@ -1391,7 +1392,12 @@ function templateReleaseNoteCreate(program) {
1391
1392
  });
1392
1393
  else throw error;
1393
1394
  }
1394
- console.info(`Release notes for ${versionNumber} have been created in ${path.relative(process.cwd(), releaseNotePath)}`);
1395
+ if (updateVersion) {
1396
+ const newPackageInfo = { ...packageInfo };
1397
+ newPackageInfo.version = versionNumber.format({ omitPrefix: true });
1398
+ await writeFile(path.join(process.cwd(), "package.json"), `${JSON.stringify(newPackageInfo, null, 2)}\n`);
1399
+ console.info(`Updated the version in package.json to ${versionNumber}`);
1400
+ }
1395
1401
  });
1396
1402
  }
1397
1403
  //#endregion
@@ -1456,7 +1462,7 @@ function template(program) {
1456
1462
  //#endregion
1457
1463
  //#region package.json
1458
1464
  var name = "alex-c-line";
1459
- var version$1 = "2.12.3";
1465
+ var version$1 = "2.13.0";
1460
1466
  var description = "Command-line tool with commands to streamline the developer workflow.";
1461
1467
  //#endregion
1462
1468
  //#region src/cli/notifications/updates/checkUpdate.ts
@@ -1721,40 +1727,11 @@ async function sendBirthdayNotification(message) {
1721
1727
  console.info(messageWithArtwork);
1722
1728
  }
1723
1729
  //#endregion
1724
- //#region src/cli/notifications/helpers/birthdays.ts
1725
- const birthdays = {
1726
- alex: {
1727
- date: Temporal.PlainDate.from({
1728
- day: 16,
1729
- month: 7,
1730
- year: 2003
1731
- }),
1732
- getMessage: (age) => {
1733
- return normaliseIndents`
1734
- Happy birthday to AlexMan123456, my creator! 🎉
1735
- He has turned ${age} years old today!
1736
- `;
1737
- }
1738
- },
1739
- "alex-c-line": {
1740
- date: Temporal.PlainDate.from({
1741
- day: 20,
1742
- month: 7,
1743
- year: 2025
1744
- }),
1745
- getMessage: (age) => {
1746
- return normaliseIndents`
1747
- Happy birthday to me, alex-c-line! 🎉
1748
- I have turned ${age} years old today!
1749
- `;
1750
- }
1751
- }
1752
- };
1753
- //#endregion
1754
1730
  //#region src/cli/notifications/birthday/maybeSendBirthdayNotification.ts
1755
1731
  async function maybeSendBirthdayNotification() {
1756
1732
  try {
1757
1733
  if (typeof Temporal === "undefined") return;
1734
+ const { default: birthdays } = await import("./birthdays-CWQxUfj-.js");
1758
1735
  const currentDate = Temporal.Now.plainDateISO();
1759
1736
  const cacheData = await loadAlexCLineGlobalCache();
1760
1737
  for (const [birthdayId, birthdayData] of Object.entries(birthdays)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alex-c-line",
3
- "version": "2.12.3",
3
+ "version": "2.13.0",
4
4
  "description": "Command-line tool with commands to streamline the developer workflow.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,7 +34,7 @@
34
34
  "templates"
35
35
  ],
36
36
  "dependencies": {
37
- "@alextheman/utility": "5.25.0",
37
+ "@alextheman/utility": "5.26.0",
38
38
  "@inquirer/prompts": "8.5.2",
39
39
  "axios": "1.18.1",
40
40
  "boxen": "8.0.1",
@@ -44,11 +44,11 @@
44
44
  "dotenv-stringify": "3.0.1",
45
45
  "env-paths": "4.0.0",
46
46
  "execa": "9.6.1",
47
- "figlet": "1.11.0",
47
+ "figlet": "1.11.2",
48
48
  "gray-matter": "4.0.3",
49
49
  "semver": "7.8.5",
50
50
  "supports-color": "10.2.2",
51
- "toml": "4.1.2",
51
+ "toml": "5.0.0",
52
52
  "zod": "4.4.3"
53
53
  },
54
54
  "devDependencies": {
@@ -56,23 +56,23 @@
56
56
  "@commander-js/extra-typings": "15.0.0",
57
57
  "@faker-js/faker": "10.5.0",
58
58
  "@types/eslint": "9.6.1",
59
- "@types/node": "26.1.0",
59
+ "@types/node": "26.1.1",
60
60
  "@types/semver": "7.7.1",
61
61
  "@types/update-notifier": "6.0.8",
62
62
  "cross-env": "10.1.0",
63
63
  "dotenv-cli": "11.0.0",
64
- "eslint": "10.6.0",
64
+ "eslint": "10.7.0",
65
65
  "husky": "9.1.7",
66
66
  "markdownlint-cli2": "0.23.0",
67
- "prettier": "3.9.4",
67
+ "prettier": "3.9.5",
68
68
  "tempy": "3.2.0",
69
69
  "ts-node": "10.9.2",
70
- "tsdown": "0.22.3",
71
- "tsx": "4.23.0",
70
+ "tsdown": "0.22.9",
71
+ "tsx": "4.23.1",
72
72
  "typescript": "6.0.3",
73
- "typescript-eslint": "8.62.1",
74
- "vite": "8.1.3",
75
- "vitest": "4.1.9"
73
+ "typescript-eslint": "8.64.0",
74
+ "vite": "8.1.5",
75
+ "vitest": "4.1.10"
76
76
  },
77
77
  "engines": {
78
78
  "node": ">=22.3.0"
@@ -81,6 +81,7 @@
81
81
  "build": "tsdown",
82
82
  "command": "bash -c 'pnpm run build && echo && echo \"Command output:\" && node dist/index.js \"$@\"' --",
83
83
  "create-local-package": "pnpm run build && rm -f alex-c-line-*.tgz && pnpm pack",
84
+ "create-release": "bash -c 'git pull origin main && pnpm run command template release-note create $@ --status \"Released\" --update-version' --",
84
85
  "create-release-note": "bash -c 'git pull origin main && pnpm run command template release-note create $@' --",
85
86
  "dev": "tsx src/cli/index.ts",
86
87
  "format": "pnpm run format-prettier && pnpm run format-eslint && pnpm run format-markdownlint",