alex-c-line 1.26.0 → 1.26.2
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/LICENSE +21 -0
- package/README.md +106 -0
- package/dist/index.cjs +9 -8
- package/dist/index.js +9 -8
- package/package.json +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License Copyright (c) 2026 alextheman231
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free
|
|
4
|
+
of charge, to any person obtaining a copy of this software and associated
|
|
5
|
+
documentation files (the "Software"), to deal in the Software without
|
|
6
|
+
restriction, including without limitation the rights to use, copy, modify, merge,
|
|
7
|
+
publish, distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice
|
|
12
|
+
(including the next paragraph) shall be included in all copies or substantial
|
|
13
|
+
portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
16
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
|
18
|
+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
19
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
20
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# alex-c-line
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
[](https://github.com/alextheman231/alex-c-line/actions/workflows/ci.yml)
|
|
8
|
+
[](https://github.com/alextheman231/alex-c-line/actions/workflows/publish.yml)
|
|
9
|
+
|
|
10
|
+
<img src="./artwork/alex-c-line.png" alt="alex-c-line artwork" width=250 height=250>
|
|
11
|
+
|
|
12
|
+
This is my command-line tool, which serves as a developer toolkit that can be used in any repository to streamline the developer workflow. It provides a flexible configuration system so you can customise its behaviour to match your workflow.
|
|
13
|
+
|
|
14
|
+
`alex-c-line` is designed to be developer-first, opinionated where it matters, and safe by default, especially when mutating repository state.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
To install the command-line tool, you can do this locally per working repository using the following command:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install alex-c-line
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`npm` may be replaced with your package manager of choice.
|
|
25
|
+
|
|
26
|
+
Alternatively, you can install it globally for usage all throughout your system, in any working repository. This will allow you to then use `alex-c-line` in repositories that may not even necessarily support it directly, so you can still feel the benefits of some of the more context-agnostic commands.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install -g alex-c-line
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Quick start
|
|
33
|
+
|
|
34
|
+
You can use any command by typing out `alex-c-line` in the terminal, followed by the command you want to run. For example:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
alex-c-line say-hello
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Some commands may even take extra arguments. For example:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
alex-c-line increment-version v1.2.3 major
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Flags may also be passed through in the following way.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
alex-c-line increment-version v1.2.3 major --no-prefix
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Note that for `use-local-package` specifically, you will need to add `--` before the local `alex-c-line` arguments to ensure that all flags get passed through correctly. Example:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
alex-c-line use-local-package alex-c-line -- increment-version v1.2.3 major --no-prefix
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Configs
|
|
59
|
+
|
|
60
|
+
Some commands also support usage of the config system. For example, `pre-commit-2` supports the `alex-c-line.config.js` file, and `use-local-package` supports the more user-specific `.alex-c-line.private.config.js` file. `alex-c-line.config.js` is intended for shared configurations per repository, whereas `.alex-c-line.private.config.js` are for configurations specific to the user's usage.
|
|
61
|
+
|
|
62
|
+
The `configs` subpath provides some helper functions and types that may be helpful when constructing these configs. Namely, `defineAlexCLineConfig` can be used as a type helper, so that you get better type hints in the editor.
|
|
63
|
+
|
|
64
|
+
```javascript
|
|
65
|
+
import { defineAlexCLineConfig } from "alex-c-line/configs";
|
|
66
|
+
|
|
67
|
+
export default defineAlexCLineConfig({
|
|
68
|
+
createPullRequestTemplate: {
|
|
69
|
+
category: "general",
|
|
70
|
+
projectType: "package",
|
|
71
|
+
},
|
|
72
|
+
preCommit: {
|
|
73
|
+
packageManager: "pnpm",
|
|
74
|
+
steps: ["build", "format", "lint", "test"],
|
|
75
|
+
},
|
|
76
|
+
})
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Alternatively, you can create a TypeScript file, then build it to a pure JavaScript file, and the benefit of that is that you'd be able to use the types directly instead, which may be better as it even takes a type argument for the pre-commit steps.
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
import type { AlexCLineConfig } from "alex-c-line/configs";
|
|
83
|
+
|
|
84
|
+
import { scripts } from "./package.json" with { type: "json" };
|
|
85
|
+
|
|
86
|
+
const alexCLineConfig: AlexCLineConfig<keyof typeof scripts> = {
|
|
87
|
+
createPullRequestTemplate: {
|
|
88
|
+
category: "general",
|
|
89
|
+
projectType: "package",
|
|
90
|
+
},
|
|
91
|
+
preCommit: {
|
|
92
|
+
packageManager: "pnpm",
|
|
93
|
+
steps: ["build", "format", "lint", "test"],
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export default alexCLineConfig;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Note, however, that we do not support directly running config files with TypeScript just yet. This may be planned in the near future, but for now, building the pure TypeScript file to pure JavaScript and using that as the config file is the best bet as of now.
|
|
101
|
+
|
|
102
|
+
Private configs can be treated in the same way, except the type would be `AlexCLinePrivateConfig`, and the function `defineAlexCLinePrivateConfig`. Please also note that if you create a private config in a shared repository, it MUST be added to `.gitignore` so that it stays user-specific and does not get included in version control.
|
|
103
|
+
|
|
104
|
+
## Documentation
|
|
105
|
+
|
|
106
|
+
A full documentation site is coming soon. In the meantime, you may run `alex-c-line --help` for more information about how to use all commands.
|
package/dist/index.cjs
CHANGED
|
@@ -1575,16 +1575,18 @@ function formatError(error) {
|
|
|
1575
1575
|
|
|
1576
1576
|
//#endregion
|
|
1577
1577
|
//#region package.json
|
|
1578
|
-
var
|
|
1578
|
+
var name = "alex-c-line";
|
|
1579
|
+
var version = "1.26.2";
|
|
1580
|
+
var description = "Command-line tool with commands to streamline the developer workflow.";
|
|
1579
1581
|
var package_default = {
|
|
1580
|
-
name
|
|
1582
|
+
name,
|
|
1581
1583
|
version,
|
|
1582
|
-
description
|
|
1584
|
+
description,
|
|
1583
1585
|
repository: {
|
|
1584
1586
|
"type": "git",
|
|
1585
1587
|
"url": "git+https://github.com/alextheman231/alex-c-line.git"
|
|
1586
1588
|
},
|
|
1587
|
-
license: "
|
|
1589
|
+
license: "MIT",
|
|
1588
1590
|
author: "alextheman",
|
|
1589
1591
|
type: "module",
|
|
1590
1592
|
exports: {
|
|
@@ -1688,10 +1690,9 @@ var package_default = {
|
|
|
1688
1690
|
(async () => {
|
|
1689
1691
|
try {
|
|
1690
1692
|
const program = new commander.Command();
|
|
1691
|
-
program.name(
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
if (notifier.update) notifier.notify({ message: `${await createAlexCLineArtwork({ includeColors: Boolean(supports_color.default.stdout) })}
|
|
1693
|
+
program.name(name).description(description).version(version);
|
|
1694
|
+
(0, update_notifier.default)({ pkg: package_default }).notify({ message: `
|
|
1695
|
+
${await createAlexCLineArtwork({ includeColors: Boolean(supports_color.default.stdout) })}
|
|
1695
1696
|
A new update of \`alex-c-line\` is available!
|
|
1696
1697
|
{currentVersion} → {latestVersion}
|
|
1697
1698
|
Run \`{updateCommand}\` to update.
|
package/dist/index.js
CHANGED
|
@@ -1537,16 +1537,18 @@ function formatError(error) {
|
|
|
1537
1537
|
|
|
1538
1538
|
//#endregion
|
|
1539
1539
|
//#region package.json
|
|
1540
|
-
var
|
|
1540
|
+
var name = "alex-c-line";
|
|
1541
|
+
var version = "1.26.2";
|
|
1542
|
+
var description = "Command-line tool with commands to streamline the developer workflow.";
|
|
1541
1543
|
var package_default = {
|
|
1542
|
-
name
|
|
1544
|
+
name,
|
|
1543
1545
|
version,
|
|
1544
|
-
description
|
|
1546
|
+
description,
|
|
1545
1547
|
repository: {
|
|
1546
1548
|
"type": "git",
|
|
1547
1549
|
"url": "git+https://github.com/alextheman231/alex-c-line.git"
|
|
1548
1550
|
},
|
|
1549
|
-
license: "
|
|
1551
|
+
license: "MIT",
|
|
1550
1552
|
author: "alextheman",
|
|
1551
1553
|
type: "module",
|
|
1552
1554
|
exports: {
|
|
@@ -1650,10 +1652,9 @@ var package_default = {
|
|
|
1650
1652
|
(async () => {
|
|
1651
1653
|
try {
|
|
1652
1654
|
const program = new Command();
|
|
1653
|
-
program.name(
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
if (notifier.update) notifier.notify({ message: `${await createAlexCLineArtwork({ includeColors: Boolean(supportsColor.stdout) })}
|
|
1655
|
+
program.name(name).description(description).version(version);
|
|
1656
|
+
updateNotifier({ pkg: package_default }).notify({ message: `
|
|
1657
|
+
${await createAlexCLineArtwork({ includeColors: Boolean(supportsColor.stdout) })}
|
|
1657
1658
|
A new update of \`alex-c-line\` is available!
|
|
1658
1659
|
{currentVersion} → {latestVersion}
|
|
1659
1660
|
Run \`{updateCommand}\` to update.
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alex-c-line",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.2",
|
|
4
4
|
"description": "Command-line tool with commands to streamline the developer workflow.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/alextheman231/alex-c-line.git"
|
|
8
8
|
},
|
|
9
|
-
"license": "
|
|
9
|
+
"license": "MIT",
|
|
10
10
|
"author": "alextheman",
|
|
11
11
|
"type": "module",
|
|
12
12
|
"exports": {
|