@rrlab/cli 1.1.1-git-4903a88.0 → 1.2.1-git-5a5faa9.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 +10 -10
- package/dist/cli.usage.kdl +1 -1
- package/dist/run.mjs +1 -1
- package/package.json +3 -3
- package/src/actions/tsc.ts +2 -2
package/README.md
CHANGED
|
@@ -6,15 +6,6 @@ CLI toolbox to fullstack common scripts in [Variable Land](https://variable.land
|
|
|
6
6
|
|
|
7
7
|
- Node.js >= 20.0.0
|
|
8
8
|
|
|
9
|
-
## Toolbox
|
|
10
|
-
|
|
11
|
-
- [biome](https://biomejs.dev)
|
|
12
|
-
- [tsc](https://www.typescriptlang.org)
|
|
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)
|
|
17
|
-
|
|
18
9
|
## Installation
|
|
19
10
|
|
|
20
11
|
```sh
|
|
@@ -37,7 +28,16 @@ See [`CLI.md`](./CLI.md) for the full reference (auto-generated per release).
|
|
|
37
28
|
|
|
38
29
|
## Plugins
|
|
39
30
|
|
|
40
|
-
`rr` is a microkernel: every tool
|
|
31
|
+
`rr` is a microkernel: every tool lives in its own `@rrlab/<tool>-plugin` package. The official plugins are:
|
|
32
|
+
|
|
33
|
+
| Plugin | Wraps | Install |
|
|
34
|
+
| -------- | -------------------------------------------------------------------------------------------------------------- | ------------------------ |
|
|
35
|
+
| `biome` | [Biome](https://biomejs.dev) | `rr plugins add biome` |
|
|
36
|
+
| `oxc` | [oxlint](https://oxc.rs/docs/guide/usage/linter.html) + [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) | `rr plugins add oxc` |
|
|
37
|
+
| `ts` | [tsc](https://www.typescriptlang.org) | `rr plugins add ts` |
|
|
38
|
+
| `tsdown` | [tsdown](https://tsdown.dev) | `rr plugins add tsdown` |
|
|
39
|
+
|
|
40
|
+
Install one with:
|
|
41
41
|
|
|
42
42
|
```sh
|
|
43
43
|
rr plugins add biome
|
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 "1.
|
|
4
|
+
version "1.2.1-git-5a5faa9.0"
|
|
5
5
|
usage "[options] [command]"
|
|
6
6
|
flag --about help="show credits & inspiration"
|
|
7
7
|
flag --usage help="print KDL spec for this CLI (https://kdl.dev)"
|
package/dist/run.mjs
CHANGED
|
@@ -371,7 +371,7 @@ function jscAction({ ctx, checker, options }) {
|
|
|
371
371
|
}
|
|
372
372
|
//#endregion
|
|
373
373
|
//#region src/actions/tsc.ts
|
|
374
|
-
const getPreScript = (scripts) => scripts?.pretsc ?? scripts?.pretypecheck;
|
|
374
|
+
const getPreScript = (scripts) => scripts?.pretscheck ?? scripts?.pretsc ?? scripts?.pretypecheck;
|
|
375
375
|
async function tscAction({ ctx, tsc }) {
|
|
376
376
|
const { appPkg, shell } = ctx;
|
|
377
377
|
const isTsProject = (dir) => appPkg.hasFile("tsconfig.json", dir);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rrlab/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.1-git-5a5faa9.0",
|
|
4
4
|
"description": "The CLI toolbox to fullstack common scripts in Variable Land",
|
|
5
5
|
"homepage": "https://github.com/variableland/dx/tree/main/run-run/cli#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"memoize": "10.2.0",
|
|
58
58
|
"nypm": "0.6.0",
|
|
59
59
|
"rimraf": "6.1.3",
|
|
60
|
-
"@vlandoss/clibuddy": "0.7.1
|
|
60
|
+
"@vlandoss/clibuddy": "0.7.1",
|
|
61
61
|
"@vlandoss/loggy": "0.2.1"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"test": "vitest run",
|
|
71
71
|
"test:unit": "vitest run --project unit",
|
|
72
72
|
"test:integration": "vitest run --project integration",
|
|
73
|
-
"
|
|
73
|
+
"tscheck": "rr tsc"
|
|
74
74
|
}
|
|
75
75
|
}
|
package/src/actions/tsc.ts
CHANGED
|
@@ -11,14 +11,14 @@ export type TscActionConfig = {
|
|
|
11
11
|
|
|
12
12
|
type Scripts = Record<string, string | undefined> | undefined;
|
|
13
13
|
|
|
14
|
-
const getPreScript = (scripts: Scripts) => scripts?.pretsc ?? scripts?.pretypecheck;
|
|
14
|
+
const getPreScript = (scripts: Scripts) => scripts?.pretscheck ?? scripts?.pretsc ?? scripts?.pretypecheck;
|
|
15
15
|
|
|
16
16
|
export async function tscAction({ ctx, tsc }: TscActionConfig): Promise<void> {
|
|
17
17
|
const { appPkg, shell } = ctx;
|
|
18
18
|
|
|
19
19
|
const isTsProject = (dir: string) => appPkg.hasFile("tsconfig.json", dir);
|
|
20
20
|
|
|
21
|
-
// A package's `pretsc`/`pretypecheck` runs captured, inside the task, so its
|
|
21
|
+
// A package's `pretscheck`/`pretsc`/`pretypecheck` runs captured, inside the task, so its
|
|
22
22
|
// output stays grouped with that package. It may use shell features, so it
|
|
23
23
|
// goes through `/bin/sh -c`. A failing pre-script fails the task before tsc.
|
|
24
24
|
const typecheckTask = (label: string, dir: string, scripts: Scripts): BoardTask =>
|