alex-c-line 2.12.4 → 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.
- package/dist/configs/index.d.cts +4 -2
- package/dist/configs/index.d.ts +3 -2
- package/dist/configs/internal/index.d.cts +5 -1
- package/dist/configs/internal/index.d.ts +5 -1
- package/dist/index.cjs +11 -5
- package/dist/index.js +11 -5
- package/package.json +13 -12
package/dist/configs/index.d.cts
CHANGED
|
@@ -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. */
|
|
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>;
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -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. */
|
|
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. */
|
|
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. */
|
|
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
|
|
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
|
-
|
|
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.
|
|
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
|
|
@@ -1756,7 +1762,7 @@ async function sendBirthdayNotification(message) {
|
|
|
1756
1762
|
async function maybeSendBirthdayNotification() {
|
|
1757
1763
|
try {
|
|
1758
1764
|
if (typeof Temporal === "undefined") return;
|
|
1759
|
-
const birthdays =
|
|
1765
|
+
const { default: birthdays } = await Promise.resolve().then(() => require("./birthdays-C_y68wAl.cjs"));
|
|
1760
1766
|
const currentDate = Temporal.Now.plainDateISO();
|
|
1761
1767
|
const cacheData = await loadAlexCLineGlobalCache();
|
|
1762
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
|
|
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
|
-
|
|
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.
|
|
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
|
|
@@ -1725,7 +1731,7 @@ async function sendBirthdayNotification(message) {
|
|
|
1725
1731
|
async function maybeSendBirthdayNotification() {
|
|
1726
1732
|
try {
|
|
1727
1733
|
if (typeof Temporal === "undefined") return;
|
|
1728
|
-
const birthdays =
|
|
1734
|
+
const { default: birthdays } = await import("./birthdays-CWQxUfj-.js");
|
|
1729
1735
|
const currentDate = Temporal.Now.plainDateISO();
|
|
1730
1736
|
const cacheData = await loadAlexCLineGlobalCache();
|
|
1731
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.
|
|
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.
|
|
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.
|
|
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": "
|
|
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.
|
|
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.
|
|
64
|
+
"eslint": "10.7.0",
|
|
65
65
|
"husky": "9.1.7",
|
|
66
66
|
"markdownlint-cli2": "0.23.0",
|
|
67
|
-
"prettier": "3.9.
|
|
67
|
+
"prettier": "3.9.5",
|
|
68
68
|
"tempy": "3.2.0",
|
|
69
69
|
"ts-node": "10.9.2",
|
|
70
|
-
"tsdown": "0.22.
|
|
71
|
-
"tsx": "4.23.
|
|
70
|
+
"tsdown": "0.22.9",
|
|
71
|
+
"tsx": "4.23.1",
|
|
72
72
|
"typescript": "6.0.3",
|
|
73
|
-
"typescript-eslint": "8.
|
|
74
|
-
"vite": "8.1.
|
|
75
|
-
"vitest": "4.1.
|
|
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",
|