alex-c-line 2.12.0 → 2.12.1

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
@@ -1485,7 +1485,7 @@ function template(program) {
1485
1485
  //#endregion
1486
1486
  //#region package.json
1487
1487
  var name = "alex-c-line";
1488
- var version$1 = "2.12.0";
1488
+ var version$1 = "2.12.1";
1489
1489
  var description = "Command-line tool with commands to streamline the developer workflow.";
1490
1490
  //#endregion
1491
1491
  //#region src/cli/notifications/updates/checkUpdate.ts
@@ -1751,40 +1751,42 @@ async function sendBirthdayNotification(message) {
1751
1751
  }
1752
1752
  //#endregion
1753
1753
  //#region src/cli/notifications/helpers/birthdays.ts
1754
- const birthdays = [{
1755
- id: "alex",
1756
- date: /* @__PURE__ */ new Date("2003-07-16T00:00:00.000Z"),
1757
- getMessage: (age) => {
1758
- return _alextheman_utility.normaliseIndents`
1754
+ const birthdays = {
1755
+ alex: {
1756
+ date: /* @__PURE__ */ new Date("2003-07-16T00:00:00.000Z"),
1757
+ getMessage: (age) => {
1758
+ return _alextheman_utility.normaliseIndents`
1759
1759
  Happy birthday to AlexMan123456, my creator! 🎉
1760
1760
  He has turned ${age} years old today!
1761
1761
  `;
1762
- }
1763
- }, {
1764
- id: "alex-c-line",
1765
- date: /* @__PURE__ */ new Date("2025-07-20T00:00:00.000Z"),
1766
- getMessage: (age) => {
1767
- return _alextheman_utility.normaliseIndents`
1762
+ }
1763
+ },
1764
+ "alex-c-line": {
1765
+ date: /* @__PURE__ */ new Date("2025-07-20T00:00:00.000Z"),
1766
+ getMessage: (age) => {
1767
+ return _alextheman_utility.normaliseIndents`
1768
1768
  Happy birthday to me, alex-c-line! 🎉
1769
1769
  I have turned ${age} years old today!
1770
1770
  `;
1771
+ }
1771
1772
  }
1772
- }];
1773
+ };
1773
1774
  //#endregion
1774
1775
  //#region src/cli/notifications/birthday/maybeSendBirthdayNotification.ts
