alex-c-line 2.12.2 → 2.12.3
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 +19 -8
- package/dist/index.js +20 -9
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1487,7 +1487,7 @@ function template(program) {
|
|
|
1487
1487
|
//#endregion
|
|
1488
1488
|
//#region package.json
|
|
1489
1489
|
var name = "alex-c-line";
|
|
1490
|
-
var version$1 = "2.12.
|
|
1490
|
+
var version$1 = "2.12.3";
|
|
1491
1491
|
var description = "Command-line tool with commands to streamline the developer workflow.";
|
|
1492
1492
|
//#endregion
|
|
1493
1493
|
//#region src/cli/notifications/updates/checkUpdate.ts
|
|
@@ -1755,7 +1755,11 @@ async function sendBirthdayNotification(message) {
|
|
|
1755
1755
|
//#region src/cli/notifications/helpers/birthdays.ts
|
|
1756
1756
|
const birthdays = {
|
|
1757
1757
|
alex: {
|
|
1758
|
-
date:
|
|
1758
|
+
date: Temporal.PlainDate.from({
|
|
1759
|
+
day: 16,
|
|
1760
|
+
month: 7,
|
|
1761
|
+
year: 2003
|
|
1762
|
+
}),
|
|
1759
1763
|
getMessage: (age) => {
|
|
1760
1764
|
return _alextheman_utility.normaliseIndents`
|
|
1761
1765
|
Happy birthday to AlexMan123456, my creator! 🎉
|
|
@@ -1764,7 +1768,11 @@ const birthdays = {
|
|
|
1764
1768
|
}
|
|
1765
1769
|
},
|
|
1766
1770
|
"alex-c-line": {
|
|
1767
|
-
date:
|
|
1771
|
+
date: Temporal.PlainDate.from({
|
|
1772
|
+
day: 20,
|
|
1773
|
+
month: 7,
|
|
1774
|
+
year: 2025
|
|
1775
|
+
}),
|
|
1768
1776
|
getMessage: (age) => {
|
|
1769
1777
|
return _alextheman_utility.normaliseIndents`
|
|
1770
1778
|
Happy birthday to me, alex-c-line! 🎉
|
|
@@ -1777,18 +1785,21 @@ const birthdays = {
|
|
|
1777
1785
|
//#region src/cli/notifications/birthday/maybeSendBirthdayNotification.ts
|
|
1778
1786
|
async function maybeSendBirthdayNotification() {
|
|
1779
1787
|
try {
|
|
1788
|
+
if (typeof Temporal === "undefined") return;
|
|
1789
|
+
const currentDate = Temporal.Now.plainDateISO();
|
|
1780
1790
|
const cacheData = await loadAlexCLineGlobalCache();
|
|
1781
|
-
const currentDate = /* @__PURE__ */ new Date();
|
|
1782
1791
|
for (const [birthdayId, birthdayData] of Object.entries(birthdays)) {
|
|
1783
1792
|
const cacheKey = `${version$1}_${birthdayId}`;
|
|
1784
|
-
const lastChecked = cacheData?.birthdayChecks?.[cacheKey] ?
|
|
1785
|
-
|
|
1786
|
-
|
|
1793
|
+
const lastChecked = cacheData?.birthdayChecks?.[cacheKey] ? Temporal.PlainDate.from(cacheData.birthdayChecks[cacheKey]) : void 0;
|
|
1794
|
+
const thisYearsBirthday = birthdayData.date.with({ year: currentDate.year }, { overflow: "constrain" });
|
|
1795
|
+
const { years: age } = birthdayData.date.until(currentDate, { largestUnit: "years" });
|
|
1796
|
+
if ((lastChecked === void 0 || lastChecked.year !== currentDate.year) && thisYearsBirthday.equals(currentDate)) {
|
|
1797
|
+
await sendBirthdayNotification(birthdayData.getMessage(age));
|
|
1787
1798
|
await createAlexCLineGlobalCache({
|
|
1788
1799
|
...cacheData ?? {},
|
|
1789
1800
|
birthdayChecks: {
|
|
1790
1801
|
...cacheData?.birthdayChecks ?? {},
|
|
1791
|
-
[cacheKey]: currentDate.
|
|
1802
|
+
[cacheKey]: currentDate.toString()
|
|
1792
1803
|
}
|
|
1793
1804
|
});
|
|
1794
1805
|
}
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import boxen from "boxen";
|
|
|
7
7
|
import figlet from "figlet";
|
|
8
8
|
import envPaths from "env-paths";
|
|
9
9
|
import path from "node:path";
|
|
10
|
-
import { ONE_DAY_IN_MILLISECONDS, VersionNumber, az, escapeHTML, escapeRegexPattern, fillArray, getStringsAndInterpolations, interpolate,
|
|
10
|
+
import { ONE_DAY_IN_MILLISECONDS, VersionNumber, az, escapeHTML, escapeRegexPattern, fillArray, getStringsAndInterpolations, interpolate, isTemplateStringsArray, kebabToCamel, normaliseIndents, omitProperties, parseBoolean, parseIntStrict, parseVersionType, removeDuplicates, removeUndefinedFromObject, sortBy, stringifyDotenv } from "@alextheman/utility";
|
|
11
11
|
import { confirm, input, password, select } from "@inquirer/prompts";
|
|
12
12
|
import { access, mkdir, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
|
|
13
13
|
import { parse } from "dotenv";
|
|
@@ -1456,7 +1456,7 @@ function template(program) {
|
|
|
1456
1456
|
//#endregion
|
|
1457
1457
|
//#region package.json
|
|
1458
1458
|
var name = "alex-c-line";
|
|
1459
|
-
var version$1 = "2.12.
|
|
1459
|
+
var version$1 = "2.12.3";
|
|
1460
1460
|
var description = "Command-line tool with commands to streamline the developer workflow.";
|
|
1461
1461
|
//#endregion
|
|
1462
1462
|
//#region src/cli/notifications/updates/checkUpdate.ts
|
|
@@ -1724,7 +1724,11 @@ async function sendBirthdayNotification(message) {
|
|
|
1724
1724
|
//#region src/cli/notifications/helpers/birthdays.ts
|
|
1725
1725
|
const birthdays = {
|
|
1726
1726
|
alex: {
|
|
1727
|
-
date:
|
|
1727
|
+
date: Temporal.PlainDate.from({
|
|
1728
|
+
day: 16,
|
|
1729
|
+
month: 7,
|
|
1730
|
+
year: 2003
|
|
1731
|
+
}),
|
|
1728
1732
|
getMessage: (age) => {
|
|
1729
1733
|
return normaliseIndents`
|
|
1730
1734
|
Happy birthday to AlexMan123456, my creator! 🎉
|
|
@@ -1733,7 +1737,11 @@ const birthdays = {
|
|
|
1733
1737
|
}
|
|
1734
1738
|
},
|
|
1735
1739
|
"alex-c-line": {
|
|
1736
|
-
date:
|
|
1740
|
+
date: Temporal.PlainDate.from({
|
|
1741
|
+
day: 20,
|
|
1742
|
+
month: 7,
|
|
1743
|
+
year: 2025
|
|
1744
|
+
}),
|
|
1737
1745
|
getMessage: (age) => {
|
|
1738
1746
|
return normaliseIndents`
|
|
1739
1747
|
Happy birthday to me, alex-c-line! 🎉
|
|
@@ -1746,18 +1754,21 @@ const birthdays = {
|
|
|
1746
1754
|
//#region src/cli/notifications/birthday/maybeSendBirthdayNotification.ts
|
|
1747
1755
|
async function maybeSendBirthdayNotification() {
|
|
1748
1756
|
try {
|
|
1757
|
+
if (typeof Temporal === "undefined") return;
|
|
1758
|
+
const currentDate = Temporal.Now.plainDateISO();
|
|
1749
1759
|
const cacheData = await loadAlexCLineGlobalCache();
|
|
1750
|
-
const currentDate = /* @__PURE__ */ new Date();
|
|
1751
1760
|
for (const [birthdayId, birthdayData] of Object.entries(birthdays)) {
|
|
1752
1761
|
const cacheKey = `${version$1}_${birthdayId}`;
|
|
1753
|
-
const lastChecked = cacheData?.birthdayChecks?.[cacheKey] ?
|
|
1754
|
-
|
|
1755
|
-
|
|
1762
|
+
const lastChecked = cacheData?.birthdayChecks?.[cacheKey] ? Temporal.PlainDate.from(cacheData.birthdayChecks[cacheKey]) : void 0;
|
|
1763
|
+
const thisYearsBirthday = birthdayData.date.with({ year: currentDate.year }, { overflow: "constrain" });
|
|
1764
|
+
const { years: age } = birthdayData.date.until(currentDate, { largestUnit: "years" });
|
|
1765
|
+
if ((lastChecked === void 0 || lastChecked.year !== currentDate.year) && thisYearsBirthday.equals(currentDate)) {
|
|
1766
|
+
await sendBirthdayNotification(birthdayData.getMessage(age));
|
|
1756
1767
|
await createAlexCLineGlobalCache({
|
|
1757
1768
|
...cacheData ?? {},
|
|
1758
1769
|
birthdayChecks: {
|
|
1759
1770
|
...cacheData?.birthdayChecks ?? {},
|
|
1760
|
-
[cacheKey]: currentDate.
|
|
1771
|
+
[cacheKey]: currentDate.toString()
|
|
1761
1772
|
}
|
|
1762
1773
|
});
|
|
1763
1774
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alex-c-line",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.3",
|
|
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.
|
|
37
|
+
"@alextheman/utility": "5.25.0",
|
|
38
38
|
"@inquirer/prompts": "8.5.2",
|
|
39
39
|
"axios": "1.18.1",
|
|
40
40
|
"boxen": "8.0.1",
|