@vlandoss/run-run 0.4.0 → 0.4.2-git-1558746.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/README.md +5 -8
- package/dist/cli.usage.kdl +1 -1
- package/dist/run.mjs +13 -120
- package/package.json +2 -2
- package/src/program/ui.ts +18 -41
package/README.md
CHANGED
|
@@ -8,9 +8,12 @@ CLI toolbox to fullstack common scripts in Variable Land 👊
|
|
|
8
8
|
|
|
9
9
|
## Toolbox
|
|
10
10
|
|
|
11
|
-
- [
|
|
12
|
-
- [
|
|
11
|
+
- [biome](https://biomejs.dev)
|
|
12
|
+
- [tsc](https://www.typescriptlang.org)
|
|
13
13
|
- [rimraf](https://www.npmjs.com/package/rimraf)
|
|
14
|
+
- [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html)
|
|
15
|
+
- [oxlint](https://oxc.rs/docs/guide/usage/linter.html)
|
|
16
|
+
- [tsdown](https://tsdown.dev)
|
|
14
17
|
|
|
15
18
|
## Installation
|
|
16
19
|
|
|
@@ -61,9 +64,3 @@ To enable debug mode, set the `DEBUG` environment variable to `run-run:*` before
|
|
|
61
64
|
```sh
|
|
62
65
|
DEBUG=run-run:* rr <command>
|
|
63
66
|
```
|
|
64
|
-
|
|
65
|
-
Additionally, there is an special command to display `package.json` information:
|
|
66
|
-
|
|
67
|
-
```sh
|
|
68
|
-
rr info:pkg --help
|
|
69
|
-
```
|
package/dist/cli.usage.kdl
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @generated by @usage-spec/commander from Commander.js metadata
|
|
2
2
|
name rr
|
|
3
3
|
bin rr
|
|
4
|
-
version "0.4.0"
|
|
4
|
+
version "0.4.2-git-1558746.0"
|
|
5
5
|
usage "[options] <command...>"
|
|
6
6
|
flag --usage help="print KDL spec for this CLI (https://kdl.dev)"
|
|
7
7
|
cmd completion help="print shell completion script 🐚 (usage)" {
|
package/dist/run.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import { colorize, createPkgService, createShellService, cwd, dirnameOf, getVersion, palette, run, text } from "@vlandoss/clibuddy";
|
|
4
4
|
import { Argument, Option, createCommand } from "commander";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import os from "node:os";
|
|
@@ -95,7 +95,7 @@ const oxlintColor = colorize("#32F3E9");
|
|
|
95
95
|
const oxfmtColor = colorize("#32F3E9");
|
|
96
96
|
const tscColor = colorize("#3178C6");
|
|
97
97
|
const rimrafColor = colorize("#7C7270");
|
|
98
|
-
const runRunColor = colorize("
|
|
98
|
+
const runRunColor = colorize("#E8722A");
|
|
99
99
|
const usageColor = colorize("#24C55E");
|
|
100
100
|
const TOOL_LABELS = {
|
|
101
101
|
TSDOWN: tsdownColor("tsdown"),
|
|
@@ -108,124 +108,17 @@ const TOOL_LABELS = {
|
|
|
108
108
|
USAGE: usageColor("usage")
|
|
109
109
|
};
|
|
110
110
|
function getBannerText(version) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const B = FOX_COLORS.BLACK("██");
|
|
123
|
-
const O = FOX_COLORS.ORANGE("██");
|
|
124
|
-
const W = FOX_COLORS.WHITE("██");
|
|
125
|
-
const lines = [
|
|
126
|
-
[
|
|
127
|
-
_,
|
|
128
|
-
B,
|
|
129
|
-
_,
|
|
130
|
-
_,
|
|
131
|
-
_,
|
|
132
|
-
_,
|
|
133
|
-
_,
|
|
134
|
-
B,
|
|
135
|
-
_
|
|
136
|
-
],
|
|
137
|
-
[
|
|
138
|
-
_,
|
|
139
|
-
O,
|
|
140
|
-
W,
|
|
141
|
-
_,
|
|
142
|
-
_,
|
|
143
|
-
_,
|
|
144
|
-
W,
|
|
145
|
-
O,
|
|
146
|
-
_
|
|
147
|
-
],
|
|
148
|
-
[
|
|
149
|
-
_,
|
|
150
|
-
O,
|
|
151
|
-
W,
|
|
152
|
-
O,
|
|
153
|
-
_,
|
|
154
|
-
O,
|
|
155
|
-
W,
|
|
156
|
-
O,
|
|
157
|
-
_
|
|
158
|
-
],
|
|
159
|
-
[
|
|
160
|
-
B,
|
|
161
|
-
O,
|
|
162
|
-
O,
|
|
163
|
-
O,
|
|
164
|
-
O,
|
|
165
|
-
O,
|
|
166
|
-
O,
|
|
167
|
-
O,
|
|
168
|
-
B
|
|
169
|
-
],
|
|
170
|
-
[
|
|
171
|
-
O,
|
|
172
|
-
O,
|
|
173
|
-
O,
|
|
174
|
-
O,
|
|
175
|
-
O,
|
|
176
|
-
O,
|
|
177
|
-
O,
|
|
178
|
-
O,
|
|
179
|
-
O
|
|
180
|
-
],
|
|
181
|
-
[
|
|
182
|
-
W,
|
|
183
|
-
O,
|
|
184
|
-
B,
|
|
185
|
-
O,
|
|
186
|
-
O,
|
|
187
|
-
O,
|
|
188
|
-
B,
|
|
189
|
-
O,
|
|
190
|
-
W
|
|
191
|
-
],
|
|
192
|
-
[
|
|
193
|
-
_,
|
|
194
|
-
W,
|
|
195
|
-
W,
|
|
196
|
-
O,
|
|
197
|
-
O,
|
|
198
|
-
O,
|
|
199
|
-
W,
|
|
200
|
-
W,
|
|
201
|
-
_
|
|
202
|
-
],
|
|
203
|
-
[
|
|
204
|
-
_,
|
|
205
|
-
_,
|
|
206
|
-
W,
|
|
207
|
-
W,
|
|
208
|
-
B,
|
|
209
|
-
W,
|
|
210
|
-
W,
|
|
211
|
-
_,
|
|
212
|
-
_
|
|
213
|
-
],
|
|
214
|
-
[
|
|
215
|
-
_,
|
|
216
|
-
_,
|
|
217
|
-
_,
|
|
218
|
-
W,
|
|
219
|
-
W,
|
|
220
|
-
W,
|
|
221
|
-
_,
|
|
222
|
-
_,
|
|
223
|
-
_
|
|
224
|
-
]
|
|
225
|
-
].map((row) => row.join(""));
|
|
226
|
-
lines[3] += ` ${title}`;
|
|
227
|
-
lines[4] += ` ${subtitle}`;
|
|
228
|
-
return `${lines.join("\n")}\n`;
|
|
111
|
+
return `
|
|
112
|
+
${runRunColor(`
|
|
113
|
+
██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ██╗ ██╗███╗ ██╗
|
|
114
|
+
██╔══██╗██║ ██║████╗ ██║ ██╔══██╗██║ ██║████╗ ██║
|
|
115
|
+
██████╔╝██║ ██║██╔██╗ ██║█████╗██████╔╝██║ ██║██╔██╗ ██║
|
|
116
|
+
██╔══██╗██║ ██║██║╚██╗██║╚════╝██╔══██╗██║ ██║██║╚██╗██║
|
|
117
|
+
██║ ██║╚██████╔╝██║ ╚████║ ██║ ██║╚██████╔╝██║ ╚████║
|
|
118
|
+
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ${text.version(version)}
|
|
119
|
+
`.trim())}
|
|
120
|
+
|
|
121
|
+
🦊 ${palette.italic(palette.muted("The CLI toolbox for"))} ${text.vland}\n`.trimStart();
|
|
229
122
|
}
|
|
230
123
|
//#endregion
|
|
231
124
|
//#region src/services/tool.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vlandoss/run-run",
|
|
3
|
-
"version": "0.4.0",
|
|
3
|
+
"version": "0.4.2-git-1558746.0",
|
|
4
4
|
"description": "The CLI toolbox to fullstack common scripts in Variable Land",
|
|
5
5
|
"homepage": "https://github.com/variableland/dx/tree/main/packages/run-run#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"rimraf": "6.1.3",
|
|
65
65
|
"tsdown": "0.21.10",
|
|
66
66
|
"typescript": "6.0.3",
|
|
67
|
-
"@vlandoss/clibuddy": "0.3.0",
|
|
67
|
+
"@vlandoss/clibuddy": "0.3.1-git-1558746.0",
|
|
68
68
|
"@vlandoss/loggy": "0.2.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
package/src/program/ui.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { colorize, palette, text } from "@vlandoss/clibuddy";
|
|
2
2
|
|
|
3
3
|
export const CREDITS_TEXT = `\nAcknowledgment:
|
|
4
4
|
- kcd-scripts: for main inspiration
|
|
@@ -13,7 +13,7 @@ const oxlintColor = colorize("#32F3E9");
|
|
|
13
13
|
const oxfmtColor = colorize("#32F3E9");
|
|
14
14
|
const tscColor = colorize("#3178C6");
|
|
15
15
|
const rimrafColor = colorize("#7C7270");
|
|
16
|
-
const runRunColor = colorize("
|
|
16
|
+
const runRunColor = colorize("#E8722A");
|
|
17
17
|
const usageColor = colorize("#24C55E");
|
|
18
18
|
|
|
19
19
|
export const TOOL_LABELS = {
|
|
@@ -27,44 +27,21 @@ export const TOOL_LABELS = {
|
|
|
27
27
|
USAGE: usageColor("usage"),
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
// npx figlet -f "ANSI Shadow" "run-run"
|
|
30
31
|
export function getBannerText(version: string) {
|
|
31
|
-
const uiLogo =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const _ = " "; // hole
|
|
48
|
-
const B = FOX_COLORS.BLACK("██"); // black
|
|
49
|
-
const O = FOX_COLORS.ORANGE("██"); // orange
|
|
50
|
-
const W = FOX_COLORS.WHITE("██"); // white
|
|
51
|
-
|
|
52
|
-
const grid = [
|
|
53
|
-
[_, B, _, _, _, _, _, B, _],
|
|
54
|
-
[_, O, W, _, _, _, W, O, _],
|
|
55
|
-
[_, O, W, O, _, O, W, O, _],
|
|
56
|
-
[B, O, O, O, O, O, O, O, B],
|
|
57
|
-
[O, O, O, O, O, O, O, O, O],
|
|
58
|
-
[W, O, B, O, O, O, B, O, W],
|
|
59
|
-
[_, W, W, O, O, O, W, W, _],
|
|
60
|
-
[_, _, W, W, B, W, W, _, _],
|
|
61
|
-
[_, _, _, W, W, W, _, _, _],
|
|
62
|
-
];
|
|
63
|
-
|
|
64
|
-
const lines = grid.map((row) => row.join(""));
|
|
65
|
-
|
|
66
|
-
lines[3] += ` ${title}`;
|
|
67
|
-
lines[4] += ` ${subtitle}`;
|
|
68
|
-
|
|
69
|
-
return `${lines.join("\n")}\n`;
|
|
32
|
+
const uiLogo = runRunColor(
|
|
33
|
+
`
|
|
34
|
+
██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ██╗ ██╗███╗ ██╗
|
|
35
|
+
██╔══██╗██║ ██║████╗ ██║ ██╔══██╗██║ ██║████╗ ██║
|
|
36
|
+
██████╔╝██║ ██║██╔██╗ ██║█████╗██████╔╝██║ ██║██╔██╗ ██║
|
|
37
|
+
██╔══██╗██║ ██║██║╚██╗██║╚════╝██╔══██╗██║ ██║██║╚██╗██║
|
|
38
|
+
██║ ██║╚██████╔╝██║ ╚████║ ██║ ██║╚██████╔╝██║ ╚████║
|
|
39
|
+
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ${text.version(version)}
|
|
40
|
+
`.trim(),
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
return `
|
|
44
|
+
${uiLogo}
|
|
45
|
+
|
|
46
|
+
🦊 ${palette.italic(palette.muted("The CLI toolbox for"))} ${text.vland}\n`.trimStart();
|
|
70
47
|
}
|