1775
1776
  async function maybeSendBirthdayNotification() {
1776
1777
  try {
1777
1778
  const cacheData = await loadAlexCLineGlobalCache();
1778
1779
  const currentDate = /* @__PURE__ */ new Date();
1779
- for (const birthday of birthdays) {
1780
- const lastChecked = cacheData?.birthdayChecks?.[birthday.id] ? new Date(cacheData.birthdayChecks[birthday.id]) : void 0;
1781
- if ((lastChecked === void 0 || lastChecked.getFullYear() !== currentDate.getFullYear()) && (0, _alextheman_utility.isAnniversary)(currentDate, birthday.date)) {
1782
- await sendBirthdayNotification(birthday.getMessage(currentDate.getFullYear() - birthday.date.getFullYear()));
1780
+ for (const [birthdayId, birthdayData] of Object.entries(birthdays)) {
1781
+ const cacheKey = `${version$1}_${birthdayId}`;
1782
+ const lastChecked = cacheData?.birthdayChecks?.[cacheKey] ? new Date(cacheData.birthdayChecks[cacheKey]) : void 0;
1783
+ if ((lastChecked === void 0 || lastChecked.getFullYear() !== currentDate.getFullYear()) && (0, _alextheman_utility.isAnniversary)(currentDate, birthdayData.date)) {
1784
+ await sendBirthdayNotification(birthdayData.getMessage(currentDate.getFullYear() - birthdayData.date.getFullYear()));
1783
1785
  await createAlexCLineGlobalCache({
1784
1786
  ...cacheData ?? {},
1785
1787
  birthdayChecks: {
1786
1788
  ...cacheData?.birthdayChecks ?? {},
1787
- [birthday.id]: currentDate.toISOString()
1789
+ [cacheKey]: currentDate.toISOString()
1788
1790
  }
1789
1791
  });
1790
1792
  }
package/dist/index.js CHANGED
@@ -1454,7 +1454,7 @@ function template(program) {
1454
1454
  //#endregion
1455
1455
  //#region package.json
1456
1456
  var name = "alex-c-line";
1457
- var version$1 = "2.12.0";
1457
+ var version$1 = "2.12.1";
1458
1458
  var description = "Command-line tool with commands to streamline the developer workflow.";
1459
1459
  //#endregion
1460
1460
  //#region src/cli/notifications/updates/checkUpdate.ts
@@ -1720,40 +1720,42 @@ async function sendBirthdayNotification(message) {
1720
1720
  }
1721
1721
  //#endregion
1722
1722
  //#region src/cli/notifications/helpers/birthdays.ts
1723
- const birthdays = [{
1724
- id: "alex",
1725
- date: /* @__PURE__ */ new Date("2003-07-16T00:00:00.000Z"),
1726
- getMessage: (age) => {
1727
- return normaliseIndents`
1723
+ const birthdays = {
1724
+ alex: {
1725
+ date: /* @__PURE__ */ new Date("2003-07-16T00:00:00.000Z"),
1726
+ getMessage: (age) => {
1727
+ return normaliseIndents`
1728
1728
  Happy birthday to AlexMan123456, my creator! 🎉
1729
1729
  He has turned ${age} years old today!
1730
1730
  `;
1731
- }
1732
- }, {
1733
- id: "alex-c-line",
1734
- date: /* @__PURE__ */ new Date("2025-07-20T00:00:00.000Z"),
1735
- getMessage: (age) => {
1736
- return normaliseIndents`
1731
+ }
1732
+ },
1733
+ "alex-c-line": {
1734
+ date: /* @__PURE__ */ new Date("2025-07-20T00:00:00.000Z"),
1735
+ getMessage: (age) => {
1736
+ return normaliseIndents`
1737
1737
  Happy birthday to me, alex-c-line! 🎉
1738
1738
  I have turned ${age} years old today!
1739
1739
  `;
1740
+ }
1740
1741
  }
1741
- }];
1742
+ };
1742
1743
  //#endregion
1743
1744
  //#region src/cli/notifications/birthday/maybeSendBirthdayNotification.ts
1744
1745
  async function maybeSendBirthdayNotification() {
1745
1746
  try {
1746
1747
  const cacheData = await loadAlexCLineGlobalCache();
1747
1748
  const currentDate = /* @__PURE__ */ new Date();
1748
- for (const birthday of birthdays) {
1749
- const lastChecked = cacheData?.birthdayChecks?.[birthday.id] ? new Date(cacheData.birthdayChecks[birthday.id]) : void 0;
1750
- if ((lastChecked === void 0 || lastChecked.getFullYear() !== currentDate.getFullYear()) && isAnniversary(currentDate, birthday.date)) {
1751
- await sendBirthdayNotification(birthday.getMessage(currentDate.getFullYear() - birthday.date.getFullYear()));
1749
+ for (const [birthdayId, birthdayData] of Object.entries(birthdays)) {
1750
+ const cacheKey = `${version$1}_${birthdayId}`;
1751
+ const lastChecked = cacheData?.birthdayChecks?.[cacheKey] ? new Date(cacheData.birthdayChecks[cacheKey]) : void 0;
1752
+ if ((lastChecked === void 0 || lastChecked.getFullYear() !== currentDate.getFullYear()) && isAnniversary(currentDate, birthdayData.date)) {
1753
+ await sendBirthdayNotification(birthdayData.getMessage(currentDate.getFullYear() - birthdayData.date.getFullYear()));
1752
1754
  await createAlexCLineGlobalCache({
1753
1755
  ...cacheData ?? {},
1754
1756
  birthdayChecks: {
1755
1757
  ...cacheData?.birthdayChecks ?? {},
1756
- [birthday.id]: currentDate.toISOString()
1758
+ [cacheKey]: currentDate.toISOString()
1757
1759
  }
1758
1760
  });
1759
1761
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alex-c-line",
3
- "version": "2.12.0",
3
+ "version": "2.12.1",
4
4
  "description": "Command-line tool with commands to streamline the developer workflow.",
5
5
  "repository": {
6
6
  "type": "git",